configure revision 4419d26b
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  --enable-status-line    enable support for status-line
796  --disable-tcap-fkeys    disable termcap function-keys support
797  --disable-tcap-query    disable compiled-in termcap-query support
798  --disable-tek4014       disable tek4014 emulation
799  --enable-toolbar        compile-in toolbar for pulldown menus
800  --disable-vt52          disable VT52 emulation
801  --disable-wide-attrs    disable wide-attribute support
802  --disable-wide-chars    disable wide-character support
803  --enable-16bit-chars    enable 16-bit character support
804  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
805  --disable-luit          enable luit filter (Unicode translation)
806  --enable-dabbrev        enable dynamic-abbreviation support
807  --enable-dec-locator    enable DECterm Locator support
808  --disable-screen-dumps  disable XHTML and SVG screen dumps
809  --enable-regis-graphics enable ReGIS graphics support
810  --disable-sixel-graphics disable sixel graphics support
811  --disable-print-graphics disable screen dump to sixel support
812  --disable-rectangles    disable VT420 rectangle support
813  --disable-ziconbeep     disable -ziconbeep option
814Testing/development Options:
815  --enable-trace          test: set to enable debugging traces
816  --with-dmalloc          test: use Gray Watson's dmalloc library
817  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
818  --with-valgrind         test: use valgrind
819  --disable-leaks         test: free permanent memory, analyze leaks
820  --disable-echo          do not display "compiling" commands
821  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
822  --enable-warnings       test: turn on gcc compiler warnings
823  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
824  --disable-rpath-hack    don't add rpath options for additional libraries
825
826Some influential environment variables:
827  CC          C compiler command
828  CFLAGS      C compiler flags
829  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
830              nonstandard directory <lib dir>
831  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
832              headers in a nonstandard directory <include dir>
833  CPP         C preprocessor
834
835Use these variables to override the choices made by `configure' or to help
836it to find libraries and programs with nonstandard names/locations.
837
838EOF
839fi
840
841if test "$ac_init_help" = "recursive"; then
842  # If there are subdirs, report their specific --help.
843  ac_popdir=`pwd`
844  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
845    cd "$ac_subdir"
846    # A "../" for each directory in /$ac_subdir.
847    ac_dots=`echo "$ac_subdir" |
848             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
849
850    case "$srcdir" in
851    .) # No --srcdir option.  We are building in place.
852      ac_sub_srcdir="$srcdir" ;;
853    [\\/]* | ?:[\\/]* ) # Absolute path.
854      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
855    *) # Relative path.
856      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
857    esac
858
859    # Check for guested configure; otherwise get Cygnus style configure.
860    if test -f "$ac_sub_srcdir/configure.gnu"; then
861      echo
862      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
863    elif test -f "$ac_sub_srcdir/configure"; then
864      echo
865      $SHELL "$ac_sub_srcdir/configure" --help=recursive
866    elif test -f "$ac_sub_srcdir/configure.ac" ||
867           test -f "$ac_sub_srcdir/configure.in"; then
868      echo
869      "$ac_configure" --help
870    else
871      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
872    fi
873    cd "$ac_popdir"
874  done
875fi
876
877test -n "$ac_init_help" && exit 0
878if "$ac_init_version"; then
879  cat <<\EOF
880
881Copyright 2003-2020,2021	Thomas E. Dickey
882Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
883Free Software Foundation, Inc.
884This configure script is free software; the Free Software Foundation
885gives unlimited permission to copy, distribute and modify it.
886EOF
887  exit 0
888fi
889exec 5>config.log
890cat >&5 <<EOF
891This file contains any messages produced by compilers while
892running configure, to aid debugging if configure makes a mistake.
893
894It was created by $as_me, which was
895generated by GNU Autoconf 2.52.20210509.  Invocation command line was
896
897  $ $0 $@
898
899EOF
900{
901cat <<_ASUNAME
902## ---------- ##
903## Platform.  ##
904## ---------- ##
905
906hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
907uname -m = `(uname -m) 2>/dev/null || echo unknown`
908uname -r = `(uname -r) 2>/dev/null || echo unknown`
909uname -s = `(uname -s) 2>/dev/null || echo unknown`
910uname -v = `(uname -v) 2>/dev/null || echo unknown`
911
912/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
913/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
914
915/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
916/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
917/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
918hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
919/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
920/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
921/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
922
923PATH = $PATH
924
925_ASUNAME
926} >&5
927
928cat >&5 <<EOF
929## ------------ ##
930## Core tests.  ##
931## ------------ ##
932
933EOF
934
935# Keep a trace of the command line.
936# Strip out --no-create and --no-recursion so they do not pile up.
937# Also quote any args containing shell meta-characters.
938ac_configure_args=
939ac_sep=
940for ac_arg
941do
942  case "$ac_arg" in
943  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
944  | --no-cr | --no-c) ;;
945  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
946  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
947  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
948    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
949    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
950    ac_sep=" " ;;
951  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
952     ac_sep=" " ;;
953  esac
954  # Get rid of the leading space.
955done
956
957# When interrupted or exit'd, cleanup temporary files, and complete
958# config.log.  We remove comments because anyway the quotes in there
959# would cause problems or look ugly.
960trap 'exit_status=$?
961  # Save into config.log some information that might help in debugging.
962  echo >&5
963  echo "## ----------------- ##" >&5
964  echo "## Cache variables.  ##" >&5
965  echo "## ----------------- ##" >&5
966  echo >&5
967  # The following way of writing the cache mishandles newlines in values,
968{
969  (set) 2>&1 |
970    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
971    *ac_space=\ *)
972      sed -n \
973        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
974    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
975      ;;
976    *)
977      sed -n \
978        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
979      ;;
980    esac;
981} >&5
982  sed "/^$/d" confdefs.h >conftest.log
983  if test -s conftest.log; then
984    echo >&5
985    echo "## ------------ ##" >&5
986    echo "## confdefs.h.  ##" >&5
987    echo "## ------------ ##" >&5
988    echo >&5
989    cat conftest.log >&5
990  fi
991  (echo; echo) >&5
992  test "$ac_signal" != 0 &&
993    echo "$as_me: caught signal $ac_signal" >&5
994  echo "$as_me: exit $exit_status" >&5
995  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
996    exit $exit_status
997     ' 0
998for ac_signal in 1 2 13 15; do
999  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1000done
1001ac_signal=0
1002
1003# confdefs.h avoids OS command line length limits that DEFS can exceed.
1004rm -rf conftest* confdefs.h
1005# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1006echo >confdefs.h
1007
1008# Let the site file select an alternate cache file if it wants to.
1009# Prefer explicitly selected file to automatically selected ones.
1010if test -z "$CONFIG_SITE"; then
1011  if test "x$prefix" != xNONE; then
1012    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1013  else
1014    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1015  fi
1016fi
1017for ac_site_file in $CONFIG_SITE; do
1018  if test -r "$ac_site_file"; then
1019    { echo "$as_me:1019: loading site script $ac_site_file" >&5
1020echo "$as_me: loading site script $ac_site_file" >&6;}
1021    cat "$ac_site_file" >&5
1022    . "$ac_site_file"
1023  fi
1024done
1025
1026if test -r "$cache_file"; then
1027  # Some versions of bash will fail to source /dev/null (special
1028  # files actually), so we avoid doing that.
1029  if test -f "$cache_file"; then
1030    { echo "$as_me:1030: loading cache $cache_file" >&5
1031echo "$as_me: loading cache $cache_file" >&6;}
1032    case $cache_file in
1033      [\\/]* | ?:[\\/]* ) . $cache_file;;
1034      *)                      . ./$cache_file;;
1035    esac
1036  fi
1037else
1038  { echo "$as_me:1038: creating cache $cache_file" >&5
1039echo "$as_me: creating cache $cache_file" >&6;}
1040  >$cache_file
1041fi
1042
1043# Check that the precious variables saved in the cache have kept the same
1044# value.
1045ac_cache_corrupted=false
1046for ac_var in `(set) 2>&1 |
1047               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1048  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1049  eval ac_new_set=\$ac_env_${ac_var}_set
1050  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1051  eval ac_new_val="\$ac_env_${ac_var}_value"
1052  case "$ac_old_set,$ac_new_set" in
1053    set,)
1054      { echo "$as_me:1054: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1055echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1056      ac_cache_corrupted=: ;;
1057    ,set)
1058      { echo "$as_me:1058: error: \`$ac_var' was not set in the previous run" >&5
1059echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1060      ac_cache_corrupted=: ;;
1061    ,);;
1062    *)
1063      if test "x$ac_old_val" != "x$ac_new_val"; then
1064        { echo "$as_me:1064: error: \`$ac_var' has changed since the previous run:" >&5
1065echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1066        { echo "$as_me:1066:   former value:  $ac_old_val" >&5
1067echo "$as_me:   former value:  $ac_old_val" >&2;}
1068        { echo "$as_me:1068:   current value: $ac_new_val" >&5
1069echo "$as_me:   current value: $ac_new_val" >&2;}
1070        ac_cache_corrupted=:
1071      fi;;
1072  esac
1073  # Pass precious variables to config.status.  It doesn't matter if
1074  # we pass some twice (in addition to the command line arguments).
1075  if test "$ac_new_set" = set; then
1076    case "$ac_new_val" in
1077    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1078      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1079      ac_configure_args="$ac_configure_args '$ac_arg'"
1080      ;;
1081    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1082       ;;
1083    esac
1084  fi
1085done
1086if "$ac_cache_corrupted"; then
1087  { echo "$as_me:1087: error: changes in the environment can compromise the build" >&5
1088echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1089  { { echo "$as_me:1089: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1090echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1091   { (exit 1); exit 1; }; }
1092fi
1093
1094ac_ext=c
1095ac_cpp='$CPP $CPPFLAGS'
1096ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1097ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1098ac_compiler_gnu=$ac_cv_c_compiler_gnu
1099ac_main_return="return"
1100
1101case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1102  *c*,-n*) ECHO_N=
1103           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1104           ECHO_T='	'
1105           ;;
1106  *c*,*  ) ECHO_N=-n
1107           ECHO_C=
1108           ECHO_T=
1109           ;;
1110  *)       ECHO_N=
1111           ECHO_C='\c'
1112           ECHO_T=
1113           ;;
1114esac
1115echo "#! $SHELL" >conftest.sh
1116echo  "exit 0"   >>conftest.sh
1117chmod +x conftest.sh
1118if { (echo "$as_me:1118: PATH=\".;.\"; conftest.sh") >&5
1119  (PATH=".;."; conftest.sh) 2>&5
1120  ac_status=$?
1121  echo "$as_me:1121: \$? = $ac_status" >&5
1122  (exit "$ac_status"); }; then
1123  ac_path_separator=';'
1124else
1125  ac_path_separator=:
1126fi
1127PATH_SEPARATOR="$ac_path_separator"
1128rm -f conftest.sh
1129
1130ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1131
1132ac_aux_dir=
1133for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1134  if test -f "$ac_dir/install-sh"; then
1135    ac_aux_dir=$ac_dir
1136    ac_install_sh="$ac_aux_dir/install-sh -c"
1137    break
1138  elif test -f "$ac_dir/install.sh"; then
1139    ac_aux_dir=$ac_dir
1140    ac_install_sh="$ac_aux_dir/install.sh -c"
1141    break
1142  elif test -f "$ac_dir/shtool"; then
1143    ac_aux_dir=$ac_dir
1144    ac_install_sh="$ac_aux_dir/shtool install -c"
1145    break
1146  fi
1147done
1148if test -z "$ac_aux_dir"; then
1149  { { echo "$as_me:1149: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1150echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1151   { (exit 1); exit 1; }; }
1152fi
1153ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1154ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1155ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1156
1157# Make sure we can run config.sub.
1158$ac_config_sub sun4 >/dev/null 2>&1 ||
1159  { { echo "$as_me:1159: error: cannot run $ac_config_sub" >&5
1160echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1161   { (exit 1); exit 1; }; }
1162
1163echo "$as_me:1163: checking build system type" >&5
1164echo $ECHO_N "checking build system type... $ECHO_C" >&6
1165if test "${ac_cv_build+set}" = set; then
1166  echo $ECHO_N "(cached) $ECHO_C" >&6
1167else
1168  ac_cv_build_alias=$build_alias
1169test -z "$ac_cv_build_alias" &&
1170  ac_cv_build_alias=`$ac_config_guess`
1171test -z "$ac_cv_build_alias" &&
1172  { { echo "$as_me:1172: error: cannot guess build type; you must specify one" >&5
1173echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1174   { (exit 1); exit 1; }; }
1175ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1176  { { echo "$as_me:1176: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1177echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1178   { (exit 1); exit 1; }; }
1179
1180fi
1181echo "$as_me:1181: result: $ac_cv_build" >&5
1182echo "${ECHO_T}$ac_cv_build" >&6
1183build=$ac_cv_build
1184build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1185build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1186build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1187
1188if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1189	echo "$as_me:1189: checking host system type" >&5
1190echo $ECHO_N "checking host system type... $ECHO_C" >&6
1191if test "${ac_cv_host+set}" = set; then
1192  echo $ECHO_N "(cached) $ECHO_C" >&6
1193else
1194  ac_cv_host_alias=$host_alias
1195test -z "$ac_cv_host_alias" &&
1196  ac_cv_host_alias=$ac_cv_build_alias
1197ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1198  { { echo "$as_me:1198: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1199echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1200   { (exit 1); exit 1; }; }
1201
1202fi
1203echo "$as_me:1203: result: $ac_cv_host" >&5
1204echo "${ECHO_T}$ac_cv_host" >&6
1205host=$ac_cv_host
1206host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1207host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1208host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1209
1210	system_name="$host_os"
1211else
1212	system_name="`(uname -s -r) 2>/dev/null`"
1213	if test -z "$system_name" ; then
1214		system_name="`(hostname) 2>/dev/null`"
1215	fi
1216fi
1217test -n "$system_name" &&
1218cat >>confdefs.h <<EOF
1219#define SYSTEM_NAME "$system_name"
1220EOF
1221
1222if test "${cf_cv_system_name+set}" = set; then
1223  echo $ECHO_N "(cached) $ECHO_C" >&6
1224else
1225  cf_cv_system_name="$system_name"
1226fi
1227
1228test -z "$system_name" && system_name="$cf_cv_system_name"
1229test -n "$cf_cv_system_name" && echo "$as_me:1229: result: Configuring for $cf_cv_system_name" >&5
1230echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1231
1232if test ".$system_name" != ".$cf_cv_system_name" ; then
1233	echo "$as_me:1233: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1234echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1235	{ { echo "$as_me:1235: error: \"Please remove config.cache and try again.\"" >&5
1236echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1237   { (exit 1); exit 1; }; }
1238fi
1239
1240###	checks for alternative programs
1241
1242case "$host_os" in
1243(openedition)	: "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
1244		: "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
1245		: "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
1246		: "${CC=c89}";;
1247(darwin*)
1248		: "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
1249esac
1250
1251ac_ext=c
1252ac_cpp='$CPP $CPPFLAGS'
1253ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1254ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1255ac_compiler_gnu=$ac_cv_c_compiler_gnu
1256ac_main_return="return"
1257if test -n "$ac_tool_prefix"; then
1258  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1259set dummy ${ac_tool_prefix}gcc; ac_word=$2
1260echo "$as_me:1260: checking for $ac_word" >&5
1261echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1262if test "${ac_cv_prog_CC+set}" = set; then
1263  echo $ECHO_N "(cached) $ECHO_C" >&6
1264else
1265  if test -n "$CC"; then
1266  ac_cv_prog_CC="$CC" # Let the user override the test.
1267else
1268  ac_save_IFS=$IFS; IFS=$ac_path_separator
1269ac_dummy="$PATH"
1270for ac_dir in $ac_dummy; do
1271  IFS=$ac_save_IFS
1272  test -z "$ac_dir" && ac_dir=.
1273  $as_executable_p "$ac_dir/$ac_word" || continue
1274ac_cv_prog_CC="${ac_tool_prefix}gcc"
1275echo "$as_me:1275: found $ac_dir/$ac_word" >&5
1276break
1277done
1278
1279fi
1280fi
1281CC=$ac_cv_prog_CC
1282if test -n "$CC"; then
1283  echo "$as_me:1283: result: $CC" >&5
1284echo "${ECHO_T}$CC" >&6
1285else
1286  echo "$as_me:1286: result: no" >&5
1287echo "${ECHO_T}no" >&6
1288fi
1289
1290fi
1291if test -z "$ac_cv_prog_CC"; then
1292  ac_ct_CC=$CC
1293  # Extract the first word of "gcc", so it can be a program name with args.
1294set dummy gcc; ac_word=$2
1295echo "$as_me:1295: checking for $ac_word" >&5
1296echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1297if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1298  echo $ECHO_N "(cached) $ECHO_C" >&6
1299else
1300  if test -n "$ac_ct_CC"; then
1301  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1302else
1303  ac_save_IFS=$IFS; IFS=$ac_path_separator
1304ac_dummy="$PATH"
1305for ac_dir in $ac_dummy; do
1306  IFS=$ac_save_IFS
1307  test -z "$ac_dir" && ac_dir=.
1308  $as_executable_p "$ac_dir/$ac_word" || continue
1309ac_cv_prog_ac_ct_CC="gcc"
1310echo "$as_me:1310: found $ac_dir/$ac_word" >&5
1311break
1312done
1313
1314fi
1315fi
1316ac_ct_CC=$ac_cv_prog_ac_ct_CC
1317if test -n "$ac_ct_CC"; then
1318  echo "$as_me:1318: result: $ac_ct_CC" >&5
1319echo "${ECHO_T}$ac_ct_CC" >&6
1320else
1321  echo "$as_me:1321: result: no" >&5
1322echo "${ECHO_T}no" >&6
1323fi
1324
1325  CC=$ac_ct_CC
1326else
1327  CC="$ac_cv_prog_CC"
1328fi
1329
1330if test -z "$CC"; then
1331  if test -n "$ac_tool_prefix"; then
1332  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1333set dummy ${ac_tool_prefix}cc; ac_word=$2
1334echo "$as_me:1334: checking for $ac_word" >&5
1335echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1336if test "${ac_cv_prog_CC+set}" = set; then
1337  echo $ECHO_N "(cached) $ECHO_C" >&6
1338else
1339  if test -n "$CC"; then
1340  ac_cv_prog_CC="$CC" # Let the user override the test.
1341else
1342  ac_save_IFS=$IFS; IFS=$ac_path_separator
1343ac_dummy="$PATH"
1344for ac_dir in $ac_dummy; do
1345  IFS=$ac_save_IFS
1346  test -z "$ac_dir" && ac_dir=.
1347  $as_executable_p "$ac_dir/$ac_word" || continue
1348ac_cv_prog_CC="${ac_tool_prefix}cc"
1349echo "$as_me:1349: found $ac_dir/$ac_word" >&5
1350break
1351done
1352
1353fi
1354fi
1355CC=$ac_cv_prog_CC
1356if test -n "$CC"; then
1357  echo "$as_me:1357: result: $CC" >&5
1358echo "${ECHO_T}$CC" >&6
1359else
1360  echo "$as_me:1360: result: no" >&5
1361echo "${ECHO_T}no" >&6
1362fi
1363
1364fi
1365if test -z "$ac_cv_prog_CC"; then
1366  ac_ct_CC=$CC
1367  # Extract the first word of "cc", so it can be a program name with args.
1368set dummy cc; ac_word=$2
1369echo "$as_me:1369: checking for $ac_word" >&5
1370echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1371if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1372  echo $ECHO_N "(cached) $ECHO_C" >&6
1373else
1374  if test -n "$ac_ct_CC"; then
1375  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1376else
1377  ac_save_IFS=$IFS; IFS=$ac_path_separator
1378ac_dummy="$PATH"
1379for ac_dir in $ac_dummy; do
1380  IFS=$ac_save_IFS
1381  test -z "$ac_dir" && ac_dir=.
1382  $as_executable_p "$ac_dir/$ac_word" || continue
1383ac_cv_prog_ac_ct_CC="cc"
1384echo "$as_me:1384: found $ac_dir/$ac_word" >&5
1385break
1386done
1387
1388fi
1389fi
1390ac_ct_CC=$ac_cv_prog_ac_ct_CC
1391if test -n "$ac_ct_CC"; then
1392  echo "$as_me:1392: result: $ac_ct_CC" >&5
1393echo "${ECHO_T}$ac_ct_CC" >&6
1394else
1395  echo "$as_me:1395: result: no" >&5
1396echo "${ECHO_T}no" >&6
1397fi
1398
1399  CC=$ac_ct_CC
1400else
1401  CC="$ac_cv_prog_CC"
1402fi
1403
1404fi
1405if test -z "$CC"; then
1406  # Extract the first word of "cc", so it can be a program name with args.
1407set dummy cc; ac_word=$2
1408echo "$as_me:1408: checking for $ac_word" >&5
1409echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1410if test "${ac_cv_prog_CC+set}" = set; then
1411  echo $ECHO_N "(cached) $ECHO_C" >&6
1412else
1413  if test -n "$CC"; then
1414  ac_cv_prog_CC="$CC" # Let the user override the test.
1415else
1416  ac_prog_rejected=no
1417  ac_save_IFS=$IFS; IFS=$ac_path_separator
1418ac_dummy="$PATH"
1419for ac_dir in $ac_dummy; do
1420  IFS=$ac_save_IFS
1421  test -z "$ac_dir" && ac_dir=.
1422  $as_executable_p "$ac_dir/$ac_word" || continue
1423if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1424  ac_prog_rejected=yes
1425  continue
1426fi
1427ac_cv_prog_CC="cc"
1428echo "$as_me:1428: found $ac_dir/$ac_word" >&5
1429break
1430done
1431
1432if test "$ac_prog_rejected" = yes; then
1433  # We found a bogon in the path, so make sure we never use it.
1434  set dummy $ac_cv_prog_CC
1435  shift
1436  if test $# != 0; then
1437    # We chose a different compiler from the bogus one.
1438    # However, it has the same basename, so the bogon will be chosen
1439    # first if we set CC to just the basename; use the full file name.
1440    shift
1441    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1442    shift
1443    ac_cv_prog_CC="$@"
1444  fi
1445fi
1446fi
1447fi
1448CC=$ac_cv_prog_CC
1449if test -n "$CC"; then
1450  echo "$as_me:1450: result: $CC" >&5
1451echo "${ECHO_T}$CC" >&6
1452else
1453  echo "$as_me:1453: result: no" >&5
1454echo "${ECHO_T}no" >&6
1455fi
1456
1457fi
1458if test -z "$CC"; then
1459  if test -n "$ac_tool_prefix"; then
1460  for ac_prog in cl
1461  do
1462    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1463set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1464echo "$as_me:1464: checking for $ac_word" >&5
1465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1466if test "${ac_cv_prog_CC+set}" = set; then
1467  echo $ECHO_N "(cached) $ECHO_C" >&6
1468else
1469  if test -n "$CC"; then
1470  ac_cv_prog_CC="$CC" # Let the user override the test.
1471else
1472  ac_save_IFS=$IFS; IFS=$ac_path_separator
1473ac_dummy="$PATH"
1474for ac_dir in $ac_dummy; do
1475  IFS=$ac_save_IFS
1476  test -z "$ac_dir" && ac_dir=.
1477  $as_executable_p "$ac_dir/$ac_word" || continue
1478ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1479echo "$as_me:1479: found $ac_dir/$ac_word" >&5
1480break
1481done
1482
1483fi
1484fi
1485CC=$ac_cv_prog_CC
1486if test -n "$CC"; then
1487  echo "$as_me:1487: result: $CC" >&5
1488echo "${ECHO_T}$CC" >&6
1489else
1490  echo "$as_me:1490: result: no" >&5
1491echo "${ECHO_T}no" >&6
1492fi
1493
1494    test -n "$CC" && break
1495  done
1496fi
1497if test -z "$CC"; then
1498  ac_ct_CC=$CC
1499  for ac_prog in cl
1500do
1501  # Extract the first word of "$ac_prog", so it can be a program name with args.
1502set dummy $ac_prog; ac_word=$2
1503echo "$as_me:1503: checking for $ac_word" >&5
1504echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1505if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1506  echo $ECHO_N "(cached) $ECHO_C" >&6
1507else
1508  if test -n "$ac_ct_CC"; then
1509  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1510else
1511  ac_save_IFS=$IFS; IFS=$ac_path_separator
1512ac_dummy="$PATH"
1513for ac_dir in $ac_dummy; do
1514  IFS=$ac_save_IFS
1515  test -z "$ac_dir" && ac_dir=.
1516  $as_executable_p "$ac_dir/$ac_word" || continue
1517ac_cv_prog_ac_ct_CC="$ac_prog"
1518echo "$as_me:1518: found $ac_dir/$ac_word" >&5
1519break
1520done
1521
1522fi
1523fi
1524ac_ct_CC=$ac_cv_prog_ac_ct_CC
1525if test -n "$ac_ct_CC"; then
1526  echo "$as_me:1526: result: $ac_ct_CC" >&5
1527echo "${ECHO_T}$ac_ct_CC" >&6
1528else
1529  echo "$as_me:1529: result: no" >&5
1530echo "${ECHO_T}no" >&6
1531fi
1532
1533  test -n "$ac_ct_CC" && break
1534done
1535
1536  CC=$ac_ct_CC
1537fi
1538
1539fi
1540
1541test -z "$CC" && { { echo "$as_me:1541: error: no acceptable cc found in \$PATH" >&5
1542echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1543   { (exit 1); exit 1; }; }
1544
1545# Provide some information about the compiler.
1546echo "$as_me:1546:" \
1547     "checking for C compiler version" >&5
1548ac_compiler=`set X $ac_compile; echo "$2"`
1549{ (eval echo "$as_me:1549: \"$ac_compiler --version </dev/null >&5\"") >&5
1550  (eval $ac_compiler --version </dev/null >&5) 2>&5
1551  ac_status=$?
1552  echo "$as_me:1552: \$? = $ac_status" >&5
1553  (exit "$ac_status"); }
1554{ (eval echo "$as_me:1554: \"$ac_compiler -v </dev/null >&5\"") >&5
1555  (eval $ac_compiler -v </dev/null >&5) 2>&5
1556  ac_status=$?
1557  echo "$as_me:1557: \$? = $ac_status" >&5
1558  (exit "$ac_status"); }
1559{ (eval echo "$as_me:1559: \"$ac_compiler -V </dev/null >&5\"") >&5
1560  (eval $ac_compiler -V </dev/null >&5) 2>&5
1561  ac_status=$?
1562  echo "$as_me:1562: \$? = $ac_status" >&5
1563  (exit "$ac_status"); }
1564
1565cat >"conftest.$ac_ext" <<_ACEOF
1566#line 1566 "configure"
1567#include "confdefs.h"
1568
1569int
1570main (void)
1571{
1572
1573  ;
1574  return 0;
1575}
1576_ACEOF
1577ac_clean_files_save=$ac_clean_files
1578ac_clean_files="$ac_clean_files a.out a.exe"
1579# Try to create an executable without -o first, disregard a.out.
1580# It will help us diagnose broken compilers, and finding out an intuition
1581# of exeext.
1582echo "$as_me:1582: checking for C compiler default output" >&5
1583echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1584ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1585if { (eval echo "$as_me:1585: \"$ac_link_default\"") >&5
1586  (eval $ac_link_default) 2>&5
1587  ac_status=$?
1588  echo "$as_me:1588: \$? = $ac_status" >&5
1589  (exit "$ac_status"); }; then
1590  # Find the output, starting from the most likely.  This scheme is
1591# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1592# resort.
1593for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1594                ls a.out conftest 2>/dev/null;
1595                ls a.* conftest.* 2>/dev/null`; do
1596  case $ac_file in
1597    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1598    a.out ) # We found the default executable, but exeext='' is most
1599            # certainly right.
1600            break;;
1601    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1602          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1603          export ac_cv_exeext
1604          break;;
1605    * ) break;;
1606  esac
1607done
1608else
1609  echo "$as_me: failed program was:" >&5
1610cat "conftest.$ac_ext" >&5
1611{ { echo "$as_me:1611: error: C compiler cannot create executables" >&5
1612echo "$as_me: error: C compiler cannot create executables" >&2;}
1613   { (exit 77); exit 77; }; }
1614fi
1615
1616ac_exeext=$ac_cv_exeext
1617echo "$as_me:1617: result: $ac_file" >&5
1618echo "${ECHO_T}$ac_file" >&6
1619
1620# Check the compiler produces executables we can run.  If not, either
1621# the compiler is broken, or we cross compile.
1622echo "$as_me:1622: checking whether the C compiler works" >&5
1623echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1624# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1625# If not cross compiling, check that we can run a simple program.
1626if test "$cross_compiling" != yes; then
1627  if { ac_try='./$ac_file'
1628  { (eval echo "$as_me:1628: \"$ac_try\"") >&5
1629  (eval $ac_try) 2>&5
1630  ac_status=$?
1631  echo "$as_me:1631: \$? = $ac_status" >&5
1632  (exit "$ac_status"); }; }; then
1633    cross_compiling=no
1634  else
1635    if test "$cross_compiling" = maybe; then
1636	cross_compiling=yes
1637    else
1638	{ { echo "$as_me:1638: error: cannot run C compiled programs.
1639If you meant to cross compile, use \`--host'." >&5
1640echo "$as_me: error: cannot run C compiled programs.
1641If you meant to cross compile, use \`--host'." >&2;}
1642   { (exit 1); exit 1; }; }
1643    fi
1644  fi
1645fi
1646echo "$as_me:1646: result: yes" >&5
1647echo "${ECHO_T}yes" >&6
1648
1649rm -f a.out a.exe "conftest$ac_cv_exeext"
1650ac_clean_files=$ac_clean_files_save
1651# Check the compiler produces executables we can run.  If not, either
1652# the compiler is broken, or we cross compile.
1653echo "$as_me:1653: checking whether we are cross compiling" >&5
1654echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1655echo "$as_me:1655: result: $cross_compiling" >&5
1656echo "${ECHO_T}$cross_compiling" >&6
1657
1658echo "$as_me:1658: checking for executable suffix" >&5
1659echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1660if { (eval echo "$as_me:1660: \"$ac_link\"") >&5
1661  (eval $ac_link) 2>&5
1662  ac_status=$?
1663  echo "$as_me:1663: \$? = $ac_status" >&5
1664  (exit "$ac_status"); }; then
1665  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1666# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1667# work properly (i.e., refer to `conftest.exe'), while it won't with
1668# `rm'.
1669for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1670  case $ac_file in
1671    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1672    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1673          export ac_cv_exeext
1674          break;;
1675    * ) break;;
1676  esac
1677done
1678else
1679  { { echo "$as_me:1679: error: cannot compute EXEEXT: cannot compile and link" >&5
1680echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1681   { (exit 1); exit 1; }; }
1682fi
1683
1684rm -f "conftest$ac_cv_exeext"
1685echo "$as_me:1685: result: $ac_cv_exeext" >&5
1686echo "${ECHO_T}$ac_cv_exeext" >&6
1687
1688rm -f "conftest.$ac_ext"
1689EXEEXT=$ac_cv_exeext
1690ac_exeext=$EXEEXT
1691echo "$as_me:1691: checking for object suffix" >&5
1692echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1693if test "${ac_cv_objext+set}" = set; then
1694  echo $ECHO_N "(cached) $ECHO_C" >&6
1695else
1696  cat >"conftest.$ac_ext" <<_ACEOF
1697#line 1697 "configure"
1698#include "confdefs.h"
1699
1700int
1701main (void)
1702{
1703
1704  ;
1705  return 0;
1706}
1707_ACEOF
1708rm -f conftest.o conftest.obj
1709if { (eval echo "$as_me:1709: \"$ac_compile\"") >&5
1710  (eval $ac_compile) 2>&5
1711  ac_status=$?
1712  echo "$as_me:1712: \$? = $ac_status" >&5
1713  (exit "$ac_status"); }; then
1714  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1715  case $ac_file in
1716    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1717    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1718       break;;
1719  esac
1720done
1721else
1722  echo "$as_me: failed program was:" >&5
1723cat "conftest.$ac_ext" >&5
1724{ { echo "$as_me:1724: error: cannot compute OBJEXT: cannot compile" >&5
1725echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1726   { (exit 1); exit 1; }; }
1727fi
1728
1729rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1730fi
1731echo "$as_me:1731: result: $ac_cv_objext" >&5
1732echo "${ECHO_T}$ac_cv_objext" >&6
1733OBJEXT=$ac_cv_objext
1734ac_objext=$OBJEXT
1735echo "$as_me:1735: checking whether we are using the GNU C compiler" >&5
1736echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1737if test "${ac_cv_c_compiler_gnu+set}" = set; then
1738  echo $ECHO_N "(cached) $ECHO_C" >&6
1739else
1740  cat >"conftest.$ac_ext" <<_ACEOF
1741#line 1741 "configure"
1742#include "confdefs.h"
1743
1744int
1745main (void)
1746{
1747#ifndef __GNUC__
1748       choke me
1749#endif
1750
1751  ;
1752  return 0;
1753}
1754_ACEOF
1755rm -f "conftest.$ac_objext"
1756if { (eval echo "$as_me:1756: \"$ac_compile\"") >&5
1757  (eval $ac_compile) 2>&5
1758  ac_status=$?
1759  echo "$as_me:1759: \$? = $ac_status" >&5
1760  (exit "$ac_status"); } &&
1761         { ac_try='test -s "conftest.$ac_objext"'
1762  { (eval echo "$as_me:1762: \"$ac_try\"") >&5
1763  (eval $ac_try) 2>&5
1764  ac_status=$?
1765  echo "$as_me:1765: \$? = $ac_status" >&5
1766  (exit "$ac_status"); }; }; then
1767  ac_compiler_gnu=yes
1768else
1769  echo "$as_me: failed program was:" >&5
1770cat "conftest.$ac_ext" >&5
1771ac_compiler_gnu=no
1772fi
1773rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1774ac_cv_c_compiler_gnu=$ac_compiler_gnu
1775
1776fi
1777echo "$as_me:1777: result: $ac_cv_c_compiler_gnu" >&5
1778echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1779GCC=`test $ac_compiler_gnu = yes && echo yes`
1780ac_test_CFLAGS=${CFLAGS+set}
1781ac_save_CFLAGS=$CFLAGS
1782CFLAGS="-g"
1783echo "$as_me:1783: checking whether $CC accepts -g" >&5
1784echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1785if test "${ac_cv_prog_cc_g+set}" = set; then
1786  echo $ECHO_N "(cached) $ECHO_C" >&6
1787else
1788  cat >"conftest.$ac_ext" <<_ACEOF
1789#line 1789 "configure"
1790#include "confdefs.h"
1791
1792int
1793main (void)
1794{
1795
1796  ;
1797  return 0;
1798}
1799_ACEOF
1800rm -f "conftest.$ac_objext"
1801if { (eval echo "$as_me:1801: \"$ac_compile\"") >&5
1802  (eval $ac_compile) 2>&5
1803  ac_status=$?
1804  echo "$as_me:1804: \$? = $ac_status" >&5
1805  (exit "$ac_status"); } &&
1806         { ac_try='test -s "conftest.$ac_objext"'
1807  { (eval echo "$as_me:1807: \"$ac_try\"") >&5
1808  (eval $ac_try) 2>&5
1809  ac_status=$?
1810  echo "$as_me:1810: \$? = $ac_status" >&5
1811  (exit "$ac_status"); }; }; then
1812  ac_cv_prog_cc_g=yes
1813else
1814  echo "$as_me: failed program was:" >&5
1815cat "conftest.$ac_ext" >&5
1816ac_cv_prog_cc_g=no
1817fi
1818rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1819fi
1820echo "$as_me:1820: result: $ac_cv_prog_cc_g" >&5
1821echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1822if test "$ac_test_CFLAGS" = set; then
1823  CFLAGS=$ac_save_CFLAGS
1824elif test $ac_cv_prog_cc_g = yes; then
1825  if test "$GCC" = yes; then
1826    CFLAGS="-g -O2"
1827  else
1828    CFLAGS="-g"
1829  fi
1830else
1831  if test "$GCC" = yes; then
1832    CFLAGS="-O2"
1833  else
1834    CFLAGS=
1835  fi
1836fi
1837# Some people use a C++ compiler to compile C.  Since we use `exit',
1838# in C++ we need to declare it.  In case someone uses the same compiler
1839# for both compiling C and C++ we need to have the C++ compiler decide
1840# the declaration of exit, since it's the most demanding environment.
1841cat >"conftest.$ac_ext" <<_ACEOF
1842#ifndef __cplusplus
1843  choke me
1844#endif
1845_ACEOF
1846rm -f "conftest.$ac_objext"
1847if { (eval echo "$as_me:1847: \"$ac_compile\"") >&5
1848  (eval $ac_compile) 2>&5
1849  ac_status=$?
1850  echo "$as_me:1850: \$? = $ac_status" >&5
1851  (exit "$ac_status"); } &&
1852         { ac_try='test -s "conftest.$ac_objext"'
1853  { (eval echo "$as_me:1853: \"$ac_try\"") >&5
1854  (eval $ac_try) 2>&5
1855  ac_status=$?
1856  echo "$as_me:1856: \$? = $ac_status" >&5
1857  (exit "$ac_status"); }; }; then
1858  for ac_declaration in \
1859   ''\
1860   '#include <stdlib.h>' \
1861   'extern "C" void std::exit (int) throw (); using std::exit;' \
1862   'extern "C" void std::exit (int); using std::exit;' \
1863   'extern "C" void exit (int) throw ();' \
1864   'extern "C" void exit (int);' \
1865   'void exit (int);'
1866do
1867  cat >"conftest.$ac_ext" <<_ACEOF
1868#line 1868 "configure"
1869#include "confdefs.h"
1870#include <stdlib.h>
1871$ac_declaration
1872int
1873main (void)
1874{
1875exit (42);
1876  ;
1877  return 0;
1878}
1879_ACEOF
1880rm -f "conftest.$ac_objext"
1881if { (eval echo "$as_me:1881: \"$ac_compile\"") >&5
1882  (eval $ac_compile) 2>&5
1883  ac_status=$?
1884  echo "$as_me:1884: \$? = $ac_status" >&5
1885  (exit "$ac_status"); } &&
1886         { ac_try='test -s "conftest.$ac_objext"'
1887  { (eval echo "$as_me:1887: \"$ac_try\"") >&5
1888  (eval $ac_try) 2>&5
1889  ac_status=$?
1890  echo "$as_me:1890: \$? = $ac_status" >&5
1891  (exit "$ac_status"); }; }; then
1892  :
1893else
1894  echo "$as_me: failed program was:" >&5
1895cat "conftest.$ac_ext" >&5
1896continue
1897fi
1898rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1899  cat >"conftest.$ac_ext" <<_ACEOF
1900#line 1900 "configure"
1901#include "confdefs.h"
1902$ac_declaration
1903int
1904main (void)
1905{
1906exit (42);
1907  ;
1908  return 0;
1909}
1910_ACEOF
1911rm -f "conftest.$ac_objext"
1912if { (eval echo "$as_me:1912: \"$ac_compile\"") >&5
1913  (eval $ac_compile) 2>&5
1914  ac_status=$?
1915  echo "$as_me:1915: \$? = $ac_status" >&5
1916  (exit "$ac_status"); } &&
1917         { ac_try='test -s "conftest.$ac_objext"'
1918  { (eval echo "$as_me:1918: \"$ac_try\"") >&5
1919  (eval $ac_try) 2>&5
1920  ac_status=$?
1921  echo "$as_me:1921: \$? = $ac_status" >&5
1922  (exit "$ac_status"); }; }; then
1923  break
1924else
1925  echo "$as_me: failed program was:" >&5
1926cat "conftest.$ac_ext" >&5
1927fi
1928rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1929done
1930rm -rf conftest*
1931if test -n "$ac_declaration"; then
1932  echo '#ifdef __cplusplus' >>confdefs.h
1933  echo "$ac_declaration"    >>confdefs.h
1934  echo '#endif'             >>confdefs.h
1935fi
1936
1937else
1938  echo "$as_me: failed program was:" >&5
1939cat "conftest.$ac_ext" >&5
1940fi
1941rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1942ac_ext=c
1943ac_cpp='$CPP $CPPFLAGS'
1944ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1945ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1946ac_compiler_gnu=$ac_cv_c_compiler_gnu
1947ac_main_return="return"
1948
1949GCC_VERSION=none
1950if test "$GCC" = yes ; then
1951	echo "$as_me:1951: checking version of $CC" >&5
1952echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1953	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.].*//'`"
1954	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1955	echo "$as_me:1955: result: $GCC_VERSION" >&5
1956echo "${ECHO_T}$GCC_VERSION" >&6
1957fi
1958
1959INTEL_COMPILER=no
1960
1961if test "$GCC" = yes ; then
1962	case "$host_os" in
1963	(linux*|gnu*)
1964		echo "$as_me:1964: checking if this is really Intel C compiler" >&5
1965echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1966		cf_save_CFLAGS="$CFLAGS"
1967		CFLAGS="$CFLAGS -no-gcc"
1968		cat >"conftest.$ac_ext" <<_ACEOF
1969#line 1969 "configure"
1970#include "confdefs.h"
1971
1972int
1973main (void)
1974{
1975
1976#ifdef __INTEL_COMPILER
1977#else
1978make an error
1979#endif
1980
1981  ;
1982  return 0;
1983}
1984_ACEOF
1985rm -f "conftest.$ac_objext"
1986if { (eval echo "$as_me:1986: \"$ac_compile\"") >&5
1987  (eval $ac_compile) 2>&5
1988  ac_status=$?
1989  echo "$as_me:1989: \$? = $ac_status" >&5
1990  (exit "$ac_status"); } &&
1991         { ac_try='test -s "conftest.$ac_objext"'
1992  { (eval echo "$as_me:1992: \"$ac_try\"") >&5
1993  (eval $ac_try) 2>&5
1994  ac_status=$?
1995  echo "$as_me:1995: \$? = $ac_status" >&5
1996  (exit "$ac_status"); }; }; then
1997  INTEL_COMPILER=yes
1998cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1999
2000else
2001  echo "$as_me: failed program was:" >&5
2002cat "conftest.$ac_ext" >&5
2003fi
2004rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2005		CFLAGS="$cf_save_CFLAGS"
2006		echo "$as_me:2006: result: $INTEL_COMPILER" >&5
2007echo "${ECHO_T}$INTEL_COMPILER" >&6
2008		;;
2009	esac
2010fi
2011
2012CLANG_COMPILER=no
2013
2014if test "$GCC" = yes ; then
2015	echo "$as_me:2015: checking if this is really Clang C compiler" >&5
2016echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2017	cf_save_CFLAGS="$CFLAGS"
2018	cat >"conftest.$ac_ext" <<_ACEOF
2019#line 2019 "configure"
2020#include "confdefs.h"
2021
2022int
2023main (void)
2024{
2025
2026#ifdef __clang__
2027#else
2028make an error
2029#endif
2030
2031  ;
2032  return 0;
2033}
2034_ACEOF
2035rm -f "conftest.$ac_objext"
2036if { (eval echo "$as_me:2036: \"$ac_compile\"") >&5
2037  (eval $ac_compile) 2>&5
2038  ac_status=$?
2039  echo "$as_me:2039: \$? = $ac_status" >&5
2040  (exit "$ac_status"); } &&
2041         { ac_try='test -s "conftest.$ac_objext"'
2042  { (eval echo "$as_me:2042: \"$ac_try\"") >&5
2043  (eval $ac_try) 2>&5
2044  ac_status=$?
2045  echo "$as_me:2045: \$? = $ac_status" >&5
2046  (exit "$ac_status"); }; }; then
2047  CLANG_COMPILER=yes
2048
2049else
2050  echo "$as_me: failed program was:" >&5
2051cat "conftest.$ac_ext" >&5
2052fi
2053rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2054	CFLAGS="$cf_save_CFLAGS"
2055	echo "$as_me:2055: result: $CLANG_COMPILER" >&5
2056echo "${ECHO_T}$CLANG_COMPILER" >&6
2057fi
2058
2059CLANG_VERSION=none
2060
2061if test "x$CLANG_COMPILER" = "xyes" ; then
2062	case "$CC" in
2063	(c[1-9][0-9]|*/c[1-9][0-9])
2064		{ echo "$as_me:2064: WARNING: replacing broken compiler alias $CC" >&5
2065echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2066		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2067		CC=clang
2068		;;
2069	esac
2070
2071	echo "$as_me:2071: checking version of $CC" >&5
2072echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2073	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.].*//'`"
2074	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2075	echo "$as_me:2075: result: $CLANG_VERSION" >&5
2076echo "${ECHO_T}$CLANG_VERSION" >&6
2077
2078	for cf_clang_opt in \
2079		-Qunused-arguments \
2080		-Wno-error=implicit-function-declaration
2081	do
2082		echo "$as_me:2082: checking if option $cf_clang_opt works" >&5
2083echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2084		cf_save_CFLAGS="$CFLAGS"
2085		CFLAGS="$CFLAGS $cf_clang_opt"
2086		cat >"conftest.$ac_ext" <<_ACEOF
2087#line 2087 "configure"
2088#include "confdefs.h"
2089
2090			#include <stdio.h>
2091int
2092main (void)
2093{
2094
2095			printf("hello!\\n");
2096  ;
2097  return 0;
2098}
2099_ACEOF
2100rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2101if { (eval echo "$as_me:2101: \"$ac_link\"") >&5
2102  (eval $ac_link) 2>&5
2103  ac_status=$?
2104  echo "$as_me:2104: \$? = $ac_status" >&5
2105  (exit "$ac_status"); } &&
2106         { ac_try='test -s "conftest$ac_exeext"'
2107  { (eval echo "$as_me:2107: \"$ac_try\"") >&5
2108  (eval $ac_try) 2>&5
2109  ac_status=$?
2110  echo "$as_me:2110: \$? = $ac_status" >&5
2111  (exit "$ac_status"); }; }; then
2112
2113			cf_clang_optok=yes
2114else
2115  echo "$as_me: failed program was:" >&5
2116cat "conftest.$ac_ext" >&5
2117
2118			cf_clang_optok=no
2119fi
2120rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2121		echo "$as_me:2121: result: $cf_clang_optok" >&5
2122echo "${ECHO_T}$cf_clang_optok" >&6
2123		CFLAGS="$cf_save_CFLAGS"
2124		if test "$cf_clang_optok" = yes; then
2125			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2126
2127echo "${as_me:-configure}:2127: testing adding option $cf_clang_opt ..." 1>&5
2128
2129	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2130	CFLAGS="${CFLAGS}$cf_clang_opt"
2131
2132		fi
2133	done
2134fi
2135
2136echo "$as_me:2136: checking for $CC option to accept ANSI C" >&5
2137echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2138if test "${ac_cv_prog_cc_stdc+set}" = set; then
2139  echo $ECHO_N "(cached) $ECHO_C" >&6
2140else
2141  ac_cv_prog_cc_stdc=no
2142ac_save_CC=$CC
2143cat >"conftest.$ac_ext" <<_ACEOF
2144#line 2144 "configure"
2145#include "confdefs.h"
2146#include <stdarg.h>
2147#include <stdio.h>
2148#include <sys/types.h>
2149#include <sys/stat.h>
2150/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2151struct buf { int x; };
2152FILE * (*rcsopen) (struct buf *, struct stat *, int);
2153static char *e (p, i)
2154     char **p;
2155     int i;
2156{
2157  return p[i];
2158}
2159static char *f (char * (*g) (char **, int), char **p, ...)
2160{
2161  char *s;
2162  va_list v;
2163  va_start (v,p);
2164  s = g (p, va_arg (v,int));
2165  va_end (v);
2166  return s;
2167}
2168int test (int i, double x);
2169struct s1 {int (*f) (int a);};
2170struct s2 {int (*f) (double a);};
2171int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2172int argc;
2173char **argv;
2174int
2175main (void)
2176{
2177return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2178  ;
2179  return 0;
2180}
2181_ACEOF
2182# Don't try gcc -ansi; that turns off useful extensions and
2183# breaks some systems' header files.
2184# AIX			-qlanglvl=ansi
2185# Ultrix and OSF/1	-std1
2186# HP-UX 10.20 and later	-Ae
2187# HP-UX older versions	-Aa -D_HPUX_SOURCE
2188# SVR4			-Xc -D__EXTENSIONS__
2189for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2190do
2191  CC="$ac_save_CC $ac_arg"
2192  rm -f "conftest.$ac_objext"
2193if { (eval echo "$as_me:2193: \"$ac_compile\"") >&5
2194  (eval $ac_compile) 2>&5
2195  ac_status=$?
2196  echo "$as_me:2196: \$? = $ac_status" >&5
2197  (exit "$ac_status"); } &&
2198         { ac_try='test -s "conftest.$ac_objext"'
2199  { (eval echo "$as_me:2199: \"$ac_try\"") >&5
2200  (eval $ac_try) 2>&5
2201  ac_status=$?
2202  echo "$as_me:2202: \$? = $ac_status" >&5
2203  (exit "$ac_status"); }; }; then
2204  ac_cv_prog_cc_stdc=$ac_arg
2205break
2206else
2207  echo "$as_me: failed program was:" >&5
2208cat "conftest.$ac_ext" >&5
2209fi
2210rm -f "conftest.$ac_objext"
2211done
2212rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2213CC=$ac_save_CC
2214
2215fi
2216
2217case "x$ac_cv_prog_cc_stdc" in
2218  x|xno)
2219    echo "$as_me:2219: result: none needed" >&5
2220echo "${ECHO_T}none needed" >&6 ;;
2221  *)
2222    echo "$as_me:2222: result: $ac_cv_prog_cc_stdc" >&5
2223echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2224    CC="$CC $ac_cv_prog_cc_stdc" ;;
2225esac
2226
2227# This should have been defined by AC_PROG_CC
2228: "${CC:=cc}"
2229
2230echo "$as_me:2230: checking \$CFLAGS variable" >&5
2231echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2232case "x$CFLAGS" in
2233(*-[IUD]*)
2234	echo "$as_me:2234: result: broken" >&5
2235echo "${ECHO_T}broken" >&6
2236	{ echo "$as_me:2236: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2237echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2238	cf_flags="$CFLAGS"
2239	CFLAGS=
2240	for cf_arg in $cf_flags
2241	do
2242
2243cf_fix_cppflags=no
2244cf_new_cflags=
2245cf_new_cppflags=
2246cf_new_extra_cppflags=
2247
2248for cf_add_cflags in $cf_arg
2249do
2250case "$cf_fix_cppflags" in
2251(no)
2252	case "$cf_add_cflags" in
2253	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2254		case "$cf_add_cflags" in
2255		(-D*)
2256			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2257
2258			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2259				&& test -z "${cf_tst_cflags}" \
2260				&& cf_fix_cppflags=yes
2261
2262			if test "$cf_fix_cppflags" = yes ; then
2263
2264	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2265	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2266
2267				continue
2268			elif test "${cf_tst_cflags}" = "\"'" ; then
2269
2270	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2271	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2272
2273				continue
2274			fi
2275			;;
2276		esac
2277		case "$CPPFLAGS" in
2278		(*$cf_add_cflags)
2279			;;
2280		(*)
2281			case "$cf_add_cflags" in
2282			(-D*)
2283				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2284
2285CPPFLAGS=`echo "$CPPFLAGS" | \
2286	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2287		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2288
2289				;;
2290			esac
2291
2292	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2293	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2294
2295			;;
2296		esac
2297		;;
2298	(*)
2299
2300	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2301	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2302
2303		;;
2304	esac
2305	;;
2306(yes)
2307
2308	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2309	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2310
2311	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2312
2313	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2314		&& test -z "${cf_tst_cflags}" \
2315		&& cf_fix_cppflags=no
2316	;;
2317esac
2318done
2319
2320if test -n "$cf_new_cflags" ; then
2321
2322	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2323	CFLAGS="${CFLAGS}$cf_new_cflags"
2324
2325fi
2326
2327if test -n "$cf_new_cppflags" ; then
2328
2329	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2330	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2331
2332fi
2333
2334if test -n "$cf_new_extra_cppflags" ; then
2335
2336	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2337	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2338
2339fi
2340
2341	done
2342	;;
2343(*)
2344	echo "$as_me:2344: result: ok" >&5
2345echo "${ECHO_T}ok" >&6
2346	;;
2347esac
2348
2349echo "$as_me:2349: checking \$CC variable" >&5
2350echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2351case "$CC" in
2352(*[\ \	]-*)
2353	echo "$as_me:2353: result: broken" >&5
2354echo "${ECHO_T}broken" >&6
2355	{ echo "$as_me:2355: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2356echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2357	# humor him...
2358	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2359	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2360	CC="$cf_prog"
2361	for cf_arg in $cf_flags
2362	do
2363		case "x$cf_arg" in
2364		(x-[IUDfgOW]*)
2365
2366cf_fix_cppflags=no
2367cf_new_cflags=
2368cf_new_cppflags=
2369cf_new_extra_cppflags=
2370
2371for cf_add_cflags in $cf_arg
2372do
2373case "$cf_fix_cppflags" in
2374(no)
2375	case "$cf_add_cflags" in
2376	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2377		case "$cf_add_cflags" in
2378		(-D*)
2379			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2380
2381			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2382				&& test -z "${cf_tst_cflags}" \
2383				&& cf_fix_cppflags=yes
2384
2385			if test "$cf_fix_cppflags" = yes ; then
2386
2387	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2388	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2389
2390				continue
2391			elif test "${cf_tst_cflags}" = "\"'" ; then
2392
2393	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2394	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2395
2396				continue
2397			fi
2398			;;
2399		esac
2400		case "$CPPFLAGS" in
2401		(*$cf_add_cflags)
2402			;;
2403		(*)
2404			case "$cf_add_cflags" in
2405			(-D*)
2406				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2407
2408CPPFLAGS=`echo "$CPPFLAGS" | \
2409	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2410		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2411
2412				;;
2413			esac
2414
2415	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2416	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2417
2418			;;
2419		esac
2420		;;
2421	(*)
2422
2423	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2424	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2425
2426		;;
2427	esac
2428	;;
2429(yes)
2430
2431	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2432	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2433
2434	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2435
2436	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2437		&& test -z "${cf_tst_cflags}" \
2438		&& cf_fix_cppflags=no
2439	;;
2440esac
2441done
2442
2443if test -n "$cf_new_cflags" ; then
2444
2445	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2446	CFLAGS="${CFLAGS}$cf_new_cflags"
2447
2448fi
2449
2450if test -n "$cf_new_cppflags" ; then
2451
2452	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2453	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2454
2455fi
2456
2457if test -n "$cf_new_extra_cppflags" ; then
2458
2459	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2460	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2461
2462fi
2463
2464			;;
2465		(*)
2466			CC="$CC $cf_arg"
2467			;;
2468		esac
2469	done
2470	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2471
2472echo "${as_me:-configure}:2472: testing resulting CC: '$CC' ..." 1>&5
2473
2474	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2475
2476echo "${as_me:-configure}:2476: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2477
2478	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2479
2480echo "${as_me:-configure}:2480: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2481
2482	;;
2483(*)
2484	echo "$as_me:2484: result: ok" >&5
2485echo "${ECHO_T}ok" >&6
2486	;;
2487esac
2488
2489for ac_prog in ggrep grep
2490do
2491  # Extract the first word of "$ac_prog", so it can be a program name with args.
2492set dummy $ac_prog; ac_word=$2
2493echo "$as_me:2493: checking for $ac_word" >&5
2494echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2495if test "${ac_cv_prog_GREP+set}" = set; then
2496  echo $ECHO_N "(cached) $ECHO_C" >&6
2497else
2498  if test -n "$GREP"; then
2499  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2500else
2501  ac_save_IFS=$IFS; IFS=$ac_path_separator
2502ac_dummy="$PATH"
2503for ac_dir in $ac_dummy; do
2504  IFS=$ac_save_IFS
2505  test -z "$ac_dir" && ac_dir=.
2506  $as_executable_p "$ac_dir/$ac_word" || continue
2507ac_cv_prog_GREP="$ac_prog"
2508echo "$as_me:2508: found $ac_dir/$ac_word" >&5
2509break
2510done
2511
2512fi
2513fi
2514GREP=$ac_cv_prog_GREP
2515if test -n "$GREP"; then
2516  echo "$as_me:2516: result: $GREP" >&5
2517echo "${ECHO_T}$GREP" >&6
2518else
2519  echo "$as_me:2519: result: no" >&5
2520echo "${ECHO_T}no" >&6
2521fi
2522
2523  test -n "$GREP" && break
2524done
2525test -n "$GREP" || GREP=": "
2526
2527echo "$as_me:2527: checking for egrep" >&5
2528echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2529if test "${ac_cv_path_EGREP+set}" = set; then
2530  echo $ECHO_N "(cached) $ECHO_C" >&6
2531else
2532  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2533   then ac_cv_path_EGREP="$GREP -E"
2534   else
2535     for ac_prog in gegrep egrep
2536do
2537  # Extract the first word of "$ac_prog", so it can be a program name with args.
2538set dummy $ac_prog; ac_word=$2
2539echo "$as_me:2539: checking for $ac_word" >&5
2540echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2541if test "${ac_cv_path_EGREP+set}" = set; then
2542  echo $ECHO_N "(cached) $ECHO_C" >&6
2543else
2544  case $EGREP in
2545  [\\/]* | ?:[\\/]*)
2546  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2547  ;;
2548  *)
2549  ac_save_IFS=$IFS; IFS=$ac_path_separator
2550ac_dummy="$PATH"
2551for ac_dir in $ac_dummy; do
2552  IFS=$ac_save_IFS
2553  test -z "$ac_dir" && ac_dir=.
2554  if $as_executable_p "$ac_dir/$ac_word"; then
2555   ac_cv_path_EGREP="$ac_dir/$ac_word"
2556   echo "$as_me:2556: found $ac_dir/$ac_word" >&5
2557   break
2558fi
2559done
2560
2561  ;;
2562esac
2563fi
2564EGREP=$ac_cv_path_EGREP
2565
2566if test -n "$EGREP"; then
2567  echo "$as_me:2567: result: $EGREP" >&5
2568echo "${ECHO_T}$EGREP" >&6
2569else
2570  echo "$as_me:2570: result: no" >&5
2571echo "${ECHO_T}no" >&6
2572fi
2573
2574  test -n "$EGREP" && break
2575done
2576test -n "$EGREP" || EGREP=": "
2577
2578     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2578: error: cannot find workable egrep" >&5
2579echo "$as_me: error: cannot find workable egrep" >&2;}
2580   { (exit 1); exit 1; }; }
2581   fi
2582fi
2583echo "$as_me:2583: result: $ac_cv_path_EGREP" >&5
2584echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2585 EGREP="$ac_cv_path_EGREP"
2586
2587ac_ext=c
2588ac_cpp='$CPP $CPPFLAGS'
2589ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2590ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2591ac_compiler_gnu=$ac_cv_c_compiler_gnu
2592ac_main_return="return"
2593echo "$as_me:2593: checking how to run the C preprocessor" >&5
2594echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2595# On Suns, sometimes $CPP names a directory.
2596if test -n "$CPP" && test -d "$CPP"; then
2597  CPP=
2598fi
2599if test -z "$CPP"; then
2600  if test "${ac_cv_prog_CPP+set}" = set; then
2601  echo $ECHO_N "(cached) $ECHO_C" >&6
2602else
2603      # Double quotes because CPP needs to be expanded
2604    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2605    do
2606      ac_preproc_ok=false
2607for ac_c_preproc_warn_flag in '' yes
2608do
2609  # Use a header file that comes with gcc, so configuring glibc
2610  # with a fresh cross-compiler works.
2611  # On the NeXT, cc -E runs the code through the compiler's parser,
2612  # not just through cpp. "Syntax error" is here to catch this case.
2613  cat >"conftest.$ac_ext" <<_ACEOF
2614#line 2614 "configure"
2615#include "confdefs.h"
2616#include <assert.h>
2617                     Syntax error
2618_ACEOF
2619if { (eval echo "$as_me:2619: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2620  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2621  ac_status=$?
2622  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2623  rm -f conftest.er1
2624  cat conftest.err >&5
2625  echo "$as_me:2625: \$? = $ac_status" >&5
2626  (exit "$ac_status"); } >/dev/null; then
2627  if test -s conftest.err; then
2628    ac_cpp_err=$ac_c_preproc_warn_flag
2629  else
2630    ac_cpp_err=
2631  fi
2632else
2633  ac_cpp_err=yes
2634fi
2635if test -z "$ac_cpp_err"; then
2636  :
2637else
2638  echo "$as_me: failed program was:" >&5
2639  cat "conftest.$ac_ext" >&5
2640  # Broken: fails on valid input.
2641continue
2642fi
2643rm -f conftest.err "conftest.$ac_ext"
2644
2645  # OK, works on sane cases.  Now check whether non-existent headers
2646  # can be detected and how.
2647  cat >"conftest.$ac_ext" <<_ACEOF
2648#line 2648 "configure"
2649#include "confdefs.h"
2650#include <ac_nonexistent.h>
2651_ACEOF
2652if { (eval echo "$as_me:2652: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2653  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2654  ac_status=$?
2655  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2656  rm -f conftest.er1
2657  cat conftest.err >&5
2658  echo "$as_me:2658: \$? = $ac_status" >&5
2659  (exit "$ac_status"); } >/dev/null; then
2660  if test -s conftest.err; then
2661    ac_cpp_err=$ac_c_preproc_warn_flag
2662  else
2663    ac_cpp_err=
2664  fi
2665else
2666  ac_cpp_err=yes
2667fi
2668if test -z "$ac_cpp_err"; then
2669  # Broken: success on invalid input.
2670continue
2671else
2672  echo "$as_me: failed program was:" >&5
2673  cat "conftest.$ac_ext" >&5
2674  # Passes both tests.
2675ac_preproc_ok=:
2676break
2677fi
2678rm -f conftest.err "conftest.$ac_ext"
2679
2680done
2681# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2682rm -f conftest.err "conftest.$ac_ext"
2683if $ac_preproc_ok; then
2684  break
2685fi
2686
2687    done
2688    ac_cv_prog_CPP=$CPP
2689
2690fi
2691  CPP=$ac_cv_prog_CPP
2692else
2693  ac_cv_prog_CPP=$CPP
2694fi
2695echo "$as_me:2695: result: $CPP" >&5
2696echo "${ECHO_T}$CPP" >&6
2697ac_preproc_ok=false
2698for ac_c_preproc_warn_flag in '' yes
2699do
2700  # Use a header file that comes with gcc, so configuring glibc
2701  # with a fresh cross-compiler works.
2702  # On the NeXT, cc -E runs the code through the compiler's parser,
2703  # not just through cpp. "Syntax error" is here to catch this case.
2704  cat >"conftest.$ac_ext" <<_ACEOF
2705#line 2705 "configure"
2706#include "confdefs.h"
2707#include <assert.h>
2708                     Syntax error
2709_ACEOF
2710if { (eval echo "$as_me:2710: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2711  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2712  ac_status=$?
2713  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2714  rm -f conftest.er1
2715  cat conftest.err >&5
2716  echo "$as_me:2716: \$? = $ac_status" >&5
2717  (exit "$ac_status"); } >/dev/null; then
2718  if test -s conftest.err; then
2719    ac_cpp_err=$ac_c_preproc_warn_flag
2720  else
2721    ac_cpp_err=
2722  fi
2723else
2724  ac_cpp_err=yes
2725fi
2726if test -z "$ac_cpp_err"; then
2727  :
2728else
2729  echo "$as_me: failed program was:" >&5
2730  cat "conftest.$ac_ext" >&5
2731  # Broken: fails on valid input.
2732continue
2733fi
2734rm -f conftest.err "conftest.$ac_ext"
2735
2736  # OK, works on sane cases.  Now check whether non-existent headers
2737  # can be detected and how.
2738  cat >"conftest.$ac_ext" <<_ACEOF
2739#line 2739 "configure"
2740#include "confdefs.h"
2741#include <ac_nonexistent.h>
2742_ACEOF
2743if { (eval echo "$as_me:2743: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2744  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2745  ac_status=$?
2746  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2747  rm -f conftest.er1
2748  cat conftest.err >&5
2749  echo "$as_me:2749: \$? = $ac_status" >&5
2750  (exit "$ac_status"); } >/dev/null; then
2751  if test -s conftest.err; then
2752    ac_cpp_err=$ac_c_preproc_warn_flag
2753  else
2754    ac_cpp_err=
2755  fi
2756else
2757  ac_cpp_err=yes
2758fi
2759if test -z "$ac_cpp_err"; then
2760  # Broken: success on invalid input.
2761continue
2762else
2763  echo "$as_me: failed program was:" >&5
2764  cat "conftest.$ac_ext" >&5
2765  # Passes both tests.
2766ac_preproc_ok=:
2767break
2768fi
2769rm -f conftest.err "conftest.$ac_ext"
2770
2771done
2772# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2773rm -f conftest.err "conftest.$ac_ext"
2774if $ac_preproc_ok; then
2775  :
2776else
2777  { { echo "$as_me:2777: error: C preprocessor \"$CPP\" fails sanity check" >&5
2778echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2779   { (exit 1); exit 1; }; }
2780fi
2781
2782ac_ext=c
2783ac_cpp='$CPP $CPPFLAGS'
2784ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2785ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2786ac_compiler_gnu=$ac_cv_c_compiler_gnu
2787ac_main_return="return"
2788
2789for ac_prog in mawk gawk nawk awk
2790do
2791  # Extract the first word of "$ac_prog", so it can be a program name with args.
2792set dummy $ac_prog; ac_word=$2
2793echo "$as_me:2793: checking for $ac_word" >&5
2794echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2795if test "${ac_cv_prog_AWK+set}" = set; then
2796  echo $ECHO_N "(cached) $ECHO_C" >&6
2797else
2798  if test -n "$AWK"; then
2799  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2800else
2801  ac_save_IFS=$IFS; IFS=$ac_path_separator
2802ac_dummy="$PATH"
2803for ac_dir in $ac_dummy; do
2804  IFS=$ac_save_IFS
2805  test -z "$ac_dir" && ac_dir=.
2806  $as_executable_p "$ac_dir/$ac_word" || continue
2807ac_cv_prog_AWK="$ac_prog"
2808echo "$as_me:2808: found $ac_dir/$ac_word" >&5
2809break
2810done
2811
2812fi
2813fi
2814AWK=$ac_cv_prog_AWK
2815if test -n "$AWK"; then
2816  echo "$as_me:2816: result: $AWK" >&5
2817echo "${ECHO_T}$AWK" >&6
2818else
2819  echo "$as_me:2819: result: no" >&5
2820echo "${ECHO_T}no" >&6
2821fi
2822
2823  test -n "$AWK" && break
2824done
2825
2826# Find a good install program.  We prefer a C program (faster),
2827# so one script is as good as another.  But avoid the broken or
2828# incompatible versions:
2829# SysV /etc/install, /usr/sbin/install
2830# SunOS /usr/etc/install
2831# IRIX /sbin/install
2832# AIX /bin/install
2833# AmigaOS /C/install, which installs bootblocks on floppy discs
2834# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2835# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2836# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2837# ./install, which can be erroneously created by make from ./install.sh.
2838echo "$as_me:2838: checking for a BSD compatible install" >&5
2839echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2840if test -z "$INSTALL"; then
2841if test "${ac_cv_path_install+set}" = set; then
2842  echo $ECHO_N "(cached) $ECHO_C" >&6
2843else
2844    ac_save_IFS=$IFS; IFS=$ac_path_separator
2845  for ac_dir in $PATH; do
2846    IFS=$ac_save_IFS
2847    # Account for people who put trailing slashes in PATH elements.
2848    case $ac_dir/ in
2849    / | ./ | .// | /cC/* \
2850    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2851    | /usr/ucb/* ) ;;
2852    *)
2853      # OSF1 and SCO ODT 3.0 have their own names for install.
2854      # Don't use installbsd from OSF since it installs stuff as root
2855      # by default.
2856      for ac_prog in ginstall scoinst install; do
2857        if $as_executable_p "$ac_dir/$ac_prog"; then
2858	  if test $ac_prog = install &&
2859            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2860	    # AIX install.  It has an incompatible calling convention.
2861	    :
2862	  elif test $ac_prog = install &&
2863	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2864	    # program-specific install script used by HP pwplus--don't use.
2865	    :
2866	  else
2867	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2868	    break 2
2869	  fi
2870	fi
2871      done
2872      ;;
2873    esac
2874  done
2875
2876fi
2877  if test "${ac_cv_path_install+set}" = set; then
2878    INSTALL=$ac_cv_path_install
2879  else
2880    # As a last resort, use the slow shell script.  We don't cache a
2881    # path for INSTALL within a source directory, because that will
2882    # break other packages using the cache if that directory is
2883    # removed, or if the path is relative.
2884    INSTALL=$ac_install_sh
2885  fi
2886fi
2887echo "$as_me:2887: result: $INSTALL" >&5
2888echo "${ECHO_T}$INSTALL" >&6
2889
2890# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2891# It thinks the first close brace ends the variable substitution.
2892test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2893
2894test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2895
2896test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2897
2898echo "$as_me:2898: checking whether ln -s works" >&5
2899echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2900LN_S=$as_ln_s
2901if test "$LN_S" = "ln -s"; then
2902  echo "$as_me:2902: result: yes" >&5
2903echo "${ECHO_T}yes" >&6
2904else
2905  echo "$as_me:2905: result: no, using $LN_S" >&5
2906echo "${ECHO_T}no, using $LN_S" >&6
2907fi
2908
2909test "$program_prefix" != NONE &&
2910  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2911# Use a double $ so make ignores it.
2912test "$program_suffix" != NONE &&
2913  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2914# Double any \ or $.  echo might interpret backslashes.
2915# By default was `s,x,x', remove it if useless.
2916cat <<\_ACEOF >conftest.sed
2917s/[\\$]/&&/g;s/;s,x,x,$//
2918_ACEOF
2919program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2920rm conftest.sed
2921
2922for ac_prog in lint cppcheck splint
2923do
2924  # Extract the first word of "$ac_prog", so it can be a program name with args.
2925set dummy $ac_prog; ac_word=$2
2926echo "$as_me:2926: checking for $ac_word" >&5
2927echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2928if test "${ac_cv_prog_LINT+set}" = set; then
2929  echo $ECHO_N "(cached) $ECHO_C" >&6
2930else
2931  if test -n "$LINT"; then
2932  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2933else
2934  ac_save_IFS=$IFS; IFS=$ac_path_separator
2935ac_dummy="$PATH"
2936for ac_dir in $ac_dummy; do
2937  IFS=$ac_save_IFS
2938  test -z "$ac_dir" && ac_dir=.
2939  $as_executable_p "$ac_dir/$ac_word" || continue
2940ac_cv_prog_LINT="$ac_prog"
2941echo "$as_me:2941: found $ac_dir/$ac_word" >&5
2942break
2943done
2944
2945fi
2946fi
2947LINT=$ac_cv_prog_LINT
2948if test -n "$LINT"; then
2949  echo "$as_me:2949: result: $LINT" >&5
2950echo "${ECHO_T}$LINT" >&6
2951else
2952  echo "$as_me:2952: result: no" >&5
2953echo "${ECHO_T}no" >&6
2954fi
2955
2956  test -n "$LINT" && break
2957done
2958
2959case "x$LINT" in
2960(xcppcheck|x*/cppcheck)
2961	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2962	;;
2963esac
2964
2965###	checks for compiler characteristics
2966
2967echo "$as_me:2967: checking if the POSIX test-macros are already defined" >&5
2968echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
2969if test "${cf_cv_posix_visible+set}" = set; then
2970  echo $ECHO_N "(cached) $ECHO_C" >&6
2971else
2972
2973cat >"conftest.$ac_ext" <<_ACEOF
2974#line 2974 "configure"
2975#include "confdefs.h"
2976#include <stdio.h>
2977int
2978main (void)
2979{
2980
2981#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
2982	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
2983	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
2984	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
2985#error conflicting symbols found
2986#endif
2987
2988  ;
2989  return 0;
2990}
2991_ACEOF
2992rm -f "conftest.$ac_objext"
2993if { (eval echo "$as_me:2993: \"$ac_compile\"") >&5
2994  (eval $ac_compile) 2>&5
2995  ac_status=$?
2996  echo "$as_me:2996: \$? = $ac_status" >&5
2997  (exit "$ac_status"); } &&
2998         { ac_try='test -s "conftest.$ac_objext"'
2999  { (eval echo "$as_me:2999: \"$ac_try\"") >&5
3000  (eval $ac_try) 2>&5
3001  ac_status=$?
3002  echo "$as_me:3002: \$? = $ac_status" >&5
3003  (exit "$ac_status"); }; }; then
3004  cf_cv_posix_visible=no
3005else
3006  echo "$as_me: failed program was:" >&5
3007cat "conftest.$ac_ext" >&5
3008cf_cv_posix_visible=yes
3009fi
3010rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3011
3012fi
3013echo "$as_me:3013: result: $cf_cv_posix_visible" >&5
3014echo "${ECHO_T}$cf_cv_posix_visible" >&6
3015
3016if test "$cf_cv_posix_visible" = no; then
3017
3018cf_XOPEN_SOURCE=700
3019cf_POSIX_C_SOURCE=199506L
3020cf_xopen_source=
3021
3022case "$host_os" in
3023(aix[4-7]*)
3024	cf_xopen_source="-D_ALL_SOURCE"
3025	;;
3026(msys)
3027	cf_XOPEN_SOURCE=600
3028	;;
3029(darwin[0-8].*)
3030	cf_xopen_source="-D_APPLE_C_SOURCE"
3031	;;
3032(darwin*)
3033	cf_xopen_source="-D_DARWIN_C_SOURCE"
3034	cf_XOPEN_SOURCE=
3035	;;
3036(freebsd*|dragonfly*|midnightbsd*)
3037	# 5.x headers associate
3038	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3039	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3040	cf_POSIX_C_SOURCE=200112L
3041	cf_XOPEN_SOURCE=600
3042	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3043	;;
3044(hpux11*)
3045	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3046	;;
3047(hpux*)
3048	cf_xopen_source="-D_HPUX_SOURCE"
3049	;;
3050(irix[56].*)
3051	cf_xopen_source="-D_SGI_SOURCE"
3052	cf_XOPEN_SOURCE=
3053	;;
3054(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3055
3056cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3057
3058echo "$as_me:3058: checking if this is the GNU C library" >&5
3059echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3060if test "${cf_cv_gnu_library+set}" = set; then
3061  echo $ECHO_N "(cached) $ECHO_C" >&6
3062else
3063
3064cat >"conftest.$ac_ext" <<_ACEOF
3065#line 3065 "configure"
3066#include "confdefs.h"
3067#include <sys/types.h>
3068int
3069main (void)
3070{
3071
3072	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3073		return 0;
3074	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3075		return 0;
3076	#else
3077	#	error not GNU C library
3078	#endif
3079  ;
3080  return 0;
3081}
3082_ACEOF
3083rm -f "conftest.$ac_objext"
3084if { (eval echo "$as_me:3084: \"$ac_compile\"") >&5
3085  (eval $ac_compile) 2>&5
3086  ac_status=$?
3087  echo "$as_me:3087: \$? = $ac_status" >&5
3088  (exit "$ac_status"); } &&
3089         { ac_try='test -s "conftest.$ac_objext"'
3090  { (eval echo "$as_me:3090: \"$ac_try\"") >&5
3091  (eval $ac_try) 2>&5
3092  ac_status=$?
3093  echo "$as_me:3093: \$? = $ac_status" >&5
3094  (exit "$ac_status"); }; }; then
3095  cf_cv_gnu_library=yes
3096else
3097  echo "$as_me: failed program was:" >&5
3098cat "conftest.$ac_ext" >&5
3099cf_cv_gnu_library=no
3100fi
3101rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3102
3103fi
3104echo "$as_me:3104: result: $cf_cv_gnu_library" >&5
3105echo "${ECHO_T}$cf_cv_gnu_library" >&6
3106
3107if test x$cf_cv_gnu_library = xyes; then
3108
3109	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3110	# was changed to help a little.  newlib incorporated the change about 4
3111	# years later.
3112	echo "$as_me:3112: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3113echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3114if test "${cf_cv_gnu_library_219+set}" = set; then
3115  echo $ECHO_N "(cached) $ECHO_C" >&6
3116else
3117
3118		cf_save="$CPPFLAGS"
3119
3120	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3121	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3122
3123		cat >"conftest.$ac_ext" <<_ACEOF
3124#line 3124 "configure"
3125#include "confdefs.h"
3126#include <sys/types.h>
3127int
3128main (void)
3129{
3130
3131			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3132				return 0;
3133			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3134				return 0;
3135			#else
3136			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3137			#endif
3138  ;
3139  return 0;
3140}
3141_ACEOF
3142rm -f "conftest.$ac_objext"
3143if { (eval echo "$as_me:3143: \"$ac_compile\"") >&5
3144  (eval $ac_compile) 2>&5
3145  ac_status=$?
3146  echo "$as_me:3146: \$? = $ac_status" >&5
3147  (exit "$ac_status"); } &&
3148         { ac_try='test -s "conftest.$ac_objext"'
3149  { (eval echo "$as_me:3149: \"$ac_try\"") >&5
3150  (eval $ac_try) 2>&5
3151  ac_status=$?
3152  echo "$as_me:3152: \$? = $ac_status" >&5
3153  (exit "$ac_status"); }; }; then
3154  cf_cv_gnu_library_219=yes
3155else
3156  echo "$as_me: failed program was:" >&5
3157cat "conftest.$ac_ext" >&5
3158cf_cv_gnu_library_219=no
3159fi
3160rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3161		CPPFLAGS="$cf_save"
3162
3163fi
3164echo "$as_me:3164: result: $cf_cv_gnu_library_219" >&5
3165echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3166
3167	if test "x$cf_cv_gnu_library_219" = xyes; then
3168		cf_save="$CPPFLAGS"
3169		echo "$as_me:3169: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3170echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3171if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3172  echo $ECHO_N "(cached) $ECHO_C" >&6
3173else
3174
3175cf_fix_cppflags=no
3176cf_new_cflags=
3177cf_new_cppflags=
3178cf_new_extra_cppflags=
3179
3180for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3181do
3182case "$cf_fix_cppflags" in
3183(no)
3184	case "$cf_add_cflags" in
3185	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3186		case "$cf_add_cflags" in
3187		(-D*)
3188			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3189
3190			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3191				&& test -z "${cf_tst_cflags}" \
3192				&& cf_fix_cppflags=yes
3193
3194			if test "$cf_fix_cppflags" = yes ; then
3195
3196	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3197	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3198
3199				continue
3200			elif test "${cf_tst_cflags}" = "\"'" ; then
3201
3202	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3203	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3204
3205				continue
3206			fi
3207			;;
3208		esac
3209		case "$CPPFLAGS" in
3210		(*$cf_add_cflags)
3211			;;
3212		(*)
3213			case "$cf_add_cflags" in
3214			(-D*)
3215				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3216
3217CPPFLAGS=`echo "$CPPFLAGS" | \
3218	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3219		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3220
3221				;;
3222			esac
3223
3224	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3225	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3226
3227			;;
3228		esac
3229		;;
3230	(*)
3231
3232	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3233	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3234
3235		;;
3236	esac
3237	;;
3238(yes)
3239
3240	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3241	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3242
3243	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3244
3245	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3246		&& test -z "${cf_tst_cflags}" \
3247		&& cf_fix_cppflags=no
3248	;;
3249esac
3250done
3251
3252if test -n "$cf_new_cflags" ; then
3253
3254	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3255	CFLAGS="${CFLAGS}$cf_new_cflags"
3256
3257fi
3258
3259if test -n "$cf_new_cppflags" ; then
3260
3261	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3262	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3263
3264fi
3265
3266if test -n "$cf_new_extra_cppflags" ; then
3267
3268	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3269	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3270
3271fi
3272
3273			cat >"conftest.$ac_ext" <<_ACEOF
3274#line 3274 "configure"
3275#include "confdefs.h"
3276
3277				#include <limits.h>
3278				#include <sys/types.h>
3279
3280int
3281main (void)
3282{
3283
3284				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3285					return 0;
3286				#else
3287				#	error GNU C library is too old
3288				#endif
3289  ;
3290  return 0;
3291}
3292_ACEOF
3293rm -f "conftest.$ac_objext"
3294if { (eval echo "$as_me:3294: \"$ac_compile\"") >&5
3295  (eval $ac_compile) 2>&5
3296  ac_status=$?
3297  echo "$as_me:3297: \$? = $ac_status" >&5
3298  (exit "$ac_status"); } &&
3299         { ac_try='test -s "conftest.$ac_objext"'
3300  { (eval echo "$as_me:3300: \"$ac_try\"") >&5
3301  (eval $ac_try) 2>&5
3302  ac_status=$?
3303  echo "$as_me:3303: \$? = $ac_status" >&5
3304  (exit "$ac_status"); }; }; then
3305  cf_cv_gnu_dftsrc_219=yes
3306else
3307  echo "$as_me: failed program was:" >&5
3308cat "conftest.$ac_ext" >&5
3309cf_cv_gnu_dftsrc_219=no
3310fi
3311rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3312
3313fi
3314echo "$as_me:3314: result: $cf_cv_gnu_dftsrc_219" >&5
3315echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3316		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3317	else
3318		cf_cv_gnu_dftsrc_219=maybe
3319	fi
3320
3321	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3322
3323		echo "$as_me:3323: checking if we must define _GNU_SOURCE" >&5
3324echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3325if test "${cf_cv_gnu_source+set}" = set; then
3326  echo $ECHO_N "(cached) $ECHO_C" >&6
3327else
3328
3329		cat >"conftest.$ac_ext" <<_ACEOF
3330#line 3330 "configure"
3331#include "confdefs.h"
3332#include <sys/types.h>
3333int
3334main (void)
3335{
3336
3337			#ifndef _XOPEN_SOURCE
3338			#error	expected _XOPEN_SOURCE to be defined
3339			#endif
3340  ;
3341  return 0;
3342}
3343_ACEOF
3344rm -f "conftest.$ac_objext"
3345if { (eval echo "$as_me:3345: \"$ac_compile\"") >&5
3346  (eval $ac_compile) 2>&5
3347  ac_status=$?
3348  echo "$as_me:3348: \$? = $ac_status" >&5
3349  (exit "$ac_status"); } &&
3350         { ac_try='test -s "conftest.$ac_objext"'
3351  { (eval echo "$as_me:3351: \"$ac_try\"") >&5
3352  (eval $ac_try) 2>&5
3353  ac_status=$?
3354  echo "$as_me:3354: \$? = $ac_status" >&5
3355  (exit "$ac_status"); }; }; then
3356  cf_cv_gnu_source=no
3357else
3358  echo "$as_me: failed program was:" >&5
3359cat "conftest.$ac_ext" >&5
3360cf_save="$CPPFLAGS"
3361
3362cf_fix_cppflags=no
3363cf_new_cflags=
3364cf_new_cppflags=
3365cf_new_extra_cppflags=
3366
3367for cf_add_cflags in -D_GNU_SOURCE
3368do
3369case "$cf_fix_cppflags" in
3370(no)
3371	case "$cf_add_cflags" in
3372	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3373		case "$cf_add_cflags" in
3374		(-D*)
3375			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3376
3377			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3378				&& test -z "${cf_tst_cflags}" \
3379				&& cf_fix_cppflags=yes
3380
3381			if test "$cf_fix_cppflags" = yes ; then
3382
3383	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3384	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3385
3386				continue
3387			elif test "${cf_tst_cflags}" = "\"'" ; then
3388
3389	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3390	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3391
3392				continue
3393			fi
3394			;;
3395		esac
3396		case "$CPPFLAGS" in
3397		(*$cf_add_cflags)
3398			;;
3399		(*)
3400			case "$cf_add_cflags" in
3401			(-D*)
3402				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3403
3404CPPFLAGS=`echo "$CPPFLAGS" | \
3405	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3406		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3407
3408				;;
3409			esac
3410
3411	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3412	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3413
3414			;;
3415		esac
3416		;;
3417	(*)
3418
3419	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3420	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3421
3422		;;
3423	esac
3424	;;
3425(yes)
3426
3427	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3428	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3429
3430	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3431
3432	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3433		&& test -z "${cf_tst_cflags}" \
3434		&& cf_fix_cppflags=no
3435	;;
3436esac
3437done
3438
3439if test -n "$cf_new_cflags" ; then
3440
3441	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3442	CFLAGS="${CFLAGS}$cf_new_cflags"
3443
3444fi
3445
3446if test -n "$cf_new_cppflags" ; then
3447
3448	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3449	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3450
3451fi
3452
3453if test -n "$cf_new_extra_cppflags" ; then
3454
3455	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3456	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3457
3458fi
3459
3460			 cat >"conftest.$ac_ext" <<_ACEOF
3461#line 3461 "configure"
3462#include "confdefs.h"
3463#include <sys/types.h>
3464int
3465main (void)
3466{
3467
3468				#ifdef _XOPEN_SOURCE
3469				#error	expected _XOPEN_SOURCE to be undefined
3470				#endif
3471  ;
3472  return 0;
3473}
3474_ACEOF
3475rm -f "conftest.$ac_objext"
3476if { (eval echo "$as_me:3476: \"$ac_compile\"") >&5
3477  (eval $ac_compile) 2>&5
3478  ac_status=$?
3479  echo "$as_me:3479: \$? = $ac_status" >&5
3480  (exit "$ac_status"); } &&
3481         { ac_try='test -s "conftest.$ac_objext"'
3482  { (eval echo "$as_me:3482: \"$ac_try\"") >&5
3483  (eval $ac_try) 2>&5
3484  ac_status=$?
3485  echo "$as_me:3485: \$? = $ac_status" >&5
3486  (exit "$ac_status"); }; }; then
3487  cf_cv_gnu_source=no
3488else
3489  echo "$as_me: failed program was:" >&5
3490cat "conftest.$ac_ext" >&5
3491cf_cv_gnu_source=yes
3492fi
3493rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3494			CPPFLAGS="$cf_save"
3495
3496fi
3497rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3498
3499fi
3500echo "$as_me:3500: result: $cf_cv_gnu_source" >&5
3501echo "${ECHO_T}$cf_cv_gnu_source" >&6
3502
3503		if test "$cf_cv_gnu_source" = yes
3504		then
3505		echo "$as_me:3505: checking if we should also define _DEFAULT_SOURCE" >&5
3506echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3507if test "${cf_cv_default_source+set}" = set; then
3508  echo $ECHO_N "(cached) $ECHO_C" >&6
3509else
3510
3511	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3512	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3513
3514			cat >"conftest.$ac_ext" <<_ACEOF
3515#line 3515 "configure"
3516#include "confdefs.h"
3517#include <sys/types.h>
3518int
3519main (void)
3520{
3521
3522				#ifdef _DEFAULT_SOURCE
3523				#error	expected _DEFAULT_SOURCE to be undefined
3524				#endif
3525  ;
3526  return 0;
3527}
3528_ACEOF
3529rm -f "conftest.$ac_objext"
3530if { (eval echo "$as_me:3530: \"$ac_compile\"") >&5
3531  (eval $ac_compile) 2>&5
3532  ac_status=$?
3533  echo "$as_me:3533: \$? = $ac_status" >&5
3534  (exit "$ac_status"); } &&
3535         { ac_try='test -s "conftest.$ac_objext"'
3536  { (eval echo "$as_me:3536: \"$ac_try\"") >&5
3537  (eval $ac_try) 2>&5
3538  ac_status=$?
3539  echo "$as_me:3539: \$? = $ac_status" >&5
3540  (exit "$ac_status"); }; }; then
3541  cf_cv_default_source=no
3542else
3543  echo "$as_me: failed program was:" >&5
3544cat "conftest.$ac_ext" >&5
3545cf_cv_default_source=yes
3546fi
3547rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3548
3549fi
3550echo "$as_me:3550: result: $cf_cv_default_source" >&5
3551echo "${ECHO_T}$cf_cv_default_source" >&6
3552			if test "$cf_cv_default_source" = yes
3553			then
3554
3555	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3556	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3557
3558			fi
3559		fi
3560	fi
3561
3562fi
3563
3564	;;
3565(minix*)
3566	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3567	;;
3568(mirbsd*)
3569	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3570	cf_XOPEN_SOURCE=
3571
3572if test "$cf_cv_posix_visible" = no; then
3573
3574cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3575
3576cf_save_CFLAGS="$CFLAGS"
3577cf_save_CPPFLAGS="$CPPFLAGS"
3578
3579cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3580	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3581		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3582
3583cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3584	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3585		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3586
3587echo "$as_me:3587: checking if we should define _POSIX_C_SOURCE" >&5
3588echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3589if test "${cf_cv_posix_c_source+set}" = set; then
3590  echo $ECHO_N "(cached) $ECHO_C" >&6
3591else
3592
3593echo "${as_me:-configure}:3593: testing if the symbol is already defined go no further ..." 1>&5
3594
3595	cat >"conftest.$ac_ext" <<_ACEOF
3596#line 3596 "configure"
3597#include "confdefs.h"
3598#include <sys/types.h>
3599int
3600main (void)
3601{
3602
3603#ifndef _POSIX_C_SOURCE
3604make an error
3605#endif
3606  ;
3607  return 0;
3608}
3609_ACEOF
3610rm -f "conftest.$ac_objext"
3611if { (eval echo "$as_me:3611: \"$ac_compile\"") >&5
3612  (eval $ac_compile) 2>&5
3613  ac_status=$?
3614  echo "$as_me:3614: \$? = $ac_status" >&5
3615  (exit "$ac_status"); } &&
3616         { ac_try='test -s "conftest.$ac_objext"'
3617  { (eval echo "$as_me:3617: \"$ac_try\"") >&5
3618  (eval $ac_try) 2>&5
3619  ac_status=$?
3620  echo "$as_me:3620: \$? = $ac_status" >&5
3621  (exit "$ac_status"); }; }; then
3622  cf_cv_posix_c_source=no
3623else
3624  echo "$as_me: failed program was:" >&5
3625cat "conftest.$ac_ext" >&5
3626cf_want_posix_source=no
3627	 case .$cf_POSIX_C_SOURCE in
3628	 (.[12]??*)
3629		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3630		;;
3631	 (.2)
3632		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3633		cf_want_posix_source=yes
3634		;;
3635	 (.*)
3636		cf_want_posix_source=yes
3637		;;
3638	 esac
3639	 if test "$cf_want_posix_source" = yes ; then
3640		cat >"conftest.$ac_ext" <<_ACEOF
3641#line 3641 "configure"
3642#include "confdefs.h"
3643#include <sys/types.h>
3644int
3645main (void)
3646{
3647
3648#ifdef _POSIX_SOURCE
3649make an error
3650#endif
3651  ;
3652  return 0;
3653}
3654_ACEOF
3655rm -f "conftest.$ac_objext"
3656if { (eval echo "$as_me:3656: \"$ac_compile\"") >&5
3657  (eval $ac_compile) 2>&5
3658  ac_status=$?
3659  echo "$as_me:3659: \$? = $ac_status" >&5
3660  (exit "$ac_status"); } &&
3661         { ac_try='test -s "conftest.$ac_objext"'
3662  { (eval echo "$as_me:3662: \"$ac_try\"") >&5
3663  (eval $ac_try) 2>&5
3664  ac_status=$?
3665  echo "$as_me:3665: \$? = $ac_status" >&5
3666  (exit "$ac_status"); }; }; then
3667  :
3668else
3669  echo "$as_me: failed program was:" >&5
3670cat "conftest.$ac_ext" >&5
3671cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3672fi
3673rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3674	 fi
3675
3676echo "${as_me:-configure}:3676: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3677
3678	 CFLAGS="$cf_trim_CFLAGS"
3679	 CPPFLAGS="$cf_trim_CPPFLAGS"
3680
3681	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3682	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3683
3684echo "${as_me:-configure}:3684: testing if the second compile does not leave our definition intact error ..." 1>&5
3685
3686	 cat >"conftest.$ac_ext" <<_ACEOF
3687#line 3687 "configure"
3688#include "confdefs.h"
3689#include <sys/types.h>
3690int
3691main (void)
3692{
3693
3694#ifndef _POSIX_C_SOURCE
3695make an error
3696#endif
3697  ;
3698  return 0;
3699}
3700_ACEOF
3701rm -f "conftest.$ac_objext"
3702if { (eval echo "$as_me:3702: \"$ac_compile\"") >&5
3703  (eval $ac_compile) 2>&5
3704  ac_status=$?
3705  echo "$as_me:3705: \$? = $ac_status" >&5
3706  (exit "$ac_status"); } &&
3707         { ac_try='test -s "conftest.$ac_objext"'
3708  { (eval echo "$as_me:3708: \"$ac_try\"") >&5
3709  (eval $ac_try) 2>&5
3710  ac_status=$?
3711  echo "$as_me:3711: \$? = $ac_status" >&5
3712  (exit "$ac_status"); }; }; then
3713  :
3714else
3715  echo "$as_me: failed program was:" >&5
3716cat "conftest.$ac_ext" >&5
3717cf_cv_posix_c_source=no
3718fi
3719rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3720	 CFLAGS="$cf_save_CFLAGS"
3721	 CPPFLAGS="$cf_save_CPPFLAGS"
3722
3723fi
3724rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3725
3726fi
3727echo "$as_me:3727: result: $cf_cv_posix_c_source" >&5
3728echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3729
3730if test "$cf_cv_posix_c_source" != no ; then
3731	CFLAGS="$cf_trim_CFLAGS"
3732	CPPFLAGS="$cf_trim_CPPFLAGS"
3733
3734cf_fix_cppflags=no
3735cf_new_cflags=
3736cf_new_cppflags=
3737cf_new_extra_cppflags=
3738
3739for cf_add_cflags in $cf_cv_posix_c_source
3740do
3741case "$cf_fix_cppflags" in
3742(no)
3743	case "$cf_add_cflags" in
3744	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3745		case "$cf_add_cflags" in
3746		(-D*)
3747			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3748
3749			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3750				&& test -z "${cf_tst_cflags}" \
3751				&& cf_fix_cppflags=yes
3752
3753			if test "$cf_fix_cppflags" = yes ; then
3754
3755	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3756	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3757
3758				continue
3759			elif test "${cf_tst_cflags}" = "\"'" ; then
3760
3761	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3762	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3763
3764				continue
3765			fi
3766			;;
3767		esac
3768		case "$CPPFLAGS" in
3769		(*$cf_add_cflags)
3770			;;
3771		(*)
3772			case "$cf_add_cflags" in
3773			(-D*)
3774				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3775
3776CPPFLAGS=`echo "$CPPFLAGS" | \
3777	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3778		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3779
3780				;;
3781			esac
3782
3783	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3784	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3785
3786			;;
3787		esac
3788		;;
3789	(*)
3790
3791	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3792	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3793
3794		;;
3795	esac
3796	;;
3797(yes)
3798
3799	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3800	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3801
3802	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3803
3804	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3805		&& test -z "${cf_tst_cflags}" \
3806		&& cf_fix_cppflags=no
3807	;;
3808esac
3809done
3810
3811if test -n "$cf_new_cflags" ; then
3812
3813	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3814	CFLAGS="${CFLAGS}$cf_new_cflags"
3815
3816fi
3817
3818if test -n "$cf_new_cppflags" ; then
3819
3820	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3821	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3822
3823fi
3824
3825if test -n "$cf_new_extra_cppflags" ; then
3826
3827	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3828	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3829
3830fi
3831
3832fi
3833
3834fi # cf_cv_posix_visible
3835
3836	;;
3837(netbsd*)
3838	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3839	;;
3840(openbsd[6-9]*)
3841	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
3842	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
3843	# Abusing the conformance level is a workaround.
3844	{ echo "$as_me:3844: WARNING: this system does not provide usable locale support" >&5
3845echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
3846	cf_xopen_source="-D_BSD_SOURCE"
3847	cf_XOPEN_SOURCE=700
3848	;;
3849(openbsd[4-5]*)
3850	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3851	cf_xopen_source="-D_BSD_SOURCE"
3852	cf_XOPEN_SOURCE=600
3853	;;
3854(openbsd*)
3855	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3856	;;
3857(osf[45]*)
3858	cf_xopen_source="-D_OSF_SOURCE"
3859	;;
3860(nto-qnx*)
3861	cf_xopen_source="-D_QNX_SOURCE"
3862	;;
3863(sco*)
3864	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3865	;;
3866(solaris2.*)
3867	cf_xopen_source="-D__EXTENSIONS__"
3868	cf_cv_xopen_source=broken
3869	;;
3870(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3871	cf_XOPEN_SOURCE=
3872	cf_POSIX_C_SOURCE=
3873	;;
3874(*)
3875
3876echo "$as_me:3876: checking if we should define _XOPEN_SOURCE" >&5
3877echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3878if test "${cf_cv_xopen_source+set}" = set; then
3879  echo $ECHO_N "(cached) $ECHO_C" >&6
3880else
3881
3882	cat >"conftest.$ac_ext" <<_ACEOF
3883#line 3883 "configure"
3884#include "confdefs.h"
3885
3886#include <stdlib.h>
3887#include <string.h>
3888#include <sys/types.h>
3889
3890int
3891main (void)
3892{
3893
3894#ifndef _XOPEN_SOURCE
3895make an error
3896#endif
3897  ;
3898  return 0;
3899}
3900_ACEOF
3901rm -f "conftest.$ac_objext"
3902if { (eval echo "$as_me:3902: \"$ac_compile\"") >&5
3903  (eval $ac_compile) 2>&5
3904  ac_status=$?
3905  echo "$as_me:3905: \$? = $ac_status" >&5
3906  (exit "$ac_status"); } &&
3907         { ac_try='test -s "conftest.$ac_objext"'
3908  { (eval echo "$as_me:3908: \"$ac_try\"") >&5
3909  (eval $ac_try) 2>&5
3910  ac_status=$?
3911  echo "$as_me:3911: \$? = $ac_status" >&5
3912  (exit "$ac_status"); }; }; then
3913  cf_cv_xopen_source=no
3914else
3915  echo "$as_me: failed program was:" >&5
3916cat "conftest.$ac_ext" >&5
3917cf_save="$CPPFLAGS"
3918
3919	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3920	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3921
3922	 cat >"conftest.$ac_ext" <<_ACEOF
3923#line 3923 "configure"
3924#include "confdefs.h"
3925
3926#include <stdlib.h>
3927#include <string.h>
3928#include <sys/types.h>
3929
3930int
3931main (void)
3932{
3933
3934#ifdef _XOPEN_SOURCE
3935make an error
3936#endif
3937  ;
3938  return 0;
3939}
3940_ACEOF
3941rm -f "conftest.$ac_objext"
3942if { (eval echo "$as_me:3942: \"$ac_compile\"") >&5
3943  (eval $ac_compile) 2>&5
3944  ac_status=$?
3945  echo "$as_me:3945: \$? = $ac_status" >&5
3946  (exit "$ac_status"); } &&
3947         { ac_try='test -s "conftest.$ac_objext"'
3948  { (eval echo "$as_me:3948: \"$ac_try\"") >&5
3949  (eval $ac_try) 2>&5
3950  ac_status=$?
3951  echo "$as_me:3951: \$? = $ac_status" >&5
3952  (exit "$ac_status"); }; }; then
3953  cf_cv_xopen_source=no
3954else
3955  echo "$as_me: failed program was:" >&5
3956cat "conftest.$ac_ext" >&5
3957cf_cv_xopen_source=$cf_XOPEN_SOURCE
3958fi
3959rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3960	CPPFLAGS="$cf_save"
3961
3962fi
3963rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3964
3965fi
3966echo "$as_me:3966: result: $cf_cv_xopen_source" >&5
3967echo "${ECHO_T}$cf_cv_xopen_source" >&6
3968
3969if test "$cf_cv_xopen_source" != no ; then
3970
3971CFLAGS=`echo "$CFLAGS" | \
3972	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3973		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3974
3975CPPFLAGS=`echo "$CPPFLAGS" | \
3976	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3977		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3978
3979	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3980
3981for cf_add_cflags in $cf_temp_xopen_source
3982do
3983	case "x$cf_add_cflags" in
3984	(x-[DU]*)
3985
3986cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3987while true
3988do
3989	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
3990	test "$CFLAGS" != "$cf_old_cflag" || break
3991
3992	CFLAGS="$cf_old_cflag"
3993done
3994
3995cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3996while true
3997do
3998	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
3999	test "$CPPFLAGS" != "$cf_old_cflag" || break
4000
4001	CPPFLAGS="$cf_old_cflag"
4002done
4003
4004		;;
4005	esac
4006
4007cf_fix_cppflags=no
4008cf_new_cflags=
4009cf_new_cppflags=
4010cf_new_extra_cppflags=
4011
4012for cf_add_cflags in $cf_add_cflags
4013do
4014case "$cf_fix_cppflags" in
4015(no)
4016	case "$cf_add_cflags" in
4017	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4018		case "$cf_add_cflags" in
4019		(-D*)
4020			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4021
4022			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4023				&& test -z "${cf_tst_cflags}" \
4024				&& cf_fix_cppflags=yes
4025
4026			if test "$cf_fix_cppflags" = yes ; then
4027
4028	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4029	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4030
4031				continue
4032			elif test "${cf_tst_cflags}" = "\"'" ; then
4033
4034	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4035	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4036
4037				continue
4038			fi
4039			;;
4040		esac
4041		case "$CPPFLAGS" in
4042		(*$cf_add_cflags)
4043			;;
4044		(*)
4045			case "$cf_add_cflags" in
4046			(-D*)
4047				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4048
4049CPPFLAGS=`echo "$CPPFLAGS" | \
4050	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4051		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4052
4053				;;
4054			esac
4055
4056	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4057	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4058
4059			;;
4060		esac
4061		;;
4062	(*)
4063
4064	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4065	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4066
4067		;;
4068	esac
4069	;;
4070(yes)
4071
4072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4074
4075	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4076
4077	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4078		&& test -z "${cf_tst_cflags}" \
4079		&& cf_fix_cppflags=no
4080	;;
4081esac
4082done
4083
4084if test -n "$cf_new_cflags" ; then
4085
4086	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4087	CFLAGS="${CFLAGS}$cf_new_cflags"
4088
4089fi
4090
4091if test -n "$cf_new_cppflags" ; then
4092
4093	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4094	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4095
4096fi
4097
4098if test -n "$cf_new_extra_cppflags" ; then
4099
4100	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4101	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4102
4103fi
4104
4105done
4106
4107fi
4108
4109if test "$cf_cv_posix_visible" = no; then
4110
4111cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4112
4113cf_save_CFLAGS="$CFLAGS"
4114cf_save_CPPFLAGS="$CPPFLAGS"
4115
4116cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4117	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4118		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4119
4120cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4121	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4122		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4123
4124echo "$as_me:4124: checking if we should define _POSIX_C_SOURCE" >&5
4125echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4126if test "${cf_cv_posix_c_source+set}" = set; then
4127  echo $ECHO_N "(cached) $ECHO_C" >&6
4128else
4129
4130echo "${as_me:-configure}:4130: testing if the symbol is already defined go no further ..." 1>&5
4131
4132	cat >"conftest.$ac_ext" <<_ACEOF
4133#line 4133 "configure"
4134#include "confdefs.h"
4135#include <sys/types.h>
4136int
4137main (void)
4138{
4139
4140#ifndef _POSIX_C_SOURCE
4141make an error
4142#endif
4143  ;
4144  return 0;
4145}
4146_ACEOF
4147rm -f "conftest.$ac_objext"
4148if { (eval echo "$as_me:4148: \"$ac_compile\"") >&5
4149  (eval $ac_compile) 2>&5
4150  ac_status=$?
4151  echo "$as_me:4151: \$? = $ac_status" >&5
4152  (exit "$ac_status"); } &&
4153         { ac_try='test -s "conftest.$ac_objext"'
4154  { (eval echo "$as_me:4154: \"$ac_try\"") >&5
4155  (eval $ac_try) 2>&5
4156  ac_status=$?
4157  echo "$as_me:4157: \$? = $ac_status" >&5
4158  (exit "$ac_status"); }; }; then
4159  cf_cv_posix_c_source=no
4160else
4161  echo "$as_me: failed program was:" >&5
4162cat "conftest.$ac_ext" >&5
4163cf_want_posix_source=no
4164	 case .$cf_POSIX_C_SOURCE in
4165	 (.[12]??*)
4166		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4167		;;
4168	 (.2)
4169		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4170		cf_want_posix_source=yes
4171		;;
4172	 (.*)
4173		cf_want_posix_source=yes
4174		;;
4175	 esac
4176	 if test "$cf_want_posix_source" = yes ; then
4177		cat >"conftest.$ac_ext" <<_ACEOF
4178#line 4178 "configure"
4179#include "confdefs.h"
4180#include <sys/types.h>
4181int
4182main (void)
4183{
4184
4185#ifdef _POSIX_SOURCE
4186make an error
4187#endif
4188  ;
4189  return 0;
4190}
4191_ACEOF
4192rm -f "conftest.$ac_objext"
4193if { (eval echo "$as_me:4193: \"$ac_compile\"") >&5
4194  (eval $ac_compile) 2>&5
4195  ac_status=$?
4196  echo "$as_me:4196: \$? = $ac_status" >&5
4197  (exit "$ac_status"); } &&
4198         { ac_try='test -s "conftest.$ac_objext"'
4199  { (eval echo "$as_me:4199: \"$ac_try\"") >&5
4200  (eval $ac_try) 2>&5
4201  ac_status=$?
4202  echo "$as_me:4202: \$? = $ac_status" >&5
4203  (exit "$ac_status"); }; }; then
4204  :
4205else
4206  echo "$as_me: failed program was:" >&5
4207cat "conftest.$ac_ext" >&5
4208cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4209fi
4210rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4211	 fi
4212
4213echo "${as_me:-configure}:4213: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4214
4215	 CFLAGS="$cf_trim_CFLAGS"
4216	 CPPFLAGS="$cf_trim_CPPFLAGS"
4217
4218	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4219	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4220
4221echo "${as_me:-configure}:4221: testing if the second compile does not leave our definition intact error ..." 1>&5
4222
4223	 cat >"conftest.$ac_ext" <<_ACEOF
4224#line 4224 "configure"
4225#include "confdefs.h"
4226#include <sys/types.h>
4227int
4228main (void)
4229{
4230
4231#ifndef _POSIX_C_SOURCE
4232make an error
4233#endif
4234  ;
4235  return 0;
4236}
4237_ACEOF
4238rm -f "conftest.$ac_objext"
4239if { (eval echo "$as_me:4239: \"$ac_compile\"") >&5
4240  (eval $ac_compile) 2>&5
4241  ac_status=$?
4242  echo "$as_me:4242: \$? = $ac_status" >&5
4243  (exit "$ac_status"); } &&
4244         { ac_try='test -s "conftest.$ac_objext"'
4245  { (eval echo "$as_me:4245: \"$ac_try\"") >&5
4246  (eval $ac_try) 2>&5
4247  ac_status=$?
4248  echo "$as_me:4248: \$? = $ac_status" >&5
4249  (exit "$ac_status"); }; }; then
4250  :
4251else
4252  echo "$as_me: failed program was:" >&5
4253cat "conftest.$ac_ext" >&5
4254cf_cv_posix_c_source=no
4255fi
4256rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4257	 CFLAGS="$cf_save_CFLAGS"
4258	 CPPFLAGS="$cf_save_CPPFLAGS"
4259
4260fi
4261rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4262
4263fi
4264echo "$as_me:4264: result: $cf_cv_posix_c_source" >&5
4265echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4266
4267if test "$cf_cv_posix_c_source" != no ; then
4268	CFLAGS="$cf_trim_CFLAGS"
4269	CPPFLAGS="$cf_trim_CPPFLAGS"
4270
4271cf_fix_cppflags=no
4272cf_new_cflags=
4273cf_new_cppflags=
4274cf_new_extra_cppflags=
4275
4276for cf_add_cflags in $cf_cv_posix_c_source
4277do
4278case "$cf_fix_cppflags" in
4279(no)
4280	case "$cf_add_cflags" in
4281	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4282		case "$cf_add_cflags" in
4283		(-D*)
4284			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4285
4286			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4287				&& test -z "${cf_tst_cflags}" \
4288				&& cf_fix_cppflags=yes
4289
4290			if test "$cf_fix_cppflags" = yes ; then
4291
4292	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4293	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4294
4295				continue
4296			elif test "${cf_tst_cflags}" = "\"'" ; then
4297
4298	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4299	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4300
4301				continue
4302			fi
4303			;;
4304		esac
4305		case "$CPPFLAGS" in
4306		(*$cf_add_cflags)
4307			;;
4308		(*)
4309			case "$cf_add_cflags" in
4310			(-D*)
4311				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4312
4313CPPFLAGS=`echo "$CPPFLAGS" | \
4314	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4315		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4316
4317				;;
4318			esac
4319
4320	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4321	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4322
4323			;;
4324		esac
4325		;;
4326	(*)
4327
4328	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4329	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4330
4331		;;
4332	esac
4333	;;
4334(yes)
4335
4336	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4337	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4338
4339	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4340
4341	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4342		&& test -z "${cf_tst_cflags}" \
4343		&& cf_fix_cppflags=no
4344	;;
4345esac
4346done
4347
4348if test -n "$cf_new_cflags" ; then
4349
4350	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4351	CFLAGS="${CFLAGS}$cf_new_cflags"
4352
4353fi
4354
4355if test -n "$cf_new_cppflags" ; then
4356
4357	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4358	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4359
4360fi
4361
4362if test -n "$cf_new_extra_cppflags" ; then
4363
4364	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4365	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4366
4367fi
4368
4369fi
4370
4371fi # cf_cv_posix_visible
4372
4373	;;
4374esac
4375
4376if test -n "$cf_xopen_source" ; then
4377
4378for cf_add_cflags in $cf_xopen_source
4379do
4380	case "x$cf_add_cflags" in
4381	(x-[DU]*)
4382
4383cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4384while true
4385do
4386	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4387	test "$CFLAGS" != "$cf_old_cflag" || break
4388	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CFLAGS" 1>&6
4389
4390echo "${as_me:-configure}:4390: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
4391
4392	CFLAGS="$cf_old_cflag"
4393done
4394
4395cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4396while true
4397do
4398	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4399	test "$CPPFLAGS" != "$cf_old_cflag" || break
4400	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CPPFLAGS" 1>&6
4401
4402echo "${as_me:-configure}:4402: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
4403
4404	CPPFLAGS="$cf_old_cflag"
4405done
4406
4407		;;
4408	esac
4409
4410cf_fix_cppflags=no
4411cf_new_cflags=
4412cf_new_cppflags=
4413cf_new_extra_cppflags=
4414
4415for cf_add_cflags in $cf_add_cflags
4416do
4417case "$cf_fix_cppflags" in
4418(no)
4419	case "$cf_add_cflags" in
4420	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4421		case "$cf_add_cflags" in
4422		(-D*)
4423			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4424
4425			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4426				&& test -z "${cf_tst_cflags}" \
4427				&& cf_fix_cppflags=yes
4428
4429			if test "$cf_fix_cppflags" = yes ; then
4430
4431	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4432	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4433
4434				continue
4435			elif test "${cf_tst_cflags}" = "\"'" ; then
4436
4437	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4438	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4439
4440				continue
4441			fi
4442			;;
4443		esac
4444		case "$CPPFLAGS" in
4445		(*$cf_add_cflags)
4446			;;
4447		(*)
4448			case "$cf_add_cflags" in
4449			(-D*)
4450				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4451
4452CPPFLAGS=`echo "$CPPFLAGS" | \
4453	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4454		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4455
4456				;;
4457			esac
4458
4459	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4460	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4461
4462			;;
4463		esac
4464		;;
4465	(*)
4466
4467	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4468	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4469
4470		;;
4471	esac
4472	;;
4473(yes)
4474
4475	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4476	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4477
4478	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4479
4480	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4481		&& test -z "${cf_tst_cflags}" \
4482		&& cf_fix_cppflags=no
4483	;;
4484esac
4485done
4486
4487if test -n "$cf_new_cflags" ; then
4488	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4489
4490echo "${as_me:-configure}:4490: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4491
4492	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4493	CFLAGS="${CFLAGS}$cf_new_cflags"
4494
4495fi
4496
4497if test -n "$cf_new_cppflags" ; then
4498	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4499
4500echo "${as_me:-configure}:4500: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4501
4502	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4503	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4504
4505fi
4506
4507if test -n "$cf_new_extra_cppflags" ; then
4508	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4509
4510echo "${as_me:-configure}:4510: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4511
4512	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4513	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4514
4515fi
4516
4517done
4518
4519fi
4520
4521if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4522	echo "$as_me:4522: checking if _XOPEN_SOURCE really is set" >&5
4523echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4524	cat >"conftest.$ac_ext" <<_ACEOF
4525#line 4525 "configure"
4526#include "confdefs.h"
4527#include <stdlib.h>
4528int
4529main (void)
4530{
4531
4532#ifndef _XOPEN_SOURCE
4533make an error
4534#endif
4535  ;
4536  return 0;
4537}
4538_ACEOF
4539rm -f "conftest.$ac_objext"
4540if { (eval echo "$as_me:4540: \"$ac_compile\"") >&5
4541  (eval $ac_compile) 2>&5
4542  ac_status=$?
4543  echo "$as_me:4543: \$? = $ac_status" >&5
4544  (exit "$ac_status"); } &&
4545         { ac_try='test -s "conftest.$ac_objext"'
4546  { (eval echo "$as_me:4546: \"$ac_try\"") >&5
4547  (eval $ac_try) 2>&5
4548  ac_status=$?
4549  echo "$as_me:4549: \$? = $ac_status" >&5
4550  (exit "$ac_status"); }; }; then
4551  cf_XOPEN_SOURCE_set=yes
4552else
4553  echo "$as_me: failed program was:" >&5
4554cat "conftest.$ac_ext" >&5
4555cf_XOPEN_SOURCE_set=no
4556fi
4557rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4558	echo "$as_me:4558: result: $cf_XOPEN_SOURCE_set" >&5
4559echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4560	if test "$cf_XOPEN_SOURCE_set" = yes
4561	then
4562		cat >"conftest.$ac_ext" <<_ACEOF
4563#line 4563 "configure"
4564#include "confdefs.h"
4565#include <stdlib.h>
4566int
4567main (void)
4568{
4569
4570#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4571make an error
4572#endif
4573  ;
4574  return 0;
4575}
4576_ACEOF
4577rm -f "conftest.$ac_objext"
4578if { (eval echo "$as_me:4578: \"$ac_compile\"") >&5
4579  (eval $ac_compile) 2>&5
4580  ac_status=$?
4581  echo "$as_me:4581: \$? = $ac_status" >&5
4582  (exit "$ac_status"); } &&
4583         { ac_try='test -s "conftest.$ac_objext"'
4584  { (eval echo "$as_me:4584: \"$ac_try\"") >&5
4585  (eval $ac_try) 2>&5
4586  ac_status=$?
4587  echo "$as_me:4587: \$? = $ac_status" >&5
4588  (exit "$ac_status"); }; }; then
4589  cf_XOPEN_SOURCE_set_ok=yes
4590else
4591  echo "$as_me: failed program was:" >&5
4592cat "conftest.$ac_ext" >&5
4593cf_XOPEN_SOURCE_set_ok=no
4594fi
4595rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4596		if test "$cf_XOPEN_SOURCE_set_ok" = no
4597		then
4598			{ echo "$as_me:4598: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4599echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4600		fi
4601	else
4602
4603echo "$as_me:4603: checking if we should define _XOPEN_SOURCE" >&5
4604echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4605if test "${cf_cv_xopen_source+set}" = set; then
4606  echo $ECHO_N "(cached) $ECHO_C" >&6
4607else
4608
4609	cat >"conftest.$ac_ext" <<_ACEOF
4610#line 4610 "configure"
4611#include "confdefs.h"
4612
4613#include <stdlib.h>
4614#include <string.h>
4615#include <sys/types.h>
4616
4617int
4618main (void)
4619{
4620
4621#ifndef _XOPEN_SOURCE
4622make an error
4623#endif
4624  ;
4625  return 0;
4626}
4627_ACEOF
4628rm -f "conftest.$ac_objext"
4629if { (eval echo "$as_me:4629: \"$ac_compile\"") >&5
4630  (eval $ac_compile) 2>&5
4631  ac_status=$?
4632  echo "$as_me:4632: \$? = $ac_status" >&5
4633  (exit "$ac_status"); } &&
4634         { ac_try='test -s "conftest.$ac_objext"'
4635  { (eval echo "$as_me:4635: \"$ac_try\"") >&5
4636  (eval $ac_try) 2>&5
4637  ac_status=$?
4638  echo "$as_me:4638: \$? = $ac_status" >&5
4639  (exit "$ac_status"); }; }; then
4640  cf_cv_xopen_source=no
4641else
4642  echo "$as_me: failed program was:" >&5
4643cat "conftest.$ac_ext" >&5
4644cf_save="$CPPFLAGS"
4645
4646	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4647	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4648
4649	 cat >"conftest.$ac_ext" <<_ACEOF
4650#line 4650 "configure"
4651#include "confdefs.h"
4652
4653#include <stdlib.h>
4654#include <string.h>
4655#include <sys/types.h>
4656
4657int
4658main (void)
4659{
4660
4661#ifdef _XOPEN_SOURCE
4662make an error
4663#endif
4664  ;
4665  return 0;
4666}
4667_ACEOF
4668rm -f "conftest.$ac_objext"
4669if { (eval echo "$as_me:4669: \"$ac_compile\"") >&5
4670  (eval $ac_compile) 2>&5
4671  ac_status=$?
4672  echo "$as_me:4672: \$? = $ac_status" >&5
4673  (exit "$ac_status"); } &&
4674         { ac_try='test -s "conftest.$ac_objext"'
4675  { (eval echo "$as_me:4675: \"$ac_try\"") >&5
4676  (eval $ac_try) 2>&5
4677  ac_status=$?
4678  echo "$as_me:4678: \$? = $ac_status" >&5
4679  (exit "$ac_status"); }; }; then
4680  cf_cv_xopen_source=no
4681else
4682  echo "$as_me: failed program was:" >&5
4683cat "conftest.$ac_ext" >&5
4684cf_cv_xopen_source=$cf_XOPEN_SOURCE
4685fi
4686rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4687	CPPFLAGS="$cf_save"
4688
4689fi
4690rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4691
4692fi
4693echo "$as_me:4693: result: $cf_cv_xopen_source" >&5
4694echo "${ECHO_T}$cf_cv_xopen_source" >&6
4695
4696if test "$cf_cv_xopen_source" != no ; then
4697
4698CFLAGS=`echo "$CFLAGS" | \
4699	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4700		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4701
4702CPPFLAGS=`echo "$CPPFLAGS" | \
4703	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4704		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4705
4706	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4707
4708for cf_add_cflags in $cf_temp_xopen_source
4709do
4710	case "x$cf_add_cflags" in
4711	(x-[DU]*)
4712
4713cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4714while true
4715do
4716	cf_old_cflag=`echo "x$CFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4717	test "$CFLAGS" != "$cf_old_cflag" || break
4718
4719	CFLAGS="$cf_old_cflag"
4720done
4721
4722cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4723while true
4724do
4725	cf_old_cflag=`echo "x$CPPFLAGS" | sed -e 's/^.//' -e 's/[ 	][ 	]*-/ -/g' -e "s%$cf_tmp_cflag\\(=[^ 	][^ 	]*\\)\?%%" -e 's/^[ 	]*//' -e 's%[ ][ ]*-D% -D%g' -e 's%[ ][ ]*-I% -I%g'`
4726	test "$CPPFLAGS" != "$cf_old_cflag" || break
4727
4728	CPPFLAGS="$cf_old_cflag"
4729done
4730
4731		;;
4732	esac
4733
4734cf_fix_cppflags=no
4735cf_new_cflags=
4736cf_new_cppflags=
4737cf_new_extra_cppflags=
4738
4739for cf_add_cflags in $cf_add_cflags
4740do
4741case "$cf_fix_cppflags" in
4742(no)
4743	case "$cf_add_cflags" in
4744	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4745		case "$cf_add_cflags" in
4746		(-D*)
4747			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4748
4749			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4750				&& test -z "${cf_tst_cflags}" \
4751				&& cf_fix_cppflags=yes
4752
4753			if test "$cf_fix_cppflags" = yes ; then
4754
4755	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4756	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4757
4758				continue
4759			elif test "${cf_tst_cflags}" = "\"'" ; then
4760
4761	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4762	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4763
4764				continue
4765			fi
4766			;;
4767		esac
4768		case "$CPPFLAGS" in
4769		(*$cf_add_cflags)
4770			;;
4771		(*)
4772			case "$cf_add_cflags" in
4773			(-D*)
4774				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4775
4776CPPFLAGS=`echo "$CPPFLAGS" | \
4777	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4778		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4779
4780				;;
4781			esac
4782
4783	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4784	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4785
4786			;;
4787		esac
4788		;;
4789	(*)
4790
4791	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4792	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4793
4794		;;
4795	esac
4796	;;
4797(yes)
4798
4799	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4800	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4801
4802	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4803
4804	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4805		&& test -z "${cf_tst_cflags}" \
4806		&& cf_fix_cppflags=no
4807	;;
4808esac
4809done
4810
4811if test -n "$cf_new_cflags" ; then
4812
4813	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4814	CFLAGS="${CFLAGS}$cf_new_cflags"
4815
4816fi
4817
4818if test -n "$cf_new_cppflags" ; then
4819
4820	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4821	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4822
4823fi
4824
4825if test -n "$cf_new_extra_cppflags" ; then
4826
4827	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4828	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4829
4830fi
4831
4832done
4833
4834fi
4835
4836	fi
4837fi
4838fi # cf_cv_posix_visible
4839
4840echo "$as_me:4840: checking if SIGWINCH is defined" >&5
4841echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4842if test "${cf_cv_define_sigwinch+set}" = set; then
4843  echo $ECHO_N "(cached) $ECHO_C" >&6
4844else
4845
4846	cat >"conftest.$ac_ext" <<_ACEOF
4847#line 4847 "configure"
4848#include "confdefs.h"
4849
4850#include <sys/types.h>
4851#include <sys/signal.h>
4852
4853int
4854main (void)
4855{
4856int x = SIGWINCH; (void)x
4857  ;
4858  return 0;
4859}
4860_ACEOF
4861rm -f "conftest.$ac_objext"
4862if { (eval echo "$as_me:4862: \"$ac_compile\"") >&5
4863  (eval $ac_compile) 2>&5
4864  ac_status=$?
4865  echo "$as_me:4865: \$? = $ac_status" >&5
4866  (exit "$ac_status"); } &&
4867         { ac_try='test -s "conftest.$ac_objext"'
4868  { (eval echo "$as_me:4868: \"$ac_try\"") >&5
4869  (eval $ac_try) 2>&5
4870  ac_status=$?
4871  echo "$as_me:4871: \$? = $ac_status" >&5
4872  (exit "$ac_status"); }; }; then
4873  cf_cv_define_sigwinch=yes
4874else
4875  echo "$as_me: failed program was:" >&5
4876cat "conftest.$ac_ext" >&5
4877cat >"conftest.$ac_ext" <<_ACEOF
4878#line 4878 "configure"
4879#include "confdefs.h"
4880
4881#undef _XOPEN_SOURCE
4882#undef _POSIX_SOURCE
4883#undef _POSIX_C_SOURCE
4884#include <sys/types.h>
4885#include <sys/signal.h>
4886
4887int
4888main (void)
4889{
4890int x = SIGWINCH; (void)x
4891  ;
4892  return 0;
4893}
4894_ACEOF
4895rm -f "conftest.$ac_objext"
4896if { (eval echo "$as_me:4896: \"$ac_compile\"") >&5
4897  (eval $ac_compile) 2>&5
4898  ac_status=$?
4899  echo "$as_me:4899: \$? = $ac_status" >&5
4900  (exit "$ac_status"); } &&
4901         { ac_try='test -s "conftest.$ac_objext"'
4902  { (eval echo "$as_me:4902: \"$ac_try\"") >&5
4903  (eval $ac_try) 2>&5
4904  ac_status=$?
4905  echo "$as_me:4905: \$? = $ac_status" >&5
4906  (exit "$ac_status"); }; }; then
4907  cf_cv_define_sigwinch=maybe
4908else
4909  echo "$as_me: failed program was:" >&5
4910cat "conftest.$ac_ext" >&5
4911cf_cv_define_sigwinch=no
4912fi
4913rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4914
4915fi
4916rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4917
4918fi
4919echo "$as_me:4919: result: $cf_cv_define_sigwinch" >&5
4920echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4921
4922if test "$cf_cv_define_sigwinch" = maybe ; then
4923echo "$as_me:4923: checking for actual SIGWINCH definition" >&5
4924echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4925if test "${cf_cv_fixup_sigwinch+set}" = set; then
4926  echo $ECHO_N "(cached) $ECHO_C" >&6
4927else
4928
4929cf_cv_fixup_sigwinch=unknown
4930cf_sigwinch=32
4931while test "$cf_sigwinch" != 1
4932do
4933	cat >"conftest.$ac_ext" <<_ACEOF
4934#line 4934 "configure"
4935#include "confdefs.h"
4936
4937#undef _XOPEN_SOURCE
4938#undef _POSIX_SOURCE
4939#undef _POSIX_C_SOURCE
4940#include <sys/types.h>
4941#include <sys/signal.h>
4942
4943int
4944main (void)
4945{
4946
4947#if SIGWINCH != $cf_sigwinch
4948make an error
4949#endif
4950int x = SIGWINCH; (void)x
4951  ;
4952  return 0;
4953}
4954_ACEOF
4955rm -f "conftest.$ac_objext"
4956if { (eval echo "$as_me:4956: \"$ac_compile\"") >&5
4957  (eval $ac_compile) 2>&5
4958  ac_status=$?
4959  echo "$as_me:4959: \$? = $ac_status" >&5
4960  (exit "$ac_status"); } &&
4961         { ac_try='test -s "conftest.$ac_objext"'
4962  { (eval echo "$as_me:4962: \"$ac_try\"") >&5
4963  (eval $ac_try) 2>&5
4964  ac_status=$?
4965  echo "$as_me:4965: \$? = $ac_status" >&5
4966  (exit "$ac_status"); }; }; then
4967  cf_cv_fixup_sigwinch=$cf_sigwinch
4968	 break
4969else
4970  echo "$as_me: failed program was:" >&5
4971cat "conftest.$ac_ext" >&5
4972fi
4973rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4974
4975cf_sigwinch="`expr "$cf_sigwinch" - 1`"
4976done
4977
4978fi
4979echo "$as_me:4979: result: $cf_cv_fixup_sigwinch" >&5
4980echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4981
4982	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4983		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4984	fi
4985fi
4986
4987###	checks for header files
4988
4989for ac_header in \
4990ncurses/curses.h \
4991ncurses/term.h \
4992stdlib.h \
4993sys/ptem.h sys/ttydefaults.h \
4994term.h \
4995termios.h \
4996unistd.h \
4997wchar.h \
4998
4999do
5000as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5001echo "$as_me:5001: checking for $ac_header" >&5
5002echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5003if eval "test \"\${$as_ac_Header+set}\" = set"; then
5004  echo $ECHO_N "(cached) $ECHO_C" >&6
5005else
5006  cat >"conftest.$ac_ext" <<_ACEOF
5007#line 5007 "configure"
5008#include "confdefs.h"
5009#include <$ac_header>
5010_ACEOF
5011if { (eval echo "$as_me:5011: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5012  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5013  ac_status=$?
5014  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5015  rm -f conftest.er1
5016  cat conftest.err >&5
5017  echo "$as_me:5017: \$? = $ac_status" >&5
5018  (exit "$ac_status"); } >/dev/null; then
5019  if test -s conftest.err; then
5020    ac_cpp_err=$ac_c_preproc_warn_flag
5021  else
5022    ac_cpp_err=
5023  fi
5024else
5025  ac_cpp_err=yes
5026fi
5027if test -z "$ac_cpp_err"; then
5028  eval "$as_ac_Header=yes"
5029else
5030  echo "$as_me: failed program was:" >&5
5031  cat "conftest.$ac_ext" >&5
5032  eval "$as_ac_Header=no"
5033fi
5034rm -f conftest.err "conftest.$ac_ext"
5035fi
5036echo "$as_me:5036: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5037echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5038if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5039  cat >>confdefs.h <<EOF
5040#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5041EOF
5042
5043fi
5044done
5045
5046echo "$as_me:5046: checking whether time.h and sys/time.h may both be included" >&5
5047echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5048if test "${ac_cv_header_time+set}" = set; then
5049  echo $ECHO_N "(cached) $ECHO_C" >&6
5050else
5051  cat >"conftest.$ac_ext" <<_ACEOF
5052#line 5052 "configure"
5053#include "confdefs.h"
5054#include <sys/types.h>
5055#include <sys/time.h>
5056#include <time.h>
5057
5058int
5059main (void)
5060{
5061if ((struct tm *) 0)
5062return 0;
5063  ;
5064  return 0;
5065}
5066_ACEOF
5067rm -f "conftest.$ac_objext"
5068if { (eval echo "$as_me:5068: \"$ac_compile\"") >&5
5069  (eval $ac_compile) 2>&5
5070  ac_status=$?
5071  echo "$as_me:5071: \$? = $ac_status" >&5
5072  (exit "$ac_status"); } &&
5073         { ac_try='test -s "conftest.$ac_objext"'
5074  { (eval echo "$as_me:5074: \"$ac_try\"") >&5
5075  (eval $ac_try) 2>&5
5076  ac_status=$?
5077  echo "$as_me:5077: \$? = $ac_status" >&5
5078  (exit "$ac_status"); }; }; then
5079  ac_cv_header_time=yes
5080else
5081  echo "$as_me: failed program was:" >&5
5082cat "conftest.$ac_ext" >&5
5083ac_cv_header_time=no
5084fi
5085rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5086fi
5087echo "$as_me:5087: result: $ac_cv_header_time" >&5
5088echo "${ECHO_T}$ac_cv_header_time" >&6
5089if test $ac_cv_header_time = yes; then
5090
5091cat >>confdefs.h <<\EOF
5092#define TIME_WITH_SYS_TIME 1
5093EOF
5094
5095fi
5096
5097echo "$as_me:5097: checking for nl_langinfo and CODESET" >&5
5098echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5099if test "${am_cv_langinfo_codeset+set}" = set; then
5100  echo $ECHO_N "(cached) $ECHO_C" >&6
5101else
5102  cat >"conftest.$ac_ext" <<_ACEOF
5103#line 5103 "configure"
5104#include "confdefs.h"
5105#include <langinfo.h>
5106int
5107main (void)
5108{
5109char* cs = nl_langinfo(CODESET); (void)cs
5110  ;
5111  return 0;
5112}
5113_ACEOF
5114rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5115if { (eval echo "$as_me:5115: \"$ac_link\"") >&5
5116  (eval $ac_link) 2>&5
5117  ac_status=$?
5118  echo "$as_me:5118: \$? = $ac_status" >&5
5119  (exit "$ac_status"); } &&
5120         { ac_try='test -s "conftest$ac_exeext"'
5121  { (eval echo "$as_me:5121: \"$ac_try\"") >&5
5122  (eval $ac_try) 2>&5
5123  ac_status=$?
5124  echo "$as_me:5124: \$? = $ac_status" >&5
5125  (exit "$ac_status"); }; }; then
5126  am_cv_langinfo_codeset=yes
5127else
5128  echo "$as_me: failed program was:" >&5
5129cat "conftest.$ac_ext" >&5
5130am_cv_langinfo_codeset=no
5131fi
5132rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5133
5134fi
5135echo "$as_me:5135: result: $am_cv_langinfo_codeset" >&5
5136echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5137	if test "$am_cv_langinfo_codeset" = yes; then
5138
5139cat >>confdefs.h <<\EOF
5140#define HAVE_LANGINFO_CODESET 1
5141EOF
5142
5143	fi
5144
5145###	checks for typedefs
5146
5147echo "$as_me:5147: checking for signal global datatype" >&5
5148echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5149if test "${cf_cv_sig_atomic_t+set}" = set; then
5150  echo $ECHO_N "(cached) $ECHO_C" >&6
5151else
5152
5153	for cf_type in \
5154		"volatile sig_atomic_t" \
5155		"sig_atomic_t" \
5156		"int"
5157	do
5158	cat >"conftest.$ac_ext" <<_ACEOF
5159#line 5159 "configure"
5160#include "confdefs.h"
5161
5162#include <sys/types.h>
5163#include <signal.h>
5164#include <stdio.h>
5165
5166extern $cf_type x;
5167$cf_type x;
5168static void handler(int sig)
5169{
5170	(void)sig;
5171	x = 5;
5172}
5173int
5174main (void)
5175{
5176signal(SIGINT, handler);
5177		 x = 1
5178  ;
5179  return 0;
5180}
5181_ACEOF
5182rm -f "conftest.$ac_objext"
5183if { (eval echo "$as_me:5183: \"$ac_compile\"") >&5
5184  (eval $ac_compile) 2>&5
5185  ac_status=$?
5186  echo "$as_me:5186: \$? = $ac_status" >&5
5187  (exit "$ac_status"); } &&
5188         { ac_try='test -s "conftest.$ac_objext"'
5189  { (eval echo "$as_me:5189: \"$ac_try\"") >&5
5190  (eval $ac_try) 2>&5
5191  ac_status=$?
5192  echo "$as_me:5192: \$? = $ac_status" >&5
5193  (exit "$ac_status"); }; }; then
5194  cf_cv_sig_atomic_t=$cf_type
5195else
5196  echo "$as_me: failed program was:" >&5
5197cat "conftest.$ac_ext" >&5
5198cf_cv_sig_atomic_t=no
5199fi
5200rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5201		test "$cf_cv_sig_atomic_t" != no && break
5202	done
5203
5204fi
5205
5206echo "$as_me:5206: result: $cf_cv_sig_atomic_t" >&5
5207echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5208test "$cf_cv_sig_atomic_t" != no &&
5209cat >>confdefs.h <<EOF
5210#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5211EOF
5212
5213echo "$as_me:5213: checking for ANSI C header files" >&5
5214echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5215if test "${ac_cv_header_stdc+set}" = set; then
5216  echo $ECHO_N "(cached) $ECHO_C" >&6
5217else
5218  cat >"conftest.$ac_ext" <<_ACEOF
5219#line 5219 "configure"
5220#include "confdefs.h"
5221#include <stdlib.h>
5222#include <stdarg.h>
5223#include <string.h>
5224#include <float.h>
5225
5226_ACEOF
5227if { (eval echo "$as_me:5227: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5228  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5229  ac_status=$?
5230  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5231  rm -f conftest.er1
5232  cat conftest.err >&5
5233  echo "$as_me:5233: \$? = $ac_status" >&5
5234  (exit "$ac_status"); } >/dev/null; then
5235  if test -s conftest.err; then
5236    ac_cpp_err=$ac_c_preproc_warn_flag
5237  else
5238    ac_cpp_err=
5239  fi
5240else
5241  ac_cpp_err=yes
5242fi
5243if test -z "$ac_cpp_err"; then
5244  ac_cv_header_stdc=yes
5245else
5246  echo "$as_me: failed program was:" >&5
5247  cat "conftest.$ac_ext" >&5
5248  ac_cv_header_stdc=no
5249fi
5250rm -f conftest.err "conftest.$ac_ext"
5251
5252if test $ac_cv_header_stdc = yes; then
5253  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5254  cat >"conftest.$ac_ext" <<_ACEOF
5255#line 5255 "configure"
5256#include "confdefs.h"
5257#include <string.h>
5258
5259_ACEOF
5260if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5261  $EGREP "memchr" >/dev/null 2>&1; then
5262  :
5263else
5264  ac_cv_header_stdc=no
5265fi
5266rm -rf conftest*
5267
5268fi
5269
5270if test $ac_cv_header_stdc = yes; then
5271  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5272  cat >"conftest.$ac_ext" <<_ACEOF
5273#line 5273 "configure"
5274#include "confdefs.h"
5275#include <stdlib.h>
5276
5277_ACEOF
5278if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5279  $EGREP "free" >/dev/null 2>&1; then
5280  :
5281else
5282  ac_cv_header_stdc=no
5283fi
5284rm -rf conftest*
5285
5286fi
5287
5288if test $ac_cv_header_stdc = yes; then
5289  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5290  if test "$cross_compiling" = yes; then
5291  :
5292else
5293  cat >"conftest.$ac_ext" <<_ACEOF
5294#line 5294 "configure"
5295#include "confdefs.h"
5296#include <ctype.h>
5297#if ((' ' & 0x0FF) == 0x020)
5298# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5299# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5300#else
5301# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5302                     || ('j' <= (c) && (c) <= 'r') \
5303                     || ('s' <= (c) && (c) <= 'z'))
5304# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5305#endif
5306
5307#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5308int
5309main (void)
5310{
5311  int i;
5312  for (i = 0; i < 256; i++)
5313    if (XOR (islower (i), ISLOWER (i))
5314        || toupper (i) != TOUPPER (i))
5315      $ac_main_return(2);
5316  $ac_main_return (0);
5317}
5318_ACEOF
5319rm -f "conftest$ac_exeext"
5320if { (eval echo "$as_me:5320: \"$ac_link\"") >&5
5321  (eval $ac_link) 2>&5
5322  ac_status=$?
5323  echo "$as_me:5323: \$? = $ac_status" >&5
5324  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5325  { (eval echo "$as_me:5325: \"$ac_try\"") >&5
5326  (eval $ac_try) 2>&5
5327  ac_status=$?
5328  echo "$as_me:5328: \$? = $ac_status" >&5
5329  (exit "$ac_status"); }; }; then
5330  :
5331else
5332  echo "$as_me: program exited with status $ac_status" >&5
5333echo "$as_me: failed program was:" >&5
5334cat "conftest.$ac_ext" >&5
5335ac_cv_header_stdc=no
5336fi
5337rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5338fi
5339fi
5340fi
5341echo "$as_me:5341: result: $ac_cv_header_stdc" >&5
5342echo "${ECHO_T}$ac_cv_header_stdc" >&6
5343if test $ac_cv_header_stdc = yes; then
5344
5345cat >>confdefs.h <<\EOF
5346#define STDC_HEADERS 1
5347EOF
5348
5349fi
5350
5351# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5352
5353for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5354                  inttypes.h stdint.h unistd.h
5355do
5356as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5357echo "$as_me:5357: checking for $ac_header" >&5
5358echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5359if eval "test \"\${$as_ac_Header+set}\" = set"; then
5360  echo $ECHO_N "(cached) $ECHO_C" >&6
5361else
5362  cat >"conftest.$ac_ext" <<_ACEOF
5363#line 5363 "configure"
5364#include "confdefs.h"
5365$ac_includes_default
5366#include <$ac_header>
5367_ACEOF
5368rm -f "conftest.$ac_objext"
5369if { (eval echo "$as_me:5369: \"$ac_compile\"") >&5
5370  (eval $ac_compile) 2>&5
5371  ac_status=$?
5372  echo "$as_me:5372: \$? = $ac_status" >&5
5373  (exit "$ac_status"); } &&
5374         { ac_try='test -s "conftest.$ac_objext"'
5375  { (eval echo "$as_me:5375: \"$ac_try\"") >&5
5376  (eval $ac_try) 2>&5
5377  ac_status=$?
5378  echo "$as_me:5378: \$? = $ac_status" >&5
5379  (exit "$ac_status"); }; }; then
5380  eval "$as_ac_Header=yes"
5381else
5382  echo "$as_me: failed program was:" >&5
5383cat "conftest.$ac_ext" >&5
5384eval "$as_ac_Header=no"
5385fi
5386rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5387fi
5388echo "$as_me:5388: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5389echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5390if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5391  cat >>confdefs.h <<EOF
5392#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5393EOF
5394
5395fi
5396done
5397
5398echo "$as_me:5398: checking for time_t" >&5
5399echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5400if test "${ac_cv_type_time_t+set}" = set; then
5401  echo $ECHO_N "(cached) $ECHO_C" >&6
5402else
5403  cat >"conftest.$ac_ext" <<_ACEOF
5404#line 5404 "configure"
5405#include "confdefs.h"
5406$ac_includes_default
5407int
5408main (void)
5409{
5410if ((time_t *) 0)
5411  return 0;
5412if (sizeof (time_t))
5413  return 0;
5414  ;
5415  return 0;
5416}
5417_ACEOF
5418rm -f "conftest.$ac_objext"
5419if { (eval echo "$as_me:5419: \"$ac_compile\"") >&5
5420  (eval $ac_compile) 2>&5
5421  ac_status=$?
5422  echo "$as_me:5422: \$? = $ac_status" >&5
5423  (exit "$ac_status"); } &&
5424         { ac_try='test -s "conftest.$ac_objext"'
5425  { (eval echo "$as_me:5425: \"$ac_try\"") >&5
5426  (eval $ac_try) 2>&5
5427  ac_status=$?
5428  echo "$as_me:5428: \$? = $ac_status" >&5
5429  (exit "$ac_status"); }; }; then
5430  ac_cv_type_time_t=yes
5431else
5432  echo "$as_me: failed program was:" >&5
5433cat "conftest.$ac_ext" >&5
5434ac_cv_type_time_t=no
5435fi
5436rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5437fi
5438echo "$as_me:5438: result: $ac_cv_type_time_t" >&5
5439echo "${ECHO_T}$ac_cv_type_time_t" >&6
5440if test "$ac_cv_type_time_t" = yes; then
5441  :
5442else
5443
5444cat >>confdefs.h <<EOF
5445#define time_t long
5446EOF
5447
5448fi
5449
5450echo "$as_me:5450: checking for cc_t in <termios.h> or <termio.h>" >&5
5451echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5452if test "${cf_cv_type_cc_t+set}" = set; then
5453  echo $ECHO_N "(cached) $ECHO_C" >&6
5454else
5455
5456	cat >"conftest.$ac_ext" <<_ACEOF
5457#line 5457 "configure"
5458#include "confdefs.h"
5459
5460#include <sys/types.h>
5461#if defined(HAVE_TERMIOS_H)
5462#include <termios.h>
5463#else
5464#include <termio.h>
5465#include <sys/ioctl.h>
5466#endif
5467
5468int
5469main (void)
5470{
5471cc_t x; (void)x
5472  ;
5473  return 0;
5474}
5475_ACEOF
5476rm -f "conftest.$ac_objext"
5477if { (eval echo "$as_me:5477: \"$ac_compile\"") >&5
5478  (eval $ac_compile) 2>&5
5479  ac_status=$?
5480  echo "$as_me:5480: \$? = $ac_status" >&5
5481  (exit "$ac_status"); } &&
5482         { ac_try='test -s "conftest.$ac_objext"'
5483  { (eval echo "$as_me:5483: \"$ac_try\"") >&5
5484  (eval $ac_try) 2>&5
5485  ac_status=$?
5486  echo "$as_me:5486: \$? = $ac_status" >&5
5487  (exit "$ac_status"); }; }; then
5488  cf_cv_type_cc_t=yes
5489else
5490  echo "$as_me: failed program was:" >&5
5491cat "conftest.$ac_ext" >&5
5492cf_cv_type_cc_t=no
5493fi
5494rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5495
5496fi
5497
5498echo "$as_me:5498: result: $cf_cv_type_cc_t" >&5
5499echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5500test $cf_cv_type_cc_t = no &&
5501cat >>confdefs.h <<\EOF
5502#define cc_t unsigned char
5503EOF
5504
5505echo "$as_me:5505: checking for mode_t" >&5
5506echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5507if test "${ac_cv_type_mode_t+set}" = set; then
5508  echo $ECHO_N "(cached) $ECHO_C" >&6
5509else
5510  cat >"conftest.$ac_ext" <<_ACEOF
5511#line 5511 "configure"
5512#include "confdefs.h"
5513$ac_includes_default
5514int
5515main (void)
5516{
5517if ((mode_t *) 0)
5518  return 0;
5519if (sizeof (mode_t))
5520  return 0;
5521  ;
5522  return 0;
5523}
5524_ACEOF
5525rm -f "conftest.$ac_objext"
5526if { (eval echo "$as_me:5526: \"$ac_compile\"") >&5
5527  (eval $ac_compile) 2>&5
5528  ac_status=$?
5529  echo "$as_me:5529: \$? = $ac_status" >&5
5530  (exit "$ac_status"); } &&
5531         { ac_try='test -s "conftest.$ac_objext"'
5532  { (eval echo "$as_me:5532: \"$ac_try\"") >&5
5533  (eval $ac_try) 2>&5
5534  ac_status=$?
5535  echo "$as_me:5535: \$? = $ac_status" >&5
5536  (exit "$ac_status"); }; }; then
5537  ac_cv_type_mode_t=yes
5538else
5539  echo "$as_me: failed program was:" >&5
5540cat "conftest.$ac_ext" >&5
5541ac_cv_type_mode_t=no
5542fi
5543rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5544fi
5545echo "$as_me:5545: result: $ac_cv_type_mode_t" >&5
5546echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5547if test "$ac_cv_type_mode_t" = yes; then
5548  :
5549else
5550
5551cat >>confdefs.h <<EOF
5552#define mode_t int
5553EOF
5554
5555fi
5556
5557echo "$as_me:5557: checking for pid_t" >&5
5558echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5559if test "${ac_cv_type_pid_t+set}" = set; then
5560  echo $ECHO_N "(cached) $ECHO_C" >&6
5561else
5562  cat >"conftest.$ac_ext" <<_ACEOF
5563#line 5563 "configure"
5564#include "confdefs.h"
5565$ac_includes_default
5566int
5567main (void)
5568{
5569if ((pid_t *) 0)
5570  return 0;
5571if (sizeof (pid_t))
5572  return 0;
5573  ;
5574  return 0;
5575}
5576_ACEOF
5577rm -f "conftest.$ac_objext"
5578if { (eval echo "$as_me:5578: \"$ac_compile\"") >&5
5579  (eval $ac_compile) 2>&5
5580  ac_status=$?
5581  echo "$as_me:5581: \$? = $ac_status" >&5
5582  (exit "$ac_status"); } &&
5583         { ac_try='test -s "conftest.$ac_objext"'
5584  { (eval echo "$as_me:5584: \"$ac_try\"") >&5
5585  (eval $ac_try) 2>&5
5586  ac_status=$?
5587  echo "$as_me:5587: \$? = $ac_status" >&5
5588  (exit "$ac_status"); }; }; then
5589  ac_cv_type_pid_t=yes
5590else
5591  echo "$as_me: failed program was:" >&5
5592cat "conftest.$ac_ext" >&5
5593ac_cv_type_pid_t=no
5594fi
5595rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5596fi
5597echo "$as_me:5597: result: $ac_cv_type_pid_t" >&5
5598echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5599if test "$ac_cv_type_pid_t" = yes; then
5600  :
5601else
5602
5603cat >>confdefs.h <<EOF
5604#define pid_t int
5605EOF
5606
5607fi
5608
5609echo "$as_me:5609: checking for uid_t in sys/types.h" >&5
5610echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5611if test "${ac_cv_type_uid_t+set}" = set; then
5612  echo $ECHO_N "(cached) $ECHO_C" >&6
5613else
5614  cat >"conftest.$ac_ext" <<_ACEOF
5615#line 5615 "configure"
5616#include "confdefs.h"
5617#include <sys/types.h>
5618
5619_ACEOF
5620if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5621  $EGREP "uid_t" >/dev/null 2>&1; then
5622  ac_cv_type_uid_t=yes
5623else
5624  ac_cv_type_uid_t=no
5625fi
5626rm -rf conftest*
5627
5628fi
5629echo "$as_me:5629: result: $ac_cv_type_uid_t" >&5
5630echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5631if test $ac_cv_type_uid_t = no; then
5632
5633cat >>confdefs.h <<\EOF
5634#define uid_t int
5635EOF
5636
5637cat >>confdefs.h <<\EOF
5638#define gid_t int
5639EOF
5640
5641fi
5642
5643echo "$as_me:5643: checking for off_t" >&5
5644echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5645if test "${ac_cv_type_off_t+set}" = set; then
5646  echo $ECHO_N "(cached) $ECHO_C" >&6
5647else
5648  cat >"conftest.$ac_ext" <<_ACEOF
5649#line 5649 "configure"
5650#include "confdefs.h"
5651$ac_includes_default
5652int
5653main (void)
5654{
5655if ((off_t *) 0)
5656  return 0;
5657if (sizeof (off_t))
5658  return 0;
5659  ;
5660  return 0;
5661}
5662_ACEOF
5663rm -f "conftest.$ac_objext"
5664if { (eval echo "$as_me:5664: \"$ac_compile\"") >&5
5665  (eval $ac_compile) 2>&5
5666  ac_status=$?
5667  echo "$as_me:5667: \$? = $ac_status" >&5
5668  (exit "$ac_status"); } &&
5669         { ac_try='test -s "conftest.$ac_objext"'
5670  { (eval echo "$as_me:5670: \"$ac_try\"") >&5
5671  (eval $ac_try) 2>&5
5672  ac_status=$?
5673  echo "$as_me:5673: \$? = $ac_status" >&5
5674  (exit "$ac_status"); }; }; then
5675  ac_cv_type_off_t=yes
5676else
5677  echo "$as_me: failed program was:" >&5
5678cat "conftest.$ac_ext" >&5
5679ac_cv_type_off_t=no
5680fi
5681rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5682fi
5683echo "$as_me:5683: result: $ac_cv_type_off_t" >&5
5684echo "${ECHO_T}$ac_cv_type_off_t" >&6
5685if test "$ac_cv_type_off_t" = yes; then
5686  :
5687else
5688
5689cat >>confdefs.h <<EOF
5690#define off_t long
5691EOF
5692
5693fi
5694
5695###	checks for library functions
5696
5697for ac_func in \
5698	gethostname \
5699	getusershell \
5700	endusershell \
5701	getlogin \
5702	initgroups \
5703	mkdtemp \
5704	putenv \
5705	unsetenv \
5706	sched_yield \
5707	setpgid \
5708	strftime \
5709	tcgetattr \
5710	waitpid \
5711	wcswidth \
5712	wcwidth
5713do
5714as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5715echo "$as_me:5715: checking for $ac_func" >&5
5716echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5717if eval "test \"\${$as_ac_var+set}\" = set"; then
5718  echo $ECHO_N "(cached) $ECHO_C" >&6
5719else
5720  cat >"conftest.$ac_ext" <<_ACEOF
5721#line 5721 "configure"
5722#include "confdefs.h"
5723#define $ac_func autoconf_temporary
5724#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5725#undef $ac_func
5726
5727#ifdef __cplusplus
5728extern "C"
5729#endif
5730
5731/* We use char because int might match the return type of a gcc2
5732   builtin and then its argument prototype would still apply.  */
5733char $ac_func (void);
5734
5735int
5736main (void)
5737{
5738
5739/* The GNU C library defines stubs for functions which it implements
5740    to always fail with ENOSYS.  Some functions are actually named
5741    something starting with __ and the normal name is an alias.  */
5742#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5743#error found stub for $ac_func
5744#endif
5745
5746	return $ac_func ();
5747  ;
5748  return 0;
5749}
5750_ACEOF
5751rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5752if { (eval echo "$as_me:5752: \"$ac_link\"") >&5
5753  (eval $ac_link) 2>&5
5754  ac_status=$?
5755  echo "$as_me:5755: \$? = $ac_status" >&5
5756  (exit "$ac_status"); } &&
5757         { ac_try='test -s "conftest$ac_exeext"'
5758  { (eval echo "$as_me:5758: \"$ac_try\"") >&5
5759  (eval $ac_try) 2>&5
5760  ac_status=$?
5761  echo "$as_me:5761: \$? = $ac_status" >&5
5762  (exit "$ac_status"); }; }; then
5763  eval "$as_ac_var=yes"
5764else
5765  echo "$as_me: failed program was:" >&5
5766cat "conftest.$ac_ext" >&5
5767eval "$as_ac_var=no"
5768fi
5769rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5770fi
5771echo "$as_me:5771: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5772echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5773if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5774  cat >>confdefs.h <<EOF
5775#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5776EOF
5777
5778fi
5779done
5780
5781for ac_header in lastlog.h paths.h
5782do
5783as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5784echo "$as_me:5784: checking for $ac_header" >&5
5785echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5786if eval "test \"\${$as_ac_Header+set}\" = set"; then
5787  echo $ECHO_N "(cached) $ECHO_C" >&6
5788else
5789  cat >"conftest.$ac_ext" <<_ACEOF
5790#line 5790 "configure"
5791#include "confdefs.h"
5792#include <$ac_header>
5793_ACEOF
5794if { (eval echo "$as_me:5794: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5795  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5796  ac_status=$?
5797  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5798  rm -f conftest.er1
5799  cat conftest.err >&5
5800  echo "$as_me:5800: \$? = $ac_status" >&5
5801  (exit "$ac_status"); } >/dev/null; then
5802  if test -s conftest.err; then
5803    ac_cpp_err=$ac_c_preproc_warn_flag
5804  else
5805    ac_cpp_err=
5806  fi
5807else
5808  ac_cpp_err=yes
5809fi
5810if test -z "$ac_cpp_err"; then
5811  eval "$as_ac_Header=yes"
5812else
5813  echo "$as_me: failed program was:" >&5
5814  cat "conftest.$ac_ext" >&5
5815  eval "$as_ac_Header=no"
5816fi
5817rm -f conftest.err "conftest.$ac_ext"
5818fi
5819echo "$as_me:5819: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5820echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5821if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5822  cat >>confdefs.h <<EOF
5823#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5824EOF
5825
5826fi
5827done
5828
5829echo "$as_me:5829: checking for lastlog path" >&5
5830echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
5831if test "${cf_cv_path_lastlog+set}" = set; then
5832  echo $ECHO_N "(cached) $ECHO_C" >&6
5833else
5834
5835cat >"conftest.$ac_ext" <<_ACEOF
5836#line 5836 "configure"
5837#include "confdefs.h"
5838
5839#include <sys/types.h>
5840#ifdef HAVE_LASTLOG_H
5841#include <lastlog.h>
5842#else
5843#ifdef HAVE_PATHS_H
5844#include <paths.h>
5845#endif
5846#endif
5847int
5848main (void)
5849{
5850char *path = _PATH_LASTLOG; (void)path
5851  ;
5852  return 0;
5853}
5854_ACEOF
5855rm -f "conftest.$ac_objext"
5856if { (eval echo "$as_me:5856: \"$ac_compile\"") >&5
5857  (eval $ac_compile) 2>&5
5858  ac_status=$?
5859  echo "$as_me:5859: \$? = $ac_status" >&5
5860  (exit "$ac_status"); } &&
5861         { ac_try='test -s "conftest.$ac_objext"'
5862  { (eval echo "$as_me:5862: \"$ac_try\"") >&5
5863  (eval $ac_try) 2>&5
5864  ac_status=$?
5865  echo "$as_me:5865: \$? = $ac_status" >&5
5866  (exit "$ac_status"); }; }; then
5867  cf_cv_path_lastlog="_PATH_LASTLOG"
5868else
5869  echo "$as_me: failed program was:" >&5
5870cat "conftest.$ac_ext" >&5
5871if test -f /usr/adm/lastlog ; then
5872	 	cf_cv_path_lastlog=/usr/adm/lastlog
5873	else
5874		cf_cv_path_lastlog=no
5875	fi
5876fi
5877rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5878
5879fi
5880echo "$as_me:5880: result: $cf_cv_path_lastlog" >&5
5881echo "${ECHO_T}$cf_cv_path_lastlog" >&6
5882test "$cf_cv_path_lastlog" != no &&
5883cat >>confdefs.h <<\EOF
5884#define USE_LASTLOG 1
5885EOF
5886
5887echo "$as_me:5887: checking for utmp implementation" >&5
5888echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
5889if test "${cf_cv_have_utmp+set}" = set; then
5890  echo $ECHO_N "(cached) $ECHO_C" >&6
5891else
5892
5893	cf_cv_have_utmp=no
5894for cf_header in utmpx utmp ; do
5895cf_utmp_includes="
5896#include <sys/types.h>
5897#include <${cf_header}.h>
5898#define getutent getutxent
5899#ifdef USE_LASTLOG
5900#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
5901#endif
5902"
5903	cat >"conftest.$ac_ext" <<_ACEOF
5904#line 5904 "configure"
5905#include "confdefs.h"
5906$cf_utmp_includes
5907int
5908main (void)
5909{
5910struct $cf_header x;
5911	 char *name = x.ut_name; /* utmp.h and compatible definitions */
5912	 (void)x;
5913	 (void)name;
5914
5915  ;
5916  return 0;
5917}
5918_ACEOF
5919rm -f "conftest.$ac_objext"
5920if { (eval echo "$as_me:5920: \"$ac_compile\"") >&5
5921  (eval $ac_compile) 2>&5
5922  ac_status=$?
5923  echo "$as_me:5923: \$? = $ac_status" >&5
5924  (exit "$ac_status"); } &&
5925         { ac_try='test -s "conftest.$ac_objext"'
5926  { (eval echo "$as_me:5926: \"$ac_try\"") >&5
5927  (eval $ac_try) 2>&5
5928  ac_status=$?
5929  echo "$as_me:5929: \$? = $ac_status" >&5
5930  (exit "$ac_status"); }; }; then
5931  cf_cv_have_utmp=$cf_header
5932	 break
5933else
5934  echo "$as_me: failed program was:" >&5
5935cat "conftest.$ac_ext" >&5
5936
5937	cat >"conftest.$ac_ext" <<_ACEOF
5938#line 5938 "configure"
5939#include "confdefs.h"
5940$cf_utmp_includes
5941int
5942main (void)
5943{
5944struct $cf_header x;
5945	 char *name = x.ut_user; /* utmpx.h must declare this */
5946	 (void)x;
5947	 (void)name;
5948
5949  ;
5950  return 0;
5951}
5952_ACEOF
5953rm -f "conftest.$ac_objext"
5954if { (eval echo "$as_me:5954: \"$ac_compile\"") >&5
5955  (eval $ac_compile) 2>&5
5956  ac_status=$?
5957  echo "$as_me:5957: \$? = $ac_status" >&5
5958  (exit "$ac_status"); } &&
5959         { ac_try='test -s "conftest.$ac_objext"'
5960  { (eval echo "$as_me:5960: \"$ac_try\"") >&5
5961  (eval $ac_try) 2>&5
5962  ac_status=$?
5963  echo "$as_me:5963: \$? = $ac_status" >&5
5964  (exit "$ac_status"); }; }; then
5965  cf_cv_have_utmp=$cf_header
5966	 break
5967
5968else
5969  echo "$as_me: failed program was:" >&5
5970cat "conftest.$ac_ext" >&5
5971fi
5972rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5973fi
5974rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5975done
5976
5977fi
5978echo "$as_me:5978: result: $cf_cv_have_utmp" >&5
5979echo "${ECHO_T}$cf_cv_have_utmp" >&6
5980
5981if test "$cf_cv_have_utmp" != no ; then
5982
5983cat >>confdefs.h <<\EOF
5984#define HAVE_UTMP 1
5985EOF
5986
5987	test "$cf_cv_have_utmp" = utmpx &&
5988cat >>confdefs.h <<\EOF
5989#define UTMPX_FOR_UTMP 1
5990EOF
5991
5992if test "$cf_cv_have_utmp" != no ; then
5993echo "$as_me:5993: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
5994echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
5995if test "${cf_cv_have_utmp_ut_host+set}" = set; then
5996  echo $ECHO_N "(cached) $ECHO_C" >&6
5997else
5998
5999	cat >"conftest.$ac_ext" <<_ACEOF
6000#line 6000 "configure"
6001#include "confdefs.h"
6002
6003#include <sys/types.h>
6004#include <${cf_cv_have_utmp}.h>
6005int
6006main (void)
6007{
6008struct $cf_cv_have_utmp x;
6009	 char *y = &x.ut_host[0];
6010	 (void)x;
6011	 (void)y
6012  ;
6013  return 0;
6014}
6015_ACEOF
6016rm -f "conftest.$ac_objext"
6017if { (eval echo "$as_me:6017: \"$ac_compile\"") >&5
6018  (eval $ac_compile) 2>&5
6019  ac_status=$?
6020  echo "$as_me:6020: \$? = $ac_status" >&5
6021  (exit "$ac_status"); } &&
6022         { ac_try='test -s "conftest.$ac_objext"'
6023  { (eval echo "$as_me:6023: \"$ac_try\"") >&5
6024  (eval $ac_try) 2>&5
6025  ac_status=$?
6026  echo "$as_me:6026: \$? = $ac_status" >&5
6027  (exit "$ac_status"); }; }; then
6028  cf_cv_have_utmp_ut_host=yes
6029else
6030  echo "$as_me: failed program was:" >&5
6031cat "conftest.$ac_ext" >&5
6032cf_cv_have_utmp_ut_host=no
6033fi
6034rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6035
6036fi
6037
6038echo "$as_me:6038: result: $cf_cv_have_utmp_ut_host" >&5
6039echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
6040test "$cf_cv_have_utmp_ut_host" != no &&
6041cat >>confdefs.h <<\EOF
6042#define HAVE_UTMP_UT_HOST 1
6043EOF
6044
6045fi
6046
6047if test "$cf_cv_have_utmp" != no ; then
6048echo "$as_me:6048: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
6049echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
6050if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
6051  echo $ECHO_N "(cached) $ECHO_C" >&6
6052else
6053
6054	cat >"conftest.$ac_ext" <<_ACEOF
6055#line 6055 "configure"
6056#include "confdefs.h"
6057
6058#include <sys/types.h>
6059#include <${cf_cv_have_utmp}.h>
6060int
6061main (void)
6062{
6063struct $cf_cv_have_utmp x;
6064	 int y = x.ut_syslen;
6065	 (void)x;
6066	 (void)y
6067  ;
6068  return 0;
6069}
6070_ACEOF
6071rm -f "conftest.$ac_objext"
6072if { (eval echo "$as_me:6072: \"$ac_compile\"") >&5
6073  (eval $ac_compile) 2>&5
6074  ac_status=$?
6075  echo "$as_me:6075: \$? = $ac_status" >&5
6076  (exit "$ac_status"); } &&
6077         { ac_try='test -s "conftest.$ac_objext"'
6078  { (eval echo "$as_me:6078: \"$ac_try\"") >&5
6079  (eval $ac_try) 2>&5
6080  ac_status=$?
6081  echo "$as_me:6081: \$? = $ac_status" >&5
6082  (exit "$ac_status"); }; }; then
6083  cf_cv_have_utmp_ut_syslen=yes
6084else
6085  echo "$as_me: failed program was:" >&5
6086cat "conftest.$ac_ext" >&5
6087cf_cv_have_utmp_ut_syslen=no
6088fi
6089rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6090
6091fi
6092
6093echo "$as_me:6093: result: $cf_cv_have_utmp_ut_syslen" >&5
6094echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
6095test "$cf_cv_have_utmp_ut_syslen" != no &&
6096cat >>confdefs.h <<\EOF
6097#define HAVE_UTMP_UT_SYSLEN 1
6098EOF
6099
6100fi
6101
6102if test "$cf_cv_have_utmp" != no ; then
6103echo "$as_me:6103: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6104echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6105if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6106  echo $ECHO_N "(cached) $ECHO_C" >&6
6107else
6108
6109	cf_cv_have_utmp_ut_name=no
6110cf_utmp_includes="
6111#include <sys/types.h>
6112#include <${cf_cv_have_utmp}.h>
6113#define getutent getutxent
6114#ifdef USE_LASTLOG
6115#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
6116#endif
6117"
6118for cf_header in ut_name ut_user ; do
6119	cat >"conftest.$ac_ext" <<_ACEOF
6120#line 6120 "configure"
6121#include "confdefs.h"
6122$cf_utmp_includes
6123int
6124main (void)
6125{
6126struct $cf_cv_have_utmp x;
6127	 char *name = x.$cf_header;
6128	 (void)x;
6129	 (void)name;
6130
6131  ;
6132  return 0;
6133}
6134_ACEOF
6135rm -f "conftest.$ac_objext"
6136if { (eval echo "$as_me:6136: \"$ac_compile\"") >&5
6137  (eval $ac_compile) 2>&5
6138  ac_status=$?
6139  echo "$as_me:6139: \$? = $ac_status" >&5
6140  (exit "$ac_status"); } &&
6141         { ac_try='test -s "conftest.$ac_objext"'
6142  { (eval echo "$as_me:6142: \"$ac_try\"") >&5
6143  (eval $ac_try) 2>&5
6144  ac_status=$?
6145  echo "$as_me:6145: \$? = $ac_status" >&5
6146  (exit "$ac_status"); }; }; then
6147  cf_cv_have_utmp_ut_name=$cf_header
6148	 break
6149else
6150  echo "$as_me: failed program was:" >&5
6151cat "conftest.$ac_ext" >&5
6152fi
6153rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6154done
6155
6156fi
6157echo "$as_me:6157: result: $cf_cv_have_utmp_ut_name" >&5
6158echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6159
6160case "$cf_cv_have_utmp_ut_name" in
6161(no)
6162	{ { echo "$as_me:6162: error: Cannot find declaration for ut.ut_name" >&5
6163echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6164   { (exit 1); exit 1; }; }
6165	;;
6166(ut_user)
6167
6168cat >>confdefs.h <<\EOF
6169#define ut_name ut_user
6170EOF
6171
6172	;;
6173esac
6174fi
6175
6176if test "$cf_cv_have_utmp" != no ; then
6177echo "$as_me:6177: checking for exit-status in $cf_cv_have_utmp" >&5
6178echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6179if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6180  echo $ECHO_N "(cached) $ECHO_C" >&6
6181else
6182
6183for cf_result in \
6184	ut_exit.__e_exit \
6185	ut_exit.e_exit \
6186	ut_exit.ut_e_exit \
6187	ut_exit.ut_exit
6188do
6189cat >"conftest.$ac_ext" <<_ACEOF
6190#line 6190 "configure"
6191#include "confdefs.h"
6192
6193#include <sys/types.h>
6194#include <${cf_cv_have_utmp}.h>
6195int
6196main (void)
6197{
6198struct $cf_cv_have_utmp x;
6199	 long y = x.$cf_result = 0;
6200	 (void)x;
6201	 (void)y
6202  ;
6203  return 0;
6204}
6205_ACEOF
6206rm -f "conftest.$ac_objext"
6207if { (eval echo "$as_me:6207: \"$ac_compile\"") >&5
6208  (eval $ac_compile) 2>&5
6209  ac_status=$?
6210  echo "$as_me:6210: \$? = $ac_status" >&5
6211  (exit "$ac_status"); } &&
6212         { ac_try='test -s "conftest.$ac_objext"'
6213  { (eval echo "$as_me:6213: \"$ac_try\"") >&5
6214  (eval $ac_try) 2>&5
6215  ac_status=$?
6216  echo "$as_me:6216: \$? = $ac_status" >&5
6217  (exit "$ac_status"); }; }; then
6218  cf_cv_have_utmp_ut_xstatus=$cf_result
6219	 break
6220else
6221  echo "$as_me: failed program was:" >&5
6222cat "conftest.$ac_ext" >&5
6223cf_cv_have_utmp_ut_xstatus=no
6224fi
6225rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6226done
6227
6228fi
6229echo "$as_me:6229: result: $cf_cv_have_utmp_ut_xstatus" >&5
6230echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6231if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6232
6233cat >>confdefs.h <<\EOF
6234#define HAVE_UTMP_UT_XSTATUS 1
6235EOF
6236
6237cat >>confdefs.h <<EOF
6238#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
6239EOF
6240
6241fi
6242fi
6243
6244if test "$cf_cv_have_utmp" != no ; then
6245echo "$as_me:6245: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
6246echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
6247if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
6248  echo $ECHO_N "(cached) $ECHO_C" >&6
6249else
6250
6251	cat >"conftest.$ac_ext" <<_ACEOF
6252#line 6252 "configure"
6253#include "confdefs.h"
6254
6255#include <sys/types.h>
6256#include <${cf_cv_have_utmp}.h>
6257int
6258main (void)
6259{
6260struct $cf_cv_have_utmp x;
6261	 long y = x.ut_xtime = 0;
6262	 (void)x;
6263	 (void)y
6264  ;
6265  return 0;
6266}
6267_ACEOF
6268rm -f "conftest.$ac_objext"
6269if { (eval echo "$as_me:6269: \"$ac_compile\"") >&5
6270  (eval $ac_compile) 2>&5
6271  ac_status=$?
6272  echo "$as_me:6272: \$? = $ac_status" >&5
6273  (exit "$ac_status"); } &&
6274         { ac_try='test -s "conftest.$ac_objext"'
6275  { (eval echo "$as_me:6275: \"$ac_try\"") >&5
6276  (eval $ac_try) 2>&5
6277  ac_status=$?
6278  echo "$as_me:6278: \$? = $ac_status" >&5
6279  (exit "$ac_status"); }; }; then
6280  cf_cv_have_utmp_ut_xtime=yes
6281else
6282  echo "$as_me: failed program was:" >&5
6283cat "conftest.$ac_ext" >&5
6284cat >"conftest.$ac_ext" <<_ACEOF
6285#line 6285 "configure"
6286#include "confdefs.h"
6287
6288#include <sys/types.h>
6289#include <${cf_cv_have_utmp}.h>
6290int
6291main (void)
6292{
6293struct $cf_cv_have_utmp x;
6294	 long y = x.ut_tv.tv_sec;
6295	 (void)x;
6296	 (void)y
6297  ;
6298  return 0;
6299}
6300_ACEOF
6301rm -f "conftest.$ac_objext"
6302if { (eval echo "$as_me:6302: \"$ac_compile\"") >&5
6303  (eval $ac_compile) 2>&5
6304  ac_status=$?
6305  echo "$as_me:6305: \$? = $ac_status" >&5
6306  (exit "$ac_status"); } &&
6307         { ac_try='test -s "conftest.$ac_objext"'
6308  { (eval echo "$as_me:6308: \"$ac_try\"") >&5
6309  (eval $ac_try) 2>&5
6310  ac_status=$?
6311  echo "$as_me:6311: \$? = $ac_status" >&5
6312  (exit "$ac_status"); }; }; then
6313  cf_cv_have_utmp_ut_xtime=define
6314else
6315  echo "$as_me: failed program was:" >&5
6316cat "conftest.$ac_ext" >&5
6317cf_cv_have_utmp_ut_xtime=no
6318fi
6319rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6320
6321fi
6322rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6323
6324fi
6325echo "$as_me:6325: result: $cf_cv_have_utmp_ut_xtime" >&5
6326echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
6327if test "$cf_cv_have_utmp_ut_xtime" != no ; then
6328
6329cat >>confdefs.h <<\EOF
6330#define HAVE_UTMP_UT_XTIME 1
6331EOF
6332
6333	if test "$cf_cv_have_utmp_ut_xtime" = define ; then
6334
6335cat >>confdefs.h <<\EOF
6336#define ut_xtime ut_tv.tv_sec
6337EOF
6338
6339	fi
6340fi
6341fi
6342
6343if test "$cf_cv_have_utmp" != no ; then
6344echo "$as_me:6344: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
6345echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
6346if test "${cf_cv_have_utmp_ut_session+set}" = set; then
6347  echo $ECHO_N "(cached) $ECHO_C" >&6
6348else
6349
6350	cat >"conftest.$ac_ext" <<_ACEOF
6351#line 6351 "configure"
6352#include "confdefs.h"
6353
6354#include <sys/types.h>
6355#include <${cf_cv_have_utmp}.h>
6356int
6357main (void)
6358{
6359static struct $cf_cv_have_utmp x;
6360	 long y = x.ut_session;
6361	 (void)x;
6362	 (void)y
6363  ;
6364  return 0;
6365}
6366_ACEOF
6367rm -f "conftest.$ac_objext"
6368if { (eval echo "$as_me:6368: \"$ac_compile\"") >&5
6369  (eval $ac_compile) 2>&5
6370  ac_status=$?
6371  echo "$as_me:6371: \$? = $ac_status" >&5
6372  (exit "$ac_status"); } &&
6373         { ac_try='test -s "conftest.$ac_objext"'
6374  { (eval echo "$as_me:6374: \"$ac_try\"") >&5
6375  (eval $ac_try) 2>&5
6376  ac_status=$?
6377  echo "$as_me:6377: \$? = $ac_status" >&5
6378  (exit "$ac_status"); }; }; then
6379  cf_cv_have_utmp_ut_session=yes
6380else
6381  echo "$as_me: failed program was:" >&5
6382cat "conftest.$ac_ext" >&5
6383cf_cv_have_utmp_ut_session=no
6384fi
6385rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6386
6387fi
6388echo "$as_me:6388: result: $cf_cv_have_utmp_ut_session" >&5
6389echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
6390if test "$cf_cv_have_utmp_ut_session" != no ; then
6391
6392cat >>confdefs.h <<\EOF
6393#define HAVE_UTMP_UT_SESSION 1
6394EOF
6395
6396fi
6397fi
6398
6399echo "$as_me:6399: checking if $cf_cv_have_utmp is SYSV flavor" >&5
6400echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
6401if test "${cf_cv_sysv_utmp+set}" = set; then
6402  echo $ECHO_N "(cached) $ECHO_C" >&6
6403else
6404
6405test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
6406cat >"conftest.$ac_ext" <<_ACEOF
6407#line 6407 "configure"
6408#include "confdefs.h"
6409
6410#include <sys/types.h>
6411#include <${cf_cv_have_utmp}.h>
6412int
6413main (void)
6414{
6415
6416struct $cf_cv_have_utmp x;
6417	set${cf_prefix}ent ();
6418	get${cf_prefix}id(&x);
6419	put${cf_prefix}line(&x);
6420	end${cf_prefix}ent();
6421  ;
6422  return 0;
6423}
6424_ACEOF
6425rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6426if { (eval echo "$as_me:6426: \"$ac_link\"") >&5
6427  (eval $ac_link) 2>&5
6428  ac_status=$?
6429  echo "$as_me:6429: \$? = $ac_status" >&5
6430  (exit "$ac_status"); } &&
6431         { ac_try='test -s "conftest$ac_exeext"'
6432  { (eval echo "$as_me:6432: \"$ac_try\"") >&5
6433  (eval $ac_try) 2>&5
6434  ac_status=$?
6435  echo "$as_me:6435: \$? = $ac_status" >&5
6436  (exit "$ac_status"); }; }; then
6437  cf_cv_sysv_utmp=yes
6438else
6439  echo "$as_me: failed program was:" >&5
6440cat "conftest.$ac_ext" >&5
6441cf_cv_sysv_utmp=no
6442fi
6443rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6444
6445fi
6446echo "$as_me:6446: result: $cf_cv_sysv_utmp" >&5
6447echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
6448test "$cf_cv_sysv_utmp" = yes &&
6449cat >>confdefs.h <<\EOF
6450#define USE_SYSV_UTMP 1
6451EOF
6452
6453fi
6454
6455for ac_header in lastlog.h
6456do
6457as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6458echo "$as_me:6458: checking for $ac_header" >&5
6459echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6460if eval "test \"\${$as_ac_Header+set}\" = set"; then
6461  echo $ECHO_N "(cached) $ECHO_C" >&6
6462else
6463  cat >"conftest.$ac_ext" <<_ACEOF
6464#line 6464 "configure"
6465#include "confdefs.h"
6466#include <$ac_header>
6467_ACEOF
6468if { (eval echo "$as_me:6468: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6469  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6470  ac_status=$?
6471  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6472  rm -f conftest.er1
6473  cat conftest.err >&5
6474  echo "$as_me:6474: \$? = $ac_status" >&5
6475  (exit "$ac_status"); } >/dev/null; then
6476  if test -s conftest.err; then
6477    ac_cpp_err=$ac_c_preproc_warn_flag
6478  else
6479    ac_cpp_err=
6480  fi
6481else
6482  ac_cpp_err=yes
6483fi
6484if test -z "$ac_cpp_err"; then
6485  eval "$as_ac_Header=yes"
6486else
6487  echo "$as_me: failed program was:" >&5
6488  cat "conftest.$ac_ext" >&5
6489  eval "$as_ac_Header=no"
6490fi
6491rm -f conftest.err "conftest.$ac_ext"
6492fi
6493echo "$as_me:6493: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6494echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6495if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6496  cat >>confdefs.h <<EOF
6497#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6498EOF
6499
6500fi
6501done
6502
6503echo "$as_me:6503: checking for struct lastlog" >&5
6504echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
6505if test "${cf_cv_struct_lastlog+set}" = set; then
6506  echo $ECHO_N "(cached) $ECHO_C" >&6
6507else
6508
6509if test "$cross_compiling" = yes; then
6510
6511cf_cv_struct_lastlog=unknown
6512else
6513  cat >"conftest.$ac_ext" <<_ACEOF
6514#line 6514 "configure"
6515#include "confdefs.h"
6516
6517#include <sys/types.h>
6518#include <time.h>
6519#include <lastlog.h>
6520
6521int main(void)
6522{
6523	struct lastlog data;
6524	return (sizeof(data.ll_time) != sizeof(time_t));
6525}
6526_ACEOF
6527rm -f "conftest$ac_exeext"
6528if { (eval echo "$as_me:6528: \"$ac_link\"") >&5
6529  (eval $ac_link) 2>&5
6530  ac_status=$?
6531  echo "$as_me:6531: \$? = $ac_status" >&5
6532  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6533  { (eval echo "$as_me:6533: \"$ac_try\"") >&5
6534  (eval $ac_try) 2>&5
6535  ac_status=$?
6536  echo "$as_me:6536: \$? = $ac_status" >&5
6537  (exit "$ac_status"); }; }; then
6538
6539cf_cv_struct_lastlog=yes
6540else
6541  echo "$as_me: program exited with status $ac_status" >&5
6542echo "$as_me: failed program was:" >&5
6543cat "conftest.$ac_ext" >&5
6544
6545cf_cv_struct_lastlog=no
6546fi
6547rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6548fi
6549fi
6550echo "$as_me:6550: result: $cf_cv_struct_lastlog" >&5
6551echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
6552
6553test $cf_cv_struct_lastlog != no &&
6554cat >>confdefs.h <<\EOF
6555#define USE_STRUCT_LASTLOG 1
6556EOF
6557
6558for ac_header in \
6559sys/param.h \
6560
6561do
6562as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6563echo "$as_me:6563: checking for $ac_header" >&5
6564echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6565if eval "test \"\${$as_ac_Header+set}\" = set"; then
6566  echo $ECHO_N "(cached) $ECHO_C" >&6
6567else
6568  cat >"conftest.$ac_ext" <<_ACEOF
6569#line 6569 "configure"
6570#include "confdefs.h"
6571#include <$ac_header>
6572_ACEOF
6573if { (eval echo "$as_me:6573: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6574  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6575  ac_status=$?
6576  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6577  rm -f conftest.er1
6578  cat conftest.err >&5
6579  echo "$as_me:6579: \$? = $ac_status" >&5
6580  (exit "$ac_status"); } >/dev/null; then
6581  if test -s conftest.err; then
6582    ac_cpp_err=$ac_c_preproc_warn_flag
6583  else
6584    ac_cpp_err=
6585  fi
6586else
6587  ac_cpp_err=yes
6588fi
6589if test -z "$ac_cpp_err"; then
6590  eval "$as_ac_Header=yes"
6591else
6592  echo "$as_me: failed program was:" >&5
6593  cat "conftest.$ac_ext" >&5
6594  eval "$as_ac_Header=no"
6595fi
6596rm -f conftest.err "conftest.$ac_ext"
6597fi
6598echo "$as_me:6598: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6599echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6600if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6601  cat >>confdefs.h <<EOF
6602#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6603EOF
6604
6605fi
6606done
6607
6608echo "$as_me:6608: checking if POSIX saved-ids are supported" >&5
6609echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
6610if test "${cf_cv_posix_saved_ids+set}" = set; then
6611  echo $ECHO_N "(cached) $ECHO_C" >&6
6612else
6613
6614cat >"conftest.$ac_ext" <<_ACEOF
6615#line 6615 "configure"
6616#include "confdefs.h"
6617
6618#include <unistd.h>
6619#ifdef HAVE_SYS_PARAM_H
6620#include <sys/param.h>		/* this may define "BSD" */
6621#endif
6622
6623int
6624main (void)
6625{
6626
6627#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
6628	void *p = (void *) seteuid;
6629	int x = seteuid(geteuid());
6630	(void)p;
6631	(void)x;
6632#elif defined(BSD) && (BSD >= 199103)
6633/* The BSD's may implement the runtime check - and it fails.
6634 * However, saved-ids work almost like POSIX (close enough for most uses).
6635 */
6636#else
6637make an error
6638#endif
6639
6640  ;
6641  return 0;
6642}
6643_ACEOF
6644rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6645if { (eval echo "$as_me:6645: \"$ac_link\"") >&5
6646  (eval $ac_link) 2>&5
6647  ac_status=$?
6648  echo "$as_me:6648: \$? = $ac_status" >&5
6649  (exit "$ac_status"); } &&
6650         { ac_try='test -s "conftest$ac_exeext"'
6651  { (eval echo "$as_me:6651: \"$ac_try\"") >&5
6652  (eval $ac_try) 2>&5
6653  ac_status=$?
6654  echo "$as_me:6654: \$? = $ac_status" >&5
6655  (exit "$ac_status"); }; }; then
6656  cf_cv_posix_saved_ids=yes
6657
6658else
6659  echo "$as_me: failed program was:" >&5
6660cat "conftest.$ac_ext" >&5
6661
6662if test "$cross_compiling" = yes; then
6663  cf_cv_posix_saved_ids=unknown
6664else
6665  cat >"conftest.$ac_ext" <<_ACEOF
6666#line 6666 "configure"
6667#include "confdefs.h"
6668
6669#ifdef HAVE_STDLIB_H
6670#include <stdlib.h>
6671#endif
6672#include <unistd.h>
6673int main(void)
6674{
6675	void *p = (void *) seteuid;
6676	long code = sysconf(_SC_SAVED_IDS);
6677	(void)p;
6678	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
6679}
6680_ACEOF
6681rm -f "conftest$ac_exeext"
6682if { (eval echo "$as_me:6682: \"$ac_link\"") >&5
6683  (eval $ac_link) 2>&5
6684  ac_status=$?
6685  echo "$as_me:6685: \$? = $ac_status" >&5
6686  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6687  { (eval echo "$as_me:6687: \"$ac_try\"") >&5
6688  (eval $ac_try) 2>&5
6689  ac_status=$?
6690  echo "$as_me:6690: \$? = $ac_status" >&5
6691  (exit "$ac_status"); }; }; then
6692  cf_cv_posix_saved_ids=yes
6693else
6694  echo "$as_me: program exited with status $ac_status" >&5
6695echo "$as_me: failed program was:" >&5
6696cat "conftest.$ac_ext" >&5
6697cf_cv_posix_saved_ids=no
6698fi
6699rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6700fi
6701
6702fi
6703rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6704
6705fi
6706echo "$as_me:6706: result: $cf_cv_posix_saved_ids" >&5
6707echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
6708
6709test "$cf_cv_posix_saved_ids" = yes &&
6710cat >>confdefs.h <<\EOF
6711#define HAVE_POSIX_SAVED_IDS 1
6712EOF
6713
6714# compute a reasonable value for $TERM to give tgetent(), since we may be
6715# running in 'screen', which sets $TERMCAP to a specific entry that is not
6716# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
6717# discard $TERMCAP.
6718cf_TERMVAR=vt100
6719if test -n "$TERMCAP"
6720then
6721	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
6722	case "$cf_TERMCAP" in
6723	(screen*.*)
6724		;;
6725	(*)
6726		cf_TERMVAR="$cf_TERMCAP"
6727		;;
6728	esac
6729fi
6730test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
6731
6732# BSD termcap used no header file
6733# SVr4 provided termcap prototypes as a legacy feature in term.h
6734# GNU termcap provided termcap prototypes in termcap.h
6735# ncurses provides termcap prototypes in both term.h and termcap.h
6736#
6737# The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
6738# not return the text of the termcap entry in the buffer), but as a special
6739# case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
6740# returns the termcap text.
6741
6742for ac_header in termcap.h
6743do
6744as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6745echo "$as_me:6745: checking for $ac_header" >&5
6746echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6747if eval "test \"\${$as_ac_Header+set}\" = set"; then
6748  echo $ECHO_N "(cached) $ECHO_C" >&6
6749else
6750  cat >"conftest.$ac_ext" <<_ACEOF
6751#line 6751 "configure"
6752#include "confdefs.h"
6753#include <$ac_header>
6754_ACEOF
6755if { (eval echo "$as_me:6755: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6756  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6757  ac_status=$?
6758  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6759  rm -f conftest.er1
6760  cat conftest.err >&5
6761  echo "$as_me:6761: \$? = $ac_status" >&5
6762  (exit "$ac_status"); } >/dev/null; then
6763  if test -s conftest.err; then
6764    ac_cpp_err=$ac_c_preproc_warn_flag
6765  else
6766    ac_cpp_err=
6767  fi
6768else
6769  ac_cpp_err=yes
6770fi
6771if test -z "$ac_cpp_err"; then
6772  eval "$as_ac_Header=yes"
6773else
6774  echo "$as_me: failed program was:" >&5
6775  cat "conftest.$ac_ext" >&5
6776  eval "$as_ac_Header=no"
6777fi
6778rm -f conftest.err "conftest.$ac_ext"
6779fi
6780echo "$as_me:6780: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6781echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6782if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6783  cat >>confdefs.h <<EOF
6784#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6785EOF
6786
6787fi
6788done
6789
6790echo "$as_me:6790: checking if we want full tgetent function" >&5
6791echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
6792
6793# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
6794if test "${enable_full_tgetent+set}" = set; then
6795  enableval="$enable_full_tgetent"
6796  test "$enableval" != no && enableval=yes
6797	if test "$enableval" != "yes" ; then
6798    cf_full_tgetent=no
6799	else
6800		cf_full_tgetent=yes
6801	fi
6802else
6803  enableval=yes
6804	cf_full_tgetent=yes
6805
6806fi;
6807echo "$as_me:6807: result: $cf_full_tgetent" >&5
6808echo "${ECHO_T}$cf_full_tgetent" >&6
6809
6810if test "$cf_full_tgetent" = yes ; then
6811	cf_test_message="full tgetent"
6812else
6813	cf_test_message="tgetent"
6814fi
6815
6816echo "$as_me:6816: checking for $cf_test_message function" >&5
6817echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
6818if test "${cf_cv_lib_tgetent+set}" = set; then
6819  echo $ECHO_N "(cached) $ECHO_C" >&6
6820else
6821
6822cf_save_LIBS="$LIBS"
6823cf_cv_lib_tgetent=no
6824if test "$cf_full_tgetent" = yes ; then
6825	cf_TERMLIB="otermcap termcap termlib ncurses curses"
6826	cf_TERMTST="buffer[0] == 0"
6827else
6828	cf_TERMLIB="termlib ncurses curses"
6829	cf_TERMTST="0"
6830fi
6831for cf_termlib in '' $cf_TERMLIB ; do
6832	LIBS="$cf_save_LIBS"
6833	test -n "$cf_termlib" && {
6834cf_add_libs="$LIBS"
6835# reverse order
6836cf_add_0lib=
6837for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6838# filter duplicates
6839for cf_add_1lib in $cf_add_0lib; do
6840	for cf_add_2lib in $cf_add_libs; do
6841		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6842			cf_add_1lib=
6843			break
6844		fi
6845	done
6846	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6847done
6848LIBS="$cf_add_libs"
6849 }
6850	if test "$cross_compiling" = yes; then
6851  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
6852else
6853  cat >"conftest.$ac_ext" <<_ACEOF
6854#line 6854 "configure"
6855#include "confdefs.h"
6856
6857#ifdef HAVE_TERMCAP_H
6858#include <termcap.h>
6859#endif
6860/* terminfo implementations ignore the buffer argument, making it useless for
6861 * the xterm application, which uses this information to make a new TERMCAP
6862 * environment variable.
6863 */
6864int main(void)
6865{
6866	char buffer[1024];
6867	buffer[0] = 0;
6868	tgetent(buffer, "$cf_TERMVAR");
6869	${cf_cv_main_return:-return} ($cf_TERMTST); }
6870_ACEOF
6871rm -f "conftest$ac_exeext"
6872if { (eval echo "$as_me:6872: \"$ac_link\"") >&5
6873  (eval $ac_link) 2>&5
6874  ac_status=$?
6875  echo "$as_me:6875: \$? = $ac_status" >&5
6876  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6877  { (eval echo "$as_me:6877: \"$ac_try\"") >&5
6878  (eval $ac_try) 2>&5
6879  ac_status=$?
6880  echo "$as_me:6880: \$? = $ac_status" >&5
6881  (exit "$ac_status"); }; }; then
6882  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
6883	 if test -n "$cf_termlib" ; then
6884	 	cf_cv_lib_tgetent="-l$cf_termlib"
6885	 else
6886	 	cf_cv_lib_tgetent=yes
6887	 fi
6888	 break
6889else
6890  echo "$as_me: program exited with status $ac_status" >&5
6891echo "$as_me: failed program was:" >&5
6892cat "conftest.$ac_ext" >&5
6893echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
6894fi
6895rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6896fi
6897done
6898LIBS="$cf_save_LIBS"
6899
6900fi
6901echo "$as_me:6901: result: $cf_cv_lib_tgetent" >&5
6902echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
6903
6904# If we found a working tgetent(), set LIBS and check for termcap.h.
6905# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
6906# not have side effects other than setting the cache variable, because
6907# they are not executed when a cached value exists.)
6908if test "x$cf_cv_lib_tgetent" != xno ; then
6909	test "x$cf_cv_lib_tgetent" != xyes && {
6910cf_add_libs="$LIBS"
6911# reverse order
6912cf_add_0lib=
6913for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6914# filter duplicates
6915for cf_add_1lib in $cf_add_0lib; do
6916	for cf_add_2lib in $cf_add_libs; do
6917		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6918			cf_add_1lib=
6919			break
6920		fi
6921	done
6922	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6923done
6924LIBS="$cf_add_libs"
6925 }
6926
6927cat >>confdefs.h <<\EOF
6928#define USE_TERMCAP 1
6929EOF
6930
6931	if test "$cf_full_tgetent" = no ; then
6932		cat >"conftest.$ac_ext" <<_ACEOF
6933#line 6933 "configure"
6934#include "confdefs.h"
6935
6936#include <termcap.h>
6937int
6938main (void)
6939{
6940
6941#ifdef NCURSES_VERSION
6942make an error
6943#endif
6944  ;
6945  return 0;
6946}
6947_ACEOF
6948rm -f "conftest.$ac_objext"
6949if { (eval echo "$as_me:6949: \"$ac_compile\"") >&5
6950  (eval $ac_compile) 2>&5
6951  ac_status=$?
6952  echo "$as_me:6952: \$? = $ac_status" >&5
6953  (exit "$ac_status"); } &&
6954         { ac_try='test -s "conftest.$ac_objext"'
6955  { (eval echo "$as_me:6955: \"$ac_try\"") >&5
6956  (eval $ac_try) 2>&5
6957  ac_status=$?
6958  echo "$as_me:6958: \$? = $ac_status" >&5
6959  (exit "$ac_status"); }; }; then
6960  cat >>confdefs.h <<\EOF
6961#define HAVE_TERMCAP_H 1
6962EOF
6963
6964else
6965  echo "$as_me: failed program was:" >&5
6966cat "conftest.$ac_ext" >&5
6967fi
6968rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6969	else
6970
6971for ac_header in termcap.h
6972do
6973as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6974echo "$as_me:6974: checking for $ac_header" >&5
6975echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6976if eval "test \"\${$as_ac_Header+set}\" = set"; then
6977  echo $ECHO_N "(cached) $ECHO_C" >&6
6978else
6979  cat >"conftest.$ac_ext" <<_ACEOF
6980#line 6980 "configure"
6981#include "confdefs.h"
6982#include <$ac_header>
6983_ACEOF
6984if { (eval echo "$as_me:6984: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6985  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6986  ac_status=$?
6987  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6988  rm -f conftest.er1
6989  cat conftest.err >&5
6990  echo "$as_me:6990: \$? = $ac_status" >&5
6991  (exit "$ac_status"); } >/dev/null; then
6992  if test -s conftest.err; then
6993    ac_cpp_err=$ac_c_preproc_warn_flag
6994  else
6995    ac_cpp_err=
6996  fi
6997else
6998  ac_cpp_err=yes
6999fi
7000if test -z "$ac_cpp_err"; then
7001  eval "$as_ac_Header=yes"
7002else
7003  echo "$as_me: failed program was:" >&5
7004  cat "conftest.$ac_ext" >&5
7005  eval "$as_ac_Header=no"
7006fi
7007rm -f conftest.err "conftest.$ac_ext"
7008fi
7009echo "$as_me:7009: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7010echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7011if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7012  cat >>confdefs.h <<EOF
7013#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7014EOF
7015
7016fi
7017done
7018
7019	fi
7020else
7021        # If we didn't find a tgetent() that supports the buffer
7022        # argument, look again to see whether we can find even
7023        # a crippled one.  A crippled tgetent() is still useful to
7024        # validate values for the TERM environment variable given to
7025        # child processes.
7026	echo "$as_me:7026: checking for partial tgetent function" >&5
7027echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
7028if test "${cf_cv_lib_part_tgetent+set}" = set; then
7029  echo $ECHO_N "(cached) $ECHO_C" >&6
7030else
7031
7032	cf_cv_lib_part_tgetent=no
7033	for cf_termlib in $cf_TERMLIB ; do
7034		LIBS="$cf_save_LIBS -l$cf_termlib"
7035		cat >"conftest.$ac_ext" <<_ACEOF
7036#line 7036 "configure"
7037#include "confdefs.h"
7038
7039int
7040main (void)
7041{
7042tgetent(0, "$cf_TERMVAR")
7043  ;
7044  return 0;
7045}
7046_ACEOF
7047rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7048if { (eval echo "$as_me:7048: \"$ac_link\"") >&5
7049  (eval $ac_link) 2>&5
7050  ac_status=$?
7051  echo "$as_me:7051: \$? = $ac_status" >&5
7052  (exit "$ac_status"); } &&
7053         { ac_try='test -s "conftest$ac_exeext"'
7054  { (eval echo "$as_me:7054: \"$ac_try\"") >&5
7055  (eval $ac_try) 2>&5
7056  ac_status=$?
7057  echo "$as_me:7057: \$? = $ac_status" >&5
7058  (exit "$ac_status"); }; }; then
7059  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
7060			 cf_cv_lib_part_tgetent="-l$cf_termlib"
7061			 break
7062else
7063  echo "$as_me: failed program was:" >&5
7064cat "conftest.$ac_ext" >&5
7065fi
7066rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7067	done
7068	LIBS="$cf_save_LIBS"
7069
7070fi
7071echo "$as_me:7071: result: $cf_cv_lib_part_tgetent" >&5
7072echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
7073
7074	if test "$cf_cv_lib_part_tgetent" != no ; then
7075
7076cf_add_libs="$LIBS"
7077# reverse order
7078cf_add_0lib=
7079for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7080# filter duplicates
7081for cf_add_1lib in $cf_add_0lib; do
7082	for cf_add_2lib in $cf_add_libs; do
7083		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7084			cf_add_1lib=
7085			break
7086		fi
7087	done
7088	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7089done
7090LIBS="$cf_add_libs"
7091
7092for ac_header in termcap.h
7093do
7094as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7095echo "$as_me:7095: checking for $ac_header" >&5
7096echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7097if eval "test \"\${$as_ac_Header+set}\" = set"; then
7098  echo $ECHO_N "(cached) $ECHO_C" >&6
7099else
7100  cat >"conftest.$ac_ext" <<_ACEOF
7101#line 7101 "configure"
7102#include "confdefs.h"
7103#include <$ac_header>
7104_ACEOF
7105if { (eval echo "$as_me:7105: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7106  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7107  ac_status=$?
7108  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7109  rm -f conftest.er1
7110  cat conftest.err >&5
7111  echo "$as_me:7111: \$? = $ac_status" >&5
7112  (exit "$ac_status"); } >/dev/null; then
7113  if test -s conftest.err; then
7114    ac_cpp_err=$ac_c_preproc_warn_flag
7115  else
7116    ac_cpp_err=
7117  fi
7118else
7119  ac_cpp_err=yes
7120fi
7121if test -z "$ac_cpp_err"; then
7122  eval "$as_ac_Header=yes"
7123else
7124  echo "$as_me: failed program was:" >&5
7125  cat "conftest.$ac_ext" >&5
7126  eval "$as_ac_Header=no"
7127fi
7128rm -f conftest.err "conftest.$ac_ext"
7129fi
7130echo "$as_me:7130: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7131echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7132if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7133  cat >>confdefs.h <<EOF
7134#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7135EOF
7136
7137fi
7138done
7139
7140                # If this is linking against ncurses, we'll trigger the
7141                # ifdef in resize.c that turns the termcap stuff back off.
7142
7143cat >>confdefs.h <<\EOF
7144#define USE_TERMINFO 1
7145EOF
7146
7147	fi
7148fi
7149
7150echo "$as_me:7150: checking for X applications class" >&5
7151echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7152
7153# Check whether --with-app-class or --without-app-class was given.
7154if test "${with_app_class+set}" = set; then
7155  withval="$with_app_class"
7156  APP_CLASS=$withval
7157else
7158  APP_CLASS=XTerm
7159fi;
7160
7161case x$APP_CLASS in
7162(*[/@,%]*)
7163	{ echo "$as_me:7163: WARNING: X applications class cannot contain punctuation" >&5
7164echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7165	APP_CLASS=XTerm
7166	;;
7167(x[A-Z]*)
7168	;;
7169(*)
7170	{ echo "$as_me:7170: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7171echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7172	APP_CLASS=XTerm
7173	;;
7174esac
7175
7176echo "$as_me:7176: result: $APP_CLASS" >&5
7177echo "${ECHO_T}$APP_CLASS" >&6
7178
7179echo "$as_me:7179: checking for directory to install resource files" >&5
7180echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7181
7182# Check whether --with-app-defaults or --without-app-defaults was given.
7183if test "${with_app_defaults+set}" = set; then
7184  withval="$with_app_defaults"
7185  APPSDIR=$withval
7186else
7187  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7188fi;
7189
7190if test "x$APPSDIR" = xauto
7191then
7192	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7193	for cf_path in \
7194		/opt/local/share/X11/app-defaults \
7195		/opt/X11/share/X11/app-defaults \
7196		/usr/share/X11/app-defaults \
7197		/usr/X11/share/X11/app-defaults \
7198		/usr/X11/lib/X11/app-defaults \
7199		/usr/lib/X11/app-defaults \
7200		/etc/X11/app-defaults \
7201		/usr/pkg/lib/X11/app-defaults \
7202		/usr/X11R7/lib/X11/app-defaults \
7203		/usr/X11R6/lib/X11/app-defaults \
7204		/usr/X11R5/lib/X11/app-defaults \
7205		/usr/X11R4/lib/X11/app-defaults \
7206		/usr/local/lib/X11/app-defaults \
7207		/usr/local/share/X11/app-defaults \
7208		/usr/lib64/X11/app-defaults
7209	do
7210		if test -d "$cf_path" ; then
7211			APPSDIR="$cf_path"
7212			break
7213		fi
7214	done
7215else
7216	cf_path=$APPSDIR
7217
7218if test "x$prefix" != xNONE; then
7219	cf_path_syntax="$prefix"
7220else
7221	cf_path_syntax="$ac_default_prefix"
7222fi
7223
7224case ".$cf_path" in
7225(.\$\(*\)*|.\'*\'*)
7226	;;
7227(..|./*|.\\*)
7228	;;
7229(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7230	;;
7231(.\$\{*prefix\}*|.\$\{*dir\}*)
7232	eval cf_path="$cf_path"
7233	case ".$cf_path" in
7234	(.NONE/*)
7235		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7236		;;
7237	esac
7238	;;
7239(.no|.NONE/*)
7240	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7241	;;
7242(*)
7243	{ { echo "$as_me:7243: error: expected a pathname, not \"$cf_path\"" >&5
7244echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7245   { (exit 1); exit 1; }; }
7246	;;
7247esac
7248
7249fi
7250
7251echo "$as_me:7251: result: $APPSDIR" >&5
7252echo "${ECHO_T}$APPSDIR" >&6
7253
7254no_appsdir=
7255if test "$APPSDIR" = no
7256then
7257	no_appsdir="#"
7258else
7259	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7260fi
7261
7262echo "$as_me:7262: checking for the icon name" >&5
7263echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7264
7265# Check whether --with-icon-name or --without-icon-name was given.
7266if test "${with_icon_name+set}" = set; then
7267  withval="$with_icon_name"
7268  ICON_NAME="$withval"
7269else
7270  ICON_NAME=mini.xterm
7271fi;
7272case "x$ICON_NAME" in
7273(xyes|xno|x)
7274	ICON_NAME=mini.xterm
7275	;;
7276esac
7277
7278echo "$as_me:7278: result: $ICON_NAME" >&5
7279echo "${ECHO_T}$ICON_NAME" >&6
7280
7281echo "$as_me:7281: checking for icon symlink to use" >&5
7282echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7283
7284# Check whether --with-icon-symlink or --without-icon-symlink was given.
7285if test "${with_icon_symlink+set}" = set; then
7286  withval="$with_icon_symlink"
7287  ICON_SYMLINK="$withval"
7288else
7289  ICON_SYMLINK=NONE
7290fi;
7291case "x$ICON_SYMLINK" in
7292(xyes)
7293	ICON_SYMLINK=xterm
7294	;;
7295(xno|x)
7296	ICON_SYMLINK=NONE
7297	;;
7298esac
7299
7300echo "$as_me:7300: result: $ICON_SYMLINK" >&5
7301echo "${ECHO_T}$ICON_SYMLINK" >&6
7302
7303# Install all icons except for the overused "terminal".
7304cf_cv_icon_list=
7305for my_item in $srcdir/icons/*.svg
7306do
7307	test -f "$my_item" || continue
7308	cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7309	case $cf_icon_name in
7310	(*_48x48)
7311		continue
7312		;;
7313	esac
7314	test -n "$verbose" && echo "	adding $cf_icon_name to icon-list" 1>&6
7315
7316echo "${as_me:-configure}:7316: testing adding $cf_icon_name to icon-list ..." 1>&5
7317
7318	cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7319	if test -f "${cf_icon_name}_48x48.png"
7320	then
7321		test -n "$verbose" && echo "	adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7322
7323echo "${as_me:-configure}:7323: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7324
7325		cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7326	fi
7327done
7328
7329echo "$as_me:7329: checking for directory to install pixmaps" >&5
7330echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7331
7332# Check whether --with-pixmapdir or --without-pixmapdir was given.
7333if test "${with_pixmapdir+set}" = set; then
7334  withval="$with_pixmapdir"
7335  PIXMAPDIR=$withval
7336else
7337  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
7338fi;
7339
7340if test "x$PIXMAPDIR" = xauto
7341then
7342	PIXMAPDIR='${datadir}/pixmaps'
7343	for cf_path in \
7344		/usr/share/pixmaps \
7345		/usr/X11R6/share/pixmaps
7346	do
7347		if test -d "$cf_path" ; then
7348			PIXMAPDIR="$cf_path"
7349			break
7350		fi
7351	done
7352else
7353	cf_path=$PIXMAPDIR
7354
7355if test "x$prefix" != xNONE; then
7356	cf_path_syntax="$prefix"
7357else
7358	cf_path_syntax="$ac_default_prefix"
7359fi
7360
7361case ".$cf_path" in
7362(.\$\(*\)*|.\'*\'*)
7363	;;
7364(..|./*|.\\*)
7365	;;
7366(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7367	;;
7368(.\$\{*prefix\}*|.\$\{*dir\}*)
7369	eval cf_path="$cf_path"
7370	case ".$cf_path" in
7371	(.NONE/*)
7372		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7373		;;
7374	esac
7375	;;
7376(.no|.NONE/*)
7377	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7378	;;
7379(*)
7380	{ { echo "$as_me:7380: error: expected a pathname, not \"$cf_path\"" >&5
7381echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7382   { (exit 1); exit 1; }; }
7383	;;
7384esac
7385
7386fi
7387echo "$as_me:7387: result: $PIXMAPDIR" >&5
7388echo "${ECHO_T}$PIXMAPDIR" >&6
7389
7390no_pixmapdir=
7391if test "$PIXMAPDIR" = no
7392then
7393	no_pixmapdir="#"
7394else
7395	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
7396fi
7397
7398echo "$as_me:7398: checking for directory to install icons" >&5
7399echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
7400
7401# Check whether --with-icondir or --without-icondir was given.
7402if test "${with_icondir+set}" = set; then
7403  withval="$with_icondir"
7404  ICONDIR=$withval
7405else
7406  test -z "$ICONDIR" && ICONDIR=no
7407fi;
7408
7409if test "x$ICONDIR" = xauto
7410then
7411	ICONDIR='${datadir}/icons'
7412	for cf_path in \
7413		/usr/share/icons \
7414		/usr/X11R6/share/icons
7415	do
7416		if test -d "$cf_path" ; then
7417			ICONDIR="$cf_path"
7418			break
7419		fi
7420	done
7421else
7422	cf_path=$ICONDIR
7423
7424if test "x$prefix" != xNONE; then
7425	cf_path_syntax="$prefix"
7426else
7427	cf_path_syntax="$ac_default_prefix"
7428fi
7429
7430case ".$cf_path" in
7431(.\$\(*\)*|.\'*\'*)
7432	;;
7433(..|./*|.\\*)
7434	;;
7435(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7436	;;
7437(.\$\{*prefix\}*|.\$\{*dir\}*)
7438	eval cf_path="$cf_path"
7439	case ".$cf_path" in
7440	(.NONE/*)
7441		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7442		;;
7443	esac
7444	;;
7445(.no|.NONE/*)
7446	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7447	;;
7448(*)
7449	{ { echo "$as_me:7449: error: expected a pathname, not \"$cf_path\"" >&5
7450echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7451   { (exit 1); exit 1; }; }
7452	;;
7453esac
7454
7455fi
7456echo "$as_me:7456: result: $ICONDIR" >&5
7457echo "${ECHO_T}$ICONDIR" >&6
7458
7459no_icondir=
7460if test "$ICONDIR" = no
7461then
7462	no_icondir="#"
7463else
7464	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
7465fi
7466
7467echo "$as_me:7467: checking if icon theme should be used" >&5
7468echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
7469
7470# Check whether --with-icon-theme or --without-icon-theme was given.
7471if test "${with_icon_theme+set}" = set; then
7472  withval="$with_icon_theme"
7473  ICON_THEME=$withval
7474else
7475  ICON_THEME=no
7476fi;
7477
7478case "x$ICON_THEME" in
7479(xno)
7480	;;
7481(x|xyes)
7482	ICON_THEME=hicolor
7483	;;
7484esac
7485echo "$as_me:7485: result: $ICON_THEME" >&5
7486echo "${ECHO_T}$ICON_THEME" >&6
7487
7488if test "x$ICON_THEME" = xno
7489then
7490	if test "x$ICONDIR" != xno
7491	then
7492		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
7493
7494echo "${as_me:-configure}:7494: testing ignoring icondir without theme ..." 1>&5
7495
7496		no_icondir="#"
7497	fi
7498else
7499	if test "x$ICONDIR" = xno
7500	then
7501		{ { echo "$as_me:7501: error: icondir must be set for icon theme" >&5
7502echo "$as_me: error: icondir must be set for icon theme" >&2;}
7503   { (exit 1); exit 1; }; }
7504	fi
7505fi
7506
7507: ${ICON_FORMAT:=".svg .png .xpm"}
7508
7509ICON_LIST=
7510
7511if test "x$ICON_THEME" != xno
7512then
7513	cf_icon_list="$cf_cv_icon_list"
7514else
7515	cf_icon_list="icons/${ICON_NAME}_48x48"
7516fi
7517
7518echo "$as_me:7518: checking for icon(s) to install" >&5
7519echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
7520for cf_name in $cf_icon_list
7521do
7522	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
7523
7524echo "${as_me:-configure}:7524: testing using $ICON_FORMAT ..." 1>&5
7525
7526	for cf_suffix in $ICON_FORMAT
7527	do
7528		cf_icon="${cf_name}${cf_suffix}"
7529		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7530		if test ! -f "${cf_left}"
7531		then
7532			if test "x$srcdir" != "x."
7533			then
7534				cf_icon="${srcdir}/${cf_left}"
7535				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7536				if test ! -f "${cf_left}"
7537				then
7538					continue
7539				fi
7540			else
7541				continue
7542			fi
7543		fi
7544		if test "x$ICON_THEME" != xno
7545		then
7546			cf_base=`basename "$cf_left"`
7547			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
7548			case "x${cf_base}" in
7549			(*:*)
7550				cf_next=$cf_base
7551				# user-defined mapping
7552				;;
7553			(*.png)
7554				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'`
7555				if test -z "$cf_size"
7556				then
7557					{ echo "$as_me:7557: WARNING: cannot determine size of $cf_left" >&5
7558echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
7559					continue
7560				fi
7561				cf_next="$cf_size/apps/$cf_trim"
7562				;;
7563			(*.svg)
7564				cf_next="scalable/apps/$cf_trim"
7565				;;
7566			(*.xpm)
7567				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
7568
7569echo "${as_me:-configure}:7569: testing ignored XPM file in icon theme ..." 1>&5
7570
7571				continue
7572				;;
7573			(*_[0-9][0-9]*x[0-9][0-9]*.*)
7574				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
7575				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
7576				cf_next="$cf_size/apps/$cf_base"
7577				;;
7578			esac
7579			test -n "$verbose" && echo "	adding $cf_next" 1>&6
7580
7581echo "${as_me:-configure}:7581: testing adding $cf_next ..." 1>&5
7582
7583			cf_icon="${cf_icon}:${cf_next}"
7584		fi
7585		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
7586		ICON_LIST="$ICON_LIST${cf_icon}"
7587		if test -z "$ICON_NAME"
7588		then
7589			ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
7590		fi
7591	done
7592done
7593
7594if test -n "$verbose"
7595then
7596	echo "$as_me:7596: checking result" >&5
7597echo $ECHO_N "checking result... $ECHO_C" >&6
7598fi
7599echo "$as_me:7599: result: $ICON_LIST" >&5
7600echo "${ECHO_T}$ICON_LIST" >&6
7601
7602if test -z "$ICON_LIST"
7603then
7604	{ { echo "$as_me:7604: error: no icons found" >&5
7605echo "$as_me: error: no icons found" >&2;}
7606   { (exit 1); exit 1; }; }
7607fi
7608
7609echo "$as_me:7609: checking for icon name" >&5
7610echo $ECHO_N "checking for icon name... $ECHO_C" >&6
7611echo "$as_me:7611: result: $ICON_NAME" >&5
7612echo "${ECHO_T}$ICON_NAME" >&6
7613
7614# Comment-out the install-desktop rule if the desktop-utils are not found.
7615echo "$as_me:7615: checking if you want to install desktop files" >&5
7616echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
7617
7618# Check whether --enable-desktop or --disable-desktop was given.
7619if test "${enable_desktop+set}" = set; then
7620  enableval="$enable_desktop"
7621  test "$enableval" != no && enableval=yes
7622	if test "$enableval" != "yes" ; then
7623    enable_desktop=$enableval
7624	else
7625		enable_desktop=$enableval
7626	fi
7627else
7628  enableval=yes
7629	enable_desktop=$enableval
7630
7631fi;
7632echo "$as_me:7632: result: $enable_desktop" >&5
7633echo "${ECHO_T}$enable_desktop" >&6
7634
7635desktop_utils=
7636if test "$enable_desktop" = yes ; then
7637# Extract the first word of "desktop-file-install", so it can be a program name with args.
7638set dummy desktop-file-install; ac_word=$2
7639echo "$as_me:7639: checking for $ac_word" >&5
7640echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7641if test "${ac_cv_prog_desktop_utils+set}" = set; then
7642  echo $ECHO_N "(cached) $ECHO_C" >&6
7643else
7644  if test -n "$desktop_utils"; then
7645  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
7646else
7647  ac_save_IFS=$IFS; IFS=$ac_path_separator
7648ac_dummy="$PATH"
7649for ac_dir in $ac_dummy; do
7650  IFS=$ac_save_IFS
7651  test -z "$ac_dir" && ac_dir=.
7652  $as_executable_p "$ac_dir/$ac_word" || continue
7653ac_cv_prog_desktop_utils="yes"
7654echo "$as_me:7654: found $ac_dir/$ac_word" >&5
7655break
7656done
7657
7658  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
7659fi
7660fi
7661desktop_utils=$ac_cv_prog_desktop_utils
7662if test -n "$desktop_utils"; then
7663  echo "$as_me:7663: result: $desktop_utils" >&5
7664echo "${ECHO_T}$desktop_utils" >&6
7665else
7666  echo "$as_me:7666: result: no" >&5
7667echo "${ECHO_T}no" >&6
7668fi
7669
7670fi
7671
7672test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
7673
7674if test -z "$desktop_utils"
7675then
7676	echo "$as_me:7676: checking for requested desktop-category" >&5
7677echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
7678
7679# Check whether --with-desktop-category or --without-desktop-category was given.
7680if test "${with_desktop_category+set}" = set; then
7681  withval="$with_desktop_category"
7682  cf_desktop_want=$withval
7683else
7684  cf_desktop_want=auto
7685fi;
7686	echo "$as_me:7686: result: $cf_desktop_want" >&5
7687echo "${ECHO_T}$cf_desktop_want" >&6
7688
7689	if test "$cf_desktop_want" = auto
7690	then
7691		rm -rf conftest*
7692		cf_desktop_also=
7693		for cf_desktop_dir in  \
7694			/usr/share/app-install \
7695			/usr/share/applications
7696		do
7697			if test -d $cf_desktop_dir
7698			then
7699				find $cf_desktop_dir -name '*.desktop' | \
7700				while true
7701				do
7702					read cf_desktop_path
7703					test -z "$cf_desktop_path" && break
7704					cf_desktop_name=`basename "$cf_desktop_path" .desktop`
7705					case $cf_desktop_name in
7706					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
7707						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
7708
7709echo "${as_me:-configure}:7709: testing inspect $cf_desktop_path ..." 1>&5
7710
7711						${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
7712							tr ';' '\n' | \
7713							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
7714						;;
7715					esac
7716				done
7717			fi
7718		done
7719		if test -s conftest.1
7720		then
7721			cf_desktop_last=
7722			sort conftest.1 | \
7723			while true
7724			do
7725				read cf_desktop_this
7726				test -z "$cf_desktop_this" && break
7727				if test -s conftest.2
7728				then
7729					grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
7730				elif test -s conftest.3
7731				then
7732					grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
7733				fi
7734				case "$cf_desktop_this" in
7735				(-*)
7736					;;
7737				(Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
7738					test -n "$verbose" && echo "	ignored $cf_desktop_this" 1>&6
7739
7740echo "${as_me:-configure}:7740: testing ignored $cf_desktop_this ..." 1>&5
7741
7742					echo "$cf_desktop_this" >> conftest.3
7743					;;
7744				(System|TerminalEmulator|*)
7745					test -n "$verbose" && echo "	applied $cf_desktop_this" 1>&6
7746
7747echo "${as_me:-configure}:7747: testing applied $cf_desktop_this ..." 1>&5
7748
7749					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
7750					;;
7751				esac
7752				cf_desktop_last=$cf_desktop_this
7753			done
7754			cf_desktop_want="`tr '\n' ';' < conftest.2`"
7755		fi
7756		if test -n "$cf_desktop_want"
7757		then
7758			if test "$cf_desktop_want" = auto
7759			then
7760				cf_desktop_want=
7761			else
7762				# do a sanity check on the semicolon-separated list, ignore on failure
7763				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
7764				test -z "$cf_desktop_test" && cf_desktop_want=
7765				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
7766				test -z "$cf_desktop_test" && cf_desktop_want=
7767			fi
7768		fi
7769		if test -z "$cf_desktop_want"
7770		then
7771			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
7772			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
7773
7774echo "${as_me:-configure}:7774: testing no usable value found for desktop category ..." 1>&5
7775
7776		fi
7777	fi
7778	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
7779	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
7780
7781echo "${as_me:-configure}:7781: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
7782
7783fi
7784
7785echo "$as_me:7785: checking for install-permissions reference" >&5
7786echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
7787
7788# Check whether --with-reference or --without-reference was given.
7789if test "${with_reference+set}" = set; then
7790  withval="$with_reference"
7791  with_reference=$withval
7792else
7793  with_reference=xterm
7794fi;
7795echo "$as_me:7795: result: $with_reference" >&5
7796echo "${ECHO_T}$with_reference" >&6
7797
7798with_full_paths=yes
7799
7800	echo "$as_me:7800: checking for PATH separator" >&5
7801echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7802	case "$cf_cv_system_name" in
7803	(os2*)	PATH_SEPARATOR=';'  ;;
7804	(*)	${PATH_SEPARATOR:=':'}  ;;
7805	esac
7806
7807	echo "$as_me:7807: result: $PATH_SEPARATOR" >&5
7808echo "${ECHO_T}$PATH_SEPARATOR" >&6
7809
7810test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
7811for ac_prog in $XTERM_PATH $with_reference
7812do
7813  # Extract the first word of "$ac_prog", so it can be a program name with args.
7814set dummy $ac_prog; ac_word=$2
7815echo "$as_me:7815: checking for $ac_word" >&5
7816echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7817if test "${ac_cv_path_XTERM_PATH+set}" = set; then
7818  echo $ECHO_N "(cached) $ECHO_C" >&6
7819else
7820  case $XTERM_PATH in
7821  [\\/]* | ?:[\\/]*)
7822  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
7823  ;;
7824  *)
7825  ac_save_IFS=$IFS; IFS=$ac_path_separator
7826ac_dummy="$PATH"
7827for ac_dir in $ac_dummy; do
7828  IFS=$ac_save_IFS
7829  test -z "$ac_dir" && ac_dir=.
7830  if $as_executable_p "$ac_dir/$ac_word"; then
7831   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
7832   echo "$as_me:7832: found $ac_dir/$ac_word" >&5
7833   break
7834fi
7835done
7836
7837  ;;
7838esac
7839fi
7840XTERM_PATH=$ac_cv_path_XTERM_PATH
7841
7842if test -n "$XTERM_PATH"; then
7843  echo "$as_me:7843: result: $XTERM_PATH" >&5
7844echo "${ECHO_T}$XTERM_PATH" >&6
7845else
7846  echo "$as_me:7846: result: no" >&5
7847echo "${ECHO_T}no" >&6
7848fi
7849
7850  test -n "$XTERM_PATH" && break
7851done
7852test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
7853
7854cf_path_prog=""
7855cf_path_args=""
7856IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
7857for cf_temp in $ac_cv_path_XTERM_PATH
7858do
7859	if test -z "$cf_path_prog" ; then
7860		if test "$with_full_paths" = yes ; then
7861
7862if test "x$prefix" != xNONE; then
7863	cf_path_syntax="$prefix"
7864else
7865	cf_path_syntax="$ac_default_prefix"
7866fi
7867
7868case ".$cf_temp" in
7869(.\$\(*\)*|.\'*\'*)
7870	;;
7871(..|./*|.\\*)
7872	;;
7873(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7874	;;
7875(.\$\{*prefix\}*|.\$\{*dir\}*)
7876	eval cf_temp="$cf_temp"
7877	case ".$cf_temp" in
7878	(.NONE/*)
7879		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7880		;;
7881	esac
7882	;;
7883(.no|.NONE/*)
7884	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7885	;;
7886(*)
7887	break
7888	;;
7889esac
7890
7891			cf_path_prog="$cf_temp"
7892		else
7893			cf_path_prog="`basename "$cf_temp"`"
7894		fi
7895	elif test -z "$cf_path_args" ; then
7896		cf_path_args="$cf_temp"
7897	else
7898		cf_path_args="$cf_path_args $cf_temp"
7899	fi
7900done
7901IFS="$cf_save_ifs"
7902
7903if test -n "$cf_path_prog" ; then
7904
7905echo "${as_me:-configure}:7905: testing defining path for ${cf_path_prog} ..." 1>&5
7906
7907cat >>confdefs.h <<EOF
7908#define XTERM_PATH_PATH "$cf_path_prog"
7909EOF
7910
7911	test -n "$cf_path_args" &&
7912cat >>confdefs.h <<EOF
7913#define XTERM_PATH_ARGS "$cf_path_args"
7914EOF
7915
7916fi
7917
7918# If any of --program-prefix, --program-suffix or --program-transform-name is
7919# given, accept an option tell the makefile to create a symbolic link, e.g.,
7920# to "xterm" on install.
7921XTERM_SYMLINK=NONE
7922
7923if test "$program_transform_name" != "'s,,,'" ; then
7924cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
7925cf_name=`echo xterm |sed -e "$cf_name"`
7926echo "$as_me:7926: checking for symbolic link to create to $cf_name" >&5
7927echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
7928
7929# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
7930if test "${with_xterm_symlink+set}" = set; then
7931  withval="$with_xterm_symlink"
7932  with_symlink=$withval
7933else
7934  with_symlink=xterm
7935fi;
7936echo "$as_me:7936: result: $with_symlink" >&5
7937echo "${ECHO_T}$with_symlink" >&6
7938test "$with_symlink" = yes && with_symlink=xterm
7939test -n "$with_symlink" && \
7940	test "$with_symlink" != no && \
7941	test "$with_symlink" != "$cf_name" && \
7942	XTERM_SYMLINK="$with_symlink"
7943fi
7944
7945echo "$as_me:7945: checking if you want to disable openpty" >&5
7946echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
7947
7948# Check whether --enable-openpty or --disable-openpty was given.
7949if test "${enable_openpty+set}" = set; then
7950  enableval="$enable_openpty"
7951  test "$enableval" != no && enableval=yes
7952	if test "$enableval" != "yes" ; then
7953    disable_openpty=yes
7954	else
7955		disable_openpty=no
7956	fi
7957else
7958  enableval=yes
7959	disable_openpty=no
7960
7961fi;
7962echo "$as_me:7962: result: $disable_openpty" >&5
7963echo "${ECHO_T}$disable_openpty" >&6
7964
7965echo "$as_me:7965: checking if you want to disable setuid" >&5
7966echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
7967
7968# Check whether --enable-setuid or --disable-setuid was given.
7969if test "${enable_setuid+set}" = set; then
7970  enableval="$enable_setuid"
7971  test "$enableval" != no && enableval=yes
7972	if test "$enableval" != "yes" ; then
7973    disable_setuid=yes
7974	else
7975		disable_setuid=no
7976	fi
7977else
7978  enableval=yes
7979	disable_setuid=no
7980
7981fi;
7982echo "$as_me:7982: result: $disable_setuid" >&5
7983echo "${ECHO_T}$disable_setuid" >&6
7984
7985echo "$as_me:7985: checking if you want to disable setgid" >&5
7986echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
7987
7988# Check whether --enable-setgid or --disable-setgid was given.
7989if test "${enable_setgid+set}" = set; then
7990  enableval="$enable_setgid"
7991  test "$enableval" != no && enableval=yes
7992	if test "$enableval" != "yes" ; then
7993    disable_setgid=yes
7994	else
7995		disable_setgid=no
7996	fi
7997else
7998  enableval=yes
7999	disable_setgid=no
8000
8001fi;
8002echo "$as_me:8002: result: $disable_setgid" >&5
8003echo "${ECHO_T}$disable_setgid" >&6
8004
8005echo "$as_me:8005: checking if you want to run xterm setuid to a given user" >&5
8006echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
8007
8008# Check whether --with-setuid or --without-setuid was given.
8009if test "${with_setuid+set}" = set; then
8010  withval="$with_setuid"
8011  use_given_setuid=$withval
8012else
8013  use_given_setuid=no
8014fi;
8015echo "$as_me:8015: result: $use_given_setuid" >&5
8016echo "${ECHO_T}$use_given_setuid" >&6
8017
8018if test "$use_given_setuid" != no ; then
8019	if test "$use_given_setuid" = yes ; then
8020		cf_cv_given_setuid=root
8021	else
8022		cf_cv_given_setuid=$use_given_setuid
8023	fi
8024	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
8025	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
8026fi
8027
8028echo "$as_me:8028: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
8029echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
8030
8031# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
8032if test "${with_utmp_setgid+set}" = set; then
8033  withval="$with_utmp_setgid"
8034  use_utmp_setgid=$withval
8035else
8036  use_utmp_setgid=no
8037fi;
8038echo "$as_me:8038: result: $use_utmp_setgid" >&5
8039echo "${ECHO_T}$use_utmp_setgid" >&6
8040
8041if test "$use_utmp_setgid" != no ; then
8042	if test "$use_utmp_setgid" = yes ; then
8043
8044if test $cf_cv_have_utmp != no ; then
8045echo "$as_me:8045: checking for utmp/utmpx group" >&5
8046echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
8047if test "${cf_cv_utmp_group+set}" = set; then
8048  echo $ECHO_N "(cached) $ECHO_C" >&6
8049else
8050
8051for cf_utmp_path in /var/adm /var/run
8052do
8053	for cf_utmp_file in utmpx utmp
8054	do
8055		if test -f $cf_utmp_path/$cf_utmp_file
8056		then
8057			cf_cv_utmp_group=root
8058
8059			cf_option="-lL"
8060
8061			# Expect listing to have fields like this:
8062			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
8063			ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8064			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8065			if test -z "$cf_rest" ; then
8066				cf_option="${cf_option}g"
8067				ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8068				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8069			fi
8070			rm -f conftest
8071
8072			# If we have a pathname, and the date fields look right, assume we've
8073			# captured the group as well.
8074			if test -n "$cf_rest" ; then
8075				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
8076				if test -z "$cf_test" ; then
8077					cf_cv_utmp_group=$cf_grp;
8078				fi
8079			fi
8080			break
8081		fi
8082	done
8083	test -n "$cf_cv_utmp_group" && break
8084done
8085
8086fi
8087echo "$as_me:8087: result: $cf_cv_utmp_group" >&5
8088echo "${ECHO_T}$cf_cv_utmp_group" >&6
8089else
8090	{ { echo "$as_me:8090: error: cannot find utmp group" >&5
8091echo "$as_me: error: cannot find utmp group" >&2;}
8092   { (exit 1); exit 1; }; }
8093fi
8094
8095	else
8096		cf_cv_utmp_group=$use_utmp_setgid
8097	fi
8098	if test "$cf_cv_posix_saved_ids" != yes ; then
8099		{ { echo "$as_me:8099: error: Your system does not support POSIX saved-ids" >&5
8100echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8101   { (exit 1); exit 1; }; }
8102	fi
8103
8104cat >>confdefs.h <<\EOF
8105#define USE_UTMP_SETGID 1
8106EOF
8107
8108	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8109fi
8110
8111echo "$as_me:8111: checking if you want to link with utempter" >&5
8112echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8113
8114# Check whether --with-utempter or --without-utempter was given.
8115if test "${with_utempter+set}" = set; then
8116  withval="$with_utempter"
8117  use_utempter=$withval
8118else
8119  use_utempter=no
8120fi;
8121echo "$as_me:8121: result: $use_utempter" >&5
8122echo "${ECHO_T}$use_utempter" >&6
8123
8124if test "$use_utempter" = yes ; then
8125
8126echo "$as_me:8126: checking if we can link with utempter library" >&5
8127echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8128if test "${cf_cv_have_utempter+set}" = set; then
8129  echo $ECHO_N "(cached) $ECHO_C" >&6
8130else
8131
8132cf_save_LIBS="$LIBS"
8133
8134cf_add_libs="$LIBS"
8135# reverse order
8136cf_add_0lib=
8137for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8138# filter duplicates
8139for cf_add_1lib in $cf_add_0lib; do
8140	for cf_add_2lib in $cf_add_libs; do
8141		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8142			cf_add_1lib=
8143			break
8144		fi
8145	done
8146	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8147done
8148LIBS="$cf_add_libs"
8149
8150cat >"conftest.$ac_ext" <<_ACEOF
8151#line 8151 "configure"
8152#include "confdefs.h"
8153
8154#include <utempter.h>
8155
8156int
8157main (void)
8158{
8159
8160	addToUtmp("/dev/tty", 0, 1);
8161	removeFromUtmp();
8162
8163  ;
8164  return 0;
8165}
8166_ACEOF
8167rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8168if { (eval echo "$as_me:8168: \"$ac_link\"") >&5
8169  (eval $ac_link) 2>&5
8170  ac_status=$?
8171  echo "$as_me:8171: \$? = $ac_status" >&5
8172  (exit "$ac_status"); } &&
8173         { ac_try='test -s "conftest$ac_exeext"'
8174  { (eval echo "$as_me:8174: \"$ac_try\"") >&5
8175  (eval $ac_try) 2>&5
8176  ac_status=$?
8177  echo "$as_me:8177: \$? = $ac_status" >&5
8178  (exit "$ac_status"); }; }; then
8179
8180	cf_cv_have_utempter=yes
8181else
8182  echo "$as_me: failed program was:" >&5
8183cat "conftest.$ac_ext" >&5
8184
8185	cf_cv_have_utempter=no
8186fi
8187rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8188LIBS="$cf_save_LIBS"
8189
8190fi
8191echo "$as_me:8191: result: $cf_cv_have_utempter" >&5
8192echo "${ECHO_T}$cf_cv_have_utempter" >&6
8193if test "$cf_cv_have_utempter" = yes ; then
8194
8195cat >>confdefs.h <<\EOF
8196#define USE_UTEMPTER 1
8197EOF
8198
8199cf_add_libs="$LIBS"
8200# reverse order
8201cf_add_0lib=
8202for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8203# filter duplicates
8204for cf_add_1lib in $cf_add_0lib; do
8205	for cf_add_2lib in $cf_add_libs; do
8206		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8207			cf_add_1lib=
8208			break
8209		fi
8210	done
8211	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8212done
8213LIBS="$cf_add_libs"
8214
8215fi
8216
8217	test "$cf_cv_have_utempter" != yes && use_utempter=no
8218else
8219	use_utempter=no
8220fi
8221
8222# Some configurations permit (or require) either setuid or setgid mode.
8223# Let the user decide.
8224if test "$use_utempter" = yes ; then
8225	if test "${enable_setuid+set}" != set ; then
8226		disable_setuid=yes
8227		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
8228
8229echo "${as_me:-configure}:8229: testing No --disable-setuid option given, force to yes ..." 1>&5
8230
8231	fi
8232fi
8233
8234###	checks for external data
8235
8236echo "$as_me:8236: checking if external errno is declared" >&5
8237echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8238if test "${cf_cv_dcl_errno+set}" = set; then
8239  echo $ECHO_N "(cached) $ECHO_C" >&6
8240else
8241
8242	cat >"conftest.$ac_ext" <<_ACEOF
8243#line 8243 "configure"
8244#include "confdefs.h"
8245
8246#ifdef HAVE_STDLIB_H
8247#include <stdlib.h>
8248#endif
8249#include <stdio.h>
8250#include <sys/types.h>
8251#include <errno.h>
8252int
8253main (void)
8254{
8255int x = (int) errno; (void)x
8256  ;
8257  return 0;
8258}
8259_ACEOF
8260rm -f "conftest.$ac_objext"
8261if { (eval echo "$as_me:8261: \"$ac_compile\"") >&5
8262  (eval $ac_compile) 2>&5
8263  ac_status=$?
8264  echo "$as_me:8264: \$? = $ac_status" >&5
8265  (exit "$ac_status"); } &&
8266         { ac_try='test -s "conftest.$ac_objext"'
8267  { (eval echo "$as_me:8267: \"$ac_try\"") >&5
8268  (eval $ac_try) 2>&5
8269  ac_status=$?
8270  echo "$as_me:8270: \$? = $ac_status" >&5
8271  (exit "$ac_status"); }; }; then
8272  cf_cv_dcl_errno=yes
8273else
8274  echo "$as_me: failed program was:" >&5
8275cat "conftest.$ac_ext" >&5
8276cf_cv_dcl_errno=no
8277fi
8278rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8279
8280fi
8281echo "$as_me:8281: result: $cf_cv_dcl_errno" >&5
8282echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8283
8284if test "$cf_cv_dcl_errno" = no ; then
8285
8286cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8287
8288	cat >>confdefs.h <<EOF
8289#define $cf_result 1
8290EOF
8291
8292fi
8293
8294# It's possible (for near-UNIX clones) that the data doesn't exist
8295
8296echo "$as_me:8296: checking if external errno exists" >&5
8297echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8298if test "${cf_cv_have_errno+set}" = set; then
8299  echo $ECHO_N "(cached) $ECHO_C" >&6
8300else
8301
8302	cat >"conftest.$ac_ext" <<_ACEOF
8303#line 8303 "configure"
8304#include "confdefs.h"
8305
8306#undef errno
8307extern int errno;
8308
8309int
8310main (void)
8311{
8312errno = 2
8313  ;
8314  return 0;
8315}
8316_ACEOF
8317rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8318if { (eval echo "$as_me:8318: \"$ac_link\"") >&5
8319  (eval $ac_link) 2>&5
8320  ac_status=$?
8321  echo "$as_me:8321: \$? = $ac_status" >&5
8322  (exit "$ac_status"); } &&
8323         { ac_try='test -s "conftest$ac_exeext"'
8324  { (eval echo "$as_me:8324: \"$ac_try\"") >&5
8325  (eval $ac_try) 2>&5
8326  ac_status=$?
8327  echo "$as_me:8327: \$? = $ac_status" >&5
8328  (exit "$ac_status"); }; }; then
8329  cf_cv_have_errno=yes
8330else
8331  echo "$as_me: failed program was:" >&5
8332cat "conftest.$ac_ext" >&5
8333cf_cv_have_errno=no
8334fi
8335rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8336
8337fi
8338echo "$as_me:8338: result: $cf_cv_have_errno" >&5
8339echo "${ECHO_T}$cf_cv_have_errno" >&6
8340
8341if test "$cf_cv_have_errno" = yes ; then
8342
8343cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8344
8345	cat >>confdefs.h <<EOF
8346#define $cf_result 1
8347EOF
8348
8349fi
8350
8351echo "$as_me:8351: checking for explicit tty group name" >&5
8352echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
8353
8354# Check whether --with-tty-group or --without-tty-group was given.
8355if test "${with_tty_group+set}" = set; then
8356  withval="$with_tty_group"
8357  cf_tty_group=$withval
8358else
8359  cf_tty_group=auto...
8360fi;
8361test -z "$cf_tty_group"    && cf_tty_group=auto...
8362test "$cf_tty_group" = yes && cf_tty_group=auto...
8363echo "$as_me:8363: result: $cf_tty_group" >&5
8364echo "${ECHO_T}$cf_tty_group" >&6
8365
8366if test "$cf_tty_group" = "auto..." ; then
8367echo "$as_me:8367: checking for tty group name" >&5
8368echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
8369if test "${cf_cv_tty_group_name+set}" = set; then
8370  echo $ECHO_N "(cached) $ECHO_C" >&6
8371else
8372
8373# If we are configuring as root, it is hard to get a clue about the tty group.
8374# But we'll guess based on how our connection is set up - assuming it is done
8375# properly.
8376
8377cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
8378# )vi
8379if test "$cf_uid" != 0 ; then
8380cf_cv_tty_group_name=
8381cf_tty_name="`tty`"
8382test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
8383test -z "$cf_tty_name" && cf_tty_name=/dev/tty
8384if test -c "$cf_tty_name"
8385then
8386	cf_option="-lL"
8387
8388	# Expect listing to have fields like this:
8389	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
8390	ls $cf_option "$cf_tty_name" >conftest.out
8391	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8392	if test -z "$cf_rest" ; then
8393		cf_option="${cf_option}g"
8394		ls "$cf_option" "$cf_tty_name" >conftest.out
8395		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8396	fi
8397	rm -f conftest.out
8398	cf_cv_tty_group_name=$cf_grp
8399fi
8400fi
8401
8402# If we cannot deduce the tty group, fall back on hardcoded cases
8403
8404if test -z "$cf_cv_tty_group_name"
8405then
8406case $host_os in
8407(osf*)
8408	cf_cv_tty_group_name="terminal"
8409	;;
8410(*)
8411	cf_cv_tty_group_name="unknown"
8412	if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
8413		cf_cv_tty_group_name="tty"
8414	fi
8415	;;
8416esac
8417fi
8418
8419fi
8420echo "$as_me:8420: result: $cf_cv_tty_group_name" >&5
8421echo "${ECHO_T}$cf_cv_tty_group_name" >&6
8422cf_tty_group="$cf_cv_tty_group_name"
8423else
8424	# if configure option, always do this
8425
8426cat >>confdefs.h <<\EOF
8427#define USE_TTY_GROUP 1
8428EOF
8429
8430fi
8431
8432cat >>confdefs.h <<EOF
8433#define TTY_GROUP_NAME "$cf_tty_group"
8434EOF
8435
8436# This is only a double-check that the group-name we obtained above really
8437# does apply to the device.  We cannot perform this test if we are in batch
8438# mode, or if we are cross-compiling.
8439
8440echo "$as_me:8440: checking if we may use the $cf_tty_group group" >&5
8441echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
8442if test "${cf_cv_tty_group+set}" = set; then
8443  echo $ECHO_N "(cached) $ECHO_C" >&6
8444else
8445
8446cf_tty_name="`tty`"
8447if test "$cf_tty_name" != "not a tty"
8448then
8449if test "$cross_compiling" = yes; then
8450  cf_cv_tty_group=unknown
8451else
8452  cat >"conftest.$ac_ext" <<_ACEOF
8453#line 8453 "configure"
8454#include "confdefs.h"
8455
8456#include <unistd.h>
8457#include <sys/types.h>
8458#include <sys/stat.h>
8459#include <grp.h>
8460int main(void)
8461{
8462	struct stat sb;
8463	struct group *ttygrp;
8464	int fd;
8465	char *name;
8466
8467	for (fd = 0; fd < 3; ++fd) {
8468		if ((name = ttyname(fd)) != 0)
8469			break;
8470	}
8471	if (name == 0)
8472		name = "/dev/tty";
8473
8474	ttygrp = getgrnam(TTY_GROUP_NAME);
8475	endgrent();
8476
8477	if (ttygrp != 0
8478	 && name != 0
8479	 && stat(name, &sb) == 0
8480	 && sb.st_gid != getgid()
8481	 && sb.st_gid == ttygrp->gr_gid) {
8482		${cf_cv_main_return:-return} (0);
8483	}
8484	${cf_cv_main_return:-return} (1);
8485}
8486
8487_ACEOF
8488rm -f "conftest$ac_exeext"
8489if { (eval echo "$as_me:8489: \"$ac_link\"") >&5
8490  (eval $ac_link) 2>&5
8491  ac_status=$?
8492  echo "$as_me:8492: \$? = $ac_status" >&5
8493  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8494  { (eval echo "$as_me:8494: \"$ac_try\"") >&5
8495  (eval $ac_try) 2>&5
8496  ac_status=$?
8497  echo "$as_me:8497: \$? = $ac_status" >&5
8498  (exit "$ac_status"); }; }; then
8499  cf_cv_tty_group=yes
8500else
8501  echo "$as_me: program exited with status $ac_status" >&5
8502echo "$as_me: failed program was:" >&5
8503cat "conftest.$ac_ext" >&5
8504cf_cv_tty_group=no
8505fi
8506rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8507fi
8508elif test "$cross_compiling" = yes; then
8509	cf_cv_tty_group=unknown
8510else
8511	cf_cv_tty_group=yes
8512fi
8513
8514fi
8515echo "$as_me:8515: result: $cf_cv_tty_group" >&5
8516echo "${ECHO_T}$cf_cv_tty_group" >&6
8517
8518if test $cf_cv_tty_group = no ; then
8519	{ echo "$as_me:8519: WARNING: Cannot use $cf_tty_group group" >&5
8520echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
8521else
8522	cat >>confdefs.h <<\EOF
8523#define USE_TTY_GROUP 1
8524EOF
8525
8526fi
8527
8528###	checks for system services and user specified options
8529
8530echo "$as_me:8530: checking for X" >&5
8531echo $ECHO_N "checking for X... $ECHO_C" >&6
8532
8533# Check whether --with-x or --without-x was given.
8534if test "${with_x+set}" = set; then
8535  withval="$with_x"
8536
8537fi;
8538# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8539if test "x$with_x" = xno; then
8540  # The user explicitly disabled X.
8541  have_x=disabled
8542else
8543  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8544    # Both variables are already set.
8545    have_x=yes
8546  else
8547    if test "${ac_cv_have_x+set}" = set; then
8548  echo $ECHO_N "(cached) $ECHO_C" >&6
8549else
8550  # One or both of the vars are not set, and there is no cached value.
8551ac_x_includes=no ac_x_libraries=no
8552rm -fr conftest.dir
8553if mkdir conftest.dir; then
8554  cd conftest.dir
8555  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8556  cat >Imakefile <<'EOF'
8557acfindx:
8558	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8559EOF
8560  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8561    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8562    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
8563    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8564    for ac_extension in a so sl dylib dll; do
8565      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8566         test -f "$ac_im_libdir/libX11.$ac_extension"; then
8567        ac_im_usrlibdir=$ac_im_libdir; break
8568      fi
8569    done
8570    # Screen out bogus values from the imake configuration.  They are
8571    # bogus both because they are the default anyway, and because
8572    # using them would break gcc on systems where it needs fixed includes.
8573    case $ac_im_incroot in
8574	/usr/include) ;;
8575	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8576    esac
8577    case $ac_im_usrlibdir in
8578	/usr/lib | /lib) ;;
8579	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8580    esac
8581  fi
8582  cd ..
8583  rm -fr conftest.dir
8584fi
8585
8586# Standard set of common directories for X headers.
8587# Check X11 before X11Rn because it is often a symlink to the current release.
8588ac_x_header_dirs='
8589/usr/X11/include
8590/usr/X11R7/include
8591/usr/X11R6/include
8592/usr/X11R5/include
8593/usr/X11R4/include
8594
8595/opt/local/include
8596/opt/X11/include
8597
8598/usr/include/X11
8599/usr/include/X11R7
8600/usr/include/X11R6
8601/usr/include/X11R5
8602/usr/include/X11R4
8603
8604/usr/local/X11/include
8605/usr/local/X11R7/include
8606/usr/local/X11R6/include
8607/usr/local/X11R5/include
8608/usr/local/X11R4/include
8609
8610/usr/local/include/X11
8611/usr/local/include/X11R7
8612/usr/local/include/X11R6
8613/usr/local/include/X11R5
8614/usr/local/include/X11R4
8615
8616/usr/X386/include
8617/usr/x386/include
8618/usr/XFree86/include/X11
8619
8620/usr/include
8621/usr/local/include
8622/usr/unsupported/include
8623/usr/athena/include
8624/usr/local/x11r5/include
8625/usr/lpp/Xamples/include
8626
8627/usr/openwin/include
8628/usr/openwin/share/include'
8629
8630if test "$ac_x_includes" = no; then
8631  # Guess where to find include files, by looking for Intrinsic.h.
8632  # First, try using that file with no special directory specified.
8633  cat >"conftest.$ac_ext" <<_ACEOF
8634#line 8634 "configure"
8635#include "confdefs.h"
8636#include <X11/Intrinsic.h>
8637_ACEOF
8638if { (eval echo "$as_me:8638: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8639  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8640  ac_status=$?
8641  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8642  rm -f conftest.er1
8643  cat conftest.err >&5
8644  echo "$as_me:8644: \$? = $ac_status" >&5
8645  (exit "$ac_status"); } >/dev/null; then
8646  if test -s conftest.err; then
8647    ac_cpp_err=$ac_c_preproc_warn_flag
8648  else
8649    ac_cpp_err=
8650  fi
8651else
8652  ac_cpp_err=yes
8653fi
8654if test -z "$ac_cpp_err"; then
8655  # We can compile using X headers with no special include directory.
8656ac_x_includes=
8657else
8658  echo "$as_me: failed program was:" >&5
8659  cat "conftest.$ac_ext" >&5
8660  for ac_dir in $ac_x_header_dirs; do
8661  if test -r "$ac_dir/X11/Intrinsic.h"; then
8662    ac_x_includes=$ac_dir
8663    break
8664  fi
8665done
8666fi
8667rm -f conftest.err "conftest.$ac_ext"
8668fi # $ac_x_includes = no
8669
8670if test "$ac_x_libraries" = no; then
8671  # Check for the libraries.
8672  # See if we find them without any special options.
8673  # Don't add to $LIBS permanently.
8674  ac_save_LIBS=$LIBS
8675  LIBS="-lXt $LIBS"
8676  cat >"conftest.$ac_ext" <<_ACEOF
8677#line 8677 "configure"
8678#include "confdefs.h"
8679#include <X11/Intrinsic.h>
8680int
8681main (void)
8682{
8683XtMalloc (0)
8684  ;
8685  return 0;
8686}
8687_ACEOF
8688rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8689if { (eval echo "$as_me:8689: \"$ac_link\"") >&5
8690  (eval $ac_link) 2>&5
8691  ac_status=$?
8692  echo "$as_me:8692: \$? = $ac_status" >&5
8693  (exit "$ac_status"); } &&
8694         { ac_try='test -s "conftest$ac_exeext"'
8695  { (eval echo "$as_me:8695: \"$ac_try\"") >&5
8696  (eval $ac_try) 2>&5
8697  ac_status=$?
8698  echo "$as_me:8698: \$? = $ac_status" >&5
8699  (exit "$ac_status"); }; }; then
8700  LIBS=$ac_save_LIBS
8701# We can link X programs with no special library path.
8702ac_x_libraries=
8703else
8704  echo "$as_me: failed program was:" >&5
8705cat "conftest.$ac_ext" >&5
8706LIBS=$ac_save_LIBS
8707for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8708do
8709  # Don't even attempt the hair of trying to link an X program!
8710  for ac_extension in a so sl dylib dll; do
8711    if test -r "$ac_dir/libXt.$ac_extension"; then
8712      ac_x_libraries=$ac_dir
8713      break 2
8714    fi
8715  done
8716done
8717fi
8718rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8719fi # $ac_x_libraries = no
8720
8721if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8722  # Didn't find X anywhere.  Cache the known absence of X.
8723  ac_cv_have_x="have_x=no"
8724else
8725  # Record where we found X for the cache.
8726  ac_cv_have_x="have_x=yes \
8727	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8728fi
8729fi
8730
8731  fi
8732  eval "$ac_cv_have_x"
8733fi # $with_x != no
8734
8735if test "$have_x" != yes; then
8736  echo "$as_me:8736: result: $have_x" >&5
8737echo "${ECHO_T}$have_x" >&6
8738  no_x=yes
8739else
8740  # If each of the values was on the command line, it overrides each guess.
8741  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8742  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8743  # Update the cache value to reflect the command line values.
8744  ac_cv_have_x="have_x=yes \
8745		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8746  echo "$as_me:8746: result: libraries $x_libraries, headers $x_includes" >&5
8747echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8748fi
8749
8750if test "$no_x" = yes; then
8751  # Not all programs may use this symbol, but it does not hurt to define it.
8752
8753cat >>confdefs.h <<\EOF
8754#define X_DISPLAY_MISSING 1
8755EOF
8756
8757  X_CFLAGS=
8758  X_PRE_LIBS=
8759  X_LIBS=
8760  X_EXTRA_LIBS=
8761else
8762  if test -n "$x_includes"; then
8763    X_CFLAGS="$X_CFLAGS -I$x_includes"
8764  fi
8765
8766  # It would also be nice to do this for all -L options, not just this one.
8767  if test -n "$x_libraries"; then
8768    X_LIBS="$X_LIBS -L$x_libraries"
8769    # For Solaris; some versions of Sun CC require a space after -R and
8770    # others require no space.  Words are not sufficient . . . .
8771    case `(uname -sr) 2>/dev/null` in
8772    "SunOS 5"*)
8773      echo "$as_me:8773: checking whether -R must be followed by a space" >&5
8774echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8775      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8776      cat >"conftest.$ac_ext" <<_ACEOF
8777#line 8777 "configure"
8778#include "confdefs.h"
8779
8780int
8781main (void)
8782{
8783
8784  ;
8785  return 0;
8786}
8787_ACEOF
8788rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8789if { (eval echo "$as_me:8789: \"$ac_link\"") >&5
8790  (eval $ac_link) 2>&5
8791  ac_status=$?
8792  echo "$as_me:8792: \$? = $ac_status" >&5
8793  (exit "$ac_status"); } &&
8794         { ac_try='test -s "conftest$ac_exeext"'
8795  { (eval echo "$as_me:8795: \"$ac_try\"") >&5
8796  (eval $ac_try) 2>&5
8797  ac_status=$?
8798  echo "$as_me:8798: \$? = $ac_status" >&5
8799  (exit "$ac_status"); }; }; then
8800  ac_R_nospace=yes
8801else
8802  echo "$as_me: failed program was:" >&5
8803cat "conftest.$ac_ext" >&5
8804ac_R_nospace=no
8805fi
8806rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8807      if test $ac_R_nospace = yes; then
8808	echo "$as_me:8808: result: no" >&5
8809echo "${ECHO_T}no" >&6
8810	X_LIBS="$X_LIBS -R$x_libraries"
8811      else
8812	LIBS="$ac_xsave_LIBS -R $x_libraries"
8813	cat >"conftest.$ac_ext" <<_ACEOF
8814#line 8814 "configure"
8815#include "confdefs.h"
8816
8817int
8818main (void)
8819{
8820
8821  ;
8822  return 0;
8823}
8824_ACEOF
8825rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8826if { (eval echo "$as_me:8826: \"$ac_link\"") >&5
8827  (eval $ac_link) 2>&5
8828  ac_status=$?
8829  echo "$as_me:8829: \$? = $ac_status" >&5
8830  (exit "$ac_status"); } &&
8831         { ac_try='test -s "conftest$ac_exeext"'
8832  { (eval echo "$as_me:8832: \"$ac_try\"") >&5
8833  (eval $ac_try) 2>&5
8834  ac_status=$?
8835  echo "$as_me:8835: \$? = $ac_status" >&5
8836  (exit "$ac_status"); }; }; then
8837  ac_R_space=yes
8838else
8839  echo "$as_me: failed program was:" >&5
8840cat "conftest.$ac_ext" >&5
8841ac_R_space=no
8842fi
8843rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8844	if test $ac_R_space = yes; then
8845	  echo "$as_me:8845: result: yes" >&5
8846echo "${ECHO_T}yes" >&6
8847	  X_LIBS="$X_LIBS -R $x_libraries"
8848	else
8849	  echo "$as_me:8849: result: neither works" >&5
8850echo "${ECHO_T}neither works" >&6
8851	fi
8852      fi
8853      LIBS=$ac_xsave_LIBS
8854    esac
8855  fi
8856
8857  # Check for system-dependent libraries X programs must link with.
8858  # Do this before checking for the system-independent R6 libraries
8859  # (-lICE), since we may need -lsocket or whatever for X linking.
8860
8861  if test "$ISC" = yes; then
8862    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8863  else
8864    # Martyn Johnson says this is needed for Ultrix, if the X
8865    # libraries were built with DECnet support.  And Karl Berry says
8866    # the Alpha needs dnet_stub (dnet does not exist).
8867    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8868    cat >"conftest.$ac_ext" <<_ACEOF
8869#line 8869 "configure"
8870#include "confdefs.h"
8871
8872/* Override any gcc2 internal prototype to avoid an error.  */
8873#ifdef __cplusplus
8874extern "C"
8875#endif
8876/* We use char because int might match the return type of a gcc2
8877   builtin and then its argument prototype would still apply.  */
8878char XOpenDisplay ();
8879int
8880main (void)
8881{
8882XOpenDisplay ();
8883  ;
8884  return 0;
8885}
8886_ACEOF
8887rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8888if { (eval echo "$as_me:8888: \"$ac_link\"") >&5
8889  (eval $ac_link) 2>&5
8890  ac_status=$?
8891  echo "$as_me:8891: \$? = $ac_status" >&5
8892  (exit "$ac_status"); } &&
8893         { ac_try='test -s "conftest$ac_exeext"'
8894  { (eval echo "$as_me:8894: \"$ac_try\"") >&5
8895  (eval $ac_try) 2>&5
8896  ac_status=$?
8897  echo "$as_me:8897: \$? = $ac_status" >&5
8898  (exit "$ac_status"); }; }; then
8899  :
8900else
8901  echo "$as_me: failed program was:" >&5
8902cat "conftest.$ac_ext" >&5
8903echo "$as_me:8903: checking for dnet_ntoa in -ldnet" >&5
8904echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8905if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8906  echo $ECHO_N "(cached) $ECHO_C" >&6
8907else
8908  ac_check_lib_save_LIBS=$LIBS
8909LIBS="-ldnet  $LIBS"
8910cat >"conftest.$ac_ext" <<_ACEOF
8911#line 8911 "configure"
8912#include "confdefs.h"
8913
8914/* Override any gcc2 internal prototype to avoid an error.  */
8915#ifdef __cplusplus
8916extern "C"
8917#endif
8918/* We use char because int might match the return type of a gcc2
8919   builtin and then its argument prototype would still apply.  */
8920char dnet_ntoa ();
8921int
8922main (void)
8923{
8924dnet_ntoa ();
8925  ;
8926  return 0;
8927}
8928_ACEOF
8929rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8930if { (eval echo "$as_me:8930: \"$ac_link\"") >&5
8931  (eval $ac_link) 2>&5
8932  ac_status=$?
8933  echo "$as_me:8933: \$? = $ac_status" >&5
8934  (exit "$ac_status"); } &&
8935         { ac_try='test -s "conftest$ac_exeext"'
8936  { (eval echo "$as_me:8936: \"$ac_try\"") >&5
8937  (eval $ac_try) 2>&5
8938  ac_status=$?
8939  echo "$as_me:8939: \$? = $ac_status" >&5
8940  (exit "$ac_status"); }; }; then
8941  ac_cv_lib_dnet_dnet_ntoa=yes
8942else
8943  echo "$as_me: failed program was:" >&5
8944cat "conftest.$ac_ext" >&5
8945ac_cv_lib_dnet_dnet_ntoa=no
8946fi
8947rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8948LIBS=$ac_check_lib_save_LIBS
8949fi
8950echo "$as_me:8950: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8951echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8952if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
8953  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8954fi
8955
8956    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8957      echo "$as_me:8957: checking for dnet_ntoa in -ldnet_stub" >&5
8958echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8959if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8960  echo $ECHO_N "(cached) $ECHO_C" >&6
8961else
8962  ac_check_lib_save_LIBS=$LIBS
8963LIBS="-ldnet_stub  $LIBS"
8964cat >"conftest.$ac_ext" <<_ACEOF
8965#line 8965 "configure"
8966#include "confdefs.h"
8967
8968/* Override any gcc2 internal prototype to avoid an error.  */
8969#ifdef __cplusplus
8970extern "C"
8971#endif
8972/* We use char because int might match the return type of a gcc2
8973   builtin and then its argument prototype would still apply.  */
8974char dnet_ntoa ();
8975int
8976main (void)
8977{
8978dnet_ntoa ();
8979  ;
8980  return 0;
8981}
8982_ACEOF
8983rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8984if { (eval echo "$as_me:8984: \"$ac_link\"") >&5
8985  (eval $ac_link) 2>&5
8986  ac_status=$?
8987  echo "$as_me:8987: \$? = $ac_status" >&5
8988  (exit "$ac_status"); } &&
8989         { ac_try='test -s "conftest$ac_exeext"'
8990  { (eval echo "$as_me:8990: \"$ac_try\"") >&5
8991  (eval $ac_try) 2>&5
8992  ac_status=$?
8993  echo "$as_me:8993: \$? = $ac_status" >&5
8994  (exit "$ac_status"); }; }; then
8995  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8996else
8997  echo "$as_me: failed program was:" >&5
8998cat "conftest.$ac_ext" >&5
8999ac_cv_lib_dnet_stub_dnet_ntoa=no
9000fi
9001rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9002LIBS=$ac_check_lib_save_LIBS
9003fi
9004echo "$as_me:9004: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9005echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9006if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
9007  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9008fi
9009
9010    fi
9011fi
9012rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9013    LIBS="$ac_xsave_LIBS"
9014
9015    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9016    # to get the SysV transport functions.
9017    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9018    # needs -lnsl.
9019    # The nsl library prevents programs from opening the X display
9020    # on Irix 5.2, according to T.E. Dickey.
9021    # The functions gethostbyname, getservbyname, and inet_addr are
9022    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9023    echo "$as_me:9023: checking for gethostbyname" >&5
9024echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9025if test "${ac_cv_func_gethostbyname+set}" = set; then
9026  echo $ECHO_N "(cached) $ECHO_C" >&6
9027else
9028  cat >"conftest.$ac_ext" <<_ACEOF
9029#line 9029 "configure"
9030#include "confdefs.h"
9031#define gethostbyname autoconf_temporary
9032#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9033#undef gethostbyname
9034
9035#ifdef __cplusplus
9036extern "C"
9037#endif
9038
9039/* We use char because int might match the return type of a gcc2
9040   builtin and then its argument prototype would still apply.  */
9041char gethostbyname (void);
9042
9043int
9044main (void)
9045{
9046
9047/* The GNU C library defines stubs for functions which it implements
9048    to always fail with ENOSYS.  Some functions are actually named
9049    something starting with __ and the normal name is an alias.  */
9050#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9051#error found stub for gethostbyname
9052#endif
9053
9054	return gethostbyname ();
9055  ;
9056  return 0;
9057}
9058_ACEOF
9059rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9060if { (eval echo "$as_me:9060: \"$ac_link\"") >&5
9061  (eval $ac_link) 2>&5
9062  ac_status=$?
9063  echo "$as_me:9063: \$? = $ac_status" >&5
9064  (exit "$ac_status"); } &&
9065         { ac_try='test -s "conftest$ac_exeext"'
9066  { (eval echo "$as_me:9066: \"$ac_try\"") >&5
9067  (eval $ac_try) 2>&5
9068  ac_status=$?
9069  echo "$as_me:9069: \$? = $ac_status" >&5
9070  (exit "$ac_status"); }; }; then
9071  ac_cv_func_gethostbyname=yes
9072else
9073  echo "$as_me: failed program was:" >&5
9074cat "conftest.$ac_ext" >&5
9075ac_cv_func_gethostbyname=no
9076fi
9077rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9078fi
9079echo "$as_me:9079: result: $ac_cv_func_gethostbyname" >&5
9080echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9081
9082    if test $ac_cv_func_gethostbyname = no; then
9083      echo "$as_me:9083: checking for gethostbyname in -lnsl" >&5
9084echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9085if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9086  echo $ECHO_N "(cached) $ECHO_C" >&6
9087else
9088  ac_check_lib_save_LIBS=$LIBS
9089LIBS="-lnsl  $LIBS"
9090cat >"conftest.$ac_ext" <<_ACEOF
9091#line 9091 "configure"
9092#include "confdefs.h"
9093
9094/* Override any gcc2 internal prototype to avoid an error.  */
9095#ifdef __cplusplus
9096extern "C"
9097#endif
9098/* We use char because int might match the return type of a gcc2
9099   builtin and then its argument prototype would still apply.  */
9100char gethostbyname ();
9101int
9102main (void)
9103{
9104gethostbyname ();
9105  ;
9106  return 0;
9107}
9108_ACEOF
9109rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9110if { (eval echo "$as_me:9110: \"$ac_link\"") >&5
9111  (eval $ac_link) 2>&5
9112  ac_status=$?
9113  echo "$as_me:9113: \$? = $ac_status" >&5
9114  (exit "$ac_status"); } &&
9115         { ac_try='test -s "conftest$ac_exeext"'
9116  { (eval echo "$as_me:9116: \"$ac_try\"") >&5
9117  (eval $ac_try) 2>&5
9118  ac_status=$?
9119  echo "$as_me:9119: \$? = $ac_status" >&5
9120  (exit "$ac_status"); }; }; then
9121  ac_cv_lib_nsl_gethostbyname=yes
9122else
9123  echo "$as_me: failed program was:" >&5
9124cat "conftest.$ac_ext" >&5
9125ac_cv_lib_nsl_gethostbyname=no
9126fi
9127rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9128LIBS=$ac_check_lib_save_LIBS
9129fi
9130echo "$as_me:9130: result: $ac_cv_lib_nsl_gethostbyname" >&5
9131echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9132if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9133  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9134fi
9135
9136      if test $ac_cv_lib_nsl_gethostbyname = no; then
9137        echo "$as_me:9137: checking for gethostbyname in -lbsd" >&5
9138echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9139if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9140  echo $ECHO_N "(cached) $ECHO_C" >&6
9141else
9142  ac_check_lib_save_LIBS=$LIBS
9143LIBS="-lbsd  $LIBS"
9144cat >"conftest.$ac_ext" <<_ACEOF
9145#line 9145 "configure"
9146#include "confdefs.h"
9147
9148/* Override any gcc2 internal prototype to avoid an error.  */
9149#ifdef __cplusplus
9150extern "C"
9151#endif
9152/* We use char because int might match the return type of a gcc2
9153   builtin and then its argument prototype would still apply.  */
9154char gethostbyname ();
9155int
9156main (void)
9157{
9158gethostbyname ();
9159  ;
9160  return 0;
9161}
9162_ACEOF
9163rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9164if { (eval echo "$as_me:9164: \"$ac_link\"") >&5
9165  (eval $ac_link) 2>&5
9166  ac_status=$?
9167  echo "$as_me:9167: \$? = $ac_status" >&5
9168  (exit "$ac_status"); } &&
9169         { ac_try='test -s "conftest$ac_exeext"'
9170  { (eval echo "$as_me:9170: \"$ac_try\"") >&5
9171  (eval $ac_try) 2>&5
9172  ac_status=$?
9173  echo "$as_me:9173: \$? = $ac_status" >&5
9174  (exit "$ac_status"); }; }; then
9175  ac_cv_lib_bsd_gethostbyname=yes
9176else
9177  echo "$as_me: failed program was:" >&5
9178cat "conftest.$ac_ext" >&5
9179ac_cv_lib_bsd_gethostbyname=no
9180fi
9181rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9182LIBS=$ac_check_lib_save_LIBS
9183fi
9184echo "$as_me:9184: result: $ac_cv_lib_bsd_gethostbyname" >&5
9185echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9186if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9187  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9188fi
9189
9190      fi
9191    fi
9192
9193    # lieder@skyler.mavd.honeywell.com says without -lsocket,
9194    # socket/setsockopt and other routines are undefined under SCO ODT
9195    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9196    # on later versions), says Simon Leinen: it contains gethostby*
9197    # variants that don't use the nameserver (or something).  -lsocket
9198    # must be given before -lnsl if both are needed.  We assume that
9199    # if connect needs -lnsl, so does gethostbyname.
9200    echo "$as_me:9200: checking for connect" >&5
9201echo $ECHO_N "checking for connect... $ECHO_C" >&6
9202if test "${ac_cv_func_connect+set}" = set; then
9203  echo $ECHO_N "(cached) $ECHO_C" >&6
9204else
9205  cat >"conftest.$ac_ext" <<_ACEOF
9206#line 9206 "configure"
9207#include "confdefs.h"
9208#define connect autoconf_temporary
9209#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9210#undef connect
9211
9212#ifdef __cplusplus
9213extern "C"
9214#endif
9215
9216/* We use char because int might match the return type of a gcc2
9217   builtin and then its argument prototype would still apply.  */
9218char connect (void);
9219
9220int
9221main (void)
9222{
9223
9224/* The GNU C library defines stubs for functions which it implements
9225    to always fail with ENOSYS.  Some functions are actually named
9226    something starting with __ and the normal name is an alias.  */
9227#if defined (__stub_connect) || defined (__stub___connect)
9228#error found stub for connect
9229#endif
9230
9231	return connect ();
9232  ;
9233  return 0;
9234}
9235_ACEOF
9236rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9237if { (eval echo "$as_me:9237: \"$ac_link\"") >&5
9238  (eval $ac_link) 2>&5
9239  ac_status=$?
9240  echo "$as_me:9240: \$? = $ac_status" >&5
9241  (exit "$ac_status"); } &&
9242         { ac_try='test -s "conftest$ac_exeext"'
9243  { (eval echo "$as_me:9243: \"$ac_try\"") >&5
9244  (eval $ac_try) 2>&5
9245  ac_status=$?
9246  echo "$as_me:9246: \$? = $ac_status" >&5
9247  (exit "$ac_status"); }; }; then
9248  ac_cv_func_connect=yes
9249else
9250  echo "$as_me: failed program was:" >&5
9251cat "conftest.$ac_ext" >&5
9252ac_cv_func_connect=no
9253fi
9254rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9255fi
9256echo "$as_me:9256: result: $ac_cv_func_connect" >&5
9257echo "${ECHO_T}$ac_cv_func_connect" >&6
9258
9259    if test $ac_cv_func_connect = no; then
9260      echo "$as_me:9260: checking for connect in -lsocket" >&5
9261echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9262if test "${ac_cv_lib_socket_connect+set}" = set; then
9263  echo $ECHO_N "(cached) $ECHO_C" >&6
9264else
9265  ac_check_lib_save_LIBS=$LIBS
9266LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9267cat >"conftest.$ac_ext" <<_ACEOF
9268#line 9268 "configure"
9269#include "confdefs.h"
9270
9271/* Override any gcc2 internal prototype to avoid an error.  */
9272#ifdef __cplusplus
9273extern "C"
9274#endif
9275/* We use char because int might match the return type of a gcc2
9276   builtin and then its argument prototype would still apply.  */
9277char connect ();
9278int
9279main (void)
9280{
9281connect ();
9282  ;
9283  return 0;
9284}
9285_ACEOF
9286rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9287if { (eval echo "$as_me:9287: \"$ac_link\"") >&5
9288  (eval $ac_link) 2>&5
9289  ac_status=$?
9290  echo "$as_me:9290: \$? = $ac_status" >&5
9291  (exit "$ac_status"); } &&
9292         { ac_try='test -s "conftest$ac_exeext"'
9293  { (eval echo "$as_me:9293: \"$ac_try\"") >&5
9294  (eval $ac_try) 2>&5
9295  ac_status=$?
9296  echo "$as_me:9296: \$? = $ac_status" >&5
9297  (exit "$ac_status"); }; }; then
9298  ac_cv_lib_socket_connect=yes
9299else
9300  echo "$as_me: failed program was:" >&5
9301cat "conftest.$ac_ext" >&5
9302ac_cv_lib_socket_connect=no
9303fi
9304rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9305LIBS=$ac_check_lib_save_LIBS
9306fi
9307echo "$as_me:9307: result: $ac_cv_lib_socket_connect" >&5
9308echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9309if test "$ac_cv_lib_socket_connect" = yes; then
9310  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9311fi
9312
9313    fi
9314
9315    # Guillermo Gomez says -lposix is necessary on A/UX.
9316    echo "$as_me:9316: checking for remove" >&5
9317echo $ECHO_N "checking for remove... $ECHO_C" >&6
9318if test "${ac_cv_func_remove+set}" = set; then
9319  echo $ECHO_N "(cached) $ECHO_C" >&6
9320else
9321  cat >"conftest.$ac_ext" <<_ACEOF
9322#line 9322 "configure"
9323#include "confdefs.h"
9324#define remove autoconf_temporary
9325#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9326#undef remove
9327
9328#ifdef __cplusplus
9329extern "C"
9330#endif
9331
9332/* We use char because int might match the return type of a gcc2
9333   builtin and then its argument prototype would still apply.  */
9334char remove (void);
9335
9336int
9337main (void)
9338{
9339
9340/* The GNU C library defines stubs for functions which it implements
9341    to always fail with ENOSYS.  Some functions are actually named
9342    something starting with __ and the normal name is an alias.  */
9343#if defined (__stub_remove) || defined (__stub___remove)
9344#error found stub for remove
9345#endif
9346
9347	return remove ();
9348  ;
9349  return 0;
9350}
9351_ACEOF
9352rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9353if { (eval echo "$as_me:9353: \"$ac_link\"") >&5
9354  (eval $ac_link) 2>&5
9355  ac_status=$?
9356  echo "$as_me:9356: \$? = $ac_status" >&5
9357  (exit "$ac_status"); } &&
9358         { ac_try='test -s "conftest$ac_exeext"'
9359  { (eval echo "$as_me:9359: \"$ac_try\"") >&5
9360  (eval $ac_try) 2>&5
9361  ac_status=$?
9362  echo "$as_me:9362: \$? = $ac_status" >&5
9363  (exit "$ac_status"); }; }; then
9364  ac_cv_func_remove=yes
9365else
9366  echo "$as_me: failed program was:" >&5
9367cat "conftest.$ac_ext" >&5
9368ac_cv_func_remove=no
9369fi
9370rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9371fi
9372echo "$as_me:9372: result: $ac_cv_func_remove" >&5
9373echo "${ECHO_T}$ac_cv_func_remove" >&6
9374
9375    if test $ac_cv_func_remove = no; then
9376      echo "$as_me:9376: checking for remove in -lposix" >&5
9377echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9378if test "${ac_cv_lib_posix_remove+set}" = set; then
9379  echo $ECHO_N "(cached) $ECHO_C" >&6
9380else
9381  ac_check_lib_save_LIBS=$LIBS
9382LIBS="-lposix  $LIBS"
9383cat >"conftest.$ac_ext" <<_ACEOF
9384#line 9384 "configure"
9385#include "confdefs.h"
9386
9387/* Override any gcc2 internal prototype to avoid an error.  */
9388#ifdef __cplusplus
9389extern "C"
9390#endif
9391/* We use char because int might match the return type of a gcc2
9392   builtin and then its argument prototype would still apply.  */
9393char remove ();
9394int
9395main (void)
9396{
9397remove ();
9398  ;
9399  return 0;
9400}
9401_ACEOF
9402rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9403if { (eval echo "$as_me:9403: \"$ac_link\"") >&5
9404  (eval $ac_link) 2>&5
9405  ac_status=$?
9406  echo "$as_me:9406: \$? = $ac_status" >&5
9407  (exit "$ac_status"); } &&
9408         { ac_try='test -s "conftest$ac_exeext"'
9409  { (eval echo "$as_me:9409: \"$ac_try\"") >&5
9410  (eval $ac_try) 2>&5
9411  ac_status=$?
9412  echo "$as_me:9412: \$? = $ac_status" >&5
9413  (exit "$ac_status"); }; }; then
9414  ac_cv_lib_posix_remove=yes
9415else
9416  echo "$as_me: failed program was:" >&5
9417cat "conftest.$ac_ext" >&5
9418ac_cv_lib_posix_remove=no
9419fi
9420rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9421LIBS=$ac_check_lib_save_LIBS
9422fi
9423echo "$as_me:9423: result: $ac_cv_lib_posix_remove" >&5
9424echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9425if test "$ac_cv_lib_posix_remove" = yes; then
9426  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9427fi
9428
9429    fi
9430
9431    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9432    echo "$as_me:9432: checking for shmat" >&5
9433echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9434if test "${ac_cv_func_shmat+set}" = set; then
9435  echo $ECHO_N "(cached) $ECHO_C" >&6
9436else
9437  cat >"conftest.$ac_ext" <<_ACEOF
9438#line 9438 "configure"
9439#include "confdefs.h"
9440#define shmat autoconf_temporary
9441#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9442#undef shmat
9443
9444#ifdef __cplusplus
9445extern "C"
9446#endif
9447
9448/* We use char because int might match the return type of a gcc2
9449   builtin and then its argument prototype would still apply.  */
9450char shmat (void);
9451
9452int
9453main (void)
9454{
9455
9456/* The GNU C library defines stubs for functions which it implements
9457    to always fail with ENOSYS.  Some functions are actually named
9458    something starting with __ and the normal name is an alias.  */
9459#if defined (__stub_shmat) || defined (__stub___shmat)
9460#error found stub for shmat
9461#endif
9462
9463	return shmat ();
9464  ;
9465  return 0;
9466}
9467_ACEOF
9468rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9469if { (eval echo "$as_me:9469: \"$ac_link\"") >&5
9470  (eval $ac_link) 2>&5
9471  ac_status=$?
9472  echo "$as_me:9472: \$? = $ac_status" >&5
9473  (exit "$ac_status"); } &&
9474         { ac_try='test -s "conftest$ac_exeext"'
9475  { (eval echo "$as_me:9475: \"$ac_try\"") >&5
9476  (eval $ac_try) 2>&5
9477  ac_status=$?
9478  echo "$as_me:9478: \$? = $ac_status" >&5
9479  (exit "$ac_status"); }; }; then
9480  ac_cv_func_shmat=yes
9481else
9482  echo "$as_me: failed program was:" >&5
9483cat "conftest.$ac_ext" >&5
9484ac_cv_func_shmat=no
9485fi
9486rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9487fi
9488echo "$as_me:9488: result: $ac_cv_func_shmat" >&5
9489echo "${ECHO_T}$ac_cv_func_shmat" >&6
9490
9491    if test $ac_cv_func_shmat = no; then
9492      echo "$as_me:9492: checking for shmat in -lipc" >&5
9493echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9494if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9495  echo $ECHO_N "(cached) $ECHO_C" >&6
9496else
9497  ac_check_lib_save_LIBS=$LIBS
9498LIBS="-lipc  $LIBS"
9499cat >"conftest.$ac_ext" <<_ACEOF
9500#line 9500 "configure"
9501#include "confdefs.h"
9502
9503/* Override any gcc2 internal prototype to avoid an error.  */
9504#ifdef __cplusplus
9505extern "C"
9506#endif
9507/* We use char because int might match the return type of a gcc2
9508   builtin and then its argument prototype would still apply.  */
9509char shmat ();
9510int
9511main (void)
9512{
9513shmat ();
9514  ;
9515  return 0;
9516}
9517_ACEOF
9518rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9519if { (eval echo "$as_me:9519: \"$ac_link\"") >&5
9520  (eval $ac_link) 2>&5
9521  ac_status=$?
9522  echo "$as_me:9522: \$? = $ac_status" >&5
9523  (exit "$ac_status"); } &&
9524         { ac_try='test -s "conftest$ac_exeext"'
9525  { (eval echo "$as_me:9525: \"$ac_try\"") >&5
9526  (eval $ac_try) 2>&5
9527  ac_status=$?
9528  echo "$as_me:9528: \$? = $ac_status" >&5
9529  (exit "$ac_status"); }; }; then
9530  ac_cv_lib_ipc_shmat=yes
9531else
9532  echo "$as_me: failed program was:" >&5
9533cat "conftest.$ac_ext" >&5
9534ac_cv_lib_ipc_shmat=no
9535fi
9536rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9537LIBS=$ac_check_lib_save_LIBS
9538fi
9539echo "$as_me:9539: result: $ac_cv_lib_ipc_shmat" >&5
9540echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9541if test "$ac_cv_lib_ipc_shmat" = yes; then
9542  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9543fi
9544
9545    fi
9546  fi
9547
9548  # Check for libraries that X11R6 Xt/Xaw programs need.
9549  ac_save_LDFLAGS=$LDFLAGS
9550  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9551  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9552  # check for ICE first), but we must link in the order -lSM -lICE or
9553  # we get undefined symbols.  So assume we have SM if we have ICE.
9554  # These have to be linked with before -lX11, unlike the other
9555  # libraries we check for below, so use a different variable.
9556  # John Interrante, Karl Berry
9557  echo "$as_me:9557: checking for IceConnectionNumber in -lICE" >&5
9558echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9559if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9560  echo $ECHO_N "(cached) $ECHO_C" >&6
9561else
9562  ac_check_lib_save_LIBS=$LIBS
9563LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9564cat >"conftest.$ac_ext" <<_ACEOF
9565#line 9565 "configure"
9566#include "confdefs.h"
9567
9568/* Override any gcc2 internal prototype to avoid an error.  */
9569#ifdef __cplusplus
9570extern "C"
9571#endif
9572/* We use char because int might match the return type of a gcc2
9573   builtin and then its argument prototype would still apply.  */
9574char IceConnectionNumber ();
9575int
9576main (void)
9577{
9578IceConnectionNumber ();
9579  ;
9580  return 0;
9581}
9582_ACEOF
9583rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9584if { (eval echo "$as_me:9584: \"$ac_link\"") >&5
9585  (eval $ac_link) 2>&5
9586  ac_status=$?
9587  echo "$as_me:9587: \$? = $ac_status" >&5
9588  (exit "$ac_status"); } &&
9589         { ac_try='test -s "conftest$ac_exeext"'
9590  { (eval echo "$as_me:9590: \"$ac_try\"") >&5
9591  (eval $ac_try) 2>&5
9592  ac_status=$?
9593  echo "$as_me:9593: \$? = $ac_status" >&5
9594  (exit "$ac_status"); }; }; then
9595  ac_cv_lib_ICE_IceConnectionNumber=yes
9596else
9597  echo "$as_me: failed program was:" >&5
9598cat "conftest.$ac_ext" >&5
9599ac_cv_lib_ICE_IceConnectionNumber=no
9600fi
9601rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9602LIBS=$ac_check_lib_save_LIBS
9603fi
9604echo "$as_me:9604: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9605echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9606if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
9607  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9608fi
9609
9610  LDFLAGS=$ac_save_LDFLAGS
9611
9612fi
9613
9614echo "$as_me:9614: checking for sys/wait.h that is POSIX.1 compatible" >&5
9615echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9616if test "${ac_cv_header_sys_wait_h+set}" = set; then
9617  echo $ECHO_N "(cached) $ECHO_C" >&6
9618else
9619  cat >"conftest.$ac_ext" <<_ACEOF
9620#line 9620 "configure"
9621#include "confdefs.h"
9622#include <sys/types.h>
9623#include <sys/wait.h>
9624#ifndef WEXITSTATUS
9625# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9626#endif
9627#ifndef WIFEXITED
9628# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9629#endif
9630
9631int
9632main (void)
9633{
9634  int s;
9635  wait (&s);
9636  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9637  ;
9638  return 0;
9639}
9640_ACEOF
9641rm -f "conftest.$ac_objext"
9642if { (eval echo "$as_me:9642: \"$ac_compile\"") >&5
9643  (eval $ac_compile) 2>&5
9644  ac_status=$?
9645  echo "$as_me:9645: \$? = $ac_status" >&5
9646  (exit "$ac_status"); } &&
9647         { ac_try='test -s "conftest.$ac_objext"'
9648  { (eval echo "$as_me:9648: \"$ac_try\"") >&5
9649  (eval $ac_try) 2>&5
9650  ac_status=$?
9651  echo "$as_me:9651: \$? = $ac_status" >&5
9652  (exit "$ac_status"); }; }; then
9653  ac_cv_header_sys_wait_h=yes
9654else
9655  echo "$as_me: failed program was:" >&5
9656cat "conftest.$ac_ext" >&5
9657ac_cv_header_sys_wait_h=no
9658fi
9659rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9660fi
9661echo "$as_me:9661: result: $ac_cv_header_sys_wait_h" >&5
9662echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
9663if test $ac_cv_header_sys_wait_h = yes; then
9664
9665cat >>confdefs.h <<\EOF
9666#define HAVE_SYS_WAIT_H 1
9667EOF
9668
9669fi
9670
9671echo "$as_me:9671: checking for POSIX wait functions" >&5
9672echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
9673if test "${cf_cv_posix_wait+set}" = set; then
9674  echo $ECHO_N "(cached) $ECHO_C" >&6
9675else
9676
9677cat >"conftest.$ac_ext" <<_ACEOF
9678#line 9678 "configure"
9679#include "confdefs.h"
9680
9681#include <stdlib.h>
9682#include <stdio.h>
9683#include <sys/types.h>
9684#ifdef HAVE_SYS_WAIT_H
9685#include <sys/wait.h>
9686#endif
9687
9688int
9689main (void)
9690{
9691
9692	int stat_loc;
9693	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
9694	pid_t pid2 = wait(&stat_loc);
9695	(void)pid;
9696	(void)pid2;
9697
9698  ;
9699  return 0;
9700}
9701_ACEOF
9702rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9703if { (eval echo "$as_me:9703: \"$ac_link\"") >&5
9704  (eval $ac_link) 2>&5
9705  ac_status=$?
9706  echo "$as_me:9706: \$? = $ac_status" >&5
9707  (exit "$ac_status"); } &&
9708         { ac_try='test -s "conftest$ac_exeext"'
9709  { (eval echo "$as_me:9709: \"$ac_try\"") >&5
9710  (eval $ac_try) 2>&5
9711  ac_status=$?
9712  echo "$as_me:9712: \$? = $ac_status" >&5
9713  (exit "$ac_status"); }; }; then
9714  cf_cv_posix_wait=yes
9715else
9716  echo "$as_me: failed program was:" >&5
9717cat "conftest.$ac_ext" >&5
9718cf_cv_posix_wait=no
9719fi
9720rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9721
9722fi
9723echo "$as_me:9723: result: $cf_cv_posix_wait" >&5
9724echo "${ECHO_T}$cf_cv_posix_wait" >&6
9725test "$cf_cv_posix_wait" = yes &&
9726cat >>confdefs.h <<\EOF
9727#define USE_POSIX_WAIT 1
9728EOF
9729
9730echo "$as_me:9730: checking if external sys_nerr is declared" >&5
9731echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
9732if test "${cf_cv_dcl_sys_nerr+set}" = set; then
9733  echo $ECHO_N "(cached) $ECHO_C" >&6
9734else
9735
9736	cat >"conftest.$ac_ext" <<_ACEOF
9737#line 9737 "configure"
9738#include "confdefs.h"
9739
9740#ifdef HAVE_STDLIB_H
9741#include <stdlib.h>
9742#endif
9743#include <stdio.h>
9744#include <sys/types.h>
9745#include <errno.h>
9746int
9747main (void)
9748{
9749int x = (int) sys_nerr; (void)x
9750  ;
9751  return 0;
9752}
9753_ACEOF
9754rm -f "conftest.$ac_objext"
9755if { (eval echo "$as_me:9755: \"$ac_compile\"") >&5
9756  (eval $ac_compile) 2>&5
9757  ac_status=$?
9758  echo "$as_me:9758: \$? = $ac_status" >&5
9759  (exit "$ac_status"); } &&
9760         { ac_try='test -s "conftest.$ac_objext"'
9761  { (eval echo "$as_me:9761: \"$ac_try\"") >&5
9762  (eval $ac_try) 2>&5
9763  ac_status=$?
9764  echo "$as_me:9764: \$? = $ac_status" >&5
9765  (exit "$ac_status"); }; }; then
9766  cf_cv_dcl_sys_nerr=yes
9767else
9768  echo "$as_me: failed program was:" >&5
9769cat "conftest.$ac_ext" >&5
9770cf_cv_dcl_sys_nerr=no
9771fi
9772rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9773
9774fi
9775echo "$as_me:9775: result: $cf_cv_dcl_sys_nerr" >&5
9776echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
9777
9778if test "$cf_cv_dcl_sys_nerr" = no ; then
9779
9780cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9781
9782	cat >>confdefs.h <<EOF
9783#define $cf_result 1
9784EOF
9785
9786fi
9787
9788# It's possible (for near-UNIX clones) that the data doesn't exist
9789
9790echo "$as_me:9790: checking if external sys_nerr exists" >&5
9791echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
9792if test "${cf_cv_have_sys_nerr+set}" = set; then
9793  echo $ECHO_N "(cached) $ECHO_C" >&6
9794else
9795
9796	cat >"conftest.$ac_ext" <<_ACEOF
9797#line 9797 "configure"
9798#include "confdefs.h"
9799
9800#undef sys_nerr
9801extern int sys_nerr;
9802
9803int
9804main (void)
9805{
9806sys_nerr = 2
9807  ;
9808  return 0;
9809}
9810_ACEOF
9811rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9812if { (eval echo "$as_me:9812: \"$ac_link\"") >&5
9813  (eval $ac_link) 2>&5
9814  ac_status=$?
9815  echo "$as_me:9815: \$? = $ac_status" >&5
9816  (exit "$ac_status"); } &&
9817         { ac_try='test -s "conftest$ac_exeext"'
9818  { (eval echo "$as_me:9818: \"$ac_try\"") >&5
9819  (eval $ac_try) 2>&5
9820  ac_status=$?
9821  echo "$as_me:9821: \$? = $ac_status" >&5
9822  (exit "$ac_status"); }; }; then
9823  cf_cv_have_sys_nerr=yes
9824else
9825  echo "$as_me: failed program was:" >&5
9826cat "conftest.$ac_ext" >&5
9827cf_cv_have_sys_nerr=no
9828fi
9829rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9830
9831fi
9832echo "$as_me:9832: result: $cf_cv_have_sys_nerr" >&5
9833echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
9834
9835if test "$cf_cv_have_sys_nerr" = yes ; then
9836
9837cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9838
9839	cat >>confdefs.h <<EOF
9840#define $cf_result 1
9841EOF
9842
9843fi
9844
9845echo "$as_me:9845: checking if external sys_errlist is declared" >&5
9846echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
9847if test "${cf_cv_dcl_sys_errlist+set}" = set; then
9848  echo $ECHO_N "(cached) $ECHO_C" >&6
9849else
9850
9851	cat >"conftest.$ac_ext" <<_ACEOF
9852#line 9852 "configure"
9853#include "confdefs.h"
9854
9855#ifdef HAVE_STDLIB_H
9856#include <stdlib.h>
9857#endif
9858#include <stdio.h>
9859#include <sys/types.h>
9860#include <errno.h>
9861int
9862main (void)
9863{
9864int x = (int) sys_errlist; (void)x
9865  ;
9866  return 0;
9867}
9868_ACEOF
9869rm -f "conftest.$ac_objext"
9870if { (eval echo "$as_me:9870: \"$ac_compile\"") >&5
9871  (eval $ac_compile) 2>&5
9872  ac_status=$?
9873  echo "$as_me:9873: \$? = $ac_status" >&5
9874  (exit "$ac_status"); } &&
9875         { ac_try='test -s "conftest.$ac_objext"'
9876  { (eval echo "$as_me:9876: \"$ac_try\"") >&5
9877  (eval $ac_try) 2>&5
9878  ac_status=$?
9879  echo "$as_me:9879: \$? = $ac_status" >&5
9880  (exit "$ac_status"); }; }; then
9881  cf_cv_dcl_sys_errlist=yes
9882else
9883  echo "$as_me: failed program was:" >&5
9884cat "conftest.$ac_ext" >&5
9885cf_cv_dcl_sys_errlist=no
9886fi
9887rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9888
9889fi
9890echo "$as_me:9890: result: $cf_cv_dcl_sys_errlist" >&5
9891echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
9892
9893if test "$cf_cv_dcl_sys_errlist" = no ; then
9894
9895cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9896
9897	cat >>confdefs.h <<EOF
9898#define $cf_result 1
9899EOF
9900
9901fi
9902
9903# It's possible (for near-UNIX clones) that the data doesn't exist
9904
9905echo "$as_me:9905: checking if external sys_errlist exists" >&5
9906echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
9907if test "${cf_cv_have_sys_errlist+set}" = set; then
9908  echo $ECHO_N "(cached) $ECHO_C" >&6
9909else
9910
9911	cat >"conftest.$ac_ext" <<_ACEOF
9912#line 9912 "configure"
9913#include "confdefs.h"
9914
9915#undef sys_errlist
9916extern int sys_errlist;
9917
9918int
9919main (void)
9920{
9921sys_errlist = 2
9922  ;
9923  return 0;
9924}
9925_ACEOF
9926rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9927if { (eval echo "$as_me:9927: \"$ac_link\"") >&5
9928  (eval $ac_link) 2>&5
9929  ac_status=$?
9930  echo "$as_me:9930: \$? = $ac_status" >&5
9931  (exit "$ac_status"); } &&
9932         { ac_try='test -s "conftest$ac_exeext"'
9933  { (eval echo "$as_me:9933: \"$ac_try\"") >&5
9934  (eval $ac_try) 2>&5
9935  ac_status=$?
9936  echo "$as_me:9936: \$? = $ac_status" >&5
9937  (exit "$ac_status"); }; }; then
9938  cf_cv_have_sys_errlist=yes
9939else
9940  echo "$as_me: failed program was:" >&5
9941cat "conftest.$ac_ext" >&5
9942cf_cv_have_sys_errlist=no
9943fi
9944rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9945
9946fi
9947echo "$as_me:9947: result: $cf_cv_have_sys_errlist" >&5
9948echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
9949
9950if test "$cf_cv_have_sys_errlist" = yes ; then
9951
9952cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9953
9954	cat >>confdefs.h <<EOF
9955#define $cf_result 1
9956EOF
9957
9958fi
9959
9960cf_save_LIBS_CF_SYSV="$LIBS"
9961cf_save_CFLAGS_CF_SYSV="$CFLAGS"
9962cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
9963LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
9964for cf_X_CFLAGS in $X_CFLAGS
9965do
9966	case "x$cf_X_CFLAGS" in
9967	x-[IUD]*)
9968		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
9969		;;
9970	*)
9971		CFLAGS="$CFLAGS $cf_X_CFLAGS"
9972		;;
9973	esac
9974done
9975
9976for ac_header in \
9977termios.h \
9978stdlib.h \
9979X11/Intrinsic.h \
9980
9981do
9982as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9983echo "$as_me:9983: checking for $ac_header" >&5
9984echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9985if eval "test \"\${$as_ac_Header+set}\" = set"; then
9986  echo $ECHO_N "(cached) $ECHO_C" >&6
9987else
9988  cat >"conftest.$ac_ext" <<_ACEOF
9989#line 9989 "configure"
9990#include "confdefs.h"
9991#include <$ac_header>
9992_ACEOF
9993if { (eval echo "$as_me:9993: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9994  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9995  ac_status=$?
9996  $EGREP -v '^ *\+' conftest.er1 >conftest.err
9997  rm -f conftest.er1
9998  cat conftest.err >&5
9999  echo "$as_me:9999: \$? = $ac_status" >&5
10000  (exit "$ac_status"); } >/dev/null; then
10001  if test -s conftest.err; then
10002    ac_cpp_err=$ac_c_preproc_warn_flag
10003  else
10004    ac_cpp_err=
10005  fi
10006else
10007  ac_cpp_err=yes
10008fi
10009if test -z "$ac_cpp_err"; then
10010  eval "$as_ac_Header=yes"
10011else
10012  echo "$as_me: failed program was:" >&5
10013  cat "conftest.$ac_ext" >&5
10014  eval "$as_ac_Header=no"
10015fi
10016rm -f conftest.err "conftest.$ac_ext"
10017fi
10018echo "$as_me:10018: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10019echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10020if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10021  cat >>confdefs.h <<EOF
10022#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10023EOF
10024
10025fi
10026done
10027
10028echo "$as_me:10028: checking if we should define SYSV" >&5
10029echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
10030if test "${cf_cv_sysv+set}" = set; then
10031  echo $ECHO_N "(cached) $ECHO_C" >&6
10032else
10033
10034cat >"conftest.$ac_ext" <<_ACEOF
10035#line 10035 "configure"
10036#include "confdefs.h"
10037
10038#undef  SYSV
10039#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
10040#ifdef HAVE_STDLIB_H
10041#include <stdlib.h>		/* look for wchar_t */
10042#endif
10043#ifdef HAVE_X11_INTRINSIC_H
10044#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
10045#endif
10046#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
10047#include <termios.h>
10048#define STRUCT_TERMIOS struct termios
10049#else
10050#define STRUCT_TERMIOS struct termio
10051#endif
10052#include <curses.h>
10053#include <term.h>		/* eliminate most BSD hacks */
10054#include <errno.h>		/* declare sys_errlist on older systems */
10055#include <sys/termio.h>		/* eliminate most of the remaining ones */
10056
10057int
10058main (void)
10059{
10060
10061static STRUCT_TERMIOS d_tio;
10062	d_tio.c_cc[VINTR] = 0;
10063	d_tio.c_cc[VQUIT] = 0;
10064	d_tio.c_cc[VERASE] = 0;
10065	d_tio.c_cc[VKILL] = 0;
10066	d_tio.c_cc[VEOF] = 0;
10067	d_tio.c_cc[VEOL] = 0;
10068	d_tio.c_cc[VMIN] = 0;
10069	d_tio.c_cc[VTIME] = 0;
10070#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
10071sys_errlist[0] = "";		/* Cygwin mis-declares this */
10072#endif
10073
10074  ;
10075  return 0;
10076}
10077_ACEOF
10078rm -f "conftest.$ac_objext"
10079if { (eval echo "$as_me:10079: \"$ac_compile\"") >&5
10080  (eval $ac_compile) 2>&5
10081  ac_status=$?
10082  echo "$as_me:10082: \$? = $ac_status" >&5
10083  (exit "$ac_status"); } &&
10084         { ac_try='test -s "conftest.$ac_objext"'
10085  { (eval echo "$as_me:10085: \"$ac_try\"") >&5
10086  (eval $ac_try) 2>&5
10087  ac_status=$?
10088  echo "$as_me:10088: \$? = $ac_status" >&5
10089  (exit "$ac_status"); }; }; then
10090  cf_cv_sysv=yes
10091else
10092  echo "$as_me: failed program was:" >&5
10093cat "conftest.$ac_ext" >&5
10094cf_cv_sysv=no
10095fi
10096rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10097
10098fi
10099echo "$as_me:10099: result: $cf_cv_sysv" >&5
10100echo "${ECHO_T}$cf_cv_sysv" >&6
10101test "$cf_cv_sysv" = yes &&
10102cat >>confdefs.h <<\EOF
10103#define SYSV 1
10104EOF
10105
10106LIBS="$cf_save_LIBS_CF_SYSV"
10107CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10108CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10109
10110echo "$as_me:10110: checking for elf_begin in -lelf" >&5
10111echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10112if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10113  echo $ECHO_N "(cached) $ECHO_C" >&6
10114else
10115  ac_check_lib_save_LIBS=$LIBS
10116LIBS="-lelf  $LIBS"
10117cat >"conftest.$ac_ext" <<_ACEOF
10118#line 10118 "configure"
10119#include "confdefs.h"
10120
10121/* Override any gcc2 internal prototype to avoid an error.  */
10122#ifdef __cplusplus
10123extern "C"
10124#endif
10125/* We use char because int might match the return type of a gcc2
10126   builtin and then its argument prototype would still apply.  */
10127char elf_begin ();
10128int
10129main (void)
10130{
10131elf_begin ();
10132  ;
10133  return 0;
10134}
10135_ACEOF
10136rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10137if { (eval echo "$as_me:10137: \"$ac_link\"") >&5
10138  (eval $ac_link) 2>&5
10139  ac_status=$?
10140  echo "$as_me:10140: \$? = $ac_status" >&5
10141  (exit "$ac_status"); } &&
10142         { ac_try='test -s "conftest$ac_exeext"'
10143  { (eval echo "$as_me:10143: \"$ac_try\"") >&5
10144  (eval $ac_try) 2>&5
10145  ac_status=$?
10146  echo "$as_me:10146: \$? = $ac_status" >&5
10147  (exit "$ac_status"); }; }; then
10148  ac_cv_lib_elf_elf_begin=yes
10149else
10150  echo "$as_me: failed program was:" >&5
10151cat "conftest.$ac_ext" >&5
10152ac_cv_lib_elf_elf_begin=no
10153fi
10154rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10155LIBS=$ac_check_lib_save_LIBS
10156fi
10157echo "$as_me:10157: result: $ac_cv_lib_elf_elf_begin" >&5
10158echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10159if test "$ac_cv_lib_elf_elf_begin" = yes; then
10160
10161echo "$as_me:10161: checking if this is an SVR4 system" >&5
10162echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10163if test "${cf_cv_svr4+set}" = set; then
10164  echo $ECHO_N "(cached) $ECHO_C" >&6
10165else
10166
10167cat >"conftest.$ac_ext" <<_ACEOF
10168#line 10168 "configure"
10169#include "confdefs.h"
10170
10171#if defined(__CYGWIN__)
10172make an error
10173#endif
10174#include <elf.h>
10175#include <sys/termio.h>
10176
10177int
10178main (void)
10179{
10180
10181static struct termio d_tio;
10182	d_tio.c_cc[VINTR] = 0;
10183	d_tio.c_cc[VQUIT] = 0;
10184	d_tio.c_cc[VERASE] = 0;
10185	d_tio.c_cc[VKILL] = 0;
10186	d_tio.c_cc[VEOF] = 0;
10187	d_tio.c_cc[VEOL] = 0;
10188	d_tio.c_cc[VMIN] = 0;
10189	d_tio.c_cc[VTIME] = 0;
10190	d_tio.c_cc[VLNEXT] = 0;
10191
10192  ;
10193  return 0;
10194}
10195_ACEOF
10196rm -f "conftest.$ac_objext"
10197if { (eval echo "$as_me:10197: \"$ac_compile\"") >&5
10198  (eval $ac_compile) 2>&5
10199  ac_status=$?
10200  echo "$as_me:10200: \$? = $ac_status" >&5
10201  (exit "$ac_status"); } &&
10202         { ac_try='test -s "conftest.$ac_objext"'
10203  { (eval echo "$as_me:10203: \"$ac_try\"") >&5
10204  (eval $ac_try) 2>&5
10205  ac_status=$?
10206  echo "$as_me:10206: \$? = $ac_status" >&5
10207  (exit "$ac_status"); }; }; then
10208  cf_cv_svr4=yes
10209else
10210  echo "$as_me: failed program was:" >&5
10211cat "conftest.$ac_ext" >&5
10212cf_cv_svr4=no
10213fi
10214rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10215
10216fi
10217echo "$as_me:10217: result: $cf_cv_svr4" >&5
10218echo "${ECHO_T}$cf_cv_svr4" >&6
10219
10220fi
10221
10222test "$cf_cv_svr4" = yes &&
10223cat >>confdefs.h <<\EOF
10224#define SVR4 1
10225EOF
10226
10227echo "$as_me:10227: checking if you want to use pkg-config" >&5
10228echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10229
10230# Check whether --with-pkg-config or --without-pkg-config was given.
10231if test "${with_pkg_config+set}" = set; then
10232  withval="$with_pkg_config"
10233  cf_pkg_config=$withval
10234else
10235  cf_pkg_config=yes
10236fi;
10237echo "$as_me:10237: result: $cf_pkg_config" >&5
10238echo "${ECHO_T}$cf_pkg_config" >&6
10239
10240case "$cf_pkg_config" in
10241(no)
10242	PKG_CONFIG=none
10243	;;
10244(yes)
10245
10246if test -n "$ac_tool_prefix"; then
10247  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10248set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10249echo "$as_me:10249: checking for $ac_word" >&5
10250echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10251if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10252  echo $ECHO_N "(cached) $ECHO_C" >&6
10253else
10254  case $PKG_CONFIG in
10255  [\\/]* | ?:[\\/]*)
10256  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10257  ;;
10258  *)
10259  ac_save_IFS=$IFS; IFS=$ac_path_separator
10260ac_dummy="$PATH"
10261for ac_dir in $ac_dummy; do
10262  IFS=$ac_save_IFS
10263  test -z "$ac_dir" && ac_dir=.
10264  if $as_executable_p "$ac_dir/$ac_word"; then
10265   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
10266   echo "$as_me:10266: found $ac_dir/$ac_word" >&5
10267   break
10268fi
10269done
10270
10271  ;;
10272esac
10273fi
10274PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10275
10276if test -n "$PKG_CONFIG"; then
10277  echo "$as_me:10277: result: $PKG_CONFIG" >&5
10278echo "${ECHO_T}$PKG_CONFIG" >&6
10279else
10280  echo "$as_me:10280: result: no" >&5
10281echo "${ECHO_T}no" >&6
10282fi
10283
10284fi
10285if test -z "$ac_cv_path_PKG_CONFIG"; then
10286  ac_pt_PKG_CONFIG=$PKG_CONFIG
10287  # Extract the first word of "pkg-config", so it can be a program name with args.
10288set dummy pkg-config; ac_word=$2
10289echo "$as_me:10289: checking for $ac_word" >&5
10290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10291if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
10292  echo $ECHO_N "(cached) $ECHO_C" >&6
10293else
10294  case $ac_pt_PKG_CONFIG in
10295  [\\/]* | ?:[\\/]*)
10296  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10297  ;;
10298  *)
10299  ac_save_IFS=$IFS; IFS=$ac_path_separator
10300ac_dummy="$PATH"
10301for ac_dir in $ac_dummy; do
10302  IFS=$ac_save_IFS
10303  test -z "$ac_dir" && ac_dir=.
10304  if $as_executable_p "$ac_dir/$ac_word"; then
10305   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
10306   echo "$as_me:10306: found $ac_dir/$ac_word" >&5
10307   break
10308fi
10309done
10310
10311  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
10312  ;;
10313esac
10314fi
10315ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10316
10317if test -n "$ac_pt_PKG_CONFIG"; then
10318  echo "$as_me:10318: result: $ac_pt_PKG_CONFIG" >&5
10319echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
10320else
10321  echo "$as_me:10321: result: no" >&5
10322echo "${ECHO_T}no" >&6
10323fi
10324
10325  PKG_CONFIG=$ac_pt_PKG_CONFIG
10326else
10327  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10328fi
10329
10330	;;
10331(*)
10332	PKG_CONFIG=$withval
10333	;;
10334esac
10335
10336test -z "$PKG_CONFIG" && PKG_CONFIG=none
10337if test "$PKG_CONFIG" != none ; then
10338
10339if test "x$prefix" != xNONE; then
10340	cf_path_syntax="$prefix"
10341else
10342	cf_path_syntax="$ac_default_prefix"
10343fi
10344
10345case ".$PKG_CONFIG" in
10346(.\$\(*\)*|.\'*\'*)
10347	;;
10348(..|./*|.\\*)
10349	;;
10350(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10351	;;
10352(.\$\{*prefix\}*|.\$\{*dir\}*)
10353	eval PKG_CONFIG="$PKG_CONFIG"
10354	case ".$PKG_CONFIG" in
10355	(.NONE/*)
10356		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10357		;;
10358	esac
10359	;;
10360(.no|.NONE/*)
10361	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10362	;;
10363(*)
10364	{ { echo "$as_me:10364: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
10365echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
10366   { (exit 1); exit 1; }; }
10367	;;
10368esac
10369
10370elif test "x$cf_pkg_config" != xno ; then
10371	{ echo "$as_me:10371: WARNING: pkg-config is not installed" >&5
10372echo "$as_me: WARNING: pkg-config is not installed" >&2;}
10373fi
10374
10375# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
10376# in some cases has installed dummy files in the former, other cases replaced
10377# it with a link to the new location).  This complicates the configure script.
10378# Check for that pitfall, and recover using pkg-config
10379#
10380# If none of these are set, the configuration is almost certainly broken.
10381if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10382then
10383
10384if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
10385	test -n "$verbose" && echo "	found package x11" 1>&6
10386
10387echo "${as_me:-configure}:10387: testing found package x11 ..." 1>&5
10388
10389	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
10390	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
10391	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10392
10393echo "${as_me:-configure}:10393: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10394
10395	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10396
10397echo "${as_me:-configure}:10397: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10398
10399cf_fix_cppflags=no
10400cf_new_cflags=
10401cf_new_cppflags=
10402cf_new_extra_cppflags=
10403
10404for cf_add_cflags in $cf_pkgconfig_incs
10405do
10406case "$cf_fix_cppflags" in
10407(no)
10408	case "$cf_add_cflags" in
10409	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10410		case "$cf_add_cflags" in
10411		(-D*)
10412			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10413
10414			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10415				&& test -z "${cf_tst_cflags}" \
10416				&& cf_fix_cppflags=yes
10417
10418			if test "$cf_fix_cppflags" = yes ; then
10419
10420	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10421	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10422
10423				continue
10424			elif test "${cf_tst_cflags}" = "\"'" ; then
10425
10426	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10427	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10428
10429				continue
10430			fi
10431			;;
10432		esac
10433		case "$CPPFLAGS" in
10434		(*$cf_add_cflags)
10435			;;
10436		(*)
10437			case "$cf_add_cflags" in
10438			(-D*)
10439				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10440
10441CPPFLAGS=`echo "$CPPFLAGS" | \
10442	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10443		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10444
10445				;;
10446			esac
10447
10448	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10449	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10450
10451			;;
10452		esac
10453		;;
10454	(*)
10455
10456	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10457	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10458
10459		;;
10460	esac
10461	;;
10462(yes)
10463
10464	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10465	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10466
10467	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10468
10469	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10470		&& test -z "${cf_tst_cflags}" \
10471		&& cf_fix_cppflags=no
10472	;;
10473esac
10474done
10475
10476if test -n "$cf_new_cflags" ; then
10477
10478	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10479	CFLAGS="${CFLAGS}$cf_new_cflags"
10480
10481fi
10482
10483if test -n "$cf_new_cppflags" ; then
10484
10485	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10486	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10487
10488fi
10489
10490if test -n "$cf_new_extra_cppflags" ; then
10491
10492	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10493	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10494
10495fi
10496
10497cf_add_libs="$LIBS"
10498# reverse order
10499cf_add_0lib=
10500for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10501# filter duplicates
10502for cf_add_1lib in $cf_add_0lib; do
10503	for cf_add_2lib in $cf_add_libs; do
10504		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10505			cf_add_1lib=
10506			break
10507		fi
10508	done
10509	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10510done
10511LIBS="$cf_add_libs"
10512
10513	:
10514else
10515	cf_pkgconfig_incs=
10516	cf_pkgconfig_libs=
10517	{ echo "$as_me:10517: WARNING: unable to find X11 library" >&5
10518echo "$as_me: WARNING: unable to find X11 library" >&2;}
10519fi
10520
10521if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
10522	test -n "$verbose" && echo "	found package ice" 1>&6
10523
10524echo "${as_me:-configure}:10524: testing found package ice ..." 1>&5
10525
10526	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
10527	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
10528	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10529
10530echo "${as_me:-configure}:10530: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10531
10532	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10533
10534echo "${as_me:-configure}:10534: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10535
10536cf_fix_cppflags=no
10537cf_new_cflags=
10538cf_new_cppflags=
10539cf_new_extra_cppflags=
10540
10541for cf_add_cflags in $cf_pkgconfig_incs
10542do
10543case "$cf_fix_cppflags" in
10544(no)
10545	case "$cf_add_cflags" in
10546	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10547		case "$cf_add_cflags" in
10548		(-D*)
10549			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10550
10551			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10552				&& test -z "${cf_tst_cflags}" \
10553				&& cf_fix_cppflags=yes
10554
10555			if test "$cf_fix_cppflags" = yes ; then
10556
10557	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10558	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10559
10560				continue
10561			elif test "${cf_tst_cflags}" = "\"'" ; then
10562
10563	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10564	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10565
10566				continue
10567			fi
10568			;;
10569		esac
10570		case "$CPPFLAGS" in
10571		(*$cf_add_cflags)
10572			;;
10573		(*)
10574			case "$cf_add_cflags" in
10575			(-D*)
10576				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10577
10578CPPFLAGS=`echo "$CPPFLAGS" | \
10579	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10580		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10581
10582				;;
10583			esac
10584
10585	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10586	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10587
10588			;;
10589		esac
10590		;;
10591	(*)
10592
10593	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10594	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10595
10596		;;
10597	esac
10598	;;
10599(yes)
10600
10601	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10602	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10603
10604	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10605
10606	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10607		&& test -z "${cf_tst_cflags}" \
10608		&& cf_fix_cppflags=no
10609	;;
10610esac
10611done
10612
10613if test -n "$cf_new_cflags" ; then
10614
10615	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10616	CFLAGS="${CFLAGS}$cf_new_cflags"
10617
10618fi
10619
10620if test -n "$cf_new_cppflags" ; then
10621
10622	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10623	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10624
10625fi
10626
10627if test -n "$cf_new_extra_cppflags" ; then
10628
10629	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10630	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10631
10632fi
10633
10634cf_add_libs="$LIBS"
10635# reverse order
10636cf_add_0lib=
10637for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10638# filter duplicates
10639for cf_add_1lib in $cf_add_0lib; do
10640	for cf_add_2lib in $cf_add_libs; do
10641		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10642			cf_add_1lib=
10643			break
10644		fi
10645	done
10646	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10647done
10648LIBS="$cf_add_libs"
10649
10650	:
10651else
10652	cf_pkgconfig_incs=
10653	cf_pkgconfig_libs=
10654	{ echo "$as_me:10654: WARNING: unable to find ICE library" >&5
10655echo "$as_me: WARNING: unable to find ICE library" >&2;}
10656fi
10657
10658if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
10659	test -n "$verbose" && echo "	found package sm" 1>&6
10660
10661echo "${as_me:-configure}:10661: testing found package sm ..." 1>&5
10662
10663	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
10664	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
10665	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10666
10667echo "${as_me:-configure}:10667: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10668
10669	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10670
10671echo "${as_me:-configure}:10671: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10672
10673cf_fix_cppflags=no
10674cf_new_cflags=
10675cf_new_cppflags=
10676cf_new_extra_cppflags=
10677
10678for cf_add_cflags in $cf_pkgconfig_incs
10679do
10680case "$cf_fix_cppflags" in
10681(no)
10682	case "$cf_add_cflags" in
10683	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10684		case "$cf_add_cflags" in
10685		(-D*)
10686			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10687
10688			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10689				&& test -z "${cf_tst_cflags}" \
10690				&& cf_fix_cppflags=yes
10691
10692			if test "$cf_fix_cppflags" = yes ; then
10693
10694	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10695	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10696
10697				continue
10698			elif test "${cf_tst_cflags}" = "\"'" ; then
10699
10700	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10701	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10702
10703				continue
10704			fi
10705			;;
10706		esac
10707		case "$CPPFLAGS" in
10708		(*$cf_add_cflags)
10709			;;
10710		(*)
10711			case "$cf_add_cflags" in
10712			(-D*)
10713				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10714
10715CPPFLAGS=`echo "$CPPFLAGS" | \
10716	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10717		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10718
10719				;;
10720			esac
10721
10722	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10723	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10724
10725			;;
10726		esac
10727		;;
10728	(*)
10729
10730	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10731	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10732
10733		;;
10734	esac
10735	;;
10736(yes)
10737
10738	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10739	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10740
10741	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10742
10743	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10744		&& test -z "${cf_tst_cflags}" \
10745		&& cf_fix_cppflags=no
10746	;;
10747esac
10748done
10749
10750if test -n "$cf_new_cflags" ; then
10751
10752	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10753	CFLAGS="${CFLAGS}$cf_new_cflags"
10754
10755fi
10756
10757if test -n "$cf_new_cppflags" ; then
10758
10759	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10760	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10761
10762fi
10763
10764if test -n "$cf_new_extra_cppflags" ; then
10765
10766	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10767	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10768
10769fi
10770
10771cf_add_libs="$LIBS"
10772# reverse order
10773cf_add_0lib=
10774for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10775# filter duplicates
10776for cf_add_1lib in $cf_add_0lib; do
10777	for cf_add_2lib in $cf_add_libs; do
10778		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10779			cf_add_1lib=
10780			break
10781		fi
10782	done
10783	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10784done
10785LIBS="$cf_add_libs"
10786
10787	:
10788else
10789	cf_pkgconfig_incs=
10790	cf_pkgconfig_libs=
10791	{ echo "$as_me:10791: WARNING: unable to find SM library" >&5
10792echo "$as_me: WARNING: unable to find SM library" >&2;}
10793fi
10794
10795if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10796	test -n "$verbose" && echo "	found package xt" 1>&6
10797
10798echo "${as_me:-configure}:10798: testing found package xt ..." 1>&5
10799
10800	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10801	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10802	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10803
10804echo "${as_me:-configure}:10804: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10805
10806	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10807
10808echo "${as_me:-configure}:10808: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10809
10810cf_fix_cppflags=no
10811cf_new_cflags=
10812cf_new_cppflags=
10813cf_new_extra_cppflags=
10814
10815for cf_add_cflags in $cf_pkgconfig_incs
10816do
10817case "$cf_fix_cppflags" in
10818(no)
10819	case "$cf_add_cflags" in
10820	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10821		case "$cf_add_cflags" in
10822		(-D*)
10823			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10824
10825			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10826				&& test -z "${cf_tst_cflags}" \
10827				&& cf_fix_cppflags=yes
10828
10829			if test "$cf_fix_cppflags" = yes ; then
10830
10831	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10832	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10833
10834				continue
10835			elif test "${cf_tst_cflags}" = "\"'" ; then
10836
10837	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10838	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10839
10840				continue
10841			fi
10842			;;
10843		esac
10844		case "$CPPFLAGS" in
10845		(*$cf_add_cflags)
10846			;;
10847		(*)
10848			case "$cf_add_cflags" in
10849			(-D*)
10850				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10851
10852CPPFLAGS=`echo "$CPPFLAGS" | \
10853	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10854		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10855
10856				;;
10857			esac
10858
10859	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10860	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10861
10862			;;
10863		esac
10864		;;
10865	(*)
10866
10867	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10868	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10869
10870		;;
10871	esac
10872	;;
10873(yes)
10874
10875	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10876	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10877
10878	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10879
10880	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10881		&& test -z "${cf_tst_cflags}" \
10882		&& cf_fix_cppflags=no
10883	;;
10884esac
10885done
10886
10887if test -n "$cf_new_cflags" ; then
10888
10889	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10890	CFLAGS="${CFLAGS}$cf_new_cflags"
10891
10892fi
10893
10894if test -n "$cf_new_cppflags" ; then
10895
10896	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10897	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10898
10899fi
10900
10901if test -n "$cf_new_extra_cppflags" ; then
10902
10903	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10904	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10905
10906fi
10907
10908cf_add_libs="$LIBS"
10909# reverse order
10910cf_add_0lib=
10911for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10912# filter duplicates
10913for cf_add_1lib in $cf_add_0lib; do
10914	for cf_add_2lib in $cf_add_libs; do
10915		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10916			cf_add_1lib=
10917			break
10918		fi
10919	done
10920	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10921done
10922LIBS="$cf_add_libs"
10923
10924	:
10925else
10926	cf_pkgconfig_incs=
10927	cf_pkgconfig_libs=
10928	{ echo "$as_me:10928: WARNING: unable to find Xt library" >&5
10929echo "$as_me: WARNING: unable to find Xt library" >&2;}
10930fi
10931
10932else
10933	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10934fi
10935
10936cf_have_X_LIBS=no
10937
10938if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10939	test -n "$verbose" && echo "	found package xt" 1>&6
10940
10941echo "${as_me:-configure}:10941: testing found package xt ..." 1>&5
10942
10943	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10944	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10945	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10946
10947echo "${as_me:-configure}:10947: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10948
10949	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10950
10951echo "${as_me:-configure}:10951: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10952
10953cf_fix_cppflags=no
10954cf_new_cflags=
10955cf_new_cppflags=
10956cf_new_extra_cppflags=
10957
10958for cf_add_cflags in $cf_pkgconfig_incs
10959do
10960case "$cf_fix_cppflags" in
10961(no)
10962	case "$cf_add_cflags" in
10963	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10964		case "$cf_add_cflags" in
10965		(-D*)
10966			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10967
10968			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10969				&& test -z "${cf_tst_cflags}" \
10970				&& cf_fix_cppflags=yes
10971
10972			if test "$cf_fix_cppflags" = yes ; then
10973
10974	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10975	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10976
10977				continue
10978			elif test "${cf_tst_cflags}" = "\"'" ; then
10979
10980	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10981	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10982
10983				continue
10984			fi
10985			;;
10986		esac
10987		case "$CPPFLAGS" in
10988		(*$cf_add_cflags)
10989			;;
10990		(*)
10991			case "$cf_add_cflags" in
10992			(-D*)
10993				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10994
10995CPPFLAGS=`echo "$CPPFLAGS" | \
10996	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10997		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10998
10999				;;
11000			esac
11001
11002	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11003	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11004
11005			;;
11006		esac
11007		;;
11008	(*)
11009
11010	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11011	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11012
11013		;;
11014	esac
11015	;;
11016(yes)
11017
11018	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11019	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11020
11021	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11022
11023	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11024		&& test -z "${cf_tst_cflags}" \
11025		&& cf_fix_cppflags=no
11026	;;
11027esac
11028done
11029
11030if test -n "$cf_new_cflags" ; then
11031
11032	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11033	CFLAGS="${CFLAGS}$cf_new_cflags"
11034
11035fi
11036
11037if test -n "$cf_new_cppflags" ; then
11038
11039	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11040	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11041
11042fi
11043
11044if test -n "$cf_new_extra_cppflags" ; then
11045
11046	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11047	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11048
11049fi
11050
11051cf_add_libs="$LIBS"
11052# reverse order
11053cf_add_0lib=
11054for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11055# filter duplicates
11056for cf_add_1lib in $cf_add_0lib; do
11057	for cf_add_2lib in $cf_add_libs; do
11058		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11059			cf_add_1lib=
11060			break
11061		fi
11062	done
11063	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11064done
11065LIBS="$cf_add_libs"
11066
11067	case "x$LIBS" in
11068	(*-lX11*)
11069		;;
11070	(*)
11071# we have an "xt" package, but it may omit Xt's dependency on X11
11072echo "$as_me:11072: checking for usable X dependency" >&5
11073echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11074if test "${cf_cv_xt_x11_compat+set}" = set; then
11075  echo $ECHO_N "(cached) $ECHO_C" >&6
11076else
11077
11078cat >"conftest.$ac_ext" <<_ACEOF
11079#line 11079 "configure"
11080#include "confdefs.h"
11081
11082#include <X11/Xlib.h>
11083
11084int
11085main (void)
11086{
11087
11088	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11089	int rc2 = XClearWindow((Display*) 0, (Window) 0);
11090	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11091	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11092
11093  ;
11094  return 0;
11095}
11096_ACEOF
11097rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11098if { (eval echo "$as_me:11098: \"$ac_link\"") >&5
11099  (eval $ac_link) 2>&5
11100  ac_status=$?
11101  echo "$as_me:11101: \$? = $ac_status" >&5
11102  (exit "$ac_status"); } &&
11103         { ac_try='test -s "conftest$ac_exeext"'
11104  { (eval echo "$as_me:11104: \"$ac_try\"") >&5
11105  (eval $ac_try) 2>&5
11106  ac_status=$?
11107  echo "$as_me:11107: \$? = $ac_status" >&5
11108  (exit "$ac_status"); }; }; then
11109  cf_cv_xt_x11_compat=yes
11110else
11111  echo "$as_me: failed program was:" >&5
11112cat "conftest.$ac_ext" >&5
11113cf_cv_xt_x11_compat=no
11114fi
11115rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11116fi
11117echo "$as_me:11117: result: $cf_cv_xt_x11_compat" >&5
11118echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11119		if test "$cf_cv_xt_x11_compat" = no
11120		then
11121			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
11122
11123echo "${as_me:-configure}:11123: testing work around broken X11 dependency ..." 1>&5
11124
11125			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11126
11127if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11128	test -n "$verbose" && echo "	found package x11" 1>&6
11129
11130echo "${as_me:-configure}:11130: testing found package x11 ..." 1>&5
11131
11132	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11133	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
11134	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11135
11136echo "${as_me:-configure}:11136: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11137
11138	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11139
11140echo "${as_me:-configure}:11140: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11141
11142cf_fix_cppflags=no
11143cf_new_cflags=
11144cf_new_cppflags=
11145cf_new_extra_cppflags=
11146
11147for cf_add_cflags in $cf_pkgconfig_incs
11148do
11149case "$cf_fix_cppflags" in
11150(no)
11151	case "$cf_add_cflags" in
11152	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11153		case "$cf_add_cflags" in
11154		(-D*)
11155			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11156
11157			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11158				&& test -z "${cf_tst_cflags}" \
11159				&& cf_fix_cppflags=yes
11160
11161			if test "$cf_fix_cppflags" = yes ; then
11162
11163	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11164	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11165
11166				continue
11167			elif test "${cf_tst_cflags}" = "\"'" ; then
11168
11169	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11170	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11171
11172				continue
11173			fi
11174			;;
11175		esac
11176		case "$CPPFLAGS" in
11177		(*$cf_add_cflags)
11178			;;
11179		(*)
11180			case "$cf_add_cflags" in
11181			(-D*)
11182				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11183
11184CPPFLAGS=`echo "$CPPFLAGS" | \
11185	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11186		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11187
11188				;;
11189			esac
11190
11191	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11192	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11193
11194			;;
11195		esac
11196		;;
11197	(*)
11198
11199	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11200	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11201
11202		;;
11203	esac
11204	;;
11205(yes)
11206
11207	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11208	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11209
11210	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11211
11212	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11213		&& test -z "${cf_tst_cflags}" \
11214		&& cf_fix_cppflags=no
11215	;;
11216esac
11217done
11218
11219if test -n "$cf_new_cflags" ; then
11220
11221	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11222	CFLAGS="${CFLAGS}$cf_new_cflags"
11223
11224fi
11225
11226if test -n "$cf_new_cppflags" ; then
11227
11228	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11229	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11230
11231fi
11232
11233if test -n "$cf_new_extra_cppflags" ; then
11234
11235	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11236	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11237
11238fi
11239
11240cf_add_libs="$LIBS"
11241# reverse order
11242cf_add_0lib=
11243for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11244# filter duplicates
11245for cf_add_1lib in $cf_add_0lib; do
11246	for cf_add_2lib in $cf_add_libs; do
11247		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11248			cf_add_1lib=
11249			break
11250		fi
11251	done
11252	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11253done
11254LIBS="$cf_add_libs"
11255
11256	:
11257else
11258	cf_pkgconfig_incs=
11259	cf_pkgconfig_libs=
11260
11261test -n "$verbose" && echo "	...before $LIBS" 1>&6
11262
11263echo "${as_me:-configure}:11263: testing ...before $LIBS ..." 1>&5
11264
11265LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
11266test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11267
11268echo "${as_me:-configure}:11268: testing ...after  $LIBS ..." 1>&5
11269
11270fi
11271
11272		fi
11273		;;
11274	esac
11275
11276echo "$as_me:11276: checking for usable X Toolkit package" >&5
11277echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11278if test "${cf_cv_xt_ice_compat+set}" = set; then
11279  echo $ECHO_N "(cached) $ECHO_C" >&6
11280else
11281
11282cat >"conftest.$ac_ext" <<_ACEOF
11283#line 11283 "configure"
11284#include "confdefs.h"
11285
11286#include <X11/Shell.h>
11287
11288int
11289main (void)
11290{
11291int num = IceConnectionNumber(0); (void) num
11292
11293  ;
11294  return 0;
11295}
11296_ACEOF
11297rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11298if { (eval echo "$as_me:11298: \"$ac_link\"") >&5
11299  (eval $ac_link) 2>&5
11300  ac_status=$?
11301  echo "$as_me:11301: \$? = $ac_status" >&5
11302  (exit "$ac_status"); } &&
11303         { ac_try='test -s "conftest$ac_exeext"'
11304  { (eval echo "$as_me:11304: \"$ac_try\"") >&5
11305  (eval $ac_try) 2>&5
11306  ac_status=$?
11307  echo "$as_me:11307: \$? = $ac_status" >&5
11308  (exit "$ac_status"); }; }; then
11309  cf_cv_xt_ice_compat=yes
11310else
11311  echo "$as_me: failed program was:" >&5
11312cat "conftest.$ac_ext" >&5
11313cf_cv_xt_ice_compat=no
11314fi
11315rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11316fi
11317echo "$as_me:11317: result: $cf_cv_xt_ice_compat" >&5
11318echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11319
11320	if test "$cf_cv_xt_ice_compat" = no
11321	then
11322		# workaround for broken ".pc" files used for X Toolkit.
11323		case "x$X_PRE_LIBS" in
11324		(*-lICE*)
11325			case "x$LIBS" in
11326			(*-lICE*)
11327				;;
11328			(*)
11329				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
11330
11331echo "${as_me:-configure}:11331: testing work around broken ICE dependency ..." 1>&5
11332
11333if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11334	test -n "$verbose" && echo "	found package ice" 1>&6
11335
11336echo "${as_me:-configure}:11336: testing found package ice ..." 1>&5
11337
11338	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11339	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
11340	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11341
11342echo "${as_me:-configure}:11342: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11343
11344	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
11345
11346echo "${as_me:-configure}:11346: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11347
11348cf_fix_cppflags=no
11349cf_new_cflags=
11350cf_new_cppflags=
11351cf_new_extra_cppflags=
11352
11353for cf_add_cflags in $cf_pkgconfig_incs
11354do
11355case "$cf_fix_cppflags" in
11356(no)
11357	case "$cf_add_cflags" in
11358	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11359		case "$cf_add_cflags" in
11360		(-D*)
11361			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11362
11363			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11364				&& test -z "${cf_tst_cflags}" \
11365				&& cf_fix_cppflags=yes
11366
11367			if test "$cf_fix_cppflags" = yes ; then
11368
11369	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11370	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11371
11372				continue
11373			elif test "${cf_tst_cflags}" = "\"'" ; then
11374
11375	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11376	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11377
11378				continue
11379			fi
11380			;;
11381		esac
11382		case "$CPPFLAGS" in
11383		(*$cf_add_cflags)
11384			;;
11385		(*)
11386			case "$cf_add_cflags" in
11387			(-D*)
11388				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11389
11390CPPFLAGS=`echo "$CPPFLAGS" | \
11391	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11392		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11393
11394				;;
11395			esac
11396
11397	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11398	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11399
11400			;;
11401		esac
11402		;;
11403	(*)
11404
11405	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11406	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11407
11408		;;
11409	esac
11410	;;
11411(yes)
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	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11417
11418	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11419		&& test -z "${cf_tst_cflags}" \
11420		&& cf_fix_cppflags=no
11421	;;
11422esac
11423done
11424
11425if test -n "$cf_new_cflags" ; then
11426
11427	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11428	CFLAGS="${CFLAGS}$cf_new_cflags"
11429
11430fi
11431
11432if test -n "$cf_new_cppflags" ; then
11433
11434	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11435	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11436
11437fi
11438
11439if test -n "$cf_new_extra_cppflags" ; then
11440
11441	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11442	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11443
11444fi
11445
11446cf_add_libs="$LIBS"
11447# reverse order
11448cf_add_0lib=
11449for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11450# filter duplicates
11451for cf_add_1lib in $cf_add_0lib; do
11452	for cf_add_2lib in $cf_add_libs; do
11453		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11454			cf_add_1lib=
11455			break
11456		fi
11457	done
11458	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11459done
11460LIBS="$cf_add_libs"
11461
11462if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11463	test -n "$verbose" && echo "	found package sm" 1>&6
11464
11465echo "${as_me:-configure}:11465: testing found package sm ..." 1>&5
11466
11467	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11468	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
11469	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11470
11471echo "${as_me:-configure}:11471: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11472
11473	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11474
11475echo "${as_me:-configure}:11475: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11476
11477cf_fix_cppflags=no
11478cf_new_cflags=
11479cf_new_cppflags=
11480cf_new_extra_cppflags=
11481
11482for cf_add_cflags in $cf_pkgconfig_incs
11483do
11484case "$cf_fix_cppflags" in
11485(no)
11486	case "$cf_add_cflags" in
11487	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11488		case "$cf_add_cflags" in
11489		(-D*)
11490			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11491
11492			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11493				&& test -z "${cf_tst_cflags}" \
11494				&& cf_fix_cppflags=yes
11495
11496			if test "$cf_fix_cppflags" = yes ; then
11497
11498	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11499	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11500
11501				continue
11502			elif test "${cf_tst_cflags}" = "\"'" ; then
11503
11504	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11505	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11506
11507				continue
11508			fi
11509			;;
11510		esac
11511		case "$CPPFLAGS" in
11512		(*$cf_add_cflags)
11513			;;
11514		(*)
11515			case "$cf_add_cflags" in
11516			(-D*)
11517				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11518
11519CPPFLAGS=`echo "$CPPFLAGS" | \
11520	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11521		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11522
11523				;;
11524			esac
11525
11526	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11527	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11528
11529			;;
11530		esac
11531		;;
11532	(*)
11533
11534	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11535	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11536
11537		;;
11538	esac
11539	;;
11540(yes)
11541
11542	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11543	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11544
11545	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11546
11547	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11548		&& test -z "${cf_tst_cflags}" \
11549		&& cf_fix_cppflags=no
11550	;;
11551esac
11552done
11553
11554if test -n "$cf_new_cflags" ; then
11555
11556	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11557	CFLAGS="${CFLAGS}$cf_new_cflags"
11558
11559fi
11560
11561if test -n "$cf_new_cppflags" ; then
11562
11563	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11564	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11565
11566fi
11567
11568if test -n "$cf_new_extra_cppflags" ; then
11569
11570	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11571	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11572
11573fi
11574
11575cf_add_libs="$LIBS"
11576# reverse order
11577cf_add_0lib=
11578for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11579# filter duplicates
11580for cf_add_1lib in $cf_add_0lib; do
11581	for cf_add_2lib in $cf_add_libs; do
11582		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11583			cf_add_1lib=
11584			break
11585		fi
11586	done
11587	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11588done
11589LIBS="$cf_add_libs"
11590
11591	:
11592else
11593	cf_pkgconfig_incs=
11594	cf_pkgconfig_libs=
11595	:
11596fi
11597
11598else
11599	cf_pkgconfig_incs=
11600	cf_pkgconfig_libs=
11601
11602test -n "$verbose" && echo "	...before $LIBS" 1>&6
11603
11604echo "${as_me:-configure}:11604: testing ...before $LIBS ..." 1>&5
11605
11606LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
11607test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11608
11609echo "${as_me:-configure}:11609: testing ...after  $LIBS ..." 1>&5
11610
11611fi
11612
11613				;;
11614			esac
11615			;;
11616		esac
11617	fi
11618
11619	cf_have_X_LIBS=yes
11620
11621else
11622	cf_pkgconfig_incs=
11623	cf_pkgconfig_libs=
11624
11625	LDFLAGS="$X_LIBS $LDFLAGS"
11626
11627test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
11628
11629echo "${as_me:-configure}:11629: testing checking additions to CFLAGS ..." 1>&5
11630
11631cf_check_cflags="$CFLAGS"
11632cf_check_cppflags="$CPPFLAGS"
11633
11634cf_fix_cppflags=no
11635cf_new_cflags=
11636cf_new_cppflags=
11637cf_new_extra_cppflags=
11638
11639for cf_add_cflags in $X_CFLAGS
11640do
11641case "$cf_fix_cppflags" in
11642(no)
11643	case "$cf_add_cflags" in
11644	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11645		case "$cf_add_cflags" in
11646		(-D*)
11647			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11648
11649			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11650				&& test -z "${cf_tst_cflags}" \
11651				&& cf_fix_cppflags=yes
11652
11653			if test "$cf_fix_cppflags" = yes ; then
11654
11655	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11656	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11657
11658				continue
11659			elif test "${cf_tst_cflags}" = "\"'" ; then
11660
11661	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11662	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11663
11664				continue
11665			fi
11666			;;
11667		esac
11668		case "$CPPFLAGS" in
11669		(*$cf_add_cflags)
11670			;;
11671		(*)
11672			case "$cf_add_cflags" in
11673			(-D*)
11674				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11675
11676CPPFLAGS=`echo "$CPPFLAGS" | \
11677	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11678		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11679
11680				;;
11681			esac
11682
11683	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11684	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11685
11686			;;
11687		esac
11688		;;
11689	(*)
11690
11691	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11692	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11693
11694		;;
11695	esac
11696	;;
11697(yes)
11698
11699	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11700	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11701
11702	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11703
11704	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11705		&& test -z "${cf_tst_cflags}" \
11706		&& cf_fix_cppflags=no
11707	;;
11708esac
11709done
11710
11711if test -n "$cf_new_cflags" ; then
11712	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
11713
11714echo "${as_me:-configure}:11714: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11715
11716	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11717	CFLAGS="${CFLAGS}$cf_new_cflags"
11718
11719fi
11720
11721if test -n "$cf_new_cppflags" ; then
11722	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11723
11724echo "${as_me:-configure}:11724: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11725
11726	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11727	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11728
11729fi
11730
11731if test -n "$cf_new_extra_cppflags" ; then
11732	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11733
11734echo "${as_me:-configure}:11734: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11735
11736	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11737	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11738
11739fi
11740
11741if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11742cat >"conftest.$ac_ext" <<_ACEOF
11743#line 11743 "configure"
11744#include "confdefs.h"
11745#include <stdio.h>
11746int
11747main (void)
11748{
11749printf("Hello world");
11750  ;
11751  return 0;
11752}
11753_ACEOF
11754rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11755if { (eval echo "$as_me:11755: \"$ac_link\"") >&5
11756  (eval $ac_link) 2>&5
11757  ac_status=$?
11758  echo "$as_me:11758: \$? = $ac_status" >&5
11759  (exit "$ac_status"); } &&
11760         { ac_try='test -s "conftest$ac_exeext"'
11761  { (eval echo "$as_me:11761: \"$ac_try\"") >&5
11762  (eval $ac_try) 2>&5
11763  ac_status=$?
11764  echo "$as_me:11764: \$? = $ac_status" >&5
11765  (exit "$ac_status"); }; }; then
11766  :
11767else
11768  echo "$as_me: failed program was:" >&5
11769cat "conftest.$ac_ext" >&5
11770test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11771
11772echo "${as_me:-configure}:11772: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11773
11774	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11775		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
11776
11777echo "${as_me:-configure}:11777: testing but keeping change to \$CPPFLAGS ..." 1>&5
11778
11779	 fi
11780	 CFLAGS="$cf_check_cflags"
11781fi
11782rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11783fi
11784
11785	echo "$as_me:11785: checking for XOpenDisplay" >&5
11786echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11787if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11788  echo $ECHO_N "(cached) $ECHO_C" >&6
11789else
11790  cat >"conftest.$ac_ext" <<_ACEOF
11791#line 11791 "configure"
11792#include "confdefs.h"
11793#define XOpenDisplay autoconf_temporary
11794#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11795#undef XOpenDisplay
11796
11797#ifdef __cplusplus
11798extern "C"
11799#endif
11800
11801/* We use char because int might match the return type of a gcc2
11802   builtin and then its argument prototype would still apply.  */
11803char XOpenDisplay (void);
11804
11805int
11806main (void)
11807{
11808
11809/* The GNU C library defines stubs for functions which it implements
11810    to always fail with ENOSYS.  Some functions are actually named
11811    something starting with __ and the normal name is an alias.  */
11812#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11813#error found stub for XOpenDisplay
11814#endif
11815
11816	return XOpenDisplay ();
11817  ;
11818  return 0;
11819}
11820_ACEOF
11821rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11822if { (eval echo "$as_me:11822: \"$ac_link\"") >&5
11823  (eval $ac_link) 2>&5
11824  ac_status=$?
11825  echo "$as_me:11825: \$? = $ac_status" >&5
11826  (exit "$ac_status"); } &&
11827         { ac_try='test -s "conftest$ac_exeext"'
11828  { (eval echo "$as_me:11828: \"$ac_try\"") >&5
11829  (eval $ac_try) 2>&5
11830  ac_status=$?
11831  echo "$as_me:11831: \$? = $ac_status" >&5
11832  (exit "$ac_status"); }; }; then
11833  ac_cv_func_XOpenDisplay=yes
11834else
11835  echo "$as_me: failed program was:" >&5
11836cat "conftest.$ac_ext" >&5
11837ac_cv_func_XOpenDisplay=no
11838fi
11839rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11840fi
11841echo "$as_me:11841: result: $ac_cv_func_XOpenDisplay" >&5
11842echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11843if test "$ac_cv_func_XOpenDisplay" = yes; then
11844  :
11845else
11846
11847	echo "$as_me:11847: checking for XOpenDisplay in -lX11" >&5
11848echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11849if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11850  echo $ECHO_N "(cached) $ECHO_C" >&6
11851else
11852  ac_check_lib_save_LIBS=$LIBS
11853LIBS="-lX11  $LIBS"
11854cat >"conftest.$ac_ext" <<_ACEOF
11855#line 11855 "configure"
11856#include "confdefs.h"
11857
11858/* Override any gcc2 internal prototype to avoid an error.  */
11859#ifdef __cplusplus
11860extern "C"
11861#endif
11862/* We use char because int might match the return type of a gcc2
11863   builtin and then its argument prototype would still apply.  */
11864char XOpenDisplay ();
11865int
11866main (void)
11867{
11868XOpenDisplay ();
11869  ;
11870  return 0;
11871}
11872_ACEOF
11873rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11874if { (eval echo "$as_me:11874: \"$ac_link\"") >&5
11875  (eval $ac_link) 2>&5
11876  ac_status=$?
11877  echo "$as_me:11877: \$? = $ac_status" >&5
11878  (exit "$ac_status"); } &&
11879         { ac_try='test -s "conftest$ac_exeext"'
11880  { (eval echo "$as_me:11880: \"$ac_try\"") >&5
11881  (eval $ac_try) 2>&5
11882  ac_status=$?
11883  echo "$as_me:11883: \$? = $ac_status" >&5
11884  (exit "$ac_status"); }; }; then
11885  ac_cv_lib_X11_XOpenDisplay=yes
11886else
11887  echo "$as_me: failed program was:" >&5
11888cat "conftest.$ac_ext" >&5
11889ac_cv_lib_X11_XOpenDisplay=no
11890fi
11891rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11892LIBS=$ac_check_lib_save_LIBS
11893fi
11894echo "$as_me:11894: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11895echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11896if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
11897
11898cf_add_libs="$LIBS"
11899# reverse order
11900cf_add_0lib=
11901for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11902# filter duplicates
11903for cf_add_1lib in $cf_add_0lib; do
11904	for cf_add_2lib in $cf_add_libs; do
11905		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11906			cf_add_1lib=
11907			break
11908		fi
11909	done
11910	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11911done
11912LIBS="$cf_add_libs"
11913
11914fi
11915
11916fi
11917
11918	echo "$as_me:11918: checking for XtAppInitialize" >&5
11919echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11920if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11921  echo $ECHO_N "(cached) $ECHO_C" >&6
11922else
11923  cat >"conftest.$ac_ext" <<_ACEOF
11924#line 11924 "configure"
11925#include "confdefs.h"
11926#define XtAppInitialize autoconf_temporary
11927#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11928#undef XtAppInitialize
11929
11930#ifdef __cplusplus
11931extern "C"
11932#endif
11933
11934/* We use char because int might match the return type of a gcc2
11935   builtin and then its argument prototype would still apply.  */
11936char XtAppInitialize (void);
11937
11938int
11939main (void)
11940{
11941
11942/* The GNU C library defines stubs for functions which it implements
11943    to always fail with ENOSYS.  Some functions are actually named
11944    something starting with __ and the normal name is an alias.  */
11945#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11946#error found stub for XtAppInitialize
11947#endif
11948
11949	return XtAppInitialize ();
11950  ;
11951  return 0;
11952}
11953_ACEOF
11954rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11955if { (eval echo "$as_me:11955: \"$ac_link\"") >&5
11956  (eval $ac_link) 2>&5
11957  ac_status=$?
11958  echo "$as_me:11958: \$? = $ac_status" >&5
11959  (exit "$ac_status"); } &&
11960         { ac_try='test -s "conftest$ac_exeext"'
11961  { (eval echo "$as_me:11961: \"$ac_try\"") >&5
11962  (eval $ac_try) 2>&5
11963  ac_status=$?
11964  echo "$as_me:11964: \$? = $ac_status" >&5
11965  (exit "$ac_status"); }; }; then
11966  ac_cv_func_XtAppInitialize=yes
11967else
11968  echo "$as_me: failed program was:" >&5
11969cat "conftest.$ac_ext" >&5
11970ac_cv_func_XtAppInitialize=no
11971fi
11972rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11973fi
11974echo "$as_me:11974: result: $ac_cv_func_XtAppInitialize" >&5
11975echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11976if test "$ac_cv_func_XtAppInitialize" = yes; then
11977  :
11978else
11979
11980	echo "$as_me:11980: checking for XtAppInitialize in -lXt" >&5
11981echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11982if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11983  echo $ECHO_N "(cached) $ECHO_C" >&6
11984else
11985  ac_check_lib_save_LIBS=$LIBS
11986LIBS="-lXt  $LIBS"
11987cat >"conftest.$ac_ext" <<_ACEOF
11988#line 11988 "configure"
11989#include "confdefs.h"
11990
11991/* Override any gcc2 internal prototype to avoid an error.  */
11992#ifdef __cplusplus
11993extern "C"
11994#endif
11995/* We use char because int might match the return type of a gcc2
11996   builtin and then its argument prototype would still apply.  */
11997char XtAppInitialize ();
11998int
11999main (void)
12000{
12001XtAppInitialize ();
12002  ;
12003  return 0;
12004}
12005_ACEOF
12006rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12007if { (eval echo "$as_me:12007: \"$ac_link\"") >&5
12008  (eval $ac_link) 2>&5
12009  ac_status=$?
12010  echo "$as_me:12010: \$? = $ac_status" >&5
12011  (exit "$ac_status"); } &&
12012         { ac_try='test -s "conftest$ac_exeext"'
12013  { (eval echo "$as_me:12013: \"$ac_try\"") >&5
12014  (eval $ac_try) 2>&5
12015  ac_status=$?
12016  echo "$as_me:12016: \$? = $ac_status" >&5
12017  (exit "$ac_status"); }; }; then
12018  ac_cv_lib_Xt_XtAppInitialize=yes
12019else
12020  echo "$as_me: failed program was:" >&5
12021cat "conftest.$ac_ext" >&5
12022ac_cv_lib_Xt_XtAppInitialize=no
12023fi
12024rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12025LIBS=$ac_check_lib_save_LIBS
12026fi
12027echo "$as_me:12027: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12028echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12029if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
12030
12031cat >>confdefs.h <<\EOF
12032#define HAVE_LIBXT 1
12033EOF
12034
12035		 cf_have_X_LIBS=Xt
12036		 LIBS="-lXt $LIBS"
12037fi
12038
12039fi
12040
12041fi
12042
12043if test "$cf_have_X_LIBS" = no ; then
12044	{ echo "$as_me:12044: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12045test program.  You will have to check and add the proper libraries by hand
12046to makefile." >&5
12047echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12048test program.  You will have to check and add the proper libraries by hand
12049to makefile." >&2;}
12050fi
12051
12052for ac_header in \
12053	X11/DECkeysym.h \
12054	X11/Sunkeysym.h \
12055	X11/XF86keysym.h \
12056	X11/XKBlib.h \
12057	X11/TranslateI.h \
12058	X11/Xpoll.h \
12059	X11/extensions/XKB.h \
12060
12061do
12062as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12063echo "$as_me:12063: checking for $ac_header" >&5
12064echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12065if eval "test \"\${$as_ac_Header+set}\" = set"; then
12066  echo $ECHO_N "(cached) $ECHO_C" >&6
12067else
12068  cat >"conftest.$ac_ext" <<_ACEOF
12069#line 12069 "configure"
12070#include "confdefs.h"
12071#include <$ac_header>
12072_ACEOF
12073if { (eval echo "$as_me:12073: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12074  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12075  ac_status=$?
12076  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12077  rm -f conftest.er1
12078  cat conftest.err >&5
12079  echo "$as_me:12079: \$? = $ac_status" >&5
12080  (exit "$ac_status"); } >/dev/null; then
12081  if test -s conftest.err; then
12082    ac_cpp_err=$ac_c_preproc_warn_flag
12083  else
12084    ac_cpp_err=
12085  fi
12086else
12087  ac_cpp_err=yes
12088fi
12089if test -z "$ac_cpp_err"; then
12090  eval "$as_ac_Header=yes"
12091else
12092  echo "$as_me: failed program was:" >&5
12093  cat "conftest.$ac_ext" >&5
12094  eval "$as_ac_Header=no"
12095fi
12096rm -f conftest.err "conftest.$ac_ext"
12097fi
12098echo "$as_me:12098: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12099echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12100if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12101  cat >>confdefs.h <<EOF
12102#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12103EOF
12104
12105fi
12106done
12107
12108ICON_SUFFIX=.xbm
12109
12110cf_save_cppflags="${CPPFLAGS}"
12111cf_save_ldflags="${LDFLAGS}"
12112
12113echo "$as_me:12113: checking if you want to use the Xpm library for colored icon" >&5
12114echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12115
12116# Check whether --with-xpm or --without-xpm was given.
12117if test "${with_xpm+set}" = set; then
12118  withval="$with_xpm"
12119  cf_Xpm_library="$withval"
12120else
12121  cf_Xpm_library=yes
12122fi;
12123echo "$as_me:12123: result: $cf_Xpm_library" >&5
12124echo "${ECHO_T}$cf_Xpm_library" >&6
12125
12126if test "$cf_Xpm_library" != no ; then
12127    if test "$cf_Xpm_library" != yes ; then
12128	CPPFLAGS="$CPPFLAGS -I$withval/include"
12129	LDFLAGS="$LDFLAGS -L$withval/lib"
12130    fi
12131    echo "$as_me:12131: checking for X11/xpm.h" >&5
12132echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12133if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12134  echo $ECHO_N "(cached) $ECHO_C" >&6
12135else
12136  cat >"conftest.$ac_ext" <<_ACEOF
12137#line 12137 "configure"
12138#include "confdefs.h"
12139#include <X11/xpm.h>
12140_ACEOF
12141if { (eval echo "$as_me:12141: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12142  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12143  ac_status=$?
12144  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12145  rm -f conftest.er1
12146  cat conftest.err >&5
12147  echo "$as_me:12147: \$? = $ac_status" >&5
12148  (exit "$ac_status"); } >/dev/null; then
12149  if test -s conftest.err; then
12150    ac_cpp_err=$ac_c_preproc_warn_flag
12151  else
12152    ac_cpp_err=
12153  fi
12154else
12155  ac_cpp_err=yes
12156fi
12157if test -z "$ac_cpp_err"; then
12158  ac_cv_header_X11_xpm_h=yes
12159else
12160  echo "$as_me: failed program was:" >&5
12161  cat "conftest.$ac_ext" >&5
12162  ac_cv_header_X11_xpm_h=no
12163fi
12164rm -f conftest.err "conftest.$ac_ext"
12165fi
12166echo "$as_me:12166: result: $ac_cv_header_X11_xpm_h" >&5
12167echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12168if test "$ac_cv_header_X11_xpm_h" = yes; then
12169
12170	echo "$as_me:12170: checking for XpmCreatePixmapFromData in -lXpm" >&5
12171echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12172if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12173  echo $ECHO_N "(cached) $ECHO_C" >&6
12174else
12175  ac_check_lib_save_LIBS=$LIBS
12176LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12177cat >"conftest.$ac_ext" <<_ACEOF
12178#line 12178 "configure"
12179#include "confdefs.h"
12180
12181/* Override any gcc2 internal prototype to avoid an error.  */
12182#ifdef __cplusplus
12183extern "C"
12184#endif
12185/* We use char because int might match the return type of a gcc2
12186   builtin and then its argument prototype would still apply.  */
12187char XpmCreatePixmapFromData ();
12188int
12189main (void)
12190{
12191XpmCreatePixmapFromData ();
12192  ;
12193  return 0;
12194}
12195_ACEOF
12196rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12197if { (eval echo "$as_me:12197: \"$ac_link\"") >&5
12198  (eval $ac_link) 2>&5
12199  ac_status=$?
12200  echo "$as_me:12200: \$? = $ac_status" >&5
12201  (exit "$ac_status"); } &&
12202         { ac_try='test -s "conftest$ac_exeext"'
12203  { (eval echo "$as_me:12203: \"$ac_try\"") >&5
12204  (eval $ac_try) 2>&5
12205  ac_status=$?
12206  echo "$as_me:12206: \$? = $ac_status" >&5
12207  (exit "$ac_status"); }; }; then
12208  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12209else
12210  echo "$as_me: failed program was:" >&5
12211cat "conftest.$ac_ext" >&5
12212ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12213fi
12214rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12215LIBS=$ac_check_lib_save_LIBS
12216fi
12217echo "$as_me:12217: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12218echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12219if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12220
12221cat >>confdefs.h <<\EOF
12222#define HAVE_LIBXPM 1
12223EOF
12224
12225	    ICON_SUFFIX=.xpm
12226	    LIBS="-lXpm $LIBS"
12227else
12228  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12229fi
12230
12231else
12232  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12233fi
12234
12235fi
12236
12237echo "$as_me:12237: checking if you want to use the Xinerama extension" >&5
12238echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
12239
12240# Check whether --with-xinerama or --without-xinerama was given.
12241if test "${with_xinerama+set}" = set; then
12242  withval="$with_xinerama"
12243  cf_with_xinerama="$withval"
12244else
12245  cf_with_xinerama=yes
12246fi;
12247echo "$as_me:12247: result: $cf_with_xinerama" >&5
12248echo "${ECHO_T}$cf_with_xinerama" >&6
12249if test "$cf_with_xinerama" = yes; then
12250
12251if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
12252	test -n "$verbose" && echo "	found package xinerama" 1>&6
12253
12254echo "${as_me:-configure}:12254: testing found package xinerama ..." 1>&5
12255
12256	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
12257	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xinerama" 2>/dev/null`"
12258	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
12259
12260echo "${as_me:-configure}:12260: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12261
12262	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
12263
12264echo "${as_me:-configure}:12264: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
12265
12266cf_fix_cppflags=no
12267cf_new_cflags=
12268cf_new_cppflags=
12269cf_new_extra_cppflags=
12270
12271for cf_add_cflags in $cf_pkgconfig_incs
12272do
12273case "$cf_fix_cppflags" in
12274(no)
12275	case "$cf_add_cflags" in
12276	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12277		case "$cf_add_cflags" in
12278		(-D*)
12279			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12280
12281			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12282				&& test -z "${cf_tst_cflags}" \
12283				&& cf_fix_cppflags=yes
12284
12285			if test "$cf_fix_cppflags" = yes ; then
12286
12287	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12288	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12289
12290				continue
12291			elif test "${cf_tst_cflags}" = "\"'" ; then
12292
12293	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12294	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12295
12296				continue
12297			fi
12298			;;
12299		esac
12300		case "$CPPFLAGS" in
12301		(*$cf_add_cflags)
12302			;;
12303		(*)
12304			case "$cf_add_cflags" in
12305			(-D*)
12306				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12307
12308CPPFLAGS=`echo "$CPPFLAGS" | \
12309	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12310		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12311
12312				;;
12313			esac
12314
12315	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12316	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12317
12318			;;
12319		esac
12320		;;
12321	(*)
12322
12323	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12324	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12325
12326		;;
12327	esac
12328	;;
12329(yes)
12330
12331	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12332	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12333
12334	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12335
12336	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12337		&& test -z "${cf_tst_cflags}" \
12338		&& cf_fix_cppflags=no
12339	;;
12340esac
12341done
12342
12343if test -n "$cf_new_cflags" ; then
12344
12345	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12346	CFLAGS="${CFLAGS}$cf_new_cflags"
12347
12348fi
12349
12350if test -n "$cf_new_cppflags" ; then
12351
12352	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12353	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12354
12355fi
12356
12357if test -n "$cf_new_extra_cppflags" ; then
12358
12359	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12360	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12361
12362fi
12363
12364cf_add_libs="$LIBS"
12365# reverse order
12366cf_add_0lib=
12367for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12368# filter duplicates
12369for cf_add_1lib in $cf_add_0lib; do
12370	for cf_add_2lib in $cf_add_libs; do
12371		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12372			cf_add_1lib=
12373			break
12374		fi
12375	done
12376	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12377done
12378LIBS="$cf_add_libs"
12379
12380	cat >>confdefs.h <<\EOF
12381#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
12382EOF
12383
12384else
12385	cf_pkgconfig_incs=
12386	cf_pkgconfig_libs=
12387
12388	echo "$as_me:12388: checking for XineramaQueryScreens in -lXinerama" >&5
12389echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
12390if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12391  echo $ECHO_N "(cached) $ECHO_C" >&6
12392else
12393  ac_check_lib_save_LIBS=$LIBS
12394LIBS="-lXinerama  $LIBS"
12395cat >"conftest.$ac_ext" <<_ACEOF
12396#line 12396 "configure"
12397#include "confdefs.h"
12398
12399/* Override any gcc2 internal prototype to avoid an error.  */
12400#ifdef __cplusplus
12401extern "C"
12402#endif
12403/* We use char because int might match the return type of a gcc2
12404   builtin and then its argument prototype would still apply.  */
12405char XineramaQueryScreens ();
12406int
12407main (void)
12408{
12409XineramaQueryScreens ();
12410  ;
12411  return 0;
12412}
12413_ACEOF
12414rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12415if { (eval echo "$as_me:12415: \"$ac_link\"") >&5
12416  (eval $ac_link) 2>&5
12417  ac_status=$?
12418  echo "$as_me:12418: \$? = $ac_status" >&5
12419  (exit "$ac_status"); } &&
12420         { ac_try='test -s "conftest$ac_exeext"'
12421  { (eval echo "$as_me:12421: \"$ac_try\"") >&5
12422  (eval $ac_try) 2>&5
12423  ac_status=$?
12424  echo "$as_me:12424: \$? = $ac_status" >&5
12425  (exit "$ac_status"); }; }; then
12426  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12427else
12428  echo "$as_me: failed program was:" >&5
12429cat "conftest.$ac_ext" >&5
12430ac_cv_lib_Xinerama_XineramaQueryScreens=no
12431fi
12432rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12433LIBS=$ac_check_lib_save_LIBS
12434fi
12435echo "$as_me:12435: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12436echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
12437if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
12438
12439cf_add_libs="$LIBS"
12440# reverse order
12441cf_add_0lib=
12442for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12443# filter duplicates
12444for cf_add_1lib in $cf_add_0lib; do
12445	for cf_add_2lib in $cf_add_libs; do
12446		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12447			cf_add_1lib=
12448			break
12449		fi
12450	done
12451	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12452done
12453LIBS="$cf_add_libs"
12454
12455for ac_header in \
12456			X11/extensions/Xinerama.h \
12457
12458do
12459as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12460echo "$as_me:12460: checking for $ac_header" >&5
12461echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12462if eval "test \"\${$as_ac_Header+set}\" = set"; then
12463  echo $ECHO_N "(cached) $ECHO_C" >&6
12464else
12465  cat >"conftest.$ac_ext" <<_ACEOF
12466#line 12466 "configure"
12467#include "confdefs.h"
12468#include <$ac_header>
12469_ACEOF
12470if { (eval echo "$as_me:12470: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12471  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12472  ac_status=$?
12473  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12474  rm -f conftest.er1
12475  cat conftest.err >&5
12476  echo "$as_me:12476: \$? = $ac_status" >&5
12477  (exit "$ac_status"); } >/dev/null; then
12478  if test -s conftest.err; then
12479    ac_cpp_err=$ac_c_preproc_warn_flag
12480  else
12481    ac_cpp_err=
12482  fi
12483else
12484  ac_cpp_err=yes
12485fi
12486if test -z "$ac_cpp_err"; then
12487  eval "$as_ac_Header=yes"
12488else
12489  echo "$as_me: failed program was:" >&5
12490  cat "conftest.$ac_ext" >&5
12491  eval "$as_ac_Header=no"
12492fi
12493rm -f conftest.err "conftest.$ac_ext"
12494fi
12495echo "$as_me:12495: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12496echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12497if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12498  cat >>confdefs.h <<EOF
12499#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12500EOF
12501
12502fi
12503done
12504
12505fi
12506
12507fi
12508
12509fi
12510
12511cf_x_athena=${cf_x_athena:-Xaw}
12512
12513echo "$as_me:12513: checking if you want to link with Xaw 3d library" >&5
12514echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12515withval=
12516
12517# Check whether --with-Xaw3d or --without-Xaw3d was given.
12518if test "${with_Xaw3d+set}" = set; then
12519  withval="$with_Xaw3d"
12520
12521fi;
12522if test "$withval" = yes ; then
12523	cf_x_athena=Xaw3d
12524	echo "$as_me:12524: result: yes" >&5
12525echo "${ECHO_T}yes" >&6
12526else
12527	echo "$as_me:12527: result: no" >&5
12528echo "${ECHO_T}no" >&6
12529fi
12530
12531echo "$as_me:12531: checking if you want to link with Xaw 3d xft library" >&5
12532echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12533withval=
12534
12535# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12536if test "${with_Xaw3dxft+set}" = set; then
12537  withval="$with_Xaw3dxft"
12538
12539fi;
12540if test "$withval" = yes ; then
12541	cf_x_athena=Xaw3dxft
12542	echo "$as_me:12542: result: yes" >&5
12543echo "${ECHO_T}yes" >&6
12544else
12545	echo "$as_me:12545: result: no" >&5
12546echo "${ECHO_T}no" >&6
12547fi
12548
12549echo "$as_me:12549: checking if you want to link with neXT Athena library" >&5
12550echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12551withval=
12552
12553# Check whether --with-neXtaw or --without-neXtaw was given.
12554if test "${with_neXtaw+set}" = set; then
12555  withval="$with_neXtaw"
12556
12557fi;
12558if test "$withval" = yes ; then
12559	cf_x_athena=neXtaw
12560	echo "$as_me:12560: result: yes" >&5
12561echo "${ECHO_T}yes" >&6
12562else
12563	echo "$as_me:12563: result: no" >&5
12564echo "${ECHO_T}no" >&6
12565fi
12566
12567echo "$as_me:12567: checking if you want to link with Athena-Plus library" >&5
12568echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12569withval=
12570
12571# Check whether --with-XawPlus or --without-XawPlus was given.
12572if test "${with_XawPlus+set}" = set; then
12573  withval="$with_XawPlus"
12574
12575fi;
12576if test "$withval" = yes ; then
12577	cf_x_athena=XawPlus
12578	echo "$as_me:12578: result: yes" >&5
12579echo "${ECHO_T}yes" >&6
12580else
12581	echo "$as_me:12581: result: no" >&5
12582echo "${ECHO_T}no" >&6
12583fi
12584
12585cf_x_athena_lib=""
12586
12587if test "$PKG_CONFIG" != none ; then
12588	cf_athena_list=
12589	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12590	for cf_athena_pkg in \
12591		$cf_athena_list \
12592		${cf_x_athena} \
12593		${cf_x_athena}-devel \
12594		lib${cf_x_athena} \
12595		lib${cf_x_athena}-devel
12596	do
12597
12598if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
12599	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
12600
12601echo "${as_me:-configure}:12601: testing found package $cf_athena_pkg ..." 1>&5
12602
12603	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
12604	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
12605	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12606
12607echo "${as_me:-configure}:12607: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12608
12609	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12610
12611echo "${as_me:-configure}:12611: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12612
12613cf_fix_cppflags=no
12614cf_new_cflags=
12615cf_new_cppflags=
12616cf_new_extra_cppflags=
12617
12618for cf_add_cflags in $cf_pkgconfig_incs
12619do
12620case "$cf_fix_cppflags" in
12621(no)
12622	case "$cf_add_cflags" in
12623	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12624		case "$cf_add_cflags" in
12625		(-D*)
12626			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12627
12628			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12629				&& test -z "${cf_tst_cflags}" \
12630				&& cf_fix_cppflags=yes
12631
12632			if test "$cf_fix_cppflags" = yes ; then
12633
12634	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12635	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12636
12637				continue
12638			elif test "${cf_tst_cflags}" = "\"'" ; then
12639
12640	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12641	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12642
12643				continue
12644			fi
12645			;;
12646		esac
12647		case "$CPPFLAGS" in
12648		(*$cf_add_cflags)
12649			;;
12650		(*)
12651			case "$cf_add_cflags" in
12652			(-D*)
12653				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12654
12655CPPFLAGS=`echo "$CPPFLAGS" | \
12656	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12657		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12658
12659				;;
12660			esac
12661
12662	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12663	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12664
12665			;;
12666		esac
12667		;;
12668	(*)
12669
12670	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12671	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12672
12673		;;
12674	esac
12675	;;
12676(yes)
12677
12678	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12679	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12680
12681	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12682
12683	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12684		&& test -z "${cf_tst_cflags}" \
12685		&& cf_fix_cppflags=no
12686	;;
12687esac
12688done
12689
12690if test -n "$cf_new_cflags" ; then
12691
12692	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12693	CFLAGS="${CFLAGS}$cf_new_cflags"
12694
12695fi
12696
12697if test -n "$cf_new_cppflags" ; then
12698
12699	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12700	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12701
12702fi
12703
12704if test -n "$cf_new_extra_cppflags" ; then
12705
12706	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12707	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12708
12709fi
12710
12711cf_add_libs="$LIBS"
12712# reverse order
12713cf_add_0lib=
12714for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12715# filter duplicates
12716for cf_add_1lib in $cf_add_0lib; do
12717	for cf_add_2lib in $cf_add_libs; do
12718		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12719			cf_add_1lib=
12720			break
12721		fi
12722	done
12723	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12724done
12725LIBS="$cf_add_libs"
12726
12727			cf_x_athena_lib="$cf_pkgconfig_libs"
12728
12729cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12730
12731			cat >>confdefs.h <<EOF
12732#define $cf_x_athena_LIBS 1
12733EOF
12734
12735	for cf_trim_lib in Xmu Xt X11
12736	do
12737		case "$LIBS" in
12738		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12739			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12740			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12741
12742echo "${as_me:-configure}:12742: testing ..trimmed $LIBS ..." 1>&5
12743
12744			;;
12745		esac
12746	done
12747
12748echo "$as_me:12748: checking for usable $cf_x_athena/Xmu package" >&5
12749echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12750if test "${cf_cv_xaw_compat+set}" = set; then
12751  echo $ECHO_N "(cached) $ECHO_C" >&6
12752else
12753
12754cat >"conftest.$ac_ext" <<_ACEOF
12755#line 12755 "configure"
12756#include "confdefs.h"
12757
12758#include <X11/Xmu/CharSet.h>
12759
12760int
12761main (void)
12762{
12763
12764int check = XmuCompareISOLatin1("big", "small");
12765(void)check;
12766
12767  ;
12768  return 0;
12769}
12770_ACEOF
12771rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12772if { (eval echo "$as_me:12772: \"$ac_link\"") >&5
12773  (eval $ac_link) 2>&5
12774  ac_status=$?
12775  echo "$as_me:12775: \$? = $ac_status" >&5
12776  (exit "$ac_status"); } &&
12777         { ac_try='test -s "conftest$ac_exeext"'
12778  { (eval echo "$as_me:12778: \"$ac_try\"") >&5
12779  (eval $ac_try) 2>&5
12780  ac_status=$?
12781  echo "$as_me:12781: \$? = $ac_status" >&5
12782  (exit "$ac_status"); }; }; then
12783  cf_cv_xaw_compat=yes
12784else
12785  echo "$as_me: failed program was:" >&5
12786cat "conftest.$ac_ext" >&5
12787cf_cv_xaw_compat=no
12788fi
12789rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12790fi
12791echo "$as_me:12791: result: $cf_cv_xaw_compat" >&5
12792echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12793
12794			if test "$cf_cv_xaw_compat" = no
12795			then
12796				# workaround for broken ".pc" files...
12797				case "$cf_x_athena_lib" in
12798				(*-lXmu*)
12799					;;
12800				(*)
12801					test -n "$verbose" && echo "	work around broken package" 1>&6
12802
12803echo "${as_me:-configure}:12803: testing work around broken package ..." 1>&5
12804
12805					cf_save_xmu="$LIBS"
12806					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
12807
12808if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
12809	test -n "$verbose" && echo "	found package xmu" 1>&6
12810
12811echo "${as_me:-configure}:12811: testing found package xmu ..." 1>&5
12812
12813	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
12814	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
12815	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12816
12817echo "${as_me:-configure}:12817: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12818
12819	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12820
12821echo "${as_me:-configure}:12821: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12822
12823cf_fix_cppflags=no
12824cf_new_cflags=
12825cf_new_cppflags=
12826cf_new_extra_cppflags=
12827
12828for cf_add_cflags in $cf_pkgconfig_incs
12829do
12830case "$cf_fix_cppflags" in
12831(no)
12832	case "$cf_add_cflags" in
12833	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12834		case "$cf_add_cflags" in
12835		(-D*)
12836			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12837
12838			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12839				&& test -z "${cf_tst_cflags}" \
12840				&& cf_fix_cppflags=yes
12841
12842			if test "$cf_fix_cppflags" = yes ; then
12843
12844	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12845	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12846
12847				continue
12848			elif test "${cf_tst_cflags}" = "\"'" ; then
12849
12850	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12851	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12852
12853				continue
12854			fi
12855			;;
12856		esac
12857		case "$CPPFLAGS" in
12858		(*$cf_add_cflags)
12859			;;
12860		(*)
12861			case "$cf_add_cflags" in
12862			(-D*)
12863				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12864
12865CPPFLAGS=`echo "$CPPFLAGS" | \
12866	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12867		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12868
12869				;;
12870			esac
12871
12872	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12873	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12874
12875			;;
12876		esac
12877		;;
12878	(*)
12879
12880	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12881	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12882
12883		;;
12884	esac
12885	;;
12886(yes)
12887
12888	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12889	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12890
12891	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12892
12893	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12894		&& test -z "${cf_tst_cflags}" \
12895		&& cf_fix_cppflags=no
12896	;;
12897esac
12898done
12899
12900if test -n "$cf_new_cflags" ; then
12901
12902	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12903	CFLAGS="${CFLAGS}$cf_new_cflags"
12904
12905fi
12906
12907if test -n "$cf_new_cppflags" ; then
12908
12909	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12910	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12911
12912fi
12913
12914if test -n "$cf_new_extra_cppflags" ; then
12915
12916	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12917	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12918
12919fi
12920
12921cf_add_libs="$LIBS"
12922# reverse order
12923cf_add_0lib=
12924for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12925# filter duplicates
12926for cf_add_1lib in $cf_add_0lib; do
12927	for cf_add_2lib in $cf_add_libs; do
12928		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12929			cf_add_1lib=
12930			break
12931		fi
12932	done
12933	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12934done
12935LIBS="$cf_add_libs"
12936
12937							LIBS="$cf_save_xmu"
12938
12939test -n "$verbose" && echo "	...before $LIBS" 1>&6
12940
12941echo "${as_me:-configure}:12941: testing ...before $LIBS ..." 1>&5
12942
12943LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
12944test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12945
12946echo "${as_me:-configure}:12946: testing ...after  $LIBS ..." 1>&5
12947
12948else
12949	cf_pkgconfig_incs=
12950	cf_pkgconfig_libs=
12951
12952test -n "$verbose" && echo "	...before $LIBS" 1>&6
12953
12954echo "${as_me:-configure}:12954: testing ...before $LIBS ..." 1>&5
12955
12956LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
12957test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12958
12959echo "${as_me:-configure}:12959: testing ...after  $LIBS ..." 1>&5
12960
12961fi
12962
12963	for cf_trim_lib in Xmu Xt X11
12964	do
12965		case "$LIBS" in
12966		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12967			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12968			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12969
12970echo "${as_me:-configure}:12970: testing ..trimmed $LIBS ..." 1>&5
12971
12972			;;
12973		esac
12974	done
12975
12976					;;
12977				esac
12978			fi
12979
12980			break
12981else
12982	cf_pkgconfig_incs=
12983	cf_pkgconfig_libs=
12984	:
12985fi
12986
12987	done
12988fi
12989
12990if test -z "$cf_x_athena_lib" ; then
12991
12992if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
12993	test -n "$verbose" && echo "	found package Xext" 1>&6
12994
12995echo "${as_me:-configure}:12995: testing found package Xext ..." 1>&5
12996
12997	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
12998	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
12999	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
13000
13001echo "${as_me:-configure}:13001: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13002
13003	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13004
13005echo "${as_me:-configure}:13005: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13006
13007cf_fix_cppflags=no
13008cf_new_cflags=
13009cf_new_cppflags=
13010cf_new_extra_cppflags=
13011
13012for cf_add_cflags in $cf_pkgconfig_incs
13013do
13014case "$cf_fix_cppflags" in
13015(no)
13016	case "$cf_add_cflags" in
13017	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13018		case "$cf_add_cflags" in
13019		(-D*)
13020			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13021
13022			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13023				&& test -z "${cf_tst_cflags}" \
13024				&& cf_fix_cppflags=yes
13025
13026			if test "$cf_fix_cppflags" = yes ; then
13027
13028	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13029	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13030
13031				continue
13032			elif test "${cf_tst_cflags}" = "\"'" ; then
13033
13034	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13035	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13036
13037				continue
13038			fi
13039			;;
13040		esac
13041		case "$CPPFLAGS" in
13042		(*$cf_add_cflags)
13043			;;
13044		(*)
13045			case "$cf_add_cflags" in
13046			(-D*)
13047				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13048
13049CPPFLAGS=`echo "$CPPFLAGS" | \
13050	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13051		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13052
13053				;;
13054			esac
13055
13056	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13057	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13058
13059			;;
13060		esac
13061		;;
13062	(*)
13063
13064	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13065	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13066
13067		;;
13068	esac
13069	;;
13070(yes)
13071
13072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13074
13075	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13076
13077	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13078		&& test -z "${cf_tst_cflags}" \
13079		&& cf_fix_cppflags=no
13080	;;
13081esac
13082done
13083
13084if test -n "$cf_new_cflags" ; then
13085
13086	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13087	CFLAGS="${CFLAGS}$cf_new_cflags"
13088
13089fi
13090
13091if test -n "$cf_new_cppflags" ; then
13092
13093	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13094	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13095
13096fi
13097
13098if test -n "$cf_new_extra_cppflags" ; then
13099
13100	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13101	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13102
13103fi
13104
13105cf_add_libs="$LIBS"
13106# reverse order
13107cf_add_0lib=
13108for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13109# filter duplicates
13110for cf_add_1lib in $cf_add_0lib; do
13111	for cf_add_2lib in $cf_add_libs; do
13112		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13113			cf_add_1lib=
13114			break
13115		fi
13116	done
13117	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13118done
13119LIBS="$cf_add_libs"
13120
13121	:
13122else
13123	cf_pkgconfig_incs=
13124	cf_pkgconfig_libs=
13125
13126	echo "$as_me:13126: checking for XextCreateExtension in -lXext" >&5
13127echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13128if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13129  echo $ECHO_N "(cached) $ECHO_C" >&6
13130else
13131  ac_check_lib_save_LIBS=$LIBS
13132LIBS="-lXext  $LIBS"
13133cat >"conftest.$ac_ext" <<_ACEOF
13134#line 13134 "configure"
13135#include "confdefs.h"
13136
13137/* Override any gcc2 internal prototype to avoid an error.  */
13138#ifdef __cplusplus
13139extern "C"
13140#endif
13141/* We use char because int might match the return type of a gcc2
13142   builtin and then its argument prototype would still apply.  */
13143char XextCreateExtension ();
13144int
13145main (void)
13146{
13147XextCreateExtension ();
13148  ;
13149  return 0;
13150}
13151_ACEOF
13152rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13153if { (eval echo "$as_me:13153: \"$ac_link\"") >&5
13154  (eval $ac_link) 2>&5
13155  ac_status=$?
13156  echo "$as_me:13156: \$? = $ac_status" >&5
13157  (exit "$ac_status"); } &&
13158         { ac_try='test -s "conftest$ac_exeext"'
13159  { (eval echo "$as_me:13159: \"$ac_try\"") >&5
13160  (eval $ac_try) 2>&5
13161  ac_status=$?
13162  echo "$as_me:13162: \$? = $ac_status" >&5
13163  (exit "$ac_status"); }; }; then
13164  ac_cv_lib_Xext_XextCreateExtension=yes
13165else
13166  echo "$as_me: failed program was:" >&5
13167cat "conftest.$ac_ext" >&5
13168ac_cv_lib_Xext_XextCreateExtension=no
13169fi
13170rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13171LIBS=$ac_check_lib_save_LIBS
13172fi
13173echo "$as_me:13173: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13174echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13175if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13176
13177cf_add_libs="$LIBS"
13178# reverse order
13179cf_add_0lib=
13180for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13181# filter duplicates
13182for cf_add_1lib in $cf_add_0lib; do
13183	for cf_add_2lib in $cf_add_libs; do
13184		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13185			cf_add_1lib=
13186			break
13187		fi
13188	done
13189	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13190done
13191LIBS="$cf_add_libs"
13192
13193fi
13194
13195fi
13196
13197# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13198# in some cases has installed dummy files in the former, other cases replaced
13199# it with a link to the new location).  This complicates the configure script.
13200# Check for that pitfall, and recover using pkg-config
13201#
13202# If none of these are set, the configuration is almost certainly broken.
13203if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13204then
13205
13206if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13207	test -n "$verbose" && echo "	found package x11" 1>&6
13208
13209echo "${as_me:-configure}:13209: testing found package x11 ..." 1>&5
13210
13211	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13212	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13213	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13214
13215echo "${as_me:-configure}:13215: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13216
13217	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13218
13219echo "${as_me:-configure}:13219: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13220
13221cf_fix_cppflags=no
13222cf_new_cflags=
13223cf_new_cppflags=
13224cf_new_extra_cppflags=
13225
13226for cf_add_cflags in $cf_pkgconfig_incs
13227do
13228case "$cf_fix_cppflags" in
13229(no)
13230	case "$cf_add_cflags" in
13231	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13232		case "$cf_add_cflags" in
13233		(-D*)
13234			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13235
13236			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13237				&& test -z "${cf_tst_cflags}" \
13238				&& cf_fix_cppflags=yes
13239
13240			if test "$cf_fix_cppflags" = yes ; then
13241
13242	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13243	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13244
13245				continue
13246			elif test "${cf_tst_cflags}" = "\"'" ; then
13247
13248	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13249	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13250
13251				continue
13252			fi
13253			;;
13254		esac
13255		case "$CPPFLAGS" in
13256		(*$cf_add_cflags)
13257			;;
13258		(*)
13259			case "$cf_add_cflags" in
13260			(-D*)
13261				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13262
13263CPPFLAGS=`echo "$CPPFLAGS" | \
13264	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13265		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13266
13267				;;
13268			esac
13269
13270	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13271	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13272
13273			;;
13274		esac
13275		;;
13276	(*)
13277
13278	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13279	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13280
13281		;;
13282	esac
13283	;;
13284(yes)
13285
13286	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13287	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13288
13289	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13290
13291	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13292		&& test -z "${cf_tst_cflags}" \
13293		&& cf_fix_cppflags=no
13294	;;
13295esac
13296done
13297
13298if test -n "$cf_new_cflags" ; then
13299
13300	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13301	CFLAGS="${CFLAGS}$cf_new_cflags"
13302
13303fi
13304
13305if test -n "$cf_new_cppflags" ; then
13306
13307	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13308	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13309
13310fi
13311
13312if test -n "$cf_new_extra_cppflags" ; then
13313
13314	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13315	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13316
13317fi
13318
13319cf_add_libs="$LIBS"
13320# reverse order
13321cf_add_0lib=
13322for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13323# filter duplicates
13324for cf_add_1lib in $cf_add_0lib; do
13325	for cf_add_2lib in $cf_add_libs; do
13326		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13327			cf_add_1lib=
13328			break
13329		fi
13330	done
13331	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13332done
13333LIBS="$cf_add_libs"
13334
13335	:
13336else
13337	cf_pkgconfig_incs=
13338	cf_pkgconfig_libs=
13339	{ echo "$as_me:13339: WARNING: unable to find X11 library" >&5
13340echo "$as_me: WARNING: unable to find X11 library" >&2;}
13341fi
13342
13343if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13344	test -n "$verbose" && echo "	found package ice" 1>&6
13345
13346echo "${as_me:-configure}:13346: testing found package ice ..." 1>&5
13347
13348	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13349	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
13350	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13351
13352echo "${as_me:-configure}:13352: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13353
13354	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
13355
13356echo "${as_me:-configure}:13356: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13357
13358cf_fix_cppflags=no
13359cf_new_cflags=
13360cf_new_cppflags=
13361cf_new_extra_cppflags=
13362
13363for cf_add_cflags in $cf_pkgconfig_incs
13364do
13365case "$cf_fix_cppflags" in
13366(no)
13367	case "$cf_add_cflags" in
13368	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13369		case "$cf_add_cflags" in
13370		(-D*)
13371			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13372
13373			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13374				&& test -z "${cf_tst_cflags}" \
13375				&& cf_fix_cppflags=yes
13376
13377			if test "$cf_fix_cppflags" = yes ; then
13378
13379	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13380	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13381
13382				continue
13383			elif test "${cf_tst_cflags}" = "\"'" ; then
13384
13385	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13386	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13387
13388				continue
13389			fi
13390			;;
13391		esac
13392		case "$CPPFLAGS" in
13393		(*$cf_add_cflags)
13394			;;
13395		(*)
13396			case "$cf_add_cflags" in
13397			(-D*)
13398				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13399
13400CPPFLAGS=`echo "$CPPFLAGS" | \
13401	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13402		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13403
13404				;;
13405			esac
13406
13407	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13408	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13409
13410			;;
13411		esac
13412		;;
13413	(*)
13414
13415	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13416	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13417
13418		;;
13419	esac
13420	;;
13421(yes)
13422
13423	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13424	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13425
13426	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13427
13428	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13429		&& test -z "${cf_tst_cflags}" \
13430		&& cf_fix_cppflags=no
13431	;;
13432esac
13433done
13434
13435if test -n "$cf_new_cflags" ; then
13436
13437	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13438	CFLAGS="${CFLAGS}$cf_new_cflags"
13439
13440fi
13441
13442if test -n "$cf_new_cppflags" ; then
13443
13444	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13445	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13446
13447fi
13448
13449if test -n "$cf_new_extra_cppflags" ; then
13450
13451	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13452	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13453
13454fi
13455
13456cf_add_libs="$LIBS"
13457# reverse order
13458cf_add_0lib=
13459for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13460# filter duplicates
13461for cf_add_1lib in $cf_add_0lib; do
13462	for cf_add_2lib in $cf_add_libs; do
13463		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13464			cf_add_1lib=
13465			break
13466		fi
13467	done
13468	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13469done
13470LIBS="$cf_add_libs"
13471
13472	:
13473else
13474	cf_pkgconfig_incs=
13475	cf_pkgconfig_libs=
13476	{ echo "$as_me:13476: WARNING: unable to find ICE library" >&5
13477echo "$as_me: WARNING: unable to find ICE library" >&2;}
13478fi
13479
13480if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13481	test -n "$verbose" && echo "	found package sm" 1>&6
13482
13483echo "${as_me:-configure}:13483: testing found package sm ..." 1>&5
13484
13485	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13486	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
13487	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13488
13489echo "${as_me:-configure}:13489: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13490
13491	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
13492
13493echo "${as_me:-configure}:13493: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13494
13495cf_fix_cppflags=no
13496cf_new_cflags=
13497cf_new_cppflags=
13498cf_new_extra_cppflags=
13499
13500for cf_add_cflags in $cf_pkgconfig_incs
13501do
13502case "$cf_fix_cppflags" in
13503(no)
13504	case "$cf_add_cflags" in
13505	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13506		case "$cf_add_cflags" in
13507		(-D*)
13508			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13509
13510			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13511				&& test -z "${cf_tst_cflags}" \
13512				&& cf_fix_cppflags=yes
13513
13514			if test "$cf_fix_cppflags" = yes ; then
13515
13516	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13517	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13518
13519				continue
13520			elif test "${cf_tst_cflags}" = "\"'" ; then
13521
13522	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13523	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13524
13525				continue
13526			fi
13527			;;
13528		esac
13529		case "$CPPFLAGS" in
13530		(*$cf_add_cflags)
13531			;;
13532		(*)
13533			case "$cf_add_cflags" in
13534			(-D*)
13535				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13536
13537CPPFLAGS=`echo "$CPPFLAGS" | \
13538	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13539		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13540
13541				;;
13542			esac
13543
13544	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13545	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13546
13547			;;
13548		esac
13549		;;
13550	(*)
13551
13552	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13553	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13554
13555		;;
13556	esac
13557	;;
13558(yes)
13559
13560	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13561	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13562
13563	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13564
13565	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13566		&& test -z "${cf_tst_cflags}" \
13567		&& cf_fix_cppflags=no
13568	;;
13569esac
13570done
13571
13572if test -n "$cf_new_cflags" ; then
13573
13574	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13575	CFLAGS="${CFLAGS}$cf_new_cflags"
13576
13577fi
13578
13579if test -n "$cf_new_cppflags" ; then
13580
13581	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13582	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13583
13584fi
13585
13586if test -n "$cf_new_extra_cppflags" ; then
13587
13588	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13589	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13590
13591fi
13592
13593cf_add_libs="$LIBS"
13594# reverse order
13595cf_add_0lib=
13596for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13597# filter duplicates
13598for cf_add_1lib in $cf_add_0lib; do
13599	for cf_add_2lib in $cf_add_libs; do
13600		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13601			cf_add_1lib=
13602			break
13603		fi
13604	done
13605	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13606done
13607LIBS="$cf_add_libs"
13608
13609	:
13610else
13611	cf_pkgconfig_incs=
13612	cf_pkgconfig_libs=
13613	{ echo "$as_me:13613: WARNING: unable to find SM library" >&5
13614echo "$as_me: WARNING: unable to find SM library" >&2;}
13615fi
13616
13617if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13618	test -n "$verbose" && echo "	found package xt" 1>&6
13619
13620echo "${as_me:-configure}:13620: testing found package xt ..." 1>&5
13621
13622	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13623	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13624	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13625
13626echo "${as_me:-configure}:13626: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13627
13628	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13629
13630echo "${as_me:-configure}:13630: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13631
13632cf_fix_cppflags=no
13633cf_new_cflags=
13634cf_new_cppflags=
13635cf_new_extra_cppflags=
13636
13637for cf_add_cflags in $cf_pkgconfig_incs
13638do
13639case "$cf_fix_cppflags" in
13640(no)
13641	case "$cf_add_cflags" in
13642	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13643		case "$cf_add_cflags" in
13644		(-D*)
13645			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13646
13647			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13648				&& test -z "${cf_tst_cflags}" \
13649				&& cf_fix_cppflags=yes
13650
13651			if test "$cf_fix_cppflags" = yes ; then
13652
13653	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13654	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13655
13656				continue
13657			elif test "${cf_tst_cflags}" = "\"'" ; then
13658
13659	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13660	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13661
13662				continue
13663			fi
13664			;;
13665		esac
13666		case "$CPPFLAGS" in
13667		(*$cf_add_cflags)
13668			;;
13669		(*)
13670			case "$cf_add_cflags" in
13671			(-D*)
13672				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13673
13674CPPFLAGS=`echo "$CPPFLAGS" | \
13675	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13676		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13677
13678				;;
13679			esac
13680
13681	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13682	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13683
13684			;;
13685		esac
13686		;;
13687	(*)
13688
13689	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13690	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13691
13692		;;
13693	esac
13694	;;
13695(yes)
13696
13697	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13698	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13699
13700	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13701
13702	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13703		&& test -z "${cf_tst_cflags}" \
13704		&& cf_fix_cppflags=no
13705	;;
13706esac
13707done
13708
13709if test -n "$cf_new_cflags" ; then
13710
13711	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13712	CFLAGS="${CFLAGS}$cf_new_cflags"
13713
13714fi
13715
13716if test -n "$cf_new_cppflags" ; then
13717
13718	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13719	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13720
13721fi
13722
13723if test -n "$cf_new_extra_cppflags" ; then
13724
13725	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13726	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13727
13728fi
13729
13730cf_add_libs="$LIBS"
13731# reverse order
13732cf_add_0lib=
13733for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13734# filter duplicates
13735for cf_add_1lib in $cf_add_0lib; do
13736	for cf_add_2lib in $cf_add_libs; do
13737		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13738			cf_add_1lib=
13739			break
13740		fi
13741	done
13742	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13743done
13744LIBS="$cf_add_libs"
13745
13746	:
13747else
13748	cf_pkgconfig_incs=
13749	cf_pkgconfig_libs=
13750	{ echo "$as_me:13750: WARNING: unable to find Xt library" >&5
13751echo "$as_me: WARNING: unable to find Xt library" >&2;}
13752fi
13753
13754else
13755	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13756fi
13757
13758cf_have_X_LIBS=no
13759
13760if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13761	test -n "$verbose" && echo "	found package xt" 1>&6
13762
13763echo "${as_me:-configure}:13763: testing found package xt ..." 1>&5
13764
13765	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13766	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13767	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13768
13769echo "${as_me:-configure}:13769: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13770
13771	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13772
13773echo "${as_me:-configure}:13773: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13774
13775cf_fix_cppflags=no
13776cf_new_cflags=
13777cf_new_cppflags=
13778cf_new_extra_cppflags=
13779
13780for cf_add_cflags in $cf_pkgconfig_incs
13781do
13782case "$cf_fix_cppflags" in
13783(no)
13784	case "$cf_add_cflags" in
13785	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13786		case "$cf_add_cflags" in
13787		(-D*)
13788			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13789
13790			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13791				&& test -z "${cf_tst_cflags}" \
13792				&& cf_fix_cppflags=yes
13793
13794			if test "$cf_fix_cppflags" = yes ; then
13795
13796	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13797	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13798
13799				continue
13800			elif test "${cf_tst_cflags}" = "\"'" ; then
13801
13802	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13803	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13804
13805				continue
13806			fi
13807			;;
13808		esac
13809		case "$CPPFLAGS" in
13810		(*$cf_add_cflags)
13811			;;
13812		(*)
13813			case "$cf_add_cflags" in
13814			(-D*)
13815				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13816
13817CPPFLAGS=`echo "$CPPFLAGS" | \
13818	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13819		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13820
13821				;;
13822			esac
13823
13824	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13825	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13826
13827			;;
13828		esac
13829		;;
13830	(*)
13831
13832	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13833	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13834
13835		;;
13836	esac
13837	;;
13838(yes)
13839
13840	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13841	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13842
13843	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13844
13845	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13846		&& test -z "${cf_tst_cflags}" \
13847		&& cf_fix_cppflags=no
13848	;;
13849esac
13850done
13851
13852if test -n "$cf_new_cflags" ; then
13853
13854	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13855	CFLAGS="${CFLAGS}$cf_new_cflags"
13856
13857fi
13858
13859if test -n "$cf_new_cppflags" ; then
13860
13861	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13862	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13863
13864fi
13865
13866if test -n "$cf_new_extra_cppflags" ; then
13867
13868	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13869	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13870
13871fi
13872
13873cf_add_libs="$LIBS"
13874# reverse order
13875cf_add_0lib=
13876for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13877# filter duplicates
13878for cf_add_1lib in $cf_add_0lib; do
13879	for cf_add_2lib in $cf_add_libs; do
13880		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13881			cf_add_1lib=
13882			break
13883		fi
13884	done
13885	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13886done
13887LIBS="$cf_add_libs"
13888
13889	case "x$LIBS" in
13890	(*-lX11*)
13891		;;
13892	(*)
13893# we have an "xt" package, but it may omit Xt's dependency on X11
13894echo "$as_me:13894: checking for usable X dependency" >&5
13895echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13896if test "${cf_cv_xt_x11_compat+set}" = set; then
13897  echo $ECHO_N "(cached) $ECHO_C" >&6
13898else
13899
13900cat >"conftest.$ac_ext" <<_ACEOF
13901#line 13901 "configure"
13902#include "confdefs.h"
13903
13904#include <X11/Xlib.h>
13905
13906int
13907main (void)
13908{
13909
13910	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13911	int rc2 = XClearWindow((Display*) 0, (Window) 0);
13912	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13913	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13914
13915  ;
13916  return 0;
13917}
13918_ACEOF
13919rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13920if { (eval echo "$as_me:13920: \"$ac_link\"") >&5
13921  (eval $ac_link) 2>&5
13922  ac_status=$?
13923  echo "$as_me:13923: \$? = $ac_status" >&5
13924  (exit "$ac_status"); } &&
13925         { ac_try='test -s "conftest$ac_exeext"'
13926  { (eval echo "$as_me:13926: \"$ac_try\"") >&5
13927  (eval $ac_try) 2>&5
13928  ac_status=$?
13929  echo "$as_me:13929: \$? = $ac_status" >&5
13930  (exit "$ac_status"); }; }; then
13931  cf_cv_xt_x11_compat=yes
13932else
13933  echo "$as_me: failed program was:" >&5
13934cat "conftest.$ac_ext" >&5
13935cf_cv_xt_x11_compat=no
13936fi
13937rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13938fi
13939echo "$as_me:13939: result: $cf_cv_xt_x11_compat" >&5
13940echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13941		if test "$cf_cv_xt_x11_compat" = no
13942		then
13943			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
13944
13945echo "${as_me:-configure}:13945: testing work around broken X11 dependency ..." 1>&5
13946
13947			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13948
13949if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13950	test -n "$verbose" && echo "	found package x11" 1>&6
13951
13952echo "${as_me:-configure}:13952: testing found package x11 ..." 1>&5
13953
13954	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13955	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13956	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13957
13958echo "${as_me:-configure}:13958: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13959
13960	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13961
13962echo "${as_me:-configure}:13962: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13963
13964cf_fix_cppflags=no
13965cf_new_cflags=
13966cf_new_cppflags=
13967cf_new_extra_cppflags=
13968
13969for cf_add_cflags in $cf_pkgconfig_incs
13970do
13971case "$cf_fix_cppflags" in
13972(no)
13973	case "$cf_add_cflags" in
13974	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13975		case "$cf_add_cflags" in
13976		(-D*)
13977			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13978
13979			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13980				&& test -z "${cf_tst_cflags}" \
13981				&& cf_fix_cppflags=yes
13982
13983			if test "$cf_fix_cppflags" = yes ; then
13984
13985	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13986	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13987
13988				continue
13989			elif test "${cf_tst_cflags}" = "\"'" ; then
13990
13991	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13992	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13993
13994				continue
13995			fi
13996			;;
13997		esac
13998		case "$CPPFLAGS" in
13999		(*$cf_add_cflags)
14000			;;
14001		(*)
14002			case "$cf_add_cflags" in
14003			(-D*)
14004				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14005
14006CPPFLAGS=`echo "$CPPFLAGS" | \
14007	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14008		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14009
14010				;;
14011			esac
14012
14013	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14014	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14015
14016			;;
14017		esac
14018		;;
14019	(*)
14020
14021	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14022	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14023
14024		;;
14025	esac
14026	;;
14027(yes)
14028
14029	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14030	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14031
14032	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14033
14034	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14035		&& test -z "${cf_tst_cflags}" \
14036		&& cf_fix_cppflags=no
14037	;;
14038esac
14039done
14040
14041if test -n "$cf_new_cflags" ; then
14042
14043	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14044	CFLAGS="${CFLAGS}$cf_new_cflags"
14045
14046fi
14047
14048if test -n "$cf_new_cppflags" ; then
14049
14050	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14051	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14052
14053fi
14054
14055if test -n "$cf_new_extra_cppflags" ; then
14056
14057	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14058	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14059
14060fi
14061
14062cf_add_libs="$LIBS"
14063# reverse order
14064cf_add_0lib=
14065for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14066# filter duplicates
14067for cf_add_1lib in $cf_add_0lib; do
14068	for cf_add_2lib in $cf_add_libs; do
14069		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14070			cf_add_1lib=
14071			break
14072		fi
14073	done
14074	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14075done
14076LIBS="$cf_add_libs"
14077
14078	:
14079else
14080	cf_pkgconfig_incs=
14081	cf_pkgconfig_libs=
14082
14083test -n "$verbose" && echo "	...before $LIBS" 1>&6
14084
14085echo "${as_me:-configure}:14085: testing ...before $LIBS ..." 1>&5
14086
14087LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
14088test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14089
14090echo "${as_me:-configure}:14090: testing ...after  $LIBS ..." 1>&5
14091
14092fi
14093
14094		fi
14095		;;
14096	esac
14097
14098echo "$as_me:14098: checking for usable X Toolkit package" >&5
14099echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14100if test "${cf_cv_xt_ice_compat+set}" = set; then
14101  echo $ECHO_N "(cached) $ECHO_C" >&6
14102else
14103
14104cat >"conftest.$ac_ext" <<_ACEOF
14105#line 14105 "configure"
14106#include "confdefs.h"
14107
14108#include <X11/Shell.h>
14109
14110int
14111main (void)
14112{
14113int num = IceConnectionNumber(0); (void) num
14114
14115  ;
14116  return 0;
14117}
14118_ACEOF
14119rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14120if { (eval echo "$as_me:14120: \"$ac_link\"") >&5
14121  (eval $ac_link) 2>&5
14122  ac_status=$?
14123  echo "$as_me:14123: \$? = $ac_status" >&5
14124  (exit "$ac_status"); } &&
14125         { ac_try='test -s "conftest$ac_exeext"'
14126  { (eval echo "$as_me:14126: \"$ac_try\"") >&5
14127  (eval $ac_try) 2>&5
14128  ac_status=$?
14129  echo "$as_me:14129: \$? = $ac_status" >&5
14130  (exit "$ac_status"); }; }; then
14131  cf_cv_xt_ice_compat=yes
14132else
14133  echo "$as_me: failed program was:" >&5
14134cat "conftest.$ac_ext" >&5
14135cf_cv_xt_ice_compat=no
14136fi
14137rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14138fi
14139echo "$as_me:14139: result: $cf_cv_xt_ice_compat" >&5
14140echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14141
14142	if test "$cf_cv_xt_ice_compat" = no
14143	then
14144		# workaround for broken ".pc" files used for X Toolkit.
14145		case "x$X_PRE_LIBS" in
14146		(*-lICE*)
14147			case "x$LIBS" in
14148			(*-lICE*)
14149				;;
14150			(*)
14151				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
14152
14153echo "${as_me:-configure}:14153: testing work around broken ICE dependency ..." 1>&5
14154
14155if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14156	test -n "$verbose" && echo "	found package ice" 1>&6
14157
14158echo "${as_me:-configure}:14158: testing found package ice ..." 1>&5
14159
14160	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14161	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
14162	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14163
14164echo "${as_me:-configure}:14164: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14165
14166	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
14167
14168echo "${as_me:-configure}:14168: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14169
14170cf_fix_cppflags=no
14171cf_new_cflags=
14172cf_new_cppflags=
14173cf_new_extra_cppflags=
14174
14175for cf_add_cflags in $cf_pkgconfig_incs
14176do
14177case "$cf_fix_cppflags" in
14178(no)
14179	case "$cf_add_cflags" in
14180	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14181		case "$cf_add_cflags" in
14182		(-D*)
14183			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14184
14185			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14186				&& test -z "${cf_tst_cflags}" \
14187				&& cf_fix_cppflags=yes
14188
14189			if test "$cf_fix_cppflags" = yes ; then
14190
14191	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14192	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14193
14194				continue
14195			elif test "${cf_tst_cflags}" = "\"'" ; then
14196
14197	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14198	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14199
14200				continue
14201			fi
14202			;;
14203		esac
14204		case "$CPPFLAGS" in
14205		(*$cf_add_cflags)
14206			;;
14207		(*)
14208			case "$cf_add_cflags" in
14209			(-D*)
14210				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14211
14212CPPFLAGS=`echo "$CPPFLAGS" | \
14213	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14214		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14215
14216				;;
14217			esac
14218
14219	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14220	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14221
14222			;;
14223		esac
14224		;;
14225	(*)
14226
14227	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14228	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14229
14230		;;
14231	esac
14232	;;
14233(yes)
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	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14239
14240	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14241		&& test -z "${cf_tst_cflags}" \
14242		&& cf_fix_cppflags=no
14243	;;
14244esac
14245done
14246
14247if test -n "$cf_new_cflags" ; then
14248
14249	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14250	CFLAGS="${CFLAGS}$cf_new_cflags"
14251
14252fi
14253
14254if test -n "$cf_new_cppflags" ; then
14255
14256	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14257	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14258
14259fi
14260
14261if test -n "$cf_new_extra_cppflags" ; then
14262
14263	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14264	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14265
14266fi
14267
14268cf_add_libs="$LIBS"
14269# reverse order
14270cf_add_0lib=
14271for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14272# filter duplicates
14273for cf_add_1lib in $cf_add_0lib; do
14274	for cf_add_2lib in $cf_add_libs; do
14275		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14276			cf_add_1lib=
14277			break
14278		fi
14279	done
14280	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14281done
14282LIBS="$cf_add_libs"
14283
14284if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14285	test -n "$verbose" && echo "	found package sm" 1>&6
14286
14287echo "${as_me:-configure}:14287: testing found package sm ..." 1>&5
14288
14289	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14290	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
14291	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14292
14293echo "${as_me:-configure}:14293: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14294
14295	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
14296
14297echo "${as_me:-configure}:14297: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14298
14299cf_fix_cppflags=no
14300cf_new_cflags=
14301cf_new_cppflags=
14302cf_new_extra_cppflags=
14303
14304for cf_add_cflags in $cf_pkgconfig_incs
14305do
14306case "$cf_fix_cppflags" in
14307(no)
14308	case "$cf_add_cflags" in
14309	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14310		case "$cf_add_cflags" in
14311		(-D*)
14312			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14313
14314			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14315				&& test -z "${cf_tst_cflags}" \
14316				&& cf_fix_cppflags=yes
14317
14318			if test "$cf_fix_cppflags" = yes ; then
14319
14320	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14321	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14322
14323				continue
14324			elif test "${cf_tst_cflags}" = "\"'" ; then
14325
14326	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14327	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14328
14329				continue
14330			fi
14331			;;
14332		esac
14333		case "$CPPFLAGS" in
14334		(*$cf_add_cflags)
14335			;;
14336		(*)
14337			case "$cf_add_cflags" in
14338			(-D*)
14339				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14340
14341CPPFLAGS=`echo "$CPPFLAGS" | \
14342	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14343		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14344
14345				;;
14346			esac
14347
14348	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14349	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14350
14351			;;
14352		esac
14353		;;
14354	(*)
14355
14356	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14357	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14358
14359		;;
14360	esac
14361	;;
14362(yes)
14363
14364	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14365	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14366
14367	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14368
14369	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14370		&& test -z "${cf_tst_cflags}" \
14371		&& cf_fix_cppflags=no
14372	;;
14373esac
14374done
14375
14376if test -n "$cf_new_cflags" ; then
14377
14378	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14379	CFLAGS="${CFLAGS}$cf_new_cflags"
14380
14381fi
14382
14383if test -n "$cf_new_cppflags" ; then
14384
14385	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14386	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14387
14388fi
14389
14390if test -n "$cf_new_extra_cppflags" ; then
14391
14392	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14393	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14394
14395fi
14396
14397cf_add_libs="$LIBS"
14398# reverse order
14399cf_add_0lib=
14400for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14401# filter duplicates
14402for cf_add_1lib in $cf_add_0lib; do
14403	for cf_add_2lib in $cf_add_libs; do
14404		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14405			cf_add_1lib=
14406			break
14407		fi
14408	done
14409	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14410done
14411LIBS="$cf_add_libs"
14412
14413	:
14414else
14415	cf_pkgconfig_incs=
14416	cf_pkgconfig_libs=
14417	:
14418fi
14419
14420else
14421	cf_pkgconfig_incs=
14422	cf_pkgconfig_libs=
14423
14424test -n "$verbose" && echo "	...before $LIBS" 1>&6
14425
14426echo "${as_me:-configure}:14426: testing ...before $LIBS ..." 1>&5
14427
14428LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
14429test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14430
14431echo "${as_me:-configure}:14431: testing ...after  $LIBS ..." 1>&5
14432
14433fi
14434
14435				;;
14436			esac
14437			;;
14438		esac
14439	fi
14440
14441	cf_have_X_LIBS=yes
14442
14443else
14444	cf_pkgconfig_incs=
14445	cf_pkgconfig_libs=
14446
14447	LDFLAGS="$X_LIBS $LDFLAGS"
14448
14449test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
14450
14451echo "${as_me:-configure}:14451: testing checking additions to CFLAGS ..." 1>&5
14452
14453cf_check_cflags="$CFLAGS"
14454cf_check_cppflags="$CPPFLAGS"
14455
14456cf_fix_cppflags=no
14457cf_new_cflags=
14458cf_new_cppflags=
14459cf_new_extra_cppflags=
14460
14461for cf_add_cflags in $X_CFLAGS
14462do
14463case "$cf_fix_cppflags" in
14464(no)
14465	case "$cf_add_cflags" in
14466	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14467		case "$cf_add_cflags" in
14468		(-D*)
14469			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14470
14471			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14472				&& test -z "${cf_tst_cflags}" \
14473				&& cf_fix_cppflags=yes
14474
14475			if test "$cf_fix_cppflags" = yes ; then
14476
14477	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14478	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14479
14480				continue
14481			elif test "${cf_tst_cflags}" = "\"'" ; then
14482
14483	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14484	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14485
14486				continue
14487			fi
14488			;;
14489		esac
14490		case "$CPPFLAGS" in
14491		(*$cf_add_cflags)
14492			;;
14493		(*)
14494			case "$cf_add_cflags" in
14495			(-D*)
14496				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14497
14498CPPFLAGS=`echo "$CPPFLAGS" | \
14499	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14500		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14501
14502				;;
14503			esac
14504
14505	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14506	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14507
14508			;;
14509		esac
14510		;;
14511	(*)
14512
14513	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14514	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14515
14516		;;
14517	esac
14518	;;
14519(yes)
14520
14521	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14522	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14523
14524	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14525
14526	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14527		&& test -z "${cf_tst_cflags}" \
14528		&& cf_fix_cppflags=no
14529	;;
14530esac
14531done
14532
14533if test -n "$cf_new_cflags" ; then
14534	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
14535
14536echo "${as_me:-configure}:14536: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14537
14538	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14539	CFLAGS="${CFLAGS}$cf_new_cflags"
14540
14541fi
14542
14543if test -n "$cf_new_cppflags" ; then
14544	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14545
14546echo "${as_me:-configure}:14546: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14547
14548	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14549	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14550
14551fi
14552
14553if test -n "$cf_new_extra_cppflags" ; then
14554	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14555
14556echo "${as_me:-configure}:14556: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14557
14558	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14559	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14560
14561fi
14562
14563if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14564cat >"conftest.$ac_ext" <<_ACEOF
14565#line 14565 "configure"
14566#include "confdefs.h"
14567#include <stdio.h>
14568int
14569main (void)
14570{
14571printf("Hello world");
14572  ;
14573  return 0;
14574}
14575_ACEOF
14576rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14577if { (eval echo "$as_me:14577: \"$ac_link\"") >&5
14578  (eval $ac_link) 2>&5
14579  ac_status=$?
14580  echo "$as_me:14580: \$? = $ac_status" >&5
14581  (exit "$ac_status"); } &&
14582         { ac_try='test -s "conftest$ac_exeext"'
14583  { (eval echo "$as_me:14583: \"$ac_try\"") >&5
14584  (eval $ac_try) 2>&5
14585  ac_status=$?
14586  echo "$as_me:14586: \$? = $ac_status" >&5
14587  (exit "$ac_status"); }; }; then
14588  :
14589else
14590  echo "$as_me: failed program was:" >&5
14591cat "conftest.$ac_ext" >&5
14592test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
14593
14594echo "${as_me:-configure}:14594: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
14595
14596	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14597		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
14598
14599echo "${as_me:-configure}:14599: testing but keeping change to \$CPPFLAGS ..." 1>&5
14600
14601	 fi
14602	 CFLAGS="$cf_check_cflags"
14603fi
14604rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14605fi
14606
14607	echo "$as_me:14607: checking for XOpenDisplay" >&5
14608echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14609if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14610  echo $ECHO_N "(cached) $ECHO_C" >&6
14611else
14612  cat >"conftest.$ac_ext" <<_ACEOF
14613#line 14613 "configure"
14614#include "confdefs.h"
14615#define XOpenDisplay autoconf_temporary
14616#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14617#undef XOpenDisplay
14618
14619#ifdef __cplusplus
14620extern "C"
14621#endif
14622
14623/* We use char because int might match the return type of a gcc2
14624   builtin and then its argument prototype would still apply.  */
14625char XOpenDisplay (void);
14626
14627int
14628main (void)
14629{
14630
14631/* The GNU C library defines stubs for functions which it implements
14632    to always fail with ENOSYS.  Some functions are actually named
14633    something starting with __ and the normal name is an alias.  */
14634#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14635#error found stub for XOpenDisplay
14636#endif
14637
14638	return XOpenDisplay ();
14639  ;
14640  return 0;
14641}
14642_ACEOF
14643rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14644if { (eval echo "$as_me:14644: \"$ac_link\"") >&5
14645  (eval $ac_link) 2>&5
14646  ac_status=$?
14647  echo "$as_me:14647: \$? = $ac_status" >&5
14648  (exit "$ac_status"); } &&
14649         { ac_try='test -s "conftest$ac_exeext"'
14650  { (eval echo "$as_me:14650: \"$ac_try\"") >&5
14651  (eval $ac_try) 2>&5
14652  ac_status=$?
14653  echo "$as_me:14653: \$? = $ac_status" >&5
14654  (exit "$ac_status"); }; }; then
14655  ac_cv_func_XOpenDisplay=yes
14656else
14657  echo "$as_me: failed program was:" >&5
14658cat "conftest.$ac_ext" >&5
14659ac_cv_func_XOpenDisplay=no
14660fi
14661rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14662fi
14663echo "$as_me:14663: result: $ac_cv_func_XOpenDisplay" >&5
14664echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14665if test "$ac_cv_func_XOpenDisplay" = yes; then
14666  :
14667else
14668
14669	echo "$as_me:14669: checking for XOpenDisplay in -lX11" >&5
14670echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14671if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14672  echo $ECHO_N "(cached) $ECHO_C" >&6
14673else
14674  ac_check_lib_save_LIBS=$LIBS
14675LIBS="-lX11  $LIBS"
14676cat >"conftest.$ac_ext" <<_ACEOF
14677#line 14677 "configure"
14678#include "confdefs.h"
14679
14680/* Override any gcc2 internal prototype to avoid an error.  */
14681#ifdef __cplusplus
14682extern "C"
14683#endif
14684/* We use char because int might match the return type of a gcc2
14685   builtin and then its argument prototype would still apply.  */
14686char XOpenDisplay ();
14687int
14688main (void)
14689{
14690XOpenDisplay ();
14691  ;
14692  return 0;
14693}
14694_ACEOF
14695rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14696if { (eval echo "$as_me:14696: \"$ac_link\"") >&5
14697  (eval $ac_link) 2>&5
14698  ac_status=$?
14699  echo "$as_me:14699: \$? = $ac_status" >&5
14700  (exit "$ac_status"); } &&
14701         { ac_try='test -s "conftest$ac_exeext"'
14702  { (eval echo "$as_me:14702: \"$ac_try\"") >&5
14703  (eval $ac_try) 2>&5
14704  ac_status=$?
14705  echo "$as_me:14705: \$? = $ac_status" >&5
14706  (exit "$ac_status"); }; }; then
14707  ac_cv_lib_X11_XOpenDisplay=yes
14708else
14709  echo "$as_me: failed program was:" >&5
14710cat "conftest.$ac_ext" >&5
14711ac_cv_lib_X11_XOpenDisplay=no
14712fi
14713rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14714LIBS=$ac_check_lib_save_LIBS
14715fi
14716echo "$as_me:14716: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14717echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14718if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
14719
14720cf_add_libs="$LIBS"
14721# reverse order
14722cf_add_0lib=
14723for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14724# filter duplicates
14725for cf_add_1lib in $cf_add_0lib; do
14726	for cf_add_2lib in $cf_add_libs; do
14727		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14728			cf_add_1lib=
14729			break
14730		fi
14731	done
14732	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14733done
14734LIBS="$cf_add_libs"
14735
14736fi
14737
14738fi
14739
14740	echo "$as_me:14740: checking for XtAppInitialize" >&5
14741echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14742if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14743  echo $ECHO_N "(cached) $ECHO_C" >&6
14744else
14745  cat >"conftest.$ac_ext" <<_ACEOF
14746#line 14746 "configure"
14747#include "confdefs.h"
14748#define XtAppInitialize autoconf_temporary
14749#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14750#undef XtAppInitialize
14751
14752#ifdef __cplusplus
14753extern "C"
14754#endif
14755
14756/* We use char because int might match the return type of a gcc2
14757   builtin and then its argument prototype would still apply.  */
14758char XtAppInitialize (void);
14759
14760int
14761main (void)
14762{
14763
14764/* The GNU C library defines stubs for functions which it implements
14765    to always fail with ENOSYS.  Some functions are actually named
14766    something starting with __ and the normal name is an alias.  */
14767#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14768#error found stub for XtAppInitialize
14769#endif
14770
14771	return XtAppInitialize ();
14772  ;
14773  return 0;
14774}
14775_ACEOF
14776rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14777if { (eval echo "$as_me:14777: \"$ac_link\"") >&5
14778  (eval $ac_link) 2>&5
14779  ac_status=$?
14780  echo "$as_me:14780: \$? = $ac_status" >&5
14781  (exit "$ac_status"); } &&
14782         { ac_try='test -s "conftest$ac_exeext"'
14783  { (eval echo "$as_me:14783: \"$ac_try\"") >&5
14784  (eval $ac_try) 2>&5
14785  ac_status=$?
14786  echo "$as_me:14786: \$? = $ac_status" >&5
14787  (exit "$ac_status"); }; }; then
14788  ac_cv_func_XtAppInitialize=yes
14789else
14790  echo "$as_me: failed program was:" >&5
14791cat "conftest.$ac_ext" >&5
14792ac_cv_func_XtAppInitialize=no
14793fi
14794rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14795fi
14796echo "$as_me:14796: result: $ac_cv_func_XtAppInitialize" >&5
14797echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14798if test "$ac_cv_func_XtAppInitialize" = yes; then
14799  :
14800else
14801
14802	echo "$as_me:14802: checking for XtAppInitialize in -lXt" >&5
14803echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14804if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14805  echo $ECHO_N "(cached) $ECHO_C" >&6
14806else
14807  ac_check_lib_save_LIBS=$LIBS
14808LIBS="-lXt  $LIBS"
14809cat >"conftest.$ac_ext" <<_ACEOF
14810#line 14810 "configure"
14811#include "confdefs.h"
14812
14813/* Override any gcc2 internal prototype to avoid an error.  */
14814#ifdef __cplusplus
14815extern "C"
14816#endif
14817/* We use char because int might match the return type of a gcc2
14818   builtin and then its argument prototype would still apply.  */
14819char XtAppInitialize ();
14820int
14821main (void)
14822{
14823XtAppInitialize ();
14824  ;
14825  return 0;
14826}
14827_ACEOF
14828rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14829if { (eval echo "$as_me:14829: \"$ac_link\"") >&5
14830  (eval $ac_link) 2>&5
14831  ac_status=$?
14832  echo "$as_me:14832: \$? = $ac_status" >&5
14833  (exit "$ac_status"); } &&
14834         { ac_try='test -s "conftest$ac_exeext"'
14835  { (eval echo "$as_me:14835: \"$ac_try\"") >&5
14836  (eval $ac_try) 2>&5
14837  ac_status=$?
14838  echo "$as_me:14838: \$? = $ac_status" >&5
14839  (exit "$ac_status"); }; }; then
14840  ac_cv_lib_Xt_XtAppInitialize=yes
14841else
14842  echo "$as_me: failed program was:" >&5
14843cat "conftest.$ac_ext" >&5
14844ac_cv_lib_Xt_XtAppInitialize=no
14845fi
14846rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14847LIBS=$ac_check_lib_save_LIBS
14848fi
14849echo "$as_me:14849: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14850echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14851if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
14852
14853cat >>confdefs.h <<\EOF
14854#define HAVE_LIBXT 1
14855EOF
14856
14857		 cf_have_X_LIBS=Xt
14858		 LIBS="-lXt $LIBS"
14859fi
14860
14861fi
14862
14863fi
14864
14865if test "$cf_have_X_LIBS" = no ; then
14866	{ echo "$as_me:14866: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14867test program.  You will have to check and add the proper libraries by hand
14868to makefile." >&5
14869echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14870test program.  You will have to check and add the proper libraries by hand
14871to makefile." >&2;}
14872fi
14873
14874cf_x_athena_root=$cf_x_athena
14875cf_x_athena_inc=""
14876
14877for cf_path in default \
14878	/usr/contrib/X11R6 \
14879	/usr/contrib/X11R5 \
14880	/usr/lib/X11R5 \
14881	/usr/local
14882do
14883	if test -z "$cf_x_athena_inc" ; then
14884
14885cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
14886cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
14887cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
14888LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14889for cf_X_CFLAGS in $X_CFLAGS
14890do
14891	case "x$cf_X_CFLAGS" in
14892	x-[IUD]*)
14893		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14894		;;
14895	*)
14896		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14897		;;
14898	esac
14899done
14900
14901		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14902		if test "$cf_path" != default ; then
14903
14904	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14905	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14906
14907			echo "$as_me:14907: checking for $cf_test in $cf_path" >&5
14908echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14909		else
14910			echo "$as_me:14910: checking for $cf_test" >&5
14911echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14912		fi
14913		cat >"conftest.$ac_ext" <<_ACEOF
14914#line 14914 "configure"
14915#include "confdefs.h"
14916
14917#include <X11/Intrinsic.h>
14918#include <$cf_test>
14919int
14920main (void)
14921{
14922
14923  ;
14924  return 0;
14925}
14926_ACEOF
14927rm -f "conftest.$ac_objext"
14928if { (eval echo "$as_me:14928: \"$ac_compile\"") >&5
14929  (eval $ac_compile) 2>&5
14930  ac_status=$?
14931  echo "$as_me:14931: \$? = $ac_status" >&5
14932  (exit "$ac_status"); } &&
14933         { ac_try='test -s "conftest.$ac_objext"'
14934  { (eval echo "$as_me:14934: \"$ac_try\"") >&5
14935  (eval $ac_try) 2>&5
14936  ac_status=$?
14937  echo "$as_me:14937: \$? = $ac_status" >&5
14938  (exit "$ac_status"); }; }; then
14939  cf_result=yes
14940else
14941  echo "$as_me: failed program was:" >&5
14942cat "conftest.$ac_ext" >&5
14943cf_result=no
14944fi
14945rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14946		echo "$as_me:14946: result: $cf_result" >&5
14947echo "${ECHO_T}$cf_result" >&6
14948
14949LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
14950CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
14951CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
14952
14953		if test "$cf_result" = yes ; then
14954			test "$cf_path"  = default && cf_x_athena_inc=default
14955			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
14956			break
14957		fi
14958	fi
14959done
14960
14961if test -z "$cf_x_athena_inc" ; then
14962	{ echo "$as_me:14962: WARNING: Unable to find Athena header files" >&5
14963echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
14964elif test "$cf_x_athena_inc" != default ; then
14965
14966	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14967	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14968
14969fi
14970
14971cf_x_athena_root=$cf_x_athena
14972cf_x_athena_lib=""
14973
14974for cf_path in default \
14975	/usr/contrib/X11R6 \
14976	/usr/contrib/X11R5 \
14977	/usr/lib/X11R5 \
14978	/usr/local
14979do
14980	for cf_lib in \
14981		${cf_x_athena_root} \
14982		${cf_x_athena_root}7 \
14983		${cf_x_athena_root}6
14984	do
14985	for cf_libs in \
14986		"-l$cf_lib -lXmu" \
14987		"-l$cf_lib -lXpm -lXmu" \
14988		"-l${cf_lib}_s -lXmu_s"
14989	do
14990		test -n "$cf_x_athena_lib" && break
14991
14992cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
14993cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
14994cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
14995LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14996for cf_X_CFLAGS in $X_CFLAGS
14997do
14998	case "x$cf_X_CFLAGS" in
14999	x-[IUD]*)
15000		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15001		;;
15002	*)
15003		CFLAGS="$CFLAGS $cf_X_CFLAGS"
15004		;;
15005	esac
15006done
15007
15008		cf_test=XawSimpleMenuAddGlobalActions
15009		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15010
15011cf_add_libs="$LIBS"
15012# reverse order
15013cf_add_0lib=
15014for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15015# filter duplicates
15016for cf_add_1lib in $cf_add_0lib; do
15017	for cf_add_2lib in $cf_add_libs; do
15018		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15019			cf_add_1lib=
15020			break
15021		fi
15022	done
15023	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15024done
15025LIBS="$cf_add_libs"
15026
15027		echo "$as_me:15027: checking for $cf_test in $cf_libs" >&5
15028echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15029		cat >"conftest.$ac_ext" <<_ACEOF
15030#line 15030 "configure"
15031#include "confdefs.h"
15032
15033#include <X11/Intrinsic.h>
15034#include <X11/$cf_x_athena_root/SimpleMenu.h>
15035
15036int
15037main (void)
15038{
15039
15040$cf_test((XtAppContext) 0)
15041  ;
15042  return 0;
15043}
15044_ACEOF
15045rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15046if { (eval echo "$as_me:15046: \"$ac_link\"") >&5
15047  (eval $ac_link) 2>&5
15048  ac_status=$?
15049  echo "$as_me:15049: \$? = $ac_status" >&5
15050  (exit "$ac_status"); } &&
15051         { ac_try='test -s "conftest$ac_exeext"'
15052  { (eval echo "$as_me:15052: \"$ac_try\"") >&5
15053  (eval $ac_try) 2>&5
15054  ac_status=$?
15055  echo "$as_me:15055: \$? = $ac_status" >&5
15056  (exit "$ac_status"); }; }; then
15057  cf_result=yes
15058else
15059  echo "$as_me: failed program was:" >&5
15060cat "conftest.$ac_ext" >&5
15061cf_result=no
15062fi
15063rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15064		echo "$as_me:15064: result: $cf_result" >&5
15065echo "${ECHO_T}$cf_result" >&6
15066
15067LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15068CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15069CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15070
15071		if test "$cf_result" = yes ; then
15072			cf_x_athena_lib="$cf_libs"
15073			break
15074		fi
15075	done # cf_libs
15076		test -n "$cf_x_athena_lib" && break
15077	done # cf_lib
15078done
15079
15080if test -z "$cf_x_athena_lib" ; then
15081	{ { echo "$as_me:15081: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15082echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15083   { (exit 1); exit 1; }; }
15084fi
15085
15086cf_add_libs="$LIBS"
15087# reverse order
15088cf_add_0lib=
15089for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15090# filter duplicates
15091for cf_add_1lib in $cf_add_0lib; do
15092	for cf_add_2lib in $cf_add_libs; do
15093		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15094			cf_add_1lib=
15095			break
15096		fi
15097	done
15098	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15099done
15100LIBS="$cf_add_libs"
15101
15102cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15103
15104cat >>confdefs.h <<EOF
15105#define $cf_x_athena_LIBS 1
15106EOF
15107
15108fi
15109
15110for ac_header in X11/Xpoll.h
15111do
15112as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15113echo "$as_me:15113: checking for $ac_header" >&5
15114echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15115if eval "test \"\${$as_ac_Header+set}\" = set"; then
15116  echo $ECHO_N "(cached) $ECHO_C" >&6
15117else
15118  cat >"conftest.$ac_ext" <<_ACEOF
15119#line 15119 "configure"
15120#include "confdefs.h"
15121#include <$ac_header>
15122_ACEOF
15123if { (eval echo "$as_me:15123: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15124  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15125  ac_status=$?
15126  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15127  rm -f conftest.er1
15128  cat conftest.err >&5
15129  echo "$as_me:15129: \$? = $ac_status" >&5
15130  (exit "$ac_status"); } >/dev/null; then
15131  if test -s conftest.err; then
15132    ac_cpp_err=$ac_c_preproc_warn_flag
15133  else
15134    ac_cpp_err=
15135  fi
15136else
15137  ac_cpp_err=yes
15138fi
15139if test -z "$ac_cpp_err"; then
15140  eval "$as_ac_Header=yes"
15141else
15142  echo "$as_me: failed program was:" >&5
15143  cat "conftest.$ac_ext" >&5
15144  eval "$as_ac_Header=no"
15145fi
15146rm -f conftest.err "conftest.$ac_ext"
15147fi
15148echo "$as_me:15148: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15149echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15150if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15151  cat >>confdefs.h <<EOF
15152#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15153EOF
15154
15155fi
15156done
15157
15158echo "$as_me:15158: checking for declaration of fd_set" >&5
15159echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15160if test "${cf_cv_type_fd_set+set}" = set; then
15161  echo $ECHO_N "(cached) $ECHO_C" >&6
15162else
15163
15164echo "${as_me:-configure}:15164: testing sys/types alone ..." 1>&5
15165
15166cat >"conftest.$ac_ext" <<_ACEOF
15167#line 15167 "configure"
15168#include "confdefs.h"
15169
15170#include <sys/types.h>
15171int
15172main (void)
15173{
15174fd_set x; (void)x
15175  ;
15176  return 0;
15177}
15178_ACEOF
15179rm -f "conftest.$ac_objext"
15180if { (eval echo "$as_me:15180: \"$ac_compile\"") >&5
15181  (eval $ac_compile) 2>&5
15182  ac_status=$?
15183  echo "$as_me:15183: \$? = $ac_status" >&5
15184  (exit "$ac_status"); } &&
15185         { ac_try='test -s "conftest.$ac_objext"'
15186  { (eval echo "$as_me:15186: \"$ac_try\"") >&5
15187  (eval $ac_try) 2>&5
15188  ac_status=$?
15189  echo "$as_me:15189: \$? = $ac_status" >&5
15190  (exit "$ac_status"); }; }; then
15191  cf_cv_type_fd_set=sys/types.h
15192else
15193  echo "$as_me: failed program was:" >&5
15194cat "conftest.$ac_ext" >&5
15195
15196echo "${as_me:-configure}:15196: testing X11/Xpoll.h ..." 1>&5
15197
15198cat >"conftest.$ac_ext" <<_ACEOF
15199#line 15199 "configure"
15200#include "confdefs.h"
15201
15202#ifdef HAVE_X11_XPOLL_H
15203#include <X11/Xpoll.h>
15204#endif
15205int
15206main (void)
15207{
15208fd_set x; (void)x
15209  ;
15210  return 0;
15211}
15212_ACEOF
15213rm -f "conftest.$ac_objext"
15214if { (eval echo "$as_me:15214: \"$ac_compile\"") >&5
15215  (eval $ac_compile) 2>&5
15216  ac_status=$?
15217  echo "$as_me:15217: \$? = $ac_status" >&5
15218  (exit "$ac_status"); } &&
15219         { ac_try='test -s "conftest.$ac_objext"'
15220  { (eval echo "$as_me:15220: \"$ac_try\"") >&5
15221  (eval $ac_try) 2>&5
15222  ac_status=$?
15223  echo "$as_me:15223: \$? = $ac_status" >&5
15224  (exit "$ac_status"); }; }; then
15225  cf_cv_type_fd_set=X11/Xpoll.h
15226else
15227  echo "$as_me: failed program was:" >&5
15228cat "conftest.$ac_ext" >&5
15229
15230echo "${as_me:-configure}:15230: testing sys/select.h ..." 1>&5
15231
15232cat >"conftest.$ac_ext" <<_ACEOF
15233#line 15233 "configure"
15234#include "confdefs.h"
15235
15236#include <sys/types.h>
15237#include <sys/select.h>
15238int
15239main (void)
15240{
15241fd_set x; (void)x
15242  ;
15243  return 0;
15244}
15245_ACEOF
15246rm -f "conftest.$ac_objext"
15247if { (eval echo "$as_me:15247: \"$ac_compile\"") >&5
15248  (eval $ac_compile) 2>&5
15249  ac_status=$?
15250  echo "$as_me:15250: \$? = $ac_status" >&5
15251  (exit "$ac_status"); } &&
15252         { ac_try='test -s "conftest.$ac_objext"'
15253  { (eval echo "$as_me:15253: \"$ac_try\"") >&5
15254  (eval $ac_try) 2>&5
15255  ac_status=$?
15256  echo "$as_me:15256: \$? = $ac_status" >&5
15257  (exit "$ac_status"); }; }; then
15258  cf_cv_type_fd_set=sys/select.h
15259else
15260  echo "$as_me: failed program was:" >&5
15261cat "conftest.$ac_ext" >&5
15262cf_cv_type_fd_set=unknown
15263fi
15264rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15265fi
15266rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15267fi
15268rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15269fi
15270echo "$as_me:15270: result: $cf_cv_type_fd_set" >&5
15271echo "${ECHO_T}$cf_cv_type_fd_set" >&6
15272if test $cf_cv_type_fd_set = sys/select.h ; then
15273
15274cat >>confdefs.h <<\EOF
15275#define USE_SYS_SELECT_H 1
15276EOF
15277
15278fi
15279
15280echo "$as_me:15280: checking for declaration of fd_mask" >&5
15281echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
15282if test "${cf_cv_type_fd_mask+set}" = set; then
15283  echo $ECHO_N "(cached) $ECHO_C" >&6
15284else
15285
15286    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
15287        cat >"conftest.$ac_ext" <<_ACEOF
15288#line 15288 "configure"
15289#include "confdefs.h"
15290
15291#include <X11/Xpoll.h>
15292int
15293main (void)
15294{
15295fd_mask x
15296  ;
15297  return 0;
15298}
15299_ACEOF
15300rm -f "conftest.$ac_objext"
15301if { (eval echo "$as_me:15301: \"$ac_compile\"") >&5
15302  (eval $ac_compile) 2>&5
15303  ac_status=$?
15304  echo "$as_me:15304: \$? = $ac_status" >&5
15305  (exit "$ac_status"); } &&
15306         { ac_try='test -s "conftest.$ac_objext"'
15307  { (eval echo "$as_me:15307: \"$ac_try\"") >&5
15308  (eval $ac_try) 2>&5
15309  ac_status=$?
15310  echo "$as_me:15310: \$? = $ac_status" >&5
15311  (exit "$ac_status"); }; }; then
15312  :
15313else
15314  echo "$as_me: failed program was:" >&5
15315cat "conftest.$ac_ext" >&5
15316
15317echo "${as_me:-configure}:15317: testing if we must define CSRG_BASED ..." 1>&5
15318
15319# Xosdefs.h on Mac OS X may not define this (but it should).
15320            cat >"conftest.$ac_ext" <<_ACEOF
15321#line 15321 "configure"
15322#include "confdefs.h"
15323
15324#define CSRG_BASED
15325#include <X11/Xpoll.h>
15326int
15327main (void)
15328{
15329fd_mask x
15330  ;
15331  return 0;
15332}
15333_ACEOF
15334rm -f "conftest.$ac_objext"
15335if { (eval echo "$as_me:15335: \"$ac_compile\"") >&5
15336  (eval $ac_compile) 2>&5
15337  ac_status=$?
15338  echo "$as_me:15338: \$? = $ac_status" >&5
15339  (exit "$ac_status"); } &&
15340         { ac_try='test -s "conftest.$ac_objext"'
15341  { (eval echo "$as_me:15341: \"$ac_try\"") >&5
15342  (eval $ac_try) 2>&5
15343  ac_status=$?
15344  echo "$as_me:15344: \$? = $ac_status" >&5
15345  (exit "$ac_status"); }; }; then
15346  cf_cv_type_fd_mask=CSRG_BASED
15347else
15348  echo "$as_me: failed program was:" >&5
15349cat "conftest.$ac_ext" >&5
15350fi
15351rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15352fi
15353rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15354    else
15355        cf_cv_type_fd_mask=$cf_cv_type_fd_set
15356    fi
15357
15358fi
15359echo "$as_me:15359: result: $cf_cv_type_fd_mask" >&5
15360echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
15361if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
15362
15363cat >>confdefs.h <<\EOF
15364#define CSRG_BASED 1
15365EOF
15366
15367fi
15368
15369echo "$as_me:15369: checking for IRIX 6.5 baud-rate redefinitions" >&5
15370echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
15371if test "${cf_cv_termio_c_ispeed+set}" = set; then
15372  echo $ECHO_N "(cached) $ECHO_C" >&6
15373else
15374
15375cat >"conftest.$ac_ext" <<_ACEOF
15376#line 15376 "configure"
15377#include "confdefs.h"
15378
15379#include <sys/types.h>
15380#include <sys/termio.h>
15381int
15382main (void)
15383{
15384
15385struct termio foo;
15386foo.c_ispeed = B38400;
15387foo.c_ospeed = B9600;
15388(void)foo;
15389
15390  ;
15391  return 0;
15392}
15393_ACEOF
15394rm -f "conftest.$ac_objext"
15395if { (eval echo "$as_me:15395: \"$ac_compile\"") >&5
15396  (eval $ac_compile) 2>&5
15397  ac_status=$?
15398  echo "$as_me:15398: \$? = $ac_status" >&5
15399  (exit "$ac_status"); } &&
15400         { ac_try='test -s "conftest.$ac_objext"'
15401  { (eval echo "$as_me:15401: \"$ac_try\"") >&5
15402  (eval $ac_try) 2>&5
15403  ac_status=$?
15404  echo "$as_me:15404: \$? = $ac_status" >&5
15405  (exit "$ac_status"); }; }; then
15406  cf_cv_termio_c_ispeed=yes
15407
15408else
15409  echo "$as_me: failed program was:" >&5
15410cat "conftest.$ac_ext" >&5
15411cf_cv_termio_c_ispeed=no
15412fi
15413rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15414
15415fi
15416echo "$as_me:15416: result: $cf_cv_termio_c_ispeed" >&5
15417echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
15418test "$cf_cv_termio_c_ispeed" = yes &&
15419cat >>confdefs.h <<\EOF
15420#define HAVE_TERMIO_C_ISPEED 1
15421EOF
15422
15423echo "$as_me:15423: checking for termios type tcflag_t" >&5
15424echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
15425if test "${cf_cv_havetype_tcflag_t+set}" = set; then
15426  echo $ECHO_N "(cached) $ECHO_C" >&6
15427else
15428
15429	cat >"conftest.$ac_ext" <<_ACEOF
15430#line 15430 "configure"
15431#include "confdefs.h"
15432#include <termios.h>
15433int
15434main (void)
15435{
15436
15437		tcflag_t x = 0; (void)x
15438  ;
15439  return 0;
15440}
15441_ACEOF
15442rm -f "conftest.$ac_objext"
15443if { (eval echo "$as_me:15443: \"$ac_compile\"") >&5
15444  (eval $ac_compile) 2>&5
15445  ac_status=$?
15446  echo "$as_me:15446: \$? = $ac_status" >&5
15447  (exit "$ac_status"); } &&
15448         { ac_try='test -s "conftest.$ac_objext"'
15449  { (eval echo "$as_me:15449: \"$ac_try\"") >&5
15450  (eval $ac_try) 2>&5
15451  ac_status=$?
15452  echo "$as_me:15452: \$? = $ac_status" >&5
15453  (exit "$ac_status"); }; }; then
15454  cf_cv_havetype_tcflag_t=yes
15455else
15456  echo "$as_me: failed program was:" >&5
15457cat "conftest.$ac_ext" >&5
15458cf_cv_havetype_tcflag_t=no
15459fi
15460rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15461
15462fi
15463echo "$as_me:15463: result: $cf_cv_havetype_tcflag_t" >&5
15464echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
15465test "$cf_cv_havetype_tcflag_t" = no &&
15466cat >>confdefs.h <<\EOF
15467#define tcflag_t unsigned long
15468EOF
15469
15470echo "$as_me:15470: checking for termios type speed_t" >&5
15471echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
15472if test "${cf_cv_havetype_speed_t+set}" = set; then
15473  echo $ECHO_N "(cached) $ECHO_C" >&6
15474else
15475
15476	cat >"conftest.$ac_ext" <<_ACEOF
15477#line 15477 "configure"
15478#include "confdefs.h"
15479#include <termios.h>
15480int
15481main (void)
15482{
15483
15484		speed_t x = 0; (void)x
15485  ;
15486  return 0;
15487}
15488_ACEOF
15489rm -f "conftest.$ac_objext"
15490if { (eval echo "$as_me:15490: \"$ac_compile\"") >&5
15491  (eval $ac_compile) 2>&5
15492  ac_status=$?
15493  echo "$as_me:15493: \$? = $ac_status" >&5
15494  (exit "$ac_status"); } &&
15495         { ac_try='test -s "conftest.$ac_objext"'
15496  { (eval echo "$as_me:15496: \"$ac_try\"") >&5
15497  (eval $ac_try) 2>&5
15498  ac_status=$?
15499  echo "$as_me:15499: \$? = $ac_status" >&5
15500  (exit "$ac_status"); }; }; then
15501  cf_cv_havetype_speed_t=yes
15502else
15503  echo "$as_me: failed program was:" >&5
15504cat "conftest.$ac_ext" >&5
15505cf_cv_havetype_speed_t=no
15506fi
15507rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15508
15509fi
15510echo "$as_me:15510: result: $cf_cv_havetype_speed_t" >&5
15511echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
15512test "$cf_cv_havetype_speed_t" = no &&
15513cat >>confdefs.h <<\EOF
15514#define speed_t unsigned short
15515EOF
15516
15517echo "$as_me:15517: checking for termios type cc_t" >&5
15518echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
15519if test "${cf_cv_havetype_cc_t+set}" = set; then
15520  echo $ECHO_N "(cached) $ECHO_C" >&6
15521else
15522
15523	cat >"conftest.$ac_ext" <<_ACEOF
15524#line 15524 "configure"
15525#include "confdefs.h"
15526#include <termios.h>
15527int
15528main (void)
15529{
15530
15531		cc_t x = 0; (void)x
15532  ;
15533  return 0;
15534}
15535_ACEOF
15536rm -f "conftest.$ac_objext"
15537if { (eval echo "$as_me:15537: \"$ac_compile\"") >&5
15538  (eval $ac_compile) 2>&5
15539  ac_status=$?
15540  echo "$as_me:15540: \$? = $ac_status" >&5
15541  (exit "$ac_status"); } &&
15542         { ac_try='test -s "conftest.$ac_objext"'
15543  { (eval echo "$as_me:15543: \"$ac_try\"") >&5
15544  (eval $ac_try) 2>&5
15545  ac_status=$?
15546  echo "$as_me:15546: \$? = $ac_status" >&5
15547  (exit "$ac_status"); }; }; then
15548  cf_cv_havetype_cc_t=yes
15549else
15550  echo "$as_me: failed program was:" >&5
15551cat "conftest.$ac_ext" >&5
15552cf_cv_havetype_cc_t=no
15553fi
15554rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15555
15556fi
15557echo "$as_me:15557: result: $cf_cv_havetype_cc_t" >&5
15558echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
15559test "$cf_cv_havetype_cc_t" = no &&
15560cat >>confdefs.h <<\EOF
15561#define cc_t unsigned char
15562EOF
15563
15564# The Xcursor library is normally (weakly) linked via the X11 library rather
15565# than directly to applications.  xterm can select a cursor theme; users can
15566# also use environment variables to select cursor size.  We would only notice
15567# the library if there are development files for it.  Provide a way to disable
15568# the feature if it is unwanted.
15569echo "$as_me:15569: checking if we expect to use the Xcursor library" >&5
15570echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
15571
15572# Check whether --enable-xcursor or --disable-xcursor was given.
15573if test "${enable_xcursor+set}" = set; then
15574  enableval="$enable_xcursor"
15575  test "$enableval" != no && enableval=yes
15576	if test "$enableval" != "yes" ; then
15577    enable_xcursor=no
15578	else
15579		enable_xcursor=yes
15580	fi
15581else
15582  enableval=yes
15583	enable_xcursor=yes
15584
15585fi;
15586echo "$as_me:15586: result: $enable_xcursor" >&5
15587echo "${ECHO_T}$enable_xcursor" >&6
15588if test "$enable_xcursor" = yes; then
15589
15590cat >>confdefs.h <<\EOF
15591#define HAVE_LIB_XCURSOR 1
15592EOF
15593
15594fi
15595
15596LIBS="$LIBS $X_EXTRA_LIBS"
15597
15598for ac_header in \
15599stropts.h \
15600
15601do
15602as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15603echo "$as_me:15603: checking for $ac_header" >&5
15604echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15605if eval "test \"\${$as_ac_Header+set}\" = set"; then
15606  echo $ECHO_N "(cached) $ECHO_C" >&6
15607else
15608  cat >"conftest.$ac_ext" <<_ACEOF
15609#line 15609 "configure"
15610#include "confdefs.h"
15611#include <$ac_header>
15612_ACEOF
15613if { (eval echo "$as_me:15613: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15614  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15615  ac_status=$?
15616  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15617  rm -f conftest.er1
15618  cat conftest.err >&5
15619  echo "$as_me:15619: \$? = $ac_status" >&5
15620  (exit "$ac_status"); } >/dev/null; then
15621  if test -s conftest.err; then
15622    ac_cpp_err=$ac_c_preproc_warn_flag
15623  else
15624    ac_cpp_err=
15625  fi
15626else
15627  ac_cpp_err=yes
15628fi
15629if test -z "$ac_cpp_err"; then
15630  eval "$as_ac_Header=yes"
15631else
15632  echo "$as_me: failed program was:" >&5
15633  cat "conftest.$ac_ext" >&5
15634  eval "$as_ac_Header=no"
15635fi
15636rm -f conftest.err "conftest.$ac_ext"
15637fi
15638echo "$as_me:15638: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15639echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15640if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15641  cat >>confdefs.h <<EOF
15642#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15643EOF
15644
15645fi
15646done
15647
15648cf_func_grantpt="grantpt ptsname"
15649cf_prefer_openpt=no
15650case $host_os in
15651(darwin[0-9].*)
15652	;;
15653(openbsd[0-9].*)
15654	# The POSIX entrypoints exist, but have never worked.
15655	;;
15656(linux*)
15657	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15658	cf_prefer_openpt=yes
15659	;;
15660(*)
15661	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15662	;;
15663esac
15664
15665for ac_func in $cf_func_grantpt
15666do
15667as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15668echo "$as_me:15668: checking for $ac_func" >&5
15669echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15670if eval "test \"\${$as_ac_var+set}\" = set"; then
15671  echo $ECHO_N "(cached) $ECHO_C" >&6
15672else
15673  cat >"conftest.$ac_ext" <<_ACEOF
15674#line 15674 "configure"
15675#include "confdefs.h"
15676#define $ac_func autoconf_temporary
15677#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15678#undef $ac_func
15679
15680#ifdef __cplusplus
15681extern "C"
15682#endif
15683
15684/* We use char because int might match the return type of a gcc2
15685   builtin and then its argument prototype would still apply.  */
15686char $ac_func (void);
15687
15688int
15689main (void)
15690{
15691
15692/* The GNU C library defines stubs for functions which it implements
15693    to always fail with ENOSYS.  Some functions are actually named
15694    something starting with __ and the normal name is an alias.  */
15695#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15696#error found stub for $ac_func
15697#endif
15698
15699	return $ac_func ();
15700  ;
15701  return 0;
15702}
15703_ACEOF
15704rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15705if { (eval echo "$as_me:15705: \"$ac_link\"") >&5
15706  (eval $ac_link) 2>&5
15707  ac_status=$?
15708  echo "$as_me:15708: \$? = $ac_status" >&5
15709  (exit "$ac_status"); } &&
15710         { ac_try='test -s "conftest$ac_exeext"'
15711  { (eval echo "$as_me:15711: \"$ac_try\"") >&5
15712  (eval $ac_try) 2>&5
15713  ac_status=$?
15714  echo "$as_me:15714: \$? = $ac_status" >&5
15715  (exit "$ac_status"); }; }; then
15716  eval "$as_ac_var=yes"
15717else
15718  echo "$as_me: failed program was:" >&5
15719cat "conftest.$ac_ext" >&5
15720eval "$as_ac_var=no"
15721fi
15722rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15723fi
15724echo "$as_me:15724: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15725echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15726if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15727  cat >>confdefs.h <<EOF
15728#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15729EOF
15730
15731fi
15732done
15733
15734cf_grantpt_opts=
15735if test "x$ac_cv_func_grantpt" = "xyes" ; then
15736	echo "$as_me:15736: checking if grantpt really works" >&5
15737echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
15738	cat >"conftest.$ac_ext" <<_ACEOF
15739#line 15739 "configure"
15740#include "confdefs.h"
15741
15742#include <stdlib.h>
15743#include <stdio.h>
15744#include <termios.h>
15745#include <unistd.h>
15746#include <signal.h>
15747#include <fcntl.h>
15748#include <errno.h>
15749
15750#ifndef HAVE_POSIX_OPENPT
15751#undef posix_openpt
15752#define posix_openpt(mode) open("/dev/ptmx", mode)
15753#endif
15754
15755#ifdef HAVE_STROPTS_H
15756#include <stropts.h>
15757#endif
15758
15759static void failed(int code)
15760{
15761	perror("conftest");
15762	exit(code);
15763}
15764
15765static void my_timeout(int sig)
15766{
15767	(void)sig;
15768	exit(99);
15769}
15770
15771int
15772main (void)
15773{
15774
15775	int code = 0;
15776	int pty;
15777	int tty;
15778	char *slave;
15779	struct termios tio;
15780
15781	(void)tio;
15782	signal(SIGALRM, my_timeout);
15783
15784	if (alarm(2) == 9)
15785		failed(9);
15786	else if ((pty = posix_openpt(O_RDWR)) < 0)
15787		failed(1);
15788	else if (grantpt(pty) < 0)
15789		failed(2);
15790	else if (unlockpt(pty) < 0)
15791		failed(3);
15792	else if ((slave = ptsname(pty)) == 0)
15793		failed(4);
15794#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15795	else if (!isatty(pty))
15796		failed(4);
15797#endif
15798#if CONFTEST >= 4
15799    else if (tcgetattr(pty, &tio) < 0)
15800		failed(20);
15801    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15802		failed(21);
15803#endif
15804	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15805	 * Linux does treat it that way.
15806	 */
15807	else if ((tty = open(slave, O_RDWR)) < 0)
15808		failed(5);
15809#ifdef CONFTEST
15810#ifdef I_PUSH
15811#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15812    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15813		failed(10);
15814#endif
15815#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15816    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15817		failed(11);
15818#endif
15819#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15820    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15821		failed(12);
15822#endif
15823#endif /* I_PUSH */
15824#if CONFTEST >= 5
15825    else if (tcgetattr(tty, &tio) < 0)
15826		failed(30);
15827    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15828		failed(31);
15829#endif
15830#endif /* CONFTEST */
15831    (void) tty;
15832	${cf_cv_main_return:-return}(code);
15833
15834  ;
15835  return 0;
15836}
15837_ACEOF
15838rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15839if { (eval echo "$as_me:15839: \"$ac_link\"") >&5
15840  (eval $ac_link) 2>&5
15841  ac_status=$?
15842  echo "$as_me:15842: \$? = $ac_status" >&5
15843  (exit "$ac_status"); } &&
15844         { ac_try='test -s "conftest$ac_exeext"'
15845  { (eval echo "$as_me:15845: \"$ac_try\"") >&5
15846  (eval $ac_try) 2>&5
15847  ac_status=$?
15848  echo "$as_me:15848: \$? = $ac_status" >&5
15849  (exit "$ac_status"); }; }; then
15850
15851	if test "$cross_compiling" = yes; then
15852  ac_cv_func_grantpt=maybe
15853else
15854  cat >"conftest.$ac_ext" <<_ACEOF
15855#line 15855 "configure"
15856#include "confdefs.h"
15857
15858#include <stdlib.h>
15859#include <stdio.h>
15860#include <termios.h>
15861#include <unistd.h>
15862#include <signal.h>
15863#include <fcntl.h>
15864#include <errno.h>
15865
15866#ifndef HAVE_POSIX_OPENPT
15867#undef posix_openpt
15868#define posix_openpt(mode) open("/dev/ptmx", mode)
15869#endif
15870
15871#ifdef HAVE_STROPTS_H
15872#include <stropts.h>
15873#endif
15874
15875static void failed(int code)
15876{
15877	perror("conftest");
15878	exit(code);
15879}
15880
15881static void my_timeout(int sig)
15882{
15883	(void)sig;
15884	exit(99);
15885}
15886
15887int main(void)
15888{
15889
15890	int code = 0;
15891	int pty;
15892	int tty;
15893	char *slave;
15894	struct termios tio;
15895
15896	(void)tio;
15897	signal(SIGALRM, my_timeout);
15898
15899	if (alarm(2) == 9)
15900		failed(9);
15901	else if ((pty = posix_openpt(O_RDWR)) < 0)
15902		failed(1);
15903	else if (grantpt(pty) < 0)
15904		failed(2);
15905	else if (unlockpt(pty) < 0)
15906		failed(3);
15907	else if ((slave = ptsname(pty)) == 0)
15908		failed(4);
15909#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15910	else if (!isatty(pty))
15911		failed(4);
15912#endif
15913#if CONFTEST >= 4
15914    else if (tcgetattr(pty, &tio) < 0)
15915		failed(20);
15916    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15917		failed(21);
15918#endif
15919	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15920	 * Linux does treat it that way.
15921	 */
15922	else if ((tty = open(slave, O_RDWR)) < 0)
15923		failed(5);
15924#ifdef CONFTEST
15925#ifdef I_PUSH
15926#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15927    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15928		failed(10);
15929#endif
15930#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15931    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15932		failed(11);
15933#endif
15934#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15935    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15936		failed(12);
15937#endif
15938#endif /* I_PUSH */
15939#if CONFTEST >= 5
15940    else if (tcgetattr(tty, &tio) < 0)
15941		failed(30);
15942    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15943		failed(31);
15944#endif
15945#endif /* CONFTEST */
15946    (void) tty;
15947	${cf_cv_main_return:-return}(code);
15948
15949}
15950
15951_ACEOF
15952rm -f "conftest$ac_exeext"
15953if { (eval echo "$as_me:15953: \"$ac_link\"") >&5
15954  (eval $ac_link) 2>&5
15955  ac_status=$?
15956  echo "$as_me:15956: \$? = $ac_status" >&5
15957  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15958  { (eval echo "$as_me:15958: \"$ac_try\"") >&5
15959  (eval $ac_try) 2>&5
15960  ac_status=$?
15961  echo "$as_me:15961: \$? = $ac_status" >&5
15962  (exit "$ac_status"); }; }; then
15963  :
15964else
15965  echo "$as_me: program exited with status $ac_status" >&5
15966echo "$as_me: failed program was:" >&5
15967cat "conftest.$ac_ext" >&5
15968ac_cv_func_grantpt=no
15969
15970fi
15971rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15972fi
15973
15974else
15975  echo "$as_me: failed program was:" >&5
15976cat "conftest.$ac_ext" >&5
15977ac_cv_func_grantpt=no
15978fi
15979rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15980	echo "$as_me:15980: result: $ac_cv_func_grantpt" >&5
15981echo "${ECHO_T}$ac_cv_func_grantpt" >&6
15982
15983	if test "x$ac_cv_func_grantpt" != "xno" ; then
15984
15985		if test "x$ac_cv_func_grantpt" = "xyes" ; then
15986			echo "$as_me:15986: checking for pty features" >&5
15987echo $ECHO_N "checking for pty features... $ECHO_C" >&6
15988			if test "x$ac_cv_header_stropts_h" = xyes
15989			then
15990				cf_pty_this=0
15991			else
15992				cf_pty_this=3
15993			fi
15994
15995			cf_pty_defines=
15996			while test $cf_pty_this != 6
15997			do
15998
15999				cf_pty_feature=
16000				cf_pty_next="`expr $cf_pty_this + 1`"
16001
16002echo "${as_me:-configure}:16002: testing pty feature test $cf_pty_next:5 ..." 1>&5
16003
16004				if test "$cross_compiling" = yes; then
16005  { { echo "$as_me:16005: error: cannot run test program while cross compiling" >&5
16006echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16007   { (exit 1); exit 1; }; }
16008else
16009  cat >"conftest.$ac_ext" <<_ACEOF
16010#line 16010 "configure"
16011#include "confdefs.h"
16012#define CONFTEST $cf_pty_this
16013$cf_pty_defines
16014
16015#include <stdlib.h>
16016#include <stdio.h>
16017#include <termios.h>
16018#include <unistd.h>
16019#include <signal.h>
16020#include <fcntl.h>
16021#include <errno.h>
16022
16023#ifndef HAVE_POSIX_OPENPT
16024#undef posix_openpt
16025#define posix_openpt(mode) open("/dev/ptmx", mode)
16026#endif
16027
16028#ifdef HAVE_STROPTS_H
16029#include <stropts.h>
16030#endif
16031
16032static void failed(int code)
16033{
16034	perror("conftest");
16035	exit(code);
16036}
16037
16038static void my_timeout(int sig)
16039{
16040	(void)sig;
16041	exit(99);
16042}
16043
16044int main(void)
16045{
16046
16047	int code = 0;
16048	int pty;
16049	int tty;
16050	char *slave;
16051	struct termios tio;
16052
16053	(void)tio;
16054	signal(SIGALRM, my_timeout);
16055
16056	if (alarm(2) == 9)
16057		failed(9);
16058	else if ((pty = posix_openpt(O_RDWR)) < 0)
16059		failed(1);
16060	else if (grantpt(pty) < 0)
16061		failed(2);
16062	else if (unlockpt(pty) < 0)
16063		failed(3);
16064	else if ((slave = ptsname(pty)) == 0)
16065		failed(4);
16066#if (CONFTEST == 3) || defined(CONFTEST_isatty)
16067	else if (!isatty(pty))
16068		failed(4);
16069#endif
16070#if CONFTEST >= 4
16071    else if (tcgetattr(pty, &tio) < 0)
16072		failed(20);
16073    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16074		failed(21);
16075#endif
16076	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16077	 * Linux does treat it that way.
16078	 */
16079	else if ((tty = open(slave, O_RDWR)) < 0)
16080		failed(5);
16081#ifdef CONFTEST
16082#ifdef I_PUSH
16083#if (CONFTEST == 0) || defined(CONFTEST_ptem)
16084    else if (ioctl(tty, I_PUSH, "ptem") < 0)
16085		failed(10);
16086#endif
16087#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16088    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16089		failed(11);
16090#endif
16091#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16092    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16093		failed(12);
16094#endif
16095#endif /* I_PUSH */
16096#if CONFTEST >= 5
16097    else if (tcgetattr(tty, &tio) < 0)
16098		failed(30);
16099    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16100		failed(31);
16101#endif
16102#endif /* CONFTEST */
16103    (void) tty;
16104	${cf_cv_main_return:-return}(code);
16105
16106}
16107
16108_ACEOF
16109rm -f "conftest$ac_exeext"
16110if { (eval echo "$as_me:16110: \"$ac_link\"") >&5
16111  (eval $ac_link) 2>&5
16112  ac_status=$?
16113  echo "$as_me:16113: \$? = $ac_status" >&5
16114  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16115  { (eval echo "$as_me:16115: \"$ac_try\"") >&5
16116  (eval $ac_try) 2>&5
16117  ac_status=$?
16118  echo "$as_me:16118: \$? = $ac_status" >&5
16119  (exit "$ac_status"); }; }; then
16120
16121				case $cf_pty_next in
16122				(1) # - streams
16123					cf_pty_feature=ptem
16124					;;
16125				(2) # - streams
16126					cf_pty_feature=ldterm
16127					;;
16128				(3) # - streams
16129					cf_pty_feature=ttcompat
16130					;;
16131				(4)
16132					cf_pty_feature=pty_isatty
16133					;;
16134				(5)
16135					cf_pty_feature=pty_tcsetattr
16136					;;
16137				(6)
16138					cf_pty_feature=tty_tcsetattr
16139					;;
16140				esac
16141
16142else
16143  echo "$as_me: program exited with status $ac_status" >&5
16144echo "$as_me: failed program was:" >&5
16145cat "conftest.$ac_ext" >&5
16146
16147				case $cf_pty_next in
16148				(1|2|3)
16149
16150echo "${as_me:-configure}:16150: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16151
16152					cf_pty_next=3
16153					;;
16154				esac
16155
16156fi
16157rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16158fi
16159				if test -n "$cf_pty_feature"
16160				then
16161					cf_pty_defines="$cf_pty_defines
16162#define CONFTEST_$cf_pty_feature 1
16163"
16164					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16165				fi
16166
16167				cf_pty_this=$cf_pty_next
16168			done
16169			echo "$as_me:16169: result: $cf_grantpt_opts" >&5
16170echo "${ECHO_T}$cf_grantpt_opts" >&6
16171			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16172		fi
16173	fi
16174fi
16175
16176if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16177	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6
16178
16179echo "${as_me:-configure}:16179: testing prefer posix_openpt over openpty ..." 1>&5
16180
16181elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16182	echo "$as_me:16182: checking for openpty in -lutil" >&5
16183echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16184if test "${ac_cv_lib_util_openpty+set}" = set; then
16185  echo $ECHO_N "(cached) $ECHO_C" >&6
16186else
16187  ac_check_lib_save_LIBS=$LIBS
16188LIBS="-lutil  $LIBS"
16189cat >"conftest.$ac_ext" <<_ACEOF
16190#line 16190 "configure"
16191#include "confdefs.h"
16192
16193/* Override any gcc2 internal prototype to avoid an error.  */
16194#ifdef __cplusplus
16195extern "C"
16196#endif
16197/* We use char because int might match the return type of a gcc2
16198   builtin and then its argument prototype would still apply.  */
16199char openpty ();
16200int
16201main (void)
16202{
16203openpty ();
16204  ;
16205  return 0;
16206}
16207_ACEOF
16208rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16209if { (eval echo "$as_me:16209: \"$ac_link\"") >&5
16210  (eval $ac_link) 2>&5
16211  ac_status=$?
16212  echo "$as_me:16212: \$? = $ac_status" >&5
16213  (exit "$ac_status"); } &&
16214         { ac_try='test -s "conftest$ac_exeext"'
16215  { (eval echo "$as_me:16215: \"$ac_try\"") >&5
16216  (eval $ac_try) 2>&5
16217  ac_status=$?
16218  echo "$as_me:16218: \$? = $ac_status" >&5
16219  (exit "$ac_status"); }; }; then
16220  ac_cv_lib_util_openpty=yes
16221else
16222  echo "$as_me: failed program was:" >&5
16223cat "conftest.$ac_ext" >&5
16224ac_cv_lib_util_openpty=no
16225fi
16226rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16227LIBS=$ac_check_lib_save_LIBS
16228fi
16229echo "$as_me:16229: result: $ac_cv_lib_util_openpty" >&5
16230echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16231if test "$ac_cv_lib_util_openpty" = yes; then
16232  cf_have_openpty=yes
16233else
16234  cf_have_openpty=no
16235fi
16236
16237	if test "$cf_have_openpty" = yes ; then
16238		ac_cv_func_grantpt=no
16239		LIBS="-lutil $LIBS"
16240
16241cat >>confdefs.h <<\EOF
16242#define HAVE_OPENPTY 1
16243EOF
16244
16245for ac_header in \
16246			util.h \
16247			libutil.h \
16248			pty.h \
16249
16250do
16251as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16252echo "$as_me:16252: checking for $ac_header" >&5
16253echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16254if eval "test \"\${$as_ac_Header+set}\" = set"; then
16255  echo $ECHO_N "(cached) $ECHO_C" >&6
16256else
16257  cat >"conftest.$ac_ext" <<_ACEOF
16258#line 16258 "configure"
16259#include "confdefs.h"
16260#include <$ac_header>
16261_ACEOF
16262if { (eval echo "$as_me:16262: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16263  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16264  ac_status=$?
16265  $EGREP -v '^ *\+' conftest.er1 >conftest.err
16266  rm -f conftest.er1
16267  cat conftest.err >&5
16268  echo "$as_me:16268: \$? = $ac_status" >&5
16269  (exit "$ac_status"); } >/dev/null; then
16270  if test -s conftest.err; then
16271    ac_cpp_err=$ac_c_preproc_warn_flag
16272  else
16273    ac_cpp_err=
16274  fi
16275else
16276  ac_cpp_err=yes
16277fi
16278if test -z "$ac_cpp_err"; then
16279  eval "$as_ac_Header=yes"
16280else
16281  echo "$as_me: failed program was:" >&5
16282  cat "conftest.$ac_ext" >&5
16283  eval "$as_ac_Header=no"
16284fi
16285rm -f conftest.err "conftest.$ac_ext"
16286fi
16287echo "$as_me:16287: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16288echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16289if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16290  cat >>confdefs.h <<EOF
16291#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16292EOF
16293
16294fi
16295done
16296
16297	fi
16298fi
16299
16300if test "x$ac_cv_func_grantpt" != xno
16301then
16302	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
16303
16304echo "${as_me:-configure}:16304: testing will rely upon grantpt ..." 1>&5
16305
16306cat >>confdefs.h <<\EOF
16307#define HAVE_WORKING_GRANTPT 1
16308EOF
16309
16310	for cf_feature in $cf_grantpt_opts
16311	do
16312		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
16313
16314cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16315
16316		cat >>confdefs.h <<EOF
16317#define HAVE_GRANTPT_$cf_FEATURE 1
16318EOF
16319
16320	done
16321elif test "x$cf_have_openpty" = xno
16322then
16323	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
16324
16325echo "${as_me:-configure}:16325: testing will rely upon BSD-pseudoterminals ..." 1>&5
16326
16327else
16328	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
16329
16330echo "${as_me:-configure}:16330: testing will rely upon openpty ..." 1>&5
16331
16332fi
16333
16334echo "$as_me:16334: checking if we can use XkbQueryExtension" >&5
16335echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
16336if test "${cf_cv_xkb_query_extension+set}" = set; then
16337  echo $ECHO_N "(cached) $ECHO_C" >&6
16338else
16339
16340cat >"conftest.$ac_ext" <<_ACEOF
16341#line 16341 "configure"
16342#include "confdefs.h"
16343
16344#include <X11/Xlib.h>
16345#include <X11/extensions/XKB.h>
16346#include <X11/XKBlib.h>
16347
16348int
16349main (void)
16350{
16351
16352	int xkbmajor = XkbMajorVersion;
16353	int xkbminor = XkbMinorVersion;
16354	int xkbopcode, xkbevent, xkberror;
16355
16356	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
16357	    && XkbQueryExtension((Display *)0,
16358				 &xkbopcode,
16359				 &xkbevent,
16360				 &xkberror,
16361				 &xkbmajor,
16362				 &xkbminor))
16363		 return 0;
16364
16365  ;
16366  return 0;
16367}
16368_ACEOF
16369rm -f "conftest.$ac_objext"
16370if { (eval echo "$as_me:16370: \"$ac_compile\"") >&5
16371  (eval $ac_compile) 2>&5
16372  ac_status=$?
16373  echo "$as_me:16373: \$? = $ac_status" >&5
16374  (exit "$ac_status"); } &&
16375         { ac_try='test -s "conftest.$ac_objext"'
16376  { (eval echo "$as_me:16376: \"$ac_try\"") >&5
16377  (eval $ac_try) 2>&5
16378  ac_status=$?
16379  echo "$as_me:16379: \$? = $ac_status" >&5
16380  (exit "$ac_status"); }; }; then
16381
16382cf_cv_xkb_query_extension=yes
16383
16384else
16385  echo "$as_me: failed program was:" >&5
16386cat "conftest.$ac_ext" >&5
16387
16388cf_cv_xkb_query_extension=no
16389
16390fi
16391rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16392
16393fi
16394echo "$as_me:16394: result: $cf_cv_xkb_query_extension" >&5
16395echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
16396
16397if test $cf_cv_xkb_query_extension = yes
16398then
16399
16400for ac_func in XkbQueryExtension
16401do
16402as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16403echo "$as_me:16403: checking for $ac_func" >&5
16404echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16405if eval "test \"\${$as_ac_var+set}\" = set"; then
16406  echo $ECHO_N "(cached) $ECHO_C" >&6
16407else
16408  cat >"conftest.$ac_ext" <<_ACEOF
16409#line 16409 "configure"
16410#include "confdefs.h"
16411#define $ac_func autoconf_temporary
16412#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16413#undef $ac_func
16414
16415#ifdef __cplusplus
16416extern "C"
16417#endif
16418
16419/* We use char because int might match the return type of a gcc2
16420   builtin and then its argument prototype would still apply.  */
16421char $ac_func (void);
16422
16423int
16424main (void)
16425{
16426
16427/* The GNU C library defines stubs for functions which it implements
16428    to always fail with ENOSYS.  Some functions are actually named
16429    something starting with __ and the normal name is an alias.  */
16430#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16431#error found stub for $ac_func
16432#endif
16433
16434	return $ac_func ();
16435  ;
16436  return 0;
16437}
16438_ACEOF
16439rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16440if { (eval echo "$as_me:16440: \"$ac_link\"") >&5
16441  (eval $ac_link) 2>&5
16442  ac_status=$?
16443  echo "$as_me:16443: \$? = $ac_status" >&5
16444  (exit "$ac_status"); } &&
16445         { ac_try='test -s "conftest$ac_exeext"'
16446  { (eval echo "$as_me:16446: \"$ac_try\"") >&5
16447  (eval $ac_try) 2>&5
16448  ac_status=$?
16449  echo "$as_me:16449: \$? = $ac_status" >&5
16450  (exit "$ac_status"); }; }; then
16451  eval "$as_ac_var=yes"
16452else
16453  echo "$as_me: failed program was:" >&5
16454cat "conftest.$ac_ext" >&5
16455eval "$as_ac_var=no"
16456fi
16457rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16458fi
16459echo "$as_me:16459: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16460echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16461if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16462  cat >>confdefs.h <<EOF
16463#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16464EOF
16465
16466fi
16467done
16468
16469fi
16470
16471echo "$as_me:16471: checking if we can use XkbKeycodeToKeysym" >&5
16472echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
16473if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
16474  echo $ECHO_N "(cached) $ECHO_C" >&6
16475else
16476
16477cat >"conftest.$ac_ext" <<_ACEOF
16478#line 16478 "configure"
16479#include "confdefs.h"
16480
16481#include <X11/Xlib.h>
16482#include <X11/XKBlib.h>
16483
16484int
16485main (void)
16486{
16487
16488    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
16489	(void)keysym;
16490
16491  ;
16492  return 0;
16493}
16494_ACEOF
16495rm -f "conftest.$ac_objext"
16496if { (eval echo "$as_me:16496: \"$ac_compile\"") >&5
16497  (eval $ac_compile) 2>&5
16498  ac_status=$?
16499  echo "$as_me:16499: \$? = $ac_status" >&5
16500  (exit "$ac_status"); } &&
16501         { ac_try='test -s "conftest.$ac_objext"'
16502  { (eval echo "$as_me:16502: \"$ac_try\"") >&5
16503  (eval $ac_try) 2>&5
16504  ac_status=$?
16505  echo "$as_me:16505: \$? = $ac_status" >&5
16506  (exit "$ac_status"); }; }; then
16507
16508cf_cv_xkb_keycode_to_keysym=yes
16509
16510else
16511  echo "$as_me: failed program was:" >&5
16512cat "conftest.$ac_ext" >&5
16513
16514cf_cv_xkb_keycode_to_keysym=no
16515
16516fi
16517rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16518
16519fi
16520echo "$as_me:16520: result: $cf_cv_xkb_keycode_to_keysym" >&5
16521echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
16522
16523if test $cf_cv_xkb_keycode_to_keysym = yes
16524then
16525
16526for ac_func in XkbKeycodeToKeysym
16527do
16528as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16529echo "$as_me:16529: checking for $ac_func" >&5
16530echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16531if eval "test \"\${$as_ac_var+set}\" = set"; then
16532  echo $ECHO_N "(cached) $ECHO_C" >&6
16533else
16534  cat >"conftest.$ac_ext" <<_ACEOF
16535#line 16535 "configure"
16536#include "confdefs.h"
16537#define $ac_func autoconf_temporary
16538#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16539#undef $ac_func
16540
16541#ifdef __cplusplus
16542extern "C"
16543#endif
16544
16545/* We use char because int might match the return type of a gcc2
16546   builtin and then its argument prototype would still apply.  */
16547char $ac_func (void);
16548
16549int
16550main (void)
16551{
16552
16553/* The GNU C library defines stubs for functions which it implements
16554    to always fail with ENOSYS.  Some functions are actually named
16555    something starting with __ and the normal name is an alias.  */
16556#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16557#error found stub for $ac_func
16558#endif
16559
16560	return $ac_func ();
16561  ;
16562  return 0;
16563}
16564_ACEOF
16565rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16566if { (eval echo "$as_me:16566: \"$ac_link\"") >&5
16567  (eval $ac_link) 2>&5
16568  ac_status=$?
16569  echo "$as_me:16569: \$? = $ac_status" >&5
16570  (exit "$ac_status"); } &&
16571         { ac_try='test -s "conftest$ac_exeext"'
16572  { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573  (eval $ac_try) 2>&5
16574  ac_status=$?
16575  echo "$as_me:16575: \$? = $ac_status" >&5
16576  (exit "$ac_status"); }; }; then
16577  eval "$as_ac_var=yes"
16578else
16579  echo "$as_me: failed program was:" >&5
16580cat "conftest.$ac_ext" >&5
16581eval "$as_ac_var=no"
16582fi
16583rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16584fi
16585echo "$as_me:16585: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16586echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16587if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16588  cat >>confdefs.h <<EOF
16589#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16590EOF
16591
16592fi
16593done
16594
16595fi
16596
16597cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
16598cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
16599cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
16600LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16601for cf_X_CFLAGS in $X_CFLAGS
16602do
16603	case "x$cf_X_CFLAGS" in
16604	x-[IUD]*)
16605		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16606		;;
16607	*)
16608		CFLAGS="$CFLAGS $cf_X_CFLAGS"
16609		;;
16610	esac
16611done
16612
16613echo "$as_me:16613: checking for XKB Bell extension" >&5
16614echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
16615if test "${cf_cv_xkb_bell_ext+set}" = set; then
16616  echo $ECHO_N "(cached) $ECHO_C" >&6
16617else
16618
16619cat >"conftest.$ac_ext" <<_ACEOF
16620#line 16620 "configure"
16621#include "confdefs.h"
16622
16623#include <X11/Intrinsic.h>
16624#include <X11/XKBlib.h>		/* has the prototype */
16625#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
16626
16627int
16628main (void)
16629{
16630
16631	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
16632	Atom y = 0;
16633	(void)x;
16634	XkbBell((Display *)0, (Widget)0, 0, y);
16635
16636  ;
16637  return 0;
16638}
16639_ACEOF
16640rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16641if { (eval echo "$as_me:16641: \"$ac_link\"") >&5
16642  (eval $ac_link) 2>&5
16643  ac_status=$?
16644  echo "$as_me:16644: \$? = $ac_status" >&5
16645  (exit "$ac_status"); } &&
16646         { ac_try='test -s "conftest$ac_exeext"'
16647  { (eval echo "$as_me:16647: \"$ac_try\"") >&5
16648  (eval $ac_try) 2>&5
16649  ac_status=$?
16650  echo "$as_me:16650: \$? = $ac_status" >&5
16651  (exit "$ac_status"); }; }; then
16652  cf_cv_xkb_bell_ext=yes
16653else
16654  echo "$as_me: failed program was:" >&5
16655cat "conftest.$ac_ext" >&5
16656cf_cv_xkb_bell_ext=no
16657fi
16658rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16659
16660fi
16661echo "$as_me:16661: result: $cf_cv_xkb_bell_ext" >&5
16662echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
16663test "$cf_cv_xkb_bell_ext" = yes &&
16664cat >>confdefs.h <<\EOF
16665#define HAVE_XKB_BELL_EXT 1
16666EOF
16667
16668LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
16669CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
16670CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
16671
16672for ac_func in Xutf8LookupString
16673do
16674as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16675echo "$as_me:16675: checking for $ac_func" >&5
16676echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16677if eval "test \"\${$as_ac_var+set}\" = set"; then
16678  echo $ECHO_N "(cached) $ECHO_C" >&6
16679else
16680  cat >"conftest.$ac_ext" <<_ACEOF
16681#line 16681 "configure"
16682#include "confdefs.h"
16683#define $ac_func autoconf_temporary
16684#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16685#undef $ac_func
16686
16687#ifdef __cplusplus
16688extern "C"
16689#endif
16690
16691/* We use char because int might match the return type of a gcc2
16692   builtin and then its argument prototype would still apply.  */
16693char $ac_func (void);
16694
16695int
16696main (void)
16697{
16698
16699/* The GNU C library defines stubs for functions which it implements
16700    to always fail with ENOSYS.  Some functions are actually named
16701    something starting with __ and the normal name is an alias.  */
16702#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16703#error found stub for $ac_func
16704#endif
16705
16706	return $ac_func ();
16707  ;
16708  return 0;
16709}
16710_ACEOF
16711rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16712if { (eval echo "$as_me:16712: \"$ac_link\"") >&5
16713  (eval $ac_link) 2>&5
16714  ac_status=$?
16715  echo "$as_me:16715: \$? = $ac_status" >&5
16716  (exit "$ac_status"); } &&
16717         { ac_try='test -s "conftest$ac_exeext"'
16718  { (eval echo "$as_me:16718: \"$ac_try\"") >&5
16719  (eval $ac_try) 2>&5
16720  ac_status=$?
16721  echo "$as_me:16721: \$? = $ac_status" >&5
16722  (exit "$ac_status"); }; }; then
16723  eval "$as_ac_var=yes"
16724else
16725  echo "$as_me: failed program was:" >&5
16726cat "conftest.$ac_ext" >&5
16727eval "$as_ac_var=no"
16728fi
16729rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16730fi
16731echo "$as_me:16731: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16732echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16733if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16734  cat >>confdefs.h <<EOF
16735#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16736EOF
16737
16738else
16739
16740	EXTRAHDRS="$EXTRAHDRS xutf8.h"
16741	EXTRASRCS="$EXTRASRCS xutf8.c"
16742	EXTRAOBJS="$EXTRAOBJS xutf8.o"
16743
16744fi
16745done
16746
16747echo "$as_me:16747: checking if you want narrow prototypes for X libraries" >&5
16748echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
16749
16750case `$ac_config_guess` in
16751(*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
16752	cf_default_narrowproto=yes
16753	;;
16754(*)
16755	cf_default_narrowproto=no
16756	;;
16757esac
16758
16759# Check whether --enable-narrowproto or --disable-narrowproto was given.
16760if test "${enable_narrowproto+set}" = set; then
16761  enableval="$enable_narrowproto"
16762  test "$enableval" != no && enableval=yes
16763	if test "$enableval" != "$cf_default_narrowproto" ; then
16764    enable_narrowproto=$enableval
16765	else
16766		enable_narrowproto=$cf_default_narrowproto
16767	fi
16768else
16769  enableval=$cf_default_narrowproto
16770	enable_narrowproto=$cf_default_narrowproto
16771
16772fi;
16773echo "$as_me:16773: result: $enable_narrowproto" >&5
16774echo "${ECHO_T}$enable_narrowproto" >&6
16775
16776echo "$as_me:16776: checking if we should use imake to help" >&5
16777echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
16778
16779# Check whether --enable-imake or --disable-imake was given.
16780if test "${enable_imake+set}" = set; then
16781  enableval="$enable_imake"
16782  test "$enableval" != no && enableval=yes
16783	if test "$enableval" != "yes" ; then
16784    enable_imake=no
16785	else
16786		enable_imake=yes
16787	fi
16788else
16789  enableval=yes
16790	enable_imake=yes
16791
16792fi;
16793echo "$as_me:16793: result: $enable_imake" >&5
16794echo "${ECHO_T}$enable_imake" >&6
16795
16796if test "$enable_imake" = yes ; then
16797
16798for ac_prog in xmkmf imake
16799do
16800  # Extract the first word of "$ac_prog", so it can be a program name with args.
16801set dummy $ac_prog; ac_word=$2
16802echo "$as_me:16802: checking for $ac_word" >&5
16803echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16804if test "${ac_cv_path_IMAKE+set}" = set; then
16805  echo $ECHO_N "(cached) $ECHO_C" >&6
16806else
16807  case $IMAKE in
16808  [\\/]* | ?:[\\/]*)
16809  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
16810  ;;
16811  *)
16812  ac_save_IFS=$IFS; IFS=$ac_path_separator
16813ac_dummy="$PATH"
16814for ac_dir in $ac_dummy; do
16815  IFS=$ac_save_IFS
16816  test -z "$ac_dir" && ac_dir=.
16817  if $as_executable_p "$ac_dir/$ac_word"; then
16818   ac_cv_path_IMAKE="$ac_dir/$ac_word"
16819   echo "$as_me:16819: found $ac_dir/$ac_word" >&5
16820   break
16821fi
16822done
16823
16824  ;;
16825esac
16826fi
16827IMAKE=$ac_cv_path_IMAKE
16828
16829if test -n "$IMAKE"; then
16830  echo "$as_me:16830: result: $IMAKE" >&5
16831echo "${ECHO_T}$IMAKE" >&6
16832else
16833  echo "$as_me:16833: result: no" >&5
16834echo "${ECHO_T}no" >&6
16835fi
16836
16837  test -n "$IMAKE" && break
16838done
16839
16840if test -n "$IMAKE" ; then
16841
16842case $IMAKE in
16843(*/imake)
16844	cf_imake_opts="-DUseInstalled=YES"
16845	;;
16846(*/util/xmkmf)
16847	# A single parameter tells xmkmf where the config-files are:
16848	cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
16849	;;
16850(*)
16851	cf_imake_opts=
16852	;;
16853esac
16854
16855# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
16856# config directory.
16857if mkdir conftestdir; then
16858	CDPATH=; export CDPATH
16859	cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
16860	cd conftestdir
16861
16862	cat >fix_cflags.sed <<'CF_EOF'
16863s/\\//g
16864s/[ 	][ 	]*/ /g
16865s/"//g
16866:pack
16867s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
16868t pack
16869s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
16870s/^IMAKE[ ]/IMAKE_CFLAGS="/
16871s/	/ /g
16872s/$/"/
16873CF_EOF
16874
16875	cat >fix_lflags.sed <<'CF_EOF'
16876s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
16877s/$/"/
16878CF_EOF
16879
16880	echo >./Imakefile
16881	test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
16882
16883	cat >> ./Imakefile <<'CF_EOF'
16884findstddefs:
16885	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
16886	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
16887CF_EOF
16888
16889	if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
16890	then
16891		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
16892
16893echo "${as_me:-configure}:16893: testing Using $IMAKE $cf_imake_opts ..." 1>&5
16894
16895	else
16896		# sometimes imake doesn't have the config path compiled in.  Find it.
16897		cf_config=
16898		for cf_libpath in $X_LIBS $LIBS ; do
16899			case "$cf_libpath" in
16900			(-L*)
16901				cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
16902				cf_libpath="$cf_libpath/X11/config"
16903				if test -d "$cf_libpath" ; then
16904					cf_config="$cf_libpath"
16905					break
16906				fi
16907				;;
16908			esac
16909		done
16910		if test -z "$cf_config" ; then
16911			{ echo "$as_me:16911: WARNING: Could not find imake config-directory" >&5
16912echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
16913		else
16914			cf_imake_opts="$cf_imake_opts -I$cf_config"
16915			if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
16916			then
16917				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
16918
16919echo "${as_me:-configure}:16919: testing Using $IMAKE $cf_config ..." 1>&5
16920
16921			else
16922				{ echo "$as_me:16922: WARNING: Cannot run $IMAKE" >&5
16923echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
16924			fi
16925		fi
16926	fi
16927
16928	# GNU make sometimes prints "make[1]: Entering...", which
16929	# would confuse us.
16930	eval "`make findstddefs 2>/dev/null | grep -v make`"
16931
16932	cd ..
16933	rm -rf conftestdir
16934
16935	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
16936	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
16937	# modified it to support site.cf, adding a kludge for the /usr/include
16938	# directory.  Try to filter that out, otherwise gcc won't find its
16939	# headers.
16940	if test -n "$GCC" ; then
16941	    if test -n "$IMAKE_CFLAGS" ; then
16942		cf_nostdinc=""
16943		cf_std_incl=""
16944		cf_cpp_opts=""
16945		for cf_opt in $IMAKE_CFLAGS
16946		do
16947		    case "$cf_opt" in
16948		    (-nostdinc)
16949			cf_nostdinc="$cf_opt"
16950			;;
16951		    (-I/usr/include)
16952			cf_std_incl="$cf_opt"
16953			;;
16954		    (*)
16955			cf_cpp_opts="$cf_cpp_opts $cf_opt"
16956			;;
16957		    esac
16958		done
16959		if test -z "$cf_nostdinc" ; then
16960		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
16961		elif test -z "$cf_std_incl" ; then
16962		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
16963		else
16964		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
16965
16966echo "${as_me:-configure}:16966: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
16967
16968		    IMAKE_CFLAGS="$cf_cpp_opts"
16969		fi
16970	    fi
16971	fi
16972fi
16973
16974# Some imake configurations define PROJECTROOT with an empty value.  Remove
16975# the empty definition.
16976case $IMAKE_CFLAGS in
16977(*-DPROJECTROOT=/*)
16978	;;
16979(*)
16980	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
16981	;;
16982esac
16983
16984fi
16985
16986test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
16987
16988echo "${as_me:-configure}:16988: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
16989
16990test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
16991
16992echo "${as_me:-configure}:16992: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
16993
16994fi
16995
16996if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
16997
16998cf_fix_cppflags=no
16999cf_new_cflags=
17000cf_new_cppflags=
17001cf_new_extra_cppflags=
17002
17003for cf_add_cflags in $IMAKE_CFLAGS
17004do
17005case "$cf_fix_cppflags" in
17006(no)
17007	case "$cf_add_cflags" in
17008	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17009		case "$cf_add_cflags" in
17010		(-D*)
17011			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17012
17013			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17014				&& test -z "${cf_tst_cflags}" \
17015				&& cf_fix_cppflags=yes
17016
17017			if test "$cf_fix_cppflags" = yes ; then
17018
17019	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17020	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17021
17022				continue
17023			elif test "${cf_tst_cflags}" = "\"'" ; then
17024
17025	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17026	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17027
17028				continue
17029			fi
17030			;;
17031		esac
17032		case "$CPPFLAGS" in
17033		(*$cf_add_cflags)
17034			;;
17035		(*)
17036			case "$cf_add_cflags" in
17037			(-D*)
17038				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17039
17040CPPFLAGS=`echo "$CPPFLAGS" | \
17041	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17042		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17043
17044				;;
17045			esac
17046
17047	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17048	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17049
17050			;;
17051		esac
17052		;;
17053	(*)
17054
17055	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17056	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17057
17058		;;
17059	esac
17060	;;
17061(yes)
17062
17063	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17064	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17065
17066	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17067
17068	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17069		&& test -z "${cf_tst_cflags}" \
17070		&& cf_fix_cppflags=no
17071	;;
17072esac
17073done
17074
17075if test -n "$cf_new_cflags" ; then
17076
17077	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17078	CFLAGS="${CFLAGS}$cf_new_cflags"
17079
17080fi
17081
17082if test -n "$cf_new_cppflags" ; then
17083
17084	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17085	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17086
17087fi
17088
17089if test -n "$cf_new_extra_cppflags" ; then
17090
17091	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17092	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17093
17094fi
17095
17096else
17097	IMAKE_CFLAGS=
17098	IMAKE_LOADFLAGS=
17099	test -n "$verbose" && echo "	make fallback definitions" 1>&6
17100
17101echo "${as_me:-configure}:17101: testing make fallback definitions ..." 1>&5
17102
17103	# We prefer config.guess' values when we can get them, to avoid
17104	# inconsistent results with uname (AIX for instance).  However,
17105	# config.guess is not always consistent either.
17106	case $host_os in
17107	(*[0-9].[0-9]*)
17108		UNAME_RELEASE="$host_os"
17109		;;
17110	(*)
17111		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17112		;;
17113	esac
17114
17115	case .$UNAME_RELEASE in
17116	(*[0-9].[0-9]*)
17117		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17118		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17119		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17120		test -z "$OSMINORVERSION" && OSMINORVERSION=0
17121		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17122		;;
17123	esac
17124
17125	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17126	# fallback/fragments for NeedPrototypes, etc.
17127	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17128
17129	# If this is not set properly, Xaw's scrollbars will not work
17130	if test "$enable_narrowproto" = yes ; then
17131		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17132	fi
17133
17134	# Other special definitions:
17135	case $host_os in
17136	(aix*)
17137		# imake on AIX 5.1 defines AIXV3.  really.
17138		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17139		;;
17140	(irix[56].*)
17141		# these are needed to make SIGWINCH work in xterm
17142		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17143		;;
17144	esac
17145
17146	# "modern" systems install X applications in /usr/bin.  Other systems may
17147	# use one of the X release-based directories.
17148	case "$CFLAGS $CPPFLAGS $IMAKE_CFLAGS" in
17149	(*-DPROJECTROOT*)
17150		;;
17151	(*)
17152		for cf_dir in /usr/X11R7 /usr/X11R6 /usr/X11R5
17153		do
17154			if test -d "$cf_dir/bin"
17155			then
17156				IMAKE_CFLAGS="$IMAKE_CFLAGS -DPROJECTROOT=\\\"$cf_dir\\\""
17157				break
17158			fi
17159		done
17160		;;
17161	esac
17162
17163cf_fix_cppflags=no
17164cf_new_cflags=
17165cf_new_cppflags=
17166cf_new_extra_cppflags=
17167
17168for cf_add_cflags in $IMAKE_CFLAGS
17169do
17170case "$cf_fix_cppflags" in
17171(no)
17172	case "$cf_add_cflags" in
17173	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17174		case "$cf_add_cflags" in
17175		(-D*)
17176			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17177
17178			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17179				&& test -z "${cf_tst_cflags}" \
17180				&& cf_fix_cppflags=yes
17181
17182			if test "$cf_fix_cppflags" = yes ; then
17183
17184	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17185	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17186
17187				continue
17188			elif test "${cf_tst_cflags}" = "\"'" ; then
17189
17190	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17191	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17192
17193				continue
17194			fi
17195			;;
17196		esac
17197		case "$CPPFLAGS" in
17198		(*$cf_add_cflags)
17199			;;
17200		(*)
17201			case "$cf_add_cflags" in
17202			(-D*)
17203				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17204
17205CPPFLAGS=`echo "$CPPFLAGS" | \
17206	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17207		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17208
17209				;;
17210			esac
17211
17212	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17213	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17214
17215			;;
17216		esac
17217		;;
17218	(*)
17219
17220	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17221	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17222
17223		;;
17224	esac
17225	;;
17226(yes)
17227
17228	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17229	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17230
17231	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17232
17233	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17234		&& test -z "${cf_tst_cflags}" \
17235		&& cf_fix_cppflags=no
17236	;;
17237esac
17238done
17239
17240if test -n "$cf_new_cflags" ; then
17241
17242	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17243	CFLAGS="${CFLAGS}$cf_new_cflags"
17244
17245fi
17246
17247if test -n "$cf_new_cppflags" ; then
17248
17249	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17250	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17251
17252fi
17253
17254if test -n "$cf_new_extra_cppflags" ; then
17255
17256	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17257	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17258
17259fi
17260
17261fi
17262
17263# Extract the first word of "groff", so it can be a program name with args.
17264set dummy groff; ac_word=$2
17265echo "$as_me:17265: checking for $ac_word" >&5
17266echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17267if test "${ac_cv_path_GROFF_PATH+set}" = set; then
17268  echo $ECHO_N "(cached) $ECHO_C" >&6
17269else
17270  case $GROFF_PATH in
17271  [\\/]* | ?:[\\/]*)
17272  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
17273  ;;
17274  *)
17275  ac_save_IFS=$IFS; IFS=$ac_path_separator
17276ac_dummy="$PATH"
17277for ac_dir in $ac_dummy; do
17278  IFS=$ac_save_IFS
17279  test -z "$ac_dir" && ac_dir=.
17280  if $as_executable_p "$ac_dir/$ac_word"; then
17281   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
17282   echo "$as_me:17282: found $ac_dir/$ac_word" >&5
17283   break
17284fi
17285done
17286
17287  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
17288  ;;
17289esac
17290fi
17291GROFF_PATH=$ac_cv_path_GROFF_PATH
17292
17293if test -n "$GROFF_PATH"; then
17294  echo "$as_me:17294: result: $GROFF_PATH" >&5
17295echo "${ECHO_T}$GROFF_PATH" >&6
17296else
17297  echo "$as_me:17297: result: no" >&5
17298echo "${ECHO_T}no" >&6
17299fi
17300
17301for ac_prog in nroff mandoc
17302do
17303  # Extract the first word of "$ac_prog", so it can be a program name with args.
17304set dummy $ac_prog; ac_word=$2
17305echo "$as_me:17305: checking for $ac_word" >&5
17306echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17307if test "${ac_cv_path_NROFF_PATH+set}" = set; then
17308  echo $ECHO_N "(cached) $ECHO_C" >&6
17309else
17310  case $NROFF_PATH in
17311  [\\/]* | ?:[\\/]*)
17312  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
17313  ;;
17314  *)
17315  ac_save_IFS=$IFS; IFS=$ac_path_separator
17316ac_dummy="$PATH"
17317for ac_dir in $ac_dummy; do
17318  IFS=$ac_save_IFS
17319  test -z "$ac_dir" && ac_dir=.
17320  if $as_executable_p "$ac_dir/$ac_word"; then
17321   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
17322   echo "$as_me:17322: found $ac_dir/$ac_word" >&5
17323   break
17324fi
17325done
17326
17327  ;;
17328esac
17329fi
17330NROFF_PATH=$ac_cv_path_NROFF_PATH
17331
17332if test -n "$NROFF_PATH"; then
17333  echo "$as_me:17333: result: $NROFF_PATH" >&5
17334echo "${ECHO_T}$NROFF_PATH" >&6
17335else
17336  echo "$as_me:17336: result: no" >&5
17337echo "${ECHO_T}no" >&6
17338fi
17339
17340  test -n "$NROFF_PATH" && break
17341done
17342test -n "$NROFF_PATH" || NROFF_PATH="no"
17343
17344# Extract the first word of "tbl", so it can be a program name with args.
17345set dummy tbl; ac_word=$2
17346echo "$as_me:17346: checking for $ac_word" >&5
17347echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17348if test "${ac_cv_path_TBL_PATH+set}" = set; then
17349  echo $ECHO_N "(cached) $ECHO_C" >&6
17350else
17351  case $TBL_PATH in
17352  [\\/]* | ?:[\\/]*)
17353  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
17354  ;;
17355  *)
17356  ac_save_IFS=$IFS; IFS=$ac_path_separator
17357ac_dummy="$PATH"
17358for ac_dir in $ac_dummy; do
17359  IFS=$ac_save_IFS
17360  test -z "$ac_dir" && ac_dir=.
17361  if $as_executable_p "$ac_dir/$ac_word"; then
17362   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
17363   echo "$as_me:17363: found $ac_dir/$ac_word" >&5
17364   break
17365fi
17366done
17367
17368  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
17369  ;;
17370esac
17371fi
17372TBL_PATH=$ac_cv_path_TBL_PATH
17373
17374if test -n "$TBL_PATH"; then
17375  echo "$as_me:17375: result: $TBL_PATH" >&5
17376echo "${ECHO_T}$TBL_PATH" >&6
17377else
17378  echo "$as_me:17378: result: no" >&5
17379echo "${ECHO_T}no" >&6
17380fi
17381
17382if test "x$GROFF_PATH" = xno
17383then
17384	NROFF_NOTE=
17385	GROFF_NOTE="#"
17386else
17387	NROFF_NOTE="#"
17388	GROFF_NOTE=
17389fi
17390
17391echo "$as_me:17391: checking for fgrep" >&5
17392echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
17393if test "${ac_cv_path_FGREP+set}" = set; then
17394  echo $ECHO_N "(cached) $ECHO_C" >&6
17395else
17396  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
17397   then ac_cv_path_FGREP="$GREP -F"
17398   else
17399     for ac_prog in gfgrep fgrep
17400do
17401  # Extract the first word of "$ac_prog", so it can be a program name with args.
17402set dummy $ac_prog; ac_word=$2
17403echo "$as_me:17403: checking for $ac_word" >&5
17404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17405if test "${ac_cv_path_FGREP+set}" = set; then
17406  echo $ECHO_N "(cached) $ECHO_C" >&6
17407else
17408  case $FGREP in
17409  [\\/]* | ?:[\\/]*)
17410  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
17411  ;;
17412  *)
17413  ac_save_IFS=$IFS; IFS=$ac_path_separator
17414ac_dummy="$PATH"
17415for ac_dir in $ac_dummy; do
17416  IFS=$ac_save_IFS
17417  test -z "$ac_dir" && ac_dir=.
17418  if $as_executable_p "$ac_dir/$ac_word"; then
17419   ac_cv_path_FGREP="$ac_dir/$ac_word"
17420   echo "$as_me:17420: found $ac_dir/$ac_word" >&5
17421   break
17422fi
17423done
17424
17425  ;;
17426esac
17427fi
17428FGREP=$ac_cv_path_FGREP
17429
17430if test -n "$FGREP"; then
17431  echo "$as_me:17431: result: $FGREP" >&5
17432echo "${ECHO_T}$FGREP" >&6
17433else
17434  echo "$as_me:17434: result: no" >&5
17435echo "${ECHO_T}no" >&6
17436fi
17437
17438  test -n "$FGREP" && break
17439done
17440test -n "$FGREP" || FGREP=": "
17441
17442     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:17442: error: cannot find workable fgrep" >&5
17443echo "$as_me: error: cannot find workable fgrep" >&2;}
17444   { (exit 1); exit 1; }; }
17445   fi
17446fi
17447echo "$as_me:17447: result: $ac_cv_path_FGREP" >&5
17448echo "${ECHO_T}$ac_cv_path_FGREP" >&6
17449 FGREP="$ac_cv_path_FGREP"
17450
17451case "x${with_man2html}" in
17452(xno)
17453	cf_man2html=no
17454	;;
17455(x|xyes)
17456	# Extract the first word of "man2html", so it can be a program name with args.
17457set dummy man2html; ac_word=$2
17458echo "$as_me:17458: checking for $ac_word" >&5
17459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17460if test "${ac_cv_path_cf_man2html+set}" = set; then
17461  echo $ECHO_N "(cached) $ECHO_C" >&6
17462else
17463  case $cf_man2html in
17464  [\\/]* | ?:[\\/]*)
17465  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17466  ;;
17467  *)
17468  ac_save_IFS=$IFS; IFS=$ac_path_separator
17469ac_dummy="$PATH"
17470for ac_dir in $ac_dummy; do
17471  IFS=$ac_save_IFS
17472  test -z "$ac_dir" && ac_dir=.
17473  if $as_executable_p "$ac_dir/$ac_word"; then
17474   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17475   echo "$as_me:17475: found $ac_dir/$ac_word" >&5
17476   break
17477fi
17478done
17479
17480  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17481  ;;
17482esac
17483fi
17484cf_man2html=$ac_cv_path_cf_man2html
17485
17486if test -n "$cf_man2html"; then
17487  echo "$as_me:17487: result: $cf_man2html" >&5
17488echo "${ECHO_T}$cf_man2html" >&6
17489else
17490  echo "$as_me:17490: result: no" >&5
17491echo "${ECHO_T}no" >&6
17492fi
17493
17494	case "x$cf_man2html" in
17495	(x/*)
17496		echo "$as_me:17496: checking for the modified Earl Hood script" >&5
17497echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
17498		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
17499		then
17500			cf_man2html_ok=yes
17501		else
17502			cf_man2html=no
17503			cf_man2html_ok=no
17504		fi
17505		echo "$as_me:17505: result: $cf_man2html_ok" >&5
17506echo "${ECHO_T}$cf_man2html_ok" >&6
17507		;;
17508	(*)
17509		cf_man2html=no
17510		;;
17511	esac
17512esac
17513
17514echo "$as_me:17514: checking for program to convert manpage to html" >&5
17515echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
17516
17517# Check whether --with-man2html or --without-man2html was given.
17518if test "${with_man2html+set}" = set; then
17519  withval="$with_man2html"
17520  cf_man2html=$withval
17521else
17522  cf_man2html=$cf_man2html
17523fi;
17524
17525cf_with_groff=no
17526
17527case $cf_man2html in
17528(yes)
17529	echo "$as_me:17529: result: man2html" >&5
17530echo "${ECHO_T}man2html" >&6
17531	# Extract the first word of "man2html", so it can be a program name with args.
17532set dummy man2html; ac_word=$2
17533echo "$as_me:17533: checking for $ac_word" >&5
17534echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17535if test "${ac_cv_path_cf_man2html+set}" = set; then
17536  echo $ECHO_N "(cached) $ECHO_C" >&6
17537else
17538  case $cf_man2html in
17539  [\\/]* | ?:[\\/]*)
17540  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17541  ;;
17542  *)
17543  ac_save_IFS=$IFS; IFS=$ac_path_separator
17544ac_dummy="$PATH"
17545for ac_dir in $ac_dummy; do
17546  IFS=$ac_save_IFS
17547  test -z "$ac_dir" && ac_dir=.
17548  if $as_executable_p "$ac_dir/$ac_word"; then
17549   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17550   echo "$as_me:17550: found $ac_dir/$ac_word" >&5
17551   break
17552fi
17553done
17554
17555  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17556  ;;
17557esac
17558fi
17559cf_man2html=$ac_cv_path_cf_man2html
17560
17561if test -n "$cf_man2html"; then
17562  echo "$as_me:17562: result: $cf_man2html" >&5
17563echo "${ECHO_T}$cf_man2html" >&6
17564else
17565  echo "$as_me:17565: result: no" >&5
17566echo "${ECHO_T}no" >&6
17567fi
17568
17569	;;
17570(no|groff|*/groff*)
17571	cf_with_groff=yes
17572	cf_man2html=$GROFF_PATH
17573	echo "$as_me:17573: result: $cf_man2html" >&5
17574echo "${ECHO_T}$cf_man2html" >&6
17575	;;
17576(*)
17577	echo "$as_me:17577: result: $cf_man2html" >&5
17578echo "${ECHO_T}$cf_man2html" >&6
17579	;;
17580esac
17581
17582MAN2HTML_TEMP="man2html.tmp"
17583	cat >$MAN2HTML_TEMP <<CF_EOF
17584#!$SHELL
17585# Temporary script generated by CF_WITH_MAN2HTML
17586# Convert inputs to html, sending result to standard output.
17587#
17588# Parameters:
17589# \${1} = rootname of file to convert
17590# \${2} = suffix of file to convert, e.g., "1"
17591# \${3} = macros to use, e.g., "man"
17592#
17593ROOT=\$1
17594TYPE=\$2
17595MACS=\$3
17596
17597unset LANG
17598unset LC_ALL
17599unset LC_CTYPE
17600unset LANGUAGE
17601GROFF_NO_SGR=stupid
17602export GROFF_NO_SGR
17603
17604CF_EOF
17605
17606NROFF_OPTS=
17607if test "x$cf_with_groff" = xyes
17608then
17609	MAN2HTML_NOTE="$GROFF_NOTE"
17610	MAN2HTML_PATH="$GROFF_PATH"
17611	cat >>$MAN2HTML_TEMP <<CF_EOF
17612$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
17613CF_EOF
17614else
17615	# disable hyphenation if this is groff
17616	if test "x$GROFF_PATH" != xno
17617	then
17618		echo "$as_me:17618: checking if nroff is really groff" >&5
17619echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
17620		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
17621		test -n "$cf_check_groff" && cf_check_groff=yes
17622		test -n "$cf_check_groff" || cf_check_groff=no
17623		echo "$as_me:17623: result: $cf_check_groff" >&5
17624echo "${ECHO_T}$cf_check_groff" >&6
17625		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
17626	fi
17627	MAN2HTML_NOTE=""
17628
17629if test "x$prefix" != xNONE; then
17630	cf_path_syntax="$prefix"
17631else
17632	cf_path_syntax="$ac_default_prefix"
17633fi
17634
17635case ".$cf_man2html" in
17636(.\$\(*\)*|.\'*\'*)
17637	;;
17638(..|./*|.\\*)
17639	;;
17640(.[a-zA-Z]:[\\/]*) # OS/2 EMX
17641	;;
17642(.\$\{*prefix\}*|.\$\{*dir\}*)
17643	eval cf_man2html="$cf_man2html"
17644	case ".$cf_man2html" in
17645	(.NONE/*)
17646		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17647		;;
17648	esac
17649	;;
17650(.no|.NONE/*)
17651	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17652	;;
17653(*)
17654	{ { echo "$as_me:17654: error: expected a pathname, not \"$cf_man2html\"" >&5
17655echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
17656   { (exit 1); exit 1; }; }
17657	;;
17658esac
17659
17660	MAN2HTML_PATH="$cf_man2html"
17661	echo "$as_me:17661: checking for $cf_man2html top/bottom margins" >&5
17662echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
17663
17664	# for this example, expect 3 lines of content, the remainder is head/foot
17665	cat >conftest.in <<CF_EOF
17666.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
17667.SH SECTION
17668MARKER
17669CF_EOF
17670
17671	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17672
17673	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17674	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
17675	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
17676	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
17677	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
17678
17679	echo "$as_me:17679: result: $cf_man2html_top_bot" >&5
17680echo "${ECHO_T}$cf_man2html_top_bot" >&6
17681
17682	echo "$as_me:17682: checking for pagesize to use" >&5
17683echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
17684	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
17685	do
17686	cat >>conftest.in <<CF_EOF
17687.nf
176880
176891
176902
176913
176924
176935
176946
176957
176968
176979
17698CF_EOF
17699	done
17700
17701	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17702	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17703	test -z "$cf_man2html_page" && cf_man2html_page=99999
17704	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
17705
17706	rm -rf conftest*
17707	echo "$as_me:17707: result: $cf_man2html_page" >&5
17708echo "${ECHO_T}$cf_man2html_page" >&6
17709
17710	cat >>$MAN2HTML_TEMP <<CF_EOF
17711: \${MAN2HTML_PATH=$MAN2HTML_PATH}
17712MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
17713case \${TYPE} in
17714(ms)
17715	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
17716	;;
17717(*)
17718	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
17719	;;
17720esac
17721CF_EOF
17722fi
17723
17724chmod 700 $MAN2HTML_TEMP
17725
17726# If we have already established that there is a full termcap implementation,
17727# suppress the definitions for terminfo that we make have imported from the
17728# imake-file.
17729if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
17730	case "$IMAKE_CFLAGS" in
17731	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
17732
17733	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
17734
17735echo "${as_me:-configure}:17735: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
17736
17737	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17738	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
17739
17740echo "${as_me:-configure}:17740: testing ...result $IMAKE_CFLAGS ..." 1>&5
17741
17742	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
17743
17744echo "${as_me:-configure}:17744: testing removing terminfo flags from CPPFLAGS ..." 1>&5
17745
17746	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17747	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
17748
17749echo "${as_me:-configure}:17749: testing ...result $CPPFLAGS ..." 1>&5
17750
17751		;;
17752	esac
17753fi
17754
17755echo "$as_me:17755: checking for default terminal-id" >&5
17756echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
17757
17758# Check whether --with-terminal-id or --without-terminal-id was given.
17759if test "${with_terminal_id+set}" = set; then
17760  withval="$with_terminal_id"
17761  default_termid=$withval
17762else
17763  default_termid=vt420
17764fi;
17765echo "$as_me:17765: result: $default_termid" >&5
17766echo "${ECHO_T}$default_termid" >&6
17767case $default_termid in
17768(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
17769	;;
17770esac
17771
17772cat >>confdefs.h <<EOF
17773#define DFT_DECID "$default_termid"
17774EOF
17775
17776echo "$as_me:17776: checking for default terminal-type" >&5
17777echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
17778
17779# Check whether --with-terminal-type or --without-terminal-type was given.
17780if test "${with_terminal_type+set}" = set; then
17781  withval="$with_terminal_type"
17782  default_TERM=$withval
17783else
17784  default_TERM=xterm
17785fi;
17786echo "$as_me:17786: result: $default_TERM" >&5
17787echo "${ECHO_T}$default_TERM" >&6
17788
17789cat >>confdefs.h <<EOF
17790#define DFT_TERMTYPE "$default_TERM"
17791EOF
17792
17793###############################################################################
17794echo "$as_me:17794: checking if backarrow-key should be BS" >&5
17795echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
17796
17797# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
17798if test "${enable_backarrow_key+set}" = set; then
17799  enableval="$enable_backarrow_key"
17800  test "$enableval" != no && enableval=yes
17801	if test "$enableval" != "yes" ; then
17802    backarrow_is_bs=$enableval
17803	else
17804		backarrow_is_bs=yes
17805	fi
17806else
17807  enableval=yes
17808	backarrow_is_bs=yes
17809
17810fi;
17811
17812echo "$as_me:17812: result: $backarrow_is_bs" >&5
17813echo "${ECHO_T}$backarrow_is_bs" >&6
17814case $backarrow_is_bs in
17815(yes)
17816	backarrow_is_bs=true
17817	;;
17818(no)
17819	backarrow_is_bs=false
17820	;;
17821esac
17822cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
17823
17824cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17825
17826cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
17827backarrow_is_bs=${cf_xbool1}${cf_xbool2}
17828
17829cat >>confdefs.h <<EOF
17830#define DEF_BACKARO_BS $backarrow_is_bs
17831EOF
17832
17833echo "$as_me:17833: checking if backarrow-key should be treated as erase" >&5
17834echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
17835
17836# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
17837if test "${enable_backarrow_is_erase+set}" = set; then
17838  enableval="$enable_backarrow_is_erase"
17839  test "$enableval" != yes && enableval=no
17840	if test "$enableval" != "no" ; then
17841    backarrow_is_erase=$enableval
17842	else
17843		backarrow_is_erase=no
17844	fi
17845else
17846  enableval=no
17847	backarrow_is_erase=no
17848
17849fi;
17850
17851echo "$as_me:17851: result: $backarrow_is_erase" >&5
17852echo "${ECHO_T}$backarrow_is_erase" >&6
17853case $backarrow_is_erase in
17854(yes)
17855	backarrow_is_erase=true
17856	;;
17857(no)
17858	backarrow_is_erase=false
17859	;;
17860esac
17861cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
17862
17863cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17864
17865cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
17866backarrow_is_erase=${cf_xbool1}${cf_xbool2}
17867
17868cat >>confdefs.h <<EOF
17869#define DEF_BACKARO_ERASE $backarrow_is_erase
17870EOF
17871
17872echo "$as_me:17872: checking for default backspace/DEL setting" >&5
17873echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
17874
17875# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
17876if test "${enable_delete_is_del+set}" = set; then
17877  enableval="$enable_delete_is_del"
17878  delete_is_del=$enableval
17879else
17880  delete_is_del=maybe
17881fi;
17882
17883echo "$as_me:17883: result: $delete_is_del" >&5
17884echo "${ECHO_T}$delete_is_del" >&6
17885case $delete_is_del in
17886(yes)
17887	delete_is_del=true
17888	;;
17889(no)
17890	delete_is_del=false
17891	;;
17892esac
17893cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
17894
17895cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17896
17897cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
17898delete_is_del=${cf_xbool1}${cf_xbool2}
17899
17900cat >>confdefs.h <<EOF
17901#define DEFDELETE_DEL $delete_is_del
17902EOF
17903
17904echo "$as_me:17904: checking for default pty initial erase setting" >&5
17905echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
17906
17907# Check whether --enable-pty-erase or --disable-pty-erase was given.
17908if test "${enable_pty_erase+set}" = set; then
17909  enableval="$enable_pty_erase"
17910  initial_erase=$enableval
17911else
17912  initial_erase=False
17913fi;
17914
17915echo "$as_me:17915: result: $initial_erase" >&5
17916echo "${ECHO_T}$initial_erase" >&6
17917case $initial_erase in
17918(yes)
17919	initial_erase=true
17920	;;
17921(no)
17922	initial_erase=false
17923	;;
17924esac
17925cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
17926
17927cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17928
17929cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
17930initial_erase=${cf_xbool1}${cf_xbool2}
17931
17932cat >>confdefs.h <<EOF
17933#define DEF_INITIAL_ERASE $initial_erase
17934EOF
17935
17936echo "$as_me:17936: checking if alt should send ESC" >&5
17937echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
17938
17939# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
17940if test "${enable_alt_sends_esc+set}" = set; then
17941  enableval="$enable_alt_sends_esc"
17942  test "$enableval" != yes && enableval=no
17943	if test "$enableval" != "no" ; then
17944    alt_sends_esc=$enableval
17945	else
17946		alt_sends_esc=no
17947	fi
17948else
17949  enableval=no
17950	alt_sends_esc=no
17951
17952fi;
17953
17954echo "$as_me:17954: result: $alt_sends_esc" >&5
17955echo "${ECHO_T}$alt_sends_esc" >&6
17956case $alt_sends_esc in
17957(yes)
17958	alt_sends_esc=true
17959	;;
17960(no)
17961	alt_sends_esc=false
17962	;;
17963esac
17964cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17965
17966cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17967
17968cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
17969alt_sends_esc=${cf_xbool1}${cf_xbool2}
17970
17971cat >>confdefs.h <<EOF
17972#define DEF_ALT_SENDS_ESC $alt_sends_esc
17973EOF
17974
17975echo "$as_me:17975: checking if meta should send ESC" >&5
17976echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
17977
17978# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
17979if test "${enable_meta_sends_esc+set}" = set; then
17980  enableval="$enable_meta_sends_esc"
17981  test "$enableval" != yes && enableval=no
17982	if test "$enableval" != "no" ; then
17983    meta_sends_esc=$enableval
17984	else
17985		meta_sends_esc=no
17986	fi
17987else
17988  enableval=no
17989	meta_sends_esc=no
17990
17991fi;
17992
17993echo "$as_me:17993: result: $meta_sends_esc" >&5
17994echo "${ECHO_T}$meta_sends_esc" >&6
17995case $meta_sends_esc in
17996(yes)
17997	meta_sends_esc=true
17998	;;
17999(no)
18000	meta_sends_esc=false
18001	;;
18002esac
18003cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
18004
18005cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
18006
18007cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
18008meta_sends_esc=${cf_xbool1}${cf_xbool2}
18009
18010cat >>confdefs.h <<EOF
18011#define DEF_META_SENDS_ESC $meta_sends_esc
18012EOF
18013
18014###############################################################################
18015# Extract the first word of "tic", so it can be a program name with args.
18016set dummy tic; ac_word=$2
18017echo "$as_me:18017: checking for $ac_word" >&5
18018echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18019if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
18020  echo $ECHO_N "(cached) $ECHO_C" >&6
18021else
18022  if test -n "$cf_tic_prog"; then
18023  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
18024else
18025  ac_save_IFS=$IFS; IFS=$ac_path_separator
18026ac_dummy="$PATH"
18027for ac_dir in $ac_dummy; do
18028  IFS=$ac_save_IFS
18029  test -z "$ac_dir" && ac_dir=.
18030  $as_executable_p "$ac_dir/$ac_word" || continue
18031ac_cv_prog_cf_tic_prog="yes"
18032echo "$as_me:18032: found $ac_dir/$ac_word" >&5
18033break
18034done
18035
18036  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
18037fi
18038fi
18039cf_tic_prog=$ac_cv_prog_cf_tic_prog
18040if test -n "$cf_tic_prog"; then
18041  echo "$as_me:18041: result: $cf_tic_prog" >&5
18042echo "${ECHO_T}$cf_tic_prog" >&6
18043else
18044  echo "$as_me:18044: result: no" >&5
18045echo "${ECHO_T}no" >&6
18046fi
18047
18048if test "$cf_tic_prog" = yes ; then
18049	if test -n "$TERMINFO"
18050	then
18051		case "$TERMINFO" in
18052		(/*)
18053			test -d "$TERMINFO" || unset TERMINFO
18054			;;
18055		(*)
18056			unset TERMINFO
18057			;;
18058		esac
18059	fi
18060	echo "$as_me:18060: checking for private terminfo-directory" >&5
18061echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
18062
18063# Check whether --with-own-terminfo or --without-own-terminfo was given.
18064if test "${with_own_terminfo+set}" = set; then
18065  withval="$with_own_terminfo"
18066  TERMINFO_DIR=$withval
18067else
18068  TERMINFO_DIR=${TERMINFO-none}
18069fi;
18070	echo "$as_me:18070: result: $TERMINFO_DIR" >&5
18071echo "${ECHO_T}$TERMINFO_DIR" >&6
18072	if test "$TERMINFO_DIR" = yes ; then
18073		{ echo "$as_me:18073: WARNING: no value given" >&5
18074echo "$as_me: WARNING: no value given" >&2;}
18075	elif test "$TERMINFO_DIR" != none ; then
18076		if test -d "$TERMINFO_DIR" ; then
18077
18078cat >>confdefs.h <<EOF
18079#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
18080EOF
18081
18082			echo "$as_me:18082: checking if \$TERMINFO should also be set" >&5
18083echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
18084
18085# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
18086if test "${enable_env_terminfo+set}" = set; then
18087  enableval="$enable_env_terminfo"
18088  cf_env_terminfo=yes
18089else
18090  cf_env_terminfo=no
18091fi;
18092			echo "$as_me:18092: result: $cf_env_terminfo" >&5
18093echo "${ECHO_T}$cf_env_terminfo" >&6
18094			test $cf_env_terminfo = yes &&
18095
18096cat >>confdefs.h <<\EOF
18097#define OWN_TERMINFO_ENV 1
18098EOF
18099
18100		else
18101			{ echo "$as_me:18101: WARNING: not a directory" >&5
18102echo "$as_me: WARNING: not a directory" >&2;}
18103		fi
18104	elif test "$prefix" != NONE ; then
18105		TERMINFO_DIR='${prefix}/lib/terminfo'
18106	elif test -d /usr/lib/terminfo ; then
18107		TERMINFO_DIR=/usr/lib/terminfo
18108	else
18109		TERMINFO_DIR=
18110	fi
18111	SET_TERMINFO=
18112	if test -n "$TERMINFO_DIR" ; then
18113		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
18114		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
18115	fi
18116	no_ticprog=
18117else
18118	no_ticprog="#"
18119	TERMINFO_DIR=
18120	SET_TERMINFO=
18121fi
18122
18123###############################################################################
18124
18125echo "$as_me:18125: checking if you want active-icons" >&5
18126echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18127
18128# Check whether --enable-active-icon or --disable-active-icon was given.
18129if test "${enable_active_icon+set}" = set; then
18130  enableval="$enable_active_icon"
18131  test "$enableval" != no && enableval=yes
18132	if test "$enableval" != "yes" ; then
18133    enable_active_icon=no
18134	else
18135		enable_active_icon=yes
18136	fi
18137else
18138  enableval=yes
18139	enable_active_icon=yes
18140
18141fi;
18142echo "$as_me:18142: result: $enable_active_icon" >&5
18143echo "${ECHO_T}$enable_active_icon" >&6
18144if test "$enable_active_icon" = no ; then
18145
18146cat >>confdefs.h <<\EOF
18147#define NO_ACTIVE_ICON 1
18148EOF
18149
18150fi
18151
18152echo "$as_me:18152: checking if you want ANSI color" >&5
18153echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18154
18155# Check whether --enable-ansi-color or --disable-ansi-color was given.
18156if test "${enable_ansi_color+set}" = set; then
18157  enableval="$enable_ansi_color"
18158  test "$enableval" != no && enableval=yes
18159	if test "$enableval" != "yes" ; then
18160    enable_ansi_color=no
18161	else
18162		enable_ansi_color=yes
18163	fi
18164else
18165  enableval=yes
18166	enable_ansi_color=yes
18167
18168fi;
18169echo "$as_me:18169: result: $enable_ansi_color" >&5
18170echo "${ECHO_T}$enable_ansi_color" >&6
18171test "$enable_ansi_color" = no &&
18172cat >>confdefs.h <<\EOF
18173#define OPT_ISO_COLORS 0
18174EOF
18175
18176if test "$enable_ansi_color" = yes ; then
18177
18178	echo "$as_me:18178: checking if you want 16 colors like aixterm" >&5
18179echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18180
18181# Check whether --enable-16-color or --disable-16-color was given.
18182if test "${enable_16_color+set}" = set; then
18183  enableval="$enable_16_color"
18184  test "$enableval" != no && enableval=yes
18185	if test "$enableval" != "yes" ; then
18186    enable_16_color=no
18187	else
18188		enable_16_color=yes
18189	fi
18190else
18191  enableval=yes
18192	enable_16_color=yes
18193
18194fi;
18195	echo "$as_me:18195: result: $enable_16_color" >&5
18196echo "${ECHO_T}$enable_16_color" >&6
18197	test "$enable_16_color" = no &&
18198cat >>confdefs.h <<\EOF
18199#define OPT_AIX_COLORS 0
18200EOF
18201
18202	echo "$as_me:18202: checking if you want 256 colors" >&5
18203echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18204
18205# Check whether --enable-256-color or --disable-256-color was given.
18206if test "${enable_256_color+set}" = set; then
18207  enableval="$enable_256_color"
18208  test "$enableval" != no && enableval=yes
18209	if test "$enableval" != "yes" ; then
18210    enable_256_color=no
18211	else
18212		enable_256_color=yes
18213	fi
18214else
18215  enableval=yes
18216	enable_256_color=yes
18217
18218fi;
18219	echo "$as_me:18219: result: $enable_256_color" >&5
18220echo "${ECHO_T}$enable_256_color" >&6
18221
18222	if test "$enable_256_color" = yes ; then
18223
18224		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
18225		EXTRAHDRS="$EXTRAHDRS 256colres.h"
18226
18227cat >>confdefs.h <<\EOF
18228#define OPT_256_COLORS 1
18229EOF
18230
18231		echo "$as_me:18231: checking if you want direct-color support" >&5
18232echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
18233
18234# Check whether --enable-direct-color or --disable-direct-color was given.
18235if test "${enable_direct_color+set}" = set; then
18236  enableval="$enable_direct_color"
18237  test "$enableval" != no && enableval=yes
18238	if test "$enableval" != "yes" ; then
18239    enable_direct_color=no
18240	else
18241		enable_direct_color=yes
18242	fi
18243else
18244  enableval=yes
18245	enable_direct_color=yes
18246
18247fi;
18248		echo "$as_me:18248: result: $enable_direct_color" >&5
18249echo "${ECHO_T}$enable_direct_color" >&6
18250		if test "$enable_direct_color" = yes ; then
18251
18252cat >>confdefs.h <<\EOF
18253#define OPT_DIRECT_COLOR 1
18254EOF
18255
18256		fi
18257
18258	else
18259
18260		echo "$as_me:18260: checking if you want 88 colors" >&5
18261echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
18262
18263# Check whether --enable-88-color or --disable-88-color was given.
18264if test "${enable_88_color+set}" = set; then
18265  enableval="$enable_88_color"
18266  test "$enableval" != no && enableval=yes
18267	if test "$enableval" != "yes" ; then
18268    enable_88_color=no
18269	else
18270		enable_88_color=yes
18271	fi
18272else
18273  enableval=yes
18274	enable_88_color=yes
18275
18276fi;
18277		echo "$as_me:18277: result: $enable_88_color" >&5
18278echo "${ECHO_T}$enable_88_color" >&6
18279		if test "$enable_88_color" = yes ; then
18280			CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
18281			EXTRAHDRS="$EXTRAHDRS 88colres.h"
18282
18283cat >>confdefs.h <<\EOF
18284#define OPT_88_COLORS 1
18285EOF
18286
18287		fi
18288
18289	fi
18290
18291fi
18292
18293echo "$as_me:18293: checking if you want blinking cursor" >&5
18294echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
18295
18296# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
18297if test "${enable_blink_cursor+set}" = set; then
18298  enableval="$enable_blink_cursor"
18299  test "$enableval" != no && enableval=yes
18300	if test "$enableval" != "yes" ; then
18301    enable_blink_curs=no
18302	else
18303		enable_blink_curs=yes
18304	fi
18305else
18306  enableval=yes
18307	enable_blink_curs=yes
18308
18309fi;
18310echo "$as_me:18310: result: $enable_blink_curs" >&5
18311echo "${ECHO_T}$enable_blink_curs" >&6
18312test "$enable_blink_curs" = no &&
18313cat >>confdefs.h <<\EOF
18314#define OPT_BLINK_CURS 0
18315EOF
18316
18317echo "$as_me:18317: checking if you want to ignore Linux's broken palette-strings" >&5
18318echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
18319
18320case $host_os in
18321(linux*)
18322	assume_broken_osc=yes ;;
18323(*)
18324	assume_broken_osc=no ;;
18325esac
18326
18327# Check whether --enable-broken-osc or --disable-broken-osc was given.
18328if test "${enable_broken_osc+set}" = set; then
18329  enableval="$enable_broken_osc"
18330  test "$enableval" != no && enableval=yes
18331	if test "$enableval" != "$assume_broken_osc" ; then
18332    enable_broken_osc=$enableval
18333	else
18334		enable_broken_osc=$enableval
18335	fi
18336else
18337  enableval=$assume_broken_osc
18338	enable_broken_osc=$enableval
18339
18340fi;
18341echo "$as_me:18341: result: $enable_broken_osc" >&5
18342echo "${ECHO_T}$enable_broken_osc" >&6
18343if test "$enable_broken_osc" = yes ; then
18344
18345cat >>confdefs.h <<\EOF
18346#define OPT_BROKEN_OSC 1
18347EOF
18348
18349else
18350
18351cat >>confdefs.h <<\EOF
18352#define OPT_BROKEN_OSC 0
18353EOF
18354
18355fi
18356
18357echo "$as_me:18357: checking if you want to allow broken string-terminators" >&5
18358echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
18359
18360# Check whether --enable-broken-st or --disable-broken-st was given.
18361if test "${enable_broken_st+set}" = set; then
18362  enableval="$enable_broken_st"
18363  test "$enableval" != yes && enableval=no
18364	if test "$enableval" != "no" ; then
18365    enable_broken_st=no
18366	else
18367		enable_broken_st=yes
18368	fi
18369else
18370  enableval=no
18371	enable_broken_st=yes
18372
18373fi;
18374echo "$as_me:18374: result: $enable_broken_st" >&5
18375echo "${ECHO_T}$enable_broken_st" >&6
18376test "$enable_broken_st" = no &&
18377cat >>confdefs.h <<\EOF
18378#define OPT_BROKEN_ST 0
18379EOF
18380
18381echo "$as_me:18381: checking if you want to compile-in icon data" >&5
18382echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
18383
18384# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
18385if test "${enable_builtin_xpms+set}" = set; then
18386  enableval="$enable_builtin_xpms"
18387  test "$enableval" != yes && enableval=no
18388	if test "$enableval" != "no" ; then
18389    enable_builtin_xpms=yes
18390	else
18391		enable_builtin_xpms=no
18392	fi
18393else
18394  enableval=no
18395	enable_builtin_xpms=no
18396
18397fi;
18398echo "$as_me:18398: result: $enable_builtin_xpms" >&5
18399echo "${ECHO_T}$enable_builtin_xpms" >&6
18400test "$enable_builtin_xpms" = yes &&
18401cat >>confdefs.h <<\EOF
18402#define OPT_BUILTIN_XPMS 1
18403EOF
18404
18405echo "$as_me:18405: checking if you want printable 128-159" >&5
18406echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
18407
18408# Check whether --enable-c1-print or --disable-c1-print was given.
18409if test "${enable_c1_print+set}" = set; then
18410  enableval="$enable_c1_print"
18411  test "$enableval" != no && enableval=yes
18412	if test "$enableval" != "yes" ; then
18413    enable_c1_print=no
18414	else
18415		enable_c1_print=yes
18416	fi
18417else
18418  enableval=yes
18419	enable_c1_print=yes
18420
18421fi;
18422echo "$as_me:18422: result: $enable_c1_print" >&5
18423echo "${ECHO_T}$enable_c1_print" >&6
18424test "$enable_c1_print" = no &&
18425cat >>confdefs.h <<\EOF
18426#define OPT_C1_PRINT 0
18427EOF
18428
18429if test "$enable_ansi_color" = yes ; then
18430
18431	echo "$as_me:18431: checking if you want bold colors mapped like IBM PC" >&5
18432echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
18433
18434# Check whether --enable-bold-color or --disable-bold-color was given.
18435if test "${enable_bold_color+set}" = set; then
18436  enableval="$enable_bold_color"
18437  test "$enableval" != no && enableval=yes
18438	if test "$enableval" != "yes" ; then
18439    enable_pc_color=no
18440	else
18441		enable_pc_color=yes
18442	fi
18443else
18444  enableval=yes
18445	enable_pc_color=yes
18446
18447fi;
18448	echo "$as_me:18448: result: $enable_pc_color" >&5
18449echo "${ECHO_T}$enable_pc_color" >&6
18450	test "$enable_pc_color" = no &&
18451cat >>confdefs.h <<\EOF
18452#define OPT_PC_COLORS 0
18453EOF
18454
18455	echo "$as_me:18455: checking if you want separate color-classes" >&5
18456echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
18457
18458# Check whether --enable-color-class or --disable-color-class was given.
18459if test "${enable_color_class+set}" = set; then
18460  enableval="$enable_color_class"
18461  test "$enableval" != no && enableval=yes
18462	if test "$enableval" != "yes" ; then
18463    enable_color_class=no
18464	else
18465		enable_color_class=yes
18466	fi
18467else
18468  enableval=yes
18469	enable_color_class=yes
18470
18471fi;
18472	echo "$as_me:18472: result: $enable_color_class" >&5
18473echo "${ECHO_T}$enable_color_class" >&6
18474	test "$enable_color_class" = no &&
18475cat >>confdefs.h <<\EOF
18476#define OPT_COLOR_CLASS 0
18477EOF
18478
18479	echo "$as_me:18479: checking if you want color-mode enabled by default" >&5
18480echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
18481
18482# Check whether --enable-color-mode or --disable-color-mode was given.
18483if test "${enable_color_mode+set}" = set; then
18484  enableval="$enable_color_mode"
18485  test "$enableval" != no && enableval=yes
18486	if test "$enableval" != "yes" ; then
18487    default_colormode=no
18488	else
18489		default_colormode=yes
18490	fi
18491else
18492  enableval=yes
18493	default_colormode=yes
18494
18495fi;
18496	echo "$as_me:18496: result: $default_colormode" >&5
18497echo "${ECHO_T}$default_colormode" >&6
18498	test "$default_colormode" = no &&
18499cat >>confdefs.h <<\EOF
18500#define DFT_COLORMODE 0
18501EOF
18502
18503fi
18504
18505echo "$as_me:18505: checking if you want support for color highlighting" >&5
18506echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
18507
18508# Check whether --enable-highlighting or --disable-highlighting was given.
18509if test "${enable_highlighting+set}" = set; then
18510  enableval="$enable_highlighting"
18511  test "$enableval" != no && enableval=yes
18512	if test "$enableval" != "yes" ; then
18513    default_highlight=no
18514	else
18515		default_highlight=yes
18516	fi
18517else
18518  enableval=yes
18519	default_highlight=yes
18520
18521fi;
18522echo "$as_me:18522: result: $default_highlight" >&5
18523echo "${ECHO_T}$default_highlight" >&6
18524test "$default_highlight" = no &&
18525cat >>confdefs.h <<\EOF
18526#define OPT_HIGHLIGHT_COLOR 0
18527EOF
18528
18529echo "$as_me:18529: checking if you want support for doublesize characters" >&5
18530echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
18531
18532# Check whether --enable-doublechars or --disable-doublechars was given.
18533if test "${enable_doublechars+set}" = set; then
18534  enableval="$enable_doublechars"
18535  test "$enableval" != no && enableval=yes
18536	if test "$enableval" != "yes" ; then
18537    enable_doublechars=no
18538	else
18539		enable_doublechars=yes
18540	fi
18541else
18542  enableval=yes
18543	enable_doublechars=yes
18544
18545fi;
18546echo "$as_me:18546: result: $enable_doublechars" >&5
18547echo "${ECHO_T}$enable_doublechars" >&6
18548test "$enable_doublechars" = no &&
18549cat >>confdefs.h <<\EOF
18550#define OPT_DEC_CHRSET 0
18551EOF
18552
18553echo "$as_me:18553: checking if you want fallback-support for box characters" >&5
18554echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
18555
18556# Check whether --enable-boxchars or --disable-boxchars was given.
18557if test "${enable_boxchars+set}" = set; then
18558  enableval="$enable_boxchars"
18559  test "$enableval" != no && enableval=yes
18560	if test "$enableval" != "yes" ; then
18561    enable_boxchars=no
18562	else
18563		enable_boxchars=yes
18564	fi
18565else
18566  enableval=yes
18567	enable_boxchars=yes
18568
18569fi;
18570echo "$as_me:18570: result: $enable_boxchars" >&5
18571echo "${ECHO_T}$enable_boxchars" >&6
18572test "$enable_boxchars" = no &&
18573cat >>confdefs.h <<\EOF
18574#define OPT_BOX_CHARS 0
18575EOF
18576
18577echo "$as_me:18577: checking if you want to allow spawning new xterms" >&5
18578echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
18579
18580# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
18581if test "${enable_exec_xterm+set}" = set; then
18582  enableval="$enable_exec_xterm"
18583  test "$enableval" != yes && enableval=no
18584	if test "$enableval" != "no" ; then
18585    enable_exec_xterm=yes
18586	else
18587		enable_exec_xterm=no
18588	fi
18589else
18590  enableval=no
18591	enable_exec_xterm=no
18592
18593fi;
18594echo "$as_me:18594: result: $enable_exec_xterm" >&5
18595echo "${ECHO_T}$enable_exec_xterm" >&6
18596if test "$enable_exec_xterm" = yes ; then
18597
18598echo "$as_me:18598: checking for proc tree with cwd-support" >&5
18599echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
18600if test "${cf_cv_procfs_cwd+set}" = set; then
18601  echo $ECHO_N "(cached) $ECHO_C" >&6
18602else
18603
18604cf_cv_procfs_cwd=no
18605for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
18606do
18607	if test -d "$cf_path" && \
18608	   test -d "$cf_path"/$$ && \
18609	   { test -d "$cf_path"/$$/cwd || \
18610	     test -L "$cf_path"/$$/cwd; }; then
18611		cf_cv_procfs_cwd="$cf_path"
18612		break
18613	fi
18614done
18615
18616fi
18617echo "$as_me:18617: result: $cf_cv_procfs_cwd" >&5
18618echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
18619
18620	if test "$cf_cv_procfs_cwd" = no ; then
18621		{ echo "$as_me:18621: WARNING: no suitable proc filesystem found" >&5
18622echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
18623	else
18624
18625cat >>confdefs.h <<EOF
18626#define PROCFS_ROOT "$cf_cv_procfs_cwd"
18627EOF
18628
18629cat >>confdefs.h <<\EOF
18630#define OPT_EXEC_XTERM 1
18631EOF
18632
18633	fi
18634fi
18635
18636if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
18637	test -n "$verbose" && echo "	found package Xext" 1>&6
18638
18639echo "${as_me:-configure}:18639: testing found package Xext ..." 1>&5
18640
18641	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
18642	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
18643	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18644
18645echo "${as_me:-configure}:18645: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18646
18647	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18648
18649echo "${as_me:-configure}:18649: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18650
18651cf_fix_cppflags=no
18652cf_new_cflags=
18653cf_new_cppflags=
18654cf_new_extra_cppflags=
18655
18656for cf_add_cflags in $cf_pkgconfig_incs
18657do
18658case "$cf_fix_cppflags" in
18659(no)
18660	case "$cf_add_cflags" in
18661	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18662		case "$cf_add_cflags" in
18663		(-D*)
18664			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18665
18666			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18667				&& test -z "${cf_tst_cflags}" \
18668				&& cf_fix_cppflags=yes
18669
18670			if test "$cf_fix_cppflags" = yes ; then
18671
18672	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18673	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18674
18675				continue
18676			elif test "${cf_tst_cflags}" = "\"'" ; then
18677
18678	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18679	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18680
18681				continue
18682			fi
18683			;;
18684		esac
18685		case "$CPPFLAGS" in
18686		(*$cf_add_cflags)
18687			;;
18688		(*)
18689			case "$cf_add_cflags" in
18690			(-D*)
18691				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18692
18693CPPFLAGS=`echo "$CPPFLAGS" | \
18694	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18695		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18696
18697				;;
18698			esac
18699
18700	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18701	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18702
18703			;;
18704		esac
18705		;;
18706	(*)
18707
18708	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18709	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18710
18711		;;
18712	esac
18713	;;
18714(yes)
18715
18716	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18717	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18718
18719	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18720
18721	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18722		&& test -z "${cf_tst_cflags}" \
18723		&& cf_fix_cppflags=no
18724	;;
18725esac
18726done
18727
18728if test -n "$cf_new_cflags" ; then
18729
18730	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18731	CFLAGS="${CFLAGS}$cf_new_cflags"
18732
18733fi
18734
18735if test -n "$cf_new_cppflags" ; then
18736
18737	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18738	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18739
18740fi
18741
18742if test -n "$cf_new_extra_cppflags" ; then
18743
18744	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18745	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18746
18747fi
18748
18749cf_add_libs="$LIBS"
18750# reverse order
18751cf_add_0lib=
18752for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18753# filter duplicates
18754for cf_add_1lib in $cf_add_0lib; do
18755	for cf_add_2lib in $cf_add_libs; do
18756		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18757			cf_add_1lib=
18758			break
18759		fi
18760	done
18761	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18762done
18763LIBS="$cf_add_libs"
18764
18765	:
18766else
18767	cf_pkgconfig_incs=
18768	cf_pkgconfig_libs=
18769
18770	echo "$as_me:18770: checking for XextCreateExtension in -lXext" >&5
18771echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
18772if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
18773  echo $ECHO_N "(cached) $ECHO_C" >&6
18774else
18775  ac_check_lib_save_LIBS=$LIBS
18776LIBS="-lXext  $LIBS"
18777cat >"conftest.$ac_ext" <<_ACEOF
18778#line 18778 "configure"
18779#include "confdefs.h"
18780
18781/* Override any gcc2 internal prototype to avoid an error.  */
18782#ifdef __cplusplus
18783extern "C"
18784#endif
18785/* We use char because int might match the return type of a gcc2
18786   builtin and then its argument prototype would still apply.  */
18787char XextCreateExtension ();
18788int
18789main (void)
18790{
18791XextCreateExtension ();
18792  ;
18793  return 0;
18794}
18795_ACEOF
18796rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18797if { (eval echo "$as_me:18797: \"$ac_link\"") >&5
18798  (eval $ac_link) 2>&5
18799  ac_status=$?
18800  echo "$as_me:18800: \$? = $ac_status" >&5
18801  (exit "$ac_status"); } &&
18802         { ac_try='test -s "conftest$ac_exeext"'
18803  { (eval echo "$as_me:18803: \"$ac_try\"") >&5
18804  (eval $ac_try) 2>&5
18805  ac_status=$?
18806  echo "$as_me:18806: \$? = $ac_status" >&5
18807  (exit "$ac_status"); }; }; then
18808  ac_cv_lib_Xext_XextCreateExtension=yes
18809else
18810  echo "$as_me: failed program was:" >&5
18811cat "conftest.$ac_ext" >&5
18812ac_cv_lib_Xext_XextCreateExtension=no
18813fi
18814rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18815LIBS=$ac_check_lib_save_LIBS
18816fi
18817echo "$as_me:18817: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
18818echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
18819if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
18820
18821cf_add_libs="$LIBS"
18822# reverse order
18823cf_add_0lib=
18824for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18825# filter duplicates
18826for cf_add_1lib in $cf_add_0lib; do
18827	for cf_add_2lib in $cf_add_libs; do
18828		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18829			cf_add_1lib=
18830			break
18831		fi
18832	done
18833	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18834done
18835LIBS="$cf_add_libs"
18836
18837fi
18838
18839fi
18840
18841echo "$as_me:18841: checking for X11/extensions/Xdbe.h" >&5
18842echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18843if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18844  echo $ECHO_N "(cached) $ECHO_C" >&6
18845else
18846  cat >"conftest.$ac_ext" <<_ACEOF
18847#line 18847 "configure"
18848#include "confdefs.h"
18849#include <X11/extensions/Xdbe.h>
18850_ACEOF
18851if { (eval echo "$as_me:18851: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18852  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18853  ac_status=$?
18854  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18855  rm -f conftest.er1
18856  cat conftest.err >&5
18857  echo "$as_me:18857: \$? = $ac_status" >&5
18858  (exit "$ac_status"); } >/dev/null; then
18859  if test -s conftest.err; then
18860    ac_cpp_err=$ac_c_preproc_warn_flag
18861  else
18862    ac_cpp_err=
18863  fi
18864else
18865  ac_cpp_err=yes
18866fi
18867if test -z "$ac_cpp_err"; then
18868  ac_cv_header_X11_extensions_Xdbe_h=yes
18869else
18870  echo "$as_me: failed program was:" >&5
18871  cat "conftest.$ac_ext" >&5
18872  ac_cv_header_X11_extensions_Xdbe_h=no
18873fi
18874rm -f conftest.err "conftest.$ac_ext"
18875fi
18876echo "$as_me:18876: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18877echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18878if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
18879
18880cat >>confdefs.h <<\EOF
18881#define HAVE_X11_EXTENSIONS_XDBE_H 1
18882EOF
18883
18884	echo "$as_me:18884: checking for XdbeSwapBuffers" >&5
18885echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
18886if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
18887  echo $ECHO_N "(cached) $ECHO_C" >&6
18888else
18889  cat >"conftest.$ac_ext" <<_ACEOF
18890#line 18890 "configure"
18891#include "confdefs.h"
18892#define XdbeSwapBuffers autoconf_temporary
18893#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18894#undef XdbeSwapBuffers
18895
18896#ifdef __cplusplus
18897extern "C"
18898#endif
18899
18900/* We use char because int might match the return type of a gcc2
18901   builtin and then its argument prototype would still apply.  */
18902char XdbeSwapBuffers (void);
18903
18904int
18905main (void)
18906{
18907
18908/* The GNU C library defines stubs for functions which it implements
18909    to always fail with ENOSYS.  Some functions are actually named
18910    something starting with __ and the normal name is an alias.  */
18911#if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
18912#error found stub for XdbeSwapBuffers
18913#endif
18914
18915	return XdbeSwapBuffers ();
18916  ;
18917  return 0;
18918}
18919_ACEOF
18920rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18921if { (eval echo "$as_me:18921: \"$ac_link\"") >&5
18922  (eval $ac_link) 2>&5
18923  ac_status=$?
18924  echo "$as_me:18924: \$? = $ac_status" >&5
18925  (exit "$ac_status"); } &&
18926         { ac_try='test -s "conftest$ac_exeext"'
18927  { (eval echo "$as_me:18927: \"$ac_try\"") >&5
18928  (eval $ac_try) 2>&5
18929  ac_status=$?
18930  echo "$as_me:18930: \$? = $ac_status" >&5
18931  (exit "$ac_status"); }; }; then
18932  ac_cv_func_XdbeSwapBuffers=yes
18933else
18934  echo "$as_me: failed program was:" >&5
18935cat "conftest.$ac_ext" >&5
18936ac_cv_func_XdbeSwapBuffers=no
18937fi
18938rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18939fi
18940echo "$as_me:18940: result: $ac_cv_func_XdbeSwapBuffers" >&5
18941echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
18942if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
18943
18944cat >>confdefs.h <<\EOF
18945#define HAVE_XDBESWAPBUFFERS 1
18946EOF
18947
18948				   cf_x_ext_double_buffer=yes
18949fi
18950
18951fi
18952
18953double_buffer=False
18954if test "$cf_x_ext_double_buffer" = yes ; then
18955	echo "$as_me:18955: checking if you want to enable double-buffering in default resources" >&5
18956echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
18957
18958# Check whether --enable-double-buffer or --disable-double-buffer was given.
18959if test "${enable_double_buffer+set}" = set; then
18960  enableval="$enable_double_buffer"
18961  test "$enableval" != yes && enableval=no
18962	if test "$enableval" != "no" ; then
18963    enable_double_bfr=yes
18964	else
18965		enable_double_bfr=no
18966	fi
18967else
18968  enableval=no
18969	enable_double_bfr=no
18970
18971fi;
18972	echo "$as_me:18972: result: $enable_double_bfr" >&5
18973echo "${ECHO_T}$enable_double_bfr" >&6
18974	if test "$enable_double_bfr" = yes ; then
18975
18976cat >>confdefs.h <<\EOF
18977#define OPT_DOUBLE_BUFFER 1
18978EOF
18979
18980		double_buffer=True
18981	fi
18982fi
18983
18984echo "$as_me:18984: checking if you want to use FreeType library" >&5
18985echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
18986
18987# Check whether --enable-freetype or --disable-freetype was given.
18988if test "${enable_freetype+set}" = set; then
18989  enableval="$enable_freetype"
18990  test "$enableval" != no && enableval=yes
18991	if test "$enableval" != "yes" ; then
18992    enable_freetype=no
18993	else
18994		enable_freetype=yes
18995	fi
18996else
18997  enableval=yes
18998	enable_freetype=yes
18999
19000fi;
19001echo "$as_me:19001: result: $enable_freetype" >&5
19002echo "${ECHO_T}$enable_freetype" >&6
19003if test "$enable_freetype" = yes ; then
19004
19005cf_cv_x_freetype_incs=no
19006cf_cv_x_freetype_libs=no
19007cf_extra_freetype_libs=
19008FREETYPE_CONFIG=none
19009FREETYPE_PARAMS=
19010
19011echo "$as_me:19011: checking for FreeType configuration script" >&5
19012echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
19013
19014# Check whether --with-freetype-config or --without-freetype-config was given.
19015if test "${with_freetype_config+set}" = set; then
19016  withval="$with_freetype_config"
19017  cf_cv_x_freetype_cfgs="$withval"
19018else
19019  cf_cv_x_freetype_cfgs=auto
19020fi;
19021test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
19022test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
19023echo "$as_me:19023: result: $cf_cv_x_freetype_cfgs" >&5
19024echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
19025
19026case $cf_cv_x_freetype_cfgs in
19027(none)
19028	echo "$as_me:19028: checking if you specified -D/-I options for FreeType" >&5
19029echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
19030
19031# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
19032if test "${with_freetype_cflags+set}" = set; then
19033  withval="$with_freetype_cflags"
19034  cf_cv_x_freetype_incs="$with_freetype_cflags"
19035else
19036  cf_cv_x_freetype_incs=no
19037fi;
19038	echo "$as_me:19038: result: $cf_cv_x_freetype_incs" >&5
19039echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19040
19041	echo "$as_me:19041: checking if you specified -L/-l options for FreeType" >&5
19042echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
19043
19044# Check whether --with-freetype-libs or --without-freetype-libs was given.
19045if test "${with_freetype_libs+set}" = set; then
19046  withval="$with_freetype_libs"
19047  cf_cv_x_freetype_libs="$with_freetype_libs"
19048else
19049  cf_cv_x_freetype_libs=no
19050fi;
19051	echo "$as_me:19051: result: $cf_cv_x_freetype_libs" >&5
19052echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19053	;;
19054(auto)
19055	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19056		FREETYPE_CONFIG=$PKG_CONFIG
19057		FREETYPE_PARAMS=xft
19058	else
19059		# Extract the first word of "freetype-config", so it can be a program name with args.
19060set dummy freetype-config; ac_word=$2
19061echo "$as_me:19061: checking for $ac_word" >&5
19062echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19063if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
19064  echo $ECHO_N "(cached) $ECHO_C" >&6
19065else
19066  case $FREETYPE_CONFIG in
19067  [\\/]* | ?:[\\/]*)
19068  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
19069  ;;
19070  *)
19071  ac_save_IFS=$IFS; IFS=$ac_path_separator
19072ac_dummy="$PATH"
19073for ac_dir in $ac_dummy; do
19074  IFS=$ac_save_IFS
19075  test -z "$ac_dir" && ac_dir=.
19076  if $as_executable_p "$ac_dir/$ac_word"; then
19077   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
19078   echo "$as_me:19078: found $ac_dir/$ac_word" >&5
19079   break
19080fi
19081done
19082
19083  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
19084  ;;
19085esac
19086fi
19087FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
19088
19089if test -n "$FREETYPE_CONFIG"; then
19090  echo "$as_me:19090: result: $FREETYPE_CONFIG" >&5
19091echo "${ECHO_T}$FREETYPE_CONFIG" >&6
19092else
19093  echo "$as_me:19093: result: no" >&5
19094echo "${ECHO_T}no" >&6
19095fi
19096
19097		if test "$FREETYPE_CONFIG" != none; then
19098			FREETYPE_CONFIG=$FREETYPE_CONFIG
19099			cf_extra_freetype_libs="-lXft"
19100		else
19101			# Extract the first word of "xft-config", so it can be a program name with args.
19102set dummy xft-config; ac_word=$2
19103echo "$as_me:19103: checking for $ac_word" >&5
19104echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19105if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
19106  echo $ECHO_N "(cached) $ECHO_C" >&6
19107else
19108  case $FREETYPE_OLD_CONFIG in
19109  [\\/]* | ?:[\\/]*)
19110  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
19111  ;;
19112  *)
19113  ac_save_IFS=$IFS; IFS=$ac_path_separator
19114ac_dummy="$PATH"
19115for ac_dir in $ac_dummy; do
19116  IFS=$ac_save_IFS
19117  test -z "$ac_dir" && ac_dir=.
19118  if $as_executable_p "$ac_dir/$ac_word"; then
19119   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19120   echo "$as_me:19120: found $ac_dir/$ac_word" >&5
19121   break
19122fi
19123done
19124
19125  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19126  ;;
19127esac
19128fi
19129FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19130
19131if test -n "$FREETYPE_OLD_CONFIG"; then
19132  echo "$as_me:19132: result: $FREETYPE_OLD_CONFIG" >&5
19133echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19134else
19135  echo "$as_me:19135: result: no" >&5
19136echo "${ECHO_T}no" >&6
19137fi
19138
19139			if test "$FREETYPE_OLD_CONFIG" != none; then
19140				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19141			fi
19142		fi
19143	fi
19144	;;
19145(pkg*)
19146	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19147		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19148		FREETYPE_PARAMS=xft
19149	else
19150		{ echo "$as_me:19150: WARNING: cannot find pkg-config for Xft" >&5
19151echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19152	fi
19153	;;
19154(*)
19155	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19156set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19157echo "$as_me:19157: checking for $ac_word" >&5
19158echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19159if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19160  echo $ECHO_N "(cached) $ECHO_C" >&6
19161else
19162  case $FREETYPE_XFT_CONFIG in
19163  [\\/]* | ?:[\\/]*)
19164  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19165  ;;
19166  *)
19167  ac_save_IFS=$IFS; IFS=$ac_path_separator
19168ac_dummy="$PATH"
19169for ac_dir in $ac_dummy; do
19170  IFS=$ac_save_IFS
19171  test -z "$ac_dir" && ac_dir=.
19172  if $as_executable_p "$ac_dir/$ac_word"; then
19173   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19174   echo "$as_me:19174: found $ac_dir/$ac_word" >&5
19175   break
19176fi
19177done
19178
19179  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19180  ;;
19181esac
19182fi
19183FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19184
19185if test -n "$FREETYPE_XFT_CONFIG"; then
19186  echo "$as_me:19186: result: $FREETYPE_XFT_CONFIG" >&5
19187echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19188else
19189  echo "$as_me:19189: result: no" >&5
19190echo "${ECHO_T}no" >&6
19191fi
19192
19193	if test "$FREETYPE_XFT_CONFIG" != none; then
19194		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
19195	else
19196		{ echo "$as_me:19196: WARNING: cannot find config script for Xft" >&5
19197echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
19198	fi
19199	;;
19200esac
19201
19202if test "$FREETYPE_CONFIG" != none ; then
19203	echo "$as_me:19203: checking for FreeType config" >&5
19204echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
19205	echo "$as_me:19205: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
19206echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
19207
19208	if test "$cf_cv_x_freetype_incs" = no ; then
19209		echo "$as_me:19209: checking for $FREETYPE_CONFIG cflags" >&5
19210echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
19211		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
19212		echo "$as_me:19212: result: $cf_cv_x_freetype_incs" >&5
19213echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19214	fi
19215
19216	if test "$cf_cv_x_freetype_libs" = no ; then
19217		echo "$as_me:19217: checking for $FREETYPE_CONFIG libs" >&5
19218echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
19219		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
19220		echo "$as_me:19220: result: $cf_cv_x_freetype_libs" >&5
19221echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19222	fi
19223fi
19224
19225if test "$cf_cv_x_freetype_incs" = no ; then
19226	cf_cv_x_freetype_incs=
19227fi
19228
19229if test "$cf_cv_x_freetype_libs" = no ; then
19230	cf_cv_x_freetype_libs=-lXft
19231fi
19232
19233echo "$as_me:19233: checking if we can link with FreeType libraries" >&5
19234echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
19235
19236cf_save_LIBS="$LIBS"
19237cf_save_INCS="$CPPFLAGS"
19238
19239cf_add_libs="$LIBS"
19240# reverse order
19241cf_add_0lib=
19242for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19243# filter duplicates
19244for cf_add_1lib in $cf_add_0lib; do
19245	for cf_add_2lib in $cf_add_libs; do
19246		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19247			cf_add_1lib=
19248			break
19249		fi
19250	done
19251	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19252done
19253LIBS="$cf_add_libs"
19254
19255CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
19256
19257cat >"conftest.$ac_ext" <<_ACEOF
19258#line 19258 "configure"
19259#include "confdefs.h"
19260
19261#include <X11/Xlib.h>
19262#include <X11/extensions/Xrender.h>
19263#include <X11/Xft/Xft.h>
19264int
19265main (void)
19266{
19267
19268	XftPattern  *pat = XftNameParse ("name"); (void)pat
19269  ;
19270  return 0;
19271}
19272_ACEOF
19273rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19274if { (eval echo "$as_me:19274: \"$ac_link\"") >&5
19275  (eval $ac_link) 2>&5
19276  ac_status=$?
19277  echo "$as_me:19277: \$? = $ac_status" >&5
19278  (exit "$ac_status"); } &&
19279         { ac_try='test -s "conftest$ac_exeext"'
19280  { (eval echo "$as_me:19280: \"$ac_try\"") >&5
19281  (eval $ac_try) 2>&5
19282  ac_status=$?
19283  echo "$as_me:19283: \$? = $ac_status" >&5
19284  (exit "$ac_status"); }; }; then
19285  cf_cv_found_freetype=yes
19286else
19287  echo "$as_me: failed program was:" >&5
19288cat "conftest.$ac_ext" >&5
19289cf_cv_found_freetype=no
19290fi
19291rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19292echo "$as_me:19292: result: $cf_cv_found_freetype" >&5
19293echo "${ECHO_T}$cf_cv_found_freetype" >&6
19294
19295LIBS="$cf_save_LIBS"
19296CPPFLAGS="$cf_save_INCS"
19297
19298if test "$cf_cv_found_freetype" = yes ; then
19299
19300cf_add_libs="$LIBS"
19301# reverse order
19302cf_add_0lib=
19303for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19304# filter duplicates
19305for cf_add_1lib in $cf_add_0lib; do
19306	for cf_add_2lib in $cf_add_libs; do
19307		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19308			cf_add_1lib=
19309			break
19310		fi
19311	done
19312	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19313done
19314LIBS="$cf_add_libs"
19315
19316cf_fix_cppflags=no
19317cf_new_cflags=
19318cf_new_cppflags=
19319cf_new_extra_cppflags=
19320
19321for cf_add_cflags in $cf_cv_x_freetype_incs
19322do
19323case "$cf_fix_cppflags" in
19324(no)
19325	case "$cf_add_cflags" in
19326	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19327		case "$cf_add_cflags" in
19328		(-D*)
19329			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19330
19331			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19332				&& test -z "${cf_tst_cflags}" \
19333				&& cf_fix_cppflags=yes
19334
19335			if test "$cf_fix_cppflags" = yes ; then
19336
19337	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19338	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19339
19340				continue
19341			elif test "${cf_tst_cflags}" = "\"'" ; then
19342
19343	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19344	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19345
19346				continue
19347			fi
19348			;;
19349		esac
19350		case "$CPPFLAGS" in
19351		(*$cf_add_cflags)
19352			;;
19353		(*)
19354			case "$cf_add_cflags" in
19355			(-D*)
19356				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19357
19358CPPFLAGS=`echo "$CPPFLAGS" | \
19359	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19360		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19361
19362				;;
19363			esac
19364
19365	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19366	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19367
19368			;;
19369		esac
19370		;;
19371	(*)
19372
19373	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19374	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19375
19376		;;
19377	esac
19378	;;
19379(yes)
19380
19381	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19382	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19383
19384	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19385
19386	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19387		&& test -z "${cf_tst_cflags}" \
19388		&& cf_fix_cppflags=no
19389	;;
19390esac
19391done
19392
19393if test -n "$cf_new_cflags" ; then
19394
19395	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19396	CFLAGS="${CFLAGS}$cf_new_cflags"
19397
19398fi
19399
19400if test -n "$cf_new_cppflags" ; then
19401
19402	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19403	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19404
19405fi
19406
19407if test -n "$cf_new_extra_cppflags" ; then
19408
19409	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19410	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19411
19412fi
19413
19414cat >>confdefs.h <<\EOF
19415#define XRENDERFONT 1
19416EOF
19417
19418for ac_func in \
19419	XftDrawCharSpec \
19420	XftDrawSetClip \
19421	XftDrawSetClipRectangles \
19422
19423do
19424as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19425echo "$as_me:19425: checking for $ac_func" >&5
19426echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19427if eval "test \"\${$as_ac_var+set}\" = set"; then
19428  echo $ECHO_N "(cached) $ECHO_C" >&6
19429else
19430  cat >"conftest.$ac_ext" <<_ACEOF
19431#line 19431 "configure"
19432#include "confdefs.h"
19433#define $ac_func autoconf_temporary
19434#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19435#undef $ac_func
19436
19437#ifdef __cplusplus
19438extern "C"
19439#endif
19440
19441/* We use char because int might match the return type of a gcc2
19442   builtin and then its argument prototype would still apply.  */
19443char $ac_func (void);
19444
19445int
19446main (void)
19447{
19448
19449/* The GNU C library defines stubs for functions which it implements
19450    to always fail with ENOSYS.  Some functions are actually named
19451    something starting with __ and the normal name is an alias.  */
19452#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19453#error found stub for $ac_func
19454#endif
19455
19456	return $ac_func ();
19457  ;
19458  return 0;
19459}
19460_ACEOF
19461rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19462if { (eval echo "$as_me:19462: \"$ac_link\"") >&5
19463  (eval $ac_link) 2>&5
19464  ac_status=$?
19465  echo "$as_me:19465: \$? = $ac_status" >&5
19466  (exit "$ac_status"); } &&
19467         { ac_try='test -s "conftest$ac_exeext"'
19468  { (eval echo "$as_me:19468: \"$ac_try\"") >&5
19469  (eval $ac_try) 2>&5
19470  ac_status=$?
19471  echo "$as_me:19471: \$? = $ac_status" >&5
19472  (exit "$ac_status"); }; }; then
19473  eval "$as_ac_var=yes"
19474else
19475  echo "$as_me: failed program was:" >&5
19476cat "conftest.$ac_ext" >&5
19477eval "$as_ac_var=no"
19478fi
19479rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19480fi
19481echo "$as_me:19481: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19482echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19483if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19484  cat >>confdefs.h <<EOF
19485#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19486EOF
19487
19488fi
19489done
19490
19491else
19492	{ echo "$as_me:19492: WARNING: No libraries found for FreeType" >&5
19493echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
19494	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19495fi
19496
19497# FIXME: revisit this if needed
19498
19499if test "$cf_cv_found_freetype" = yes ; then
19500echo "$as_me:19500: checking for usable Xft/fontconfig package" >&5
19501echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
19502if test "${cf_cv_xft_compat+set}" = set; then
19503  echo $ECHO_N "(cached) $ECHO_C" >&6
19504else
19505
19506cat >"conftest.$ac_ext" <<_ACEOF
19507#line 19507 "configure"
19508#include "confdefs.h"
19509
19510#include <X11/Xft/Xft.h>
19511
19512int
19513main (void)
19514{
19515
19516	XftPattern *pat = 0;
19517	XftPatternBuild(pat,
19518					XFT_FAMILY, XftTypeString, "mono",
19519					(void *) 0);
19520
19521  ;
19522  return 0;
19523}
19524_ACEOF
19525rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19526if { (eval echo "$as_me:19526: \"$ac_link\"") >&5
19527  (eval $ac_link) 2>&5
19528  ac_status=$?
19529  echo "$as_me:19529: \$? = $ac_status" >&5
19530  (exit "$ac_status"); } &&
19531         { ac_try='test -s "conftest$ac_exeext"'
19532  { (eval echo "$as_me:19532: \"$ac_try\"") >&5
19533  (eval $ac_try) 2>&5
19534  ac_status=$?
19535  echo "$as_me:19535: \$? = $ac_status" >&5
19536  (exit "$ac_status"); }; }; then
19537  cf_cv_xft_compat=yes
19538else
19539  echo "$as_me: failed program was:" >&5
19540cat "conftest.$ac_ext" >&5
19541cf_cv_xft_compat=no
19542fi
19543rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19544
19545fi
19546echo "$as_me:19546: result: $cf_cv_xft_compat" >&5
19547echo "${ECHO_T}$cf_cv_xft_compat" >&6
19548
19549if test "$cf_cv_xft_compat" = no
19550then
19551	# workaround for broken ".pc" files used for Xft.
19552	case "$cf_cv_x_freetype_libs" in
19553	(*-lfontconfig*)
19554		;;
19555	(*)
19556		test -n "$verbose" && echo "	work around broken package" 1>&6
19557
19558echo "${as_me:-configure}:19558: testing work around broken package ..." 1>&5
19559
19560		cf_save_fontconfig="$LIBS"
19561
19562if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
19563	test -n "$verbose" && echo "	found package fontconfig" 1>&6
19564
19565echo "${as_me:-configure}:19565: testing found package fontconfig ..." 1>&5
19566
19567	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
19568	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "fontconfig" 2>/dev/null`"
19569	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
19570
19571echo "${as_me:-configure}:19571: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19572
19573	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
19574
19575echo "${as_me:-configure}:19575: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
19576
19577cf_fix_cppflags=no
19578cf_new_cflags=
19579cf_new_cppflags=
19580cf_new_extra_cppflags=
19581
19582for cf_add_cflags in $cf_pkgconfig_incs
19583do
19584case "$cf_fix_cppflags" in
19585(no)
19586	case "$cf_add_cflags" in
19587	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19588		case "$cf_add_cflags" in
19589		(-D*)
19590			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19591
19592			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19593				&& test -z "${cf_tst_cflags}" \
19594				&& cf_fix_cppflags=yes
19595
19596			if test "$cf_fix_cppflags" = yes ; then
19597
19598	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19599	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19600
19601				continue
19602			elif test "${cf_tst_cflags}" = "\"'" ; then
19603
19604	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19605	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19606
19607				continue
19608			fi
19609			;;
19610		esac
19611		case "$CPPFLAGS" in
19612		(*$cf_add_cflags)
19613			;;
19614		(*)
19615			case "$cf_add_cflags" in
19616			(-D*)
19617				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19618
19619CPPFLAGS=`echo "$CPPFLAGS" | \
19620	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19621		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19622
19623				;;
19624			esac
19625
19626	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19627	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19628
19629			;;
19630		esac
19631		;;
19632	(*)
19633
19634	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19635	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19636
19637		;;
19638	esac
19639	;;
19640(yes)
19641
19642	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19643	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19644
19645	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19646
19647	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19648		&& test -z "${cf_tst_cflags}" \
19649		&& cf_fix_cppflags=no
19650	;;
19651esac
19652done
19653
19654if test -n "$cf_new_cflags" ; then
19655
19656	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19657	CFLAGS="${CFLAGS}$cf_new_cflags"
19658
19659fi
19660
19661if test -n "$cf_new_cppflags" ; then
19662
19663	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19664	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19665
19666fi
19667
19668if test -n "$cf_new_extra_cppflags" ; then
19669
19670	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19671	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19672
19673fi
19674
19675cf_add_libs="$LIBS"
19676# reverse order
19677cf_add_0lib=
19678for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19679# filter duplicates
19680for cf_add_1lib in $cf_add_0lib; do
19681	for cf_add_2lib in $cf_add_libs; do
19682		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19683			cf_add_1lib=
19684			break
19685		fi
19686	done
19687	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19688done
19689LIBS="$cf_add_libs"
19690
19691cf_fix_cppflags=no
19692cf_new_cflags=
19693cf_new_cppflags=
19694cf_new_extra_cppflags=
19695
19696for cf_add_cflags in $cf_pkgconfig_incs
19697do
19698case "$cf_fix_cppflags" in
19699(no)
19700	case "$cf_add_cflags" in
19701	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19702		case "$cf_add_cflags" in
19703		(-D*)
19704			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19705
19706			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19707				&& test -z "${cf_tst_cflags}" \
19708				&& cf_fix_cppflags=yes
19709
19710			if test "$cf_fix_cppflags" = yes ; then
19711
19712	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19713	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19714
19715				continue
19716			elif test "${cf_tst_cflags}" = "\"'" ; then
19717
19718	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19719	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19720
19721				continue
19722			fi
19723			;;
19724		esac
19725		case "$CPPFLAGS" in
19726		(*$cf_add_cflags)
19727			;;
19728		(*)
19729			case "$cf_add_cflags" in
19730			(-D*)
19731				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19732
19733CPPFLAGS=`echo "$CPPFLAGS" | \
19734	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19735		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19736
19737				;;
19738			esac
19739
19740	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19741	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19742
19743			;;
19744		esac
19745		;;
19746	(*)
19747
19748	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19749	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19750
19751		;;
19752	esac
19753	;;
19754(yes)
19755
19756	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19757	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19758
19759	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19760
19761	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19762		&& test -z "${cf_tst_cflags}" \
19763		&& cf_fix_cppflags=no
19764	;;
19765esac
19766done
19767
19768if test -n "$cf_new_cflags" ; then
19769
19770	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19771	CFLAGS="${CFLAGS}$cf_new_cflags"
19772
19773fi
19774
19775if test -n "$cf_new_cppflags" ; then
19776
19777	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19778	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19779
19780fi
19781
19782if test -n "$cf_new_extra_cppflags" ; then
19783
19784	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19785	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19786
19787fi
19788
19789				LIBS="$cf_save_fontconfig"
19790
19791test -n "$verbose" && echo "	...before $LIBS" 1>&6
19792
19793echo "${as_me:-configure}:19793: testing ...before $LIBS ..." 1>&5
19794
19795LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
19796test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19797
19798echo "${as_me:-configure}:19798: testing ...after  $LIBS ..." 1>&5
19799
19800else
19801	cf_pkgconfig_incs=
19802	cf_pkgconfig_libs=
19803
19804test -n "$verbose" && echo "	...before $LIBS" 1>&6
19805
19806echo "${as_me:-configure}:19806: testing ...before $LIBS ..." 1>&5
19807
19808LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
19809test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19810
19811echo "${as_me:-configure}:19811: testing ...after  $LIBS ..." 1>&5
19812
19813fi
19814
19815		;;
19816	esac
19817fi
19818fi
19819
19820else
19821	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19822fi
19823
19824echo "$as_me:19824: checking if you want support for HP-style function keys" >&5
19825echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
19826
19827# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
19828if test "${enable_hp_fkeys+set}" = set; then
19829  enableval="$enable_hp_fkeys"
19830  test "$enableval" != yes && enableval=no
19831	if test "$enableval" != "no" ; then
19832    enable_hp_fkeys=yes
19833	else
19834		enable_hp_fkeys=no
19835	fi
19836else
19837  enableval=no
19838	enable_hp_fkeys=no
19839
19840fi;
19841echo "$as_me:19841: result: $enable_hp_fkeys" >&5
19842echo "${ECHO_T}$enable_hp_fkeys" >&6
19843if test "$enable_hp_fkeys" = yes ; then
19844
19845cat >>confdefs.h <<\EOF
19846#define OPT_HP_FUNC_KEYS 1
19847EOF
19848
19849fi
19850
19851echo "$as_me:19851: checking if you want support for SCO-style function keys" >&5
19852echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
19853
19854# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
19855if test "${enable_sco_fkeys+set}" = set; then
19856  enableval="$enable_sco_fkeys"
19857  test "$enableval" != yes && enableval=no
19858	if test "$enableval" != "no" ; then
19859    enable_sco_fkeys=yes
19860	else
19861		enable_sco_fkeys=no
19862	fi
19863else
19864  enableval=no
19865	enable_sco_fkeys=no
19866
19867fi;
19868echo "$as_me:19868: result: $enable_sco_fkeys" >&5
19869echo "${ECHO_T}$enable_sco_fkeys" >&6
19870if test "$enable_sco_fkeys" = yes ; then
19871
19872cat >>confdefs.h <<\EOF
19873#define OPT_SCO_FUNC_KEYS 1
19874EOF
19875
19876fi
19877
19878echo "$as_me:19878: checking if you want support for Sun-style function keys" >&5
19879echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
19880
19881# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
19882if test "${enable_sun_fkeys+set}" = set; then
19883  enableval="$enable_sun_fkeys"
19884  test "$enableval" != no && enableval=yes
19885	if test "$enableval" != "yes" ; then
19886    enable_sun_fkeys=no
19887	else
19888		enable_sun_fkeys=yes
19889	fi
19890else
19891  enableval=yes
19892	enable_sun_fkeys=yes
19893
19894fi;
19895echo "$as_me:19895: result: $enable_sun_fkeys" >&5
19896echo "${ECHO_T}$enable_sun_fkeys" >&6
19897if test "$enable_sun_fkeys" = no ; then
19898
19899cat >>confdefs.h <<\EOF
19900#define OPT_SUN_FUNC_KEYS 0
19901EOF
19902
19903fi
19904
19905echo "$as_me:19905: checking if you want saved-lines stored as a FIFO" >&5
19906echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
19907
19908# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
19909if test "${enable_fifo_lines+set}" = set; then
19910  enableval="$enable_fifo_lines"
19911  test "$enableval" != no && enableval=yes
19912	if test "$enableval" != "yes" ; then
19913    enable_fifo_lines=no
19914	else
19915		enable_fifo_lines=yes
19916	fi
19917else
19918  enableval=yes
19919	enable_fifo_lines=yes
19920
19921fi;
19922echo "$as_me:19922: result: $enable_fifo_lines" >&5
19923echo "${ECHO_T}$enable_fifo_lines" >&6
19924if test "$enable_fifo_lines" != yes ; then
19925	{ echo "$as_me:19925: WARNING: this option has been deprecated" >&5
19926echo "$as_me: WARNING: this option has been deprecated" >&2;}
19927fi
19928
19929echo "$as_me:19929: checking if you want support for internationalization" >&5
19930echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
19931
19932# Check whether --enable-i18n or --disable-i18n was given.
19933if test "${enable_i18n+set}" = set; then
19934  enableval="$enable_i18n"
19935  test "$enableval" != no && enableval=yes
19936	if test "$enableval" != "yes" ; then
19937    enable_i18n=no
19938	else
19939		enable_i18n=yes
19940	fi
19941else
19942  enableval=yes
19943	enable_i18n=yes
19944
19945fi;
19946echo "$as_me:19946: result: $enable_i18n" >&5
19947echo "${ECHO_T}$enable_i18n" >&6
19948if test "$enable_i18n" = no ; then
19949
19950cat >>confdefs.h <<\EOF
19951#define OPT_I18N_SUPPORT 0
19952EOF
19953
19954fi
19955
19956echo "$as_me:19956: checking if you want support for initial-erase setup" >&5
19957echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
19958
19959# Check whether --enable-initial-erase or --disable-initial-erase was given.
19960if test "${enable_initial_erase+set}" = set; then
19961  enableval="$enable_initial_erase"
19962  test "$enableval" != no && enableval=yes
19963	if test "$enableval" != "yes" ; then
19964    enable_ie=no
19965	else
19966		enable_ie=yes
19967	fi
19968else
19969  enableval=yes
19970	enable_ie=yes
19971
19972fi;
19973echo "$as_me:19973: result: $enable_ie" >&5
19974echo "${ECHO_T}$enable_ie" >&6
19975if test "$enable_ie" = no ; then
19976
19977cat >>confdefs.h <<\EOF
19978#define OPT_INITIAL_ERASE 0
19979EOF
19980
19981fi
19982
19983echo "$as_me:19983: checking if you want support for input-method" >&5
19984echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
19985
19986# Check whether --enable-input-method or --disable-input-method was given.
19987if test "${enable_input_method+set}" = set; then
19988  enableval="$enable_input_method"
19989  test "$enableval" != no && enableval=yes
19990	if test "$enableval" != "yes" ; then
19991    enable_ximp=no
19992	else
19993		enable_ximp=$enable_i18n
19994	fi
19995else
19996  enableval=yes
19997	enable_ximp=$enable_i18n
19998
19999fi;
20000echo "$as_me:20000: result: $enable_ximp" >&5
20001echo "${ECHO_T}$enable_ximp" >&6
20002
20003echo "$as_me:20003: checking if X libraries support input-method" >&5
20004echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
20005if test "${cf_cv_input_method+set}" = set; then
20006  echo $ECHO_N "(cached) $ECHO_C" >&6
20007else
20008
20009cat >"conftest.$ac_ext" <<_ACEOF
20010#line 20010 "configure"
20011#include "confdefs.h"
20012
20013#include <X11/IntrinsicP.h>
20014#include <X11/Xatom.h>
20015#include <X11/Xutil.h>
20016#include <X11/Xmu/Atoms.h>
20017#include <X11/Xmu/Converters.h>
20018#include <X11/Xaw/XawImP.h>
20019
20020int
20021main (void)
20022{
20023
20024{
20025	XIM xim;
20026	XIMStyles *xim_styles = 0;
20027	XIMStyle input_style;
20028	Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);
20029
20030	XSetLocaleModifiers("@im=none");
20031	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
20032	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
20033	XCloseIM(xim);
20034	input_style = (XIMPreeditNothing | XIMStatusNothing);
20035	(void)xim_styles;
20036	(void)input_style;
20037}
20038
20039  ;
20040  return 0;
20041}
20042_ACEOF
20043rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20044if { (eval echo "$as_me:20044: \"$ac_link\"") >&5
20045  (eval $ac_link) 2>&5
20046  ac_status=$?
20047  echo "$as_me:20047: \$? = $ac_status" >&5
20048  (exit "$ac_status"); } &&
20049         { ac_try='test -s "conftest$ac_exeext"'
20050  { (eval echo "$as_me:20050: \"$ac_try\"") >&5
20051  (eval $ac_try) 2>&5
20052  ac_status=$?
20053  echo "$as_me:20053: \$? = $ac_status" >&5
20054  (exit "$ac_status"); }; }; then
20055  cf_cv_input_method=yes
20056else
20057  echo "$as_me: failed program was:" >&5
20058cat "conftest.$ac_ext" >&5
20059cf_cv_input_method=no
20060fi
20061rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20062fi
20063echo "$as_me:20063: result: $cf_cv_input_method" >&5
20064echo "${ECHO_T}$cf_cv_input_method" >&6
20065
20066test "$cf_cv_input_method" = no && enable_ximp=no
20067if test "$enable_ximp" != no ; then
20068	if test "$enable_i18n" = no ; then
20069		{ echo "$as_me:20069: WARNING: input-methor relies upon internationalization" >&5
20070echo "$as_me: WARNING: input-methor relies upon internationalization" >&2;}
20071		enable_ximp=no
20072	fi
20073fi
20074if test "$enable_ximp" = no ; then
20075
20076cat >>confdefs.h <<\EOF
20077#define OPT_INPUT_METHOD 0
20078EOF
20079
20080fi
20081
20082echo "$as_me:20082: checking if you want support for load-vt-fonts" >&5
20083echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
20084
20085# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
20086if test "${enable_load_vt_fonts+set}" = set; then
20087  enableval="$enable_load_vt_fonts"
20088  test "$enableval" != yes && enableval=no
20089	if test "$enableval" != "no" ; then
20090    enable_load_vt_fonts=yes
20091	else
20092		enable_load_vt_fonts=no
20093	fi
20094else
20095  enableval=no
20096	enable_load_vt_fonts=no
20097
20098fi;
20099echo "$as_me:20099: result: $enable_load_vt_fonts" >&5
20100echo "${ECHO_T}$enable_load_vt_fonts" >&6
20101if test "$enable_load_vt_fonts" = yes ; then
20102
20103cat >>confdefs.h <<\EOF
20104#define OPT_LOAD_VTFONTS 1
20105EOF
20106
20107fi
20108
20109echo "$as_me:20109: checking if you want support for logging" >&5
20110echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20111
20112# Check whether --enable-logging or --disable-logging was given.
20113if test "${enable_logging+set}" = set; then
20114  enableval="$enable_logging"
20115  test "$enableval" != yes && enableval=no
20116	if test "$enableval" != "no" ; then
20117    enable_logging=yes
20118	else
20119		enable_logging=no
20120	fi
20121else
20122  enableval=no
20123	enable_logging=no
20124
20125fi;
20126echo "$as_me:20126: result: $enable_logging" >&5
20127echo "${ECHO_T}$enable_logging" >&6
20128if test "$enable_logging" = yes ; then
20129
20130cat >>confdefs.h <<\EOF
20131#define ALLOWLOGGING 1
20132EOF
20133
20134	echo "$as_me:20134: checking if you want to allow logging via a pipe" >&5
20135echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20136
20137# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20138if test "${enable_logfile_exec+set}" = set; then
20139  enableval="$enable_logfile_exec"
20140  test "$enableval" != yes && enableval=no
20141	if test "$enableval" != "no" ; then
20142    enable_log_exec=yes
20143	else
20144		enable_log_exec=no
20145	fi
20146else
20147  enableval=no
20148	enable_log_exec=no
20149
20150fi;
20151	echo "$as_me:20151: result: $enable_log_exec" >&5
20152echo "${ECHO_T}$enable_log_exec" >&6
20153	if test "$enable_log_exec" = yes ; then
20154
20155cat >>confdefs.h <<\EOF
20156#define ALLOWLOGFILEEXEC 1
20157EOF
20158
20159	fi
20160fi
20161
20162echo "$as_me:20162: checking if you want support for iconify/maximize translations" >&5
20163echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20164
20165# Check whether --enable-maximize or --disable-maximize was given.
20166if test "${enable_maximize+set}" = set; then
20167  enableval="$enable_maximize"
20168  test "$enableval" != no && enableval=yes
20169	if test "$enableval" != "yes" ; then
20170    enable_maximize=no
20171	else
20172		enable_maximize=yes
20173	fi
20174else
20175  enableval=yes
20176	enable_maximize=yes
20177
20178fi;
20179echo "$as_me:20179: result: $enable_maximize" >&5
20180echo "${ECHO_T}$enable_maximize" >&6
20181test "$enable_maximize" = no &&
20182cat >>confdefs.h <<\EOF
20183#define OPT_MAXIMIZE 0
20184EOF
20185
20186echo "$as_me:20186: checking if you want NumLock to override keyboard tables" >&5
20187echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20188
20189# Check whether --enable-num-lock or --disable-num-lock was given.
20190if test "${enable_num_lock+set}" = set; then
20191  enableval="$enable_num_lock"
20192  test "$enableval" != no && enableval=yes
20193	if test "$enableval" != "yes" ; then
20194    enable_numlock=no
20195	else
20196		enable_numlock=yes
20197	fi
20198else
20199  enableval=yes
20200	enable_numlock=yes
20201
20202fi;
20203echo "$as_me:20203: result: $enable_numlock" >&5
20204echo "${ECHO_T}$enable_numlock" >&6
20205test "$enable_numlock" = no &&
20206cat >>confdefs.h <<\EOF
20207#define OPT_NUM_LOCK 0
20208EOF
20209
20210echo "$as_me:20210: checking if you want support for get/set of base64 selection data" >&5
20211echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
20212
20213# Check whether --enable-paste64 or --disable-paste64 was given.
20214if test "${enable_paste64+set}" = set; then
20215  enableval="$enable_paste64"
20216  test "$enableval" != no && enableval=yes
20217	if test "$enableval" != "yes" ; then
20218    enable_paste64=no
20219	else
20220		enable_paste64=yes
20221	fi
20222else
20223  enableval=yes
20224	enable_paste64=yes
20225
20226fi;
20227echo "$as_me:20227: result: $enable_paste64" >&5
20228echo "${ECHO_T}$enable_paste64" >&6
20229if test "$enable_paste64" = yes ; then
20230
20231cat >>confdefs.h <<\EOF
20232#define OPT_PASTE64 1
20233EOF
20234
20235else
20236
20237cat >>confdefs.h <<\EOF
20238#define OPT_PASTE64 0
20239EOF
20240
20241fi
20242
20243echo "$as_me:20243: checking if you want support for pty-handshaking" >&5
20244echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
20245
20246# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
20247if test "${enable_pty_handshake+set}" = set; then
20248  enableval="$enable_pty_handshake"
20249  test "$enableval" != no && enableval=yes
20250	if test "$enableval" != "yes" ; then
20251    enable_pty_handshake=no
20252	else
20253		enable_pty_handshake=yes
20254	fi
20255else
20256  enableval=yes
20257	enable_pty_handshake=yes
20258
20259fi;
20260echo "$as_me:20260: result: $enable_pty_handshake" >&5
20261echo "${ECHO_T}$enable_pty_handshake" >&6
20262if test "$enable_pty_handshake" = yes ; then
20263
20264cat >>confdefs.h <<\EOF
20265#define OPT_PTY_HANDSHAKE 1
20266EOF
20267
20268else
20269
20270cat >>confdefs.h <<\EOF
20271#define OPT_PTY_HANDSHAKE 0
20272EOF
20273
20274fi
20275
20276echo "$as_me:20276: checking if you want support for mouse in readline applications" >&5
20277echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
20278
20279# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
20280if test "${enable_readline_mouse+set}" = set; then
20281  enableval="$enable_readline_mouse"
20282  test "$enableval" != yes && enableval=no
20283	if test "$enableval" != "no" ; then
20284    enable_readline_mouse=yes
20285	else
20286		enable_readline_mouse=no
20287	fi
20288else
20289  enableval=no
20290	enable_readline_mouse=no
20291
20292fi;
20293echo "$as_me:20293: result: $enable_readline_mouse" >&5
20294echo "${ECHO_T}$enable_readline_mouse" >&6
20295if test "$enable_readline_mouse" = yes ; then
20296
20297cat >>confdefs.h <<\EOF
20298#define OPT_READLINE 1
20299EOF
20300
20301fi
20302
20303echo "$as_me:20303: checking if you want support for regular-expression selections" >&5
20304echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
20305
20306# Check whether --enable-regex or --disable-regex was given.
20307if test "${enable_regex+set}" = set; then
20308  enableval="$enable_regex"
20309  test "$enableval" != no && enableval=yes
20310	if test "$enableval" != "yes" ; then
20311    enable_regex=no
20312	else
20313		enable_regex=yes
20314	fi
20315else
20316  enableval=yes
20317	enable_regex=yes
20318
20319fi;
20320echo "$as_me:20320: result: $enable_regex" >&5
20321echo "${ECHO_T}$enable_regex" >&6
20322if test "$enable_regex" = yes ; then
20323
20324echo "$as_me:20324: checking if you want to use PCRE2 for regular-expressions" >&5
20325echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
20326
20327# Check whether --with-pcre2 or --without-pcre2 was given.
20328if test "${with_pcre2+set}" = set; then
20329  withval="$with_pcre2"
20330
20331fi;
20332test -z "$with_pcre2" && with_pcre2=no
20333echo "$as_me:20333: result: $with_pcre2" >&5
20334echo "${ECHO_T}$with_pcre2" >&6
20335
20336if test "x$with_pcre2" != xno ; then
20337	cf_with_pcre2_ok=no
20338	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
20339	do
20340
20341if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
20342	test -n "$verbose" && echo "	found package $cf_with_pcre2" 1>&6
20343
20344echo "${as_me:-configure}:20344: testing found package $cf_with_pcre2 ..." 1>&5
20345
20346	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
20347	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
20348	test -n "$verbose" && echo "	package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
20349
20350echo "${as_me:-configure}:20350: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20351
20352	test -n "$verbose" && echo "	package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
20353
20354echo "${as_me:-configure}:20354: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
20355
20356cf_fix_cppflags=no
20357cf_new_cflags=
20358cf_new_cppflags=
20359cf_new_extra_cppflags=
20360
20361for cf_add_cflags in $cf_pkgconfig_incs
20362do
20363case "$cf_fix_cppflags" in
20364(no)
20365	case "$cf_add_cflags" in
20366	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20367		case "$cf_add_cflags" in
20368		(-D*)
20369			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20370
20371			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20372				&& test -z "${cf_tst_cflags}" \
20373				&& cf_fix_cppflags=yes
20374
20375			if test "$cf_fix_cppflags" = yes ; then
20376
20377	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20378	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20379
20380				continue
20381			elif test "${cf_tst_cflags}" = "\"'" ; then
20382
20383	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20384	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20385
20386				continue
20387			fi
20388			;;
20389		esac
20390		case "$CPPFLAGS" in
20391		(*$cf_add_cflags)
20392			;;
20393		(*)
20394			case "$cf_add_cflags" in
20395			(-D*)
20396				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20397
20398CPPFLAGS=`echo "$CPPFLAGS" | \
20399	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20400		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20401
20402				;;
20403			esac
20404
20405	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20406	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20407
20408			;;
20409		esac
20410		;;
20411	(*)
20412
20413	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20414	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20415
20416		;;
20417	esac
20418	;;
20419(yes)
20420
20421	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20422	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20423
20424	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20425
20426	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20427		&& test -z "${cf_tst_cflags}" \
20428		&& cf_fix_cppflags=no
20429	;;
20430esac
20431done
20432
20433if test -n "$cf_new_cflags" ; then
20434
20435	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20436	CFLAGS="${CFLAGS}$cf_new_cflags"
20437
20438fi
20439
20440if test -n "$cf_new_cppflags" ; then
20441
20442	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20443	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20444
20445fi
20446
20447if test -n "$cf_new_extra_cppflags" ; then
20448
20449	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20450	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20451
20452fi
20453
20454cf_add_libs="$LIBS"
20455# reverse order
20456cf_add_0lib=
20457for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20458# filter duplicates
20459for cf_add_1lib in $cf_add_0lib; do
20460	for cf_add_2lib in $cf_add_libs; do
20461		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20462			cf_add_1lib=
20463			break
20464		fi
20465	done
20466	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20467done
20468LIBS="$cf_add_libs"
20469
20470	cf_with_pcre2_ok=yes; break
20471else
20472	cf_pkgconfig_incs=
20473	cf_pkgconfig_libs=
20474	:
20475fi
20476
20477	done
20478	cf_with_pcre2_ok=yes || { { echo "$as_me:20478: error: Cannot find PCRE2 library" >&5
20479echo "$as_me: error: Cannot find PCRE2 library" >&2;}
20480   { (exit 1); exit 1; }; }
20481
20482cat >>confdefs.h <<\EOF
20483#define HAVE_LIB_PCRE2 1
20484EOF
20485
20486	# if pkgconfig gave no results, look for the libraries directly
20487	case "$LIBS" in
20488	(*pcre2-posix*|*pcreposix*)
20489		;;
20490	(*)
20491		echo "$as_me:20491: checking for regcomp in -lpcre2-posix" >&5
20492echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
20493if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
20494  echo $ECHO_N "(cached) $ECHO_C" >&6
20495else
20496  ac_check_lib_save_LIBS=$LIBS
20497LIBS="-lpcre2-posix  $LIBS"
20498cat >"conftest.$ac_ext" <<_ACEOF
20499#line 20499 "configure"
20500#include "confdefs.h"
20501
20502/* Override any gcc2 internal prototype to avoid an error.  */
20503#ifdef __cplusplus
20504extern "C"
20505#endif
20506/* We use char because int might match the return type of a gcc2
20507   builtin and then its argument prototype would still apply.  */
20508char regcomp ();
20509int
20510main (void)
20511{
20512regcomp ();
20513  ;
20514  return 0;
20515}
20516_ACEOF
20517rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20518if { (eval echo "$as_me:20518: \"$ac_link\"") >&5
20519  (eval $ac_link) 2>&5
20520  ac_status=$?
20521  echo "$as_me:20521: \$? = $ac_status" >&5
20522  (exit "$ac_status"); } &&
20523         { ac_try='test -s "conftest$ac_exeext"'
20524  { (eval echo "$as_me:20524: \"$ac_try\"") >&5
20525  (eval $ac_try) 2>&5
20526  ac_status=$?
20527  echo "$as_me:20527: \$? = $ac_status" >&5
20528  (exit "$ac_status"); }; }; then
20529  ac_cv_lib_pcre2_posix_regcomp=yes
20530else
20531  echo "$as_me: failed program was:" >&5
20532cat "conftest.$ac_ext" >&5
20533ac_cv_lib_pcre2_posix_regcomp=no
20534fi
20535rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20536LIBS=$ac_check_lib_save_LIBS
20537fi
20538echo "$as_me:20538: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
20539echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
20540if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
20541
20542cf_add_libs="$LIBS"
20543# reverse order
20544cf_add_0lib=
20545for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20546# filter duplicates
20547for cf_add_1lib in $cf_add_0lib; do
20548	for cf_add_2lib in $cf_add_libs; do
20549		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20550			cf_add_1lib=
20551			break
20552		fi
20553	done
20554	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20555done
20556LIBS="$cf_add_libs"
20557
20558else
20559  echo "$as_me:20559: checking for regcomp in -lpcreposix" >&5
20560echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20561if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20562  echo $ECHO_N "(cached) $ECHO_C" >&6
20563else
20564  ac_check_lib_save_LIBS=$LIBS
20565LIBS="-lpcreposix  $LIBS"
20566cat >"conftest.$ac_ext" <<_ACEOF
20567#line 20567 "configure"
20568#include "confdefs.h"
20569
20570/* Override any gcc2 internal prototype to avoid an error.  */
20571#ifdef __cplusplus
20572extern "C"
20573#endif
20574/* We use char because int might match the return type of a gcc2
20575   builtin and then its argument prototype would still apply.  */
20576char regcomp ();
20577int
20578main (void)
20579{
20580regcomp ();
20581  ;
20582  return 0;
20583}
20584_ACEOF
20585rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20586if { (eval echo "$as_me:20586: \"$ac_link\"") >&5
20587  (eval $ac_link) 2>&5
20588  ac_status=$?
20589  echo "$as_me:20589: \$? = $ac_status" >&5
20590  (exit "$ac_status"); } &&
20591         { ac_try='test -s "conftest$ac_exeext"'
20592  { (eval echo "$as_me:20592: \"$ac_try\"") >&5
20593  (eval $ac_try) 2>&5
20594  ac_status=$?
20595  echo "$as_me:20595: \$? = $ac_status" >&5
20596  (exit "$ac_status"); }; }; then
20597  ac_cv_lib_pcreposix_regcomp=yes
20598else
20599  echo "$as_me: failed program was:" >&5
20600cat "conftest.$ac_ext" >&5
20601ac_cv_lib_pcreposix_regcomp=no
20602fi
20603rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20604LIBS=$ac_check_lib_save_LIBS
20605fi
20606echo "$as_me:20606: result: $ac_cv_lib_pcreposix_regcomp" >&5
20607echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20608if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20609
20610cf_add_libs="$LIBS"
20611# reverse order
20612cf_add_0lib=
20613for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20614# filter duplicates
20615for cf_add_1lib in $cf_add_0lib; do
20616	for cf_add_2lib in $cf_add_libs; do
20617		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20618			cf_add_1lib=
20619			break
20620		fi
20621	done
20622	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20623done
20624LIBS="$cf_add_libs"
20625
20626else
20627  { { echo "$as_me:20627: error: Cannot find PCRE2 POSIX library" >&5
20628echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
20629   { (exit 1); exit 1; }; }
20630fi
20631
20632fi
20633
20634		;;
20635	esac
20636
20637	# either way, check for the library header files
20638
20639for ac_header in pcre2posix.h pcreposix.h
20640do
20641as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20642echo "$as_me:20642: checking for $ac_header" >&5
20643echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20644if eval "test \"\${$as_ac_Header+set}\" = set"; then
20645  echo $ECHO_N "(cached) $ECHO_C" >&6
20646else
20647  cat >"conftest.$ac_ext" <<_ACEOF
20648#line 20648 "configure"
20649#include "confdefs.h"
20650#include <$ac_header>
20651_ACEOF
20652if { (eval echo "$as_me:20652: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20653  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20654  ac_status=$?
20655  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20656  rm -f conftest.er1
20657  cat conftest.err >&5
20658  echo "$as_me:20658: \$? = $ac_status" >&5
20659  (exit "$ac_status"); } >/dev/null; then
20660  if test -s conftest.err; then
20661    ac_cpp_err=$ac_c_preproc_warn_flag
20662  else
20663    ac_cpp_err=
20664  fi
20665else
20666  ac_cpp_err=yes
20667fi
20668if test -z "$ac_cpp_err"; then
20669  eval "$as_ac_Header=yes"
20670else
20671  echo "$as_me: failed program was:" >&5
20672  cat "conftest.$ac_ext" >&5
20673  eval "$as_ac_Header=no"
20674fi
20675rm -f conftest.err "conftest.$ac_ext"
20676fi
20677echo "$as_me:20677: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20678echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20679if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20680  cat >>confdefs.h <<EOF
20681#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20682EOF
20683
20684fi
20685done
20686
20687for ac_func in PCRE2regcomp
20688do
20689as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20690echo "$as_me:20690: checking for $ac_func" >&5
20691echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20692if eval "test \"\${$as_ac_var+set}\" = set"; then
20693  echo $ECHO_N "(cached) $ECHO_C" >&6
20694else
20695  cat >"conftest.$ac_ext" <<_ACEOF
20696#line 20696 "configure"
20697#include "confdefs.h"
20698#define $ac_func autoconf_temporary
20699#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20700#undef $ac_func
20701
20702#ifdef __cplusplus
20703extern "C"
20704#endif
20705
20706/* We use char because int might match the return type of a gcc2
20707   builtin and then its argument prototype would still apply.  */
20708char $ac_func (void);
20709
20710int
20711main (void)
20712{
20713
20714/* The GNU C library defines stubs for functions which it implements
20715    to always fail with ENOSYS.  Some functions are actually named
20716    something starting with __ and the normal name is an alias.  */
20717#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20718#error found stub for $ac_func
20719#endif
20720
20721	return $ac_func ();
20722  ;
20723  return 0;
20724}
20725_ACEOF
20726rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20727if { (eval echo "$as_me:20727: \"$ac_link\"") >&5
20728  (eval $ac_link) 2>&5
20729  ac_status=$?
20730  echo "$as_me:20730: \$? = $ac_status" >&5
20731  (exit "$ac_status"); } &&
20732         { ac_try='test -s "conftest$ac_exeext"'
20733  { (eval echo "$as_me:20733: \"$ac_try\"") >&5
20734  (eval $ac_try) 2>&5
20735  ac_status=$?
20736  echo "$as_me:20736: \$? = $ac_status" >&5
20737  (exit "$ac_status"); }; }; then
20738  eval "$as_ac_var=yes"
20739else
20740  echo "$as_me: failed program was:" >&5
20741cat "conftest.$ac_ext" >&5
20742eval "$as_ac_var=no"
20743fi
20744rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20745fi
20746echo "$as_me:20746: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20747echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20748if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20749  cat >>confdefs.h <<EOF
20750#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20751EOF
20752
20753fi
20754done
20755
20756fi
20757
20758	if test "$with_pcre2" = no ; then
20759
20760echo "$as_me:20760: checking if you want to use PCRE for regular-expressions" >&5
20761echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
20762
20763# Check whether --with-pcre or --without-pcre was given.
20764if test "${with_pcre+set}" = set; then
20765  withval="$with_pcre"
20766
20767fi;
20768test -z "$with_pcre" && with_pcre=no
20769echo "$as_me:20769: result: $with_pcre" >&5
20770echo "${ECHO_T}$with_pcre" >&6
20771
20772if test "$with_pcre" != no ; then
20773
20774if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
20775	test -n "$verbose" && echo "	found package libpcre" 1>&6
20776
20777echo "${as_me:-configure}:20777: testing found package libpcre ..." 1>&5
20778
20779	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
20780	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
20781	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
20782
20783echo "${as_me:-configure}:20783: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20784
20785	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
20786
20787echo "${as_me:-configure}:20787: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
20788
20789cf_fix_cppflags=no
20790cf_new_cflags=
20791cf_new_cppflags=
20792cf_new_extra_cppflags=
20793
20794for cf_add_cflags in $cf_pkgconfig_incs
20795do
20796case "$cf_fix_cppflags" in
20797(no)
20798	case "$cf_add_cflags" in
20799	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20800		case "$cf_add_cflags" in
20801		(-D*)
20802			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20803
20804			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20805				&& test -z "${cf_tst_cflags}" \
20806				&& cf_fix_cppflags=yes
20807
20808			if test "$cf_fix_cppflags" = yes ; then
20809
20810	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20811	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20812
20813				continue
20814			elif test "${cf_tst_cflags}" = "\"'" ; then
20815
20816	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20817	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20818
20819				continue
20820			fi
20821			;;
20822		esac
20823		case "$CPPFLAGS" in
20824		(*$cf_add_cflags)
20825			;;
20826		(*)
20827			case "$cf_add_cflags" in
20828			(-D*)
20829				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20830
20831CPPFLAGS=`echo "$CPPFLAGS" | \
20832	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20833		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20834
20835				;;
20836			esac
20837
20838	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20839	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20840
20841			;;
20842		esac
20843		;;
20844	(*)
20845
20846	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20847	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20848
20849		;;
20850	esac
20851	;;
20852(yes)
20853
20854	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20855	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20856
20857	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20858
20859	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20860		&& test -z "${cf_tst_cflags}" \
20861		&& cf_fix_cppflags=no
20862	;;
20863esac
20864done
20865
20866if test -n "$cf_new_cflags" ; then
20867
20868	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20869	CFLAGS="${CFLAGS}$cf_new_cflags"
20870
20871fi
20872
20873if test -n "$cf_new_cppflags" ; then
20874
20875	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20876	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20877
20878fi
20879
20880if test -n "$cf_new_extra_cppflags" ; then
20881
20882	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20883	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20884
20885fi
20886
20887cf_add_libs="$LIBS"
20888# reverse order
20889cf_add_0lib=
20890for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20891# filter duplicates
20892for cf_add_1lib in $cf_add_0lib; do
20893	for cf_add_2lib in $cf_add_libs; do
20894		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20895			cf_add_1lib=
20896			break
20897		fi
20898	done
20899	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20900done
20901LIBS="$cf_add_libs"
20902
20903	:
20904else
20905	cf_pkgconfig_incs=
20906	cf_pkgconfig_libs=
20907
20908echo "$as_me:20908: checking for pcre_compile in -lpcre" >&5
20909echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
20910if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
20911  echo $ECHO_N "(cached) $ECHO_C" >&6
20912else
20913  ac_check_lib_save_LIBS=$LIBS
20914LIBS="-lpcre  $LIBS"
20915cat >"conftest.$ac_ext" <<_ACEOF
20916#line 20916 "configure"
20917#include "confdefs.h"
20918
20919/* Override any gcc2 internal prototype to avoid an error.  */
20920#ifdef __cplusplus
20921extern "C"
20922#endif
20923/* We use char because int might match the return type of a gcc2
20924   builtin and then its argument prototype would still apply.  */
20925char pcre_compile ();
20926int
20927main (void)
20928{
20929pcre_compile ();
20930  ;
20931  return 0;
20932}
20933_ACEOF
20934rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20935if { (eval echo "$as_me:20935: \"$ac_link\"") >&5
20936  (eval $ac_link) 2>&5
20937  ac_status=$?
20938  echo "$as_me:20938: \$? = $ac_status" >&5
20939  (exit "$ac_status"); } &&
20940         { ac_try='test -s "conftest$ac_exeext"'
20941  { (eval echo "$as_me:20941: \"$ac_try\"") >&5
20942  (eval $ac_try) 2>&5
20943  ac_status=$?
20944  echo "$as_me:20944: \$? = $ac_status" >&5
20945  (exit "$ac_status"); }; }; then
20946  ac_cv_lib_pcre_pcre_compile=yes
20947else
20948  echo "$as_me: failed program was:" >&5
20949cat "conftest.$ac_ext" >&5
20950ac_cv_lib_pcre_pcre_compile=no
20951fi
20952rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20953LIBS=$ac_check_lib_save_LIBS
20954fi
20955echo "$as_me:20955: result: $ac_cv_lib_pcre_pcre_compile" >&5
20956echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
20957if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
20958  cat >>confdefs.h <<EOF
20959#define HAVE_LIBPCRE 1
20960EOF
20961
20962  LIBS="-lpcre $LIBS"
20963
20964else
20965  { { echo "$as_me:20965: error: Cannot find PCRE library" >&5
20966echo "$as_me: error: Cannot find PCRE library" >&2;}
20967   { (exit 1); exit 1; }; }
20968fi
20969
20970fi
20971
20972cat >>confdefs.h <<\EOF
20973#define HAVE_LIB_PCRE 1
20974EOF
20975
20976	case $LIBS in
20977	(*pcreposix*)
20978		;;
20979	(*)
20980		echo "$as_me:20980: checking for pcreposix_regcomp in -lpcreposix" >&5
20981echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
20982if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
20983  echo $ECHO_N "(cached) $ECHO_C" >&6
20984else
20985  ac_check_lib_save_LIBS=$LIBS
20986LIBS="-lpcreposix  $LIBS"
20987cat >"conftest.$ac_ext" <<_ACEOF
20988#line 20988 "configure"
20989#include "confdefs.h"
20990
20991/* Override any gcc2 internal prototype to avoid an error.  */
20992#ifdef __cplusplus
20993extern "C"
20994#endif
20995/* We use char because int might match the return type of a gcc2
20996   builtin and then its argument prototype would still apply.  */
20997char pcreposix_regcomp ();
20998int
20999main (void)
21000{
21001pcreposix_regcomp ();
21002  ;
21003  return 0;
21004}
21005_ACEOF
21006rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21007if { (eval echo "$as_me:21007: \"$ac_link\"") >&5
21008  (eval $ac_link) 2>&5
21009  ac_status=$?
21010  echo "$as_me:21010: \$? = $ac_status" >&5
21011  (exit "$ac_status"); } &&
21012         { ac_try='test -s "conftest$ac_exeext"'
21013  { (eval echo "$as_me:21013: \"$ac_try\"") >&5
21014  (eval $ac_try) 2>&5
21015  ac_status=$?
21016  echo "$as_me:21016: \$? = $ac_status" >&5
21017  (exit "$ac_status"); }; }; then
21018  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
21019else
21020  echo "$as_me: failed program was:" >&5
21021cat "conftest.$ac_ext" >&5
21022ac_cv_lib_pcreposix_pcreposix_regcomp=no
21023fi
21024rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21025LIBS=$ac_check_lib_save_LIBS
21026fi
21027echo "$as_me:21027: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
21028echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
21029if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
21030
21031cat >>confdefs.h <<\EOF
21032#define HAVE_PCREPOSIX_H 1
21033EOF
21034
21035cf_add_libs="$LIBS"
21036# reverse order
21037cf_add_0lib=
21038for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21039# filter duplicates
21040for cf_add_1lib in $cf_add_0lib; do
21041	for cf_add_2lib in $cf_add_libs; do
21042		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21043			cf_add_1lib=
21044			break
21045		fi
21046	done
21047	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21048done
21049LIBS="$cf_add_libs"
21050
21051else
21052  echo "$as_me:21052: checking for regcomp in -lpcreposix" >&5
21053echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
21054if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
21055  echo $ECHO_N "(cached) $ECHO_C" >&6
21056else
21057  ac_check_lib_save_LIBS=$LIBS
21058LIBS="-lpcreposix  $LIBS"
21059cat >"conftest.$ac_ext" <<_ACEOF
21060#line 21060 "configure"
21061#include "confdefs.h"
21062
21063/* Override any gcc2 internal prototype to avoid an error.  */
21064#ifdef __cplusplus
21065extern "C"
21066#endif
21067/* We use char because int might match the return type of a gcc2
21068   builtin and then its argument prototype would still apply.  */
21069char regcomp ();
21070int
21071main (void)
21072{
21073regcomp ();
21074  ;
21075  return 0;
21076}
21077_ACEOF
21078rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21079if { (eval echo "$as_me:21079: \"$ac_link\"") >&5
21080  (eval $ac_link) 2>&5
21081  ac_status=$?
21082  echo "$as_me:21082: \$? = $ac_status" >&5
21083  (exit "$ac_status"); } &&
21084         { ac_try='test -s "conftest$ac_exeext"'
21085  { (eval echo "$as_me:21085: \"$ac_try\"") >&5
21086  (eval $ac_try) 2>&5
21087  ac_status=$?
21088  echo "$as_me:21088: \$? = $ac_status" >&5
21089  (exit "$ac_status"); }; }; then
21090  ac_cv_lib_pcreposix_regcomp=yes
21091else
21092  echo "$as_me: failed program was:" >&5
21093cat "conftest.$ac_ext" >&5
21094ac_cv_lib_pcreposix_regcomp=no
21095fi
21096rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21097LIBS=$ac_check_lib_save_LIBS
21098fi
21099echo "$as_me:21099: result: $ac_cv_lib_pcreposix_regcomp" >&5
21100echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
21101if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
21102
21103cat >>confdefs.h <<\EOF
21104#define HAVE_PCREPOSIX_H 1
21105EOF
21106
21107cf_add_libs="$LIBS"
21108# reverse order
21109cf_add_0lib=
21110for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21111# filter duplicates
21112for cf_add_1lib in $cf_add_0lib; do
21113	for cf_add_2lib in $cf_add_libs; do
21114		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21115			cf_add_1lib=
21116			break
21117		fi
21118	done
21119	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21120done
21121LIBS="$cf_add_libs"
21122
21123else
21124  { { echo "$as_me:21124: error: Cannot find PCRE POSIX library" >&5
21125echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
21126   { (exit 1); exit 1; }; }
21127fi
21128
21129fi
21130
21131		;;
21132	esac
21133fi
21134
21135		if test "$with_pcre" = no ; then
21136
21137cf_regex_func=no
21138cf_regex_libs=
21139case "$host_os" in
21140(mingw*)
21141	# -lsystre -ltre -lintl -liconv
21142	echo "$as_me:21142: checking for regcomp in -lsystre" >&5
21143echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
21144if test "${ac_cv_lib_systre_regcomp+set}" = set; then
21145  echo $ECHO_N "(cached) $ECHO_C" >&6
21146else
21147  ac_check_lib_save_LIBS=$LIBS
21148LIBS="-lsystre  $LIBS"
21149cat >"conftest.$ac_ext" <<_ACEOF
21150#line 21150 "configure"
21151#include "confdefs.h"
21152
21153/* Override any gcc2 internal prototype to avoid an error.  */
21154#ifdef __cplusplus
21155extern "C"
21156#endif
21157/* We use char because int might match the return type of a gcc2
21158   builtin and then its argument prototype would still apply.  */
21159char regcomp ();
21160int
21161main (void)
21162{
21163regcomp ();
21164  ;
21165  return 0;
21166}
21167_ACEOF
21168rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21169if { (eval echo "$as_me:21169: \"$ac_link\"") >&5
21170  (eval $ac_link) 2>&5
21171  ac_status=$?
21172  echo "$as_me:21172: \$? = $ac_status" >&5
21173  (exit "$ac_status"); } &&
21174         { ac_try='test -s "conftest$ac_exeext"'
21175  { (eval echo "$as_me:21175: \"$ac_try\"") >&5
21176  (eval $ac_try) 2>&5
21177  ac_status=$?
21178  echo "$as_me:21178: \$? = $ac_status" >&5
21179  (exit "$ac_status"); }; }; then
21180  ac_cv_lib_systre_regcomp=yes
21181else
21182  echo "$as_me: failed program was:" >&5
21183cat "conftest.$ac_ext" >&5
21184ac_cv_lib_systre_regcomp=no
21185fi
21186rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21187LIBS=$ac_check_lib_save_LIBS
21188fi
21189echo "$as_me:21189: result: $ac_cv_lib_systre_regcomp" >&5
21190echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21191if test "$ac_cv_lib_systre_regcomp" = yes; then
21192
21193		echo "$as_me:21193: checking for libiconv_open in -liconv" >&5
21194echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
21195if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
21196  echo $ECHO_N "(cached) $ECHO_C" >&6
21197else
21198  ac_check_lib_save_LIBS=$LIBS
21199LIBS="-liconv  $LIBS"
21200cat >"conftest.$ac_ext" <<_ACEOF
21201#line 21201 "configure"
21202#include "confdefs.h"
21203
21204/* Override any gcc2 internal prototype to avoid an error.  */
21205#ifdef __cplusplus
21206extern "C"
21207#endif
21208/* We use char because int might match the return type of a gcc2
21209   builtin and then its argument prototype would still apply.  */
21210char libiconv_open ();
21211int
21212main (void)
21213{
21214libiconv_open ();
21215  ;
21216  return 0;
21217}
21218_ACEOF
21219rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21220if { (eval echo "$as_me:21220: \"$ac_link\"") >&5
21221  (eval $ac_link) 2>&5
21222  ac_status=$?
21223  echo "$as_me:21223: \$? = $ac_status" >&5
21224  (exit "$ac_status"); } &&
21225         { ac_try='test -s "conftest$ac_exeext"'
21226  { (eval echo "$as_me:21226: \"$ac_try\"") >&5
21227  (eval $ac_try) 2>&5
21228  ac_status=$?
21229  echo "$as_me:21229: \$? = $ac_status" >&5
21230  (exit "$ac_status"); }; }; then
21231  ac_cv_lib_iconv_libiconv_open=yes
21232else
21233  echo "$as_me: failed program was:" >&5
21234cat "conftest.$ac_ext" >&5
21235ac_cv_lib_iconv_libiconv_open=no
21236fi
21237rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21238LIBS=$ac_check_lib_save_LIBS
21239fi
21240echo "$as_me:21240: result: $ac_cv_lib_iconv_libiconv_open" >&5
21241echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
21242if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
21243
21244cf_add_libs="$LIBS"
21245# reverse order
21246cf_add_0lib=
21247for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21248# filter duplicates
21249for cf_add_1lib in $cf_add_0lib; do
21250	for cf_add_2lib in $cf_add_libs; do
21251		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21252			cf_add_1lib=
21253			break
21254		fi
21255	done
21256	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21257done
21258LIBS="$cf_add_libs"
21259
21260fi
21261
21262		echo "$as_me:21262: checking for libintl_gettext in -lintl" >&5
21263echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
21264if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
21265  echo $ECHO_N "(cached) $ECHO_C" >&6
21266else
21267  ac_check_lib_save_LIBS=$LIBS
21268LIBS="-lintl  $LIBS"
21269cat >"conftest.$ac_ext" <<_ACEOF
21270#line 21270 "configure"
21271#include "confdefs.h"
21272
21273/* Override any gcc2 internal prototype to avoid an error.  */
21274#ifdef __cplusplus
21275extern "C"
21276#endif
21277/* We use char because int might match the return type of a gcc2
21278   builtin and then its argument prototype would still apply.  */
21279char libintl_gettext ();
21280int
21281main (void)
21282{
21283libintl_gettext ();
21284  ;
21285  return 0;
21286}
21287_ACEOF
21288rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21289if { (eval echo "$as_me:21289: \"$ac_link\"") >&5
21290  (eval $ac_link) 2>&5
21291  ac_status=$?
21292  echo "$as_me:21292: \$? = $ac_status" >&5
21293  (exit "$ac_status"); } &&
21294         { ac_try='test -s "conftest$ac_exeext"'
21295  { (eval echo "$as_me:21295: \"$ac_try\"") >&5
21296  (eval $ac_try) 2>&5
21297  ac_status=$?
21298  echo "$as_me:21298: \$? = $ac_status" >&5
21299  (exit "$ac_status"); }; }; then
21300  ac_cv_lib_intl_libintl_gettext=yes
21301else
21302  echo "$as_me: failed program was:" >&5
21303cat "conftest.$ac_ext" >&5
21304ac_cv_lib_intl_libintl_gettext=no
21305fi
21306rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21307LIBS=$ac_check_lib_save_LIBS
21308fi
21309echo "$as_me:21309: result: $ac_cv_lib_intl_libintl_gettext" >&5
21310echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
21311if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
21312
21313cf_add_libs="$LIBS"
21314# reverse order
21315cf_add_0lib=
21316for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21317# filter duplicates
21318for cf_add_1lib in $cf_add_0lib; do
21319	for cf_add_2lib in $cf_add_libs; do
21320		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21321			cf_add_1lib=
21322			break
21323		fi
21324	done
21325	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21326done
21327LIBS="$cf_add_libs"
21328
21329fi
21330
21331		echo "$as_me:21331: checking for tre_regcomp in -ltre" >&5
21332echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
21333if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
21334  echo $ECHO_N "(cached) $ECHO_C" >&6
21335else
21336  ac_check_lib_save_LIBS=$LIBS
21337LIBS="-ltre  $LIBS"
21338cat >"conftest.$ac_ext" <<_ACEOF
21339#line 21339 "configure"
21340#include "confdefs.h"
21341
21342/* Override any gcc2 internal prototype to avoid an error.  */
21343#ifdef __cplusplus
21344extern "C"
21345#endif
21346/* We use char because int might match the return type of a gcc2
21347   builtin and then its argument prototype would still apply.  */
21348char tre_regcomp ();
21349int
21350main (void)
21351{
21352tre_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_lib_tre_tre_regcomp=yes
21370else
21371  echo "$as_me: failed program was:" >&5
21372cat "conftest.$ac_ext" >&5
21373ac_cv_lib_tre_tre_regcomp=no
21374fi
21375rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21376LIBS=$ac_check_lib_save_LIBS
21377fi
21378echo "$as_me:21378: result: $ac_cv_lib_tre_tre_regcomp" >&5
21379echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
21380if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
21381
21382cf_add_libs="$LIBS"
21383# reverse order
21384cf_add_0lib=
21385for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21386# filter duplicates
21387for cf_add_1lib in $cf_add_0lib; do
21388	for cf_add_2lib in $cf_add_libs; do
21389		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21390			cf_add_1lib=
21391			break
21392		fi
21393	done
21394	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21395done
21396LIBS="$cf_add_libs"
21397
21398fi
21399
21400cf_add_libs="$LIBS"
21401# reverse order
21402cf_add_0lib=
21403for cf_add_1lib in -lsystre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21404# filter duplicates
21405for cf_add_1lib in $cf_add_0lib; do
21406	for cf_add_2lib in $cf_add_libs; do
21407		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21408			cf_add_1lib=
21409			break
21410		fi
21411	done
21412	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21413done
21414LIBS="$cf_add_libs"
21415
21416		cf_regex_func=regcomp
21417
21418else
21419
21420		echo "$as_me:21420: checking for regcomp in -lgnurx" >&5
21421echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
21422if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
21423  echo $ECHO_N "(cached) $ECHO_C" >&6
21424else
21425  ac_check_lib_save_LIBS=$LIBS
21426LIBS="-lgnurx  $LIBS"
21427cat >"conftest.$ac_ext" <<_ACEOF
21428#line 21428 "configure"
21429#include "confdefs.h"
21430
21431/* Override any gcc2 internal prototype to avoid an error.  */
21432#ifdef __cplusplus
21433extern "C"
21434#endif
21435/* We use char because int might match the return type of a gcc2
21436   builtin and then its argument prototype would still apply.  */
21437char regcomp ();
21438int
21439main (void)
21440{
21441regcomp ();
21442  ;
21443  return 0;
21444}
21445_ACEOF
21446rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21447if { (eval echo "$as_me:21447: \"$ac_link\"") >&5
21448  (eval $ac_link) 2>&5
21449  ac_status=$?
21450  echo "$as_me:21450: \$? = $ac_status" >&5
21451  (exit "$ac_status"); } &&
21452         { ac_try='test -s "conftest$ac_exeext"'
21453  { (eval echo "$as_me:21453: \"$ac_try\"") >&5
21454  (eval $ac_try) 2>&5
21455  ac_status=$?
21456  echo "$as_me:21456: \$? = $ac_status" >&5
21457  (exit "$ac_status"); }; }; then
21458  ac_cv_lib_gnurx_regcomp=yes
21459else
21460  echo "$as_me: failed program was:" >&5
21461cat "conftest.$ac_ext" >&5
21462ac_cv_lib_gnurx_regcomp=no
21463fi
21464rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21465LIBS=$ac_check_lib_save_LIBS
21466fi
21467echo "$as_me:21467: result: $ac_cv_lib_gnurx_regcomp" >&5
21468echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
21469if test "$ac_cv_lib_gnurx_regcomp" = yes; then
21470
21471cf_add_libs="$LIBS"
21472# reverse order
21473cf_add_0lib=
21474for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21475# filter duplicates
21476for cf_add_1lib in $cf_add_0lib; do
21477	for cf_add_2lib in $cf_add_libs; do
21478		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21479			cf_add_1lib=
21480			break
21481		fi
21482	done
21483	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21484done
21485LIBS="$cf_add_libs"
21486
21487			cf_regex_func=regcomp
21488fi
21489
21490fi
21491
21492	;;
21493(*)
21494	cf_regex_libs="regex re"
21495	echo "$as_me:21495: checking for regcomp" >&5
21496echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
21497if test "${ac_cv_func_regcomp+set}" = set; then
21498  echo $ECHO_N "(cached) $ECHO_C" >&6
21499else
21500  cat >"conftest.$ac_ext" <<_ACEOF
21501#line 21501 "configure"
21502#include "confdefs.h"
21503#define regcomp autoconf_temporary
21504#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21505#undef regcomp
21506
21507#ifdef __cplusplus
21508extern "C"
21509#endif
21510
21511/* We use char because int might match the return type of a gcc2
21512   builtin and then its argument prototype would still apply.  */
21513char regcomp (void);
21514
21515int
21516main (void)
21517{
21518
21519/* The GNU C library defines stubs for functions which it implements
21520    to always fail with ENOSYS.  Some functions are actually named
21521    something starting with __ and the normal name is an alias.  */
21522#if defined (__stub_regcomp) || defined (__stub___regcomp)
21523#error found stub for regcomp
21524#endif
21525
21526	return regcomp ();
21527  ;
21528  return 0;
21529}
21530_ACEOF
21531rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21532if { (eval echo "$as_me:21532: \"$ac_link\"") >&5
21533  (eval $ac_link) 2>&5
21534  ac_status=$?
21535  echo "$as_me:21535: \$? = $ac_status" >&5
21536  (exit "$ac_status"); } &&
21537         { ac_try='test -s "conftest$ac_exeext"'
21538  { (eval echo "$as_me:21538: \"$ac_try\"") >&5
21539  (eval $ac_try) 2>&5
21540  ac_status=$?
21541  echo "$as_me:21541: \$? = $ac_status" >&5
21542  (exit "$ac_status"); }; }; then
21543  ac_cv_func_regcomp=yes
21544else
21545  echo "$as_me: failed program was:" >&5
21546cat "conftest.$ac_ext" >&5
21547ac_cv_func_regcomp=no
21548fi
21549rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21550fi
21551echo "$as_me:21551: result: $ac_cv_func_regcomp" >&5
21552echo "${ECHO_T}$ac_cv_func_regcomp" >&6
21553if test "$ac_cv_func_regcomp" = yes; then
21554  cf_regex_func=regcomp
21555else
21556
21557		for cf_regex_lib in $cf_regex_libs
21558		do
21559			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
21560echo "$as_me:21560: checking for regcomp in -l$cf_regex_lib" >&5
21561echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
21562if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21563  echo $ECHO_N "(cached) $ECHO_C" >&6
21564else
21565  ac_check_lib_save_LIBS=$LIBS
21566LIBS="-l$cf_regex_lib  $LIBS"
21567cat >"conftest.$ac_ext" <<_ACEOF
21568#line 21568 "configure"
21569#include "confdefs.h"
21570
21571/* Override any gcc2 internal prototype to avoid an error.  */
21572#ifdef __cplusplus
21573extern "C"
21574#endif
21575/* We use char because int might match the return type of a gcc2
21576   builtin and then its argument prototype would still apply.  */
21577char regcomp ();
21578int
21579main (void)
21580{
21581regcomp ();
21582  ;
21583  return 0;
21584}
21585_ACEOF
21586rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21587if { (eval echo "$as_me:21587: \"$ac_link\"") >&5
21588  (eval $ac_link) 2>&5
21589  ac_status=$?
21590  echo "$as_me:21590: \$? = $ac_status" >&5
21591  (exit "$ac_status"); } &&
21592         { ac_try='test -s "conftest$ac_exeext"'
21593  { (eval echo "$as_me:21593: \"$ac_try\"") >&5
21594  (eval $ac_try) 2>&5
21595  ac_status=$?
21596  echo "$as_me:21596: \$? = $ac_status" >&5
21597  (exit "$ac_status"); }; }; then
21598  eval "$as_ac_Lib=yes"
21599else
21600  echo "$as_me: failed program was:" >&5
21601cat "conftest.$ac_ext" >&5
21602eval "$as_ac_Lib=no"
21603fi
21604rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21605LIBS=$ac_check_lib_save_LIBS
21606fi
21607echo "$as_me:21607: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
21608echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
21609if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
21610
21611cf_add_libs="$LIBS"
21612# reverse order
21613cf_add_0lib=
21614for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21615# filter duplicates
21616for cf_add_1lib in $cf_add_0lib; do
21617	for cf_add_2lib in $cf_add_libs; do
21618		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21619			cf_add_1lib=
21620			break
21621		fi
21622	done
21623	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21624done
21625LIBS="$cf_add_libs"
21626
21627					cf_regex_func=regcomp
21628					break
21629fi
21630
21631		done
21632
21633fi
21634
21635	;;
21636esac
21637
21638if test "$cf_regex_func" = no ; then
21639	echo "$as_me:21639: checking for compile" >&5
21640echo $ECHO_N "checking for compile... $ECHO_C" >&6
21641if test "${ac_cv_func_compile+set}" = set; then
21642  echo $ECHO_N "(cached) $ECHO_C" >&6
21643else
21644  cat >"conftest.$ac_ext" <<_ACEOF
21645#line 21645 "configure"
21646#include "confdefs.h"
21647#define compile autoconf_temporary
21648#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21649#undef compile
21650
21651#ifdef __cplusplus
21652extern "C"
21653#endif
21654
21655/* We use char because int might match the return type of a gcc2
21656   builtin and then its argument prototype would still apply.  */
21657char compile (void);
21658
21659int
21660main (void)
21661{
21662
21663/* The GNU C library defines stubs for functions which it implements
21664    to always fail with ENOSYS.  Some functions are actually named
21665    something starting with __ and the normal name is an alias.  */
21666#if defined (__stub_compile) || defined (__stub___compile)
21667#error found stub for compile
21668#endif
21669
21670	return compile ();
21671  ;
21672  return 0;
21673}
21674_ACEOF
21675rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21676if { (eval echo "$as_me:21676: \"$ac_link\"") >&5
21677  (eval $ac_link) 2>&5
21678  ac_status=$?
21679  echo "$as_me:21679: \$? = $ac_status" >&5
21680  (exit "$ac_status"); } &&
21681         { ac_try='test -s "conftest$ac_exeext"'
21682  { (eval echo "$as_me:21682: \"$ac_try\"") >&5
21683  (eval $ac_try) 2>&5
21684  ac_status=$?
21685  echo "$as_me:21685: \$? = $ac_status" >&5
21686  (exit "$ac_status"); }; }; then
21687  ac_cv_func_compile=yes
21688else
21689  echo "$as_me: failed program was:" >&5
21690cat "conftest.$ac_ext" >&5
21691ac_cv_func_compile=no
21692fi
21693rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21694fi
21695echo "$as_me:21695: result: $ac_cv_func_compile" >&5
21696echo "${ECHO_T}$ac_cv_func_compile" >&6
21697if test "$ac_cv_func_compile" = yes; then
21698  cf_regex_func=compile
21699else
21700
21701		echo "$as_me:21701: checking for compile in -lgen" >&5
21702echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
21703if test "${ac_cv_lib_gen_compile+set}" = set; then
21704  echo $ECHO_N "(cached) $ECHO_C" >&6
21705else
21706  ac_check_lib_save_LIBS=$LIBS
21707LIBS="-lgen  $LIBS"
21708cat >"conftest.$ac_ext" <<_ACEOF
21709#line 21709 "configure"
21710#include "confdefs.h"
21711
21712/* Override any gcc2 internal prototype to avoid an error.  */
21713#ifdef __cplusplus
21714extern "C"
21715#endif
21716/* We use char because int might match the return type of a gcc2
21717   builtin and then its argument prototype would still apply.  */
21718char compile ();
21719int
21720main (void)
21721{
21722compile ();
21723  ;
21724  return 0;
21725}
21726_ACEOF
21727rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21728if { (eval echo "$as_me:21728: \"$ac_link\"") >&5
21729  (eval $ac_link) 2>&5
21730  ac_status=$?
21731  echo "$as_me:21731: \$? = $ac_status" >&5
21732  (exit "$ac_status"); } &&
21733         { ac_try='test -s "conftest$ac_exeext"'
21734  { (eval echo "$as_me:21734: \"$ac_try\"") >&5
21735  (eval $ac_try) 2>&5
21736  ac_status=$?
21737  echo "$as_me:21737: \$? = $ac_status" >&5
21738  (exit "$ac_status"); }; }; then
21739  ac_cv_lib_gen_compile=yes
21740else
21741  echo "$as_me: failed program was:" >&5
21742cat "conftest.$ac_ext" >&5
21743ac_cv_lib_gen_compile=no
21744fi
21745rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21746LIBS=$ac_check_lib_save_LIBS
21747fi
21748echo "$as_me:21748: result: $ac_cv_lib_gen_compile" >&5
21749echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
21750if test "$ac_cv_lib_gen_compile" = yes; then
21751
21752cf_add_libs="$LIBS"
21753# reverse order
21754cf_add_0lib=
21755for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21756# filter duplicates
21757for cf_add_1lib in $cf_add_0lib; do
21758	for cf_add_2lib in $cf_add_libs; do
21759		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21760			cf_add_1lib=
21761			break
21762		fi
21763	done
21764	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21765done
21766LIBS="$cf_add_libs"
21767
21768				cf_regex_func=compile
21769fi
21770
21771fi
21772
21773fi
21774
21775if test "$cf_regex_func" = no ; then
21776	{ echo "$as_me:21776: WARNING: cannot find regular expression library" >&5
21777echo "$as_me: WARNING: cannot find regular expression library" >&2;}
21778fi
21779
21780echo "$as_me:21780: checking for regular-expression headers" >&5
21781echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
21782if test "${cf_cv_regex_hdrs+set}" = set; then
21783  echo $ECHO_N "(cached) $ECHO_C" >&6
21784else
21785
21786cf_cv_regex_hdrs=no
21787case "$cf_regex_func" in
21788(compile)
21789	for cf_regex_hdr in regexp.h regexpr.h
21790	do
21791		cat >"conftest.$ac_ext" <<_ACEOF
21792#line 21792 "configure"
21793#include "confdefs.h"
21794#include <$cf_regex_hdr>
21795int
21796main (void)
21797{
21798
21799			char *p = compile("", "", "", 0);
21800			int x = step("", "");
21801			(void)p;
21802			(void)x;
21803
21804  ;
21805  return 0;
21806}
21807_ACEOF
21808rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21809if { (eval echo "$as_me:21809: \"$ac_link\"") >&5
21810  (eval $ac_link) 2>&5
21811  ac_status=$?
21812  echo "$as_me:21812: \$? = $ac_status" >&5
21813  (exit "$ac_status"); } &&
21814         { ac_try='test -s "conftest$ac_exeext"'
21815  { (eval echo "$as_me:21815: \"$ac_try\"") >&5
21816  (eval $ac_try) 2>&5
21817  ac_status=$?
21818  echo "$as_me:21818: \$? = $ac_status" >&5
21819  (exit "$ac_status"); }; }; then
21820
21821			cf_cv_regex_hdrs=$cf_regex_hdr
21822			break
21823
21824else
21825  echo "$as_me: failed program was:" >&5
21826cat "conftest.$ac_ext" >&5
21827fi
21828rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21829	done
21830	;;
21831(*)
21832	for cf_regex_hdr in regex.h
21833	do
21834		cat >"conftest.$ac_ext" <<_ACEOF
21835#line 21835 "configure"
21836#include "confdefs.h"
21837#include <sys/types.h>
21838#include <$cf_regex_hdr>
21839int
21840main (void)
21841{
21842
21843			regex_t *p = 0;
21844			int x = regcomp(p, "", 0);
21845			int y = regexec(p, "", 0, 0, 0);
21846			(void)x;
21847			(void)y;
21848			regfree(p);
21849
21850  ;
21851  return 0;
21852}
21853_ACEOF
21854rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21855if { (eval echo "$as_me:21855: \"$ac_link\"") >&5
21856  (eval $ac_link) 2>&5
21857  ac_status=$?
21858  echo "$as_me:21858: \$? = $ac_status" >&5
21859  (exit "$ac_status"); } &&
21860         { ac_try='test -s "conftest$ac_exeext"'
21861  { (eval echo "$as_me:21861: \"$ac_try\"") >&5
21862  (eval $ac_try) 2>&5
21863  ac_status=$?
21864  echo "$as_me:21864: \$? = $ac_status" >&5
21865  (exit "$ac_status"); }; }; then
21866
21867			cf_cv_regex_hdrs=$cf_regex_hdr
21868			break
21869
21870else
21871  echo "$as_me: failed program was:" >&5
21872cat "conftest.$ac_ext" >&5
21873fi
21874rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21875	done
21876	;;
21877esac
21878
21879fi
21880echo "$as_me:21880: result: $cf_cv_regex_hdrs" >&5
21881echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
21882
21883case "$cf_cv_regex_hdrs" in
21884	(no)		{ echo "$as_me:21884: WARNING: no regular expression header found" >&5
21885echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
21886	(regex.h)
21887cat >>confdefs.h <<\EOF
21888#define HAVE_REGEX_H_FUNCS 1
21889EOF
21890 ;;
21891	(regexp.h)
21892cat >>confdefs.h <<\EOF
21893#define HAVE_REGEXP_H_FUNCS 1
21894EOF
21895 ;;
21896	(regexpr.h)
21897cat >>confdefs.h <<\EOF
21898#define HAVE_REGEXPR_H_FUNCS 1
21899EOF
21900 ;;
21901esac
21902
21903			if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
21904				{ { echo "$as_me:21904: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
21905echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
21906   { (exit 1); exit 1; }; }
21907			fi
21908		fi
21909	fi
21910
21911cat >>confdefs.h <<\EOF
21912#define OPT_SELECT_REGEX 1
21913EOF
21914
21915fi
21916
21917echo "$as_me:21917: checking if you want support for right-scrollbar" >&5
21918echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
21919
21920# Check whether --enable-rightbar or --disable-rightbar was given.
21921if test "${enable_rightbar+set}" = set; then
21922  enableval="$enable_rightbar"
21923  test "$enableval" != no && enableval=yes
21924	if test "$enableval" != "yes" ; then
21925    enable_rightbar=no
21926	else
21927		enable_rightbar=yes
21928	fi
21929else
21930  enableval=yes
21931	enable_rightbar=yes
21932
21933fi;
21934echo "$as_me:21934: result: $enable_rightbar" >&5
21935echo "${ECHO_T}$enable_rightbar" >&6
21936if test "$enable_rightbar" = yes ; then
21937
21938cat >>confdefs.h <<\EOF
21939#define SCROLLBAR_RIGHT 1
21940EOF
21941
21942fi
21943
21944echo "$as_me:21944: checking if you want check for redundant name-change" >&5
21945echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
21946
21947# Check whether --enable-samename or --disable-samename was given.
21948if test "${enable_samename+set}" = set; then
21949  enableval="$enable_samename"
21950  test "$enableval" != no && enableval=yes
21951	if test "$enableval" != "yes" ; then
21952    enable_samename=no
21953	else
21954		enable_samename=yes
21955	fi
21956else
21957  enableval=yes
21958	enable_samename=yes
21959
21960fi;
21961echo "$as_me:21961: result: $enable_samename" >&5
21962echo "${ECHO_T}$enable_samename" >&6
21963test "$enable_samename" = no &&
21964cat >>confdefs.h <<\EOF
21965#define OPT_SAME_NAME 0
21966EOF
21967
21968echo "$as_me:21968: checking if you want support for selection-actions" >&5
21969echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
21970
21971# Check whether --enable-selection-ops or --disable-selection-ops was given.
21972if test "${enable_selection_ops+set}" = set; then
21973  enableval="$enable_selection_ops"
21974  test "$enableval" != no && enableval=yes
21975	if test "$enableval" != "yes" ; then
21976    enable_selection_ops=no
21977	else
21978		enable_selection_ops=yes
21979	fi
21980else
21981  enableval=yes
21982	enable_selection_ops=yes
21983
21984fi;
21985echo "$as_me:21985: result: $enable_selection_ops" >&5
21986echo "${ECHO_T}$enable_selection_ops" >&6
21987test "$enable_selection_ops" = no &&
21988cat >>confdefs.h <<\EOF
21989#define OPT_SELECTION_OPS 0
21990EOF
21991
21992echo "$as_me:21992: checking if you want support for session management" >&5
21993echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
21994
21995# Check whether --enable-session-mgt or --disable-session-mgt was given.
21996if test "${enable_session_mgt+set}" = set; then
21997  enableval="$enable_session_mgt"
21998  test "$enableval" != no && enableval=yes
21999	if test "$enableval" != "yes" ; then
22000    enable_session_mgt=no
22001	else
22002		enable_session_mgt=yes
22003	fi
22004else
22005  enableval=yes
22006	enable_session_mgt=yes
22007
22008fi;
22009echo "$as_me:22009: result: $enable_session_mgt" >&5
22010echo "${ECHO_T}$enable_session_mgt" >&6
22011test "$enable_session_mgt" = no &&
22012cat >>confdefs.h <<\EOF
22013#define OPT_SESSION_MGT 0
22014EOF
22015
22016echo "$as_me:22016: checking if you want support for status-line" >&5
22017echo $ECHO_N "checking if you want support for status-line... $ECHO_C" >&6
22018
22019# Check whether --enable-status-line or --disable-status-line was given.
22020if test "${enable_status_line+set}" = set; then
22021  enableval="$enable_status_line"
22022  test "$enableval" != yes && enableval=no
22023	if test "$enableval" != "no" ; then
22024    enable_status_line=yes
22025	else
22026		enable_status_line=no
22027	fi
22028else
22029  enableval=no
22030	enable_status_line=no
22031
22032fi;
22033echo "$as_me:22033: result: $enable_status_line" >&5
22034echo "${ECHO_T}$enable_status_line" >&6
22035test "$enable_status_line" = yes &&
22036cat >>confdefs.h <<\EOF
22037#define OPT_STATUS_LINE 1
22038EOF
22039
22040echo "$as_me:22040: checking if you want to use termcap function-keys" >&5
22041echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
22042
22043# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
22044if test "${enable_tcap_fkeys+set}" = set; then
22045  enableval="$enable_tcap_fkeys"
22046  test "$enableval" != no && enableval=yes
22047	if test "$enableval" != "yes" ; then
22048    enable_tcap_fkeys=no
22049	else
22050		enable_tcap_fkeys=yes
22051	fi
22052else
22053  enableval=yes
22054	enable_tcap_fkeys=yes
22055
22056fi;
22057echo "$as_me:22057: result: $enable_tcap_fkeys" >&5
22058echo "${ECHO_T}$enable_tcap_fkeys" >&6
22059test "$enable_tcap_fkeys" = no &&
22060cat >>confdefs.h <<\EOF
22061#define OPT_TCAP_FKEYS 0
22062EOF
22063
22064echo "$as_me:22064: checking if you want to use termcap-query/report" >&5
22065echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
22066
22067# Check whether --enable-tcap-query or --disable-tcap-query was given.
22068if test "${enable_tcap_query+set}" = set; then
22069  enableval="$enable_tcap_query"
22070  test "$enableval" != no && enableval=yes
22071	if test "$enableval" != "yes" ; then
22072    enable_tcap_query=no
22073	else
22074		enable_tcap_query=yes
22075	fi
22076else
22077  enableval=yes
22078	enable_tcap_query=yes
22079
22080fi;
22081echo "$as_me:22081: result: $enable_tcap_query" >&5
22082echo "${ECHO_T}$enable_tcap_query" >&6
22083test "$enable_tcap_query" = no &&
22084cat >>confdefs.h <<\EOF
22085#define OPT_TCAP_QUERY 0
22086EOF
22087
22088echo "$as_me:22088: checking if you want support for tek4014" >&5
22089echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
22090
22091# Check whether --enable-tek4014 or --disable-tek4014 was given.
22092if test "${enable_tek4014+set}" = set; then
22093  enableval="$enable_tek4014"
22094  test "$enableval" != no && enableval=yes
22095	if test "$enableval" != "yes" ; then
22096    enable_tek4014=no
22097	else
22098		enable_tek4014=yes
22099	fi
22100else
22101  enableval=yes
22102	enable_tek4014=yes
22103
22104fi;
22105echo "$as_me:22105: result: $enable_tek4014" >&5
22106echo "${ECHO_T}$enable_tek4014" >&6
22107if test "$enable_tek4014" = no ; then
22108
22109cat >>confdefs.h <<\EOF
22110#define OPT_TEK4014 0
22111EOF
22112
22113else
22114	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
22115	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
22116	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
22117fi
22118
22119echo "$as_me:22119: checking if you want pulldown menus with a toolbar" >&5
22120echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
22121
22122# Check whether --enable-toolbar or --disable-toolbar was given.
22123if test "${enable_toolbar+set}" = set; then
22124  enableval="$enable_toolbar"
22125  test "$enableval" != yes && enableval=no
22126	if test "$enableval" != "no" ; then
22127    enable_toolbar=yes
22128	else
22129		enable_toolbar=no
22130	fi
22131else
22132  enableval=no
22133	enable_toolbar=no
22134
22135fi;
22136echo "$as_me:22136: result: $enable_toolbar" >&5
22137echo "${ECHO_T}$enable_toolbar" >&6
22138if test "$enable_toolbar" = yes ; then
22139
22140cat >>confdefs.h <<\EOF
22141#define OPT_TOOLBAR 1
22142EOF
22143
22144fi
22145
22146echo "$as_me:22146: checking if you want VT52 emulation" >&5
22147echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
22148
22149# Check whether --enable-vt52 or --disable-vt52 was given.
22150if test "${enable_vt52+set}" = set; then
22151  enableval="$enable_vt52"
22152  test "$enableval" != no && enableval=yes
22153	if test "$enableval" != "yes" ; then
22154    enable_vt52=no
22155	else
22156		enable_vt52=yes
22157	fi
22158else
22159  enableval=yes
22160	enable_vt52=yes
22161
22162fi;
22163echo "$as_me:22163: result: $enable_vt52" >&5
22164echo "${ECHO_T}$enable_vt52" >&6
22165test "$enable_vt52" = no &&
22166cat >>confdefs.h <<\EOF
22167#define OPT_VT52_MODE 0
22168EOF
22169
22170echo "$as_me:22170: checking if you want wide-attribute support" >&5
22171echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
22172
22173# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
22174if test "${enable_wide_attrs+set}" = set; then
22175  enableval="$enable_wide_attrs"
22176  test "$enableval" != no && enableval=yes
22177	if test "$enableval" != "yes" ; then
22178    enable_wattr=no
22179	else
22180		enable_wattr=yes
22181	fi
22182else
22183  enableval=yes
22184	enable_wattr=yes
22185
22186fi;
22187echo "$as_me:22187: result: $enable_wattr" >&5
22188echo "${ECHO_T}$enable_wattr" >&6
22189
22190if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
22191	{ echo "$as_me:22191: WARNING: overriding wide-attributes to support direct color" >&5
22192echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
22193	enable_wattr=yes
22194fi
22195
22196echo "$as_me:22196: checking if you want wide-character support" >&5
22197echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
22198
22199# Check whether --enable-wide-chars or --disable-wide-chars was given.
22200if test "${enable_wide_chars+set}" = set; then
22201  enableval="$enable_wide_chars"
22202  test "$enableval" != no && enableval=yes
22203	if test "$enableval" != "yes" ; then
22204    enable_wchar=no
22205	else
22206		enable_wchar=yes
22207	fi
22208else
22209  enableval=yes
22210	enable_wchar=yes
22211
22212fi;
22213echo "$as_me:22213: result: $enable_wchar" >&5
22214echo "${ECHO_T}$enable_wchar" >&6
22215test "x$enable_wattr" = xno &&
22216cat >>confdefs.h <<\EOF
22217#define OPT_WIDE_ATTRS 0
22218EOF
22219
22220echo "$as_me:22220: checking if you want only 16-bit character support" >&5
22221echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
22222
22223# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
22224if test "${enable_16bit_chars+set}" = set; then
22225  enableval="$enable_16bit_chars"
22226  test "$enableval" != yes && enableval=no
22227	if test "$enableval" != "no" ; then
22228    enable_16bit_chars=yes
22229	else
22230		enable_16bit_chars=no
22231	fi
22232else
22233  enableval=no
22234	enable_16bit_chars=no
22235
22236fi;
22237echo "$as_me:22237: result: $enable_16bit_chars" >&5
22238echo "${ECHO_T}$enable_16bit_chars" >&6
22239
22240if test "$enable_16bit_chars" = yes ; then
22241
22242cat >>confdefs.h <<\EOF
22243#define OPT_WIDER_ICHAR 0
22244EOF
22245
22246	enable_wchar=yes
22247fi
22248
22249if test "$enable_wchar" = yes ; then
22250
22251echo "$as_me:22251: checking if you want to use mini-luit/Latin9 built-in support" >&5
22252echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
22253
22254# Check whether --enable-mini-luit or --disable-mini-luit was given.
22255if test "${enable_mini_luit+set}" = set; then
22256  enableval="$enable_mini_luit"
22257  test "$enableval" != yes && enableval=no
22258	if test "$enableval" != "no" ; then
22259    enable_mini_luit=yes
22260	else
22261		enable_mini_luit=no
22262	fi
22263else
22264  enableval=no
22265	enable_mini_luit=no
22266
22267fi;
22268echo "$as_me:22268: result: $enable_mini_luit" >&5
22269echo "${ECHO_T}$enable_mini_luit" >&6
22270if test "$enable_mini_luit" = yes ; then
22271
22272cat >>confdefs.h <<\EOF
22273#define OPT_MINI_LUIT 1
22274EOF
22275
22276fi
22277
22278echo "$as_me:22278: checking if you want to use luit" >&5
22279echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
22280
22281# Check whether --enable-luit or --disable-luit was given.
22282if test "${enable_luit+set}" = set; then
22283  enableval="$enable_luit"
22284  test "$enableval" != no && enableval=yes
22285	if test "$enableval" != "yes" ; then
22286    enable_luit=no
22287	else
22288		enable_luit=yes
22289	fi
22290else
22291  enableval=yes
22292	enable_luit=yes
22293
22294fi;
22295echo "$as_me:22295: result: $enable_luit" >&5
22296echo "${ECHO_T}$enable_luit" >&6
22297if test "$enable_luit" = yes ; then
22298
22299cat >>confdefs.h <<\EOF
22300#define OPT_LUIT_PROG 1
22301EOF
22302
22303test -z "$LUIT" && LUIT="xterm-filter"
22304for ac_prog in $LUIT xterm-filter bluit luit
22305do
22306  # Extract the first word of "$ac_prog", so it can be a program name with args.
22307set dummy $ac_prog; ac_word=$2
22308echo "$as_me:22308: checking for $ac_word" >&5
22309echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22310if test "${ac_cv_path_LUIT+set}" = set; then
22311  echo $ECHO_N "(cached) $ECHO_C" >&6
22312else
22313  case $LUIT in
22314  [\\/]* | ?:[\\/]*)
22315  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
22316  ;;
22317  *)
22318  ac_save_IFS=$IFS; IFS=$ac_path_separator
22319ac_dummy="$PATH"
22320for ac_dir in $ac_dummy; do
22321  IFS=$ac_save_IFS
22322  test -z "$ac_dir" && ac_dir=.
22323  if $as_executable_p "$ac_dir/$ac_word"; then
22324   ac_cv_path_LUIT="$ac_dir/$ac_word"
22325   echo "$as_me:22325: found $ac_dir/$ac_word" >&5
22326   break
22327fi
22328done
22329
22330  ;;
22331esac
22332fi
22333LUIT=$ac_cv_path_LUIT
22334
22335if test -n "$LUIT"; then
22336  echo "$as_me:22336: result: $LUIT" >&5
22337echo "${ECHO_T}$LUIT" >&6
22338else
22339  echo "$as_me:22339: result: no" >&5
22340echo "${ECHO_T}no" >&6
22341fi
22342
22343  test -n "$LUIT" && break
22344done
22345test -n "$LUIT" || LUIT="$LUIT"
22346
22347cf_path_prog=""
22348cf_path_args=""
22349IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
22350for cf_temp in $ac_cv_path_LUIT
22351do
22352	if test -z "$cf_path_prog" ; then
22353		if test "$with_full_paths" = yes ; then
22354
22355if test "x$prefix" != xNONE; then
22356	cf_path_syntax="$prefix"
22357else
22358	cf_path_syntax="$ac_default_prefix"
22359fi
22360
22361case ".$cf_temp" in
22362(.\$\(*\)*|.\'*\'*)
22363	;;
22364(..|./*|.\\*)
22365	;;
22366(.[a-zA-Z]:[\\/]*) # OS/2 EMX
22367	;;
22368(.\$\{*prefix\}*|.\$\{*dir\}*)
22369	eval cf_temp="$cf_temp"
22370	case ".$cf_temp" in
22371	(.NONE/*)
22372		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22373		;;
22374	esac
22375	;;
22376(.no|.NONE/*)
22377	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22378	;;
22379(*)
22380	break
22381	;;
22382esac
22383
22384			cf_path_prog="$cf_temp"
22385		else
22386			cf_path_prog="`basename "$cf_temp"`"
22387		fi
22388	elif test -z "$cf_path_args" ; then
22389		cf_path_args="$cf_temp"
22390	else
22391		cf_path_args="$cf_path_args $cf_temp"
22392	fi
22393done
22394IFS="$cf_save_ifs"
22395
22396if test -n "$cf_path_prog" ; then
22397
22398echo "${as_me:-configure}:22398: testing defining path for ${cf_path_prog} ..." 1>&5
22399
22400cat >>confdefs.h <<EOF
22401#define LUIT_PATH "$cf_path_prog"
22402EOF
22403
22404	test -n "$cf_path_args" &&
22405cat >>confdefs.h <<EOF
22406#define LUIT_ARGS "$cf_path_args"
22407EOF
22408
22409fi
22410
22411fi
22412
22413cat >>confdefs.h <<\EOF
22414#define OPT_WIDE_CHARS 1
22415EOF
22416
22417	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
22418	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
22419	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
22420fi
22421
22422echo "$as_me:22422: checking if you want dynamic-abbreviation support" >&5
22423echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
22424
22425# Check whether --enable-dabbrev or --disable-dabbrev was given.
22426if test "${enable_dabbrev+set}" = set; then
22427  enableval="$enable_dabbrev"
22428  test "$enableval" != yes && enableval=no
22429	if test "$enableval" != "no" ; then
22430    enable_dabbrev=yes
22431	else
22432		enable_dabbrev=no
22433	fi
22434else
22435  enableval=no
22436	enable_dabbrev=no
22437
22438fi;
22439echo "$as_me:22439: result: $enable_dabbrev" >&5
22440echo "${ECHO_T}$enable_dabbrev" >&6
22441if test "$enable_dabbrev" = yes ; then
22442
22443cat >>confdefs.h <<\EOF
22444#define OPT_DABBREV 1
22445EOF
22446
22447fi
22448
22449echo "$as_me:22449: checking if you want DECterm Locator support" >&5
22450echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
22451
22452# Check whether --enable-dec-locator or --disable-dec-locator was given.
22453if test "${enable_dec_locator+set}" = set; then
22454  enableval="$enable_dec_locator"
22455  test "$enableval" != yes && enableval=no
22456	if test "$enableval" != "no" ; then
22457    enable_dec_locator=yes
22458	else
22459		enable_dec_locator=no
22460	fi
22461else
22462  enableval=no
22463	enable_dec_locator=no
22464
22465fi;
22466echo "$as_me:22466: result: $enable_dec_locator" >&5
22467echo "${ECHO_T}$enable_dec_locator" >&6
22468if test "$enable_dec_locator" = yes ; then
22469
22470cat >>confdefs.h <<\EOF
22471#define OPT_DEC_LOCATOR 1
22472EOF
22473
22474fi
22475
22476echo "$as_me:22476: checking if you want XHTML and SVG screen dump support" >&5
22477echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
22478
22479# Check whether --enable-screen-dumps or --disable-screen-dumps was given.
22480if test "${enable_screen_dumps+set}" = set; then
22481  enableval="$enable_screen_dumps"
22482  test "$enableval" != no && enableval=yes
22483	if test "$enableval" != "yes" ; then
22484    enable_screen_dumps=no
22485	else
22486		enable_screen_dumps=yes
22487	fi
22488else
22489  enableval=yes
22490	enable_screen_dumps=yes
22491
22492fi;
22493echo "$as_me:22493: result: $enable_screen_dumps" >&5
22494echo "${ECHO_T}$enable_screen_dumps" >&6
22495if test "$enable_screen_dumps" = yes ; then
22496	EXTRASRCS="$EXTRASRCS html.c svg.c"
22497	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
22498else
22499
22500cat >>confdefs.h <<\EOF
22501#define OPT_SCREEN_DUMPS 0
22502EOF
22503
22504fi
22505
22506echo "$as_me:22506: checking if you want ReGIS graphics support" >&5
22507echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
22508
22509# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
22510if test "${enable_regis_graphics+set}" = set; then
22511  enableval="$enable_regis_graphics"
22512  test "$enableval" != yes && enableval=no
22513	if test "$enableval" != "no" ; then
22514    enable_regis_graphics=yes
22515	else
22516		enable_regis_graphics=no
22517	fi
22518else
22519  enableval=no
22520	enable_regis_graphics=no
22521
22522fi;
22523echo "$as_me:22523: result: $enable_regis_graphics" >&5
22524echo "${ECHO_T}$enable_regis_graphics" >&6
22525if test "$enable_regis_graphics" = yes ; then
22526
22527cat >>confdefs.h <<\EOF
22528#define OPT_REGIS_GRAPHICS 1
22529EOF
22530
22531	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
22532	EXTRASRCS="$EXTRASRCS graphics_regis.c"
22533	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
22534
22535echo "$as_me:22535: checking if -lm needed for math functions" >&5
22536echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
22537if test "${cf_cv_need_libm+set}" = set; then
22538  echo $ECHO_N "(cached) $ECHO_C" >&6
22539else
22540
22541	cat >"conftest.$ac_ext" <<_ACEOF
22542#line 22542 "configure"
22543#include "confdefs.h"
22544
22545	#include <stdio.h>
22546	#include <stdlib.h>
22547	#include <math.h>
22548
22549int
22550main (void)
22551{
22552double x = rand(); printf("result = %g\\n", sin(x))
22553  ;
22554  return 0;
22555}
22556_ACEOF
22557rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22558if { (eval echo "$as_me:22558: \"$ac_link\"") >&5
22559  (eval $ac_link) 2>&5
22560  ac_status=$?
22561  echo "$as_me:22561: \$? = $ac_status" >&5
22562  (exit "$ac_status"); } &&
22563         { ac_try='test -s "conftest$ac_exeext"'
22564  { (eval echo "$as_me:22564: \"$ac_try\"") >&5
22565  (eval $ac_try) 2>&5
22566  ac_status=$?
22567  echo "$as_me:22567: \$? = $ac_status" >&5
22568  (exit "$ac_status"); }; }; then
22569  cf_cv_need_libm=no
22570else
22571  echo "$as_me: failed program was:" >&5
22572cat "conftest.$ac_ext" >&5
22573cf_cv_need_libm=yes
22574fi
22575rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22576fi
22577echo "$as_me:22577: result: $cf_cv_need_libm" >&5
22578echo "${ECHO_T}$cf_cv_need_libm" >&6
22579if test "$cf_cv_need_libm" = yes
22580then
22581
22582cf_add_libs="$LIBS"
22583# reverse order
22584cf_add_0lib=
22585for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22586# filter duplicates
22587for cf_add_1lib in $cf_add_0lib; do
22588	for cf_add_2lib in $cf_add_libs; do
22589		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22590			cf_add_1lib=
22591			break
22592		fi
22593	done
22594	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22595done
22596LIBS="$cf_add_libs"
22597
22598fi
22599
22600fi
22601
22602echo "$as_me:22602: checking if you want sixel graphics support" >&5
22603echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
22604
22605# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
22606if test "${enable_sixel_graphics+set}" = set; then
22607  enableval="$enable_sixel_graphics"
22608  test "$enableval" != no && enableval=yes
22609	if test "$enableval" != "yes" ; then
22610    enable_sixel_graphics=no
22611	else
22612		enable_sixel_graphics=yes
22613	fi
22614else
22615  enableval=yes
22616	enable_sixel_graphics=yes
22617
22618fi;
22619echo "$as_me:22619: result: $enable_sixel_graphics" >&5
22620echo "${ECHO_T}$enable_sixel_graphics" >&6
22621if test "$enable_sixel_graphics" = yes ; then
22622
22623cat >>confdefs.h <<\EOF
22624#define OPT_SIXEL_GRAPHICS 1
22625EOF
22626
22627	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
22628	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
22629	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
22630fi
22631
22632if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
22633
22634cat >>confdefs.h <<\EOF
22635#define OPT_GRAPHICS 1
22636EOF
22637
22638	EXTRAHDRS="$EXTRAHDRS graphics.h"
22639	EXTRASRCS="$EXTRASRCS graphics.c"
22640	EXTRAOBJS="$EXTRAOBJS graphics.o"
22641fi
22642
22643echo "$as_me:22643: checking if you want sixel screen dump support" >&5
22644echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
22645
22646# Check whether --enable-print-graphics or --disable-print-graphics was given.
22647if test "${enable_print_graphics+set}" = set; then
22648  enableval="$enable_print_graphics"
22649  test "$enableval" != no && enableval=yes
22650	if test "$enableval" != "yes" ; then
22651    enable_print_graphics=no
22652	else
22653		enable_print_graphics=$enable_regis_graphics
22654	fi
22655else
22656  enableval=yes
22657	enable_print_graphics=$enable_regis_graphics
22658
22659fi;
22660echo "$as_me:22660: result: $enable_print_graphics" >&5
22661echo "${ECHO_T}$enable_print_graphics" >&6
22662if test "$enable_print_graphics" = yes ; then
22663
22664cat >>confdefs.h <<\EOF
22665#define OPT_PRINT_GRAPHICS 1
22666EOF
22667
22668fi
22669
22670echo "$as_me:22670: checking if you want VT420 rectangle support" >&5
22671echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
22672
22673# Check whether --enable-rectangles or --disable-rectangles was given.
22674if test "${enable_rectangles+set}" = set; then
22675  enableval="$enable_rectangles"
22676  test "$enableval" != no && enableval=yes
22677	if test "$enableval" != "yes" ; then
22678    enable_rectangles=no
22679	else
22680		enable_rectangles=yes
22681	fi
22682else
22683  enableval=yes
22684	enable_rectangles=yes
22685
22686fi;
22687echo "$as_me:22687: result: $enable_rectangles" >&5
22688echo "${ECHO_T}$enable_rectangles" >&6
22689if test "$enable_rectangles" = no ; then
22690
22691cat >>confdefs.h <<\EOF
22692#define OPT_DEC_RECTOPS 0
22693EOF
22694
22695fi
22696
22697echo "$as_me:22697: checking if you want -ziconbeep option" >&5
22698echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
22699
22700# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
22701if test "${enable_ziconbeep+set}" = set; then
22702  enableval="$enable_ziconbeep"
22703  test "$enableval" != no && enableval=yes
22704	if test "$enableval" != "yes" ; then
22705    enable_ziconbeep=no
22706	else
22707		enable_ziconbeep=yes
22708	fi
22709else
22710  enableval=yes
22711	enable_ziconbeep=yes
22712
22713fi;
22714echo "$as_me:22714: result: $enable_ziconbeep" >&5
22715echo "${ECHO_T}$enable_ziconbeep" >&6
22716test "$enable_ziconbeep" = no &&
22717cat >>confdefs.h <<\EOF
22718#define OPT_ZICONBEEP 0
22719EOF
22720
22721###############################################################################
22722
22723echo "$as_me:22723: checking if you want debugging traces" >&5
22724echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
22725
22726# Check whether --enable-trace or --disable-trace was given.
22727if test "${enable_trace+set}" = set; then
22728  enableval="$enable_trace"
22729  test "$enableval" != yes && enableval=no
22730	if test "$enableval" != "no" ; then
22731    enable_trace=yes
22732	else
22733		enable_trace=no
22734	fi
22735else
22736  enableval=no
22737	enable_trace=no
22738
22739fi;
22740echo "$as_me:22740: result: $enable_trace" >&5
22741echo "${ECHO_T}$enable_trace" >&6
22742if test "$enable_trace" = yes ; then
22743
22744cat >>confdefs.h <<\EOF
22745#define OPT_TRACE 1
22746EOF
22747
22748	EXTRASRCS="$EXTRASRCS trace.c"
22749	EXTRAOBJS="$EXTRAOBJS trace.o"
22750fi
22751
22752echo "$as_me:22752: checking if you want to use dmalloc for testing" >&5
22753echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22754
22755# Check whether --with-dmalloc or --without-dmalloc was given.
22756if test "${with_dmalloc+set}" = set; then
22757  withval="$with_dmalloc"
22758  case "x$withval" in
22759	(x|xno) ;;
22760	(*)
22761		: "${with_cflags:=-g}"
22762		: "${enable_leaks:=no}"
22763		with_dmalloc=yes
22764
22765cat >>confdefs.h <<EOF
22766#define USE_DMALLOC 1
22767EOF
22768
22769		;;
22770	esac
22771else
22772  with_dmalloc=
22773fi;
22774echo "$as_me:22774: result: ${with_dmalloc:-no}" >&5
22775echo "${ECHO_T}${with_dmalloc:-no}" >&6
22776
22777case ".$with_cflags" in
22778(.*-g*)
22779	case .$CFLAGS in
22780	(.*-g*)
22781		;;
22782	(*)
22783
22784cf_fix_cppflags=no
22785cf_new_cflags=
22786cf_new_cppflags=
22787cf_new_extra_cppflags=
22788
22789for cf_add_cflags in -g
22790do
22791case "$cf_fix_cppflags" in
22792(no)
22793	case "$cf_add_cflags" in
22794	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22795		case "$cf_add_cflags" in
22796		(-D*)
22797			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22798
22799			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22800				&& test -z "${cf_tst_cflags}" \
22801				&& cf_fix_cppflags=yes
22802
22803			if test "$cf_fix_cppflags" = yes ; then
22804
22805	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22806	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22807
22808				continue
22809			elif test "${cf_tst_cflags}" = "\"'" ; then
22810
22811	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22812	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22813
22814				continue
22815			fi
22816			;;
22817		esac
22818		case "$CPPFLAGS" in
22819		(*$cf_add_cflags)
22820			;;
22821		(*)
22822			case "$cf_add_cflags" in
22823			(-D*)
22824				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22825
22826CPPFLAGS=`echo "$CPPFLAGS" | \
22827	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22828		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22829
22830				;;
22831			esac
22832
22833	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22834	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22835
22836			;;
22837		esac
22838		;;
22839	(*)
22840
22841	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22842	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22843
22844		;;
22845	esac
22846	;;
22847(yes)
22848
22849	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22850	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22851
22852	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22853
22854	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22855		&& test -z "${cf_tst_cflags}" \
22856		&& cf_fix_cppflags=no
22857	;;
22858esac
22859done
22860
22861if test -n "$cf_new_cflags" ; then
22862
22863	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22864	CFLAGS="${CFLAGS}$cf_new_cflags"
22865
22866fi
22867
22868if test -n "$cf_new_cppflags" ; then
22869
22870	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22871	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22872
22873fi
22874
22875if test -n "$cf_new_extra_cppflags" ; then
22876
22877	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22878	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22879
22880fi
22881
22882		;;
22883	esac
22884	;;
22885esac
22886
22887if test "$with_dmalloc" = yes ; then
22888	echo "$as_me:22888: checking for dmalloc.h" >&5
22889echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22890if test "${ac_cv_header_dmalloc_h+set}" = set; then
22891  echo $ECHO_N "(cached) $ECHO_C" >&6
22892else
22893  cat >"conftest.$ac_ext" <<_ACEOF
22894#line 22894 "configure"
22895#include "confdefs.h"
22896#include <dmalloc.h>
22897_ACEOF
22898if { (eval echo "$as_me:22898: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22899  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22900  ac_status=$?
22901  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22902  rm -f conftest.er1
22903  cat conftest.err >&5
22904  echo "$as_me:22904: \$? = $ac_status" >&5
22905  (exit "$ac_status"); } >/dev/null; then
22906  if test -s conftest.err; then
22907    ac_cpp_err=$ac_c_preproc_warn_flag
22908  else
22909    ac_cpp_err=
22910  fi
22911else
22912  ac_cpp_err=yes
22913fi
22914if test -z "$ac_cpp_err"; then
22915  ac_cv_header_dmalloc_h=yes
22916else
22917  echo "$as_me: failed program was:" >&5
22918  cat "conftest.$ac_ext" >&5
22919  ac_cv_header_dmalloc_h=no
22920fi
22921rm -f conftest.err "conftest.$ac_ext"
22922fi
22923echo "$as_me:22923: result: $ac_cv_header_dmalloc_h" >&5
22924echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22925if test "$ac_cv_header_dmalloc_h" = yes; then
22926
22927echo "$as_me:22927: checking for dmalloc_debug in -ldmalloc" >&5
22928echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22929if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22930  echo $ECHO_N "(cached) $ECHO_C" >&6
22931else
22932  ac_check_lib_save_LIBS=$LIBS
22933LIBS="-ldmalloc  $LIBS"
22934cat >"conftest.$ac_ext" <<_ACEOF
22935#line 22935 "configure"
22936#include "confdefs.h"
22937
22938/* Override any gcc2 internal prototype to avoid an error.  */
22939#ifdef __cplusplus
22940extern "C"
22941#endif
22942/* We use char because int might match the return type of a gcc2
22943   builtin and then its argument prototype would still apply.  */
22944char dmalloc_debug ();
22945int
22946main (void)
22947{
22948dmalloc_debug ();
22949  ;
22950  return 0;
22951}
22952_ACEOF
22953rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22954if { (eval echo "$as_me:22954: \"$ac_link\"") >&5
22955  (eval $ac_link) 2>&5
22956  ac_status=$?
22957  echo "$as_me:22957: \$? = $ac_status" >&5
22958  (exit "$ac_status"); } &&
22959         { ac_try='test -s "conftest$ac_exeext"'
22960  { (eval echo "$as_me:22960: \"$ac_try\"") >&5
22961  (eval $ac_try) 2>&5
22962  ac_status=$?
22963  echo "$as_me:22963: \$? = $ac_status" >&5
22964  (exit "$ac_status"); }; }; then
22965  ac_cv_lib_dmalloc_dmalloc_debug=yes
22966else
22967  echo "$as_me: failed program was:" >&5
22968cat "conftest.$ac_ext" >&5
22969ac_cv_lib_dmalloc_dmalloc_debug=no
22970fi
22971rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22972LIBS=$ac_check_lib_save_LIBS
22973fi
22974echo "$as_me:22974: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22975echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22976if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22977  cat >>confdefs.h <<EOF
22978#define HAVE_LIBDMALLOC 1
22979EOF
22980
22981  LIBS="-ldmalloc $LIBS"
22982
22983fi
22984
22985fi
22986
22987fi
22988
22989echo "$as_me:22989: checking if you want to use dbmalloc for testing" >&5
22990echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22991
22992# Check whether --with-dbmalloc or --without-dbmalloc was given.
22993if test "${with_dbmalloc+set}" = set; then
22994  withval="$with_dbmalloc"
22995  case "x$withval" in
22996	(x|xno) ;;
22997	(*)
22998		: "${with_cflags:=-g}"
22999		: "${enable_leaks:=no}"
23000		with_dbmalloc=yes
23001
23002cat >>confdefs.h <<EOF
23003#define USE_DBMALLOC 1
23004EOF
23005
23006		;;
23007	esac
23008else
23009  with_dbmalloc=
23010fi;
23011echo "$as_me:23011: result: ${with_dbmalloc:-no}" >&5
23012echo "${ECHO_T}${with_dbmalloc:-no}" >&6
23013
23014case ".$with_cflags" in
23015(.*-g*)
23016	case .$CFLAGS in
23017	(.*-g*)
23018		;;
23019	(*)
23020
23021cf_fix_cppflags=no
23022cf_new_cflags=
23023cf_new_cppflags=
23024cf_new_extra_cppflags=
23025
23026for cf_add_cflags in -g
23027do
23028case "$cf_fix_cppflags" in
23029(no)
23030	case "$cf_add_cflags" in
23031	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23032		case "$cf_add_cflags" in
23033		(-D*)
23034			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23035
23036			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23037				&& test -z "${cf_tst_cflags}" \
23038				&& cf_fix_cppflags=yes
23039
23040			if test "$cf_fix_cppflags" = yes ; then
23041
23042	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23043	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23044
23045				continue
23046			elif test "${cf_tst_cflags}" = "\"'" ; then
23047
23048	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23049	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23050
23051				continue
23052			fi
23053			;;
23054		esac
23055		case "$CPPFLAGS" in
23056		(*$cf_add_cflags)
23057			;;
23058		(*)
23059			case "$cf_add_cflags" in
23060			(-D*)
23061				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23062
23063CPPFLAGS=`echo "$CPPFLAGS" | \
23064	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23065		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23066
23067				;;
23068			esac
23069
23070	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23071	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23072
23073			;;
23074		esac
23075		;;
23076	(*)
23077
23078	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23079	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23080
23081		;;
23082	esac
23083	;;
23084(yes)
23085
23086	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23087	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23088
23089	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23090
23091	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23092		&& test -z "${cf_tst_cflags}" \
23093		&& cf_fix_cppflags=no
23094	;;
23095esac
23096done
23097
23098if test -n "$cf_new_cflags" ; then
23099
23100	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23101	CFLAGS="${CFLAGS}$cf_new_cflags"
23102
23103fi
23104
23105if test -n "$cf_new_cppflags" ; then
23106
23107	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23108	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23109
23110fi
23111
23112if test -n "$cf_new_extra_cppflags" ; then
23113
23114	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23115	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23116
23117fi
23118
23119		;;
23120	esac
23121	;;
23122esac
23123
23124if test "$with_dbmalloc" = yes ; then
23125	echo "$as_me:23125: checking for dbmalloc.h" >&5
23126echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23127if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23128  echo $ECHO_N "(cached) $ECHO_C" >&6
23129else
23130  cat >"conftest.$ac_ext" <<_ACEOF
23131#line 23131 "configure"
23132#include "confdefs.h"
23133#include <dbmalloc.h>
23134_ACEOF
23135if { (eval echo "$as_me:23135: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23136  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23137  ac_status=$?
23138  $EGREP -v '^ *\+' conftest.er1 >conftest.err
23139  rm -f conftest.er1
23140  cat conftest.err >&5
23141  echo "$as_me:23141: \$? = $ac_status" >&5
23142  (exit "$ac_status"); } >/dev/null; then
23143  if test -s conftest.err; then
23144    ac_cpp_err=$ac_c_preproc_warn_flag
23145  else
23146    ac_cpp_err=
23147  fi
23148else
23149  ac_cpp_err=yes
23150fi
23151if test -z "$ac_cpp_err"; then
23152  ac_cv_header_dbmalloc_h=yes
23153else
23154  echo "$as_me: failed program was:" >&5
23155  cat "conftest.$ac_ext" >&5
23156  ac_cv_header_dbmalloc_h=no
23157fi
23158rm -f conftest.err "conftest.$ac_ext"
23159fi
23160echo "$as_me:23160: result: $ac_cv_header_dbmalloc_h" >&5
23161echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23162if test "$ac_cv_header_dbmalloc_h" = yes; then
23163
23164echo "$as_me:23164: checking for debug_malloc in -ldbmalloc" >&5
23165echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23166if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23167  echo $ECHO_N "(cached) $ECHO_C" >&6
23168else
23169  ac_check_lib_save_LIBS=$LIBS
23170LIBS="-ldbmalloc  $LIBS"
23171cat >"conftest.$ac_ext" <<_ACEOF
23172#line 23172 "configure"
23173#include "confdefs.h"
23174
23175/* Override any gcc2 internal prototype to avoid an error.  */
23176#ifdef __cplusplus
23177extern "C"
23178#endif
23179/* We use char because int might match the return type of a gcc2
23180   builtin and then its argument prototype would still apply.  */
23181char debug_malloc ();
23182int
23183main (void)
23184{
23185debug_malloc ();
23186  ;
23187  return 0;
23188}
23189_ACEOF
23190rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23191if { (eval echo "$as_me:23191: \"$ac_link\"") >&5
23192  (eval $ac_link) 2>&5
23193  ac_status=$?
23194  echo "$as_me:23194: \$? = $ac_status" >&5
23195  (exit "$ac_status"); } &&
23196         { ac_try='test -s "conftest$ac_exeext"'
23197  { (eval echo "$as_me:23197: \"$ac_try\"") >&5
23198  (eval $ac_try) 2>&5
23199  ac_status=$?
23200  echo "$as_me:23200: \$? = $ac_status" >&5
23201  (exit "$ac_status"); }; }; then
23202  ac_cv_lib_dbmalloc_debug_malloc=yes
23203else
23204  echo "$as_me: failed program was:" >&5
23205cat "conftest.$ac_ext" >&5
23206ac_cv_lib_dbmalloc_debug_malloc=no
23207fi
23208rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23209LIBS=$ac_check_lib_save_LIBS
23210fi
23211echo "$as_me:23211: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23212echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23213if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23214  cat >>confdefs.h <<EOF
23215#define HAVE_LIBDBMALLOC 1
23216EOF
23217
23218  LIBS="-ldbmalloc $LIBS"
23219
23220fi
23221
23222fi
23223
23224fi
23225
23226echo "$as_me:23226: checking if you want to use valgrind for testing" >&5
23227echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23228
23229# Check whether --with-valgrind or --without-valgrind was given.
23230if test "${with_valgrind+set}" = set; then
23231  withval="$with_valgrind"
23232  case "x$withval" in
23233	(x|xno) ;;
23234	(*)
23235		: "${with_cflags:=-g}"
23236		: "${enable_leaks:=no}"
23237		with_valgrind=yes
23238
23239cat >>confdefs.h <<EOF
23240#define USE_VALGRIND 1
23241EOF
23242
23243		;;
23244	esac
23245else
23246  with_valgrind=
23247fi;
23248echo "$as_me:23248: result: ${with_valgrind:-no}" >&5
23249echo "${ECHO_T}${with_valgrind:-no}" >&6
23250
23251case ".$with_cflags" in
23252(.*-g*)
23253	case .$CFLAGS in
23254	(.*-g*)
23255		;;
23256	(*)
23257
23258cf_fix_cppflags=no
23259cf_new_cflags=
23260cf_new_cppflags=
23261cf_new_extra_cppflags=
23262
23263for cf_add_cflags in -g
23264do
23265case "$cf_fix_cppflags" in
23266(no)
23267	case "$cf_add_cflags" in
23268	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23269		case "$cf_add_cflags" in
23270		(-D*)
23271			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23272
23273			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23274				&& test -z "${cf_tst_cflags}" \
23275				&& cf_fix_cppflags=yes
23276
23277			if test "$cf_fix_cppflags" = yes ; then
23278
23279	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23280	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23281
23282				continue
23283			elif test "${cf_tst_cflags}" = "\"'" ; then
23284
23285	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23286	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23287
23288				continue
23289			fi
23290			;;
23291		esac
23292		case "$CPPFLAGS" in
23293		(*$cf_add_cflags)
23294			;;
23295		(*)
23296			case "$cf_add_cflags" in
23297			(-D*)
23298				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23299
23300CPPFLAGS=`echo "$CPPFLAGS" | \
23301	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23302		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23303
23304				;;
23305			esac
23306
23307	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23308	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23309
23310			;;
23311		esac
23312		;;
23313	(*)
23314
23315	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23316	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23317
23318		;;
23319	esac
23320	;;
23321(yes)
23322
23323	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23324	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23325
23326	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23327
23328	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23329		&& test -z "${cf_tst_cflags}" \
23330		&& cf_fix_cppflags=no
23331	;;
23332esac
23333done
23334
23335if test -n "$cf_new_cflags" ; then
23336
23337	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23338	CFLAGS="${CFLAGS}$cf_new_cflags"
23339
23340fi
23341
23342if test -n "$cf_new_cppflags" ; then
23343
23344	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23345	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23346
23347fi
23348
23349if test -n "$cf_new_extra_cppflags" ; then
23350
23351	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23352	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23353
23354fi
23355
23356		;;
23357	esac
23358	;;
23359esac
23360
23361echo "$as_me:23361: checking if you want to perform memory-leak testing" >&5
23362echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23363
23364# Check whether --enable-leaks or --disable-leaks was given.
23365if test "${enable_leaks+set}" = set; then
23366  enableval="$enable_leaks"
23367  enable_leaks=$enableval
23368else
23369  enable_leaks=yes
23370fi;
23371if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23372echo "$as_me:23372: result: $with_no_leaks" >&5
23373echo "${ECHO_T}$with_no_leaks" >&6
23374
23375if test "$enable_leaks" = no ; then
23376
23377cat >>confdefs.h <<\EOF
23378#define NO_LEAKS 1
23379EOF
23380
23381cat >>confdefs.h <<\EOF
23382#define YY_NO_LEAKS 1
23383EOF
23384
23385fi
23386
23387echo "$as_me:23387: checking if you want to see long compiling messages" >&5
23388echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
23389
23390# Check whether --enable-echo or --disable-echo was given.
23391if test "${enable_echo+set}" = set; then
23392  enableval="$enable_echo"
23393  test "$enableval" != no && enableval=yes
23394	if test "$enableval" != "yes" ; then
23395
23396	ECHO_LT='--silent'
23397	ECHO_LD='@echo linking $@;'
23398	RULE_CC='@echo compiling $<'
23399	SHOW_CC='@echo compiling $@'
23400	ECHO_CC='@'
23401
23402	else
23403
23404	ECHO_LT=''
23405	ECHO_LD=''
23406	RULE_CC=''
23407	SHOW_CC=''
23408	ECHO_CC=''
23409
23410	fi
23411else
23412  enableval=yes
23413
23414	ECHO_LT=''
23415	ECHO_LD=''
23416	RULE_CC=''
23417	SHOW_CC=''
23418	ECHO_CC=''
23419
23420fi;
23421echo "$as_me:23421: result: $enableval" >&5
23422echo "${ECHO_T}$enableval" >&6
23423
23424echo "$as_me:23424: checking if you want magic cookie emulation" >&5
23425echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
23426
23427# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
23428if test "${enable_xmc_glitch+set}" = set; then
23429  enableval="$enable_xmc_glitch"
23430  test "$enableval" != yes && enableval=no
23431	if test "$enableval" != "no" ; then
23432    enable_xmc=yes
23433	else
23434		enable_xmc=no
23435	fi
23436else
23437  enableval=no
23438	enable_xmc=no
23439
23440fi;
23441echo "$as_me:23441: result: $enable_xmc" >&5
23442echo "${ECHO_T}$enable_xmc" >&6
23443if test "$enable_xmc" = yes ; then
23444
23445cat >>confdefs.h <<\EOF
23446#define OPT_XMC_GLITCH 1
23447EOF
23448
23449	EXTRASRCS="$EXTRASRCS testxmc.c"
23450	EXTRAOBJS="$EXTRAOBJS testxmc.o"
23451fi
23452
23453for ac_func in tigetstr
23454do
23455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23456echo "$as_me:23456: checking for $ac_func" >&5
23457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23458if eval "test \"\${$as_ac_var+set}\" = set"; then
23459  echo $ECHO_N "(cached) $ECHO_C" >&6
23460else
23461  cat >"conftest.$ac_ext" <<_ACEOF
23462#line 23462 "configure"
23463#include "confdefs.h"
23464#define $ac_func autoconf_temporary
23465#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23466#undef $ac_func
23467
23468#ifdef __cplusplus
23469extern "C"
23470#endif
23471
23472/* We use char because int might match the return type of a gcc2
23473   builtin and then its argument prototype would still apply.  */
23474char $ac_func (void);
23475
23476int
23477main (void)
23478{
23479
23480/* The GNU C library defines stubs for functions which it implements
23481    to always fail with ENOSYS.  Some functions are actually named
23482    something starting with __ and the normal name is an alias.  */
23483#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23484#error found stub for $ac_func
23485#endif
23486
23487	return $ac_func ();
23488  ;
23489  return 0;
23490}
23491_ACEOF
23492rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23493if { (eval echo "$as_me:23493: \"$ac_link\"") >&5
23494  (eval $ac_link) 2>&5
23495  ac_status=$?
23496  echo "$as_me:23496: \$? = $ac_status" >&5
23497  (exit "$ac_status"); } &&
23498         { ac_try='test -s "conftest$ac_exeext"'
23499  { (eval echo "$as_me:23499: \"$ac_try\"") >&5
23500  (eval $ac_try) 2>&5
23501  ac_status=$?
23502  echo "$as_me:23502: \$? = $ac_status" >&5
23503  (exit "$ac_status"); }; }; then
23504  eval "$as_ac_var=yes"
23505else
23506  echo "$as_me: failed program was:" >&5
23507cat "conftest.$ac_ext" >&5
23508eval "$as_ac_var=no"
23509fi
23510rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23511fi
23512echo "$as_me:23512: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23513echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23514if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23515  cat >>confdefs.h <<EOF
23516#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23517EOF
23518
23519fi
23520done
23521
23522if test -n "$cf_cv_lib_part_tgetent"; then
23523
23524for ac_func in use_extended_names
23525do
23526as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23527echo "$as_me:23527: checking for $ac_func" >&5
23528echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23529if eval "test \"\${$as_ac_var+set}\" = set"; then
23530  echo $ECHO_N "(cached) $ECHO_C" >&6
23531else
23532  cat >"conftest.$ac_ext" <<_ACEOF
23533#line 23533 "configure"
23534#include "confdefs.h"
23535#define $ac_func autoconf_temporary
23536#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23537#undef $ac_func
23538
23539#ifdef __cplusplus
23540extern "C"
23541#endif
23542
23543/* We use char because int might match the return type of a gcc2
23544   builtin and then its argument prototype would still apply.  */
23545char $ac_func (void);
23546
23547int
23548main (void)
23549{
23550
23551/* The GNU C library defines stubs for functions which it implements
23552    to always fail with ENOSYS.  Some functions are actually named
23553    something starting with __ and the normal name is an alias.  */
23554#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23555#error found stub for $ac_func
23556#endif
23557
23558	return $ac_func ();
23559  ;
23560  return 0;
23561}
23562_ACEOF
23563rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23564if { (eval echo "$as_me:23564: \"$ac_link\"") >&5
23565  (eval $ac_link) 2>&5
23566  ac_status=$?
23567  echo "$as_me:23567: \$? = $ac_status" >&5
23568  (exit "$ac_status"); } &&
23569         { ac_try='test -s "conftest$ac_exeext"'
23570  { (eval echo "$as_me:23570: \"$ac_try\"") >&5
23571  (eval $ac_try) 2>&5
23572  ac_status=$?
23573  echo "$as_me:23573: \$? = $ac_status" >&5
23574  (exit "$ac_status"); }; }; then
23575  eval "$as_ac_var=yes"
23576else
23577  echo "$as_me: failed program was:" >&5
23578cat "conftest.$ac_ext" >&5
23579eval "$as_ac_var=no"
23580fi
23581rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23582fi
23583echo "$as_me:23583: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23584echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23585if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23586  cat >>confdefs.h <<EOF
23587#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23588EOF
23589
23590fi
23591done
23592
23593fi
23594
23595echo "$as_me:23595: checking if you want to use C11 _Noreturn feature" >&5
23596echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
23597
23598# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
23599if test "${enable_stdnoreturn+set}" = set; then
23600  enableval="$enable_stdnoreturn"
23601  test "$enableval" != yes && enableval=no
23602	if test "$enableval" != "no" ; then
23603    enable_stdnoreturn=yes
23604	else
23605		enable_stdnoreturn=no
23606	fi
23607else
23608  enableval=no
23609	enable_stdnoreturn=no
23610
23611fi;
23612echo "$as_me:23612: result: $enable_stdnoreturn" >&5
23613echo "${ECHO_T}$enable_stdnoreturn" >&6
23614
23615if test $enable_stdnoreturn = yes; then
23616echo "$as_me:23616: checking for C11 _Noreturn feature" >&5
23617echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
23618if test "${cf_cv_c11_noreturn+set}" = set; then
23619  echo $ECHO_N "(cached) $ECHO_C" >&6
23620else
23621  cat >"conftest.$ac_ext" <<_ACEOF
23622#line 23622 "configure"
23623#include "confdefs.h"
23624
23625#include <stdio.h>
23626#include <stdlib.h>
23627#include <stdnoreturn.h>
23628static _Noreturn void giveup(void) { exit(0); }
23629
23630int
23631main (void)
23632{
23633if (feof(stdin)) giveup()
23634  ;
23635  return 0;
23636}
23637_ACEOF
23638rm -f "conftest.$ac_objext"
23639if { (eval echo "$as_me:23639: \"$ac_compile\"") >&5
23640  (eval $ac_compile) 2>&5
23641  ac_status=$?
23642  echo "$as_me:23642: \$? = $ac_status" >&5
23643  (exit "$ac_status"); } &&
23644         { ac_try='test -s "conftest.$ac_objext"'
23645  { (eval echo "$as_me:23645: \"$ac_try\"") >&5
23646  (eval $ac_try) 2>&5
23647  ac_status=$?
23648  echo "$as_me:23648: \$? = $ac_status" >&5
23649  (exit "$ac_status"); }; }; then
23650  cf_cv_c11_noreturn=yes
23651else
23652  echo "$as_me: failed program was:" >&5
23653cat "conftest.$ac_ext" >&5
23654cf_cv_c11_noreturn=no
23655fi
23656rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23657
23658fi
23659echo "$as_me:23659: result: $cf_cv_c11_noreturn" >&5
23660echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
23661else
23662	cf_cv_c11_noreturn=no,
23663fi
23664
23665if test "$cf_cv_c11_noreturn" = yes; then
23666
23667cat >>confdefs.h <<\EOF
23668#define HAVE_STDNORETURN_H 1
23669EOF
23670
23671cat >>confdefs.h <<EOF
23672#define STDC_NORETURN _Noreturn
23673EOF
23674
23675	HAVE_STDNORETURN_H=1
23676else
23677	HAVE_STDNORETURN_H=0
23678fi
23679
23680if test "$GCC" = yes || test "$GXX" = yes
23681then
23682
23683if test "$GCC" = yes || test "$GXX" = yes
23684then
23685	case $CFLAGS in
23686	(*-Werror=*)
23687		cf_temp_flags=
23688		for cf_temp_scan in $CFLAGS
23689		do
23690			case "x$cf_temp_scan" in
23691			(x-Werror=format*)
23692
23693	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23694	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23695
23696				;;
23697			(x-Werror=*)
23698
23699	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23700	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23701
23702				;;
23703			(*)
23704
23705	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23706	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23707
23708				;;
23709			esac
23710		done
23711		if test "x$CFLAGS" != "x$cf_temp_flags"
23712		then
23713			test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
23714
23715echo "${as_me:-configure}:23715: testing repairing CFLAGS: $CFLAGS ..." 1>&5
23716
23717			CFLAGS="$cf_temp_flags"
23718			test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
23719
23720echo "${as_me:-configure}:23720: testing ... fixed $CFLAGS ..." 1>&5
23721
23722			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23723
23724echo "${as_me:-configure}:23724: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23725
23726		fi
23727		;;
23728	esac
23729fi
23730
23731if test "$GCC" = yes || test "$GXX" = yes
23732then
23733	case $CPPFLAGS in
23734	(*-Werror=*)
23735		cf_temp_flags=
23736		for cf_temp_scan in $CPPFLAGS
23737		do
23738			case "x$cf_temp_scan" in
23739			(x-Werror=format*)
23740
23741	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23742	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23743
23744				;;
23745			(x-Werror=*)
23746
23747	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23748	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23749
23750				;;
23751			(*)
23752
23753	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23754	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23755
23756				;;
23757			esac
23758		done
23759		if test "x$CPPFLAGS" != "x$cf_temp_flags"
23760		then
23761			test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
23762
23763echo "${as_me:-configure}:23763: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
23764
23765			CPPFLAGS="$cf_temp_flags"
23766			test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
23767
23768echo "${as_me:-configure}:23768: testing ... fixed $CPPFLAGS ..." 1>&5
23769
23770			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23771
23772echo "${as_me:-configure}:23772: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23773
23774		fi
23775		;;
23776	esac
23777fi
23778
23779if test "$GCC" = yes || test "$GXX" = yes
23780then
23781	case $LDFLAGS in
23782	(*-Werror=*)
23783		cf_temp_flags=
23784		for cf_temp_scan in $LDFLAGS
23785		do
23786			case "x$cf_temp_scan" in
23787			(x-Werror=format*)
23788
23789	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23790	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23791
23792				;;
23793			(x-Werror=*)
23794
23795	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23796	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23797
23798				;;
23799			(*)
23800
23801	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23802	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23803
23804				;;
23805			esac
23806		done
23807		if test "x$LDFLAGS" != "x$cf_temp_flags"
23808		then
23809			test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
23810
23811echo "${as_me:-configure}:23811: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
23812
23813			LDFLAGS="$cf_temp_flags"
23814			test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
23815
23816echo "${as_me:-configure}:23816: testing ... fixed $LDFLAGS ..." 1>&5
23817
23818			test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23819
23820echo "${as_me:-configure}:23820: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23821
23822		fi
23823		;;
23824	esac
23825fi
23826
23827echo "$as_me:23827: checking if you want to turn on gcc warnings" >&5
23828echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
23829
23830# Check whether --enable-warnings or --disable-warnings was given.
23831if test "${enable_warnings+set}" = set; then
23832  enableval="$enable_warnings"
23833  test "$enableval" != yes && enableval=no
23834	if test "$enableval" != "no" ; then
23835    enable_warnings=yes
23836	else
23837		enable_warnings=no
23838	fi
23839else
23840  enableval=no
23841	enable_warnings=no
23842
23843fi;
23844echo "$as_me:23844: result: $enable_warnings" >&5
23845echo "${ECHO_T}$enable_warnings" >&6
23846if test "$enable_warnings" = "yes"
23847then
23848
23849if test "$GCC" = yes || test "$GXX" = yes
23850then
23851cat > conftest.i <<EOF
23852#ifndef GCC_PRINTF
23853#define GCC_PRINTF 0
23854#endif
23855#ifndef GCC_SCANF
23856#define GCC_SCANF 0
23857#endif
23858#ifndef GCC_NORETURN
23859#define GCC_NORETURN /* nothing */
23860#endif
23861#ifndef GCC_UNUSED
23862#define GCC_UNUSED /* nothing */
23863#endif
23864EOF
23865if test "$GCC" = yes
23866then
23867	{ echo "$as_me:23867: checking for $CC __attribute__ directives..." >&5
23868echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
23869cat > "conftest.$ac_ext" <<EOF
23870#line 23870 "${as_me:-configure}"
23871#include "confdefs.h"
23872#include "conftest.h"
23873#include "conftest.i"
23874#if	GCC_PRINTF
23875#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
23876#else
23877#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
23878#endif
23879#if	GCC_SCANF
23880#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
23881#else
23882#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
23883#endif
23884extern void wow(char *,...) GCC_SCANFLIKE(1,2);
23885extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
23886extern GCC_NORETURN void foo(void);
23887int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
23888EOF
23889	cf_printf_attribute=no
23890	cf_scanf_attribute=no
23891	for cf_attribute in scanf printf unused noreturn
23892	do
23893
23894cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23895
23896		cf_directive="__attribute__(($cf_attribute))"
23897		echo "checking for $CC $cf_directive" 1>&5
23898
23899		case "$cf_attribute" in
23900		(printf)
23901			cf_printf_attribute=yes
23902			cat >conftest.h <<EOF
23903#define GCC_$cf_ATTRIBUTE 1
23904EOF
23905			;;
23906		(scanf)
23907			cf_scanf_attribute=yes
23908			cat >conftest.h <<EOF
23909#define GCC_$cf_ATTRIBUTE 1
23910EOF
23911			;;
23912		(*)
23913			cat >conftest.h <<EOF
23914#define GCC_$cf_ATTRIBUTE $cf_directive
23915EOF
23916			;;
23917		esac
23918
23919		if { (eval echo "$as_me:23919: \"$ac_compile\"") >&5
23920  (eval $ac_compile) 2>&5
23921  ac_status=$?
23922  echo "$as_me:23922: \$? = $ac_status" >&5
23923  (exit "$ac_status"); }; then
23924			test -n "$verbose" && echo "$as_me:23924: result: ... $cf_attribute" >&5
23925echo "${ECHO_T}... $cf_attribute" >&6
23926			cat conftest.h >>confdefs.h
23927			case "$cf_attribute" in
23928			(noreturn)
23929
23930cat >>confdefs.h <<EOF
23931#define GCC_NORETURN $cf_directive
23932EOF
23933
23934				;;
23935			(printf)
23936				cf_value='/* nothing */'
23937				if test "$cf_printf_attribute" != no ; then
23938					cf_value='__attribute__((format(printf,fmt,var)))'
23939
23940cat >>confdefs.h <<\EOF
23941#define GCC_PRINTF 1
23942EOF
23943
23944				fi
23945
23946cat >>confdefs.h <<EOF
23947#define GCC_PRINTFLIKE(fmt,var) $cf_value
23948EOF
23949
23950				;;
23951			(scanf)
23952				cf_value='/* nothing */'
23953				if test "$cf_scanf_attribute" != no ; then
23954					cf_value='__attribute__((format(scanf,fmt,var)))'
23955
23956cat >>confdefs.h <<\EOF
23957#define GCC_SCANF 1
23958EOF
23959
23960				fi
23961
23962cat >>confdefs.h <<EOF
23963#define GCC_SCANFLIKE(fmt,var) $cf_value
23964EOF
23965
23966				;;
23967			(unused)
23968
23969cat >>confdefs.h <<EOF
23970#define GCC_UNUSED $cf_directive
23971EOF
23972
23973				;;
23974			esac
23975		fi
23976	done
23977else
23978	${FGREP-fgrep} define conftest.i >>confdefs.h
23979fi
23980rm -rf ./conftest*
23981fi
23982
23983if test "x$have_x" = xyes; then
23984
23985cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
23986cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
23987cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
23988LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
23989for cf_X_CFLAGS in $X_CFLAGS
23990do
23991	case "x$cf_X_CFLAGS" in
23992	x-[IUD]*)
23993		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
23994		;;
23995	*)
23996		CFLAGS="$CFLAGS $cf_X_CFLAGS"
23997		;;
23998	esac
23999done
24000
24001cat >"conftest.$ac_ext" <<_ACEOF
24002#line 24002 "configure"
24003#include "confdefs.h"
24004
24005#include <stdlib.h>
24006#include <X11/Intrinsic.h>
24007
24008int
24009main (void)
24010{
24011String foo = malloc(1); free((void*)foo)
24012  ;
24013  return 0;
24014}
24015_ACEOF
24016rm -f "conftest.$ac_objext"
24017if { (eval echo "$as_me:24017: \"$ac_compile\"") >&5
24018  (eval $ac_compile) 2>&5
24019  ac_status=$?
24020  echo "$as_me:24020: \$? = $ac_status" >&5
24021  (exit "$ac_status"); } &&
24022         { ac_try='test -s "conftest.$ac_objext"'
24023  { (eval echo "$as_me:24023: \"$ac_try\"") >&5
24024  (eval $ac_try) 2>&5
24025  ac_status=$?
24026  echo "$as_me:24026: \$? = $ac_status" >&5
24027  (exit "$ac_status"); }; }; then
24028
24029echo "$as_me:24029: checking for X11/Xt const-feature" >&5
24030echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
24031if test "${cf_cv_const_x_string+set}" = set; then
24032  echo $ECHO_N "(cached) $ECHO_C" >&6
24033else
24034
24035	cat >"conftest.$ac_ext" <<_ACEOF
24036#line 24036 "configure"
24037#include "confdefs.h"
24038
24039#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
24040#undef  XTSTRINGDEFINES	/* X11R5 and later */
24041#include <stdlib.h>
24042#include <X11/Intrinsic.h>
24043
24044int
24045main (void)
24046{
24047String foo = malloc(1); *foo = 0
24048  ;
24049  return 0;
24050}
24051_ACEOF
24052rm -f "conftest.$ac_objext"
24053if { (eval echo "$as_me:24053: \"$ac_compile\"") >&5
24054  (eval $ac_compile) 2>&5
24055  ac_status=$?
24056  echo "$as_me:24056: \$? = $ac_status" >&5
24057  (exit "$ac_status"); } &&
24058         { ac_try='test -s "conftest.$ac_objext"'
24059  { (eval echo "$as_me:24059: \"$ac_try\"") >&5
24060  (eval $ac_try) 2>&5
24061  ac_status=$?
24062  echo "$as_me:24062: \$? = $ac_status" >&5
24063  (exit "$ac_status"); }; }; then
24064
24065			cf_cv_const_x_string=no
24066
24067else
24068  echo "$as_me: failed program was:" >&5
24069cat "conftest.$ac_ext" >&5
24070
24071			cf_cv_const_x_string=yes
24072
24073fi
24074rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24075
24076fi
24077echo "$as_me:24077: result: $cf_cv_const_x_string" >&5
24078echo "${ECHO_T}$cf_cv_const_x_string" >&6
24079
24080LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
24081CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
24082CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
24083
24084case "$cf_cv_const_x_string" in
24085(no)
24086
24087	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24088	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
24089
24090	;;
24091(*)
24092
24093	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24094	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
24095
24096	;;
24097esac
24098
24099else
24100  echo "$as_me: failed program was:" >&5
24101cat "conftest.$ac_ext" >&5
24102fi
24103rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24104 fi
24105cat > "conftest.$ac_ext" <<EOF
24106#line 24106 "${as_me:-configure}"
24107int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
24108EOF
24109if test "$INTEL_COMPILER" = yes
24110then
24111# The "-wdXXX" options suppress warnings:
24112# remark #1419: external declaration in primary source file
24113# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
24114# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
24115# remark #193: zero used for undefined preprocessing identifier
24116# remark #593: variable "curs_sb_left_arrow" was set but never used
24117# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
24118# remark #869: parameter "tw" was never referenced
24119# remark #981: operands are evaluated in unspecified order
24120# warning #279: controlling expression is constant
24121
24122	{ echo "$as_me:24122: checking for $CC warning options..." >&5
24123echo "$as_me: checking for $CC warning options..." >&6;}
24124	cf_save_CFLAGS="$CFLAGS"
24125	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
24126	for cf_opt in \
24127		wd1419 \
24128		wd1683 \
24129		wd1684 \
24130		wd193 \
24131		wd593 \
24132		wd279 \
24133		wd810 \
24134		wd869 \
24135		wd981
24136	do
24137		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24138		if { (eval echo "$as_me:24138: \"$ac_compile\"") >&5
24139  (eval $ac_compile) 2>&5
24140  ac_status=$?
24141  echo "$as_me:24141: \$? = $ac_status" >&5
24142  (exit "$ac_status"); }; then
24143			test -n "$verbose" && echo "$as_me:24143: result: ... -$cf_opt" >&5
24144echo "${ECHO_T}... -$cf_opt" >&6
24145			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24146		fi
24147	done
24148	CFLAGS="$cf_save_CFLAGS"
24149elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
24150then
24151	{ echo "$as_me:24151: checking for $CC warning options..." >&5
24152echo "$as_me: checking for $CC warning options..." >&6;}
24153	cf_save_CFLAGS="$CFLAGS"
24154	cf_warn_CONST=""
24155	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
24156	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
24157	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
24158	for cf_opt in W Wall \
24159		Wbad-function-cast \
24160		Wcast-align \
24161		Wcast-qual \
24162		Wdeclaration-after-statement \
24163		Wextra \
24164		Winline \
24165		Wmissing-declarations \
24166		Wmissing-prototypes \
24167		Wnested-externs \
24168		Wpointer-arith \
24169		Wshadow \
24170		Wstrict-prototypes \
24171		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
24172	do
24173		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24174		if { (eval echo "$as_me:24174: \"$ac_compile\"") >&5
24175  (eval $ac_compile) 2>&5
24176  ac_status=$?
24177  echo "$as_me:24177: \$? = $ac_status" >&5
24178  (exit "$ac_status"); }; then
24179			test -n "$verbose" && echo "$as_me:24179: result: ... -$cf_opt" >&5
24180echo "${ECHO_T}... -$cf_opt" >&6
24181			case "$cf_opt" in
24182			(Winline)
24183				case "$GCC_VERSION" in
24184				([34].*)
24185					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
24186
24187echo "${as_me:-configure}:24187: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24188
24189					continue;;
24190				esac
24191				;;
24192			(Wpointer-arith)
24193				case "$GCC_VERSION" in
24194				([12].*)
24195					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
24196
24197echo "${as_me:-configure}:24197: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24198
24199					continue;;
24200				esac
24201				;;
24202			esac
24203			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24204		fi
24205	done
24206	CFLAGS="$cf_save_CFLAGS"
24207fi
24208rm -rf ./conftest*
24209
24210fi
24211
24212fi
24213
24214test "$disable_setuid" = yes &&
24215cat >>confdefs.h <<\EOF
24216#define DISABLE_SETUID 1
24217EOF
24218
24219test "$disable_setgid" = yes &&
24220cat >>confdefs.h <<\EOF
24221#define DISABLE_SETGID 1
24222EOF
24223
24224if test $disable_setuid = yes ; then
24225	MAY_SETUID="#"
24226	NOT_SETUID=
24227elif test $disable_setgid = yes ; then
24228	MAY_SETUID="#"
24229	NOT_SETUID=
24230else
24231	MAY_SETUID=
24232	NOT_SETUID="#"
24233fi
24234
24235###	remove from CPPFLAGS the optional features we define in xtermcfg.h
24236###	or other conflicting symbols that may be defined via imake:
24237for cf_def in \
24238	__STDC__ \
24239	ALLOWLOGGING \
24240	ALLOWLOGFILEEXEC \
24241	OPT_LUIT_PROG \
24242	OPT_WIDE_CHARS \
24243	SCROLLBAR_RIGHT \
24244	USE_TTY_GROUP \
24245	USE_UTEMPTER \
24246	XRENDERFONT
24247do
24248	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
24249done
24250
24251echo "$as_me:24251: checking if filesystem supports mixed-case filenames" >&5
24252echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
24253if test "${cf_cv_mixedcase+set}" = set; then
24254  echo $ECHO_N "(cached) $ECHO_C" >&6
24255else
24256
24257if test "$cross_compiling" = yes ; then
24258	case "$target_alias" in
24259	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
24260		cf_cv_mixedcase=no
24261		;;
24262	(*)
24263		cf_cv_mixedcase=yes
24264		;;
24265	esac
24266else
24267	rm -f conftest CONFTEST
24268	echo test >conftest
24269	if test -f CONFTEST ; then
24270		cf_cv_mixedcase=no
24271	else
24272		cf_cv_mixedcase=yes
24273	fi
24274	rm -f conftest CONFTEST
24275fi
24276
24277fi
24278echo "$as_me:24278: result: $cf_cv_mixedcase" >&5
24279echo "${ECHO_T}$cf_cv_mixedcase" >&6
24280test "$cf_cv_mixedcase" = yes &&
24281cat >>confdefs.h <<\EOF
24282#define MIXEDCASE_FILENAMES 1
24283EOF
24284
24285for ac_prog in exctags ctags
24286do
24287  # Extract the first word of "$ac_prog", so it can be a program name with args.
24288set dummy $ac_prog; ac_word=$2
24289echo "$as_me:24289: checking for $ac_word" >&5
24290echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24291if test "${ac_cv_prog_CTAGS+set}" = set; then
24292  echo $ECHO_N "(cached) $ECHO_C" >&6
24293else
24294  if test -n "$CTAGS"; then
24295  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
24296else
24297  ac_save_IFS=$IFS; IFS=$ac_path_separator
24298ac_dummy="$PATH"
24299for ac_dir in $ac_dummy; do
24300  IFS=$ac_save_IFS
24301  test -z "$ac_dir" && ac_dir=.
24302  $as_executable_p "$ac_dir/$ac_word" || continue
24303ac_cv_prog_CTAGS="$ac_prog"
24304echo "$as_me:24304: found $ac_dir/$ac_word" >&5
24305break
24306done
24307
24308fi
24309fi
24310CTAGS=$ac_cv_prog_CTAGS
24311if test -n "$CTAGS"; then
24312  echo "$as_me:24312: result: $CTAGS" >&5
24313echo "${ECHO_T}$CTAGS" >&6
24314else
24315  echo "$as_me:24315: result: no" >&5
24316echo "${ECHO_T}no" >&6
24317fi
24318
24319  test -n "$CTAGS" && break
24320done
24321
24322for ac_prog in exetags etags
24323do
24324  # Extract the first word of "$ac_prog", so it can be a program name with args.
24325set dummy $ac_prog; ac_word=$2
24326echo "$as_me:24326: checking for $ac_word" >&5
24327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24328if test "${ac_cv_prog_ETAGS+set}" = set; then
24329  echo $ECHO_N "(cached) $ECHO_C" >&6
24330else
24331  if test -n "$ETAGS"; then
24332  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
24333else
24334  ac_save_IFS=$IFS; IFS=$ac_path_separator
24335ac_dummy="$PATH"
24336for ac_dir in $ac_dummy; do
24337  IFS=$ac_save_IFS
24338  test -z "$ac_dir" && ac_dir=.
24339  $as_executable_p "$ac_dir/$ac_word" || continue
24340ac_cv_prog_ETAGS="$ac_prog"
24341echo "$as_me:24341: found $ac_dir/$ac_word" >&5
24342break
24343done
24344
24345fi
24346fi
24347ETAGS=$ac_cv_prog_ETAGS
24348if test -n "$ETAGS"; then
24349  echo "$as_me:24349: result: $ETAGS" >&5
24350echo "${ECHO_T}$ETAGS" >&6
24351else
24352  echo "$as_me:24352: result: no" >&5
24353echo "${ECHO_T}no" >&6
24354fi
24355
24356  test -n "$ETAGS" && break
24357done
24358
24359# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
24360set dummy ${CTAGS:-ctags}; ac_word=$2
24361echo "$as_me:24361: checking for $ac_word" >&5
24362echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24363if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
24364  echo $ECHO_N "(cached) $ECHO_C" >&6
24365else
24366  if test -n "$MAKE_LOWER_TAGS"; then
24367  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
24368else
24369  ac_save_IFS=$IFS; IFS=$ac_path_separator
24370ac_dummy="$PATH"
24371for ac_dir in $ac_dummy; do
24372  IFS=$ac_save_IFS
24373  test -z "$ac_dir" && ac_dir=.
24374  $as_executable_p "$ac_dir/$ac_word" || continue
24375ac_cv_prog_MAKE_LOWER_TAGS="yes"
24376echo "$as_me:24376: found $ac_dir/$ac_word" >&5
24377break
24378done
24379
24380  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
24381fi
24382fi
24383MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
24384if test -n "$MAKE_LOWER_TAGS"; then
24385  echo "$as_me:24385: result: $MAKE_LOWER_TAGS" >&5
24386echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
24387else
24388  echo "$as_me:24388: result: no" >&5
24389echo "${ECHO_T}no" >&6
24390fi
24391
24392if test "$cf_cv_mixedcase" = yes ; then
24393	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
24394set dummy ${ETAGS:-etags}; ac_word=$2
24395echo "$as_me:24395: checking for $ac_word" >&5
24396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24397if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
24398  echo $ECHO_N "(cached) $ECHO_C" >&6
24399else
24400  if test -n "$MAKE_UPPER_TAGS"; then
24401  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
24402else
24403  ac_save_IFS=$IFS; IFS=$ac_path_separator
24404ac_dummy="$PATH"
24405for ac_dir in $ac_dummy; do
24406  IFS=$ac_save_IFS
24407  test -z "$ac_dir" && ac_dir=.
24408  $as_executable_p "$ac_dir/$ac_word" || continue
24409ac_cv_prog_MAKE_UPPER_TAGS="yes"
24410echo "$as_me:24410: found $ac_dir/$ac_word" >&5
24411break
24412done
24413
24414  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
24415fi
24416fi
24417MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
24418if test -n "$MAKE_UPPER_TAGS"; then
24419  echo "$as_me:24419: result: $MAKE_UPPER_TAGS" >&5
24420echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
24421else
24422  echo "$as_me:24422: result: no" >&5
24423echo "${ECHO_T}no" >&6
24424fi
24425
24426else
24427	MAKE_UPPER_TAGS=no
24428fi
24429
24430if test "$MAKE_UPPER_TAGS" = yes ; then
24431	MAKE_UPPER_TAGS=
24432else
24433	MAKE_UPPER_TAGS="#"
24434fi
24435
24436if test "$MAKE_LOWER_TAGS" = yes ; then
24437	MAKE_LOWER_TAGS=
24438else
24439	MAKE_LOWER_TAGS="#"
24440fi
24441
24442LD_RPATH_OPT=
24443if test "x$cf_cv_enable_rpath" != xno
24444then
24445	echo "$as_me:24445: checking for an rpath option" >&5
24446echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24447	case "$cf_cv_system_name" in
24448	(irix*)
24449		if test "$GCC" = yes; then
24450			LD_RPATH_OPT="-Wl,-rpath,"
24451		else
24452			LD_RPATH_OPT="-rpath "
24453		fi
24454		;;
24455	(linux*|gnu*|k*bsd*-gnu|freebsd*)
24456		LD_RPATH_OPT="-Wl,-rpath,"
24457		;;
24458	(openbsd[2-9].*|mirbsd*)
24459		LD_RPATH_OPT="-Wl,-rpath,"
24460		;;
24461	(dragonfly*)
24462		LD_RPATH_OPT="-rpath "
24463		;;
24464	(netbsd*)
24465		LD_RPATH_OPT="-Wl,-rpath,"
24466		;;
24467	(osf*|mls+*)
24468		LD_RPATH_OPT="-rpath "
24469		;;
24470	(solaris2*)
24471		LD_RPATH_OPT="-R"
24472		;;
24473	(*)
24474		;;
24475	esac
24476	echo "$as_me:24476: result: $LD_RPATH_OPT" >&5
24477echo "${ECHO_T}$LD_RPATH_OPT" >&6
24478
24479	case "x$LD_RPATH_OPT" in
24480	(x-R*)
24481		echo "$as_me:24481: checking if we need a space after rpath option" >&5
24482echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24483		cf_save_LIBS="$LIBS"
24484
24485cf_add_libs="$LIBS"
24486# reverse order
24487cf_add_0lib=
24488for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24489# filter duplicates
24490for cf_add_1lib in $cf_add_0lib; do
24491	for cf_add_2lib in $cf_add_libs; do
24492		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24493			cf_add_1lib=
24494			break
24495		fi
24496	done
24497	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24498done
24499LIBS="$cf_add_libs"
24500
24501		cat >"conftest.$ac_ext" <<_ACEOF
24502#line 24502 "configure"
24503#include "confdefs.h"
24504
24505int
24506main (void)
24507{
24508
24509  ;
24510  return 0;
24511}
24512_ACEOF
24513rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24514if { (eval echo "$as_me:24514: \"$ac_link\"") >&5
24515  (eval $ac_link) 2>&5
24516  ac_status=$?
24517  echo "$as_me:24517: \$? = $ac_status" >&5
24518  (exit "$ac_status"); } &&
24519         { ac_try='test -s "conftest$ac_exeext"'
24520  { (eval echo "$as_me:24520: \"$ac_try\"") >&5
24521  (eval $ac_try) 2>&5
24522  ac_status=$?
24523  echo "$as_me:24523: \$? = $ac_status" >&5
24524  (exit "$ac_status"); }; }; then
24525  cf_rpath_space=no
24526else
24527  echo "$as_me: failed program was:" >&5
24528cat "conftest.$ac_ext" >&5
24529cf_rpath_space=yes
24530fi
24531rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24532		LIBS="$cf_save_LIBS"
24533		echo "$as_me:24533: result: $cf_rpath_space" >&5
24534echo "${ECHO_T}$cf_rpath_space" >&6
24535		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24536		;;
24537	esac
24538fi
24539
24540echo "$as_me:24540: checking if rpath-hack should be disabled" >&5
24541echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24542
24543# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24544if test "${enable_rpath_hack+set}" = set; then
24545  enableval="$enable_rpath_hack"
24546  test "$enableval" != no && enableval=yes
24547	if test "$enableval" != "yes" ; then
24548    enable_rpath_hack=no
24549	else
24550		enable_rpath_hack=yes
24551	fi
24552else
24553  enableval=yes
24554	enable_rpath_hack=yes
24555
24556fi;
24557if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24558echo "$as_me:24558: result: $cf_disable_rpath_hack" >&5
24559echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24560
24561if test "$enable_rpath_hack" = yes ; then
24562
24563echo "$as_me:24563: checking for updated LDFLAGS" >&5
24564echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24565if test -n "$LD_RPATH_OPT" ; then
24566	echo "$as_me:24566: result: maybe" >&5
24567echo "${ECHO_T}maybe" >&6
24568
24569	for ac_prog in ldd
24570do
24571  # Extract the first word of "$ac_prog", so it can be a program name with args.
24572set dummy $ac_prog; ac_word=$2
24573echo "$as_me:24573: checking for $ac_word" >&5
24574echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24575if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24576  echo $ECHO_N "(cached) $ECHO_C" >&6
24577else
24578  if test -n "$cf_ldd_prog"; then
24579  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24580else
24581  ac_save_IFS=$IFS; IFS=$ac_path_separator
24582ac_dummy="$PATH"
24583for ac_dir in $ac_dummy; do
24584  IFS=$ac_save_IFS
24585  test -z "$ac_dir" && ac_dir=.
24586  $as_executable_p "$ac_dir/$ac_word" || continue
24587ac_cv_prog_cf_ldd_prog="$ac_prog"
24588echo "$as_me:24588: found $ac_dir/$ac_word" >&5
24589break
24590done
24591
24592fi
24593fi
24594cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24595if test -n "$cf_ldd_prog"; then
24596  echo "$as_me:24596: result: $cf_ldd_prog" >&5
24597echo "${ECHO_T}$cf_ldd_prog" >&6
24598else
24599  echo "$as_me:24599: result: no" >&5
24600echo "${ECHO_T}no" >&6
24601fi
24602
24603  test -n "$cf_ldd_prog" && break
24604done
24605test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24606
24607	cf_rpath_list="/usr/lib /lib"
24608	if test "$cf_ldd_prog" != no
24609	then
24610		cf_rpath_oops=
24611
24612cat >"conftest.$ac_ext" <<_ACEOF
24613#line 24613 "configure"
24614#include "confdefs.h"
24615#include <stdio.h>
24616int
24617main (void)
24618{
24619printf("Hello");
24620  ;
24621  return 0;
24622}
24623_ACEOF
24624rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24625if { (eval echo "$as_me:24625: \"$ac_link\"") >&5
24626  (eval $ac_link) 2>&5
24627  ac_status=$?
24628  echo "$as_me:24628: \$? = $ac_status" >&5
24629  (exit "$ac_status"); } &&
24630         { ac_try='test -s "conftest$ac_exeext"'
24631  { (eval echo "$as_me:24631: \"$ac_try\"") >&5
24632  (eval $ac_try) 2>&5
24633  ac_status=$?
24634  echo "$as_me:24634: \$? = $ac_status" >&5
24635  (exit "$ac_status"); }; }; then
24636  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24637		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24638else
24639  echo "$as_me: failed program was:" >&5
24640cat "conftest.$ac_ext" >&5
24641fi
24642rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24643
24644		# If we passed the link-test, but get a "not found" on a given library,
24645		# this could be due to inept reconfiguration of gcc to make it only
24646		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24647		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
24648		# /usr/local libraries.
24649		if test -n "$cf_rpath_oops"
24650		then
24651			for cf_rpath_src in $cf_rpath_oops
24652			do
24653				for cf_rpath_dir in \
24654					/usr/local \
24655					/usr/pkg \
24656					/opt/sfw
24657				do
24658					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
24659					then
24660						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24661
24662echo "${as_me:-configure}:24662: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24663
24664						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24665						break
24666					fi
24667				done
24668			done
24669		fi
24670	fi
24671
24672	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24673
24674echo "${as_me:-configure}:24674: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24675
24676test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
24677
24678echo "${as_me:-configure}:24678: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24679
24680cf_rpath_dst=
24681for cf_rpath_src in $LDFLAGS
24682do
24683	case "$cf_rpath_src" in
24684	(-L*)
24685
24686		# check if this refers to a directory which we will ignore
24687		cf_rpath_skip=no
24688		if test -n "$cf_rpath_list"
24689		then
24690			for cf_rpath_item in $cf_rpath_list
24691			do
24692				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24693				then
24694					cf_rpath_skip=yes
24695					break
24696				fi
24697			done
24698		fi
24699
24700		if test "$cf_rpath_skip" = no
24701		then
24702			# transform the option
24703			if test "$LD_RPATH_OPT" = "-R " ; then
24704				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24705			else
24706				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24707			fi
24708
24709			# if we have not already added this, add it now
24710			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24711			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24712			then
24713				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24714
24715echo "${as_me:-configure}:24715: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24716
24717				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24718			fi
24719		fi
24720		;;
24721	esac
24722	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24723done
24724LDFLAGS=$cf_rpath_dst
24725
24726test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
24727
24728echo "${as_me:-configure}:24728: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24729
24730test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
24731
24732echo "${as_me:-configure}:24732: testing ...checking LIBS $LIBS ..." 1>&5
24733
24734cf_rpath_dst=
24735for cf_rpath_src in $LIBS
24736do
24737	case "$cf_rpath_src" in
24738	(-L*)
24739
24740		# check if this refers to a directory which we will ignore
24741		cf_rpath_skip=no
24742		if test -n "$cf_rpath_list"
24743		then
24744			for cf_rpath_item in $cf_rpath_list
24745			do
24746				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24747				then
24748					cf_rpath_skip=yes
24749					break
24750				fi
24751			done
24752		fi
24753
24754		if test "$cf_rpath_skip" = no
24755		then
24756			# transform the option
24757			if test "$LD_RPATH_OPT" = "-R " ; then
24758				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24759			else
24760				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24761			fi
24762
24763			# if we have not already added this, add it now
24764			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24765			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24766			then
24767				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24768
24769echo "${as_me:-configure}:24769: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24770
24771				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24772			fi
24773		fi
24774		;;
24775	esac
24776	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24777done
24778LIBS=$cf_rpath_dst
24779
24780test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
24781
24782echo "${as_me:-configure}:24782: testing ...checked LIBS $LIBS ..." 1>&5
24783
24784	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24785
24786echo "${as_me:-configure}:24786: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24787
24788else
24789	echo "$as_me:24789: result: no" >&5
24790echo "${ECHO_T}no" >&6
24791fi
24792
24793fi
24794
24795# Force plink.sh to not trim pcre's libraries, which have the same symbol
24796# names as the system regexp.
24797if test "$with_pcre" != no
24798then
24799	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
24800fi
24801
24802###	output xtermcfg.h, etc
24803ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
24804
24805cat >confcache <<\_ACEOF
24806# This file is a shell script that caches the results of configure
24807# tests run on this system so they can be shared between configure
24808# scripts and configure runs, see configure's option --config-cache.
24809# It is not useful on other systems.  If it contains results you don't
24810# want to keep, you may remove or edit it.
24811#
24812# config.status only pays attention to the cache file if you give it
24813# the --recheck option to rerun configure.
24814#
24815# `ac_cv_env_foo' variables (set or unset) will be overriden when
24816# loading this file, other *unset* `ac_cv_foo' will be assigned the
24817# following values.
24818
24819_ACEOF
24820
24821# The following way of writing the cache mishandles newlines in values,
24822# but we know of no workaround that is simple, portable, and efficient.
24823# So, don't put newlines in cache variables' values.
24824# Ultrix sh set writes to stderr and can't be redirected directly,
24825# and sets the high bit in the cache file unless we assign to the vars.
24826{
24827  (set) 2>&1 |
24828    case `(ac_space=' '; set | grep ac_space) 2>&1` in
24829    *ac_space=\ *)
24830      # `set' does not quote correctly, so add quotes (double-quote
24831      # substitution turns \\\\ into \\, and sed turns \\ into \).
24832      sed -n \
24833        "s/'/'\\\\''/g;
24834    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24835      ;;
24836    *)
24837      # `set' quotes correctly as required by POSIX, so do not add quotes.
24838      sed -n \
24839        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24840      ;;
24841    esac;
24842} |
24843  sed '
24844     t clear
24845     : clear
24846     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24847     t end
24848     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24849     : end' >>confcache
24850if cmp -s $cache_file confcache; then :; else
24851  if test -w $cache_file; then
24852    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24853    cat confcache >$cache_file
24854  else
24855    echo "not updating unwritable cache $cache_file"
24856  fi
24857fi
24858rm -f confcache
24859
24860test "x$prefix" = xNONE && prefix=$ac_default_prefix
24861# Let make expand exec_prefix.
24862test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24863
24864# VPATH may cause trouble with some makes, so we remove $(srcdir),
24865# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24866# trailing colons and then remove the whole line if VPATH becomes empty
24867# (actually we leave an empty line to preserve line numbers).
24868if test "x$srcdir" = x.; then
24869  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
24870s/:*\$(srcdir):*/:/;
24871s/:*\${srcdir}:*/:/;
24872s/:*@srcdir@:*/:/;
24873s/^\([^=]*=[ 	]*\):*/\1/;
24874s/:*$//;
24875s/^[^=]*=[ 	]*$//;
24876}'
24877fi
24878
24879DEFS=-DHAVE_CONFIG_H
24880
24881: "${CONFIG_STATUS=./config.status}"
24882ac_clean_files_save=$ac_clean_files
24883ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24884{ echo "$as_me:24884: creating $CONFIG_STATUS" >&5
24885echo "$as_me: creating $CONFIG_STATUS" >&6;}
24886cat >"$CONFIG_STATUS" <<_ACEOF
24887#! $SHELL
24888# Generated automatically by configure.
24889# Run this file to recreate the current configuration.
24890# Compiler output produced by configure, useful for debugging
24891# configure, is in config.log if it exists.
24892
24893debug=false
24894SHELL=\${CONFIG_SHELL-$SHELL}
24895ac_cs_invocation="\$0 \$@"
24896
24897CLICOLOR_FORCE= GREP_OPTIONS=
24898unset CLICOLOR_FORCE GREP_OPTIONS
24899_ACEOF
24900
24901cat >>"$CONFIG_STATUS" <<\_ACEOF
24902# Be Bourne compatible
24903if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24904  emulate sh
24905  NULLCMD=:
24906elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24907  set -o posix
24908fi
24909
24910# Name of the executable.
24911as_me=`echo "$0" |sed 's,.*[\\/],,'`
24912
24913if expr a : '\(a\)' >/dev/null 2>&1; then
24914  as_expr=expr
24915else
24916  as_expr=false
24917fi
24918
24919rm -f conf$$ conf$$.exe conf$$.file
24920echo >conf$$.file
24921if ln -s conf$$.file conf$$ 2>/dev/null; then
24922  # We could just check for DJGPP; but this test a) works b) is more generic
24923  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24924  if test -f conf$$.exe; then
24925    # Don't use ln at all; we don't have any links
24926    as_ln_s='cp -p'
24927  else
24928    as_ln_s='ln -s'
24929  fi
24930elif ln conf$$.file conf$$ 2>/dev/null; then
24931  as_ln_s=ln
24932else
24933  as_ln_s='cp -p'
24934fi
24935rm -f conf$$ conf$$.exe conf$$.file
24936
24937as_executable_p="test -f"
24938
24939# Support unset when possible.
24940if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24941  as_unset="unset"
24942else
24943  as_unset="false"
24944fi
24945
24946# NLS nuisances.
24947$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24948$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24949$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24950$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24951$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24952$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24953$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24954$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24955
24956# IFS
24957# We need space, tab and new line, in precisely that order.
24958as_nl='
24959'
24960IFS=" 	$as_nl"
24961
24962# CDPATH.
24963$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24964
24965exec 6>&1
24966
24967_ACEOF
24968
24969# Files that config.status was made for.
24970if test -n "$ac_config_files"; then
24971  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24972fi
24973
24974if test -n "$ac_config_headers"; then
24975  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24976fi
24977
24978if test -n "$ac_config_links"; then
24979  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24980fi
24981
24982if test -n "$ac_config_commands"; then
24983  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24984fi
24985
24986cat >>"$CONFIG_STATUS" <<\EOF
24987
24988ac_cs_usage="\
24989\`$as_me' instantiates files from templates according to the
24990current configuration.
24991
24992Usage: $0 [OPTIONS] [FILE]...
24993
24994  -h, --help       print this help, then exit
24995  -V, --version    print version number, then exit
24996  -d, --debug      don't remove temporary files
24997      --recheck    update $as_me by reconfiguring in the same conditions
24998  --file=FILE[:TEMPLATE]
24999                   instantiate the configuration file FILE
25000  --header=FILE[:TEMPLATE]
25001                   instantiate the configuration header FILE
25002
25003Configuration files:
25004$config_files
25005
25006Configuration headers:
25007$config_headers
25008
25009Report bugs to <dickey@invisible-island.net>."
25010EOF
25011
25012cat >>"$CONFIG_STATUS" <<EOF
25013ac_cs_version="\\
25014config.status
25015configured by $0, generated by GNU Autoconf 2.52.20210509,
25016  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
25017
25018Copyright 2003-2020,2021	Thomas E. Dickey
25019Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
25020Free Software Foundation, Inc.
25021This config.status script is free software; the Free Software Foundation
25022gives unlimited permission to copy, distribute and modify it."
25023srcdir="$srcdir"
25024INSTALL="$INSTALL"
25025EOF
25026
25027cat >>"$CONFIG_STATUS" <<\EOF
25028# If no file are specified by the user, then we need to provide default
25029# value.  By we need to know if files were specified by the user.
25030ac_need_defaults=:
25031while test $# != 0
25032do
25033  case $1 in
25034  --*=*)
25035    ac_option=`expr "x$1" : 'x\([^=]*\)='`
25036    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
25037    shift
25038    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
25039    shift
25040    ;;
25041  -*);;
25042  *) # This is not an option, so the user has probably given explicit
25043     # arguments.
25044     ac_need_defaults=false;;
25045  esac
25046
25047  case $1 in
25048  # Handling of the options.
25049EOF
25050cat >>"$CONFIG_STATUS" <<EOF
25051  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
25052    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
25053    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
25054EOF
25055cat >>"$CONFIG_STATUS" <<\EOF
25056  --version | --vers* | -V )
25057    echo "$ac_cs_version"; exit 0 ;;
25058  --he | --h)
25059    # Conflict between --help and --header
25060    { { echo "$as_me:25060: error: ambiguous option: $1
25061Try \`$0 --help' for more information." >&5
25062echo "$as_me: error: ambiguous option: $1
25063Try \`$0 --help' for more information." >&2;}
25064   { (exit 1); exit 1; }; };;
25065  --help | --hel | -h )
25066    echo "$ac_cs_usage"; exit 0 ;;
25067  --debug | --d* | -d )
25068    debug=: ;;
25069  --file | --fil | --fi | --f )
25070    shift
25071    CONFIG_FILES="$CONFIG_FILES $1"
25072    ac_need_defaults=false;;
25073  --header | --heade | --head | --hea )
25074    shift
25075    CONFIG_HEADERS="$CONFIG_HEADERS $1"
25076    ac_need_defaults=false;;
25077
25078  # This is an error.
25079  -*) { { echo "$as_me:25079: error: unrecognized option: $1
25080Try \`$0 --help' for more information." >&5
25081echo "$as_me: error: unrecognized option: $1
25082Try \`$0 --help' for more information." >&2;}
25083   { (exit 1); exit 1; }; } ;;
25084
25085  *) ac_config_targets="$ac_config_targets $1" ;;
25086
25087  esac
25088  shift
25089done
25090
25091exec 5>>config.log
25092cat >&5 << _ACEOF
25093
25094## ----------------------- ##
25095## Running config.status.  ##
25096## ----------------------- ##
25097
25098This file was extended by $as_me 2.52.20210509, executed with
25099  CONFIG_FILES    = $CONFIG_FILES
25100  CONFIG_HEADERS  = $CONFIG_HEADERS
25101  CONFIG_LINKS    = $CONFIG_LINKS
25102  CONFIG_COMMANDS = $CONFIG_COMMANDS
25103  > "$ac_cs_invocation"
25104on `(hostname || uname -n) 2>/dev/null | sed 1q`
25105
25106_ACEOF
25107EOF
25108
25109cat >>"$CONFIG_STATUS" <<\EOF
25110for ac_config_target in $ac_config_targets
25111do
25112  case "$ac_config_target" in
25113  # Handling of arguments.
25114  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25115  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
25116  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
25117  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
25118  *) { { echo "$as_me:25118: error: invalid argument: $ac_config_target" >&5
25119echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25120   { (exit 1); exit 1; }; };;
25121  esac
25122done
25123
25124# If the user did not use the arguments to specify the items to instantiate,
25125# then the envvar interface is used.  Set only those that are not.
25126# We use the long form for the default assignment because of an extremely
25127# bizarre bug on SunOS 4.1.3.
25128if "$ac_need_defaults"; then
25129  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25130  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25131fi
25132
25133# Create a temporary directory, and hook for its removal unless debugging.
25134$debug ||
25135{
25136  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25137  trap '{ (exit 1); exit 1; }' 1 2 13 15
25138}
25139
25140# Create a (secure) tmp directory for tmp files.
25141: ${TMPDIR=/tmp}
25142{
25143  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25144  test -n "$tmp" && test -d "$tmp"
25145}  ||
25146{
25147  tmp=$TMPDIR/cs$$-$RANDOM
25148  (umask 077 && mkdir $tmp)
25149} ||
25150{
25151   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25152   { (exit 1); exit 1; }
25153}
25154
25155EOF
25156
25157cat >>"$CONFIG_STATUS" <<EOF
25158
25159#
25160# CONFIG_FILES section.
25161#
25162
25163# No need to generate the scripts if there are no CONFIG_FILES.
25164# This happens for instance when ./config.status config.h
25165if test -n "\$CONFIG_FILES"; then
25166  # Protect against being on the right side of a sed subst in config.status.
25167  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25168   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25169s,@SHELL@,$SHELL,;t t
25170s,@exec_prefix@,$exec_prefix,;t t
25171s,@prefix@,$prefix,;t t
25172s,@program_transform_name@,$program_transform_name,;t t
25173s,@bindir@,$bindir,;t t
25174s,@sbindir@,$sbindir,;t t
25175s,@libexecdir@,$libexecdir,;t t
25176s,@datarootdir@,$datarootdir,;t t
25177s,@datadir@,$datadir,;t t
25178s,@sysconfdir@,$sysconfdir,;t t
25179s,@sharedstatedir@,$sharedstatedir,;t t
25180s,@localstatedir@,$localstatedir,;t t
25181s,@runstatedir@,$runstatedir,;t t
25182s,@libdir@,$libdir,;t t
25183s,@includedir@,$includedir,;t t
25184s,@oldincludedir@,$oldincludedir,;t t
25185s,@infodir@,$infodir,;t t
25186s,@mandir@,$mandir,;t t
25187s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25188s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25189s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25190s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25191s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25192s,@build_alias@,$build_alias,;t t
25193s,@host_alias@,$host_alias,;t t
25194s,@target_alias@,$target_alias,;t t
25195s,@ECHO_C@,$ECHO_C,;t t
25196s,@ECHO_N@,$ECHO_N,;t t
25197s,@ECHO_T@,$ECHO_T,;t t
25198s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25199s,@DEFS@,$DEFS,;t t
25200s,@LIBS@,$LIBS,;t t
25201s,@build@,$build,;t t
25202s,@build_cpu@,$build_cpu,;t t
25203s,@build_vendor@,$build_vendor,;t t
25204s,@build_os@,$build_os,;t t
25205s,@host@,$host,;t t
25206s,@host_cpu@,$host_cpu,;t t
25207s,@host_vendor@,$host_vendor,;t t
25208s,@host_os@,$host_os,;t t
25209s,@CC@,$CC,;t t
25210s,@CFLAGS@,$CFLAGS,;t t
25211s,@LDFLAGS@,$LDFLAGS,;t t
25212s,@CPPFLAGS@,$CPPFLAGS,;t t
25213s,@ac_ct_CC@,$ac_ct_CC,;t t
25214s,@EXEEXT@,$EXEEXT,;t t
25215s,@OBJEXT@,$OBJEXT,;t t
25216s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25217s,@CPP@,$CPP,;t t
25218s,@GREP@,$GREP,;t t
25219s,@EGREP@,$EGREP,;t t
25220s,@AWK@,$AWK,;t t
25221s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25222s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25223s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25224s,@LN_S@,$LN_S,;t t
25225s,@LINT@,$LINT,;t t
25226s,@LINT_OPTS@,$LINT_OPTS,;t t
25227s,@APP_CLASS@,$APP_CLASS,;t t
25228s,@APPSDIR@,$APPSDIR,;t t
25229s,@no_appsdir@,$no_appsdir,;t t
25230s,@ICON_NAME@,$ICON_NAME,;t t
25231s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
25232s,@PIXMAPDIR@,$PIXMAPDIR,;t t
25233s,@no_pixmapdir@,$no_pixmapdir,;t t
25234s,@ICONDIR@,$ICONDIR,;t t
25235s,@no_icondir@,$no_icondir,;t t
25236s,@ICON_FORMAT@,$ICON_FORMAT,;t t
25237s,@ICON_THEME@,$ICON_THEME,;t t
25238s,@ICON_LIST@,$ICON_LIST,;t t
25239s,@desktop_utils@,$desktop_utils,;t t
25240s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
25241s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
25242s,@XTERM_PATH@,$XTERM_PATH,;t t
25243s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
25244s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
25245s,@X_CFLAGS@,$X_CFLAGS,;t t
25246s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25247s,@X_LIBS@,$X_LIBS,;t t
25248s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25249s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25250s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25251s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
25252s,@IMAKE@,$IMAKE,;t t
25253s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
25254s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
25255s,@GROFF_PATH@,$GROFF_PATH,;t t
25256s,@NROFF_PATH@,$NROFF_PATH,;t t
25257s,@TBL_PATH@,$TBL_PATH,;t t
25258s,@GROFF_NOTE@,$GROFF_NOTE,;t t
25259s,@NROFF_NOTE@,$NROFF_NOTE,;t t
25260s,@FGREP@,$FGREP,;t t
25261s,@cf_man2html@,$cf_man2html,;t t
25262s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25263s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25264s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25265s,@default_termid@,$default_termid,;t t
25266s,@default_TERM@,$default_TERM,;t t
25267s,@backarrow_is_bs@,$backarrow_is_bs,;t t
25268s,@backarrow_is_erase@,$backarrow_is_erase,;t t
25269s,@delete_is_del@,$delete_is_del,;t t
25270s,@initial_erase@,$initial_erase,;t t
25271s,@alt_sends_esc@,$alt_sends_esc,;t t
25272s,@meta_sends_esc@,$meta_sends_esc,;t t
25273s,@cf_tic_prog@,$cf_tic_prog,;t t
25274s,@no_ticprog@,$no_ticprog,;t t
25275s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
25276s,@SET_TERMINFO@,$SET_TERMINFO,;t t
25277s,@double_buffer@,$double_buffer,;t t
25278s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
25279s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
25280s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
25281s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
25282s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
25283s,@LUIT@,$LUIT,;t t
25284s,@ECHO_LT@,$ECHO_LT,;t t
25285s,@ECHO_LD@,$ECHO_LD,;t t
25286s,@RULE_CC@,$RULE_CC,;t t
25287s,@SHOW_CC@,$SHOW_CC,;t t
25288s,@ECHO_CC@,$ECHO_CC,;t t
25289s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25290s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
25291s,@STDC_NORETURN@,$STDC_NORETURN,;t t
25292s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
25293s,@EXTRAHDRS@,$EXTRAHDRS,;t t
25294s,@EXTRASRCS@,$EXTRASRCS,;t t
25295s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25296s,@MAY_SETUID@,$MAY_SETUID,;t t
25297s,@NOT_SETUID@,$NOT_SETUID,;t t
25298s,@CTAGS@,$CTAGS,;t t
25299s,@ETAGS@,$ETAGS,;t t
25300s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25301s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25302s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25303s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25304CEOF
25305
25306EOF
25307
25308  cat >>"$CONFIG_STATUS" <<\EOF
25309  # Split the substitutions into bite-sized pieces for seds with
25310  # small command number limits, like on Digital OSF/1 and HP-UX.
25311  ac_max_sed_lines=48
25312  ac_sed_frag=1 # Number of current file.
25313  ac_beg=1 # First line for current file.
25314  ac_end=$ac_max_sed_lines # Line after last line for current file.
25315  ac_more_lines=:
25316  ac_sed_cmds=
25317  while "$ac_more_lines"; do
25318    if test "$ac_beg" -gt 1; then
25319      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25320    else
25321      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25322    fi
25323    if test ! -s $tmp/subs.frag; then
25324      ac_more_lines=false
25325    else
25326      # The purpose of the label and of the branching condition is to
25327      # speed up the sed processing (if there are no `@' at all, there
25328      # is no need to browse any of the substitutions).
25329      # These are the two extra sed commands mentioned above.
25330      (echo ':t
25331  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25332      # It is possible to make a multiline substitution using escaped newlines.
25333      # Ensure that we do not split the substitution between script fragments.
25334      ac_BEG=$ac_end
25335      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25336      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25337      if test -s $tmp/subs.next; then
25338        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25339        if test ! -s $tmp/subs.edit; then
25340          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25341          if test ! -s $tmp/subs.edit; then
25342            if test "$ac_beg" -gt 1; then
25343              ac_end=`expr "$ac_end" - 1`
25344              continue
25345            fi
25346          fi
25347        fi
25348      fi
25349
25350      if test -z "$ac_sed_cmds"; then
25351        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25352      else
25353        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25354      fi
25355      ac_sed_frag=`expr "$ac_sed_frag" + 1`
25356      ac_beg=$ac_end
25357      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25358    fi
25359  done
25360  if test -z "$ac_sed_cmds"; then
25361    ac_sed_cmds=cat
25362  fi
25363fi # test -n "$CONFIG_FILES"
25364
25365EOF
25366cat >>"$CONFIG_STATUS" <<\EOF
25367for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25368  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25369  case "$ac_file" in
25370  - | *:- | *:-:* ) # input from stdin
25371        cat >$tmp/stdin
25372        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25373        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25374  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25375        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25376  * )   ac_file_in=$ac_file.in ;;
25377  esac
25378
25379  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25380  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25381         X"$ac_file" : 'X\(//\)[^/]' \| \
25382         X"$ac_file" : 'X\(//\)$' \| \
25383         X"$ac_file" : 'X\(/\)' \| \
25384         .     : '\(.\)' 2>/dev/null ||
25385echo X"$ac_file" |
25386    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25387  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25388  	  /^X\(\/\/\)$/{ s//\1/; q; }
25389  	  /^X\(\/\).*/{ s//\1/; q; }
25390  	  s/.*/./; q'`
25391  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25392    { case "$ac_dir" in
25393  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25394  *)                      as_incr_dir=.;;
25395esac
25396as_dummy="$ac_dir"
25397for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25398  case $as_mkdir_dir in
25399    # Skip DOS drivespec
25400    ?:) as_incr_dir=$as_mkdir_dir ;;
25401    *)
25402      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25403      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25404    ;;
25405  esac
25406done; }
25407
25408    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25409    # A "../" for each directory in $ac_dir_suffix.
25410    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25411  else
25412    ac_dir_suffix= ac_dots=
25413  fi
25414
25415  case "$srcdir" in
25416  .)  ac_srcdir=.
25417      if test -z "$ac_dots"; then
25418         ac_top_srcdir=.
25419      else
25420         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25421      fi ;;
25422  [\\/]* | ?:[\\/]* )
25423      ac_srcdir="$srcdir$ac_dir_suffix";
25424      ac_top_srcdir="$srcdir" ;;
25425  *) # Relative path.
25426    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25427    ac_top_srcdir="$ac_dots$srcdir" ;;
25428  esac
25429
25430  case $INSTALL in
25431  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25432  *) ac_INSTALL=$ac_dots$INSTALL ;;
25433  esac
25434
25435  if test x"$ac_file" != x-; then
25436    { echo "$as_me:25436: creating $ac_file" >&5
25437echo "$as_me: creating $ac_file" >&6;}
25438    rm -f "$ac_file"
25439  fi
25440  # Let's still pretend it is `configure' which instantiates (i.e., don't
25441  # use $as_me), people would be surprised to read:
25442  #    /* config.h.  Generated automatically by config.status.  */
25443  configure_input="Generated automatically from `echo $ac_file_in |
25444                                                 sed 's,.*/,,'` by configure."
25445
25446  # First look for the input files in the build tree, otherwise in the
25447  # src tree.
25448  ac_file_inputs=`IFS=:
25449    for f in $ac_file_in; do
25450      case $f in
25451      -) echo $tmp/stdin ;;
25452      [\\/$]*)
25453         # Absolute (can't be DOS-style, as IFS=:)
25454         test -f "$f" || { { echo "$as_me:25454: error: cannot find input file: $f" >&5
25455echo "$as_me: error: cannot find input file: $f" >&2;}
25456   { (exit 1); exit 1; }; }
25457         echo $f;;
25458      *) # Relative
25459         if test -f "$f"; then
25460           # Build tree
25461           echo $f
25462         elif test -f "$srcdir/$f"; then
25463           # Source tree
25464           echo "$srcdir/$f"
25465         else
25466           # /dev/null tree
25467           { { echo "$as_me:25467: error: cannot find input file: $f" >&5
25468echo "$as_me: error: cannot find input file: $f" >&2;}
25469   { (exit 1); exit 1; }; }
25470         fi;;
25471      esac
25472    done` || { (exit 1); exit 1; }
25473EOF
25474cat >>"$CONFIG_STATUS" <<\EOF
25475  ac_warn_datarootdir=no
25476  if test x"$ac_file" != x-; then
25477    for ac_item in $ac_file_inputs
25478    do
25479      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25480      if test -n "$ac_seen"; then
25481        ac_used=`grep '@datarootdir@' "$ac_item"`
25482        if test -z "$ac_used"; then
25483          { echo "$as_me:25483: WARNING: datarootdir was used implicitly but not set:
25484$ac_seen" >&5
25485echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25486$ac_seen" >&2;}
25487          ac_warn_datarootdir=yes
25488        fi
25489      fi
25490      ac_seen=`grep '${datarootdir}' "$ac_item"`
25491      if test -n "$ac_seen"; then
25492        { echo "$as_me:25492: WARNING: datarootdir was used explicitly but not set:
25493$ac_seen" >&5
25494echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25495$ac_seen" >&2;}
25496        ac_warn_datarootdir=yes
25497      fi
25498    done
25499  fi
25500
25501if test "x$ac_warn_datarootdir" = xyes; then
25502  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25503fi
25504
25505EOF
25506cat >>"$CONFIG_STATUS" <<EOF
25507  sed "$ac_vpsub
25508$extrasub
25509EOF
25510cat >>"$CONFIG_STATUS" <<\EOF
25511:t
25512/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25513s,@configure_input@,$configure_input,;t t
25514s,@srcdir@,$ac_srcdir,;t t
25515s,@top_srcdir@,$ac_top_srcdir,;t t
25516s,@INSTALL@,$ac_INSTALL,;t t
25517" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25518  rm -f $tmp/stdin
25519  if test x"$ac_file" != x-; then
25520    cp "$tmp/out" "$ac_file"
25521
25522    for ac_name in prefix exec_prefix datarootdir
25523    do
25524        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
25525        if test -n "$ac_seen"; then
25526            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
25527            if test -z "$ac_init"; then
25528              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25529              { echo "$as_me:25529: WARNING: Variable $ac_name is used but was not set:
25530$ac_seen" >&5
25531echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25532$ac_seen" >&2;}
25533            fi
25534        fi
25535    done
25536    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
25537    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
25538    if test -s $tmp/out; then
25539      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25540      { echo "$as_me:25540: WARNING: Some variables may not be substituted:
25541$ac_seen" >&5
25542echo "$as_me: WARNING: Some variables may not be substituted:
25543$ac_seen" >&2;}
25544    fi
25545  else
25546    cat $tmp/out
25547  fi
25548  rm -f $tmp/out
25549
25550done
25551EOF
25552cat >>"$CONFIG_STATUS" <<\EOF
25553
25554#
25555# CONFIG_HEADER section.
25556#
25557
25558# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25559# NAME is the cpp macro being defined and VALUE is the value it is being given.
25560#
25561# ac_d sets the value in "#define NAME VALUE" lines.
25562ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
25563ac_dB='[ 	].*$,\1#\2'
25564ac_dC=' '
25565ac_dD=',;t'
25566# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25567ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25568ac_iB='\([ 	]\),\1#\2define\3'
25569ac_iC=' '
25570ac_iD='\4,;t'
25571# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25572ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25573ac_uB='$,\1#\2define\3'
25574ac_uC=' '
25575ac_uD=',;t'
25576
25577for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25578  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25579  case "$ac_file" in
25580  - | *:- | *:-:* ) # input from stdin
25581        cat >$tmp/stdin
25582        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25583        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25584  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25585        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25586  * )   ac_file_in=$ac_file.in ;;
25587  esac
25588
25589  test x"$ac_file" != x- && { echo "$as_me:25589: creating $ac_file" >&5
25590echo "$as_me: creating $ac_file" >&6;}
25591
25592  # First look for the input files in the build tree, otherwise in the
25593  # src tree.
25594  ac_file_inputs=`IFS=:
25595    for f in $ac_file_in; do
25596      case $f in
25597      -) echo $tmp/stdin ;;
25598      [\\/$]*)
25599         # Absolute (can't be DOS-style, as IFS=:)
25600         test -f "$f" || { { echo "$as_me:25600: error: cannot find input file: $f" >&5
25601echo "$as_me: error: cannot find input file: $f" >&2;}
25602   { (exit 1); exit 1; }; }
25603         echo $f;;
25604      *) # Relative
25605         if test -f "$f"; then
25606           # Build tree
25607           echo $f
25608         elif test -f "$srcdir/$f"; then
25609           # Source tree
25610           echo "$srcdir/$f"
25611         else
25612           # /dev/null tree
25613           { { echo "$as_me:25613: error: cannot find input file: $f" >&5
25614echo "$as_me: error: cannot find input file: $f" >&2;}
25615   { (exit 1); exit 1; }; }
25616         fi;;
25617      esac
25618    done` || { (exit 1); exit 1; }
25619  # Remove the trailing spaces.
25620  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
25621
25622EOF
25623
25624# Transform confdefs.h into two sed scripts, `conftest.defines' and
25625# `conftest.undefs', that substitutes the proper values into
25626# config.h.in to produce config.h.  The first handles `#define'
25627# templates, and the second `#undef' templates.
25628# And first: Protect against being on the right side of a sed subst in
25629# config.status.  Protect against being in an unquoted here document
25630# in config.status.
25631rm -f conftest.defines conftest.undefs
25632# Using a here document instead of a string reduces the quoting nightmare.
25633# Putting comments in sed scripts is not portable.
25634#
25635# `end' is used to avoid that the second main sed command (meant for
25636# 0-ary CPP macros) applies to n-ary macro definitions.
25637# See the Autoconf documentation for `clear'.
25638cat >confdef2sed.sed <<\EOF
25639s/[\\&,]/\\&/g
25640s,[\\$`],\\&,g
25641t clear
25642: clear
25643s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
25644t end
25645s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
25646: end
25647EOF
25648# If some macros were called several times there might be several times
25649# the same #defines, which is useless.  Nevertheless, we may not want to
25650# sort them, since we want the *last* AC-DEFINE to be honored.
25651uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
25652sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
25653sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
25654rm -f confdef2sed.sed
25655
25656# This sed command replaces #undef with comments.  This is necessary, for
25657# example, in the case of _POSIX_SOURCE, which is predefined and required
25658# on some systems where configure will not decide to define it.
25659cat >>conftest.undefs <<\EOF
25660s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25661EOF
25662
25663# Break up conftest.defines because some shells have a limit on the size
25664# of here documents, and old seds have small limits too (100 cmds).
25665echo '  # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
25666echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>"$CONFIG_STATUS"
25667echo '  # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
25668echo '  :' >>"$CONFIG_STATUS"
25669rm -f conftest.tail
25670while grep . conftest.defines >/dev/null
25671do
25672  # Write a limited-size here document to $tmp/defines.sed.
25673  echo '  cat >$tmp/defines.sed <<CEOF' >>"$CONFIG_STATUS"
25674  # Speed up: don't consider the non `#define' lines.
25675  echo '/^[ 	]*#[ 	]*define/!b' >>"$CONFIG_STATUS"
25676  # Work around the forget-to-reset-the-flag bug.
25677  echo 't clr' >>"$CONFIG_STATUS"
25678  echo ': clr' >>"$CONFIG_STATUS"
25679  sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
25680  echo 'CEOF
25681  sed -f $tmp/defines.sed $tmp/in >$tmp/out
25682  rm -f $tmp/in
25683  mv $tmp/out $tmp/in
25684' >>"$CONFIG_STATUS"
25685  sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
25686  rm -f conftest.defines
25687  mv conftest.tail conftest.defines
25688done
25689rm -f conftest.defines
25690echo '  fi # egrep' >>"$CONFIG_STATUS"
25691echo >>"$CONFIG_STATUS"
25692
25693# Break up conftest.undefs because some shells have a limit on the size
25694# of here documents, and old seds have small limits too (100 cmds).
25695echo '  # Handle all the #undef templates' >>"$CONFIG_STATUS"
25696rm -f conftest.tail
25697while grep . conftest.undefs >/dev/null
25698do
25699  # Write a limited-size here document to $tmp/undefs.sed.
25700  echo '  cat >$tmp/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
25701  # Speed up: don't consider the non `#undef'
25702  echo '/^[ 	]*#[ 	]*undef/!b' >>"$CONFIG_STATUS"
25703  # Work around the forget-to-reset-the-flag bug.
25704  echo 't clr' >>"$CONFIG_STATUS"
25705  echo ': clr' >>"$CONFIG_STATUS"
25706  sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
25707  echo 'CEOF
25708  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25709  rm -f $tmp/in
25710  mv $tmp/out $tmp/in
25711' >>"$CONFIG_STATUS"
25712  sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
25713  rm -f conftest.undefs
25714  mv conftest.tail conftest.undefs
25715done
25716rm -f conftest.undefs
25717
25718cat >>"$CONFIG_STATUS" <<\EOF
25719  # Let's still pretend it is `configure' which instantiates (i.e., don't
25720  # use $as_me), people would be surprised to read:
25721  #    /* config.h.  Generated automatically by config.status.  */
25722  if test x"$ac_file" = x-; then
25723    echo "/* Generated automatically by configure.  */" >$tmp/config.h
25724  else
25725    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25726  fi
25727  cat $tmp/in >>$tmp/config.h
25728  rm -f $tmp/in
25729  if test x"$ac_file" != x-; then
25730    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
25731      { echo "$as_me:25731: $ac_file is unchanged" >&5
25732echo "$as_me: $ac_file is unchanged" >&6;}
25733    else
25734      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25735         X"$ac_file" : 'X\(//\)[^/]' \| \
25736         X"$ac_file" : 'X\(//\)$' \| \
25737         X"$ac_file" : 'X\(/\)' \| \
25738         .     : '\(.\)' 2>/dev/null ||
25739echo X"$ac_file" |
25740    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25741  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25742  	  /^X\(\/\/\)$/{ s//\1/; q; }
25743  	  /^X\(\/\).*/{ s//\1/; q; }
25744  	  s/.*/./; q'`
25745      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25746        { case "$ac_dir" in
25747  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25748  *)                      as_incr_dir=.;;
25749esac
25750as_dummy="$ac_dir"
25751for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25752  case $as_mkdir_dir in
25753    # Skip DOS drivespec
25754    ?:) as_incr_dir=$as_mkdir_dir ;;
25755    *)
25756      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25757      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25758    ;;
25759  esac
25760done; }
25761
25762      fi
25763      rm -f "$ac_file"
25764      mv "$tmp/config.h" "$ac_file"
25765    fi
25766  else
25767    cat $tmp/config.h
25768    rm -f $tmp/config.h
25769  fi
25770done
25771EOF
25772
25773cat >>"$CONFIG_STATUS" <<\EOF
25774
25775{ (exit 0); exit 0; }
25776EOF
25777chmod +x "$CONFIG_STATUS"
25778ac_clean_files=$ac_clean_files_save
25779
25780# configure is writing to config.log, and then calls config.status.
25781# config.status does its own redirection, appending to config.log.
25782# Unfortunately, on DOS this fails, as config.log is still kept open
25783# by configure, so config.status won't be able to write to it; its
25784# output is simply discarded.  So we exec the FD to /dev/null,
25785# effectively closing config.log, so it can be properly (re)opened and
25786# appended to by config.status.  When coming back to configure, we
25787# need to make the FD available again.
25788if test "$no_create" != yes; then
25789  ac_cs_success=:
25790  exec 5>/dev/null
25791  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
25792  exec 5>>config.log
25793  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25794  # would make configure fail if this is the last instruction.
25795  "$ac_cs_success" || { (exit 1); exit 1; }
25796fi
25797
25798