configure revision a5ae21e4
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20210509.
4#
5# Copyright 2003-2020,2021	Thomas E. Dickey
6# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
7# Free Software Foundation, Inc.
8# This configure script is free software; the Free Software Foundation
9# gives unlimited permission to copy, distribute and modify it.
10
11# Avoid depending upon Character Ranges.
12as_cr_letters='abcdefghijklmnopqrstuvwxyz'
13as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
14as_cr_Letters=$as_cr_letters$as_cr_LETTERS
15as_cr_digits='0123456789'
16as_cr_alnum=$as_cr_Letters$as_cr_digits
17
18# Sed expression to map a string onto a valid variable name.
19as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
20
21# Sed expression to map a string onto a valid CPP name.
22as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
23
24# Be Bourne compatible
25if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
26  emulate sh
27  NULLCMD=:
28elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
29  set -o posix
30fi
31
32# Name of the executable.
33as_me=`echo "$0" |sed 's,.*[\\/],,'`
34
35if expr a : '\(a\)' >/dev/null 2>&1; then
36  as_expr=expr
37else
38  as_expr=false
39fi
40
41rm -f conf$$ conf$$.exe conf$$.file
42echo >conf$$.file
43if ln -s conf$$.file conf$$ 2>/dev/null; then
44  # We could just check for DJGPP; but this test a) works b) is more generic
45  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
46  if test -f conf$$.exe; then
47    # Don't use ln at all; we don't have any links
48    as_ln_s='cp -p'
49  else
50    as_ln_s='ln -s'
51  fi
52elif ln conf$$.file conf$$ 2>/dev/null; then
53  as_ln_s=ln
54else
55  as_ln_s='cp -p'
56fi
57rm -f conf$$ conf$$.exe conf$$.file
58
59as_executable_p="test -f"
60
61# Support unset when possible.
62if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
63  as_unset="unset"
64else
65  as_unset="false"
66fi
67
68# NLS nuisances.
69$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
70$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
71$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
72$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
73$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
74$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
75$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
76$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
77
78# IFS
79# We need space, tab and new line, in precisely that order.
80as_nl='
81'
82IFS=" 	$as_nl"
83
84# CDPATH.
85$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
86
87# Name of the host.
88# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
89# so uname gets run too.
90ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
91
92exec 6>&1
93
94#
95# Initializations.
96#
97ac_default_prefix=/usr/local
98cross_compiling=no
99subdirs=
100MFLAGS=
101MAKEFLAGS=
102SHELL=${CONFIG_SHELL-/bin/sh}
103
104# Maximum number of lines to put in a shell here document.
105# This variable seems obsolete.  It should probably be removed, and
106# only ac_max_sed_lines should be used.
107: "${ac_max_here_lines=38}"
108
109ac_unique_file="charproc.c"
110# Factoring default headers for most tests.
111ac_includes_default="\
112#include <stdio.h>
113#if HAVE_SYS_TYPES_H
114# include <sys/types.h>
115#endif
116#if HAVE_SYS_STAT_H
117# include <sys/stat.h>
118#endif
119#if STDC_HEADERS
120# include <stdlib.h>
121# include <stddef.h>
122#else
123# if HAVE_STDLIB_H
124#  include <stdlib.h>
125# endif
126#endif
127#if HAVE_STRING_H
128# if !STDC_HEADERS && HAVE_MEMORY_H
129#  include <memory.h>
130# endif
131# include <string.h>
132#endif
133#if HAVE_STRINGS_H
134# include <strings.h>
135#endif
136#if HAVE_INTTYPES_H
137# include <inttypes.h>
138#else
139# if HAVE_STDINT_H
140#  include <stdint.h>
141# endif
142#endif
143#if HAVE_UNISTD_H
144# include <unistd.h>
145#endif"
146
147# Initialize some variables set by options.
148ac_init_help=
149ac_init_version=false
150# The variables have the same names as the options, with
151# dashes changed to underlines.
152cache_file=/dev/null
153exec_prefix=NONE
154no_create=
155no_recursion=
156prefix=NONE
157program_prefix=NONE
158program_suffix=NONE
159program_transform_name=s,x,x,
160silent=
161site=
162srcdir=
163verbose=
164x_includes=NONE
165x_libraries=NONE
166
167# Installation directory options.
168# These are left unexpanded so users can "make install exec_prefix=/foo"
169# and all the variables that are supposed to be based on exec_prefix
170# by default will actually change.
171# Use braces instead of parens because sh, perl, etc. also accept them.
172bindir='${exec_prefix}/bin'
173sbindir='${exec_prefix}/sbin'
174libexecdir='${exec_prefix}/libexec'
175datarootdir='${prefix}/share'
176datadir='${datarootdir}'
177sysconfdir='${prefix}/etc'
178sharedstatedir='${prefix}/com'
179localstatedir='${prefix}/var'
180runstatedir='${localstatedir}/run'
181libdir='${exec_prefix}/lib'
182includedir='${prefix}/include'
183oldincludedir='/usr/include'
184infodir='${datarootdir}/info'
185mandir='${datarootdir}/man'
186
187# Identity of this package.
188PACKAGE_NAME=
189PACKAGE_TARNAME=
190PACKAGE_VERSION=
191PACKAGE_STRING=
192PACKAGE_BUGREPORT=
193
194ac_prev=
195for ac_option
196do
197  # If the previous option needs an argument, assign it.
198  if test -n "$ac_prev"; then
199    eval "$ac_prev=\$ac_option"
200    ac_prev=
201    continue
202  fi
203
204  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
205
206  # Accept the important Cygnus configure options, so we can diagnose typos.
207
208  case "$ac_option" in
209
210  -bindir | --bindir | --bindi | --bind | --bin | --bi)
211    ac_prev=bindir ;;
212  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
213    bindir=$ac_optarg ;;
214
215  -build | --build | --buil | --bui | --bu)
216    ac_prev=build_alias ;;
217  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
218    build_alias=$ac_optarg ;;
219
220  -cache-file | --cache-file | --cache-fil | --cache-fi \
221  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
222    ac_prev=cache_file ;;
223  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
224  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
225    cache_file=$ac_optarg ;;
226
227  --config-cache | -C)
228    cache_file=config.cache ;;
229
230  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
231    ac_prev=datadir ;;
232  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
233  | --da=*)
234    datadir=$ac_optarg ;;
235
236  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
237  | --dataroo | --dataro | --datar)
238    ac_prev=datarootdir ;;
239  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
240  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
241    datarootdir=$ac_optarg ;;
242
243  -disable-* | --disable-*)
244    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
245    # Reject names that are not valid shell variable names.
246    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
247      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
248   { (exit 1); exit 1; }; }
249    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
250    eval "enable_$ac_feature=no" ;;
251
252  -enable-* | --enable-*)
253    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
254    # Reject names that are not valid shell variable names.
255    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
256      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
257   { (exit 1); exit 1; }; }
258    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
259    case "$ac_option" in
260      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
261      *) ac_optarg=yes ;;
262    esac
263    eval "enable_$ac_feature='$ac_optarg'" ;;
264
265  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
266  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
267  | --exec | --exe | --ex)
268    ac_prev=exec_prefix ;;
269  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
270  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
271  | --exec=* | --exe=* | --ex=*)
272    exec_prefix=$ac_optarg ;;
273
274  -gas | --gas | --ga | --g)
275    # Obsolete; use --with-gas.
276    with_gas=yes ;;
277
278  -help | --help | --hel | --he | -h)
279    ac_init_help=long ;;
280  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
281    ac_init_help=recursive ;;
282  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
283    ac_init_help=short ;;
284
285  -host | --host | --hos | --ho)
286    ac_prev=host_alias ;;
287  -host=* | --host=* | --hos=* | --ho=*)
288    host_alias=$ac_optarg ;;
289
290  -includedir | --includedir | --includedi | --included | --include \
291  | --includ | --inclu | --incl | --inc)
292    ac_prev=includedir ;;
293  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
294  | --includ=* | --inclu=* | --incl=* | --inc=*)
295    includedir=$ac_optarg ;;
296
297  -infodir | --infodir | --infodi | --infod | --info | --inf)
298    ac_prev=infodir ;;
299  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
300    infodir=$ac_optarg ;;
301
302  -libdir | --libdir | --libdi | --libd)
303    ac_prev=libdir ;;
304  -libdir=* | --libdir=* | --libdi=* | --libd=*)
305    libdir=$ac_optarg ;;
306
307  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
308  | --libexe | --libex | --libe)
309    ac_prev=libexecdir ;;
310  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
311  | --libexe=* | --libex=* | --libe=*)
312    libexecdir=$ac_optarg ;;
313
314  -localstatedir | --localstatedir | --localstatedi | --localstated \
315  | --localstate | --localstat | --localsta | --localst \
316  | --locals | --local | --loca | --loc | --lo)
317    ac_prev=localstatedir ;;
318  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
319  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
320  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
321    localstatedir=$ac_optarg ;;
322
323  -runstatedir | --runstatedir | --runstatedi | --runstated \
324  | --runstate | --runstat | --runsta | --runst \
325  | --runs | --run | --ru)
326    ac_prev=runstatedir ;;
327  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
328  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
329  | --runs=* | --run=* | --ru=*)
330    runstatedir=$ac_optarg ;;
331
332  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
333    ac_prev=mandir ;;
334  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
335    mandir=$ac_optarg ;;
336
337  -nfp | --nfp | --nf)
338    # Obsolete; use --without-fp.
339    with_fp=no ;;
340
341  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
342  | --no-cr | --no-c)
343    no_create=yes ;;
344
345  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
346  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
347    no_recursion=yes ;;
348
349  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
350  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
351  | --oldin | --oldi | --old | --ol | --o)
352    ac_prev=oldincludedir ;;
353  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
354  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
355  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
356    oldincludedir=$ac_optarg ;;
357
358  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
359    ac_prev=prefix ;;
360  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
361    prefix=$ac_optarg ;;
362
363  -program-prefix | --program-prefix | --program-prefi | --program-pref \
364  | --program-pre | --program-pr | --program-p)
365    ac_prev=program_prefix ;;
366  -program-prefix=* | --program-prefix=* | --program-prefi=* \
367  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
368    program_prefix=$ac_optarg ;;
369
370  -program-suffix | --program-suffix | --program-suffi | --program-suff \
371  | --program-suf | --program-su | --program-s)
372    ac_prev=program_suffix ;;
373  -program-suffix=* | --program-suffix=* | --program-suffi=* \
374  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
375    program_suffix=$ac_optarg ;;
376
377  -program-transform-name | --program-transform-name \
378  | --program-transform-nam | --program-transform-na \
379  | --program-transform-n | --program-transform- \
380  | --program-transform | --program-transfor \
381  | --program-transfo | --program-transf \
382  | --program-trans | --program-tran \
383  | --progr-tra | --program-tr | --program-t)
384    ac_prev=program_transform_name ;;
385  -program-transform-name=* | --program-transform-name=* \
386  | --program-transform-nam=* | --program-transform-na=* \
387  | --program-transform-n=* | --program-transform-=* \
388  | --program-transform=* | --program-transfor=* \
389  | --program-transfo=* | --program-transf=* \
390  | --program-trans=* | --program-tran=* \
391  | --progr-tra=* | --program-tr=* | --program-t=*)
392    program_transform_name=$ac_optarg ;;
393
394  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
395  | -silent | --silent | --silen | --sile | --sil)
396    silent=yes ;;
397
398  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
399    ac_prev=sbindir ;;
400  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
401  | --sbi=* | --sb=*)
402    sbindir=$ac_optarg ;;
403
404  -sharedstatedir | --sharedstatedir | --sharedstatedi \
405  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
406  | --sharedst | --shareds | --shared | --share | --shar \
407  | --sha | --sh)
408    ac_prev=sharedstatedir ;;
409  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
410  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
411  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
412  | --sha=* | --sh=*)
413    sharedstatedir=$ac_optarg ;;
414
415  -site | --site | --sit)
416    ac_prev=site ;;
417  -site=* | --site=* | --sit=*)
418    site=$ac_optarg ;;
419
420  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
421    ac_prev=srcdir ;;
422  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
423    srcdir=$ac_optarg ;;
424
425  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
426  | --syscon | --sysco | --sysc | --sys | --sy)
427    ac_prev=sysconfdir ;;
428  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
429  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
430    sysconfdir=$ac_optarg ;;
431
432  -target | --target | --targe | --targ | --tar | --ta | --t)
433    ac_prev=target_alias ;;
434  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
435    target_alias=$ac_optarg ;;
436
437  -v | -verbose | --verbose | --verbos | --verbo | --verb)
438    verbose=yes ;;
439
440  -version | --version | --versio | --versi | --vers | -V)
441    ac_init_version=: ;;
442
443  -with-* | --with-*)
444    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
445    # Reject names that are not valid shell variable names.
446    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
447      { echo "$as_me: error: invalid package name: $ac_package" >&2
448   { (exit 1); exit 1; }; }
449    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
450    case "$ac_option" in
451      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
452      *) ac_optarg=yes ;;
453    esac
454    eval "with_$ac_package='$ac_optarg'" ;;
455
456  -without-* | --without-*)
457    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
458    # Reject names that are not valid shell variable names.
459    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
460      { echo "$as_me: error: invalid package name: $ac_package" >&2
461   { (exit 1); exit 1; }; }
462    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
463    eval "with_$ac_package=no" ;;
464
465  --x)
466    # Obsolete; use --with-x.
467    with_x=yes ;;
468
469  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
470  | --x-incl | --x-inc | --x-in | --x-i)
471    ac_prev=x_includes ;;
472  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
473  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
474    x_includes=$ac_optarg ;;
475
476  -x-libraries | --x-libraries | --x-librarie | --x-librari \
477  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
478    ac_prev=x_libraries ;;
479  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
480  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
481    x_libraries=$ac_optarg ;;
482
483  -*) { echo "$as_me: error: unrecognized option: $ac_option
484Try \`$0 --help' for more information." >&2
485   { (exit 1); exit 1; }; }
486    ;;
487
488  *=*)
489    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
490    # Reject names that are not valid shell variable names.
491    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
492      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
493   { (exit 1); exit 1; }; }
494    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
495    eval "$ac_envvar='$ac_optarg'"
496    export "$ac_envvar" ;;
497
498  *)
499    # FIXME: should be removed in autoconf 3.0.
500    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
501    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
502      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
503    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
504    ;;
505
506  esac
507done
508
509if test -n "$ac_prev"; then
510  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
511  { echo "$as_me: error: missing argument to $ac_option" >&2
512   { (exit 1); exit 1; }; }
513fi
514
515# Be sure to have absolute paths.
516for ac_var in exec_prefix prefix
517do
518  eval ac_val=$`echo "$ac_var"`
519  case "$ac_val" in
520    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# Be sure to have absolute paths.
527for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
528              localstatedir libdir includedir oldincludedir infodir mandir
529do
530  eval ac_val=$`echo "$ac_var"`
531  case "$ac_val" in
532    [\\/$]* | ?:[\\/]* ) ;;
533    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
534   { (exit 1); exit 1; }; };;
535  esac
536done
537
538# There might be people who depend on the old broken behavior: `$host'
539# used to hold the argument of --host etc.
540build=$build_alias
541host=$host_alias
542target=$target_alias
543
544# FIXME: should be removed in autoconf 3.0.
545if test "x$host_alias" != x; then
546  if test "x$build_alias" = x; then
547    cross_compiling=maybe
548    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
549    If a cross compiler is detected then cross compile mode will be used." >&2
550  elif test "x$build_alias" != "x$host_alias"; then
551    cross_compiling=yes
552  fi
553fi
554
555ac_tool_prefix=
556test -n "$host_alias" && ac_tool_prefix=$host_alias-
557
558test "$silent" = yes && exec 6>/dev/null
559
560# Find the source files, if location was not specified.
561if test -z "$srcdir"; then
562  ac_srcdir_defaulted=yes
563  # Try the directory containing this script, then its parent.
564  ac_prog=$0
565  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
566  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
567  srcdir=$ac_confdir
568  if test ! -r "$srcdir/$ac_unique_file"; then
569    srcdir=..
570  fi
571else
572  ac_srcdir_defaulted=no
573fi
574if test ! -r "$srcdir/$ac_unique_file"; then
575  if test "$ac_srcdir_defaulted" = yes; then
576    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
577   { (exit 1); exit 1; }; }
578  else
579    { echo "$as_me: error: cannot find sources in $srcdir" >&2
580   { (exit 1); exit 1; }; }
581  fi
582fi
583srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
584ac_env_build_alias_set=${build_alias+set}
585ac_env_build_alias_value=$build_alias
586ac_cv_env_build_alias_set=${build_alias+set}
587ac_cv_env_build_alias_value=$build_alias
588ac_env_host_alias_set=${host_alias+set}
589ac_env_host_alias_value=$host_alias
590ac_cv_env_host_alias_set=${host_alias+set}
591ac_cv_env_host_alias_value=$host_alias
592ac_env_target_alias_set=${target_alias+set}
593ac_env_target_alias_value=$target_alias
594ac_cv_env_target_alias_set=${target_alias+set}
595ac_cv_env_target_alias_value=$target_alias
596ac_env_CC_set=${CC+set}
597ac_env_CC_value=$CC
598ac_cv_env_CC_set=${CC+set}
599ac_cv_env_CC_value=$CC
600ac_env_CFLAGS_set=${CFLAGS+set}
601ac_env_CFLAGS_value=$CFLAGS
602ac_cv_env_CFLAGS_set=${CFLAGS+set}
603ac_cv_env_CFLAGS_value=$CFLAGS
604ac_env_LDFLAGS_set=${LDFLAGS+set}
605ac_env_LDFLAGS_value=$LDFLAGS
606ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
607ac_cv_env_LDFLAGS_value=$LDFLAGS
608ac_env_CPPFLAGS_set=${CPPFLAGS+set}
609ac_env_CPPFLAGS_value=$CPPFLAGS
610ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
611ac_cv_env_CPPFLAGS_value=$CPPFLAGS
612ac_env_CPP_set=${CPP+set}
613ac_env_CPP_value=$CPP
614ac_cv_env_CPP_set=${CPP+set}
615ac_cv_env_CPP_value=$CPP
616
617#
618# Report the --help message.
619#
620if test "$ac_init_help" = "long"; then
621  # Omit some internal or obsolete options to make the list less imposing.
622  # This message is too long to be a string in the A/UX 3.1 sh.
623  cat <<EOF
624\`configure' configures this package to adapt to many kinds of systems.
625
626Usage: $0 [OPTION]... [VAR=VALUE]...
627
628To assign environment variables (e.g., CC, CFLAGS...), specify them as
629VAR=VALUE.  See below for descriptions of some of the useful variables.
630
631Defaults for the options are specified in brackets.
632
633Configuration:
634  -h, --help              display this help and exit
635      --help=short        display options specific to this package
636      --help=recursive    display the short help of all the included packages
637  -V, --version           display version information and exit
638  -q, --quiet, --silent   do not print \`checking...' messages
639      --cache-file=FILE   cache test results in FILE [disabled]
640  -C, --config-cache      alias for \`--cache-file=config.cache'
641  -n, --no-create         do not create output files
642      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
643
644EOF
645
646  cat <<EOF
647Installation directories:
648  --prefix=PREFIX         install architecture-independent files in PREFIX
649                          [$ac_default_prefix]
650  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
651                          [PREFIX]
652
653By default, \`make install' will install all the files in
654\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
655an installation prefix other than \`$ac_default_prefix' using \`--prefix',
656for instance \`--prefix=\$HOME'.
657
658For better control, use the options below.
659
660Fine tuning of the installation directories:
661  --bindir=DIR            user executables [EPREFIX/bin]
662  --sbindir=DIR           system admin executables [EPREFIX/sbin]
663  --libexecdir=DIR        program executables [EPREFIX/libexec]
664  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
665  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
666  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
667  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
668  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
669  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
670  --libdir=DIR            object code libraries [EPREFIX/lib]
671  --includedir=DIR        C header files [PREFIX/include]
672  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
673  --infodir=DIR           info documentation [DATAROOTDIR/info]
674  --mandir=DIR            man documentation [DATAROOTDIR/man]
675EOF
676
677  cat <<\EOF
678
679Program names:
680  --program-prefix=PREFIX            prepend PREFIX to installed program names
681  --program-suffix=SUFFIX            append SUFFIX to installed program names
682  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
683
684X features:
685  --x-includes=DIR    X include files are in DIR
686  --x-libraries=DIR   X library files are in DIR
687
688System types:
689  --build=BUILD           configure for building on BUILD [guessed]
690  --host=HOST       build programs to run on HOST [BUILD]
691EOF
692fi
693
694if test -n "$ac_init_help"; then
695
696  cat <<\EOF
697
698Optional Features:
699  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
700  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
701
702Optional Packages:
703  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
704  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
705
706Compile/Install Options:
707  --disable-full-tgetent  disable check for full tgetent function
708  --with-app-class=XXX    override X applications class (default XTerm)
709  --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
710  --with-icon-name=XXXX   override icon name (default: mini.xterm)
711  --with-icon-symlink=XXX make symbolic link for icon name (default: xterm)
712  --with-pixmapdir=DIR    directory in which to install pixmaps (DATADIR/pixmaps)
713  --with-icondir=DIR      directory in which to install icons for desktop
714  --with-icon-theme=XXX   install icons into desktop theme (hicolor)
715  --disable-desktop       disable install of xterm desktop files
716  --with-desktop-category=XXX  one or more desktop catgories or auto
717  --with-reference=XXX    program to use as permissions-reference
718  --with-xterm-symlink=XXX make symbolic link to installed xterm
719  --disable-openpty       disable openpty, prefer other interfaces
720  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
721  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
722  --with-setuid=XXX       use the given setuid user
723  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
724  --with-utempter         use utempter library for access to utmp
725  --with-tty-group=XXX    use XXX for the tty-group
726  --with-x                use the X Window System
727  --with-pkg-config{=path} enable/disable use of pkg-config
728  --with-xpm=DIR          use Xpm library for colored icon, may specify path
729  --without-xinerama      do not use Xinerama extension for multiscreen support
730  --with-Xaw3d            link with Xaw 3d library
731  --with-Xaw3dxft         link with Xaw 3d xft library
732  --with-neXtaw           link with neXT Athena library
733  --with-XawPlus          link with Athena-Plus library
734  --disable-xcursor        disable cursorTheme resource
735  --enable-narrowproto    enable narrow prototypes for X libraries
736  --disable-imake         disable use of imake for definitions
737  --with-man2html=XXX     use XXX rather than groff
738Terminal Configuration:
739  --with-terminal-id=V    set default decTerminalID (default: vt420)
740  --with-terminal-type=T  set default $TERM (default: xterm)
741  --enable-backarrow-key  set default backarrowKey resource (default: true)
742  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
743  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
744  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)
745  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
746  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
747  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
748  --enable-env-terminfo   setenv $TERMINFO if --with-own-terminfo gives value
749Optional Features:
750  --disable-active-icon   disable X11R6.3 active-icon feature
751  --disable-ansi-color    disable ANSI color
752  --disable-16-color      disable 16-color support
753  --disable-256-color     disable 256-color support
754  --disable-direct-color  disable direct-color support
755  --disable-88-color      disable 88-color support
756  --disable-blink-cursor  disable support for blinking cursor
757  --enable-broken-osc     allow broken Linux OSC-strings
758  --disable-broken-st     disallow broken string-terminators
759  --enable-builtin-xpms   compile-in icon data
760  --disable-c1-print      disallow -k8 option for printable 128-159
761  --disable-bold-color    disable PC-style mapping of bold colors
762  --disable-color-class   disable separate color class resources
763  --disable-color-mode    disable default colorMode resource
764  --disable-highlighting  disable support for color highlighting
765  --disable-doublechars   disable support for double-size chars
766  --disable-boxchars      disable fallback-support for box chars
767  --enable-exec-xterm     enable "spawn-new-terminal" action
768  --enable-double-buffer  enable double-buffering in default resources
769  --disable-freetype      disable freetype library-support
770  --with-freetype-config  configure script to use for FreeType
771  --with-freetype-cflags  -D/-I options for compiling with FreeType
772  --with-freetype-libs    -L/-l options to link FreeType
773  --enable-hp-fkeys       enable support for HP-style function keys
774  --enable-sco-fkeys      enable support for SCO-style function keys
775  --disable-sun-fkeys     disable support for Sun-style function keys
776  --disable-fifo-lines    disable FIFO-storage for saved-lines
777  --disable-i18n          disable internationalization
778  --disable-initial-erase disable setup for stty erase
779  --disable-input-method  disable input-method
780  --enable-load-vt-fonts  enable load-vt-fonts() action
781  --enable-logging        enable logging
782  --enable-logfile-exec   enable exec'd logfile filter
783  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
784  --disable-num-lock      disable NumLock keypad support
785  --disable-paste64       disable get/set base64 selection data
786  --disable-pty-handshake disable pty-handshake support
787  --enable-readline-mouse enable support for mouse in readline applications
788  --disable-regex         disable regular-expression selections
789  --with-pcre2            use PCRE2 for regular-expressions
790  --with-pcre             use PCRE for regular-expressions
791  --disable-rightbar      disable right-scrollbar support
792  --disable-samename      disable check for redundant name-change
793  --disable-selection-ops disable selection-action operations
794  --disable-session-mgt   disable support for session management
795  --disable-tcap-fkeys    disable termcap function-keys support
796  --disable-tcap-query    disable compiled-in termcap-query support
797  --disable-tek4014       disable tek4014 emulation
798  --enable-toolbar        compile-in toolbar for pulldown menus
799  --disable-vt52          disable VT52 emulation
800  --disable-wide-attrs    disable wide-attribute support
801  --disable-wide-chars    disable wide-character support
802  --enable-16bit-chars    enable 16-bit character support
803  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
804  --disable-luit          enable luit filter (Unicode translation)
805  --enable-dabbrev        enable dynamic-abbreviation support
806  --enable-dec-locator    enable DECterm Locator support
807  --disable-screen-dumps  disable XHTML and SVG screen dumps
808  --enable-regis-graphics enable ReGIS graphics support
809  --disable-sixel-graphics disable sixel graphics support
810  --disable-print-graphics disable screen dump to sixel support
811  --disable-rectangles    disable VT420 rectangle support
812  --disable-ziconbeep     disable -ziconbeep option
813Testing/development Options:
814  --enable-trace          test: set to enable debugging traces
815  --with-dmalloc          test: use Gray Watson's dmalloc library
816  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
817  --with-valgrind         test: use valgrind
818  --disable-leaks         test: free permanent memory, analyze leaks
819  --disable-echo          do not display "compiling" commands
820  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
821  --enable-warnings       test: turn on gcc compiler warnings
822  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
823  --disable-rpath-hack    don't add rpath options for additional libraries
824
825Some influential environment variables:
826  CC          C compiler command
827  CFLAGS      C compiler flags
828  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
829              nonstandard directory <lib dir>
830  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
831              headers in a nonstandard directory <include dir>
832  CPP         C preprocessor
833
834Use these variables to override the choices made by `configure' or to help
835it to find libraries and programs with nonstandard names/locations.
836
837EOF
838fi
839
840if test "$ac_init_help" = "recursive"; then
841  # If there are subdirs, report their specific --help.
842  ac_popdir=`pwd`
843  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
844    cd "$ac_subdir"
845    # A "../" for each directory in /$ac_subdir.
846    ac_dots=`echo "$ac_subdir" |
847             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
848
849    case "$srcdir" in
850    .) # No --srcdir option.  We are building in place.
851      ac_sub_srcdir="$srcdir" ;;
852    [\\/]* | ?:[\\/]* ) # Absolute path.
853      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
854    *) # Relative path.
855      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
856    esac
857
858    # Check for guested configure; otherwise get Cygnus style configure.
859    if test -f "$ac_sub_srcdir/configure.gnu"; then
860      echo
861      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
862    elif test -f "$ac_sub_srcdir/configure"; then
863      echo
864      $SHELL "$ac_sub_srcdir/configure" --help=recursive
865    elif test -f "$ac_sub_srcdir/configure.ac" ||
866           test -f "$ac_sub_srcdir/configure.in"; then
867      echo
868      "$ac_configure" --help
869    else
870      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
871    fi
872    cd "$ac_popdir"
873  done
874fi
875
876test -n "$ac_init_help" && exit 0
877if "$ac_init_version"; then
878  cat <<\EOF
879
880Copyright 2003-2020,2021	Thomas E. Dickey
881Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
882Free Software Foundation, Inc.
883This configure script is free software; the Free Software Foundation
884gives unlimited permission to copy, distribute and modify it.
885EOF
886  exit 0
887fi
888exec 5>config.log
889cat >&5 <<EOF
890This file contains any messages produced by compilers while
891running configure, to aid debugging if configure makes a mistake.
892
893It was created by $as_me, which was
894generated by GNU Autoconf 2.52.20210509.  Invocation command line was
895
896  $ $0 $@
897
898EOF
899{
900cat <<_ASUNAME
901## ---------- ##
902## Platform.  ##
903## ---------- ##
904
905hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
906uname -m = `(uname -m) 2>/dev/null || echo unknown`
907uname -r = `(uname -r) 2>/dev/null || echo unknown`
908uname -s = `(uname -s) 2>/dev/null || echo unknown`
909uname -v = `(uname -v) 2>/dev/null || echo unknown`
910
911/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
912/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
913
914/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
915/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
916/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
917hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
918/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
919/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
920/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
921
922PATH = $PATH
923
924_ASUNAME
925} >&5
926
927cat >&5 <<EOF
928## ------------ ##
929## Core tests.  ##
930## ------------ ##
931
932EOF
933
934# Keep a trace of the command line.
935# Strip out --no-create and --no-recursion so they do not pile up.
936# Also quote any args containing shell meta-characters.
937ac_configure_args=
938ac_sep=
939for ac_arg
940do
941  case "$ac_arg" in
942  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
943  | --no-cr | --no-c) ;;
944  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
945  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
946  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
947    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
948    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
949    ac_sep=" " ;;
950  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
951     ac_sep=" " ;;
952  esac
953  # Get rid of the leading space.
954done
955
956# When interrupted or exit'd, cleanup temporary files, and complete
957# config.log.  We remove comments because anyway the quotes in there
958# would cause problems or look ugly.
959trap 'exit_status=$?
960  # Save into config.log some information that might help in debugging.
961  echo >&5
962  echo "## ----------------- ##" >&5
963  echo "## Cache variables.  ##" >&5
964  echo "## ----------------- ##" >&5
965  echo >&5
966  # The following way of writing the cache mishandles newlines in values,
967{
968  (set) 2>&1 |
969    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
970    *ac_space=\ *)
971      sed -n \
972        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
973    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
974      ;;
975    *)
976      sed -n \
977        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
978      ;;
979    esac;
980} >&5
981  sed "/^$/d" confdefs.h >conftest.log
982  if test -s conftest.log; then
983    echo >&5
984    echo "## ------------ ##" >&5
985    echo "## confdefs.h.  ##" >&5
986    echo "## ------------ ##" >&5
987    echo >&5
988    cat conftest.log >&5
989  fi
990  (echo; echo) >&5
991  test "$ac_signal" != 0 &&
992    echo "$as_me: caught signal $ac_signal" >&5
993  echo "$as_me: exit $exit_status" >&5
994  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
995    exit $exit_status
996     ' 0
997for ac_signal in 1 2 13 15; do
998  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
999done
1000ac_signal=0
1001
1002# confdefs.h avoids OS command line length limits that DEFS can exceed.
1003rm -rf conftest* confdefs.h
1004# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1005echo >confdefs.h
1006
1007# Let the site file select an alternate cache file if it wants to.
1008# Prefer explicitly selected file to automatically selected ones.
1009if test -z "$CONFIG_SITE"; then
1010  if test "x$prefix" != xNONE; then
1011    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1012  else
1013    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1014  fi
1015fi
1016for ac_site_file in $CONFIG_SITE; do
1017  if test -r "$ac_site_file"; then
1018    { echo "$as_me:1018: loading site script $ac_site_file" >&5
1019echo "$as_me: loading site script $ac_site_file" >&6;}
1020    cat "$ac_site_file" >&5
1021    . "$ac_site_file"
1022  fi
1023done
1024
1025if test -r "$cache_file"; then
1026  # Some versions of bash will fail to source /dev/null (special
1027  # files actually), so we avoid doing that.
1028  if test -f "$cache_file"; then
1029    { echo "$as_me:1029: loading cache $cache_file" >&5
1030echo "$as_me: loading cache $cache_file" >&6;}
1031    case $cache_file in
1032      [\\/]* | ?:[\\/]* ) . $cache_file;;
1033      *)                      . ./$cache_file;;
1034    esac
1035  fi
1036else
1037  { echo "$as_me:1037: creating cache $cache_file" >&5
1038echo "$as_me: creating cache $cache_file" >&6;}
1039  >$cache_file
1040fi
1041
1042# Check that the precious variables saved in the cache have kept the same
1043# value.
1044ac_cache_corrupted=false
1045for ac_var in `(set) 2>&1 |
1046               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1047  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1048  eval ac_new_set=\$ac_env_${ac_var}_set
1049  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1050  eval ac_new_val="\$ac_env_${ac_var}_value"
1051  case "$ac_old_set,$ac_new_set" in
1052    set,)
1053      { echo "$as_me:1053: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1054echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1055      ac_cache_corrupted=: ;;
1056    ,set)
1057      { echo "$as_me:1057: error: \`$ac_var' was not set in the previous run" >&5
1058echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1059      ac_cache_corrupted=: ;;
1060    ,);;
1061    *)
1062      if test "x$ac_old_val" != "x$ac_new_val"; then
1063        { echo "$as_me:1063: error: \`$ac_var' has changed since the previous run:" >&5
1064echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1065        { echo "$as_me:1065:   former value:  $ac_old_val" >&5
1066echo "$as_me:   former value:  $ac_old_val" >&2;}
1067        { echo "$as_me:1067:   current value: $ac_new_val" >&5
1068echo "$as_me:   current value: $ac_new_val" >&2;}
1069        ac_cache_corrupted=:
1070      fi;;
1071  esac
1072  # Pass precious variables to config.status.  It doesn't matter if
1073  # we pass some twice (in addition to the command line arguments).
1074  if test "$ac_new_set" = set; then
1075    case "$ac_new_val" in
1076    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1077      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1078      ac_configure_args="$ac_configure_args '$ac_arg'"
1079      ;;
1080    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1081       ;;
1082    esac
1083  fi
1084done
1085if "$ac_cache_corrupted"; then
1086  { echo "$as_me:1086: error: changes in the environment can compromise the build" >&5
1087echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1088  { { echo "$as_me:1088: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1089echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1090   { (exit 1); exit 1; }; }
1091fi
1092
1093ac_ext=c
1094ac_cpp='$CPP $CPPFLAGS'
1095ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1096ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1097ac_compiler_gnu=$ac_cv_c_compiler_gnu
1098ac_main_return="return"
1099
1100case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1101  *c*,-n*) ECHO_N=
1102           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1103           ECHO_T='	'
1104           ;;
1105  *c*,*  ) ECHO_N=-n
1106           ECHO_C=
1107           ECHO_T=
1108           ;;
1109  *)       ECHO_N=
1110           ECHO_C='\c'
1111           ECHO_T=
1112           ;;
1113esac
1114echo "#! $SHELL" >conftest.sh
1115echo  "exit 0"   >>conftest.sh
1116chmod +x conftest.sh
1117if { (echo "$as_me:1117: PATH=\".;.\"; conftest.sh") >&5
1118  (PATH=".;."; conftest.sh) 2>&5
1119  ac_status=$?
1120  echo "$as_me:1120: \$? = $ac_status" >&5
1121  (exit "$ac_status"); }; then
1122  ac_path_separator=';'
1123else
1124  ac_path_separator=:
1125fi
1126PATH_SEPARATOR="$ac_path_separator"
1127rm -f conftest.sh
1128
1129ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1130
1131ac_aux_dir=
1132for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1133  if test -f "$ac_dir/install-sh"; then
1134    ac_aux_dir=$ac_dir
1135    ac_install_sh="$ac_aux_dir/install-sh -c"
1136    break
1137  elif test -f "$ac_dir/install.sh"; then
1138    ac_aux_dir=$ac_dir
1139    ac_install_sh="$ac_aux_dir/install.sh -c"
1140    break
1141  elif test -f "$ac_dir/shtool"; then
1142    ac_aux_dir=$ac_dir
1143    ac_install_sh="$ac_aux_dir/shtool install -c"
1144    break
1145  fi
1146done
1147if test -z "$ac_aux_dir"; then
1148  { { echo "$as_me:1148: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1149echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1150   { (exit 1); exit 1; }; }
1151fi
1152ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1153ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1154ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1155
1156# Make sure we can run config.sub.
1157$ac_config_sub sun4 >/dev/null 2>&1 ||
1158  { { echo "$as_me:1158: error: cannot run $ac_config_sub" >&5
1159echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1160   { (exit 1); exit 1; }; }
1161
1162echo "$as_me:1162: checking build system type" >&5
1163echo $ECHO_N "checking build system type... $ECHO_C" >&6
1164if test "${ac_cv_build+set}" = set; then
1165  echo $ECHO_N "(cached) $ECHO_C" >&6
1166else
1167  ac_cv_build_alias=$build_alias
1168test -z "$ac_cv_build_alias" &&
1169  ac_cv_build_alias=`$ac_config_guess`
1170test -z "$ac_cv_build_alias" &&
1171  { { echo "$as_me:1171: error: cannot guess build type; you must specify one" >&5
1172echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1173   { (exit 1); exit 1; }; }
1174ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1175  { { echo "$as_me:1175: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1176echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1177   { (exit 1); exit 1; }; }
1178
1179fi
1180echo "$as_me:1180: result: $ac_cv_build" >&5
1181echo "${ECHO_T}$ac_cv_build" >&6
1182build=$ac_cv_build
1183build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1184build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1185build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1186
1187if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1188	echo "$as_me:1188: checking host system type" >&5
1189echo $ECHO_N "checking host system type... $ECHO_C" >&6
1190if test "${ac_cv_host+set}" = set; then
1191  echo $ECHO_N "(cached) $ECHO_C" >&6
1192else
1193  ac_cv_host_alias=$host_alias
1194test -z "$ac_cv_host_alias" &&
1195  ac_cv_host_alias=$ac_cv_build_alias
1196ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1197  { { echo "$as_me:1197: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1198echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1199   { (exit 1); exit 1; }; }
1200
1201fi
1202echo "$as_me:1202: result: $ac_cv_host" >&5
1203echo "${ECHO_T}$ac_cv_host" >&6
1204host=$ac_cv_host
1205host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1206host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1207host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1208
1209	system_name="$host_os"
1210else
1211	system_name="`(uname -s -r) 2>/dev/null`"
1212	if test -z "$system_name" ; then
1213		system_name="`(hostname) 2>/dev/null`"
1214	fi
1215fi
1216test -n "$system_name" &&
1217cat >>confdefs.h <<EOF
1218#define SYSTEM_NAME "$system_name"
1219EOF
1220
1221if test "${cf_cv_system_name+set}" = set; then
1222  echo $ECHO_N "(cached) $ECHO_C" >&6
1223else
1224  cf_cv_system_name="$system_name"
1225fi
1226
1227test -z "$system_name" && system_name="$cf_cv_system_name"
1228test -n "$cf_cv_system_name" && echo "$as_me:1228: result: Configuring for $cf_cv_system_name" >&5
1229echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1230
1231if test ".$system_name" != ".$cf_cv_system_name" ; then
1232	echo "$as_me:1232: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1233echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1234	{ { echo "$as_me:1234: error: \"Please remove config.cache and try again.\"" >&5
1235echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1236   { (exit 1); exit 1; }; }
1237fi
1238
1239###	checks for alternative programs
1240
1241case "$host_os" in
1242(openedition)	: "${CFLAGS=\"-O2 -Wc,dll -Wl,EDIT=NO\"}"
1243		: "${CPPFLAGS=\"-D_ALL_SOURCE\"}"
1244		: "${LIBS=\"/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x\"}"
1245		: "${CC=c89}";;
1246(darwin*)
1247		: "${LDFLAGS}=\"${LDFLAGS} -Wl,-bind_at_load\"";;
1248esac
1249
1250ac_ext=c
1251ac_cpp='$CPP $CPPFLAGS'
1252ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1253ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1254ac_compiler_gnu=$ac_cv_c_compiler_gnu
1255ac_main_return="return"
1256if test -n "$ac_tool_prefix"; then
1257  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1258set dummy ${ac_tool_prefix}gcc; ac_word=$2
1259echo "$as_me:1259: checking for $ac_word" >&5
1260echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1261if test "${ac_cv_prog_CC+set}" = set; then
1262  echo $ECHO_N "(cached) $ECHO_C" >&6
1263else
1264  if test -n "$CC"; then
1265  ac_cv_prog_CC="$CC" # Let the user override the test.
1266else
1267  ac_save_IFS=$IFS; IFS=$ac_path_separator
1268ac_dummy="$PATH"
1269for ac_dir in $ac_dummy; do
1270  IFS=$ac_save_IFS
1271  test -z "$ac_dir" && ac_dir=.
1272  $as_executable_p "$ac_dir/$ac_word" || continue
1273ac_cv_prog_CC="${ac_tool_prefix}gcc"
1274echo "$as_me:1274: found $ac_dir/$ac_word" >&5
1275break
1276done
1277
1278fi
1279fi
1280CC=$ac_cv_prog_CC
1281if test -n "$CC"; then
1282  echo "$as_me:1282: result: $CC" >&5
1283echo "${ECHO_T}$CC" >&6
1284else
1285  echo "$as_me:1285: result: no" >&5
1286echo "${ECHO_T}no" >&6
1287fi
1288
1289fi
1290if test -z "$ac_cv_prog_CC"; then
1291  ac_ct_CC=$CC
1292  # Extract the first word of "gcc", so it can be a program name with args.
1293set dummy gcc; ac_word=$2
1294echo "$as_me:1294: checking for $ac_word" >&5
1295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1296if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1297  echo $ECHO_N "(cached) $ECHO_C" >&6
1298else
1299  if test -n "$ac_ct_CC"; then
1300  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1301else
1302  ac_save_IFS=$IFS; IFS=$ac_path_separator
1303ac_dummy="$PATH"
1304for ac_dir in $ac_dummy; do
1305  IFS=$ac_save_IFS
1306  test -z "$ac_dir" && ac_dir=.
1307  $as_executable_p "$ac_dir/$ac_word" || continue
1308ac_cv_prog_ac_ct_CC="gcc"
1309echo "$as_me:1309: found $ac_dir/$ac_word" >&5
1310break
1311done
1312
1313fi
1314fi
1315ac_ct_CC=$ac_cv_prog_ac_ct_CC
1316if test -n "$ac_ct_CC"; then
1317  echo "$as_me:1317: result: $ac_ct_CC" >&5
1318echo "${ECHO_T}$ac_ct_CC" >&6
1319else
1320  echo "$as_me:1320: result: no" >&5
1321echo "${ECHO_T}no" >&6
1322fi
1323
1324  CC=$ac_ct_CC
1325else
1326  CC="$ac_cv_prog_CC"
1327fi
1328
1329if test -z "$CC"; then
1330  if test -n "$ac_tool_prefix"; then
1331  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1332set dummy ${ac_tool_prefix}cc; ac_word=$2
1333echo "$as_me:1333: checking for $ac_word" >&5
1334echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1335if test "${ac_cv_prog_CC+set}" = set; then
1336  echo $ECHO_N "(cached) $ECHO_C" >&6
1337else
1338  if test -n "$CC"; then
1339  ac_cv_prog_CC="$CC" # Let the user override the test.
1340else
1341  ac_save_IFS=$IFS; IFS=$ac_path_separator
1342ac_dummy="$PATH"
1343for ac_dir in $ac_dummy; do
1344  IFS=$ac_save_IFS
1345  test -z "$ac_dir" && ac_dir=.
1346  $as_executable_p "$ac_dir/$ac_word" || continue
1347ac_cv_prog_CC="${ac_tool_prefix}cc"
1348echo "$as_me:1348: found $ac_dir/$ac_word" >&5
1349break
1350done
1351
1352fi
1353fi
1354CC=$ac_cv_prog_CC
1355if test -n "$CC"; then
1356  echo "$as_me:1356: result: $CC" >&5
1357echo "${ECHO_T}$CC" >&6
1358else
1359  echo "$as_me:1359: result: no" >&5
1360echo "${ECHO_T}no" >&6
1361fi
1362
1363fi
1364if test -z "$ac_cv_prog_CC"; then
1365  ac_ct_CC=$CC
1366  # Extract the first word of "cc", so it can be a program name with args.
1367set dummy cc; ac_word=$2
1368echo "$as_me:1368: checking for $ac_word" >&5
1369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1370if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1371  echo $ECHO_N "(cached) $ECHO_C" >&6
1372else
1373  if test -n "$ac_ct_CC"; then
1374  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1375else
1376  ac_save_IFS=$IFS; IFS=$ac_path_separator
1377ac_dummy="$PATH"
1378for ac_dir in $ac_dummy; do
1379  IFS=$ac_save_IFS
1380  test -z "$ac_dir" && ac_dir=.
1381  $as_executable_p "$ac_dir/$ac_word" || continue
1382ac_cv_prog_ac_ct_CC="cc"
1383echo "$as_me:1383: found $ac_dir/$ac_word" >&5
1384break
1385done
1386
1387fi
1388fi
1389ac_ct_CC=$ac_cv_prog_ac_ct_CC
1390if test -n "$ac_ct_CC"; then
1391  echo "$as_me:1391: result: $ac_ct_CC" >&5
1392echo "${ECHO_T}$ac_ct_CC" >&6
1393else
1394  echo "$as_me:1394: result: no" >&5
1395echo "${ECHO_T}no" >&6
1396fi
1397
1398  CC=$ac_ct_CC
1399else
1400  CC="$ac_cv_prog_CC"
1401fi
1402
1403fi
1404if test -z "$CC"; then
1405  # Extract the first word of "cc", so it can be a program name with args.
1406set dummy cc; ac_word=$2
1407echo "$as_me:1407: checking for $ac_word" >&5
1408echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1409if test "${ac_cv_prog_CC+set}" = set; then
1410  echo $ECHO_N "(cached) $ECHO_C" >&6
1411else
1412  if test -n "$CC"; then
1413  ac_cv_prog_CC="$CC" # Let the user override the test.
1414else
1415  ac_prog_rejected=no
1416  ac_save_IFS=$IFS; IFS=$ac_path_separator
1417ac_dummy="$PATH"
1418for ac_dir in $ac_dummy; do
1419  IFS=$ac_save_IFS
1420  test -z "$ac_dir" && ac_dir=.
1421  $as_executable_p "$ac_dir/$ac_word" || continue
1422if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1423  ac_prog_rejected=yes
1424  continue
1425fi
1426ac_cv_prog_CC="cc"
1427echo "$as_me:1427: found $ac_dir/$ac_word" >&5
1428break
1429done
1430
1431if test "$ac_prog_rejected" = yes; then
1432  # We found a bogon in the path, so make sure we never use it.
1433  set dummy $ac_cv_prog_CC
1434  shift
1435  if test $# != 0; then
1436    # We chose a different compiler from the bogus one.
1437    # However, it has the same basename, so the bogon will be chosen
1438    # first if we set CC to just the basename; use the full file name.
1439    shift
1440    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1441    shift
1442    ac_cv_prog_CC="$@"
1443  fi
1444fi
1445fi
1446fi
1447CC=$ac_cv_prog_CC
1448if test -n "$CC"; then
1449  echo "$as_me:1449: result: $CC" >&5
1450echo "${ECHO_T}$CC" >&6
1451else
1452  echo "$as_me:1452: result: no" >&5
1453echo "${ECHO_T}no" >&6
1454fi
1455
1456fi
1457if test -z "$CC"; then
1458  if test -n "$ac_tool_prefix"; then
1459  for ac_prog in cl
1460  do
1461    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1462set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1463echo "$as_me:1463: checking for $ac_word" >&5
1464echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1465if test "${ac_cv_prog_CC+set}" = set; then
1466  echo $ECHO_N "(cached) $ECHO_C" >&6
1467else
1468  if test -n "$CC"; then
1469  ac_cv_prog_CC="$CC" # Let the user override the test.
1470else
1471  ac_save_IFS=$IFS; IFS=$ac_path_separator
1472ac_dummy="$PATH"
1473for ac_dir in $ac_dummy; do
1474  IFS=$ac_save_IFS
1475  test -z "$ac_dir" && ac_dir=.
1476  $as_executable_p "$ac_dir/$ac_word" || continue
1477ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1478echo "$as_me:1478: found $ac_dir/$ac_word" >&5
1479break
1480done
1481
1482fi
1483fi
1484CC=$ac_cv_prog_CC
1485if test -n "$CC"; then
1486  echo "$as_me:1486: result: $CC" >&5
1487echo "${ECHO_T}$CC" >&6
1488else
1489  echo "$as_me:1489: result: no" >&5
1490echo "${ECHO_T}no" >&6
1491fi
1492
1493    test -n "$CC" && break
1494  done
1495fi
1496if test -z "$CC"; then
1497  ac_ct_CC=$CC
1498  for ac_prog in cl
1499do
1500  # Extract the first word of "$ac_prog", so it can be a program name with args.
1501set dummy $ac_prog; ac_word=$2
1502echo "$as_me:1502: checking for $ac_word" >&5
1503echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1504if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1505  echo $ECHO_N "(cached) $ECHO_C" >&6
1506else
1507  if test -n "$ac_ct_CC"; then
1508  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1509else
1510  ac_save_IFS=$IFS; IFS=$ac_path_separator
1511ac_dummy="$PATH"
1512for ac_dir in $ac_dummy; do
1513  IFS=$ac_save_IFS
1514  test -z "$ac_dir" && ac_dir=.
1515  $as_executable_p "$ac_dir/$ac_word" || continue
1516ac_cv_prog_ac_ct_CC="$ac_prog"
1517echo "$as_me:1517: found $ac_dir/$ac_word" >&5
1518break
1519done
1520
1521fi
1522fi
1523ac_ct_CC=$ac_cv_prog_ac_ct_CC
1524if test -n "$ac_ct_CC"; then
1525  echo "$as_me:1525: result: $ac_ct_CC" >&5
1526echo "${ECHO_T}$ac_ct_CC" >&6
1527else
1528  echo "$as_me:1528: result: no" >&5
1529echo "${ECHO_T}no" >&6
1530fi
1531
1532  test -n "$ac_ct_CC" && break
1533done
1534
1535  CC=$ac_ct_CC
1536fi
1537
1538fi
1539
1540test -z "$CC" && { { echo "$as_me:1540: error: no acceptable cc found in \$PATH" >&5
1541echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1542   { (exit 1); exit 1; }; }
1543
1544# Provide some information about the compiler.
1545echo "$as_me:1545:" \
1546     "checking for C compiler version" >&5
1547ac_compiler=`set X $ac_compile; echo "$2"`
1548{ (eval echo "$as_me:1548: \"$ac_compiler --version </dev/null >&5\"") >&5
1549  (eval $ac_compiler --version </dev/null >&5) 2>&5
1550  ac_status=$?
1551  echo "$as_me:1551: \$? = $ac_status" >&5
1552  (exit "$ac_status"); }
1553{ (eval echo "$as_me:1553: \"$ac_compiler -v </dev/null >&5\"") >&5
1554  (eval $ac_compiler -v </dev/null >&5) 2>&5
1555  ac_status=$?
1556  echo "$as_me:1556: \$? = $ac_status" >&5
1557  (exit "$ac_status"); }
1558{ (eval echo "$as_me:1558: \"$ac_compiler -V </dev/null >&5\"") >&5
1559  (eval $ac_compiler -V </dev/null >&5) 2>&5
1560  ac_status=$?
1561  echo "$as_me:1561: \$? = $ac_status" >&5
1562  (exit "$ac_status"); }
1563
1564cat >"conftest.$ac_ext" <<_ACEOF
1565#line 1565 "configure"
1566#include "confdefs.h"
1567
1568int
1569main (void)
1570{
1571
1572  ;
1573  return 0;
1574}
1575_ACEOF
1576ac_clean_files_save=$ac_clean_files
1577ac_clean_files="$ac_clean_files a.out a.exe"
1578# Try to create an executable without -o first, disregard a.out.
1579# It will help us diagnose broken compilers, and finding out an intuition
1580# of exeext.
1581echo "$as_me:1581: checking for C compiler default output" >&5
1582echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1583ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1584if { (eval echo "$as_me:1584: \"$ac_link_default\"") >&5
1585  (eval $ac_link_default) 2>&5
1586  ac_status=$?
1587  echo "$as_me:1587: \$? = $ac_status" >&5
1588  (exit "$ac_status"); }; then
1589  # Find the output, starting from the most likely.  This scheme is
1590# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1591# resort.
1592for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1593                ls a.out conftest 2>/dev/null;
1594                ls a.* conftest.* 2>/dev/null`; do
1595  case $ac_file in
1596    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1597    a.out ) # We found the default executable, but exeext='' is most
1598            # certainly right.
1599            break;;
1600    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1601          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1602          export ac_cv_exeext
1603          break;;
1604    * ) break;;
1605  esac
1606done
1607else
1608  echo "$as_me: failed program was:" >&5
1609cat "conftest.$ac_ext" >&5
1610{ { echo "$as_me:1610: error: C compiler cannot create executables" >&5
1611echo "$as_me: error: C compiler cannot create executables" >&2;}
1612   { (exit 77); exit 77; }; }
1613fi
1614
1615ac_exeext=$ac_cv_exeext
1616echo "$as_me:1616: result: $ac_file" >&5
1617echo "${ECHO_T}$ac_file" >&6
1618
1619# Check the compiler produces executables we can run.  If not, either
1620# the compiler is broken, or we cross compile.
1621echo "$as_me:1621: checking whether the C compiler works" >&5
1622echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1623# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1624# If not cross compiling, check that we can run a simple program.
1625if test "$cross_compiling" != yes; then
1626  if { ac_try='./$ac_file'
1627  { (eval echo "$as_me:1627: \"$ac_try\"") >&5
1628  (eval $ac_try) 2>&5
1629  ac_status=$?
1630  echo "$as_me:1630: \$? = $ac_status" >&5
1631  (exit "$ac_status"); }; }; then
1632    cross_compiling=no
1633  else
1634    if test "$cross_compiling" = maybe; then
1635	cross_compiling=yes
1636    else
1637	{ { echo "$as_me:1637: error: cannot run C compiled programs.
1638If you meant to cross compile, use \`--host'." >&5
1639echo "$as_me: error: cannot run C compiled programs.
1640If you meant to cross compile, use \`--host'." >&2;}
1641   { (exit 1); exit 1; }; }
1642    fi
1643  fi
1644fi
1645echo "$as_me:1645: result: yes" >&5
1646echo "${ECHO_T}yes" >&6
1647
1648rm -f a.out a.exe "conftest$ac_cv_exeext"
1649ac_clean_files=$ac_clean_files_save
1650# Check the compiler produces executables we can run.  If not, either
1651# the compiler is broken, or we cross compile.
1652echo "$as_me:1652: checking whether we are cross compiling" >&5
1653echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1654echo "$as_me:1654: result: $cross_compiling" >&5
1655echo "${ECHO_T}$cross_compiling" >&6
1656
1657echo "$as_me:1657: checking for executable suffix" >&5
1658echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1659if { (eval echo "$as_me:1659: \"$ac_link\"") >&5
1660  (eval $ac_link) 2>&5
1661  ac_status=$?
1662  echo "$as_me:1662: \$? = $ac_status" >&5
1663  (exit "$ac_status"); }; then
1664  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1665# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1666# work properly (i.e., refer to `conftest.exe'), while it won't with
1667# `rm'.
1668for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1669  case $ac_file in
1670    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1671    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1672          export ac_cv_exeext
1673          break;;
1674    * ) break;;
1675  esac
1676done
1677else
1678  { { echo "$as_me:1678: error: cannot compute EXEEXT: cannot compile and link" >&5
1679echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1680   { (exit 1); exit 1; }; }
1681fi
1682
1683rm -f "conftest$ac_cv_exeext"
1684echo "$as_me:1684: result: $ac_cv_exeext" >&5
1685echo "${ECHO_T}$ac_cv_exeext" >&6
1686
1687rm -f "conftest.$ac_ext"
1688EXEEXT=$ac_cv_exeext
1689ac_exeext=$EXEEXT
1690echo "$as_me:1690: checking for object suffix" >&5
1691echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1692if test "${ac_cv_objext+set}" = set; then
1693  echo $ECHO_N "(cached) $ECHO_C" >&6
1694else
1695  cat >"conftest.$ac_ext" <<_ACEOF
1696#line 1696 "configure"
1697#include "confdefs.h"
1698
1699int
1700main (void)
1701{
1702
1703  ;
1704  return 0;
1705}
1706_ACEOF
1707rm -f conftest.o conftest.obj
1708if { (eval echo "$as_me:1708: \"$ac_compile\"") >&5
1709  (eval $ac_compile) 2>&5
1710  ac_status=$?
1711  echo "$as_me:1711: \$? = $ac_status" >&5
1712  (exit "$ac_status"); }; then
1713  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1714  case $ac_file in
1715    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1716    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1717       break;;
1718  esac
1719done
1720else
1721  echo "$as_me: failed program was:" >&5
1722cat "conftest.$ac_ext" >&5
1723{ { echo "$as_me:1723: error: cannot compute OBJEXT: cannot compile" >&5
1724echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1725   { (exit 1); exit 1; }; }
1726fi
1727
1728rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1729fi
1730echo "$as_me:1730: result: $ac_cv_objext" >&5
1731echo "${ECHO_T}$ac_cv_objext" >&6
1732OBJEXT=$ac_cv_objext
1733ac_objext=$OBJEXT
1734echo "$as_me:1734: checking whether we are using the GNU C compiler" >&5
1735echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1736if test "${ac_cv_c_compiler_gnu+set}" = set; then
1737  echo $ECHO_N "(cached) $ECHO_C" >&6
1738else
1739  cat >"conftest.$ac_ext" <<_ACEOF
1740#line 1740 "configure"
1741#include "confdefs.h"
1742
1743int
1744main (void)
1745{
1746#ifndef __GNUC__
1747       choke me
1748#endif
1749
1750  ;
1751  return 0;
1752}
1753_ACEOF
1754rm -f "conftest.$ac_objext"
1755if { (eval echo "$as_me:1755: \"$ac_compile\"") >&5
1756  (eval $ac_compile) 2>&5
1757  ac_status=$?
1758  echo "$as_me:1758: \$? = $ac_status" >&5
1759  (exit "$ac_status"); } &&
1760         { ac_try='test -s "conftest.$ac_objext"'
1761  { (eval echo "$as_me:1761: \"$ac_try\"") >&5
1762  (eval $ac_try) 2>&5
1763  ac_status=$?
1764  echo "$as_me:1764: \$? = $ac_status" >&5
1765  (exit "$ac_status"); }; }; then
1766  ac_compiler_gnu=yes
1767else
1768  echo "$as_me: failed program was:" >&5
1769cat "conftest.$ac_ext" >&5
1770ac_compiler_gnu=no
1771fi
1772rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1773ac_cv_c_compiler_gnu=$ac_compiler_gnu
1774
1775fi
1776echo "$as_me:1776: result: $ac_cv_c_compiler_gnu" >&5
1777echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1778GCC=`test $ac_compiler_gnu = yes && echo yes`
1779ac_test_CFLAGS=${CFLAGS+set}
1780ac_save_CFLAGS=$CFLAGS
1781CFLAGS="-g"
1782echo "$as_me:1782: checking whether $CC accepts -g" >&5
1783echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1784if test "${ac_cv_prog_cc_g+set}" = set; then
1785  echo $ECHO_N "(cached) $ECHO_C" >&6
1786else
1787  cat >"conftest.$ac_ext" <<_ACEOF
1788#line 1788 "configure"
1789#include "confdefs.h"
1790
1791int
1792main (void)
1793{
1794
1795  ;
1796  return 0;
1797}
1798_ACEOF
1799rm -f "conftest.$ac_objext"
1800if { (eval echo "$as_me:1800: \"$ac_compile\"") >&5
1801  (eval $ac_compile) 2>&5
1802  ac_status=$?
1803  echo "$as_me:1803: \$? = $ac_status" >&5
1804  (exit "$ac_status"); } &&
1805         { ac_try='test -s "conftest.$ac_objext"'
1806  { (eval echo "$as_me:1806: \"$ac_try\"") >&5
1807  (eval $ac_try) 2>&5
1808  ac_status=$?
1809  echo "$as_me:1809: \$? = $ac_status" >&5
1810  (exit "$ac_status"); }; }; then
1811  ac_cv_prog_cc_g=yes
1812else
1813  echo "$as_me: failed program was:" >&5
1814cat "conftest.$ac_ext" >&5
1815ac_cv_prog_cc_g=no
1816fi
1817rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1818fi
1819echo "$as_me:1819: result: $ac_cv_prog_cc_g" >&5
1820echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1821if test "$ac_test_CFLAGS" = set; then
1822  CFLAGS=$ac_save_CFLAGS
1823elif test $ac_cv_prog_cc_g = yes; then
1824  if test "$GCC" = yes; then
1825    CFLAGS="-g -O2"
1826  else
1827    CFLAGS="-g"
1828  fi
1829else
1830  if test "$GCC" = yes; then
1831    CFLAGS="-O2"
1832  else
1833    CFLAGS=
1834  fi
1835fi
1836# Some people use a C++ compiler to compile C.  Since we use `exit',
1837# in C++ we need to declare it.  In case someone uses the same compiler
1838# for both compiling C and C++ we need to have the C++ compiler decide
1839# the declaration of exit, since it's the most demanding environment.
1840cat >"conftest.$ac_ext" <<_ACEOF
1841#ifndef __cplusplus
1842  choke me
1843#endif
1844_ACEOF
1845rm -f "conftest.$ac_objext"
1846if { (eval echo "$as_me:1846: \"$ac_compile\"") >&5
1847  (eval $ac_compile) 2>&5
1848  ac_status=$?
1849  echo "$as_me:1849: \$? = $ac_status" >&5
1850  (exit "$ac_status"); } &&
1851         { ac_try='test -s "conftest.$ac_objext"'
1852  { (eval echo "$as_me:1852: \"$ac_try\"") >&5
1853  (eval $ac_try) 2>&5
1854  ac_status=$?
1855  echo "$as_me:1855: \$? = $ac_status" >&5
1856  (exit "$ac_status"); }; }; then
1857  for ac_declaration in \
1858   ''\
1859   '#include <stdlib.h>' \
1860   'extern "C" void std::exit (int) throw (); using std::exit;' \
1861   'extern "C" void std::exit (int); using std::exit;' \
1862   'extern "C" void exit (int) throw ();' \
1863   'extern "C" void exit (int);' \
1864   'void exit (int);'
1865do
1866  cat >"conftest.$ac_ext" <<_ACEOF
1867#line 1867 "configure"
1868#include "confdefs.h"
1869#include <stdlib.h>
1870$ac_declaration
1871int
1872main (void)
1873{
1874exit (42);
1875  ;
1876  return 0;
1877}
1878_ACEOF
1879rm -f "conftest.$ac_objext"
1880if { (eval echo "$as_me:1880: \"$ac_compile\"") >&5
1881  (eval $ac_compile) 2>&5
1882  ac_status=$?
1883  echo "$as_me:1883: \$? = $ac_status" >&5
1884  (exit "$ac_status"); } &&
1885         { ac_try='test -s "conftest.$ac_objext"'
1886  { (eval echo "$as_me:1886: \"$ac_try\"") >&5
1887  (eval $ac_try) 2>&5
1888  ac_status=$?
1889  echo "$as_me:1889: \$? = $ac_status" >&5
1890  (exit "$ac_status"); }; }; then
1891  :
1892else
1893  echo "$as_me: failed program was:" >&5
1894cat "conftest.$ac_ext" >&5
1895continue
1896fi
1897rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1898  cat >"conftest.$ac_ext" <<_ACEOF
1899#line 1899 "configure"
1900#include "confdefs.h"
1901$ac_declaration
1902int
1903main (void)
1904{
1905exit (42);
1906  ;
1907  return 0;
1908}
1909_ACEOF
1910rm -f "conftest.$ac_objext"
1911if { (eval echo "$as_me:1911: \"$ac_compile\"") >&5
1912  (eval $ac_compile) 2>&5
1913  ac_status=$?
1914  echo "$as_me:1914: \$? = $ac_status" >&5
1915  (exit "$ac_status"); } &&
1916         { ac_try='test -s "conftest.$ac_objext"'
1917  { (eval echo "$as_me:1917: \"$ac_try\"") >&5
1918  (eval $ac_try) 2>&5
1919  ac_status=$?
1920  echo "$as_me:1920: \$? = $ac_status" >&5
1921  (exit "$ac_status"); }; }; then
1922  break
1923else
1924  echo "$as_me: failed program was:" >&5
1925cat "conftest.$ac_ext" >&5
1926fi
1927rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1928done
1929rm -rf conftest*
1930if test -n "$ac_declaration"; then
1931  echo '#ifdef __cplusplus' >>confdefs.h
1932  echo "$ac_declaration"    >>confdefs.h
1933  echo '#endif'             >>confdefs.h
1934fi
1935
1936else
1937  echo "$as_me: failed program was:" >&5
1938cat "conftest.$ac_ext" >&5
1939fi
1940rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1941ac_ext=c
1942ac_cpp='$CPP $CPPFLAGS'
1943ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1944ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1945ac_compiler_gnu=$ac_cv_c_compiler_gnu
1946ac_main_return="return"
1947
1948GCC_VERSION=none
1949if test "$GCC" = yes ; then
1950	echo "$as_me:1950: checking version of $CC" >&5
1951echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1952	GCC_VERSION="`${CC} --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(GCC[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
1953	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1954	echo "$as_me:1954: result: $GCC_VERSION" >&5
1955echo "${ECHO_T}$GCC_VERSION" >&6
1956fi
1957
1958INTEL_COMPILER=no
1959
1960if test "$GCC" = yes ; then
1961	case "$host_os" in
1962	(linux*|gnu*)
1963		echo "$as_me:1963: checking if this is really Intel C compiler" >&5
1964echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
1965		cf_save_CFLAGS="$CFLAGS"
1966		CFLAGS="$CFLAGS -no-gcc"
1967		cat >"conftest.$ac_ext" <<_ACEOF
1968#line 1968 "configure"
1969#include "confdefs.h"
1970
1971int
1972main (void)
1973{
1974
1975#ifdef __INTEL_COMPILER
1976#else
1977make an error
1978#endif
1979
1980  ;
1981  return 0;
1982}
1983_ACEOF
1984rm -f "conftest.$ac_objext"
1985if { (eval echo "$as_me:1985: \"$ac_compile\"") >&5
1986  (eval $ac_compile) 2>&5
1987  ac_status=$?
1988  echo "$as_me:1988: \$? = $ac_status" >&5
1989  (exit "$ac_status"); } &&
1990         { ac_try='test -s "conftest.$ac_objext"'
1991  { (eval echo "$as_me:1991: \"$ac_try\"") >&5
1992  (eval $ac_try) 2>&5
1993  ac_status=$?
1994  echo "$as_me:1994: \$? = $ac_status" >&5
1995  (exit "$ac_status"); }; }; then
1996  INTEL_COMPILER=yes
1997cf_save_CFLAGS="$cf_save_CFLAGS -we147"
1998
1999else
2000  echo "$as_me: failed program was:" >&5
2001cat "conftest.$ac_ext" >&5
2002fi
2003rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2004		CFLAGS="$cf_save_CFLAGS"
2005		echo "$as_me:2005: result: $INTEL_COMPILER" >&5
2006echo "${ECHO_T}$INTEL_COMPILER" >&6
2007		;;
2008	esac
2009fi
2010
2011CLANG_COMPILER=no
2012
2013if test "$GCC" = yes ; then
2014	echo "$as_me:2014: checking if this is really Clang C compiler" >&5
2015echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2016	cf_save_CFLAGS="$CFLAGS"
2017	cat >"conftest.$ac_ext" <<_ACEOF
2018#line 2018 "configure"
2019#include "confdefs.h"
2020
2021int
2022main (void)
2023{
2024
2025#ifdef __clang__
2026#else
2027make an error
2028#endif
2029
2030  ;
2031  return 0;
2032}
2033_ACEOF
2034rm -f "conftest.$ac_objext"
2035if { (eval echo "$as_me:2035: \"$ac_compile\"") >&5
2036  (eval $ac_compile) 2>&5
2037  ac_status=$?
2038  echo "$as_me:2038: \$? = $ac_status" >&5
2039  (exit "$ac_status"); } &&
2040         { ac_try='test -s "conftest.$ac_objext"'
2041  { (eval echo "$as_me:2041: \"$ac_try\"") >&5
2042  (eval $ac_try) 2>&5
2043  ac_status=$?
2044  echo "$as_me:2044: \$? = $ac_status" >&5
2045  (exit "$ac_status"); }; }; then
2046  CLANG_COMPILER=yes
2047
2048else
2049  echo "$as_me: failed program was:" >&5
2050cat "conftest.$ac_ext" >&5
2051fi
2052rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2053	CFLAGS="$cf_save_CFLAGS"
2054	echo "$as_me:2054: result: $CLANG_COMPILER" >&5
2055echo "${ECHO_T}$CLANG_COMPILER" >&6
2056fi
2057
2058CLANG_VERSION=none
2059
2060if test "x$CLANG_COMPILER" = "xyes" ; then
2061	case "$CC" in
2062	(c[1-9][0-9]|*/c[1-9][0-9])
2063		{ echo "$as_me:2063: WARNING: replacing broken compiler alias $CC" >&5
2064echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2065		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2066		CC=clang
2067		;;
2068	esac
2069
2070	echo "$as_me:2070: checking version of $CC" >&5
2071echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2072	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2073	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2074	echo "$as_me:2074: result: $CLANG_VERSION" >&5
2075echo "${ECHO_T}$CLANG_VERSION" >&6
2076
2077	for cf_clang_opt in \
2078		-Qunused-arguments \
2079		-Wno-error=implicit-function-declaration
2080	do
2081		echo "$as_me:2081: checking if option $cf_clang_opt works" >&5
2082echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2083		cf_save_CFLAGS="$CFLAGS"
2084		CFLAGS="$CFLAGS $cf_clang_opt"
2085		cat >"conftest.$ac_ext" <<_ACEOF
2086#line 2086 "configure"
2087#include "confdefs.h"
2088
2089			#include <stdio.h>
2090int
2091main (void)
2092{
2093
2094			printf("hello!\\n");
2095  ;
2096  return 0;
2097}
2098_ACEOF
2099rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2100if { (eval echo "$as_me:2100: \"$ac_link\"") >&5
2101  (eval $ac_link) 2>&5
2102  ac_status=$?
2103  echo "$as_me:2103: \$? = $ac_status" >&5
2104  (exit "$ac_status"); } &&
2105         { ac_try='test -s "conftest$ac_exeext"'
2106  { (eval echo "$as_me:2106: \"$ac_try\"") >&5
2107  (eval $ac_try) 2>&5
2108  ac_status=$?
2109  echo "$as_me:2109: \$? = $ac_status" >&5
2110  (exit "$ac_status"); }; }; then
2111
2112			cf_clang_optok=yes
2113else
2114  echo "$as_me: failed program was:" >&5
2115cat "conftest.$ac_ext" >&5
2116
2117			cf_clang_optok=no
2118fi
2119rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2120		echo "$as_me:2120: result: $cf_clang_optok" >&5
2121echo "${ECHO_T}$cf_clang_optok" >&6
2122		CFLAGS="$cf_save_CFLAGS"
2123		if test "$cf_clang_optok" = yes; then
2124			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2125
2126echo "${as_me:-configure}:2126: testing adding option $cf_clang_opt ..." 1>&5
2127
2128	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2129	CFLAGS="${CFLAGS}$cf_clang_opt"
2130
2131		fi
2132	done
2133fi
2134
2135echo "$as_me:2135: checking for $CC option to accept ANSI C" >&5
2136echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2137if test "${ac_cv_prog_cc_stdc+set}" = set; then
2138  echo $ECHO_N "(cached) $ECHO_C" >&6
2139else
2140  ac_cv_prog_cc_stdc=no
2141ac_save_CC=$CC
2142cat >"conftest.$ac_ext" <<_ACEOF
2143#line 2143 "configure"
2144#include "confdefs.h"
2145#include <stdarg.h>
2146#include <stdio.h>
2147#include <sys/types.h>
2148#include <sys/stat.h>
2149/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2150struct buf { int x; };
2151FILE * (*rcsopen) (struct buf *, struct stat *, int);
2152static char *e (p, i)
2153     char **p;
2154     int i;
2155{
2156  return p[i];
2157}
2158static char *f (char * (*g) (char **, int), char **p, ...)
2159{
2160  char *s;
2161  va_list v;
2162  va_start (v,p);
2163  s = g (p, va_arg (v,int));
2164  va_end (v);
2165  return s;
2166}
2167int test (int i, double x);
2168struct s1 {int (*f) (int a);};
2169struct s2 {int (*f) (double a);};
2170int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2171int argc;
2172char **argv;
2173int
2174main (void)
2175{
2176return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2177  ;
2178  return 0;
2179}
2180_ACEOF
2181# Don't try gcc -ansi; that turns off useful extensions and
2182# breaks some systems' header files.
2183# AIX			-qlanglvl=ansi
2184# Ultrix and OSF/1	-std1
2185# HP-UX 10.20 and later	-Ae
2186# HP-UX older versions	-Aa -D_HPUX_SOURCE
2187# SVR4			-Xc -D__EXTENSIONS__
2188for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2189do
2190  CC="$ac_save_CC $ac_arg"
2191  rm -f "conftest.$ac_objext"
2192if { (eval echo "$as_me:2192: \"$ac_compile\"") >&5
2193  (eval $ac_compile) 2>&5
2194  ac_status=$?
2195  echo "$as_me:2195: \$? = $ac_status" >&5
2196  (exit "$ac_status"); } &&
2197         { ac_try='test -s "conftest.$ac_objext"'
2198  { (eval echo "$as_me:2198: \"$ac_try\"") >&5
2199  (eval $ac_try) 2>&5
2200  ac_status=$?
2201  echo "$as_me:2201: \$? = $ac_status" >&5
2202  (exit "$ac_status"); }; }; then
2203  ac_cv_prog_cc_stdc=$ac_arg
2204break
2205else
2206  echo "$as_me: failed program was:" >&5
2207cat "conftest.$ac_ext" >&5
2208fi
2209rm -f "conftest.$ac_objext"
2210done
2211rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2212CC=$ac_save_CC
2213
2214fi
2215
2216case "x$ac_cv_prog_cc_stdc" in
2217  x|xno)
2218    echo "$as_me:2218: result: none needed" >&5
2219echo "${ECHO_T}none needed" >&6 ;;
2220  *)
2221    echo "$as_me:2221: result: $ac_cv_prog_cc_stdc" >&5
2222echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2223    CC="$CC $ac_cv_prog_cc_stdc" ;;
2224esac
2225
2226# This should have been defined by AC_PROG_CC
2227: "${CC:=cc}"
2228
2229echo "$as_me:2229: checking \$CFLAGS variable" >&5
2230echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2231case "x$CFLAGS" in
2232(*-[IUD]*)
2233	echo "$as_me:2233: result: broken" >&5
2234echo "${ECHO_T}broken" >&6
2235	{ echo "$as_me:2235: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2236echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2237	cf_flags="$CFLAGS"
2238	CFLAGS=
2239	for cf_arg in $cf_flags
2240	do
2241
2242cf_fix_cppflags=no
2243cf_new_cflags=
2244cf_new_cppflags=
2245cf_new_extra_cppflags=
2246
2247for cf_add_cflags in $cf_arg
2248do
2249case "$cf_fix_cppflags" in
2250(no)
2251	case "$cf_add_cflags" in
2252	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2253		case "$cf_add_cflags" in
2254		(-D*)
2255			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2256
2257			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2258				&& test -z "${cf_tst_cflags}" \
2259				&& cf_fix_cppflags=yes
2260
2261			if test "$cf_fix_cppflags" = yes ; then
2262
2263	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2264	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2265
2266				continue
2267			elif test "${cf_tst_cflags}" = "\"'" ; then
2268
2269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2271
2272				continue
2273			fi
2274			;;
2275		esac
2276		case "$CPPFLAGS" in
2277		(*$cf_add_cflags)
2278			;;
2279		(*)
2280			case "$cf_add_cflags" in
2281			(-D*)
2282				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2283
2284CPPFLAGS=`echo "$CPPFLAGS" | \
2285	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2286		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2287
2288				;;
2289			esac
2290
2291	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2292	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2293
2294			;;
2295		esac
2296		;;
2297	(*)
2298
2299	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2300	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2301
2302		;;
2303	esac
2304	;;
2305(yes)
2306
2307	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2308	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2309
2310	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2311
2312	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2313		&& test -z "${cf_tst_cflags}" \
2314		&& cf_fix_cppflags=no
2315	;;
2316esac
2317done
2318
2319if test -n "$cf_new_cflags" ; then
2320
2321	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2322	CFLAGS="${CFLAGS}$cf_new_cflags"
2323
2324fi
2325
2326if test -n "$cf_new_cppflags" ; then
2327
2328	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2329	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2330
2331fi
2332
2333if test -n "$cf_new_extra_cppflags" ; then
2334
2335	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2336	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2337
2338fi
2339
2340	done
2341	;;
2342(*)
2343	echo "$as_me:2343: result: ok" >&5
2344echo "${ECHO_T}ok" >&6
2345	;;
2346esac
2347
2348echo "$as_me:2348: checking \$CC variable" >&5
2349echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2350case "$CC" in
2351(*[\ \	]-*)
2352	echo "$as_me:2352: result: broken" >&5
2353echo "${ECHO_T}broken" >&6
2354	{ echo "$as_me:2354: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2355echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2356	# humor him...
2357	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2358	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2359	CC="$cf_prog"
2360	for cf_arg in $cf_flags
2361	do
2362		case "x$cf_arg" in
2363		(x-[IUDfgOW]*)
2364
2365cf_fix_cppflags=no
2366cf_new_cflags=
2367cf_new_cppflags=
2368cf_new_extra_cppflags=
2369
2370for cf_add_cflags in $cf_arg
2371do
2372case "$cf_fix_cppflags" in
2373(no)
2374	case "$cf_add_cflags" in
2375	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2376		case "$cf_add_cflags" in
2377		(-D*)
2378			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2379
2380			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2381				&& test -z "${cf_tst_cflags}" \
2382				&& cf_fix_cppflags=yes
2383
2384			if test "$cf_fix_cppflags" = yes ; then
2385
2386	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2387	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2388
2389				continue
2390			elif test "${cf_tst_cflags}" = "\"'" ; then
2391
2392	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2393	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2394
2395				continue
2396			fi
2397			;;
2398		esac
2399		case "$CPPFLAGS" in
2400		(*$cf_add_cflags)
2401			;;
2402		(*)
2403			case "$cf_add_cflags" in
2404			(-D*)
2405				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2406
2407CPPFLAGS=`echo "$CPPFLAGS" | \
2408	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2409		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2410
2411				;;
2412			esac
2413
2414	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2415	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2416
2417			;;
2418		esac
2419		;;
2420	(*)
2421
2422	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2423	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2424
2425		;;
2426	esac
2427	;;
2428(yes)
2429
2430	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2431	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2432
2433	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2434
2435	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2436		&& test -z "${cf_tst_cflags}" \
2437		&& cf_fix_cppflags=no
2438	;;
2439esac
2440done
2441
2442if test -n "$cf_new_cflags" ; then
2443
2444	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2445	CFLAGS="${CFLAGS}$cf_new_cflags"
2446
2447fi
2448
2449if test -n "$cf_new_cppflags" ; then
2450
2451	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2452	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2453
2454fi
2455
2456if test -n "$cf_new_extra_cppflags" ; then
2457
2458	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2459	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2460
2461fi
2462
2463			;;
2464		(*)
2465			CC="$CC $cf_arg"
2466			;;
2467		esac
2468	done
2469	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2470
2471echo "${as_me:-configure}:2471: testing resulting CC: '$CC' ..." 1>&5
2472
2473	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2474
2475echo "${as_me:-configure}:2475: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2476
2477	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2478
2479echo "${as_me:-configure}:2479: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2480
2481	;;
2482(*)
2483	echo "$as_me:2483: result: ok" >&5
2484echo "${ECHO_T}ok" >&6
2485	;;
2486esac
2487
2488for ac_prog in ggrep grep
2489do
2490  # Extract the first word of "$ac_prog", so it can be a program name with args.
2491set dummy $ac_prog; ac_word=$2
2492echo "$as_me:2492: checking for $ac_word" >&5
2493echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2494if test "${ac_cv_prog_GREP+set}" = set; then
2495  echo $ECHO_N "(cached) $ECHO_C" >&6
2496else
2497  if test -n "$GREP"; then
2498  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2499else
2500  ac_save_IFS=$IFS; IFS=$ac_path_separator
2501ac_dummy="$PATH"
2502for ac_dir in $ac_dummy; do
2503  IFS=$ac_save_IFS
2504  test -z "$ac_dir" && ac_dir=.
2505  $as_executable_p "$ac_dir/$ac_word" || continue
2506ac_cv_prog_GREP="$ac_prog"
2507echo "$as_me:2507: found $ac_dir/$ac_word" >&5
2508break
2509done
2510
2511fi
2512fi
2513GREP=$ac_cv_prog_GREP
2514if test -n "$GREP"; then
2515  echo "$as_me:2515: result: $GREP" >&5
2516echo "${ECHO_T}$GREP" >&6
2517else
2518  echo "$as_me:2518: result: no" >&5
2519echo "${ECHO_T}no" >&6
2520fi
2521
2522  test -n "$GREP" && break
2523done
2524test -n "$GREP" || GREP=": "
2525
2526echo "$as_me:2526: checking for egrep" >&5
2527echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2528if test "${ac_cv_path_EGREP+set}" = set; then
2529  echo $ECHO_N "(cached) $ECHO_C" >&6
2530else
2531  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2532   then ac_cv_path_EGREP="$GREP -E"
2533   else
2534     for ac_prog in gegrep egrep
2535do
2536  # Extract the first word of "$ac_prog", so it can be a program name with args.
2537set dummy $ac_prog; ac_word=$2
2538echo "$as_me:2538: checking for $ac_word" >&5
2539echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2540if test "${ac_cv_path_EGREP+set}" = set; then
2541  echo $ECHO_N "(cached) $ECHO_C" >&6
2542else
2543  case $EGREP in
2544  [\\/]* | ?:[\\/]*)
2545  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2546  ;;
2547  *)
2548  ac_save_IFS=$IFS; IFS=$ac_path_separator
2549ac_dummy="$PATH"
2550for ac_dir in $ac_dummy; do
2551  IFS=$ac_save_IFS
2552  test -z "$ac_dir" && ac_dir=.
2553  if $as_executable_p "$ac_dir/$ac_word"; then
2554   ac_cv_path_EGREP="$ac_dir/$ac_word"
2555   echo "$as_me:2555: found $ac_dir/$ac_word" >&5
2556   break
2557fi
2558done
2559
2560  ;;
2561esac
2562fi
2563EGREP=$ac_cv_path_EGREP
2564
2565if test -n "$EGREP"; then
2566  echo "$as_me:2566: result: $EGREP" >&5
2567echo "${ECHO_T}$EGREP" >&6
2568else
2569  echo "$as_me:2569: result: no" >&5
2570echo "${ECHO_T}no" >&6
2571fi
2572
2573  test -n "$EGREP" && break
2574done
2575test -n "$EGREP" || EGREP=": "
2576
2577     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2577: error: cannot find workable egrep" >&5
2578echo "$as_me: error: cannot find workable egrep" >&2;}
2579   { (exit 1); exit 1; }; }
2580   fi
2581fi
2582echo "$as_me:2582: result: $ac_cv_path_EGREP" >&5
2583echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2584 EGREP="$ac_cv_path_EGREP"
2585
2586ac_ext=c
2587ac_cpp='$CPP $CPPFLAGS'
2588ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2589ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2590ac_compiler_gnu=$ac_cv_c_compiler_gnu
2591ac_main_return="return"
2592echo "$as_me:2592: checking how to run the C preprocessor" >&5
2593echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2594# On Suns, sometimes $CPP names a directory.
2595if test -n "$CPP" && test -d "$CPP"; then
2596  CPP=
2597fi
2598if test -z "$CPP"; then
2599  if test "${ac_cv_prog_CPP+set}" = set; then
2600  echo $ECHO_N "(cached) $ECHO_C" >&6
2601else
2602      # Double quotes because CPP needs to be expanded
2603    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2604    do
2605      ac_preproc_ok=false
2606for ac_c_preproc_warn_flag in '' yes
2607do
2608  # Use a header file that comes with gcc, so configuring glibc
2609  # with a fresh cross-compiler works.
2610  # On the NeXT, cc -E runs the code through the compiler's parser,
2611  # not just through cpp. "Syntax error" is here to catch this case.
2612  cat >"conftest.$ac_ext" <<_ACEOF
2613#line 2613 "configure"
2614#include "confdefs.h"
2615#include <assert.h>
2616                     Syntax error
2617_ACEOF
2618if { (eval echo "$as_me:2618: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2619  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2620  ac_status=$?
2621  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2622  rm -f conftest.er1
2623  cat conftest.err >&5
2624  echo "$as_me:2624: \$? = $ac_status" >&5
2625  (exit "$ac_status"); } >/dev/null; then
2626  if test -s conftest.err; then
2627    ac_cpp_err=$ac_c_preproc_warn_flag
2628  else
2629    ac_cpp_err=
2630  fi
2631else
2632  ac_cpp_err=yes
2633fi
2634if test -z "$ac_cpp_err"; then
2635  :
2636else
2637  echo "$as_me: failed program was:" >&5
2638  cat "conftest.$ac_ext" >&5
2639  # Broken: fails on valid input.
2640continue
2641fi
2642rm -f conftest.err "conftest.$ac_ext"
2643
2644  # OK, works on sane cases.  Now check whether non-existent headers
2645  # can be detected and how.
2646  cat >"conftest.$ac_ext" <<_ACEOF
2647#line 2647 "configure"
2648#include "confdefs.h"
2649#include <ac_nonexistent.h>
2650_ACEOF
2651if { (eval echo "$as_me:2651: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2652  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2653  ac_status=$?
2654  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2655  rm -f conftest.er1
2656  cat conftest.err >&5
2657  echo "$as_me:2657: \$? = $ac_status" >&5
2658  (exit "$ac_status"); } >/dev/null; then
2659  if test -s conftest.err; then
2660    ac_cpp_err=$ac_c_preproc_warn_flag
2661  else
2662    ac_cpp_err=
2663  fi
2664else
2665  ac_cpp_err=yes
2666fi
2667if test -z "$ac_cpp_err"; then
2668  # Broken: success on invalid input.
2669continue
2670else
2671  echo "$as_me: failed program was:" >&5
2672  cat "conftest.$ac_ext" >&5
2673  # Passes both tests.
2674ac_preproc_ok=:
2675break
2676fi
2677rm -f conftest.err "conftest.$ac_ext"
2678
2679done
2680# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2681rm -f conftest.err "conftest.$ac_ext"
2682if $ac_preproc_ok; then
2683  break
2684fi
2685
2686    done
2687    ac_cv_prog_CPP=$CPP
2688
2689fi
2690  CPP=$ac_cv_prog_CPP
2691else
2692  ac_cv_prog_CPP=$CPP
2693fi
2694echo "$as_me:2694: result: $CPP" >&5
2695echo "${ECHO_T}$CPP" >&6
2696ac_preproc_ok=false
2697for ac_c_preproc_warn_flag in '' yes
2698do
2699  # Use a header file that comes with gcc, so configuring glibc
2700  # with a fresh cross-compiler works.
2701  # On the NeXT, cc -E runs the code through the compiler's parser,
2702  # not just through cpp. "Syntax error" is here to catch this case.
2703  cat >"conftest.$ac_ext" <<_ACEOF
2704#line 2704 "configure"
2705#include "confdefs.h"
2706#include <assert.h>
2707                     Syntax error
2708_ACEOF
2709if { (eval echo "$as_me:2709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2710  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2711  ac_status=$?
2712  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2713  rm -f conftest.er1
2714  cat conftest.err >&5
2715  echo "$as_me:2715: \$? = $ac_status" >&5
2716  (exit "$ac_status"); } >/dev/null; then
2717  if test -s conftest.err; then
2718    ac_cpp_err=$ac_c_preproc_warn_flag
2719  else
2720    ac_cpp_err=
2721  fi
2722else
2723  ac_cpp_err=yes
2724fi
2725if test -z "$ac_cpp_err"; then
2726  :
2727else
2728  echo "$as_me: failed program was:" >&5
2729  cat "conftest.$ac_ext" >&5
2730  # Broken: fails on valid input.
2731continue
2732fi
2733rm -f conftest.err "conftest.$ac_ext"
2734
2735  # OK, works on sane cases.  Now check whether non-existent headers
2736  # can be detected and how.
2737  cat >"conftest.$ac_ext" <<_ACEOF
2738#line 2738 "configure"
2739#include "confdefs.h"
2740#include <ac_nonexistent.h>
2741_ACEOF
2742if { (eval echo "$as_me:2742: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2743  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2744  ac_status=$?
2745  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2746  rm -f conftest.er1
2747  cat conftest.err >&5
2748  echo "$as_me:2748: \$? = $ac_status" >&5
2749  (exit "$ac_status"); } >/dev/null; then
2750  if test -s conftest.err; then
2751    ac_cpp_err=$ac_c_preproc_warn_flag
2752  else
2753    ac_cpp_err=
2754  fi
2755else
2756  ac_cpp_err=yes
2757fi
2758if test -z "$ac_cpp_err"; then
2759  # Broken: success on invalid input.
2760continue
2761else
2762  echo "$as_me: failed program was:" >&5
2763  cat "conftest.$ac_ext" >&5
2764  # Passes both tests.
2765ac_preproc_ok=:
2766break
2767fi
2768rm -f conftest.err "conftest.$ac_ext"
2769
2770done
2771# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2772rm -f conftest.err "conftest.$ac_ext"
2773if $ac_preproc_ok; then
2774  :
2775else
2776  { { echo "$as_me:2776: error: C preprocessor \"$CPP\" fails sanity check" >&5
2777echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2778   { (exit 1); exit 1; }; }
2779fi
2780
2781ac_ext=c
2782ac_cpp='$CPP $CPPFLAGS'
2783ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2784ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2785ac_compiler_gnu=$ac_cv_c_compiler_gnu
2786ac_main_return="return"
2787
2788for ac_prog in mawk gawk nawk awk
2789do
2790  # Extract the first word of "$ac_prog", so it can be a program name with args.
2791set dummy $ac_prog; ac_word=$2
2792echo "$as_me:2792: checking for $ac_word" >&5
2793echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2794if test "${ac_cv_prog_AWK+set}" = set; then
2795  echo $ECHO_N "(cached) $ECHO_C" >&6
2796else
2797  if test -n "$AWK"; then
2798  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2799else
2800  ac_save_IFS=$IFS; IFS=$ac_path_separator
2801ac_dummy="$PATH"
2802for ac_dir in $ac_dummy; do
2803  IFS=$ac_save_IFS
2804  test -z "$ac_dir" && ac_dir=.
2805  $as_executable_p "$ac_dir/$ac_word" || continue
2806ac_cv_prog_AWK="$ac_prog"
2807echo "$as_me:2807: found $ac_dir/$ac_word" >&5
2808break
2809done
2810
2811fi
2812fi
2813AWK=$ac_cv_prog_AWK
2814if test -n "$AWK"; then
2815  echo "$as_me:2815: result: $AWK" >&5
2816echo "${ECHO_T}$AWK" >&6
2817else
2818  echo "$as_me:2818: result: no" >&5
2819echo "${ECHO_T}no" >&6
2820fi
2821
2822  test -n "$AWK" && break
2823done
2824
2825# Find a good install program.  We prefer a C program (faster),
2826# so one script is as good as another.  But avoid the broken or
2827# incompatible versions:
2828# SysV /etc/install, /usr/sbin/install
2829# SunOS /usr/etc/install
2830# IRIX /sbin/install
2831# AIX /bin/install
2832# AmigaOS /C/install, which installs bootblocks on floppy discs
2833# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2834# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2835# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2836# ./install, which can be erroneously created by make from ./install.sh.
2837echo "$as_me:2837: checking for a BSD compatible install" >&5
2838echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2839if test -z "$INSTALL"; then
2840if test "${ac_cv_path_install+set}" = set; then
2841  echo $ECHO_N "(cached) $ECHO_C" >&6
2842else
2843    ac_save_IFS=$IFS; IFS=$ac_path_separator
2844  for ac_dir in $PATH; do
2845    IFS=$ac_save_IFS
2846    # Account for people who put trailing slashes in PATH elements.
2847    case $ac_dir/ in
2848    / | ./ | .// | /cC/* \
2849    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2850    | /usr/ucb/* ) ;;
2851    *)
2852      # OSF1 and SCO ODT 3.0 have their own names for install.
2853      # Don't use installbsd from OSF since it installs stuff as root
2854      # by default.
2855      for ac_prog in ginstall scoinst install; do
2856        if $as_executable_p "$ac_dir/$ac_prog"; then
2857	  if test $ac_prog = install &&
2858            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2859	    # AIX install.  It has an incompatible calling convention.
2860	    :
2861	  elif test $ac_prog = install &&
2862	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2863	    # program-specific install script used by HP pwplus--don't use.
2864	    :
2865	  else
2866	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2867	    break 2
2868	  fi
2869	fi
2870      done
2871      ;;
2872    esac
2873  done
2874
2875fi
2876  if test "${ac_cv_path_install+set}" = set; then
2877    INSTALL=$ac_cv_path_install
2878  else
2879    # As a last resort, use the slow shell script.  We don't cache a
2880    # path for INSTALL within a source directory, because that will
2881    # break other packages using the cache if that directory is
2882    # removed, or if the path is relative.
2883    INSTALL=$ac_install_sh
2884  fi
2885fi
2886echo "$as_me:2886: result: $INSTALL" >&5
2887echo "${ECHO_T}$INSTALL" >&6
2888
2889# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2890# It thinks the first close brace ends the variable substitution.
2891test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2892
2893test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2894
2895test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2896
2897echo "$as_me:2897: checking whether ln -s works" >&5
2898echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2899LN_S=$as_ln_s
2900if test "$LN_S" = "ln -s"; then
2901  echo "$as_me:2901: result: yes" >&5
2902echo "${ECHO_T}yes" >&6
2903else
2904  echo "$as_me:2904: result: no, using $LN_S" >&5
2905echo "${ECHO_T}no, using $LN_S" >&6
2906fi
2907
2908test "$program_prefix" != NONE &&
2909  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2910# Use a double $ so make ignores it.
2911test "$program_suffix" != NONE &&
2912  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2913# Double any \ or $.  echo might interpret backslashes.
2914# By default was `s,x,x', remove it if useless.
2915cat <<\_ACEOF >conftest.sed
2916s/[\\$]/&&/g;s/;s,x,x,$//
2917_ACEOF
2918program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2919rm conftest.sed
2920
2921for ac_prog in lint cppcheck splint
2922do
2923  # Extract the first word of "$ac_prog", so it can be a program name with args.
2924set dummy $ac_prog; ac_word=$2
2925echo "$as_me:2925: checking for $ac_word" >&5
2926echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2927if test "${ac_cv_prog_LINT+set}" = set; then
2928  echo $ECHO_N "(cached) $ECHO_C" >&6
2929else
2930  if test -n "$LINT"; then
2931  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2932else
2933  ac_save_IFS=$IFS; IFS=$ac_path_separator
2934ac_dummy="$PATH"
2935for ac_dir in $ac_dummy; do
2936  IFS=$ac_save_IFS
2937  test -z "$ac_dir" && ac_dir=.
2938  $as_executable_p "$ac_dir/$ac_word" || continue
2939ac_cv_prog_LINT="$ac_prog"
2940echo "$as_me:2940: found $ac_dir/$ac_word" >&5
2941break
2942done
2943
2944fi
2945fi
2946LINT=$ac_cv_prog_LINT
2947if test -n "$LINT"; then
2948  echo "$as_me:2948: result: $LINT" >&5
2949echo "${ECHO_T}$LINT" >&6
2950else
2951  echo "$as_me:2951: result: no" >&5
2952echo "${ECHO_T}no" >&6
2953fi
2954
2955  test -n "$LINT" && break
2956done
2957
2958case "x$LINT" in
2959(xcppcheck|x*/cppcheck)
2960	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
2961	;;
2962esac
2963
2964###	checks for compiler characteristics
2965
2966echo "$as_me:2966: checking if the POSIX test-macros are already defined" >&5
2967echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
2968if test "${cf_cv_posix_visible+set}" = set; then
2969  echo $ECHO_N "(cached) $ECHO_C" >&6
2970else
2971
2972cat >"conftest.$ac_ext" <<_ACEOF
2973#line 2973 "configure"
2974#include "confdefs.h"
2975#include <stdio.h>
2976int
2977main (void)
2978{
2979
2980#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
2981	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
2982	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
2983	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
2984#error conflicting symbols found
2985#endif
2986
2987  ;
2988  return 0;
2989}
2990_ACEOF
2991rm -f "conftest.$ac_objext"
2992if { (eval echo "$as_me:2992: \"$ac_compile\"") >&5
2993  (eval $ac_compile) 2>&5
2994  ac_status=$?
2995  echo "$as_me:2995: \$? = $ac_status" >&5
2996  (exit "$ac_status"); } &&
2997         { ac_try='test -s "conftest.$ac_objext"'
2998  { (eval echo "$as_me:2998: \"$ac_try\"") >&5
2999  (eval $ac_try) 2>&5
3000  ac_status=$?
3001  echo "$as_me:3001: \$? = $ac_status" >&5
3002  (exit "$ac_status"); }; }; then
3003  cf_cv_posix_visible=no
3004else
3005  echo "$as_me: failed program was:" >&5
3006cat "conftest.$ac_ext" >&5
3007cf_cv_posix_visible=yes
3008fi
3009rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3010
3011fi
3012echo "$as_me:3012: result: $cf_cv_posix_visible" >&5
3013echo "${ECHO_T}$cf_cv_posix_visible" >&6
3014
3015if test "$cf_cv_posix_visible" = no; then
3016
3017cf_XOPEN_SOURCE=700
3018cf_POSIX_C_SOURCE=199506L
3019cf_xopen_source=
3020
3021case "$host_os" in
3022(aix[4-7]*)
3023	cf_xopen_source="-D_ALL_SOURCE"
3024	;;
3025(msys)
3026	cf_XOPEN_SOURCE=600
3027	;;
3028(darwin[0-8].*)
3029	cf_xopen_source="-D_APPLE_C_SOURCE"
3030	;;
3031(darwin*)
3032	cf_xopen_source="-D_DARWIN_C_SOURCE"
3033	cf_XOPEN_SOURCE=
3034	;;
3035(freebsd*|dragonfly*|midnightbsd*)
3036	# 5.x headers associate
3037	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3038	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3039	cf_POSIX_C_SOURCE=200112L
3040	cf_XOPEN_SOURCE=600
3041	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3042	;;
3043(hpux11*)
3044	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3045	;;
3046(hpux*)
3047	cf_xopen_source="-D_HPUX_SOURCE"
3048	;;
3049(irix[56].*)
3050	cf_xopen_source="-D_SGI_SOURCE"
3051	cf_XOPEN_SOURCE=
3052	;;
3053(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3054
3055cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3056
3057echo "$as_me:3057: checking if this is the GNU C library" >&5
3058echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3059if test "${cf_cv_gnu_library+set}" = set; then
3060  echo $ECHO_N "(cached) $ECHO_C" >&6
3061else
3062
3063cat >"conftest.$ac_ext" <<_ACEOF
3064#line 3064 "configure"
3065#include "confdefs.h"
3066#include <sys/types.h>
3067int
3068main (void)
3069{
3070
3071	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3072		return 0;
3073	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3074		return 0;
3075	#else
3076	#	error not GNU C library
3077	#endif
3078  ;
3079  return 0;
3080}
3081_ACEOF
3082rm -f "conftest.$ac_objext"
3083if { (eval echo "$as_me:3083: \"$ac_compile\"") >&5
3084  (eval $ac_compile) 2>&5
3085  ac_status=$?
3086  echo "$as_me:3086: \$? = $ac_status" >&5
3087  (exit "$ac_status"); } &&
3088         { ac_try='test -s "conftest.$ac_objext"'
3089  { (eval echo "$as_me:3089: \"$ac_try\"") >&5
3090  (eval $ac_try) 2>&5
3091  ac_status=$?
3092  echo "$as_me:3092: \$? = $ac_status" >&5
3093  (exit "$ac_status"); }; }; then
3094  cf_cv_gnu_library=yes
3095else
3096  echo "$as_me: failed program was:" >&5
3097cat "conftest.$ac_ext" >&5
3098cf_cv_gnu_library=no
3099fi
3100rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3101
3102fi
3103echo "$as_me:3103: result: $cf_cv_gnu_library" >&5
3104echo "${ECHO_T}$cf_cv_gnu_library" >&6
3105
3106if test x$cf_cv_gnu_library = xyes; then
3107
3108	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3109	# was changed to help a little.  newlib incorporated the change about 4
3110	# years later.
3111	echo "$as_me:3111: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3112echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3113if test "${cf_cv_gnu_library_219+set}" = set; then
3114  echo $ECHO_N "(cached) $ECHO_C" >&6
3115else
3116
3117		cf_save="$CPPFLAGS"
3118
3119	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3120	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3121
3122		cat >"conftest.$ac_ext" <<_ACEOF
3123#line 3123 "configure"
3124#include "confdefs.h"
3125#include <sys/types.h>
3126int
3127main (void)
3128{
3129
3130			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3131				return 0;
3132			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3133				return 0;
3134			#else
3135			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3136			#endif
3137  ;
3138  return 0;
3139}
3140_ACEOF
3141rm -f "conftest.$ac_objext"
3142if { (eval echo "$as_me:3142: \"$ac_compile\"") >&5
3143  (eval $ac_compile) 2>&5
3144  ac_status=$?
3145  echo "$as_me:3145: \$? = $ac_status" >&5
3146  (exit "$ac_status"); } &&
3147         { ac_try='test -s "conftest.$ac_objext"'
3148  { (eval echo "$as_me:3148: \"$ac_try\"") >&5
3149  (eval $ac_try) 2>&5
3150  ac_status=$?
3151  echo "$as_me:3151: \$? = $ac_status" >&5
3152  (exit "$ac_status"); }; }; then
3153  cf_cv_gnu_library_219=yes
3154else
3155  echo "$as_me: failed program was:" >&5
3156cat "conftest.$ac_ext" >&5
3157cf_cv_gnu_library_219=no
3158fi
3159rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3160		CPPFLAGS="$cf_save"
3161
3162fi
3163echo "$as_me:3163: result: $cf_cv_gnu_library_219" >&5
3164echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3165
3166	if test "x$cf_cv_gnu_library_219" = xyes; then
3167		cf_save="$CPPFLAGS"
3168		echo "$as_me:3168: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3169echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3170if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3171  echo $ECHO_N "(cached) $ECHO_C" >&6
3172else
3173
3174cf_fix_cppflags=no
3175cf_new_cflags=
3176cf_new_cppflags=
3177cf_new_extra_cppflags=
3178
3179for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3180do
3181case "$cf_fix_cppflags" in
3182(no)
3183	case "$cf_add_cflags" in
3184	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3185		case "$cf_add_cflags" in
3186		(-D*)
3187			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3188
3189			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3190				&& test -z "${cf_tst_cflags}" \
3191				&& cf_fix_cppflags=yes
3192
3193			if test "$cf_fix_cppflags" = yes ; then
3194
3195	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3196	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3197
3198				continue
3199			elif test "${cf_tst_cflags}" = "\"'" ; then
3200
3201	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3202	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3203
3204				continue
3205			fi
3206			;;
3207		esac
3208		case "$CPPFLAGS" in
3209		(*$cf_add_cflags)
3210			;;
3211		(*)
3212			case "$cf_add_cflags" in
3213			(-D*)
3214				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3215
3216CPPFLAGS=`echo "$CPPFLAGS" | \
3217	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3218		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3219
3220				;;
3221			esac
3222
3223	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3224	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3225
3226			;;
3227		esac
3228		;;
3229	(*)
3230
3231	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3232	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3233
3234		;;
3235	esac
3236	;;
3237(yes)
3238
3239	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3240	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3241
3242	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3243
3244	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3245		&& test -z "${cf_tst_cflags}" \
3246		&& cf_fix_cppflags=no
3247	;;
3248esac
3249done
3250
3251if test -n "$cf_new_cflags" ; then
3252
3253	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3254	CFLAGS="${CFLAGS}$cf_new_cflags"
3255
3256fi
3257
3258if test -n "$cf_new_cppflags" ; then
3259
3260	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3261	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3262
3263fi
3264
3265if test -n "$cf_new_extra_cppflags" ; then
3266
3267	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3268	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3269
3270fi
3271
3272			cat >"conftest.$ac_ext" <<_ACEOF
3273#line 3273 "configure"
3274#include "confdefs.h"
3275
3276				#include <limits.h>
3277				#include <sys/types.h>
3278
3279int
3280main (void)
3281{
3282
3283				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3284					return 0;
3285				#else
3286				#	error GNU C library is too old
3287				#endif
3288  ;
3289  return 0;
3290}
3291_ACEOF
3292rm -f "conftest.$ac_objext"
3293if { (eval echo "$as_me:3293: \"$ac_compile\"") >&5
3294  (eval $ac_compile) 2>&5
3295  ac_status=$?
3296  echo "$as_me:3296: \$? = $ac_status" >&5
3297  (exit "$ac_status"); } &&
3298         { ac_try='test -s "conftest.$ac_objext"'
3299  { (eval echo "$as_me:3299: \"$ac_try\"") >&5
3300  (eval $ac_try) 2>&5
3301  ac_status=$?
3302  echo "$as_me:3302: \$? = $ac_status" >&5
3303  (exit "$ac_status"); }; }; then
3304  cf_cv_gnu_dftsrc_219=yes
3305else
3306  echo "$as_me: failed program was:" >&5
3307cat "conftest.$ac_ext" >&5
3308cf_cv_gnu_dftsrc_219=no
3309fi
3310rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3311
3312fi
3313echo "$as_me:3313: result: $cf_cv_gnu_dftsrc_219" >&5
3314echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3315		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3316	else
3317		cf_cv_gnu_dftsrc_219=maybe
3318	fi
3319
3320	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3321
3322		echo "$as_me:3322: checking if we must define _GNU_SOURCE" >&5
3323echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3324if test "${cf_cv_gnu_source+set}" = set; then
3325  echo $ECHO_N "(cached) $ECHO_C" >&6
3326else
3327
3328		cat >"conftest.$ac_ext" <<_ACEOF
3329#line 3329 "configure"
3330#include "confdefs.h"
3331#include <sys/types.h>
3332int
3333main (void)
3334{
3335
3336			#ifndef _XOPEN_SOURCE
3337			#error	expected _XOPEN_SOURCE to be defined
3338			#endif
3339  ;
3340  return 0;
3341}
3342_ACEOF
3343rm -f "conftest.$ac_objext"
3344if { (eval echo "$as_me:3344: \"$ac_compile\"") >&5
3345  (eval $ac_compile) 2>&5
3346  ac_status=$?
3347  echo "$as_me:3347: \$? = $ac_status" >&5
3348  (exit "$ac_status"); } &&
3349         { ac_try='test -s "conftest.$ac_objext"'
3350  { (eval echo "$as_me:3350: \"$ac_try\"") >&5
3351  (eval $ac_try) 2>&5
3352  ac_status=$?
3353  echo "$as_me:3353: \$? = $ac_status" >&5
3354  (exit "$ac_status"); }; }; then
3355  cf_cv_gnu_source=no
3356else
3357  echo "$as_me: failed program was:" >&5
3358cat "conftest.$ac_ext" >&5
3359cf_save="$CPPFLAGS"
3360
3361cf_fix_cppflags=no
3362cf_new_cflags=
3363cf_new_cppflags=
3364cf_new_extra_cppflags=
3365
3366for cf_add_cflags in -D_GNU_SOURCE
3367do
3368case "$cf_fix_cppflags" in
3369(no)
3370	case "$cf_add_cflags" in
3371	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3372		case "$cf_add_cflags" in
3373		(-D*)
3374			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3375
3376			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3377				&& test -z "${cf_tst_cflags}" \
3378				&& cf_fix_cppflags=yes
3379
3380			if test "$cf_fix_cppflags" = yes ; then
3381
3382	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3383	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3384
3385				continue
3386			elif test "${cf_tst_cflags}" = "\"'" ; then
3387
3388	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3389	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3390
3391				continue
3392			fi
3393			;;
3394		esac
3395		case "$CPPFLAGS" in
3396		(*$cf_add_cflags)
3397			;;
3398		(*)
3399			case "$cf_add_cflags" in
3400			(-D*)
3401				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3402
3403CPPFLAGS=`echo "$CPPFLAGS" | \
3404	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3405		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3406
3407				;;
3408			esac
3409
3410	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3411	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3412
3413			;;
3414		esac
3415		;;
3416	(*)
3417
3418	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3419	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3420
3421		;;
3422	esac
3423	;;
3424(yes)
3425
3426	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3427	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3428
3429	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3430
3431	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3432		&& test -z "${cf_tst_cflags}" \
3433		&& cf_fix_cppflags=no
3434	;;
3435esac
3436done
3437
3438if test -n "$cf_new_cflags" ; then
3439
3440	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3441	CFLAGS="${CFLAGS}$cf_new_cflags"
3442
3443fi
3444
3445if test -n "$cf_new_cppflags" ; then
3446
3447	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3448	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3449
3450fi
3451
3452if test -n "$cf_new_extra_cppflags" ; then
3453
3454	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3455	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3456
3457fi
3458
3459			 cat >"conftest.$ac_ext" <<_ACEOF
3460#line 3460 "configure"
3461#include "confdefs.h"
3462#include <sys/types.h>
3463int
3464main (void)
3465{
3466
3467				#ifdef _XOPEN_SOURCE
3468				#error	expected _XOPEN_SOURCE to be undefined
3469				#endif
3470  ;
3471  return 0;
3472}
3473_ACEOF
3474rm -f "conftest.$ac_objext"
3475if { (eval echo "$as_me:3475: \"$ac_compile\"") >&5
3476  (eval $ac_compile) 2>&5
3477  ac_status=$?
3478  echo "$as_me:3478: \$? = $ac_status" >&5
3479  (exit "$ac_status"); } &&
3480         { ac_try='test -s "conftest.$ac_objext"'
3481  { (eval echo "$as_me:3481: \"$ac_try\"") >&5
3482  (eval $ac_try) 2>&5
3483  ac_status=$?
3484  echo "$as_me:3484: \$? = $ac_status" >&5
3485  (exit "$ac_status"); }; }; then
3486  cf_cv_gnu_source=no
3487else
3488  echo "$as_me: failed program was:" >&5
3489cat "conftest.$ac_ext" >&5
3490cf_cv_gnu_source=yes
3491fi
3492rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3493			CPPFLAGS="$cf_save"
3494
3495fi
3496rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3497
3498fi
3499echo "$as_me:3499: result: $cf_cv_gnu_source" >&5
3500echo "${ECHO_T}$cf_cv_gnu_source" >&6
3501
3502		if test "$cf_cv_gnu_source" = yes
3503		then
3504		echo "$as_me:3504: checking if we should also define _DEFAULT_SOURCE" >&5
3505echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3506if test "${cf_cv_default_source+set}" = set; then
3507  echo $ECHO_N "(cached) $ECHO_C" >&6
3508else
3509
3510	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3511	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3512
3513			cat >"conftest.$ac_ext" <<_ACEOF
3514#line 3514 "configure"
3515#include "confdefs.h"
3516#include <sys/types.h>
3517int
3518main (void)
3519{
3520
3521				#ifdef _DEFAULT_SOURCE
3522				#error	expected _DEFAULT_SOURCE to be undefined
3523				#endif
3524  ;
3525  return 0;
3526}
3527_ACEOF
3528rm -f "conftest.$ac_objext"
3529if { (eval echo "$as_me:3529: \"$ac_compile\"") >&5
3530  (eval $ac_compile) 2>&5
3531  ac_status=$?
3532  echo "$as_me:3532: \$? = $ac_status" >&5
3533  (exit "$ac_status"); } &&
3534         { ac_try='test -s "conftest.$ac_objext"'
3535  { (eval echo "$as_me:3535: \"$ac_try\"") >&5
3536  (eval $ac_try) 2>&5
3537  ac_status=$?
3538  echo "$as_me:3538: \$? = $ac_status" >&5
3539  (exit "$ac_status"); }; }; then
3540  cf_cv_default_source=no
3541else
3542  echo "$as_me: failed program was:" >&5
3543cat "conftest.$ac_ext" >&5
3544cf_cv_default_source=yes
3545fi
3546rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3547
3548fi
3549echo "$as_me:3549: result: $cf_cv_default_source" >&5
3550echo "${ECHO_T}$cf_cv_default_source" >&6
3551			if test "$cf_cv_default_source" = yes
3552			then
3553
3554	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3555	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3556
3557			fi
3558		fi
3559	fi
3560
3561fi
3562
3563	;;
3564(minix*)
3565	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3566	;;
3567(mirbsd*)
3568	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3569	cf_XOPEN_SOURCE=
3570
3571if test "$cf_cv_posix_visible" = no; then
3572
3573cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3574
3575cf_save_CFLAGS="$CFLAGS"
3576cf_save_CPPFLAGS="$CPPFLAGS"
3577
3578cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3579	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3580		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3581
3582cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3583	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3584		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3585
3586echo "$as_me:3586: checking if we should define _POSIX_C_SOURCE" >&5
3587echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3588if test "${cf_cv_posix_c_source+set}" = set; then
3589  echo $ECHO_N "(cached) $ECHO_C" >&6
3590else
3591
3592echo "${as_me:-configure}:3592: testing if the symbol is already defined go no further ..." 1>&5
3593
3594	cat >"conftest.$ac_ext" <<_ACEOF
3595#line 3595 "configure"
3596#include "confdefs.h"
3597#include <sys/types.h>
3598int
3599main (void)
3600{
3601
3602#ifndef _POSIX_C_SOURCE
3603make an error
3604#endif
3605  ;
3606  return 0;
3607}
3608_ACEOF
3609rm -f "conftest.$ac_objext"
3610if { (eval echo "$as_me:3610: \"$ac_compile\"") >&5
3611  (eval $ac_compile) 2>&5
3612  ac_status=$?
3613  echo "$as_me:3613: \$? = $ac_status" >&5
3614  (exit "$ac_status"); } &&
3615         { ac_try='test -s "conftest.$ac_objext"'
3616  { (eval echo "$as_me:3616: \"$ac_try\"") >&5
3617  (eval $ac_try) 2>&5
3618  ac_status=$?
3619  echo "$as_me:3619: \$? = $ac_status" >&5
3620  (exit "$ac_status"); }; }; then
3621  cf_cv_posix_c_source=no
3622else
3623  echo "$as_me: failed program was:" >&5
3624cat "conftest.$ac_ext" >&5
3625cf_want_posix_source=no
3626	 case .$cf_POSIX_C_SOURCE in
3627	 (.[12]??*)
3628		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3629		;;
3630	 (.2)
3631		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3632		cf_want_posix_source=yes
3633		;;
3634	 (.*)
3635		cf_want_posix_source=yes
3636		;;
3637	 esac
3638	 if test "$cf_want_posix_source" = yes ; then
3639		cat >"conftest.$ac_ext" <<_ACEOF
3640#line 3640 "configure"
3641#include "confdefs.h"
3642#include <sys/types.h>
3643int
3644main (void)
3645{
3646
3647#ifdef _POSIX_SOURCE
3648make an error
3649#endif
3650  ;
3651  return 0;
3652}
3653_ACEOF
3654rm -f "conftest.$ac_objext"
3655if { (eval echo "$as_me:3655: \"$ac_compile\"") >&5
3656  (eval $ac_compile) 2>&5
3657  ac_status=$?
3658  echo "$as_me:3658: \$? = $ac_status" >&5
3659  (exit "$ac_status"); } &&
3660         { ac_try='test -s "conftest.$ac_objext"'
3661  { (eval echo "$as_me:3661: \"$ac_try\"") >&5
3662  (eval $ac_try) 2>&5
3663  ac_status=$?
3664  echo "$as_me:3664: \$? = $ac_status" >&5
3665  (exit "$ac_status"); }; }; then
3666  :
3667else
3668  echo "$as_me: failed program was:" >&5
3669cat "conftest.$ac_ext" >&5
3670cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3671fi
3672rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3673	 fi
3674
3675echo "${as_me:-configure}:3675: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3676
3677	 CFLAGS="$cf_trim_CFLAGS"
3678	 CPPFLAGS="$cf_trim_CPPFLAGS"
3679
3680	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3681	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3682
3683echo "${as_me:-configure}:3683: testing if the second compile does not leave our definition intact error ..." 1>&5
3684
3685	 cat >"conftest.$ac_ext" <<_ACEOF
3686#line 3686 "configure"
3687#include "confdefs.h"
3688#include <sys/types.h>
3689int
3690main (void)
3691{
3692
3693#ifndef _POSIX_C_SOURCE
3694make an error
3695#endif
3696  ;
3697  return 0;
3698}
3699_ACEOF
3700rm -f "conftest.$ac_objext"
3701if { (eval echo "$as_me:3701: \"$ac_compile\"") >&5
3702  (eval $ac_compile) 2>&5
3703  ac_status=$?
3704  echo "$as_me:3704: \$? = $ac_status" >&5
3705  (exit "$ac_status"); } &&
3706         { ac_try='test -s "conftest.$ac_objext"'
3707  { (eval echo "$as_me:3707: \"$ac_try\"") >&5
3708  (eval $ac_try) 2>&5
3709  ac_status=$?
3710  echo "$as_me:3710: \$? = $ac_status" >&5
3711  (exit "$ac_status"); }; }; then
3712  :
3713else
3714  echo "$as_me: failed program was:" >&5
3715cat "conftest.$ac_ext" >&5
3716cf_cv_posix_c_source=no
3717fi
3718rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3719	 CFLAGS="$cf_save_CFLAGS"
3720	 CPPFLAGS="$cf_save_CPPFLAGS"
3721
3722fi
3723rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3724
3725fi
3726echo "$as_me:3726: result: $cf_cv_posix_c_source" >&5
3727echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3728
3729if test "$cf_cv_posix_c_source" != no ; then
3730	CFLAGS="$cf_trim_CFLAGS"
3731	CPPFLAGS="$cf_trim_CPPFLAGS"
3732
3733cf_fix_cppflags=no
3734cf_new_cflags=
3735cf_new_cppflags=
3736cf_new_extra_cppflags=
3737
3738for cf_add_cflags in $cf_cv_posix_c_source
3739do
3740case "$cf_fix_cppflags" in
3741(no)
3742	case "$cf_add_cflags" in
3743	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3744		case "$cf_add_cflags" in
3745		(-D*)
3746			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3747
3748			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3749				&& test -z "${cf_tst_cflags}" \
3750				&& cf_fix_cppflags=yes
3751
3752			if test "$cf_fix_cppflags" = yes ; then
3753
3754	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3755	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3756
3757				continue
3758			elif test "${cf_tst_cflags}" = "\"'" ; then
3759
3760	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3761	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3762
3763				continue
3764			fi
3765			;;
3766		esac
3767		case "$CPPFLAGS" in
3768		(*$cf_add_cflags)
3769			;;
3770		(*)
3771			case "$cf_add_cflags" in
3772			(-D*)
3773				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3774
3775CPPFLAGS=`echo "$CPPFLAGS" | \
3776	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3777		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3778
3779				;;
3780			esac
3781
3782	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3783	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3784
3785			;;
3786		esac
3787		;;
3788	(*)
3789
3790	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3791	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3792
3793		;;
3794	esac
3795	;;
3796(yes)
3797
3798	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3799	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3800
3801	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
3802
3803	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3804		&& test -z "${cf_tst_cflags}" \
3805		&& cf_fix_cppflags=no
3806	;;
3807esac
3808done
3809
3810if test -n "$cf_new_cflags" ; then
3811
3812	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3813	CFLAGS="${CFLAGS}$cf_new_cflags"
3814
3815fi
3816
3817if test -n "$cf_new_cppflags" ; then
3818
3819	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3820	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3821
3822fi
3823
3824if test -n "$cf_new_extra_cppflags" ; then
3825
3826	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3827	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3828
3829fi
3830
3831fi
3832
3833fi # cf_cv_posix_visible
3834
3835	;;
3836(netbsd*)
3837	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3838	;;
3839(openbsd[6-9]*)
3840	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
3841	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
3842	# Abusing the conformance level is a workaround.
3843	{ echo "$as_me:3843: WARNING: this system does not provide usable locale support" >&5
3844echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
3845	cf_xopen_source="-D_BSD_SOURCE"
3846	cf_XOPEN_SOURCE=700
3847	;;
3848(openbsd[4-5]*)
3849	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3850	cf_xopen_source="-D_BSD_SOURCE"
3851	cf_XOPEN_SOURCE=600
3852	;;
3853(openbsd*)
3854	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3855	;;
3856(osf[45]*)
3857	cf_xopen_source="-D_OSF_SOURCE"
3858	;;
3859(nto-qnx*)
3860	cf_xopen_source="-D_QNX_SOURCE"
3861	;;
3862(sco*)
3863	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3864	;;
3865(solaris2.*)
3866	cf_xopen_source="-D__EXTENSIONS__"
3867	cf_cv_xopen_source=broken
3868	;;
3869(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3870	cf_XOPEN_SOURCE=
3871	cf_POSIX_C_SOURCE=
3872	;;
3873(*)
3874
3875echo "$as_me:3875: checking if we should define _XOPEN_SOURCE" >&5
3876echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3877if test "${cf_cv_xopen_source+set}" = set; then
3878  echo $ECHO_N "(cached) $ECHO_C" >&6
3879else
3880
3881	cat >"conftest.$ac_ext" <<_ACEOF
3882#line 3882 "configure"
3883#include "confdefs.h"
3884
3885#include <stdlib.h>
3886#include <string.h>
3887#include <sys/types.h>
3888
3889int
3890main (void)
3891{
3892
3893#ifndef _XOPEN_SOURCE
3894make an error
3895#endif
3896  ;
3897  return 0;
3898}
3899_ACEOF
3900rm -f "conftest.$ac_objext"
3901if { (eval echo "$as_me:3901: \"$ac_compile\"") >&5
3902  (eval $ac_compile) 2>&5
3903  ac_status=$?
3904  echo "$as_me:3904: \$? = $ac_status" >&5
3905  (exit "$ac_status"); } &&
3906         { ac_try='test -s "conftest.$ac_objext"'
3907  { (eval echo "$as_me:3907: \"$ac_try\"") >&5
3908  (eval $ac_try) 2>&5
3909  ac_status=$?
3910  echo "$as_me:3910: \$? = $ac_status" >&5
3911  (exit "$ac_status"); }; }; then
3912  cf_cv_xopen_source=no
3913else
3914  echo "$as_me: failed program was:" >&5
3915cat "conftest.$ac_ext" >&5
3916cf_save="$CPPFLAGS"
3917
3918	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3919	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3920
3921	 cat >"conftest.$ac_ext" <<_ACEOF
3922#line 3922 "configure"
3923#include "confdefs.h"
3924
3925#include <stdlib.h>
3926#include <string.h>
3927#include <sys/types.h>
3928
3929int
3930main (void)
3931{
3932
3933#ifdef _XOPEN_SOURCE
3934make an error
3935#endif
3936  ;
3937  return 0;
3938}
3939_ACEOF
3940rm -f "conftest.$ac_objext"
3941if { (eval echo "$as_me:3941: \"$ac_compile\"") >&5
3942  (eval $ac_compile) 2>&5
3943  ac_status=$?
3944  echo "$as_me:3944: \$? = $ac_status" >&5
3945  (exit "$ac_status"); } &&
3946         { ac_try='test -s "conftest.$ac_objext"'
3947  { (eval echo "$as_me:3947: \"$ac_try\"") >&5
3948  (eval $ac_try) 2>&5
3949  ac_status=$?
3950  echo "$as_me:3950: \$? = $ac_status" >&5
3951  (exit "$ac_status"); }; }; then
3952  cf_cv_xopen_source=no
3953else
3954  echo "$as_me: failed program was:" >&5
3955cat "conftest.$ac_ext" >&5
3956cf_cv_xopen_source=$cf_XOPEN_SOURCE
3957fi
3958rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3959	CPPFLAGS="$cf_save"
3960
3961fi
3962rm -f "conftest.$ac_objext" "conftest.$ac_ext"
3963
3964fi
3965echo "$as_me:3965: result: $cf_cv_xopen_source" >&5
3966echo "${ECHO_T}$cf_cv_xopen_source" >&6
3967
3968if test "$cf_cv_xopen_source" != no ; then
3969
3970CFLAGS=`echo "$CFLAGS" | \
3971	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3972		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3973
3974CPPFLAGS=`echo "$CPPFLAGS" | \
3975	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3976		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3977
3978	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3979
3980for cf_add_cflags in $cf_temp_xopen_source
3981do
3982	case "x$cf_add_cflags" in
3983	(x-[DU]*)
3984
3985cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3986while true
3987do
3988	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'`
3989	test "$CFLAGS" != "$cf_old_cflag" || break
3990
3991	CFLAGS="$cf_old_cflag"
3992done
3993
3994cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
3995while true
3996do
3997	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'`
3998	test "$CPPFLAGS" != "$cf_old_cflag" || break
3999
4000	CPPFLAGS="$cf_old_cflag"
4001done
4002
4003		;;
4004	esac
4005
4006cf_fix_cppflags=no
4007cf_new_cflags=
4008cf_new_cppflags=
4009cf_new_extra_cppflags=
4010
4011for cf_add_cflags in $cf_add_cflags
4012do
4013case "$cf_fix_cppflags" in
4014(no)
4015	case "$cf_add_cflags" in
4016	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4017		case "$cf_add_cflags" in
4018		(-D*)
4019			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4020
4021			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4022				&& test -z "${cf_tst_cflags}" \
4023				&& cf_fix_cppflags=yes
4024
4025			if test "$cf_fix_cppflags" = yes ; then
4026
4027	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4028	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4029
4030				continue
4031			elif test "${cf_tst_cflags}" = "\"'" ; then
4032
4033	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4034	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4035
4036				continue
4037			fi
4038			;;
4039		esac
4040		case "$CPPFLAGS" in
4041		(*$cf_add_cflags)
4042			;;
4043		(*)
4044			case "$cf_add_cflags" in
4045			(-D*)
4046				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4047
4048CPPFLAGS=`echo "$CPPFLAGS" | \
4049	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4050		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4051
4052				;;
4053			esac
4054
4055	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4056	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4057
4058			;;
4059		esac
4060		;;
4061	(*)
4062
4063	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4064	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4065
4066		;;
4067	esac
4068	;;
4069(yes)
4070
4071	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4072	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4073
4074	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4075
4076	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4077		&& test -z "${cf_tst_cflags}" \
4078		&& cf_fix_cppflags=no
4079	;;
4080esac
4081done
4082
4083if test -n "$cf_new_cflags" ; then
4084
4085	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4086	CFLAGS="${CFLAGS}$cf_new_cflags"
4087
4088fi
4089
4090if test -n "$cf_new_cppflags" ; then
4091
4092	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4093	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4094
4095fi
4096
4097if test -n "$cf_new_extra_cppflags" ; then
4098
4099	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4100	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4101
4102fi
4103
4104done
4105
4106fi
4107
4108if test "$cf_cv_posix_visible" = no; then
4109
4110cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4111
4112cf_save_CFLAGS="$CFLAGS"
4113cf_save_CPPFLAGS="$CPPFLAGS"
4114
4115cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4116	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4117		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4118
4119cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4120	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4121		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4122
4123echo "$as_me:4123: checking if we should define _POSIX_C_SOURCE" >&5
4124echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4125if test "${cf_cv_posix_c_source+set}" = set; then
4126  echo $ECHO_N "(cached) $ECHO_C" >&6
4127else
4128
4129echo "${as_me:-configure}:4129: testing if the symbol is already defined go no further ..." 1>&5
4130
4131	cat >"conftest.$ac_ext" <<_ACEOF
4132#line 4132 "configure"
4133#include "confdefs.h"
4134#include <sys/types.h>
4135int
4136main (void)
4137{
4138
4139#ifndef _POSIX_C_SOURCE
4140make an error
4141#endif
4142  ;
4143  return 0;
4144}
4145_ACEOF
4146rm -f "conftest.$ac_objext"
4147if { (eval echo "$as_me:4147: \"$ac_compile\"") >&5
4148  (eval $ac_compile) 2>&5
4149  ac_status=$?
4150  echo "$as_me:4150: \$? = $ac_status" >&5
4151  (exit "$ac_status"); } &&
4152         { ac_try='test -s "conftest.$ac_objext"'
4153  { (eval echo "$as_me:4153: \"$ac_try\"") >&5
4154  (eval $ac_try) 2>&5
4155  ac_status=$?
4156  echo "$as_me:4156: \$? = $ac_status" >&5
4157  (exit "$ac_status"); }; }; then
4158  cf_cv_posix_c_source=no
4159else
4160  echo "$as_me: failed program was:" >&5
4161cat "conftest.$ac_ext" >&5
4162cf_want_posix_source=no
4163	 case .$cf_POSIX_C_SOURCE in
4164	 (.[12]??*)
4165		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4166		;;
4167	 (.2)
4168		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4169		cf_want_posix_source=yes
4170		;;
4171	 (.*)
4172		cf_want_posix_source=yes
4173		;;
4174	 esac
4175	 if test "$cf_want_posix_source" = yes ; then
4176		cat >"conftest.$ac_ext" <<_ACEOF
4177#line 4177 "configure"
4178#include "confdefs.h"
4179#include <sys/types.h>
4180int
4181main (void)
4182{
4183
4184#ifdef _POSIX_SOURCE
4185make an error
4186#endif
4187  ;
4188  return 0;
4189}
4190_ACEOF
4191rm -f "conftest.$ac_objext"
4192if { (eval echo "$as_me:4192: \"$ac_compile\"") >&5
4193  (eval $ac_compile) 2>&5
4194  ac_status=$?
4195  echo "$as_me:4195: \$? = $ac_status" >&5
4196  (exit "$ac_status"); } &&
4197         { ac_try='test -s "conftest.$ac_objext"'
4198  { (eval echo "$as_me:4198: \"$ac_try\"") >&5
4199  (eval $ac_try) 2>&5
4200  ac_status=$?
4201  echo "$as_me:4201: \$? = $ac_status" >&5
4202  (exit "$ac_status"); }; }; then
4203  :
4204else
4205  echo "$as_me: failed program was:" >&5
4206cat "conftest.$ac_ext" >&5
4207cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4208fi
4209rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4210	 fi
4211
4212echo "${as_me:-configure}:4212: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4213
4214	 CFLAGS="$cf_trim_CFLAGS"
4215	 CPPFLAGS="$cf_trim_CPPFLAGS"
4216
4217	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4218	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4219
4220echo "${as_me:-configure}:4220: testing if the second compile does not leave our definition intact error ..." 1>&5
4221
4222	 cat >"conftest.$ac_ext" <<_ACEOF
4223#line 4223 "configure"
4224#include "confdefs.h"
4225#include <sys/types.h>
4226int
4227main (void)
4228{
4229
4230#ifndef _POSIX_C_SOURCE
4231make an error
4232#endif
4233  ;
4234  return 0;
4235}
4236_ACEOF
4237rm -f "conftest.$ac_objext"
4238if { (eval echo "$as_me:4238: \"$ac_compile\"") >&5
4239  (eval $ac_compile) 2>&5
4240  ac_status=$?
4241  echo "$as_me:4241: \$? = $ac_status" >&5
4242  (exit "$ac_status"); } &&
4243         { ac_try='test -s "conftest.$ac_objext"'
4244  { (eval echo "$as_me:4244: \"$ac_try\"") >&5
4245  (eval $ac_try) 2>&5
4246  ac_status=$?
4247  echo "$as_me:4247: \$? = $ac_status" >&5
4248  (exit "$ac_status"); }; }; then
4249  :
4250else
4251  echo "$as_me: failed program was:" >&5
4252cat "conftest.$ac_ext" >&5
4253cf_cv_posix_c_source=no
4254fi
4255rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4256	 CFLAGS="$cf_save_CFLAGS"
4257	 CPPFLAGS="$cf_save_CPPFLAGS"
4258
4259fi
4260rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4261
4262fi
4263echo "$as_me:4263: result: $cf_cv_posix_c_source" >&5
4264echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4265
4266if test "$cf_cv_posix_c_source" != no ; then
4267	CFLAGS="$cf_trim_CFLAGS"
4268	CPPFLAGS="$cf_trim_CPPFLAGS"
4269
4270cf_fix_cppflags=no
4271cf_new_cflags=
4272cf_new_cppflags=
4273cf_new_extra_cppflags=
4274
4275for cf_add_cflags in $cf_cv_posix_c_source
4276do
4277case "$cf_fix_cppflags" in
4278(no)
4279	case "$cf_add_cflags" in
4280	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4281		case "$cf_add_cflags" in
4282		(-D*)
4283			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4284
4285			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4286				&& test -z "${cf_tst_cflags}" \
4287				&& cf_fix_cppflags=yes
4288
4289			if test "$cf_fix_cppflags" = yes ; then
4290
4291	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4292	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4293
4294				continue
4295			elif test "${cf_tst_cflags}" = "\"'" ; then
4296
4297	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4298	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4299
4300				continue
4301			fi
4302			;;
4303		esac
4304		case "$CPPFLAGS" in
4305		(*$cf_add_cflags)
4306			;;
4307		(*)
4308			case "$cf_add_cflags" in
4309			(-D*)
4310				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4311
4312CPPFLAGS=`echo "$CPPFLAGS" | \
4313	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4314		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4315
4316				;;
4317			esac
4318
4319	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4320	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4321
4322			;;
4323		esac
4324		;;
4325	(*)
4326
4327	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4328	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4329
4330		;;
4331	esac
4332	;;
4333(yes)
4334
4335	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4336	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4337
4338	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4339
4340	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4341		&& test -z "${cf_tst_cflags}" \
4342		&& cf_fix_cppflags=no
4343	;;
4344esac
4345done
4346
4347if test -n "$cf_new_cflags" ; then
4348
4349	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4350	CFLAGS="${CFLAGS}$cf_new_cflags"
4351
4352fi
4353
4354if test -n "$cf_new_cppflags" ; then
4355
4356	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4357	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4358
4359fi
4360
4361if test -n "$cf_new_extra_cppflags" ; then
4362
4363	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4364	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4365
4366fi
4367
4368fi
4369
4370fi # cf_cv_posix_visible
4371
4372	;;
4373esac
4374
4375if test -n "$cf_xopen_source" ; then
4376
4377for cf_add_cflags in $cf_xopen_source
4378do
4379	case "x$cf_add_cflags" in
4380	(x-[DU]*)
4381
4382cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4383while true
4384do
4385	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'`
4386	test "$CFLAGS" != "$cf_old_cflag" || break
4387	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CFLAGS" 1>&6
4388
4389echo "${as_me:-configure}:4389: testing removing old option $cf_add_cflags from CFLAGS ..." 1>&5
4390
4391	CFLAGS="$cf_old_cflag"
4392done
4393
4394cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4395while true
4396do
4397	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'`
4398	test "$CPPFLAGS" != "$cf_old_cflag" || break
4399	test -n "$verbose" && echo "	removing old option $cf_add_cflags from CPPFLAGS" 1>&6
4400
4401echo "${as_me:-configure}:4401: testing removing old option $cf_add_cflags from CPPFLAGS ..." 1>&5
4402
4403	CPPFLAGS="$cf_old_cflag"
4404done
4405
4406		;;
4407	esac
4408
4409cf_fix_cppflags=no
4410cf_new_cflags=
4411cf_new_cppflags=
4412cf_new_extra_cppflags=
4413
4414for cf_add_cflags in $cf_add_cflags
4415do
4416case "$cf_fix_cppflags" in
4417(no)
4418	case "$cf_add_cflags" in
4419	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4420		case "$cf_add_cflags" in
4421		(-D*)
4422			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4423
4424			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4425				&& test -z "${cf_tst_cflags}" \
4426				&& cf_fix_cppflags=yes
4427
4428			if test "$cf_fix_cppflags" = yes ; then
4429
4430	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4431	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4432
4433				continue
4434			elif test "${cf_tst_cflags}" = "\"'" ; then
4435
4436	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4437	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4438
4439				continue
4440			fi
4441			;;
4442		esac
4443		case "$CPPFLAGS" in
4444		(*$cf_add_cflags)
4445			;;
4446		(*)
4447			case "$cf_add_cflags" in
4448			(-D*)
4449				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4450
4451CPPFLAGS=`echo "$CPPFLAGS" | \
4452	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4453		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4454
4455				;;
4456			esac
4457
4458	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4459	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4460
4461			;;
4462		esac
4463		;;
4464	(*)
4465
4466	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4467	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4468
4469		;;
4470	esac
4471	;;
4472(yes)
4473
4474	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4475	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4476
4477	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4478
4479	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4480		&& test -z "${cf_tst_cflags}" \
4481		&& cf_fix_cppflags=no
4482	;;
4483esac
4484done
4485
4486if test -n "$cf_new_cflags" ; then
4487	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4488
4489echo "${as_me:-configure}:4489: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4490
4491	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4492	CFLAGS="${CFLAGS}$cf_new_cflags"
4493
4494fi
4495
4496if test -n "$cf_new_cppflags" ; then
4497	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4498
4499echo "${as_me:-configure}:4499: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4500
4501	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4502	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4503
4504fi
4505
4506if test -n "$cf_new_extra_cppflags" ; then
4507	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4508
4509echo "${as_me:-configure}:4509: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4510
4511	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4512	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4513
4514fi
4515
4516done
4517
4518fi
4519
4520if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4521	echo "$as_me:4521: checking if _XOPEN_SOURCE really is set" >&5
4522echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4523	cat >"conftest.$ac_ext" <<_ACEOF
4524#line 4524 "configure"
4525#include "confdefs.h"
4526#include <stdlib.h>
4527int
4528main (void)
4529{
4530
4531#ifndef _XOPEN_SOURCE
4532make an error
4533#endif
4534  ;
4535  return 0;
4536}
4537_ACEOF
4538rm -f "conftest.$ac_objext"
4539if { (eval echo "$as_me:4539: \"$ac_compile\"") >&5
4540  (eval $ac_compile) 2>&5
4541  ac_status=$?
4542  echo "$as_me:4542: \$? = $ac_status" >&5
4543  (exit "$ac_status"); } &&
4544         { ac_try='test -s "conftest.$ac_objext"'
4545  { (eval echo "$as_me:4545: \"$ac_try\"") >&5
4546  (eval $ac_try) 2>&5
4547  ac_status=$?
4548  echo "$as_me:4548: \$? = $ac_status" >&5
4549  (exit "$ac_status"); }; }; then
4550  cf_XOPEN_SOURCE_set=yes
4551else
4552  echo "$as_me: failed program was:" >&5
4553cat "conftest.$ac_ext" >&5
4554cf_XOPEN_SOURCE_set=no
4555fi
4556rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4557	echo "$as_me:4557: result: $cf_XOPEN_SOURCE_set" >&5
4558echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4559	if test "$cf_XOPEN_SOURCE_set" = yes
4560	then
4561		cat >"conftest.$ac_ext" <<_ACEOF
4562#line 4562 "configure"
4563#include "confdefs.h"
4564#include <stdlib.h>
4565int
4566main (void)
4567{
4568
4569#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4570make an error
4571#endif
4572  ;
4573  return 0;
4574}
4575_ACEOF
4576rm -f "conftest.$ac_objext"
4577if { (eval echo "$as_me:4577: \"$ac_compile\"") >&5
4578  (eval $ac_compile) 2>&5
4579  ac_status=$?
4580  echo "$as_me:4580: \$? = $ac_status" >&5
4581  (exit "$ac_status"); } &&
4582         { ac_try='test -s "conftest.$ac_objext"'
4583  { (eval echo "$as_me:4583: \"$ac_try\"") >&5
4584  (eval $ac_try) 2>&5
4585  ac_status=$?
4586  echo "$as_me:4586: \$? = $ac_status" >&5
4587  (exit "$ac_status"); }; }; then
4588  cf_XOPEN_SOURCE_set_ok=yes
4589else
4590  echo "$as_me: failed program was:" >&5
4591cat "conftest.$ac_ext" >&5
4592cf_XOPEN_SOURCE_set_ok=no
4593fi
4594rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4595		if test "$cf_XOPEN_SOURCE_set_ok" = no
4596		then
4597			{ echo "$as_me:4597: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4598echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4599		fi
4600	else
4601
4602echo "$as_me:4602: checking if we should define _XOPEN_SOURCE" >&5
4603echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4604if test "${cf_cv_xopen_source+set}" = set; then
4605  echo $ECHO_N "(cached) $ECHO_C" >&6
4606else
4607
4608	cat >"conftest.$ac_ext" <<_ACEOF
4609#line 4609 "configure"
4610#include "confdefs.h"
4611
4612#include <stdlib.h>
4613#include <string.h>
4614#include <sys/types.h>
4615
4616int
4617main (void)
4618{
4619
4620#ifndef _XOPEN_SOURCE
4621make an error
4622#endif
4623  ;
4624  return 0;
4625}
4626_ACEOF
4627rm -f "conftest.$ac_objext"
4628if { (eval echo "$as_me:4628: \"$ac_compile\"") >&5
4629  (eval $ac_compile) 2>&5
4630  ac_status=$?
4631  echo "$as_me:4631: \$? = $ac_status" >&5
4632  (exit "$ac_status"); } &&
4633         { ac_try='test -s "conftest.$ac_objext"'
4634  { (eval echo "$as_me:4634: \"$ac_try\"") >&5
4635  (eval $ac_try) 2>&5
4636  ac_status=$?
4637  echo "$as_me:4637: \$? = $ac_status" >&5
4638  (exit "$ac_status"); }; }; then
4639  cf_cv_xopen_source=no
4640else
4641  echo "$as_me: failed program was:" >&5
4642cat "conftest.$ac_ext" >&5
4643cf_save="$CPPFLAGS"
4644
4645	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4646	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4647
4648	 cat >"conftest.$ac_ext" <<_ACEOF
4649#line 4649 "configure"
4650#include "confdefs.h"
4651
4652#include <stdlib.h>
4653#include <string.h>
4654#include <sys/types.h>
4655
4656int
4657main (void)
4658{
4659
4660#ifdef _XOPEN_SOURCE
4661make an error
4662#endif
4663  ;
4664  return 0;
4665}
4666_ACEOF
4667rm -f "conftest.$ac_objext"
4668if { (eval echo "$as_me:4668: \"$ac_compile\"") >&5
4669  (eval $ac_compile) 2>&5
4670  ac_status=$?
4671  echo "$as_me:4671: \$? = $ac_status" >&5
4672  (exit "$ac_status"); } &&
4673         { ac_try='test -s "conftest.$ac_objext"'
4674  { (eval echo "$as_me:4674: \"$ac_try\"") >&5
4675  (eval $ac_try) 2>&5
4676  ac_status=$?
4677  echo "$as_me:4677: \$? = $ac_status" >&5
4678  (exit "$ac_status"); }; }; then
4679  cf_cv_xopen_source=no
4680else
4681  echo "$as_me: failed program was:" >&5
4682cat "conftest.$ac_ext" >&5
4683cf_cv_xopen_source=$cf_XOPEN_SOURCE
4684fi
4685rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4686	CPPFLAGS="$cf_save"
4687
4688fi
4689rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4690
4691fi
4692echo "$as_me:4692: result: $cf_cv_xopen_source" >&5
4693echo "${ECHO_T}$cf_cv_xopen_source" >&6
4694
4695if test "$cf_cv_xopen_source" != no ; then
4696
4697CFLAGS=`echo "$CFLAGS" | \
4698	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4699		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4700
4701CPPFLAGS=`echo "$CPPFLAGS" | \
4702	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4703		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4704
4705	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4706
4707for cf_add_cflags in $cf_temp_xopen_source
4708do
4709	case "x$cf_add_cflags" in
4710	(x-[DU]*)
4711
4712cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4713while true
4714do
4715	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'`
4716	test "$CFLAGS" != "$cf_old_cflag" || break
4717
4718	CFLAGS="$cf_old_cflag"
4719done
4720
4721cf_tmp_cflag=`echo "x$cf_add_cflags" | sed -e 's/^.//' -e 's/=.*//'`
4722while true
4723do
4724	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'`
4725	test "$CPPFLAGS" != "$cf_old_cflag" || break
4726
4727	CPPFLAGS="$cf_old_cflag"
4728done
4729
4730		;;
4731	esac
4732
4733cf_fix_cppflags=no
4734cf_new_cflags=
4735cf_new_cppflags=
4736cf_new_extra_cppflags=
4737
4738for cf_add_cflags in $cf_add_cflags
4739do
4740case "$cf_fix_cppflags" in
4741(no)
4742	case "$cf_add_cflags" in
4743	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4744		case "$cf_add_cflags" in
4745		(-D*)
4746			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4747
4748			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4749				&& test -z "${cf_tst_cflags}" \
4750				&& cf_fix_cppflags=yes
4751
4752			if test "$cf_fix_cppflags" = yes ; then
4753
4754	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4755	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4756
4757				continue
4758			elif test "${cf_tst_cflags}" = "\"'" ; then
4759
4760	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4761	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4762
4763				continue
4764			fi
4765			;;
4766		esac
4767		case "$CPPFLAGS" in
4768		(*$cf_add_cflags)
4769			;;
4770		(*)
4771			case "$cf_add_cflags" in
4772			(-D*)
4773				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4774
4775CPPFLAGS=`echo "$CPPFLAGS" | \
4776	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4777		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4778
4779				;;
4780			esac
4781
4782	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4783	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4784
4785			;;
4786		esac
4787		;;
4788	(*)
4789
4790	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4791	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4792
4793		;;
4794	esac
4795	;;
4796(yes)
4797
4798	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4799	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4800
4801	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
4802
4803	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4804		&& test -z "${cf_tst_cflags}" \
4805		&& cf_fix_cppflags=no
4806	;;
4807esac
4808done
4809
4810if test -n "$cf_new_cflags" ; then
4811
4812	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4813	CFLAGS="${CFLAGS}$cf_new_cflags"
4814
4815fi
4816
4817if test -n "$cf_new_cppflags" ; then
4818
4819	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4820	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4821
4822fi
4823
4824if test -n "$cf_new_extra_cppflags" ; then
4825
4826	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4827	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4828
4829fi
4830
4831done
4832
4833fi
4834
4835	fi
4836fi
4837fi # cf_cv_posix_visible
4838
4839echo "$as_me:4839: checking if SIGWINCH is defined" >&5
4840echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4841if test "${cf_cv_define_sigwinch+set}" = set; then
4842  echo $ECHO_N "(cached) $ECHO_C" >&6
4843else
4844
4845	cat >"conftest.$ac_ext" <<_ACEOF
4846#line 4846 "configure"
4847#include "confdefs.h"
4848
4849#include <sys/types.h>
4850#include <sys/signal.h>
4851
4852int
4853main (void)
4854{
4855int x = SIGWINCH; (void)x
4856  ;
4857  return 0;
4858}
4859_ACEOF
4860rm -f "conftest.$ac_objext"
4861if { (eval echo "$as_me:4861: \"$ac_compile\"") >&5
4862  (eval $ac_compile) 2>&5
4863  ac_status=$?
4864  echo "$as_me:4864: \$? = $ac_status" >&5
4865  (exit "$ac_status"); } &&
4866         { ac_try='test -s "conftest.$ac_objext"'
4867  { (eval echo "$as_me:4867: \"$ac_try\"") >&5
4868  (eval $ac_try) 2>&5
4869  ac_status=$?
4870  echo "$as_me:4870: \$? = $ac_status" >&5
4871  (exit "$ac_status"); }; }; then
4872  cf_cv_define_sigwinch=yes
4873else
4874  echo "$as_me: failed program was:" >&5
4875cat "conftest.$ac_ext" >&5
4876cat >"conftest.$ac_ext" <<_ACEOF
4877#line 4877 "configure"
4878#include "confdefs.h"
4879
4880#undef _XOPEN_SOURCE
4881#undef _POSIX_SOURCE
4882#undef _POSIX_C_SOURCE
4883#include <sys/types.h>
4884#include <sys/signal.h>
4885
4886int
4887main (void)
4888{
4889int x = SIGWINCH; (void)x
4890  ;
4891  return 0;
4892}
4893_ACEOF
4894rm -f "conftest.$ac_objext"
4895if { (eval echo "$as_me:4895: \"$ac_compile\"") >&5
4896  (eval $ac_compile) 2>&5
4897  ac_status=$?
4898  echo "$as_me:4898: \$? = $ac_status" >&5
4899  (exit "$ac_status"); } &&
4900         { ac_try='test -s "conftest.$ac_objext"'
4901  { (eval echo "$as_me:4901: \"$ac_try\"") >&5
4902  (eval $ac_try) 2>&5
4903  ac_status=$?
4904  echo "$as_me:4904: \$? = $ac_status" >&5
4905  (exit "$ac_status"); }; }; then
4906  cf_cv_define_sigwinch=maybe
4907else
4908  echo "$as_me: failed program was:" >&5
4909cat "conftest.$ac_ext" >&5
4910cf_cv_define_sigwinch=no
4911fi
4912rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4913
4914fi
4915rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4916
4917fi
4918echo "$as_me:4918: result: $cf_cv_define_sigwinch" >&5
4919echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4920
4921if test "$cf_cv_define_sigwinch" = maybe ; then
4922echo "$as_me:4922: checking for actual SIGWINCH definition" >&5
4923echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4924if test "${cf_cv_fixup_sigwinch+set}" = set; then
4925  echo $ECHO_N "(cached) $ECHO_C" >&6
4926else
4927
4928cf_cv_fixup_sigwinch=unknown
4929cf_sigwinch=32
4930while test "$cf_sigwinch" != 1
4931do
4932	cat >"conftest.$ac_ext" <<_ACEOF
4933#line 4933 "configure"
4934#include "confdefs.h"
4935
4936#undef _XOPEN_SOURCE
4937#undef _POSIX_SOURCE
4938#undef _POSIX_C_SOURCE
4939#include <sys/types.h>
4940#include <sys/signal.h>
4941
4942int
4943main (void)
4944{
4945
4946#if SIGWINCH != $cf_sigwinch
4947make an error
4948#endif
4949int x = SIGWINCH; (void)x
4950  ;
4951  return 0;
4952}
4953_ACEOF
4954rm -f "conftest.$ac_objext"
4955if { (eval echo "$as_me:4955: \"$ac_compile\"") >&5
4956  (eval $ac_compile) 2>&5
4957  ac_status=$?
4958  echo "$as_me:4958: \$? = $ac_status" >&5
4959  (exit "$ac_status"); } &&
4960         { ac_try='test -s "conftest.$ac_objext"'
4961  { (eval echo "$as_me:4961: \"$ac_try\"") >&5
4962  (eval $ac_try) 2>&5
4963  ac_status=$?
4964  echo "$as_me:4964: \$? = $ac_status" >&5
4965  (exit "$ac_status"); }; }; then
4966  cf_cv_fixup_sigwinch=$cf_sigwinch
4967	 break
4968else
4969  echo "$as_me: failed program was:" >&5
4970cat "conftest.$ac_ext" >&5
4971fi
4972rm -f "conftest.$ac_objext" "conftest.$ac_ext"
4973
4974cf_sigwinch="`expr "$cf_sigwinch" - 1`"
4975done
4976
4977fi
4978echo "$as_me:4978: result: $cf_cv_fixup_sigwinch" >&5
4979echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4980
4981	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4982		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4983	fi
4984fi
4985
4986###	checks for header files
4987
4988for ac_header in \
4989ncurses/curses.h \
4990ncurses/term.h \
4991stdlib.h \
4992sys/ptem.h sys/ttydefaults.h \
4993term.h \
4994termios.h \
4995unistd.h \
4996wchar.h \
4997
4998do
4999as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5000echo "$as_me:5000: checking for $ac_header" >&5
5001echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5002if eval "test \"\${$as_ac_Header+set}\" = set"; then
5003  echo $ECHO_N "(cached) $ECHO_C" >&6
5004else
5005  cat >"conftest.$ac_ext" <<_ACEOF
5006#line 5006 "configure"
5007#include "confdefs.h"
5008#include <$ac_header>
5009_ACEOF
5010if { (eval echo "$as_me:5010: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5011  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5012  ac_status=$?
5013  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5014  rm -f conftest.er1
5015  cat conftest.err >&5
5016  echo "$as_me:5016: \$? = $ac_status" >&5
5017  (exit "$ac_status"); } >/dev/null; then
5018  if test -s conftest.err; then
5019    ac_cpp_err=$ac_c_preproc_warn_flag
5020  else
5021    ac_cpp_err=
5022  fi
5023else
5024  ac_cpp_err=yes
5025fi
5026if test -z "$ac_cpp_err"; then
5027  eval "$as_ac_Header=yes"
5028else
5029  echo "$as_me: failed program was:" >&5
5030  cat "conftest.$ac_ext" >&5
5031  eval "$as_ac_Header=no"
5032fi
5033rm -f conftest.err "conftest.$ac_ext"
5034fi
5035echo "$as_me:5035: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5036echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5037if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5038  cat >>confdefs.h <<EOF
5039#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5040EOF
5041
5042fi
5043done
5044
5045echo "$as_me:5045: checking whether time.h and sys/time.h may both be included" >&5
5046echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
5047if test "${ac_cv_header_time+set}" = set; then
5048  echo $ECHO_N "(cached) $ECHO_C" >&6
5049else
5050  cat >"conftest.$ac_ext" <<_ACEOF
5051#line 5051 "configure"
5052#include "confdefs.h"
5053#include <sys/types.h>
5054#include <sys/time.h>
5055#include <time.h>
5056
5057int
5058main (void)
5059{
5060if ((struct tm *) 0)
5061return 0;
5062  ;
5063  return 0;
5064}
5065_ACEOF
5066rm -f "conftest.$ac_objext"
5067if { (eval echo "$as_me:5067: \"$ac_compile\"") >&5
5068  (eval $ac_compile) 2>&5
5069  ac_status=$?
5070  echo "$as_me:5070: \$? = $ac_status" >&5
5071  (exit "$ac_status"); } &&
5072         { ac_try='test -s "conftest.$ac_objext"'
5073  { (eval echo "$as_me:5073: \"$ac_try\"") >&5
5074  (eval $ac_try) 2>&5
5075  ac_status=$?
5076  echo "$as_me:5076: \$? = $ac_status" >&5
5077  (exit "$ac_status"); }; }; then
5078  ac_cv_header_time=yes
5079else
5080  echo "$as_me: failed program was:" >&5
5081cat "conftest.$ac_ext" >&5
5082ac_cv_header_time=no
5083fi
5084rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5085fi
5086echo "$as_me:5086: result: $ac_cv_header_time" >&5
5087echo "${ECHO_T}$ac_cv_header_time" >&6
5088if test $ac_cv_header_time = yes; then
5089
5090cat >>confdefs.h <<\EOF
5091#define TIME_WITH_SYS_TIME 1
5092EOF
5093
5094fi
5095
5096echo "$as_me:5096: checking for nl_langinfo and CODESET" >&5
5097echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
5098if test "${am_cv_langinfo_codeset+set}" = set; then
5099  echo $ECHO_N "(cached) $ECHO_C" >&6
5100else
5101  cat >"conftest.$ac_ext" <<_ACEOF
5102#line 5102 "configure"
5103#include "confdefs.h"
5104#include <langinfo.h>
5105int
5106main (void)
5107{
5108char* cs = nl_langinfo(CODESET); (void)cs
5109  ;
5110  return 0;
5111}
5112_ACEOF
5113rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5114if { (eval echo "$as_me:5114: \"$ac_link\"") >&5
5115  (eval $ac_link) 2>&5
5116  ac_status=$?
5117  echo "$as_me:5117: \$? = $ac_status" >&5
5118  (exit "$ac_status"); } &&
5119         { ac_try='test -s "conftest$ac_exeext"'
5120  { (eval echo "$as_me:5120: \"$ac_try\"") >&5
5121  (eval $ac_try) 2>&5
5122  ac_status=$?
5123  echo "$as_me:5123: \$? = $ac_status" >&5
5124  (exit "$ac_status"); }; }; then
5125  am_cv_langinfo_codeset=yes
5126else
5127  echo "$as_me: failed program was:" >&5
5128cat "conftest.$ac_ext" >&5
5129am_cv_langinfo_codeset=no
5130fi
5131rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5132
5133fi
5134echo "$as_me:5134: result: $am_cv_langinfo_codeset" >&5
5135echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
5136	if test "$am_cv_langinfo_codeset" = yes; then
5137
5138cat >>confdefs.h <<\EOF
5139#define HAVE_LANGINFO_CODESET 1
5140EOF
5141
5142	fi
5143
5144###	checks for typedefs
5145
5146echo "$as_me:5146: checking for signal global datatype" >&5
5147echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
5148if test "${cf_cv_sig_atomic_t+set}" = set; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151
5152	for cf_type in \
5153		"volatile sig_atomic_t" \
5154		"sig_atomic_t" \
5155		"int"
5156	do
5157	cat >"conftest.$ac_ext" <<_ACEOF
5158#line 5158 "configure"
5159#include "confdefs.h"
5160
5161#include <sys/types.h>
5162#include <signal.h>
5163#include <stdio.h>
5164
5165extern $cf_type x;
5166$cf_type x;
5167static void handler(int sig)
5168{
5169	(void)sig;
5170	x = 5;
5171}
5172int
5173main (void)
5174{
5175signal(SIGINT, handler);
5176		 x = 1
5177  ;
5178  return 0;
5179}
5180_ACEOF
5181rm -f "conftest.$ac_objext"
5182if { (eval echo "$as_me:5182: \"$ac_compile\"") >&5
5183  (eval $ac_compile) 2>&5
5184  ac_status=$?
5185  echo "$as_me:5185: \$? = $ac_status" >&5
5186  (exit "$ac_status"); } &&
5187         { ac_try='test -s "conftest.$ac_objext"'
5188  { (eval echo "$as_me:5188: \"$ac_try\"") >&5
5189  (eval $ac_try) 2>&5
5190  ac_status=$?
5191  echo "$as_me:5191: \$? = $ac_status" >&5
5192  (exit "$ac_status"); }; }; then
5193  cf_cv_sig_atomic_t=$cf_type
5194else
5195  echo "$as_me: failed program was:" >&5
5196cat "conftest.$ac_ext" >&5
5197cf_cv_sig_atomic_t=no
5198fi
5199rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5200		test "$cf_cv_sig_atomic_t" != no && break
5201	done
5202
5203fi
5204
5205echo "$as_me:5205: result: $cf_cv_sig_atomic_t" >&5
5206echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
5207test "$cf_cv_sig_atomic_t" != no &&
5208cat >>confdefs.h <<EOF
5209#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
5210EOF
5211
5212echo "$as_me:5212: checking for ANSI C header files" >&5
5213echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
5214if test "${ac_cv_header_stdc+set}" = set; then
5215  echo $ECHO_N "(cached) $ECHO_C" >&6
5216else
5217  cat >"conftest.$ac_ext" <<_ACEOF
5218#line 5218 "configure"
5219#include "confdefs.h"
5220#include <stdlib.h>
5221#include <stdarg.h>
5222#include <string.h>
5223#include <float.h>
5224
5225_ACEOF
5226if { (eval echo "$as_me:5226: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5227  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5228  ac_status=$?
5229  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5230  rm -f conftest.er1
5231  cat conftest.err >&5
5232  echo "$as_me:5232: \$? = $ac_status" >&5
5233  (exit "$ac_status"); } >/dev/null; then
5234  if test -s conftest.err; then
5235    ac_cpp_err=$ac_c_preproc_warn_flag
5236  else
5237    ac_cpp_err=
5238  fi
5239else
5240  ac_cpp_err=yes
5241fi
5242if test -z "$ac_cpp_err"; then
5243  ac_cv_header_stdc=yes
5244else
5245  echo "$as_me: failed program was:" >&5
5246  cat "conftest.$ac_ext" >&5
5247  ac_cv_header_stdc=no
5248fi
5249rm -f conftest.err "conftest.$ac_ext"
5250
5251if test $ac_cv_header_stdc = yes; then
5252  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
5253  cat >"conftest.$ac_ext" <<_ACEOF
5254#line 5254 "configure"
5255#include "confdefs.h"
5256#include <string.h>
5257
5258_ACEOF
5259if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5260  $EGREP "memchr" >/dev/null 2>&1; then
5261  :
5262else
5263  ac_cv_header_stdc=no
5264fi
5265rm -rf conftest*
5266
5267fi
5268
5269if test $ac_cv_header_stdc = yes; then
5270  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
5271  cat >"conftest.$ac_ext" <<_ACEOF
5272#line 5272 "configure"
5273#include "confdefs.h"
5274#include <stdlib.h>
5275
5276_ACEOF
5277if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5278  $EGREP "free" >/dev/null 2>&1; then
5279  :
5280else
5281  ac_cv_header_stdc=no
5282fi
5283rm -rf conftest*
5284
5285fi
5286
5287if test $ac_cv_header_stdc = yes; then
5288  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
5289  if test "$cross_compiling" = yes; then
5290  :
5291else
5292  cat >"conftest.$ac_ext" <<_ACEOF
5293#line 5293 "configure"
5294#include "confdefs.h"
5295#include <ctype.h>
5296#if ((' ' & 0x0FF) == 0x020)
5297# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
5298# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
5299#else
5300# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
5301                     || ('j' <= (c) && (c) <= 'r') \
5302                     || ('s' <= (c) && (c) <= 'z'))
5303# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
5304#endif
5305
5306#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
5307int
5308main (void)
5309{
5310  int i;
5311  for (i = 0; i < 256; i++)
5312    if (XOR (islower (i), ISLOWER (i))
5313        || toupper (i) != TOUPPER (i))
5314      $ac_main_return(2);
5315  $ac_main_return (0);
5316}
5317_ACEOF
5318rm -f "conftest$ac_exeext"
5319if { (eval echo "$as_me:5319: \"$ac_link\"") >&5
5320  (eval $ac_link) 2>&5
5321  ac_status=$?
5322  echo "$as_me:5322: \$? = $ac_status" >&5
5323  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
5324  { (eval echo "$as_me:5324: \"$ac_try\"") >&5
5325  (eval $ac_try) 2>&5
5326  ac_status=$?
5327  echo "$as_me:5327: \$? = $ac_status" >&5
5328  (exit "$ac_status"); }; }; then
5329  :
5330else
5331  echo "$as_me: program exited with status $ac_status" >&5
5332echo "$as_me: failed program was:" >&5
5333cat "conftest.$ac_ext" >&5
5334ac_cv_header_stdc=no
5335fi
5336rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
5337fi
5338fi
5339fi
5340echo "$as_me:5340: result: $ac_cv_header_stdc" >&5
5341echo "${ECHO_T}$ac_cv_header_stdc" >&6
5342if test $ac_cv_header_stdc = yes; then
5343
5344cat >>confdefs.h <<\EOF
5345#define STDC_HEADERS 1
5346EOF
5347
5348fi
5349
5350# On IRIX 5.3, sys/types and inttypes.h are conflicting.
5351
5352for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
5353                  inttypes.h stdint.h unistd.h
5354do
5355as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5356echo "$as_me:5356: checking for $ac_header" >&5
5357echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5358if eval "test \"\${$as_ac_Header+set}\" = set"; then
5359  echo $ECHO_N "(cached) $ECHO_C" >&6
5360else
5361  cat >"conftest.$ac_ext" <<_ACEOF
5362#line 5362 "configure"
5363#include "confdefs.h"
5364$ac_includes_default
5365#include <$ac_header>
5366_ACEOF
5367rm -f "conftest.$ac_objext"
5368if { (eval echo "$as_me:5368: \"$ac_compile\"") >&5
5369  (eval $ac_compile) 2>&5
5370  ac_status=$?
5371  echo "$as_me:5371: \$? = $ac_status" >&5
5372  (exit "$ac_status"); } &&
5373         { ac_try='test -s "conftest.$ac_objext"'
5374  { (eval echo "$as_me:5374: \"$ac_try\"") >&5
5375  (eval $ac_try) 2>&5
5376  ac_status=$?
5377  echo "$as_me:5377: \$? = $ac_status" >&5
5378  (exit "$ac_status"); }; }; then
5379  eval "$as_ac_Header=yes"
5380else
5381  echo "$as_me: failed program was:" >&5
5382cat "conftest.$ac_ext" >&5
5383eval "$as_ac_Header=no"
5384fi
5385rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5386fi
5387echo "$as_me:5387: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5388echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5389if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5390  cat >>confdefs.h <<EOF
5391#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5392EOF
5393
5394fi
5395done
5396
5397echo "$as_me:5397: checking for time_t" >&5
5398echo $ECHO_N "checking for time_t... $ECHO_C" >&6
5399if test "${ac_cv_type_time_t+set}" = set; then
5400  echo $ECHO_N "(cached) $ECHO_C" >&6
5401else
5402  cat >"conftest.$ac_ext" <<_ACEOF
5403#line 5403 "configure"
5404#include "confdefs.h"
5405$ac_includes_default
5406int
5407main (void)
5408{
5409if ((time_t *) 0)
5410  return 0;
5411if (sizeof (time_t))
5412  return 0;
5413  ;
5414  return 0;
5415}
5416_ACEOF
5417rm -f "conftest.$ac_objext"
5418if { (eval echo "$as_me:5418: \"$ac_compile\"") >&5
5419  (eval $ac_compile) 2>&5
5420  ac_status=$?
5421  echo "$as_me:5421: \$? = $ac_status" >&5
5422  (exit "$ac_status"); } &&
5423         { ac_try='test -s "conftest.$ac_objext"'
5424  { (eval echo "$as_me:5424: \"$ac_try\"") >&5
5425  (eval $ac_try) 2>&5
5426  ac_status=$?
5427  echo "$as_me:5427: \$? = $ac_status" >&5
5428  (exit "$ac_status"); }; }; then
5429  ac_cv_type_time_t=yes
5430else
5431  echo "$as_me: failed program was:" >&5
5432cat "conftest.$ac_ext" >&5
5433ac_cv_type_time_t=no
5434fi
5435rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5436fi
5437echo "$as_me:5437: result: $ac_cv_type_time_t" >&5
5438echo "${ECHO_T}$ac_cv_type_time_t" >&6
5439if test "$ac_cv_type_time_t" = yes; then
5440  :
5441else
5442
5443cat >>confdefs.h <<EOF
5444#define time_t long
5445EOF
5446
5447fi
5448
5449echo "$as_me:5449: checking for cc_t in <termios.h> or <termio.h>" >&5
5450echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
5451if test "${cf_cv_type_cc_t+set}" = set; then
5452  echo $ECHO_N "(cached) $ECHO_C" >&6
5453else
5454
5455	cat >"conftest.$ac_ext" <<_ACEOF
5456#line 5456 "configure"
5457#include "confdefs.h"
5458
5459#include <sys/types.h>
5460#if defined(HAVE_TERMIOS_H)
5461#include <termios.h>
5462#else
5463#include <termio.h>
5464#include <sys/ioctl.h>
5465#endif
5466
5467int
5468main (void)
5469{
5470cc_t x; (void)x
5471  ;
5472  return 0;
5473}
5474_ACEOF
5475rm -f "conftest.$ac_objext"
5476if { (eval echo "$as_me:5476: \"$ac_compile\"") >&5
5477  (eval $ac_compile) 2>&5
5478  ac_status=$?
5479  echo "$as_me:5479: \$? = $ac_status" >&5
5480  (exit "$ac_status"); } &&
5481         { ac_try='test -s "conftest.$ac_objext"'
5482  { (eval echo "$as_me:5482: \"$ac_try\"") >&5
5483  (eval $ac_try) 2>&5
5484  ac_status=$?
5485  echo "$as_me:5485: \$? = $ac_status" >&5
5486  (exit "$ac_status"); }; }; then
5487  cf_cv_type_cc_t=yes
5488else
5489  echo "$as_me: failed program was:" >&5
5490cat "conftest.$ac_ext" >&5
5491cf_cv_type_cc_t=no
5492fi
5493rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5494
5495fi
5496
5497echo "$as_me:5497: result: $cf_cv_type_cc_t" >&5
5498echo "${ECHO_T}$cf_cv_type_cc_t" >&6
5499test $cf_cv_type_cc_t = no &&
5500cat >>confdefs.h <<\EOF
5501#define cc_t unsigned char
5502EOF
5503
5504echo "$as_me:5504: checking for mode_t" >&5
5505echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
5506if test "${ac_cv_type_mode_t+set}" = set; then
5507  echo $ECHO_N "(cached) $ECHO_C" >&6
5508else
5509  cat >"conftest.$ac_ext" <<_ACEOF
5510#line 5510 "configure"
5511#include "confdefs.h"
5512$ac_includes_default
5513int
5514main (void)
5515{
5516if ((mode_t *) 0)
5517  return 0;
5518if (sizeof (mode_t))
5519  return 0;
5520  ;
5521  return 0;
5522}
5523_ACEOF
5524rm -f "conftest.$ac_objext"
5525if { (eval echo "$as_me:5525: \"$ac_compile\"") >&5
5526  (eval $ac_compile) 2>&5
5527  ac_status=$?
5528  echo "$as_me:5528: \$? = $ac_status" >&5
5529  (exit "$ac_status"); } &&
5530         { ac_try='test -s "conftest.$ac_objext"'
5531  { (eval echo "$as_me:5531: \"$ac_try\"") >&5
5532  (eval $ac_try) 2>&5
5533  ac_status=$?
5534  echo "$as_me:5534: \$? = $ac_status" >&5
5535  (exit "$ac_status"); }; }; then
5536  ac_cv_type_mode_t=yes
5537else
5538  echo "$as_me: failed program was:" >&5
5539cat "conftest.$ac_ext" >&5
5540ac_cv_type_mode_t=no
5541fi
5542rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5543fi
5544echo "$as_me:5544: result: $ac_cv_type_mode_t" >&5
5545echo "${ECHO_T}$ac_cv_type_mode_t" >&6
5546if test "$ac_cv_type_mode_t" = yes; then
5547  :
5548else
5549
5550cat >>confdefs.h <<EOF
5551#define mode_t int
5552EOF
5553
5554fi
5555
5556echo "$as_me:5556: checking for pid_t" >&5
5557echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
5558if test "${ac_cv_type_pid_t+set}" = set; then
5559  echo $ECHO_N "(cached) $ECHO_C" >&6
5560else
5561  cat >"conftest.$ac_ext" <<_ACEOF
5562#line 5562 "configure"
5563#include "confdefs.h"
5564$ac_includes_default
5565int
5566main (void)
5567{
5568if ((pid_t *) 0)
5569  return 0;
5570if (sizeof (pid_t))
5571  return 0;
5572  ;
5573  return 0;
5574}
5575_ACEOF
5576rm -f "conftest.$ac_objext"
5577if { (eval echo "$as_me:5577: \"$ac_compile\"") >&5
5578  (eval $ac_compile) 2>&5
5579  ac_status=$?
5580  echo "$as_me:5580: \$? = $ac_status" >&5
5581  (exit "$ac_status"); } &&
5582         { ac_try='test -s "conftest.$ac_objext"'
5583  { (eval echo "$as_me:5583: \"$ac_try\"") >&5
5584  (eval $ac_try) 2>&5
5585  ac_status=$?
5586  echo "$as_me:5586: \$? = $ac_status" >&5
5587  (exit "$ac_status"); }; }; then
5588  ac_cv_type_pid_t=yes
5589else
5590  echo "$as_me: failed program was:" >&5
5591cat "conftest.$ac_ext" >&5
5592ac_cv_type_pid_t=no
5593fi
5594rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5595fi
5596echo "$as_me:5596: result: $ac_cv_type_pid_t" >&5
5597echo "${ECHO_T}$ac_cv_type_pid_t" >&6
5598if test "$ac_cv_type_pid_t" = yes; then
5599  :
5600else
5601
5602cat >>confdefs.h <<EOF
5603#define pid_t int
5604EOF
5605
5606fi
5607
5608echo "$as_me:5608: checking for uid_t in sys/types.h" >&5
5609echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
5610if test "${ac_cv_type_uid_t+set}" = set; then
5611  echo $ECHO_N "(cached) $ECHO_C" >&6
5612else
5613  cat >"conftest.$ac_ext" <<_ACEOF
5614#line 5614 "configure"
5615#include "confdefs.h"
5616#include <sys/types.h>
5617
5618_ACEOF
5619if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
5620  $EGREP "uid_t" >/dev/null 2>&1; then
5621  ac_cv_type_uid_t=yes
5622else
5623  ac_cv_type_uid_t=no
5624fi
5625rm -rf conftest*
5626
5627fi
5628echo "$as_me:5628: result: $ac_cv_type_uid_t" >&5
5629echo "${ECHO_T}$ac_cv_type_uid_t" >&6
5630if test $ac_cv_type_uid_t = no; then
5631
5632cat >>confdefs.h <<\EOF
5633#define uid_t int
5634EOF
5635
5636cat >>confdefs.h <<\EOF
5637#define gid_t int
5638EOF
5639
5640fi
5641
5642echo "$as_me:5642: checking for off_t" >&5
5643echo $ECHO_N "checking for off_t... $ECHO_C" >&6
5644if test "${ac_cv_type_off_t+set}" = set; then
5645  echo $ECHO_N "(cached) $ECHO_C" >&6
5646else
5647  cat >"conftest.$ac_ext" <<_ACEOF
5648#line 5648 "configure"
5649#include "confdefs.h"
5650$ac_includes_default
5651int
5652main (void)
5653{
5654if ((off_t *) 0)
5655  return 0;
5656if (sizeof (off_t))
5657  return 0;
5658  ;
5659  return 0;
5660}
5661_ACEOF
5662rm -f "conftest.$ac_objext"
5663if { (eval echo "$as_me:5663: \"$ac_compile\"") >&5
5664  (eval $ac_compile) 2>&5
5665  ac_status=$?
5666  echo "$as_me:5666: \$? = $ac_status" >&5
5667  (exit "$ac_status"); } &&
5668         { ac_try='test -s "conftest.$ac_objext"'
5669  { (eval echo "$as_me:5669: \"$ac_try\"") >&5
5670  (eval $ac_try) 2>&5
5671  ac_status=$?
5672  echo "$as_me:5672: \$? = $ac_status" >&5
5673  (exit "$ac_status"); }; }; then
5674  ac_cv_type_off_t=yes
5675else
5676  echo "$as_me: failed program was:" >&5
5677cat "conftest.$ac_ext" >&5
5678ac_cv_type_off_t=no
5679fi
5680rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5681fi
5682echo "$as_me:5682: result: $ac_cv_type_off_t" >&5
5683echo "${ECHO_T}$ac_cv_type_off_t" >&6
5684if test "$ac_cv_type_off_t" = yes; then
5685  :
5686else
5687
5688cat >>confdefs.h <<EOF
5689#define off_t long
5690EOF
5691
5692fi
5693
5694###	checks for library functions
5695
5696for ac_func in \
5697	gethostname \
5698	getusershell \
5699	endusershell \
5700	getlogin \
5701	initgroups \
5702	mkdtemp \
5703	putenv \
5704	unsetenv \
5705	sched_yield \
5706	setpgid \
5707	strftime \
5708	tcgetattr \
5709	waitpid \
5710	wcswidth \
5711	wcwidth
5712do
5713as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5714echo "$as_me:5714: checking for $ac_func" >&5
5715echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5716if eval "test \"\${$as_ac_var+set}\" = set"; then
5717  echo $ECHO_N "(cached) $ECHO_C" >&6
5718else
5719  cat >"conftest.$ac_ext" <<_ACEOF
5720#line 5720 "configure"
5721#include "confdefs.h"
5722#define $ac_func autoconf_temporary
5723#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5724#undef $ac_func
5725
5726#ifdef __cplusplus
5727extern "C"
5728#endif
5729
5730/* We use char because int might match the return type of a gcc2
5731   builtin and then its argument prototype would still apply.  */
5732char $ac_func (void);
5733
5734int
5735main (void)
5736{
5737
5738/* The GNU C library defines stubs for functions which it implements
5739    to always fail with ENOSYS.  Some functions are actually named
5740    something starting with __ and the normal name is an alias.  */
5741#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5742#error found stub for $ac_func
5743#endif
5744
5745	return $ac_func ();
5746  ;
5747  return 0;
5748}
5749_ACEOF
5750rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5751if { (eval echo "$as_me:5751: \"$ac_link\"") >&5
5752  (eval $ac_link) 2>&5
5753  ac_status=$?
5754  echo "$as_me:5754: \$? = $ac_status" >&5
5755  (exit "$ac_status"); } &&
5756         { ac_try='test -s "conftest$ac_exeext"'
5757  { (eval echo "$as_me:5757: \"$ac_try\"") >&5
5758  (eval $ac_try) 2>&5
5759  ac_status=$?
5760  echo "$as_me:5760: \$? = $ac_status" >&5
5761  (exit "$ac_status"); }; }; then
5762  eval "$as_ac_var=yes"
5763else
5764  echo "$as_me: failed program was:" >&5
5765cat "conftest.$ac_ext" >&5
5766eval "$as_ac_var=no"
5767fi
5768rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5769fi
5770echo "$as_me:5770: result: `eval echo '${'"$as_ac_var"'}'`" >&5
5771echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
5772if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
5773  cat >>confdefs.h <<EOF
5774#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5775EOF
5776
5777fi
5778done
5779
5780for ac_header in lastlog.h paths.h
5781do
5782as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5783echo "$as_me:5783: checking for $ac_header" >&5
5784echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5785if eval "test \"\${$as_ac_Header+set}\" = set"; then
5786  echo $ECHO_N "(cached) $ECHO_C" >&6
5787else
5788  cat >"conftest.$ac_ext" <<_ACEOF
5789#line 5789 "configure"
5790#include "confdefs.h"
5791#include <$ac_header>
5792_ACEOF
5793if { (eval echo "$as_me:5793: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5794  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5795  ac_status=$?
5796  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5797  rm -f conftest.er1
5798  cat conftest.err >&5
5799  echo "$as_me:5799: \$? = $ac_status" >&5
5800  (exit "$ac_status"); } >/dev/null; then
5801  if test -s conftest.err; then
5802    ac_cpp_err=$ac_c_preproc_warn_flag
5803  else
5804    ac_cpp_err=
5805  fi
5806else
5807  ac_cpp_err=yes
5808fi
5809if test -z "$ac_cpp_err"; then
5810  eval "$as_ac_Header=yes"
5811else
5812  echo "$as_me: failed program was:" >&5
5813  cat "conftest.$ac_ext" >&5
5814  eval "$as_ac_Header=no"
5815fi
5816rm -f conftest.err "conftest.$ac_ext"
5817fi
5818echo "$as_me:5818: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
5819echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
5820if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
5821  cat >>confdefs.h <<EOF
5822#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5823EOF
5824
5825fi
5826done
5827
5828echo "$as_me:5828: checking for lastlog path" >&5
5829echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
5830if test "${cf_cv_path_lastlog+set}" = set; then
5831  echo $ECHO_N "(cached) $ECHO_C" >&6
5832else
5833
5834cat >"conftest.$ac_ext" <<_ACEOF
5835#line 5835 "configure"
5836#include "confdefs.h"
5837
5838#include <sys/types.h>
5839#ifdef HAVE_LASTLOG_H
5840#include <lastlog.h>
5841#else
5842#ifdef HAVE_PATHS_H
5843#include <paths.h>
5844#endif
5845#endif
5846int
5847main (void)
5848{
5849char *path = _PATH_LASTLOG; (void)path
5850  ;
5851  return 0;
5852}
5853_ACEOF
5854rm -f "conftest.$ac_objext"
5855if { (eval echo "$as_me:5855: \"$ac_compile\"") >&5
5856  (eval $ac_compile) 2>&5
5857  ac_status=$?
5858  echo "$as_me:5858: \$? = $ac_status" >&5
5859  (exit "$ac_status"); } &&
5860         { ac_try='test -s "conftest.$ac_objext"'
5861  { (eval echo "$as_me:5861: \"$ac_try\"") >&5
5862  (eval $ac_try) 2>&5
5863  ac_status=$?
5864  echo "$as_me:5864: \$? = $ac_status" >&5
5865  (exit "$ac_status"); }; }; then
5866  cf_cv_path_lastlog="_PATH_LASTLOG"
5867else
5868  echo "$as_me: failed program was:" >&5
5869cat "conftest.$ac_ext" >&5
5870if test -f /usr/adm/lastlog ; then
5871	 	cf_cv_path_lastlog=/usr/adm/lastlog
5872	else
5873		cf_cv_path_lastlog=no
5874	fi
5875fi
5876rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5877
5878fi
5879echo "$as_me:5879: result: $cf_cv_path_lastlog" >&5
5880echo "${ECHO_T}$cf_cv_path_lastlog" >&6
5881test "$cf_cv_path_lastlog" != no &&
5882cat >>confdefs.h <<\EOF
5883#define USE_LASTLOG 1
5884EOF
5885
5886echo "$as_me:5886: checking for utmp implementation" >&5
5887echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
5888if test "${cf_cv_have_utmp+set}" = set; then
5889  echo $ECHO_N "(cached) $ECHO_C" >&6
5890else
5891
5892	cf_cv_have_utmp=no
5893for cf_header in utmpx utmp ; do
5894cf_utmp_includes="
5895#include <sys/types.h>
5896#include <${cf_header}.h>
5897#define getutent getutxent
5898#ifdef USE_LASTLOG
5899#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
5900#endif
5901"
5902	cat >"conftest.$ac_ext" <<_ACEOF
5903#line 5903 "configure"
5904#include "confdefs.h"
5905$cf_utmp_includes
5906int
5907main (void)
5908{
5909struct $cf_header x;
5910	 char *name = x.ut_name; /* utmp.h and compatible definitions */
5911	 (void)x;
5912	 (void)name;
5913
5914  ;
5915  return 0;
5916}
5917_ACEOF
5918rm -f "conftest.$ac_objext"
5919if { (eval echo "$as_me:5919: \"$ac_compile\"") >&5
5920  (eval $ac_compile) 2>&5
5921  ac_status=$?
5922  echo "$as_me:5922: \$? = $ac_status" >&5
5923  (exit "$ac_status"); } &&
5924         { ac_try='test -s "conftest.$ac_objext"'
5925  { (eval echo "$as_me:5925: \"$ac_try\"") >&5
5926  (eval $ac_try) 2>&5
5927  ac_status=$?
5928  echo "$as_me:5928: \$? = $ac_status" >&5
5929  (exit "$ac_status"); }; }; then
5930  cf_cv_have_utmp=$cf_header
5931	 break
5932else
5933  echo "$as_me: failed program was:" >&5
5934cat "conftest.$ac_ext" >&5
5935
5936	cat >"conftest.$ac_ext" <<_ACEOF
5937#line 5937 "configure"
5938#include "confdefs.h"
5939$cf_utmp_includes
5940int
5941main (void)
5942{
5943struct $cf_header x;
5944	 char *name = x.ut_user; /* utmpx.h must declare this */
5945	 (void)x;
5946	 (void)name;
5947
5948  ;
5949  return 0;
5950}
5951_ACEOF
5952rm -f "conftest.$ac_objext"
5953if { (eval echo "$as_me:5953: \"$ac_compile\"") >&5
5954  (eval $ac_compile) 2>&5
5955  ac_status=$?
5956  echo "$as_me:5956: \$? = $ac_status" >&5
5957  (exit "$ac_status"); } &&
5958         { ac_try='test -s "conftest.$ac_objext"'
5959  { (eval echo "$as_me:5959: \"$ac_try\"") >&5
5960  (eval $ac_try) 2>&5
5961  ac_status=$?
5962  echo "$as_me:5962: \$? = $ac_status" >&5
5963  (exit "$ac_status"); }; }; then
5964  cf_cv_have_utmp=$cf_header
5965	 break
5966
5967else
5968  echo "$as_me: failed program was:" >&5
5969cat "conftest.$ac_ext" >&5
5970fi
5971rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5972fi
5973rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5974done
5975
5976fi
5977echo "$as_me:5977: result: $cf_cv_have_utmp" >&5
5978echo "${ECHO_T}$cf_cv_have_utmp" >&6
5979
5980if test "$cf_cv_have_utmp" != no ; then
5981
5982cat >>confdefs.h <<\EOF
5983#define HAVE_UTMP 1
5984EOF
5985
5986	test "$cf_cv_have_utmp" = utmpx &&
5987cat >>confdefs.h <<\EOF
5988#define UTMPX_FOR_UTMP 1
5989EOF
5990
5991if test "$cf_cv_have_utmp" != no ; then
5992echo "$as_me:5992: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
5993echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
5994if test "${cf_cv_have_utmp_ut_host+set}" = set; then
5995  echo $ECHO_N "(cached) $ECHO_C" >&6
5996else
5997
5998	cat >"conftest.$ac_ext" <<_ACEOF
5999#line 5999 "configure"
6000#include "confdefs.h"
6001
6002#include <sys/types.h>
6003#include <${cf_cv_have_utmp}.h>
6004int
6005main (void)
6006{
6007struct $cf_cv_have_utmp x;
6008	 char *y = &x.ut_host[0];
6009	 (void)x;
6010	 (void)y
6011  ;
6012  return 0;
6013}
6014_ACEOF
6015rm -f "conftest.$ac_objext"
6016if { (eval echo "$as_me:6016: \"$ac_compile\"") >&5
6017  (eval $ac_compile) 2>&5
6018  ac_status=$?
6019  echo "$as_me:6019: \$? = $ac_status" >&5
6020  (exit "$ac_status"); } &&
6021         { ac_try='test -s "conftest.$ac_objext"'
6022  { (eval echo "$as_me:6022: \"$ac_try\"") >&5
6023  (eval $ac_try) 2>&5
6024  ac_status=$?
6025  echo "$as_me:6025: \$? = $ac_status" >&5
6026  (exit "$ac_status"); }; }; then
6027  cf_cv_have_utmp_ut_host=yes
6028else
6029  echo "$as_me: failed program was:" >&5
6030cat "conftest.$ac_ext" >&5
6031cf_cv_have_utmp_ut_host=no
6032fi
6033rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6034
6035fi
6036
6037echo "$as_me:6037: result: $cf_cv_have_utmp_ut_host" >&5
6038echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
6039test "$cf_cv_have_utmp_ut_host" != no &&
6040cat >>confdefs.h <<\EOF
6041#define HAVE_UTMP_UT_HOST 1
6042EOF
6043
6044fi
6045
6046if test "$cf_cv_have_utmp" != no ; then
6047echo "$as_me:6047: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
6048echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
6049if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
6050  echo $ECHO_N "(cached) $ECHO_C" >&6
6051else
6052
6053	cat >"conftest.$ac_ext" <<_ACEOF
6054#line 6054 "configure"
6055#include "confdefs.h"
6056
6057#include <sys/types.h>
6058#include <${cf_cv_have_utmp}.h>
6059int
6060main (void)
6061{
6062struct $cf_cv_have_utmp x;
6063	 int y = x.ut_syslen;
6064	 (void)x;
6065	 (void)y
6066  ;
6067  return 0;
6068}
6069_ACEOF
6070rm -f "conftest.$ac_objext"
6071if { (eval echo "$as_me:6071: \"$ac_compile\"") >&5
6072  (eval $ac_compile) 2>&5
6073  ac_status=$?
6074  echo "$as_me:6074: \$? = $ac_status" >&5
6075  (exit "$ac_status"); } &&
6076         { ac_try='test -s "conftest.$ac_objext"'
6077  { (eval echo "$as_me:6077: \"$ac_try\"") >&5
6078  (eval $ac_try) 2>&5
6079  ac_status=$?
6080  echo "$as_me:6080: \$? = $ac_status" >&5
6081  (exit "$ac_status"); }; }; then
6082  cf_cv_have_utmp_ut_syslen=yes
6083else
6084  echo "$as_me: failed program was:" >&5
6085cat "conftest.$ac_ext" >&5
6086cf_cv_have_utmp_ut_syslen=no
6087fi
6088rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6089
6090fi
6091
6092echo "$as_me:6092: result: $cf_cv_have_utmp_ut_syslen" >&5
6093echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
6094test "$cf_cv_have_utmp_ut_syslen" != no &&
6095cat >>confdefs.h <<\EOF
6096#define HAVE_UTMP_UT_SYSLEN 1
6097EOF
6098
6099fi
6100
6101if test "$cf_cv_have_utmp" != no ; then
6102echo "$as_me:6102: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
6103echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
6104if test "${cf_cv_have_utmp_ut_name+set}" = set; then
6105  echo $ECHO_N "(cached) $ECHO_C" >&6
6106else
6107
6108	cf_cv_have_utmp_ut_name=no
6109cf_utmp_includes="
6110#include <sys/types.h>
6111#include <${cf_cv_have_utmp}.h>
6112#define getutent getutxent
6113#ifdef USE_LASTLOG
6114#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
6115#endif
6116"
6117for cf_header in ut_name ut_user ; do
6118	cat >"conftest.$ac_ext" <<_ACEOF
6119#line 6119 "configure"
6120#include "confdefs.h"
6121$cf_utmp_includes
6122int
6123main (void)
6124{
6125struct $cf_cv_have_utmp x;
6126	 char *name = x.$cf_header;
6127	 (void)x;
6128	 (void)name;
6129
6130  ;
6131  return 0;
6132}
6133_ACEOF
6134rm -f "conftest.$ac_objext"
6135if { (eval echo "$as_me:6135: \"$ac_compile\"") >&5
6136  (eval $ac_compile) 2>&5
6137  ac_status=$?
6138  echo "$as_me:6138: \$? = $ac_status" >&5
6139  (exit "$ac_status"); } &&
6140         { ac_try='test -s "conftest.$ac_objext"'
6141  { (eval echo "$as_me:6141: \"$ac_try\"") >&5
6142  (eval $ac_try) 2>&5
6143  ac_status=$?
6144  echo "$as_me:6144: \$? = $ac_status" >&5
6145  (exit "$ac_status"); }; }; then
6146  cf_cv_have_utmp_ut_name=$cf_header
6147	 break
6148else
6149  echo "$as_me: failed program was:" >&5
6150cat "conftest.$ac_ext" >&5
6151fi
6152rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6153done
6154
6155fi
6156echo "$as_me:6156: result: $cf_cv_have_utmp_ut_name" >&5
6157echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
6158
6159case "$cf_cv_have_utmp_ut_name" in
6160(no)
6161	{ { echo "$as_me:6161: error: Cannot find declaration for ut.ut_name" >&5
6162echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
6163   { (exit 1); exit 1; }; }
6164	;;
6165(ut_user)
6166
6167cat >>confdefs.h <<\EOF
6168#define ut_name ut_user
6169EOF
6170
6171	;;
6172esac
6173fi
6174
6175if test "$cf_cv_have_utmp" != no ; then
6176echo "$as_me:6176: checking for exit-status in $cf_cv_have_utmp" >&5
6177echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
6178if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
6179  echo $ECHO_N "(cached) $ECHO_C" >&6
6180else
6181
6182for cf_result in \
6183	ut_exit.__e_exit \
6184	ut_exit.e_exit \
6185	ut_exit.ut_e_exit \
6186	ut_exit.ut_exit
6187do
6188cat >"conftest.$ac_ext" <<_ACEOF
6189#line 6189 "configure"
6190#include "confdefs.h"
6191
6192#include <sys/types.h>
6193#include <${cf_cv_have_utmp}.h>
6194int
6195main (void)
6196{
6197struct $cf_cv_have_utmp x;
6198	 long y = x.$cf_result = 0;
6199	 (void)x;
6200	 (void)y
6201  ;
6202  return 0;
6203}
6204_ACEOF
6205rm -f "conftest.$ac_objext"
6206if { (eval echo "$as_me:6206: \"$ac_compile\"") >&5
6207  (eval $ac_compile) 2>&5
6208  ac_status=$?
6209  echo "$as_me:6209: \$? = $ac_status" >&5
6210  (exit "$ac_status"); } &&
6211         { ac_try='test -s "conftest.$ac_objext"'
6212  { (eval echo "$as_me:6212: \"$ac_try\"") >&5
6213  (eval $ac_try) 2>&5
6214  ac_status=$?
6215  echo "$as_me:6215: \$? = $ac_status" >&5
6216  (exit "$ac_status"); }; }; then
6217  cf_cv_have_utmp_ut_xstatus=$cf_result
6218	 break
6219else
6220  echo "$as_me: failed program was:" >&5
6221cat "conftest.$ac_ext" >&5
6222cf_cv_have_utmp_ut_xstatus=no
6223fi
6224rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6225done
6226
6227fi
6228echo "$as_me:6228: result: $cf_cv_have_utmp_ut_xstatus" >&5
6229echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
6230if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
6231
6232cat >>confdefs.h <<\EOF
6233#define HAVE_UTMP_UT_XSTATUS 1
6234EOF
6235
6236cat >>confdefs.h <<EOF
6237#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
6238EOF
6239
6240fi
6241fi
6242
6243if test "$cf_cv_have_utmp" != no ; then
6244echo "$as_me:6244: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
6245echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
6246if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
6247  echo $ECHO_N "(cached) $ECHO_C" >&6
6248else
6249
6250	cat >"conftest.$ac_ext" <<_ACEOF
6251#line 6251 "configure"
6252#include "confdefs.h"
6253
6254#include <sys/types.h>
6255#include <${cf_cv_have_utmp}.h>
6256int
6257main (void)
6258{
6259struct $cf_cv_have_utmp x;
6260	 long y = x.ut_xtime = 0;
6261	 (void)x;
6262	 (void)y
6263  ;
6264  return 0;
6265}
6266_ACEOF
6267rm -f "conftest.$ac_objext"
6268if { (eval echo "$as_me:6268: \"$ac_compile\"") >&5
6269  (eval $ac_compile) 2>&5
6270  ac_status=$?
6271  echo "$as_me:6271: \$? = $ac_status" >&5
6272  (exit "$ac_status"); } &&
6273         { ac_try='test -s "conftest.$ac_objext"'
6274  { (eval echo "$as_me:6274: \"$ac_try\"") >&5
6275  (eval $ac_try) 2>&5
6276  ac_status=$?
6277  echo "$as_me:6277: \$? = $ac_status" >&5
6278  (exit "$ac_status"); }; }; then
6279  cf_cv_have_utmp_ut_xtime=yes
6280else
6281  echo "$as_me: failed program was:" >&5
6282cat "conftest.$ac_ext" >&5
6283cat >"conftest.$ac_ext" <<_ACEOF
6284#line 6284 "configure"
6285#include "confdefs.h"
6286
6287#include <sys/types.h>
6288#include <${cf_cv_have_utmp}.h>
6289int
6290main (void)
6291{
6292struct $cf_cv_have_utmp x;
6293	 long y = x.ut_tv.tv_sec;
6294	 (void)x;
6295	 (void)y
6296  ;
6297  return 0;
6298}
6299_ACEOF
6300rm -f "conftest.$ac_objext"
6301if { (eval echo "$as_me:6301: \"$ac_compile\"") >&5
6302  (eval $ac_compile) 2>&5
6303  ac_status=$?
6304  echo "$as_me:6304: \$? = $ac_status" >&5
6305  (exit "$ac_status"); } &&
6306         { ac_try='test -s "conftest.$ac_objext"'
6307  { (eval echo "$as_me:6307: \"$ac_try\"") >&5
6308  (eval $ac_try) 2>&5
6309  ac_status=$?
6310  echo "$as_me:6310: \$? = $ac_status" >&5
6311  (exit "$ac_status"); }; }; then
6312  cf_cv_have_utmp_ut_xtime=define
6313else
6314  echo "$as_me: failed program was:" >&5
6315cat "conftest.$ac_ext" >&5
6316cf_cv_have_utmp_ut_xtime=no
6317fi
6318rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6319
6320fi
6321rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6322
6323fi
6324echo "$as_me:6324: result: $cf_cv_have_utmp_ut_xtime" >&5
6325echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
6326if test "$cf_cv_have_utmp_ut_xtime" != no ; then
6327
6328cat >>confdefs.h <<\EOF
6329#define HAVE_UTMP_UT_XTIME 1
6330EOF
6331
6332	if test "$cf_cv_have_utmp_ut_xtime" = define ; then
6333
6334cat >>confdefs.h <<\EOF
6335#define ut_xtime ut_tv.tv_sec
6336EOF
6337
6338	fi
6339fi
6340fi
6341
6342if test "$cf_cv_have_utmp" != no ; then
6343echo "$as_me:6343: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
6344echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
6345if test "${cf_cv_have_utmp_ut_session+set}" = set; then
6346  echo $ECHO_N "(cached) $ECHO_C" >&6
6347else
6348
6349	cat >"conftest.$ac_ext" <<_ACEOF
6350#line 6350 "configure"
6351#include "confdefs.h"
6352
6353#include <sys/types.h>
6354#include <${cf_cv_have_utmp}.h>
6355int
6356main (void)
6357{
6358static struct $cf_cv_have_utmp x;
6359	 long y = x.ut_session;
6360	 (void)x;
6361	 (void)y
6362  ;
6363  return 0;
6364}
6365_ACEOF
6366rm -f "conftest.$ac_objext"
6367if { (eval echo "$as_me:6367: \"$ac_compile\"") >&5
6368  (eval $ac_compile) 2>&5
6369  ac_status=$?
6370  echo "$as_me:6370: \$? = $ac_status" >&5
6371  (exit "$ac_status"); } &&
6372         { ac_try='test -s "conftest.$ac_objext"'
6373  { (eval echo "$as_me:6373: \"$ac_try\"") >&5
6374  (eval $ac_try) 2>&5
6375  ac_status=$?
6376  echo "$as_me:6376: \$? = $ac_status" >&5
6377  (exit "$ac_status"); }; }; then
6378  cf_cv_have_utmp_ut_session=yes
6379else
6380  echo "$as_me: failed program was:" >&5
6381cat "conftest.$ac_ext" >&5
6382cf_cv_have_utmp_ut_session=no
6383fi
6384rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6385
6386fi
6387echo "$as_me:6387: result: $cf_cv_have_utmp_ut_session" >&5
6388echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
6389if test "$cf_cv_have_utmp_ut_session" != no ; then
6390
6391cat >>confdefs.h <<\EOF
6392#define HAVE_UTMP_UT_SESSION 1
6393EOF
6394
6395fi
6396fi
6397
6398echo "$as_me:6398: checking if $cf_cv_have_utmp is SYSV flavor" >&5
6399echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
6400if test "${cf_cv_sysv_utmp+set}" = set; then
6401  echo $ECHO_N "(cached) $ECHO_C" >&6
6402else
6403
6404test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
6405cat >"conftest.$ac_ext" <<_ACEOF
6406#line 6406 "configure"
6407#include "confdefs.h"
6408
6409#include <sys/types.h>
6410#include <${cf_cv_have_utmp}.h>
6411int
6412main (void)
6413{
6414
6415struct $cf_cv_have_utmp x;
6416	set${cf_prefix}ent ();
6417	get${cf_prefix}id(&x);
6418	put${cf_prefix}line(&x);
6419	end${cf_prefix}ent();
6420  ;
6421  return 0;
6422}
6423_ACEOF
6424rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6425if { (eval echo "$as_me:6425: \"$ac_link\"") >&5
6426  (eval $ac_link) 2>&5
6427  ac_status=$?
6428  echo "$as_me:6428: \$? = $ac_status" >&5
6429  (exit "$ac_status"); } &&
6430         { ac_try='test -s "conftest$ac_exeext"'
6431  { (eval echo "$as_me:6431: \"$ac_try\"") >&5
6432  (eval $ac_try) 2>&5
6433  ac_status=$?
6434  echo "$as_me:6434: \$? = $ac_status" >&5
6435  (exit "$ac_status"); }; }; then
6436  cf_cv_sysv_utmp=yes
6437else
6438  echo "$as_me: failed program was:" >&5
6439cat "conftest.$ac_ext" >&5
6440cf_cv_sysv_utmp=no
6441fi
6442rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6443
6444fi
6445echo "$as_me:6445: result: $cf_cv_sysv_utmp" >&5
6446echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
6447test "$cf_cv_sysv_utmp" = yes &&
6448cat >>confdefs.h <<\EOF
6449#define USE_SYSV_UTMP 1
6450EOF
6451
6452fi
6453
6454for ac_header in lastlog.h
6455do
6456as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6457echo "$as_me:6457: checking for $ac_header" >&5
6458echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6459if eval "test \"\${$as_ac_Header+set}\" = set"; then
6460  echo $ECHO_N "(cached) $ECHO_C" >&6
6461else
6462  cat >"conftest.$ac_ext" <<_ACEOF
6463#line 6463 "configure"
6464#include "confdefs.h"
6465#include <$ac_header>
6466_ACEOF
6467if { (eval echo "$as_me:6467: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6468  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6469  ac_status=$?
6470  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6471  rm -f conftest.er1
6472  cat conftest.err >&5
6473  echo "$as_me:6473: \$? = $ac_status" >&5
6474  (exit "$ac_status"); } >/dev/null; then
6475  if test -s conftest.err; then
6476    ac_cpp_err=$ac_c_preproc_warn_flag
6477  else
6478    ac_cpp_err=
6479  fi
6480else
6481  ac_cpp_err=yes
6482fi
6483if test -z "$ac_cpp_err"; then
6484  eval "$as_ac_Header=yes"
6485else
6486  echo "$as_me: failed program was:" >&5
6487  cat "conftest.$ac_ext" >&5
6488  eval "$as_ac_Header=no"
6489fi
6490rm -f conftest.err "conftest.$ac_ext"
6491fi
6492echo "$as_me:6492: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6493echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6494if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6495  cat >>confdefs.h <<EOF
6496#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6497EOF
6498
6499fi
6500done
6501
6502echo "$as_me:6502: checking for struct lastlog" >&5
6503echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
6504if test "${cf_cv_struct_lastlog+set}" = set; then
6505  echo $ECHO_N "(cached) $ECHO_C" >&6
6506else
6507
6508if test "$cross_compiling" = yes; then
6509
6510cf_cv_struct_lastlog=unknown
6511else
6512  cat >"conftest.$ac_ext" <<_ACEOF
6513#line 6513 "configure"
6514#include "confdefs.h"
6515
6516#include <sys/types.h>
6517#include <time.h>
6518#include <lastlog.h>
6519
6520int main(void)
6521{
6522	struct lastlog data;
6523	return (sizeof(data.ll_time) != sizeof(time_t));
6524}
6525_ACEOF
6526rm -f "conftest$ac_exeext"
6527if { (eval echo "$as_me:6527: \"$ac_link\"") >&5
6528  (eval $ac_link) 2>&5
6529  ac_status=$?
6530  echo "$as_me:6530: \$? = $ac_status" >&5
6531  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6532  { (eval echo "$as_me:6532: \"$ac_try\"") >&5
6533  (eval $ac_try) 2>&5
6534  ac_status=$?
6535  echo "$as_me:6535: \$? = $ac_status" >&5
6536  (exit "$ac_status"); }; }; then
6537
6538cf_cv_struct_lastlog=yes
6539else
6540  echo "$as_me: program exited with status $ac_status" >&5
6541echo "$as_me: failed program was:" >&5
6542cat "conftest.$ac_ext" >&5
6543
6544cf_cv_struct_lastlog=no
6545fi
6546rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6547fi
6548fi
6549echo "$as_me:6549: result: $cf_cv_struct_lastlog" >&5
6550echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
6551
6552test $cf_cv_struct_lastlog != no &&
6553cat >>confdefs.h <<\EOF
6554#define USE_STRUCT_LASTLOG 1
6555EOF
6556
6557for ac_header in \
6558sys/param.h \
6559
6560do
6561as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6562echo "$as_me:6562: checking for $ac_header" >&5
6563echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6564if eval "test \"\${$as_ac_Header+set}\" = set"; then
6565  echo $ECHO_N "(cached) $ECHO_C" >&6
6566else
6567  cat >"conftest.$ac_ext" <<_ACEOF
6568#line 6568 "configure"
6569#include "confdefs.h"
6570#include <$ac_header>
6571_ACEOF
6572if { (eval echo "$as_me:6572: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6573  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6574  ac_status=$?
6575  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6576  rm -f conftest.er1
6577  cat conftest.err >&5
6578  echo "$as_me:6578: \$? = $ac_status" >&5
6579  (exit "$ac_status"); } >/dev/null; then
6580  if test -s conftest.err; then
6581    ac_cpp_err=$ac_c_preproc_warn_flag
6582  else
6583    ac_cpp_err=
6584  fi
6585else
6586  ac_cpp_err=yes
6587fi
6588if test -z "$ac_cpp_err"; then
6589  eval "$as_ac_Header=yes"
6590else
6591  echo "$as_me: failed program was:" >&5
6592  cat "conftest.$ac_ext" >&5
6593  eval "$as_ac_Header=no"
6594fi
6595rm -f conftest.err "conftest.$ac_ext"
6596fi
6597echo "$as_me:6597: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6598echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6599if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6600  cat >>confdefs.h <<EOF
6601#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6602EOF
6603
6604fi
6605done
6606
6607echo "$as_me:6607: checking if POSIX saved-ids are supported" >&5
6608echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
6609if test "${cf_cv_posix_saved_ids+set}" = set; then
6610  echo $ECHO_N "(cached) $ECHO_C" >&6
6611else
6612
6613cat >"conftest.$ac_ext" <<_ACEOF
6614#line 6614 "configure"
6615#include "confdefs.h"
6616
6617#include <unistd.h>
6618#ifdef HAVE_SYS_PARAM_H
6619#include <sys/param.h>		/* this may define "BSD" */
6620#endif
6621
6622int
6623main (void)
6624{
6625
6626#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
6627	void *p = (void *) seteuid;
6628	int x = seteuid(geteuid());
6629	(void)p;
6630	(void)x;
6631#elif defined(BSD) && (BSD >= 199103)
6632/* The BSD's may implement the runtime check - and it fails.
6633 * However, saved-ids work almost like POSIX (close enough for most uses).
6634 */
6635#else
6636make an error
6637#endif
6638
6639  ;
6640  return 0;
6641}
6642_ACEOF
6643rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6644if { (eval echo "$as_me:6644: \"$ac_link\"") >&5
6645  (eval $ac_link) 2>&5
6646  ac_status=$?
6647  echo "$as_me:6647: \$? = $ac_status" >&5
6648  (exit "$ac_status"); } &&
6649         { ac_try='test -s "conftest$ac_exeext"'
6650  { (eval echo "$as_me:6650: \"$ac_try\"") >&5
6651  (eval $ac_try) 2>&5
6652  ac_status=$?
6653  echo "$as_me:6653: \$? = $ac_status" >&5
6654  (exit "$ac_status"); }; }; then
6655  cf_cv_posix_saved_ids=yes
6656
6657else
6658  echo "$as_me: failed program was:" >&5
6659cat "conftest.$ac_ext" >&5
6660
6661if test "$cross_compiling" = yes; then
6662  cf_cv_posix_saved_ids=unknown
6663else
6664  cat >"conftest.$ac_ext" <<_ACEOF
6665#line 6665 "configure"
6666#include "confdefs.h"
6667
6668#ifdef HAVE_STDLIB_H
6669#include <stdlib.h>
6670#endif
6671#include <unistd.h>
6672int main(void)
6673{
6674	void *p = (void *) seteuid;
6675	long code = sysconf(_SC_SAVED_IDS);
6676	(void)p;
6677	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
6678}
6679_ACEOF
6680rm -f "conftest$ac_exeext"
6681if { (eval echo "$as_me:6681: \"$ac_link\"") >&5
6682  (eval $ac_link) 2>&5
6683  ac_status=$?
6684  echo "$as_me:6684: \$? = $ac_status" >&5
6685  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6686  { (eval echo "$as_me:6686: \"$ac_try\"") >&5
6687  (eval $ac_try) 2>&5
6688  ac_status=$?
6689  echo "$as_me:6689: \$? = $ac_status" >&5
6690  (exit "$ac_status"); }; }; then
6691  cf_cv_posix_saved_ids=yes
6692else
6693  echo "$as_me: program exited with status $ac_status" >&5
6694echo "$as_me: failed program was:" >&5
6695cat "conftest.$ac_ext" >&5
6696cf_cv_posix_saved_ids=no
6697fi
6698rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6699fi
6700
6701fi
6702rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6703
6704fi
6705echo "$as_me:6705: result: $cf_cv_posix_saved_ids" >&5
6706echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
6707
6708test "$cf_cv_posix_saved_ids" = yes &&
6709cat >>confdefs.h <<\EOF
6710#define HAVE_POSIX_SAVED_IDS 1
6711EOF
6712
6713# compute a reasonable value for $TERM to give tgetent(), since we may be
6714# running in 'screen', which sets $TERMCAP to a specific entry that is not
6715# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
6716# discard $TERMCAP.
6717cf_TERMVAR=vt100
6718if test -n "$TERMCAP"
6719then
6720	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
6721	case "$cf_TERMCAP" in
6722	(screen*.*)
6723		;;
6724	(*)
6725		cf_TERMVAR="$cf_TERMCAP"
6726		;;
6727	esac
6728fi
6729test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
6730
6731# BSD termcap used no header file
6732# SVr4 provided termcap prototypes as a legacy feature in term.h
6733# GNU termcap provided termcap prototypes in termcap.h
6734# ncurses provides termcap prototypes in both term.h and termcap.h
6735#
6736# The terminfo-based termcap interfaces do not provide a full tgetent (i.e., do
6737# not return the text of the termcap entry in the buffer), but as a special
6738# case, FreeBSD provides ncurses' termcap.h with a modified termcap reader that
6739# returns the termcap text.
6740
6741for ac_header in termcap.h
6742do
6743as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6744echo "$as_me:6744: checking for $ac_header" >&5
6745echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6746if eval "test \"\${$as_ac_Header+set}\" = set"; then
6747  echo $ECHO_N "(cached) $ECHO_C" >&6
6748else
6749  cat >"conftest.$ac_ext" <<_ACEOF
6750#line 6750 "configure"
6751#include "confdefs.h"
6752#include <$ac_header>
6753_ACEOF
6754if { (eval echo "$as_me:6754: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6755  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6756  ac_status=$?
6757  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6758  rm -f conftest.er1
6759  cat conftest.err >&5
6760  echo "$as_me:6760: \$? = $ac_status" >&5
6761  (exit "$ac_status"); } >/dev/null; then
6762  if test -s conftest.err; then
6763    ac_cpp_err=$ac_c_preproc_warn_flag
6764  else
6765    ac_cpp_err=
6766  fi
6767else
6768  ac_cpp_err=yes
6769fi
6770if test -z "$ac_cpp_err"; then
6771  eval "$as_ac_Header=yes"
6772else
6773  echo "$as_me: failed program was:" >&5
6774  cat "conftest.$ac_ext" >&5
6775  eval "$as_ac_Header=no"
6776fi
6777rm -f conftest.err "conftest.$ac_ext"
6778fi
6779echo "$as_me:6779: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6780echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6781if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6782  cat >>confdefs.h <<EOF
6783#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6784EOF
6785
6786fi
6787done
6788
6789echo "$as_me:6789: checking if we want full tgetent function" >&5
6790echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
6791
6792# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
6793if test "${enable_full_tgetent+set}" = set; then
6794  enableval="$enable_full_tgetent"
6795  test "$enableval" != no && enableval=yes
6796	if test "$enableval" != "yes" ; then
6797    cf_full_tgetent=no
6798	else
6799		cf_full_tgetent=yes
6800	fi
6801else
6802  enableval=yes
6803	cf_full_tgetent=yes
6804
6805fi;
6806echo "$as_me:6806: result: $cf_full_tgetent" >&5
6807echo "${ECHO_T}$cf_full_tgetent" >&6
6808
6809if test "$cf_full_tgetent" = yes ; then
6810	cf_test_message="full tgetent"
6811else
6812	cf_test_message="tgetent"
6813fi
6814
6815echo "$as_me:6815: checking for $cf_test_message function" >&5
6816echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
6817if test "${cf_cv_lib_tgetent+set}" = set; then
6818  echo $ECHO_N "(cached) $ECHO_C" >&6
6819else
6820
6821cf_save_LIBS="$LIBS"
6822cf_cv_lib_tgetent=no
6823if test "$cf_full_tgetent" = yes ; then
6824	cf_TERMLIB="otermcap termcap termlib ncurses curses"
6825	cf_TERMTST="buffer[0] == 0"
6826else
6827	cf_TERMLIB="termlib ncurses curses"
6828	cf_TERMTST="0"
6829fi
6830for cf_termlib in '' $cf_TERMLIB ; do
6831	LIBS="$cf_save_LIBS"
6832	test -n "$cf_termlib" && {
6833cf_add_libs="$LIBS"
6834# reverse order
6835cf_add_0lib=
6836for cf_add_1lib in -l$cf_termlib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6837# filter duplicates
6838for cf_add_1lib in $cf_add_0lib; do
6839	for cf_add_2lib in $cf_add_libs; do
6840		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6841			cf_add_1lib=
6842			break
6843		fi
6844	done
6845	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6846done
6847LIBS="$cf_add_libs"
6848 }
6849	if test "$cross_compiling" = yes; then
6850  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
6851else
6852  cat >"conftest.$ac_ext" <<_ACEOF
6853#line 6853 "configure"
6854#include "confdefs.h"
6855
6856#ifdef HAVE_TERMCAP_H
6857#include <termcap.h>
6858#endif
6859/* terminfo implementations ignore the buffer argument, making it useless for
6860 * the xterm application, which uses this information to make a new TERMCAP
6861 * environment variable.
6862 */
6863int main(void)
6864{
6865	char buffer[1024];
6866	buffer[0] = 0;
6867	tgetent(buffer, "$cf_TERMVAR");
6868	${cf_cv_main_return:-return} ($cf_TERMTST); }
6869_ACEOF
6870rm -f "conftest$ac_exeext"
6871if { (eval echo "$as_me:6871: \"$ac_link\"") >&5
6872  (eval $ac_link) 2>&5
6873  ac_status=$?
6874  echo "$as_me:6874: \$? = $ac_status" >&5
6875  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
6876  { (eval echo "$as_me:6876: \"$ac_try\"") >&5
6877  (eval $ac_try) 2>&5
6878  ac_status=$?
6879  echo "$as_me:6879: \$? = $ac_status" >&5
6880  (exit "$ac_status"); }; }; then
6881  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
6882	 if test -n "$cf_termlib" ; then
6883	 	cf_cv_lib_tgetent="-l$cf_termlib"
6884	 else
6885	 	cf_cv_lib_tgetent=yes
6886	 fi
6887	 break
6888else
6889  echo "$as_me: program exited with status $ac_status" >&5
6890echo "$as_me: failed program was:" >&5
6891cat "conftest.$ac_ext" >&5
6892echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
6893fi
6894rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
6895fi
6896done
6897LIBS="$cf_save_LIBS"
6898
6899fi
6900echo "$as_me:6900: result: $cf_cv_lib_tgetent" >&5
6901echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
6902
6903# If we found a working tgetent(), set LIBS and check for termcap.h.
6904# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
6905# not have side effects other than setting the cache variable, because
6906# they are not executed when a cached value exists.)
6907if test "x$cf_cv_lib_tgetent" != xno ; then
6908	test "x$cf_cv_lib_tgetent" != xyes && {
6909cf_add_libs="$LIBS"
6910# reverse order
6911cf_add_0lib=
6912for cf_add_1lib in $cf_cv_lib_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
6913# filter duplicates
6914for cf_add_1lib in $cf_add_0lib; do
6915	for cf_add_2lib in $cf_add_libs; do
6916		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
6917			cf_add_1lib=
6918			break
6919		fi
6920	done
6921	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
6922done
6923LIBS="$cf_add_libs"
6924 }
6925
6926cat >>confdefs.h <<\EOF
6927#define USE_TERMCAP 1
6928EOF
6929
6930	if test "$cf_full_tgetent" = no ; then
6931		cat >"conftest.$ac_ext" <<_ACEOF
6932#line 6932 "configure"
6933#include "confdefs.h"
6934
6935#include <termcap.h>
6936int
6937main (void)
6938{
6939
6940#ifdef NCURSES_VERSION
6941make an error
6942#endif
6943  ;
6944  return 0;
6945}
6946_ACEOF
6947rm -f "conftest.$ac_objext"
6948if { (eval echo "$as_me:6948: \"$ac_compile\"") >&5
6949  (eval $ac_compile) 2>&5
6950  ac_status=$?
6951  echo "$as_me:6951: \$? = $ac_status" >&5
6952  (exit "$ac_status"); } &&
6953         { ac_try='test -s "conftest.$ac_objext"'
6954  { (eval echo "$as_me:6954: \"$ac_try\"") >&5
6955  (eval $ac_try) 2>&5
6956  ac_status=$?
6957  echo "$as_me:6957: \$? = $ac_status" >&5
6958  (exit "$ac_status"); }; }; then
6959  cat >>confdefs.h <<\EOF
6960#define HAVE_TERMCAP_H 1
6961EOF
6962
6963else
6964  echo "$as_me: failed program was:" >&5
6965cat "conftest.$ac_ext" >&5
6966fi
6967rm -f "conftest.$ac_objext" "conftest.$ac_ext"
6968	else
6969
6970for ac_header in termcap.h
6971do
6972as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6973echo "$as_me:6973: checking for $ac_header" >&5
6974echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6975if eval "test \"\${$as_ac_Header+set}\" = set"; then
6976  echo $ECHO_N "(cached) $ECHO_C" >&6
6977else
6978  cat >"conftest.$ac_ext" <<_ACEOF
6979#line 6979 "configure"
6980#include "confdefs.h"
6981#include <$ac_header>
6982_ACEOF
6983if { (eval echo "$as_me:6983: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6984  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6985  ac_status=$?
6986  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6987  rm -f conftest.er1
6988  cat conftest.err >&5
6989  echo "$as_me:6989: \$? = $ac_status" >&5
6990  (exit "$ac_status"); } >/dev/null; then
6991  if test -s conftest.err; then
6992    ac_cpp_err=$ac_c_preproc_warn_flag
6993  else
6994    ac_cpp_err=
6995  fi
6996else
6997  ac_cpp_err=yes
6998fi
6999if test -z "$ac_cpp_err"; then
7000  eval "$as_ac_Header=yes"
7001else
7002  echo "$as_me: failed program was:" >&5
7003  cat "conftest.$ac_ext" >&5
7004  eval "$as_ac_Header=no"
7005fi
7006rm -f conftest.err "conftest.$ac_ext"
7007fi
7008echo "$as_me:7008: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7009echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7010if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7011  cat >>confdefs.h <<EOF
7012#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7013EOF
7014
7015fi
7016done
7017
7018	fi
7019else
7020        # If we didn't find a tgetent() that supports the buffer
7021        # argument, look again to see whether we can find even
7022        # a crippled one.  A crippled tgetent() is still useful to
7023        # validate values for the TERM environment variable given to
7024        # child processes.
7025	echo "$as_me:7025: checking for partial tgetent function" >&5
7026echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
7027if test "${cf_cv_lib_part_tgetent+set}" = set; then
7028  echo $ECHO_N "(cached) $ECHO_C" >&6
7029else
7030
7031	cf_cv_lib_part_tgetent=no
7032	for cf_termlib in $cf_TERMLIB ; do
7033		LIBS="$cf_save_LIBS -l$cf_termlib"
7034		cat >"conftest.$ac_ext" <<_ACEOF
7035#line 7035 "configure"
7036#include "confdefs.h"
7037
7038int
7039main (void)
7040{
7041tgetent(0, "$cf_TERMVAR")
7042  ;
7043  return 0;
7044}
7045_ACEOF
7046rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7047if { (eval echo "$as_me:7047: \"$ac_link\"") >&5
7048  (eval $ac_link) 2>&5
7049  ac_status=$?
7050  echo "$as_me:7050: \$? = $ac_status" >&5
7051  (exit "$ac_status"); } &&
7052         { ac_try='test -s "conftest$ac_exeext"'
7053  { (eval echo "$as_me:7053: \"$ac_try\"") >&5
7054  (eval $ac_try) 2>&5
7055  ac_status=$?
7056  echo "$as_me:7056: \$? = $ac_status" >&5
7057  (exit "$ac_status"); }; }; then
7058  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
7059			 cf_cv_lib_part_tgetent="-l$cf_termlib"
7060			 break
7061else
7062  echo "$as_me: failed program was:" >&5
7063cat "conftest.$ac_ext" >&5
7064fi
7065rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7066	done
7067	LIBS="$cf_save_LIBS"
7068
7069fi
7070echo "$as_me:7070: result: $cf_cv_lib_part_tgetent" >&5
7071echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
7072
7073	if test "$cf_cv_lib_part_tgetent" != no ; then
7074
7075cf_add_libs="$LIBS"
7076# reverse order
7077cf_add_0lib=
7078for cf_add_1lib in $cf_cv_lib_part_tgetent; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
7079# filter duplicates
7080for cf_add_1lib in $cf_add_0lib; do
7081	for cf_add_2lib in $cf_add_libs; do
7082		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
7083			cf_add_1lib=
7084			break
7085		fi
7086	done
7087	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
7088done
7089LIBS="$cf_add_libs"
7090
7091for ac_header in termcap.h
7092do
7093as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7094echo "$as_me:7094: checking for $ac_header" >&5
7095echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7096if eval "test \"\${$as_ac_Header+set}\" = set"; then
7097  echo $ECHO_N "(cached) $ECHO_C" >&6
7098else
7099  cat >"conftest.$ac_ext" <<_ACEOF
7100#line 7100 "configure"
7101#include "confdefs.h"
7102#include <$ac_header>
7103_ACEOF
7104if { (eval echo "$as_me:7104: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7105  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7106  ac_status=$?
7107  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7108  rm -f conftest.er1
7109  cat conftest.err >&5
7110  echo "$as_me:7110: \$? = $ac_status" >&5
7111  (exit "$ac_status"); } >/dev/null; then
7112  if test -s conftest.err; then
7113    ac_cpp_err=$ac_c_preproc_warn_flag
7114  else
7115    ac_cpp_err=
7116  fi
7117else
7118  ac_cpp_err=yes
7119fi
7120if test -z "$ac_cpp_err"; then
7121  eval "$as_ac_Header=yes"
7122else
7123  echo "$as_me: failed program was:" >&5
7124  cat "conftest.$ac_ext" >&5
7125  eval "$as_ac_Header=no"
7126fi
7127rm -f conftest.err "conftest.$ac_ext"
7128fi
7129echo "$as_me:7129: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
7130echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
7131if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
7132  cat >>confdefs.h <<EOF
7133#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7134EOF
7135
7136fi
7137done
7138
7139                # If this is linking against ncurses, we'll trigger the
7140                # ifdef in resize.c that turns the termcap stuff back off.
7141
7142cat >>confdefs.h <<\EOF
7143#define USE_TERMINFO 1
7144EOF
7145
7146	fi
7147fi
7148
7149echo "$as_me:7149: checking for X applications class" >&5
7150echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
7151
7152# Check whether --with-app-class or --without-app-class was given.
7153if test "${with_app_class+set}" = set; then
7154  withval="$with_app_class"
7155  APP_CLASS=$withval
7156else
7157  APP_CLASS=XTerm
7158fi;
7159
7160case x$APP_CLASS in
7161(*[/@,%]*)
7162	{ echo "$as_me:7162: WARNING: X applications class cannot contain punctuation" >&5
7163echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
7164	APP_CLASS=XTerm
7165	;;
7166(x[A-Z]*)
7167	;;
7168(*)
7169	{ echo "$as_me:7169: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
7170echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
7171	APP_CLASS=XTerm
7172	;;
7173esac
7174
7175echo "$as_me:7175: result: $APP_CLASS" >&5
7176echo "${ECHO_T}$APP_CLASS" >&6
7177
7178echo "$as_me:7178: checking for directory to install resource files" >&5
7179echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
7180
7181# Check whether --with-app-defaults or --without-app-defaults was given.
7182if test "${with_app_defaults+set}" = set; then
7183  withval="$with_app_defaults"
7184  APPSDIR=$withval
7185else
7186  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7187fi;
7188
7189if test "x$APPSDIR" = xauto
7190then
7191	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
7192	for cf_path in \
7193		/opt/local/share/X11/app-defaults \
7194		/opt/X11/share/X11/app-defaults \
7195		/usr/share/X11/app-defaults \
7196		/usr/X11/share/X11/app-defaults \
7197		/usr/X11/lib/X11/app-defaults \
7198		/usr/lib/X11/app-defaults \
7199		/etc/X11/app-defaults \
7200		/usr/pkg/lib/X11/app-defaults \
7201		/usr/X11R7/lib/X11/app-defaults \
7202		/usr/X11R6/lib/X11/app-defaults \
7203		/usr/X11R5/lib/X11/app-defaults \
7204		/usr/X11R4/lib/X11/app-defaults \
7205		/usr/local/lib/X11/app-defaults \
7206		/usr/local/share/X11/app-defaults \
7207		/usr/lib64/X11/app-defaults
7208	do
7209		if test -d "$cf_path" ; then
7210			APPSDIR="$cf_path"
7211			break
7212		fi
7213	done
7214else
7215	cf_path=$APPSDIR
7216
7217if test "x$prefix" != xNONE; then
7218	cf_path_syntax="$prefix"
7219else
7220	cf_path_syntax="$ac_default_prefix"
7221fi
7222
7223case ".$cf_path" in
7224(.\$\(*\)*|.\'*\'*)
7225	;;
7226(..|./*|.\\*)
7227	;;
7228(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7229	;;
7230(.\$\{*prefix\}*|.\$\{*dir\}*)
7231	eval cf_path="$cf_path"
7232	case ".$cf_path" in
7233	(.NONE/*)
7234		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7235		;;
7236	esac
7237	;;
7238(.no|.NONE/*)
7239	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7240	;;
7241(*)
7242	{ { echo "$as_me:7242: error: expected a pathname, not \"$cf_path\"" >&5
7243echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7244   { (exit 1); exit 1; }; }
7245	;;
7246esac
7247
7248fi
7249
7250echo "$as_me:7250: result: $APPSDIR" >&5
7251echo "${ECHO_T}$APPSDIR" >&6
7252
7253no_appsdir=
7254if test "$APPSDIR" = no
7255then
7256	no_appsdir="#"
7257else
7258	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
7259fi
7260
7261echo "$as_me:7261: checking for the icon name" >&5
7262echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
7263
7264# Check whether --with-icon-name or --without-icon-name was given.
7265if test "${with_icon_name+set}" = set; then
7266  withval="$with_icon_name"
7267  ICON_NAME="$withval"
7268else
7269  ICON_NAME=mini.xterm
7270fi;
7271case "x$ICON_NAME" in
7272(xyes|xno|x)
7273	ICON_NAME=mini.xterm
7274	;;
7275esac
7276
7277echo "$as_me:7277: result: $ICON_NAME" >&5
7278echo "${ECHO_T}$ICON_NAME" >&6
7279
7280echo "$as_me:7280: checking for icon symlink to use" >&5
7281echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
7282
7283# Check whether --with-icon-symlink or --without-icon-symlink was given.
7284if test "${with_icon_symlink+set}" = set; then
7285  withval="$with_icon_symlink"
7286  ICON_SYMLINK="$withval"
7287else
7288  ICON_SYMLINK=NONE
7289fi;
7290case "x$ICON_SYMLINK" in
7291(xyes)
7292	ICON_SYMLINK=xterm
7293	;;
7294(xno|x)
7295	ICON_SYMLINK=NONE
7296	;;
7297esac
7298
7299echo "$as_me:7299: result: $ICON_SYMLINK" >&5
7300echo "${ECHO_T}$ICON_SYMLINK" >&6
7301
7302# Install all icons except for the overused "terminal".
7303cf_cv_icon_list=
7304for my_item in $srcdir/icons/*.svg
7305do
7306	test -f "$my_item" || continue
7307	cf_icon_name=`echo "$my_item" |sed -e "s,.svg,," -e "s,^$srcdir/,,"`
7308	case $cf_icon_name in
7309	(*_48x48)
7310		continue
7311		;;
7312	esac
7313	test -n "$verbose" && echo "	adding $cf_icon_name to icon-list" 1>&6
7314
7315echo "${as_me:-configure}:7315: testing adding $cf_icon_name to icon-list ..." 1>&5
7316
7317	cf_cv_icon_list="$cf_cv_icon_list $cf_icon_name"
7318	if test -f "${cf_icon_name}_48x48.png"
7319	then
7320		test -n "$verbose" && echo "	adding ${cf_icon_name}_48x48 to icon-list" 1>&6
7321
7322echo "${as_me:-configure}:7322: testing adding ${cf_icon_name}_48x48 to icon-list ..." 1>&5
7323
7324		cf_cv_icon_list="$cf_cv_icon_list ${cf_icon_name}_48x48"
7325	fi
7326done
7327
7328echo "$as_me:7328: checking for directory to install pixmaps" >&5
7329echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
7330
7331# Check whether --with-pixmapdir or --without-pixmapdir was given.
7332if test "${with_pixmapdir+set}" = set; then
7333  withval="$with_pixmapdir"
7334  PIXMAPDIR=$withval
7335else
7336  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
7337fi;
7338
7339if test "x$PIXMAPDIR" = xauto
7340then
7341	PIXMAPDIR='${datadir}/pixmaps'
7342	for cf_path in \
7343		/usr/share/pixmaps \
7344		/usr/X11R6/share/pixmaps
7345	do
7346		if test -d "$cf_path" ; then
7347			PIXMAPDIR="$cf_path"
7348			break
7349		fi
7350	done
7351else
7352	cf_path=$PIXMAPDIR
7353
7354if test "x$prefix" != xNONE; then
7355	cf_path_syntax="$prefix"
7356else
7357	cf_path_syntax="$ac_default_prefix"
7358fi
7359
7360case ".$cf_path" in
7361(.\$\(*\)*|.\'*\'*)
7362	;;
7363(..|./*|.\\*)
7364	;;
7365(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7366	;;
7367(.\$\{*prefix\}*|.\$\{*dir\}*)
7368	eval cf_path="$cf_path"
7369	case ".$cf_path" in
7370	(.NONE/*)
7371		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7372		;;
7373	esac
7374	;;
7375(.no|.NONE/*)
7376	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7377	;;
7378(*)
7379	{ { echo "$as_me:7379: error: expected a pathname, not \"$cf_path\"" >&5
7380echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7381   { (exit 1); exit 1; }; }
7382	;;
7383esac
7384
7385fi
7386echo "$as_me:7386: result: $PIXMAPDIR" >&5
7387echo "${ECHO_T}$PIXMAPDIR" >&6
7388
7389no_pixmapdir=
7390if test "$PIXMAPDIR" = no
7391then
7392	no_pixmapdir="#"
7393else
7394	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
7395fi
7396
7397echo "$as_me:7397: checking for directory to install icons" >&5
7398echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
7399
7400# Check whether --with-icondir or --without-icondir was given.
7401if test "${with_icondir+set}" = set; then
7402  withval="$with_icondir"
7403  ICONDIR=$withval
7404else
7405  test -z "$ICONDIR" && ICONDIR=no
7406fi;
7407
7408if test "x$ICONDIR" = xauto
7409then
7410	ICONDIR='${datadir}/icons'
7411	for cf_path in \
7412		/usr/share/icons \
7413		/usr/X11R6/share/icons
7414	do
7415		if test -d "$cf_path" ; then
7416			ICONDIR="$cf_path"
7417			break
7418		fi
7419	done
7420else
7421	cf_path=$ICONDIR
7422
7423if test "x$prefix" != xNONE; then
7424	cf_path_syntax="$prefix"
7425else
7426	cf_path_syntax="$ac_default_prefix"
7427fi
7428
7429case ".$cf_path" in
7430(.\$\(*\)*|.\'*\'*)
7431	;;
7432(..|./*|.\\*)
7433	;;
7434(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7435	;;
7436(.\$\{*prefix\}*|.\$\{*dir\}*)
7437	eval cf_path="$cf_path"
7438	case ".$cf_path" in
7439	(.NONE/*)
7440		cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7441		;;
7442	esac
7443	;;
7444(.no|.NONE/*)
7445	cf_path=`echo "$cf_path" | sed -e s%NONE%$cf_path_syntax%`
7446	;;
7447(*)
7448	{ { echo "$as_me:7448: error: expected a pathname, not \"$cf_path\"" >&5
7449echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
7450   { (exit 1); exit 1; }; }
7451	;;
7452esac
7453
7454fi
7455echo "$as_me:7455: result: $ICONDIR" >&5
7456echo "${ECHO_T}$ICONDIR" >&6
7457
7458no_icondir=
7459if test "$ICONDIR" = no
7460then
7461	no_icondir="#"
7462else
7463	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
7464fi
7465
7466echo "$as_me:7466: checking if icon theme should be used" >&5
7467echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
7468
7469# Check whether --with-icon-theme or --without-icon-theme was given.
7470if test "${with_icon_theme+set}" = set; then
7471  withval="$with_icon_theme"
7472  ICON_THEME=$withval
7473else
7474  ICON_THEME=no
7475fi;
7476
7477case "x$ICON_THEME" in
7478(xno)
7479	;;
7480(x|xyes)
7481	ICON_THEME=hicolor
7482	;;
7483esac
7484echo "$as_me:7484: result: $ICON_THEME" >&5
7485echo "${ECHO_T}$ICON_THEME" >&6
7486
7487if test "x$ICON_THEME" = xno
7488then
7489	if test "x$ICONDIR" != xno
7490	then
7491		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
7492
7493echo "${as_me:-configure}:7493: testing ignoring icondir without theme ..." 1>&5
7494
7495		no_icondir="#"
7496	fi
7497else
7498	if test "x$ICONDIR" = xno
7499	then
7500		{ { echo "$as_me:7500: error: icondir must be set for icon theme" >&5
7501echo "$as_me: error: icondir must be set for icon theme" >&2;}
7502   { (exit 1); exit 1; }; }
7503	fi
7504fi
7505
7506: ${ICON_FORMAT:=".svg .png .xpm"}
7507
7508ICON_LIST=
7509
7510if test "x$ICON_THEME" != xno
7511then
7512	cf_icon_list="$cf_cv_icon_list"
7513else
7514	cf_icon_list="icons/${ICON_NAME}_48x48"
7515fi
7516
7517echo "$as_me:7517: checking for icon(s) to install" >&5
7518echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
7519for cf_name in $cf_icon_list
7520do
7521	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
7522
7523echo "${as_me:-configure}:7523: testing using $ICON_FORMAT ..." 1>&5
7524
7525	for cf_suffix in $ICON_FORMAT
7526	do
7527		cf_icon="${cf_name}${cf_suffix}"
7528		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7529		if test ! -f "${cf_left}"
7530		then
7531			if test "x$srcdir" != "x."
7532			then
7533				cf_icon="${srcdir}/${cf_left}"
7534				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
7535				if test ! -f "${cf_left}"
7536				then
7537					continue
7538				fi
7539			else
7540				continue
7541			fi
7542		fi
7543		if test "x$ICON_THEME" != xno
7544		then
7545			cf_base=`basename "$cf_left"`
7546			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
7547			case "x${cf_base}" in
7548			(*:*)
7549				cf_next=$cf_base
7550				# user-defined mapping
7551				;;
7552			(*.png)
7553				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'`
7554				if test -z "$cf_size"
7555				then
7556					{ echo "$as_me:7556: WARNING: cannot determine size of $cf_left" >&5
7557echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
7558					continue
7559				fi
7560				cf_next="$cf_size/apps/$cf_trim"
7561				;;
7562			(*.svg)
7563				cf_next="scalable/apps/$cf_trim"
7564				;;
7565			(*.xpm)
7566				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
7567
7568echo "${as_me:-configure}:7568: testing ignored XPM file in icon theme ..." 1>&5
7569
7570				continue
7571				;;
7572			(*_[0-9][0-9]*x[0-9][0-9]*.*)
7573				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
7574				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
7575				cf_next="$cf_size/apps/$cf_base"
7576				;;
7577			esac
7578			test -n "$verbose" && echo "	adding $cf_next" 1>&6
7579
7580echo "${as_me:-configure}:7580: testing adding $cf_next ..." 1>&5
7581
7582			cf_icon="${cf_icon}:${cf_next}"
7583		fi
7584		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
7585		ICON_LIST="$ICON_LIST${cf_icon}"
7586		if test -z "$ICON_NAME"
7587		then
7588			ICON_NAME=`basename "$cf_icon" | sed -e 's/[.:].*//'`
7589		fi
7590	done
7591done
7592
7593if test -n "$verbose"
7594then
7595	echo "$as_me:7595: checking result" >&5
7596echo $ECHO_N "checking result... $ECHO_C" >&6
7597fi
7598echo "$as_me:7598: result: $ICON_LIST" >&5
7599echo "${ECHO_T}$ICON_LIST" >&6
7600
7601if test -z "$ICON_LIST"
7602then
7603	{ { echo "$as_me:7603: error: no icons found" >&5
7604echo "$as_me: error: no icons found" >&2;}
7605   { (exit 1); exit 1; }; }
7606fi
7607
7608echo "$as_me:7608: checking for icon name" >&5
7609echo $ECHO_N "checking for icon name... $ECHO_C" >&6
7610echo "$as_me:7610: result: $ICON_NAME" >&5
7611echo "${ECHO_T}$ICON_NAME" >&6
7612
7613# Comment-out the install-desktop rule if the desktop-utils are not found.
7614echo "$as_me:7614: checking if you want to install desktop files" >&5
7615echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
7616
7617# Check whether --enable-desktop or --disable-desktop was given.
7618if test "${enable_desktop+set}" = set; then
7619  enableval="$enable_desktop"
7620  test "$enableval" != no && enableval=yes
7621	if test "$enableval" != "yes" ; then
7622    enable_desktop=$enableval
7623	else
7624		enable_desktop=$enableval
7625	fi
7626else
7627  enableval=yes
7628	enable_desktop=$enableval
7629
7630fi;
7631echo "$as_me:7631: result: $enable_desktop" >&5
7632echo "${ECHO_T}$enable_desktop" >&6
7633
7634desktop_utils=
7635if test "$enable_desktop" = yes ; then
7636# Extract the first word of "desktop-file-install", so it can be a program name with args.
7637set dummy desktop-file-install; ac_word=$2
7638echo "$as_me:7638: checking for $ac_word" >&5
7639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7640if test "${ac_cv_prog_desktop_utils+set}" = set; then
7641  echo $ECHO_N "(cached) $ECHO_C" >&6
7642else
7643  if test -n "$desktop_utils"; then
7644  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
7645else
7646  ac_save_IFS=$IFS; IFS=$ac_path_separator
7647ac_dummy="$PATH"
7648for ac_dir in $ac_dummy; do
7649  IFS=$ac_save_IFS
7650  test -z "$ac_dir" && ac_dir=.
7651  $as_executable_p "$ac_dir/$ac_word" || continue
7652ac_cv_prog_desktop_utils="yes"
7653echo "$as_me:7653: found $ac_dir/$ac_word" >&5
7654break
7655done
7656
7657  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
7658fi
7659fi
7660desktop_utils=$ac_cv_prog_desktop_utils
7661if test -n "$desktop_utils"; then
7662  echo "$as_me:7662: result: $desktop_utils" >&5
7663echo "${ECHO_T}$desktop_utils" >&6
7664else
7665  echo "$as_me:7665: result: no" >&5
7666echo "${ECHO_T}no" >&6
7667fi
7668
7669fi
7670
7671test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
7672
7673if test -z "$desktop_utils"
7674then
7675	echo "$as_me:7675: checking for requested desktop-category" >&5
7676echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
7677
7678# Check whether --with-desktop-category or --without-desktop-category was given.
7679if test "${with_desktop_category+set}" = set; then
7680  withval="$with_desktop_category"
7681  cf_desktop_want=$withval
7682else
7683  cf_desktop_want=auto
7684fi;
7685	echo "$as_me:7685: result: $cf_desktop_want" >&5
7686echo "${ECHO_T}$cf_desktop_want" >&6
7687
7688	if test "$cf_desktop_want" = auto
7689	then
7690		rm -rf conftest*
7691		cf_desktop_also=
7692		for cf_desktop_dir in  \
7693			/usr/share/app-install \
7694			/usr/share/applications
7695		do
7696			if test -d $cf_desktop_dir
7697			then
7698				find $cf_desktop_dir -name '*.desktop' | \
7699				while true
7700				do
7701					read cf_desktop_path
7702					test -z "$cf_desktop_path" && break
7703					cf_desktop_name=`basename "$cf_desktop_path" .desktop`
7704					case $cf_desktop_name in
7705					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
7706						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
7707
7708echo "${as_me:-configure}:7708: testing inspect $cf_desktop_path ..." 1>&5
7709
7710						${EGREP-egrep} '^Categories=' "$cf_desktop_path" | \
7711							tr ';' '\n' | \
7712							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
7713						;;
7714					esac
7715				done
7716			fi
7717		done
7718		if test -s conftest.1
7719		then
7720			cf_desktop_last=
7721			sort conftest.1 | \
7722			while true
7723			do
7724				read cf_desktop_this
7725				test -z "$cf_desktop_this" && break
7726				if test -s conftest.2
7727				then
7728					grep -w "$cf_desktop_this" conftest.2 >/dev/null && continue
7729				elif test -s conftest.3
7730				then
7731					grep -w "$cf_desktop_this" conftest.3 >/dev/null && continue
7732				fi
7733				case "$cf_desktop_this" in
7734				(-*)
7735					;;
7736				(Qt*|*Xfce*|*[ABCDEFGHIJKLMNOPQRSTUVWXYZ][ABCDEFGHIJKLMNOPQRSTUVWXYZ]*)
7737					test -n "$verbose" && echo "	ignored $cf_desktop_this" 1>&6
7738
7739echo "${as_me:-configure}:7739: testing ignored $cf_desktop_this ..." 1>&5
7740
7741					echo "$cf_desktop_this" >> conftest.3
7742					;;
7743				(System|TerminalEmulator|*)
7744					test -n "$verbose" && echo "	applied $cf_desktop_this" 1>&6
7745
7746echo "${as_me:-configure}:7746: testing applied $cf_desktop_this ..." 1>&5
7747
7748					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo "$cf_desktop_this" >>conftest.2
7749					;;
7750				esac
7751				cf_desktop_last=$cf_desktop_this
7752			done
7753			cf_desktop_want="`tr '\n' ';' < conftest.2`"
7754		fi
7755		if test -n "$cf_desktop_want"
7756		then
7757			if test "$cf_desktop_want" = auto
7758			then
7759				cf_desktop_want=
7760			else
7761				# do a sanity check on the semicolon-separated list, ignore on failure
7762				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
7763				test -z "$cf_desktop_test" && cf_desktop_want=
7764				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
7765				test -z "$cf_desktop_test" && cf_desktop_want=
7766			fi
7767		fi
7768		if test -z "$cf_desktop_want"
7769		then
7770			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
7771			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
7772
7773echo "${as_me:-configure}:7773: testing no usable value found for desktop category ..." 1>&5
7774
7775		fi
7776	fi
7777	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
7778	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
7779
7780echo "${as_me:-configure}:7780: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
7781
7782fi
7783
7784echo "$as_me:7784: checking for install-permissions reference" >&5
7785echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
7786
7787# Check whether --with-reference or --without-reference was given.
7788if test "${with_reference+set}" = set; then
7789  withval="$with_reference"
7790  with_reference=$withval
7791else
7792  with_reference=xterm
7793fi;
7794echo "$as_me:7794: result: $with_reference" >&5
7795echo "${ECHO_T}$with_reference" >&6
7796
7797with_full_paths=yes
7798
7799	echo "$as_me:7799: checking for PATH separator" >&5
7800echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7801	case "$cf_cv_system_name" in
7802	(os2*)	PATH_SEPARATOR=';'  ;;
7803	(*)	${PATH_SEPARATOR:=':'}  ;;
7804	esac
7805
7806	echo "$as_me:7806: result: $PATH_SEPARATOR" >&5
7807echo "${ECHO_T}$PATH_SEPARATOR" >&6
7808
7809test -z "$XTERM_PATH" && XTERM_PATH="$with_reference"
7810for ac_prog in $XTERM_PATH $with_reference
7811do
7812  # Extract the first word of "$ac_prog", so it can be a program name with args.
7813set dummy $ac_prog; ac_word=$2
7814echo "$as_me:7814: checking for $ac_word" >&5
7815echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7816if test "${ac_cv_path_XTERM_PATH+set}" = set; then
7817  echo $ECHO_N "(cached) $ECHO_C" >&6
7818else
7819  case $XTERM_PATH in
7820  [\\/]* | ?:[\\/]*)
7821  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
7822  ;;
7823  *)
7824  ac_save_IFS=$IFS; IFS=$ac_path_separator
7825ac_dummy="$PATH"
7826for ac_dir in $ac_dummy; do
7827  IFS=$ac_save_IFS
7828  test -z "$ac_dir" && ac_dir=.
7829  if $as_executable_p "$ac_dir/$ac_word"; then
7830   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
7831   echo "$as_me:7831: found $ac_dir/$ac_word" >&5
7832   break
7833fi
7834done
7835
7836  ;;
7837esac
7838fi
7839XTERM_PATH=$ac_cv_path_XTERM_PATH
7840
7841if test -n "$XTERM_PATH"; then
7842  echo "$as_me:7842: result: $XTERM_PATH" >&5
7843echo "${ECHO_T}$XTERM_PATH" >&6
7844else
7845  echo "$as_me:7845: result: no" >&5
7846echo "${ECHO_T}no" >&6
7847fi
7848
7849  test -n "$XTERM_PATH" && break
7850done
7851test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
7852
7853cf_path_prog=""
7854cf_path_args=""
7855IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
7856for cf_temp in $ac_cv_path_XTERM_PATH
7857do
7858	if test -z "$cf_path_prog" ; then
7859		if test "$with_full_paths" = yes ; then
7860
7861if test "x$prefix" != xNONE; then
7862	cf_path_syntax="$prefix"
7863else
7864	cf_path_syntax="$ac_default_prefix"
7865fi
7866
7867case ".$cf_temp" in
7868(.\$\(*\)*|.\'*\'*)
7869	;;
7870(..|./*|.\\*)
7871	;;
7872(.[a-zA-Z]:[\\/]*) # OS/2 EMX
7873	;;
7874(.\$\{*prefix\}*|.\$\{*dir\}*)
7875	eval cf_temp="$cf_temp"
7876	case ".$cf_temp" in
7877	(.NONE/*)
7878		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7879		;;
7880	esac
7881	;;
7882(.no|.NONE/*)
7883	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
7884	;;
7885(*)
7886	break
7887	;;
7888esac
7889
7890			cf_path_prog="$cf_temp"
7891		else
7892			cf_path_prog="`basename "$cf_temp"`"
7893		fi
7894	elif test -z "$cf_path_args" ; then
7895		cf_path_args="$cf_temp"
7896	else
7897		cf_path_args="$cf_path_args $cf_temp"
7898	fi
7899done
7900IFS="$cf_save_ifs"
7901
7902if test -n "$cf_path_prog" ; then
7903
7904echo "${as_me:-configure}:7904: testing defining path for ${cf_path_prog} ..." 1>&5
7905
7906cat >>confdefs.h <<EOF
7907#define XTERM_PATH_PATH "$cf_path_prog"
7908EOF
7909
7910	test -n "$cf_path_args" &&
7911cat >>confdefs.h <<EOF
7912#define XTERM_PATH_ARGS "$cf_path_args"
7913EOF
7914
7915fi
7916
7917# If any of --program-prefix, --program-suffix or --program-transform-name is
7918# given, accept an option tell the makefile to create a symbolic link, e.g.,
7919# to "xterm" on install.
7920XTERM_SYMLINK=NONE
7921
7922if test "$program_transform_name" != "'s,,,'" ; then
7923cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
7924cf_name=`echo xterm |sed -e "$cf_name"`
7925echo "$as_me:7925: checking for symbolic link to create to $cf_name" >&5
7926echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
7927
7928# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
7929if test "${with_xterm_symlink+set}" = set; then
7930  withval="$with_xterm_symlink"
7931  with_symlink=$withval
7932else
7933  with_symlink=xterm
7934fi;
7935echo "$as_me:7935: result: $with_symlink" >&5
7936echo "${ECHO_T}$with_symlink" >&6
7937test "$with_symlink" = yes && with_symlink=xterm
7938test -n "$with_symlink" && \
7939	test "$with_symlink" != no && \
7940	test "$with_symlink" != "$cf_name" && \
7941	XTERM_SYMLINK="$with_symlink"
7942fi
7943
7944echo "$as_me:7944: checking if you want to disable openpty" >&5
7945echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
7946
7947# Check whether --enable-openpty or --disable-openpty was given.
7948if test "${enable_openpty+set}" = set; then
7949  enableval="$enable_openpty"
7950  test "$enableval" != no && enableval=yes
7951	if test "$enableval" != "yes" ; then
7952    disable_openpty=yes
7953	else
7954		disable_openpty=no
7955	fi
7956else
7957  enableval=yes
7958	disable_openpty=no
7959
7960fi;
7961echo "$as_me:7961: result: $disable_openpty" >&5
7962echo "${ECHO_T}$disable_openpty" >&6
7963
7964echo "$as_me:7964: checking if you want to disable setuid" >&5
7965echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
7966
7967# Check whether --enable-setuid or --disable-setuid was given.
7968if test "${enable_setuid+set}" = set; then
7969  enableval="$enable_setuid"
7970  test "$enableval" != no && enableval=yes
7971	if test "$enableval" != "yes" ; then
7972    disable_setuid=yes
7973	else
7974		disable_setuid=no
7975	fi
7976else
7977  enableval=yes
7978	disable_setuid=no
7979
7980fi;
7981echo "$as_me:7981: result: $disable_setuid" >&5
7982echo "${ECHO_T}$disable_setuid" >&6
7983
7984echo "$as_me:7984: checking if you want to disable setgid" >&5
7985echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
7986
7987# Check whether --enable-setgid or --disable-setgid was given.
7988if test "${enable_setgid+set}" = set; then
7989  enableval="$enable_setgid"
7990  test "$enableval" != no && enableval=yes
7991	if test "$enableval" != "yes" ; then
7992    disable_setgid=yes
7993	else
7994		disable_setgid=no
7995	fi
7996else
7997  enableval=yes
7998	disable_setgid=no
7999
8000fi;
8001echo "$as_me:8001: result: $disable_setgid" >&5
8002echo "${ECHO_T}$disable_setgid" >&6
8003
8004echo "$as_me:8004: checking if you want to run xterm setuid to a given user" >&5
8005echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
8006
8007# Check whether --with-setuid or --without-setuid was given.
8008if test "${with_setuid+set}" = set; then
8009  withval="$with_setuid"
8010  use_given_setuid=$withval
8011else
8012  use_given_setuid=no
8013fi;
8014echo "$as_me:8014: result: $use_given_setuid" >&5
8015echo "${ECHO_T}$use_given_setuid" >&6
8016
8017if test "$use_given_setuid" != no ; then
8018	if test "$use_given_setuid" = yes ; then
8019		cf_cv_given_setuid=root
8020	else
8021		cf_cv_given_setuid=$use_given_setuid
8022	fi
8023	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
8024	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
8025fi
8026
8027echo "$as_me:8027: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
8028echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
8029
8030# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
8031if test "${with_utmp_setgid+set}" = set; then
8032  withval="$with_utmp_setgid"
8033  use_utmp_setgid=$withval
8034else
8035  use_utmp_setgid=no
8036fi;
8037echo "$as_me:8037: result: $use_utmp_setgid" >&5
8038echo "${ECHO_T}$use_utmp_setgid" >&6
8039
8040if test "$use_utmp_setgid" != no ; then
8041	if test "$use_utmp_setgid" = yes ; then
8042
8043if test $cf_cv_have_utmp != no ; then
8044echo "$as_me:8044: checking for utmp/utmpx group" >&5
8045echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
8046if test "${cf_cv_utmp_group+set}" = set; then
8047  echo $ECHO_N "(cached) $ECHO_C" >&6
8048else
8049
8050for cf_utmp_path in /var/adm /var/run
8051do
8052	for cf_utmp_file in utmpx utmp
8053	do
8054		if test -f $cf_utmp_path/$cf_utmp_file
8055		then
8056			cf_cv_utmp_group=root
8057
8058			cf_option="-lL"
8059
8060			# Expect listing to have fields like this:
8061			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
8062			ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8063			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8064			if test -z "$cf_rest" ; then
8065				cf_option="${cf_option}g"
8066				ls "$cf_option" "$cf_utmp_path/$cf_utmp_file" >conftest
8067				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
8068			fi
8069			rm -f conftest
8070
8071			# If we have a pathname, and the date fields look right, assume we've
8072			# captured the group as well.
8073			if test -n "$cf_rest" ; then
8074				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
8075				if test -z "$cf_test" ; then
8076					cf_cv_utmp_group=$cf_grp;
8077				fi
8078			fi
8079			break
8080		fi
8081	done
8082	test -n "$cf_cv_utmp_group" && break
8083done
8084
8085fi
8086echo "$as_me:8086: result: $cf_cv_utmp_group" >&5
8087echo "${ECHO_T}$cf_cv_utmp_group" >&6
8088else
8089	{ { echo "$as_me:8089: error: cannot find utmp group" >&5
8090echo "$as_me: error: cannot find utmp group" >&2;}
8091   { (exit 1); exit 1; }; }
8092fi
8093
8094	else
8095		cf_cv_utmp_group=$use_utmp_setgid
8096	fi
8097	if test "$cf_cv_posix_saved_ids" != yes ; then
8098		{ { echo "$as_me:8098: error: Your system does not support POSIX saved-ids" >&5
8099echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
8100   { (exit 1); exit 1; }; }
8101	fi
8102
8103cat >>confdefs.h <<\EOF
8104#define USE_UTMP_SETGID 1
8105EOF
8106
8107	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
8108fi
8109
8110echo "$as_me:8110: checking if you want to link with utempter" >&5
8111echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
8112
8113# Check whether --with-utempter or --without-utempter was given.
8114if test "${with_utempter+set}" = set; then
8115  withval="$with_utempter"
8116  use_utempter=$withval
8117else
8118  use_utempter=no
8119fi;
8120echo "$as_me:8120: result: $use_utempter" >&5
8121echo "${ECHO_T}$use_utempter" >&6
8122
8123if test "$use_utempter" = yes ; then
8124
8125echo "$as_me:8125: checking if we can link with utempter library" >&5
8126echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
8127if test "${cf_cv_have_utempter+set}" = set; then
8128  echo $ECHO_N "(cached) $ECHO_C" >&6
8129else
8130
8131cf_save_LIBS="$LIBS"
8132
8133cf_add_libs="$LIBS"
8134# reverse order
8135cf_add_0lib=
8136for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8137# filter duplicates
8138for cf_add_1lib in $cf_add_0lib; do
8139	for cf_add_2lib in $cf_add_libs; do
8140		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8141			cf_add_1lib=
8142			break
8143		fi
8144	done
8145	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8146done
8147LIBS="$cf_add_libs"
8148
8149cat >"conftest.$ac_ext" <<_ACEOF
8150#line 8150 "configure"
8151#include "confdefs.h"
8152
8153#include <utempter.h>
8154
8155int
8156main (void)
8157{
8158
8159	addToUtmp("/dev/tty", 0, 1);
8160	removeFromUtmp();
8161
8162  ;
8163  return 0;
8164}
8165_ACEOF
8166rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8167if { (eval echo "$as_me:8167: \"$ac_link\"") >&5
8168  (eval $ac_link) 2>&5
8169  ac_status=$?
8170  echo "$as_me:8170: \$? = $ac_status" >&5
8171  (exit "$ac_status"); } &&
8172         { ac_try='test -s "conftest$ac_exeext"'
8173  { (eval echo "$as_me:8173: \"$ac_try\"") >&5
8174  (eval $ac_try) 2>&5
8175  ac_status=$?
8176  echo "$as_me:8176: \$? = $ac_status" >&5
8177  (exit "$ac_status"); }; }; then
8178
8179	cf_cv_have_utempter=yes
8180else
8181  echo "$as_me: failed program was:" >&5
8182cat "conftest.$ac_ext" >&5
8183
8184	cf_cv_have_utempter=no
8185fi
8186rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8187LIBS="$cf_save_LIBS"
8188
8189fi
8190echo "$as_me:8190: result: $cf_cv_have_utempter" >&5
8191echo "${ECHO_T}$cf_cv_have_utempter" >&6
8192if test "$cf_cv_have_utempter" = yes ; then
8193
8194cat >>confdefs.h <<\EOF
8195#define USE_UTEMPTER 1
8196EOF
8197
8198cf_add_libs="$LIBS"
8199# reverse order
8200cf_add_0lib=
8201for cf_add_1lib in -lutempter; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
8202# filter duplicates
8203for cf_add_1lib in $cf_add_0lib; do
8204	for cf_add_2lib in $cf_add_libs; do
8205		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
8206			cf_add_1lib=
8207			break
8208		fi
8209	done
8210	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
8211done
8212LIBS="$cf_add_libs"
8213
8214fi
8215
8216	test "$cf_cv_have_utempter" != yes && use_utempter=no
8217else
8218	use_utempter=no
8219fi
8220
8221# Some configurations permit (or require) either setuid or setgid mode.
8222# Let the user decide.
8223if test "$use_utempter" = yes ; then
8224	if test "${enable_setuid+set}" != set ; then
8225		disable_setuid=yes
8226		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
8227
8228echo "${as_me:-configure}:8228: testing No --disable-setuid option given, force to yes ..." 1>&5
8229
8230	fi
8231fi
8232
8233###	checks for external data
8234
8235echo "$as_me:8235: checking if external errno is declared" >&5
8236echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
8237if test "${cf_cv_dcl_errno+set}" = set; then
8238  echo $ECHO_N "(cached) $ECHO_C" >&6
8239else
8240
8241	cat >"conftest.$ac_ext" <<_ACEOF
8242#line 8242 "configure"
8243#include "confdefs.h"
8244
8245#ifdef HAVE_STDLIB_H
8246#include <stdlib.h>
8247#endif
8248#include <stdio.h>
8249#include <sys/types.h>
8250#include <errno.h>
8251int
8252main (void)
8253{
8254int x = (int) errno; (void)x
8255  ;
8256  return 0;
8257}
8258_ACEOF
8259rm -f "conftest.$ac_objext"
8260if { (eval echo "$as_me:8260: \"$ac_compile\"") >&5
8261  (eval $ac_compile) 2>&5
8262  ac_status=$?
8263  echo "$as_me:8263: \$? = $ac_status" >&5
8264  (exit "$ac_status"); } &&
8265         { ac_try='test -s "conftest.$ac_objext"'
8266  { (eval echo "$as_me:8266: \"$ac_try\"") >&5
8267  (eval $ac_try) 2>&5
8268  ac_status=$?
8269  echo "$as_me:8269: \$? = $ac_status" >&5
8270  (exit "$ac_status"); }; }; then
8271  cf_cv_dcl_errno=yes
8272else
8273  echo "$as_me: failed program was:" >&5
8274cat "conftest.$ac_ext" >&5
8275cf_cv_dcl_errno=no
8276fi
8277rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8278
8279fi
8280echo "$as_me:8280: result: $cf_cv_dcl_errno" >&5
8281echo "${ECHO_T}$cf_cv_dcl_errno" >&6
8282
8283if test "$cf_cv_dcl_errno" = no ; then
8284
8285cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8286
8287	cat >>confdefs.h <<EOF
8288#define $cf_result 1
8289EOF
8290
8291fi
8292
8293# It's possible (for near-UNIX clones) that the data doesn't exist
8294
8295echo "$as_me:8295: checking if external errno exists" >&5
8296echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
8297if test "${cf_cv_have_errno+set}" = set; then
8298  echo $ECHO_N "(cached) $ECHO_C" >&6
8299else
8300
8301	cat >"conftest.$ac_ext" <<_ACEOF
8302#line 8302 "configure"
8303#include "confdefs.h"
8304
8305#undef errno
8306extern int errno;
8307
8308int
8309main (void)
8310{
8311errno = 2
8312  ;
8313  return 0;
8314}
8315_ACEOF
8316rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8317if { (eval echo "$as_me:8317: \"$ac_link\"") >&5
8318  (eval $ac_link) 2>&5
8319  ac_status=$?
8320  echo "$as_me:8320: \$? = $ac_status" >&5
8321  (exit "$ac_status"); } &&
8322         { ac_try='test -s "conftest$ac_exeext"'
8323  { (eval echo "$as_me:8323: \"$ac_try\"") >&5
8324  (eval $ac_try) 2>&5
8325  ac_status=$?
8326  echo "$as_me:8326: \$? = $ac_status" >&5
8327  (exit "$ac_status"); }; }; then
8328  cf_cv_have_errno=yes
8329else
8330  echo "$as_me: failed program was:" >&5
8331cat "conftest.$ac_ext" >&5
8332cf_cv_have_errno=no
8333fi
8334rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8335
8336fi
8337echo "$as_me:8337: result: $cf_cv_have_errno" >&5
8338echo "${ECHO_T}$cf_cv_have_errno" >&6
8339
8340if test "$cf_cv_have_errno" = yes ; then
8341
8342cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
8343
8344	cat >>confdefs.h <<EOF
8345#define $cf_result 1
8346EOF
8347
8348fi
8349
8350echo "$as_me:8350: checking for explicit tty group name" >&5
8351echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
8352
8353# Check whether --with-tty-group or --without-tty-group was given.
8354if test "${with_tty_group+set}" = set; then
8355  withval="$with_tty_group"
8356  cf_tty_group=$withval
8357else
8358  cf_tty_group=auto...
8359fi;
8360test -z "$cf_tty_group"    && cf_tty_group=auto...
8361test "$cf_tty_group" = yes && cf_tty_group=auto...
8362echo "$as_me:8362: result: $cf_tty_group" >&5
8363echo "${ECHO_T}$cf_tty_group" >&6
8364
8365if test "$cf_tty_group" = "auto..." ; then
8366echo "$as_me:8366: checking for tty group name" >&5
8367echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
8368if test "${cf_cv_tty_group_name+set}" = set; then
8369  echo $ECHO_N "(cached) $ECHO_C" >&6
8370else
8371
8372# If we are configuring as root, it is hard to get a clue about the tty group.
8373# But we'll guess based on how our connection is set up - assuming it is done
8374# properly.
8375
8376cf_uid="`id | sed -e 's/^^=*=//' -e 's/(.*$//'`"
8377# )vi
8378if test "$cf_uid" != 0 ; then
8379cf_cv_tty_group_name=
8380cf_tty_name="`tty`"
8381test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
8382test -z "$cf_tty_name" && cf_tty_name=/dev/tty
8383if test -c "$cf_tty_name"
8384then
8385	cf_option="-lL"
8386
8387	# Expect listing to have fields like this:
8388	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
8389	ls $cf_option "$cf_tty_name" >conftest.out
8390	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8391	if test -z "$cf_rest" ; then
8392		cf_option="${cf_option}g"
8393		ls "$cf_option" "$cf_tty_name" >conftest.out
8394		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
8395	fi
8396	rm -f conftest.out
8397	cf_cv_tty_group_name=$cf_grp
8398fi
8399fi
8400
8401# If we cannot deduce the tty group, fall back on hardcoded cases
8402
8403if test -z "$cf_cv_tty_group_name"
8404then
8405case $host_os in
8406(osf*)
8407	cf_cv_tty_group_name="terminal"
8408	;;
8409(*)
8410	cf_cv_tty_group_name="unknown"
8411	if ( ${EGREP-egrep} '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
8412		cf_cv_tty_group_name="tty"
8413	fi
8414	;;
8415esac
8416fi
8417
8418fi
8419echo "$as_me:8419: result: $cf_cv_tty_group_name" >&5
8420echo "${ECHO_T}$cf_cv_tty_group_name" >&6
8421cf_tty_group="$cf_cv_tty_group_name"
8422else
8423	# if configure option, always do this
8424
8425cat >>confdefs.h <<\EOF
8426#define USE_TTY_GROUP 1
8427EOF
8428
8429fi
8430
8431cat >>confdefs.h <<EOF
8432#define TTY_GROUP_NAME "$cf_tty_group"
8433EOF
8434
8435# This is only a double-check that the group-name we obtained above really
8436# does apply to the device.  We cannot perform this test if we are in batch
8437# mode, or if we are cross-compiling.
8438
8439echo "$as_me:8439: checking if we may use the $cf_tty_group group" >&5
8440echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
8441if test "${cf_cv_tty_group+set}" = set; then
8442  echo $ECHO_N "(cached) $ECHO_C" >&6
8443else
8444
8445cf_tty_name="`tty`"
8446if test "$cf_tty_name" != "not a tty"
8447then
8448if test "$cross_compiling" = yes; then
8449  cf_cv_tty_group=unknown
8450else
8451  cat >"conftest.$ac_ext" <<_ACEOF
8452#line 8452 "configure"
8453#include "confdefs.h"
8454
8455#include <unistd.h>
8456#include <sys/types.h>
8457#include <sys/stat.h>
8458#include <grp.h>
8459int main(void)
8460{
8461	struct stat sb;
8462	struct group *ttygrp;
8463	int fd;
8464	char *name;
8465
8466	for (fd = 0; fd < 3; ++fd) {
8467		if ((name = ttyname(fd)) != 0)
8468			break;
8469	}
8470	if (name == 0)
8471		name = "/dev/tty";
8472
8473	ttygrp = getgrnam(TTY_GROUP_NAME);
8474	endgrent();
8475
8476	if (ttygrp != 0
8477	 && name != 0
8478	 && stat(name, &sb) == 0
8479	 && sb.st_gid != getgid()
8480	 && sb.st_gid == ttygrp->gr_gid) {
8481		${cf_cv_main_return:-return} (0);
8482	}
8483	${cf_cv_main_return:-return} (1);
8484}
8485
8486_ACEOF
8487rm -f "conftest$ac_exeext"
8488if { (eval echo "$as_me:8488: \"$ac_link\"") >&5
8489  (eval $ac_link) 2>&5
8490  ac_status=$?
8491  echo "$as_me:8491: \$? = $ac_status" >&5
8492  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8493  { (eval echo "$as_me:8493: \"$ac_try\"") >&5
8494  (eval $ac_try) 2>&5
8495  ac_status=$?
8496  echo "$as_me:8496: \$? = $ac_status" >&5
8497  (exit "$ac_status"); }; }; then
8498  cf_cv_tty_group=yes
8499else
8500  echo "$as_me: program exited with status $ac_status" >&5
8501echo "$as_me: failed program was:" >&5
8502cat "conftest.$ac_ext" >&5
8503cf_cv_tty_group=no
8504fi
8505rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8506fi
8507elif test "$cross_compiling" = yes; then
8508	cf_cv_tty_group=unknown
8509else
8510	cf_cv_tty_group=yes
8511fi
8512
8513fi
8514echo "$as_me:8514: result: $cf_cv_tty_group" >&5
8515echo "${ECHO_T}$cf_cv_tty_group" >&6
8516
8517if test $cf_cv_tty_group = no ; then
8518	{ echo "$as_me:8518: WARNING: Cannot use $cf_tty_group group" >&5
8519echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
8520else
8521	cat >>confdefs.h <<\EOF
8522#define USE_TTY_GROUP 1
8523EOF
8524
8525fi
8526
8527###	checks for system services and user specified options
8528
8529echo "$as_me:8529: checking for X" >&5
8530echo $ECHO_N "checking for X... $ECHO_C" >&6
8531
8532# Check whether --with-x or --without-x was given.
8533if test "${with_x+set}" = set; then
8534  withval="$with_x"
8535
8536fi;
8537# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8538if test "x$with_x" = xno; then
8539  # The user explicitly disabled X.
8540  have_x=disabled
8541else
8542  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8543    # Both variables are already set.
8544    have_x=yes
8545  else
8546    if test "${ac_cv_have_x+set}" = set; then
8547  echo $ECHO_N "(cached) $ECHO_C" >&6
8548else
8549  # One or both of the vars are not set, and there is no cached value.
8550ac_x_includes=no ac_x_libraries=no
8551rm -fr conftest.dir
8552if mkdir conftest.dir; then
8553  cd conftest.dir
8554  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8555  cat >Imakefile <<'EOF'
8556acfindx:
8557	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8558EOF
8559  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8560    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8561    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
8562    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8563    for ac_extension in a so sl dylib dll; do
8564      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
8565         test -f "$ac_im_libdir/libX11.$ac_extension"; then
8566        ac_im_usrlibdir=$ac_im_libdir; break
8567      fi
8568    done
8569    # Screen out bogus values from the imake configuration.  They are
8570    # bogus both because they are the default anyway, and because
8571    # using them would break gcc on systems where it needs fixed includes.
8572    case $ac_im_incroot in
8573	/usr/include) ;;
8574	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8575    esac
8576    case $ac_im_usrlibdir in
8577	/usr/lib | /lib) ;;
8578	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8579    esac
8580  fi
8581  cd ..
8582  rm -fr conftest.dir
8583fi
8584
8585# Standard set of common directories for X headers.
8586# Check X11 before X11Rn because it is often a symlink to the current release.
8587ac_x_header_dirs='
8588/usr/X11/include
8589/usr/X11R7/include
8590/usr/X11R6/include
8591/usr/X11R5/include
8592/usr/X11R4/include
8593
8594/opt/local/include
8595/opt/X11/include
8596
8597/usr/include/X11
8598/usr/include/X11R7
8599/usr/include/X11R6
8600/usr/include/X11R5
8601/usr/include/X11R4
8602
8603/usr/local/X11/include
8604/usr/local/X11R7/include
8605/usr/local/X11R6/include
8606/usr/local/X11R5/include
8607/usr/local/X11R4/include
8608
8609/usr/local/include/X11
8610/usr/local/include/X11R7
8611/usr/local/include/X11R6
8612/usr/local/include/X11R5
8613/usr/local/include/X11R4
8614
8615/usr/X386/include
8616/usr/x386/include
8617/usr/XFree86/include/X11
8618
8619/usr/include
8620/usr/local/include
8621/usr/unsupported/include
8622/usr/athena/include
8623/usr/local/x11r5/include
8624/usr/lpp/Xamples/include
8625
8626/usr/openwin/include
8627/usr/openwin/share/include'
8628
8629if test "$ac_x_includes" = no; then
8630  # Guess where to find include files, by looking for Intrinsic.h.
8631  # First, try using that file with no special directory specified.
8632  cat >"conftest.$ac_ext" <<_ACEOF
8633#line 8633 "configure"
8634#include "confdefs.h"
8635#include <X11/Intrinsic.h>
8636_ACEOF
8637if { (eval echo "$as_me:8637: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8638  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8639  ac_status=$?
8640  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8641  rm -f conftest.er1
8642  cat conftest.err >&5
8643  echo "$as_me:8643: \$? = $ac_status" >&5
8644  (exit "$ac_status"); } >/dev/null; then
8645  if test -s conftest.err; then
8646    ac_cpp_err=$ac_c_preproc_warn_flag
8647  else
8648    ac_cpp_err=
8649  fi
8650else
8651  ac_cpp_err=yes
8652fi
8653if test -z "$ac_cpp_err"; then
8654  # We can compile using X headers with no special include directory.
8655ac_x_includes=
8656else
8657  echo "$as_me: failed program was:" >&5
8658  cat "conftest.$ac_ext" >&5
8659  for ac_dir in $ac_x_header_dirs; do
8660  if test -r "$ac_dir/X11/Intrinsic.h"; then
8661    ac_x_includes=$ac_dir
8662    break
8663  fi
8664done
8665fi
8666rm -f conftest.err "conftest.$ac_ext"
8667fi # $ac_x_includes = no
8668
8669if test "$ac_x_libraries" = no; then
8670  # Check for the libraries.
8671  # See if we find them without any special options.
8672  # Don't add to $LIBS permanently.
8673  ac_save_LIBS=$LIBS
8674  LIBS="-lXt $LIBS"
8675  cat >"conftest.$ac_ext" <<_ACEOF
8676#line 8676 "configure"
8677#include "confdefs.h"
8678#include <X11/Intrinsic.h>
8679int
8680main (void)
8681{
8682XtMalloc (0)
8683  ;
8684  return 0;
8685}
8686_ACEOF
8687rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8688if { (eval echo "$as_me:8688: \"$ac_link\"") >&5
8689  (eval $ac_link) 2>&5
8690  ac_status=$?
8691  echo "$as_me:8691: \$? = $ac_status" >&5
8692  (exit "$ac_status"); } &&
8693         { ac_try='test -s "conftest$ac_exeext"'
8694  { (eval echo "$as_me:8694: \"$ac_try\"") >&5
8695  (eval $ac_try) 2>&5
8696  ac_status=$?
8697  echo "$as_me:8697: \$? = $ac_status" >&5
8698  (exit "$ac_status"); }; }; then
8699  LIBS=$ac_save_LIBS
8700# We can link X programs with no special library path.
8701ac_x_libraries=
8702else
8703  echo "$as_me: failed program was:" >&5
8704cat "conftest.$ac_ext" >&5
8705LIBS=$ac_save_LIBS
8706for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8707do
8708  # Don't even attempt the hair of trying to link an X program!
8709  for ac_extension in a so sl dylib dll; do
8710    if test -r "$ac_dir/libXt.$ac_extension"; then
8711      ac_x_libraries=$ac_dir
8712      break 2
8713    fi
8714  done
8715done
8716fi
8717rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8718fi # $ac_x_libraries = no
8719
8720if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8721  # Didn't find X anywhere.  Cache the known absence of X.
8722  ac_cv_have_x="have_x=no"
8723else
8724  # Record where we found X for the cache.
8725  ac_cv_have_x="have_x=yes \
8726	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8727fi
8728fi
8729
8730  fi
8731  eval "$ac_cv_have_x"
8732fi # $with_x != no
8733
8734if test "$have_x" != yes; then
8735  echo "$as_me:8735: result: $have_x" >&5
8736echo "${ECHO_T}$have_x" >&6
8737  no_x=yes
8738else
8739  # If each of the values was on the command line, it overrides each guess.
8740  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8741  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8742  # Update the cache value to reflect the command line values.
8743  ac_cv_have_x="have_x=yes \
8744		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8745  echo "$as_me:8745: result: libraries $x_libraries, headers $x_includes" >&5
8746echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8747fi
8748
8749if test "$no_x" = yes; then
8750  # Not all programs may use this symbol, but it does not hurt to define it.
8751
8752cat >>confdefs.h <<\EOF
8753#define X_DISPLAY_MISSING 1
8754EOF
8755
8756  X_CFLAGS=
8757  X_PRE_LIBS=
8758  X_LIBS=
8759  X_EXTRA_LIBS=
8760else
8761  if test -n "$x_includes"; then
8762    X_CFLAGS="$X_CFLAGS -I$x_includes"
8763  fi
8764
8765  # It would also be nice to do this for all -L options, not just this one.
8766  if test -n "$x_libraries"; then
8767    X_LIBS="$X_LIBS -L$x_libraries"
8768    # For Solaris; some versions of Sun CC require a space after -R and
8769    # others require no space.  Words are not sufficient . . . .
8770    case `(uname -sr) 2>/dev/null` in
8771    "SunOS 5"*)
8772      echo "$as_me:8772: checking whether -R must be followed by a space" >&5
8773echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8774      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8775      cat >"conftest.$ac_ext" <<_ACEOF
8776#line 8776 "configure"
8777#include "confdefs.h"
8778
8779int
8780main (void)
8781{
8782
8783  ;
8784  return 0;
8785}
8786_ACEOF
8787rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8788if { (eval echo "$as_me:8788: \"$ac_link\"") >&5
8789  (eval $ac_link) 2>&5
8790  ac_status=$?
8791  echo "$as_me:8791: \$? = $ac_status" >&5
8792  (exit "$ac_status"); } &&
8793         { ac_try='test -s "conftest$ac_exeext"'
8794  { (eval echo "$as_me:8794: \"$ac_try\"") >&5
8795  (eval $ac_try) 2>&5
8796  ac_status=$?
8797  echo "$as_me:8797: \$? = $ac_status" >&5
8798  (exit "$ac_status"); }; }; then
8799  ac_R_nospace=yes
8800else
8801  echo "$as_me: failed program was:" >&5
8802cat "conftest.$ac_ext" >&5
8803ac_R_nospace=no
8804fi
8805rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8806      if test $ac_R_nospace = yes; then
8807	echo "$as_me:8807: result: no" >&5
8808echo "${ECHO_T}no" >&6
8809	X_LIBS="$X_LIBS -R$x_libraries"
8810      else
8811	LIBS="$ac_xsave_LIBS -R $x_libraries"
8812	cat >"conftest.$ac_ext" <<_ACEOF
8813#line 8813 "configure"
8814#include "confdefs.h"
8815
8816int
8817main (void)
8818{
8819
8820  ;
8821  return 0;
8822}
8823_ACEOF
8824rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8825if { (eval echo "$as_me:8825: \"$ac_link\"") >&5
8826  (eval $ac_link) 2>&5
8827  ac_status=$?
8828  echo "$as_me:8828: \$? = $ac_status" >&5
8829  (exit "$ac_status"); } &&
8830         { ac_try='test -s "conftest$ac_exeext"'
8831  { (eval echo "$as_me:8831: \"$ac_try\"") >&5
8832  (eval $ac_try) 2>&5
8833  ac_status=$?
8834  echo "$as_me:8834: \$? = $ac_status" >&5
8835  (exit "$ac_status"); }; }; then
8836  ac_R_space=yes
8837else
8838  echo "$as_me: failed program was:" >&5
8839cat "conftest.$ac_ext" >&5
8840ac_R_space=no
8841fi
8842rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8843	if test $ac_R_space = yes; then
8844	  echo "$as_me:8844: result: yes" >&5
8845echo "${ECHO_T}yes" >&6
8846	  X_LIBS="$X_LIBS -R $x_libraries"
8847	else
8848	  echo "$as_me:8848: result: neither works" >&5
8849echo "${ECHO_T}neither works" >&6
8850	fi
8851      fi
8852      LIBS=$ac_xsave_LIBS
8853    esac
8854  fi
8855
8856  # Check for system-dependent libraries X programs must link with.
8857  # Do this before checking for the system-independent R6 libraries
8858  # (-lICE), since we may need -lsocket or whatever for X linking.
8859
8860  if test "$ISC" = yes; then
8861    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8862  else
8863    # Martyn Johnson says this is needed for Ultrix, if the X
8864    # libraries were built with DECnet support.  And Karl Berry says
8865    # the Alpha needs dnet_stub (dnet does not exist).
8866    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8867    cat >"conftest.$ac_ext" <<_ACEOF
8868#line 8868 "configure"
8869#include "confdefs.h"
8870
8871/* Override any gcc2 internal prototype to avoid an error.  */
8872#ifdef __cplusplus
8873extern "C"
8874#endif
8875/* We use char because int might match the return type of a gcc2
8876   builtin and then its argument prototype would still apply.  */
8877char XOpenDisplay ();
8878int
8879main (void)
8880{
8881XOpenDisplay ();
8882  ;
8883  return 0;
8884}
8885_ACEOF
8886rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8887if { (eval echo "$as_me:8887: \"$ac_link\"") >&5
8888  (eval $ac_link) 2>&5
8889  ac_status=$?
8890  echo "$as_me:8890: \$? = $ac_status" >&5
8891  (exit "$ac_status"); } &&
8892         { ac_try='test -s "conftest$ac_exeext"'
8893  { (eval echo "$as_me:8893: \"$ac_try\"") >&5
8894  (eval $ac_try) 2>&5
8895  ac_status=$?
8896  echo "$as_me:8896: \$? = $ac_status" >&5
8897  (exit "$ac_status"); }; }; then
8898  :
8899else
8900  echo "$as_me: failed program was:" >&5
8901cat "conftest.$ac_ext" >&5
8902echo "$as_me:8902: checking for dnet_ntoa in -ldnet" >&5
8903echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8904if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8905  echo $ECHO_N "(cached) $ECHO_C" >&6
8906else
8907  ac_check_lib_save_LIBS=$LIBS
8908LIBS="-ldnet  $LIBS"
8909cat >"conftest.$ac_ext" <<_ACEOF
8910#line 8910 "configure"
8911#include "confdefs.h"
8912
8913/* Override any gcc2 internal prototype to avoid an error.  */
8914#ifdef __cplusplus
8915extern "C"
8916#endif
8917/* We use char because int might match the return type of a gcc2
8918   builtin and then its argument prototype would still apply.  */
8919char dnet_ntoa ();
8920int
8921main (void)
8922{
8923dnet_ntoa ();
8924  ;
8925  return 0;
8926}
8927_ACEOF
8928rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8929if { (eval echo "$as_me:8929: \"$ac_link\"") >&5
8930  (eval $ac_link) 2>&5
8931  ac_status=$?
8932  echo "$as_me:8932: \$? = $ac_status" >&5
8933  (exit "$ac_status"); } &&
8934         { ac_try='test -s "conftest$ac_exeext"'
8935  { (eval echo "$as_me:8935: \"$ac_try\"") >&5
8936  (eval $ac_try) 2>&5
8937  ac_status=$?
8938  echo "$as_me:8938: \$? = $ac_status" >&5
8939  (exit "$ac_status"); }; }; then
8940  ac_cv_lib_dnet_dnet_ntoa=yes
8941else
8942  echo "$as_me: failed program was:" >&5
8943cat "conftest.$ac_ext" >&5
8944ac_cv_lib_dnet_dnet_ntoa=no
8945fi
8946rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8947LIBS=$ac_check_lib_save_LIBS
8948fi
8949echo "$as_me:8949: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8950echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8951if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
8952  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8953fi
8954
8955    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8956      echo "$as_me:8956: checking for dnet_ntoa in -ldnet_stub" >&5
8957echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8958if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8959  echo $ECHO_N "(cached) $ECHO_C" >&6
8960else
8961  ac_check_lib_save_LIBS=$LIBS
8962LIBS="-ldnet_stub  $LIBS"
8963cat >"conftest.$ac_ext" <<_ACEOF
8964#line 8964 "configure"
8965#include "confdefs.h"
8966
8967/* Override any gcc2 internal prototype to avoid an error.  */
8968#ifdef __cplusplus
8969extern "C"
8970#endif
8971/* We use char because int might match the return type of a gcc2
8972   builtin and then its argument prototype would still apply.  */
8973char dnet_ntoa ();
8974int
8975main (void)
8976{
8977dnet_ntoa ();
8978  ;
8979  return 0;
8980}
8981_ACEOF
8982rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8983if { (eval echo "$as_me:8983: \"$ac_link\"") >&5
8984  (eval $ac_link) 2>&5
8985  ac_status=$?
8986  echo "$as_me:8986: \$? = $ac_status" >&5
8987  (exit "$ac_status"); } &&
8988         { ac_try='test -s "conftest$ac_exeext"'
8989  { (eval echo "$as_me:8989: \"$ac_try\"") >&5
8990  (eval $ac_try) 2>&5
8991  ac_status=$?
8992  echo "$as_me:8992: \$? = $ac_status" >&5
8993  (exit "$ac_status"); }; }; then
8994  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8995else
8996  echo "$as_me: failed program was:" >&5
8997cat "conftest.$ac_ext" >&5
8998ac_cv_lib_dnet_stub_dnet_ntoa=no
8999fi
9000rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9001LIBS=$ac_check_lib_save_LIBS
9002fi
9003echo "$as_me:9003: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
9004echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
9005if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
9006  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
9007fi
9008
9009    fi
9010fi
9011rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9012    LIBS="$ac_xsave_LIBS"
9013
9014    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
9015    # to get the SysV transport functions.
9016    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
9017    # needs -lnsl.
9018    # The nsl library prevents programs from opening the X display
9019    # on Irix 5.2, according to T.E. Dickey.
9020    # The functions gethostbyname, getservbyname, and inet_addr are
9021    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
9022    echo "$as_me:9022: checking for gethostbyname" >&5
9023echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
9024if test "${ac_cv_func_gethostbyname+set}" = set; then
9025  echo $ECHO_N "(cached) $ECHO_C" >&6
9026else
9027  cat >"conftest.$ac_ext" <<_ACEOF
9028#line 9028 "configure"
9029#include "confdefs.h"
9030#define gethostbyname autoconf_temporary
9031#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9032#undef gethostbyname
9033
9034#ifdef __cplusplus
9035extern "C"
9036#endif
9037
9038/* We use char because int might match the return type of a gcc2
9039   builtin and then its argument prototype would still apply.  */
9040char gethostbyname (void);
9041
9042int
9043main (void)
9044{
9045
9046/* The GNU C library defines stubs for functions which it implements
9047    to always fail with ENOSYS.  Some functions are actually named
9048    something starting with __ and the normal name is an alias.  */
9049#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
9050#error found stub for gethostbyname
9051#endif
9052
9053	return gethostbyname ();
9054  ;
9055  return 0;
9056}
9057_ACEOF
9058rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9059if { (eval echo "$as_me:9059: \"$ac_link\"") >&5
9060  (eval $ac_link) 2>&5
9061  ac_status=$?
9062  echo "$as_me:9062: \$? = $ac_status" >&5
9063  (exit "$ac_status"); } &&
9064         { ac_try='test -s "conftest$ac_exeext"'
9065  { (eval echo "$as_me:9065: \"$ac_try\"") >&5
9066  (eval $ac_try) 2>&5
9067  ac_status=$?
9068  echo "$as_me:9068: \$? = $ac_status" >&5
9069  (exit "$ac_status"); }; }; then
9070  ac_cv_func_gethostbyname=yes
9071else
9072  echo "$as_me: failed program was:" >&5
9073cat "conftest.$ac_ext" >&5
9074ac_cv_func_gethostbyname=no
9075fi
9076rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9077fi
9078echo "$as_me:9078: result: $ac_cv_func_gethostbyname" >&5
9079echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
9080
9081    if test $ac_cv_func_gethostbyname = no; then
9082      echo "$as_me:9082: checking for gethostbyname in -lnsl" >&5
9083echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
9084if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
9085  echo $ECHO_N "(cached) $ECHO_C" >&6
9086else
9087  ac_check_lib_save_LIBS=$LIBS
9088LIBS="-lnsl  $LIBS"
9089cat >"conftest.$ac_ext" <<_ACEOF
9090#line 9090 "configure"
9091#include "confdefs.h"
9092
9093/* Override any gcc2 internal prototype to avoid an error.  */
9094#ifdef __cplusplus
9095extern "C"
9096#endif
9097/* We use char because int might match the return type of a gcc2
9098   builtin and then its argument prototype would still apply.  */
9099char gethostbyname ();
9100int
9101main (void)
9102{
9103gethostbyname ();
9104  ;
9105  return 0;
9106}
9107_ACEOF
9108rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9109if { (eval echo "$as_me:9109: \"$ac_link\"") >&5
9110  (eval $ac_link) 2>&5
9111  ac_status=$?
9112  echo "$as_me:9112: \$? = $ac_status" >&5
9113  (exit "$ac_status"); } &&
9114         { ac_try='test -s "conftest$ac_exeext"'
9115  { (eval echo "$as_me:9115: \"$ac_try\"") >&5
9116  (eval $ac_try) 2>&5
9117  ac_status=$?
9118  echo "$as_me:9118: \$? = $ac_status" >&5
9119  (exit "$ac_status"); }; }; then
9120  ac_cv_lib_nsl_gethostbyname=yes
9121else
9122  echo "$as_me: failed program was:" >&5
9123cat "conftest.$ac_ext" >&5
9124ac_cv_lib_nsl_gethostbyname=no
9125fi
9126rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9127LIBS=$ac_check_lib_save_LIBS
9128fi
9129echo "$as_me:9129: result: $ac_cv_lib_nsl_gethostbyname" >&5
9130echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
9131if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
9132  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
9133fi
9134
9135      if test $ac_cv_lib_nsl_gethostbyname = no; then
9136        echo "$as_me:9136: checking for gethostbyname in -lbsd" >&5
9137echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
9138if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
9139  echo $ECHO_N "(cached) $ECHO_C" >&6
9140else
9141  ac_check_lib_save_LIBS=$LIBS
9142LIBS="-lbsd  $LIBS"
9143cat >"conftest.$ac_ext" <<_ACEOF
9144#line 9144 "configure"
9145#include "confdefs.h"
9146
9147/* Override any gcc2 internal prototype to avoid an error.  */
9148#ifdef __cplusplus
9149extern "C"
9150#endif
9151/* We use char because int might match the return type of a gcc2
9152   builtin and then its argument prototype would still apply.  */
9153char gethostbyname ();
9154int
9155main (void)
9156{
9157gethostbyname ();
9158  ;
9159  return 0;
9160}
9161_ACEOF
9162rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9163if { (eval echo "$as_me:9163: \"$ac_link\"") >&5
9164  (eval $ac_link) 2>&5
9165  ac_status=$?
9166  echo "$as_me:9166: \$? = $ac_status" >&5
9167  (exit "$ac_status"); } &&
9168         { ac_try='test -s "conftest$ac_exeext"'
9169  { (eval echo "$as_me:9169: \"$ac_try\"") >&5
9170  (eval $ac_try) 2>&5
9171  ac_status=$?
9172  echo "$as_me:9172: \$? = $ac_status" >&5
9173  (exit "$ac_status"); }; }; then
9174  ac_cv_lib_bsd_gethostbyname=yes
9175else
9176  echo "$as_me: failed program was:" >&5
9177cat "conftest.$ac_ext" >&5
9178ac_cv_lib_bsd_gethostbyname=no
9179fi
9180rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9181LIBS=$ac_check_lib_save_LIBS
9182fi
9183echo "$as_me:9183: result: $ac_cv_lib_bsd_gethostbyname" >&5
9184echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
9185if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
9186  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
9187fi
9188
9189      fi
9190    fi
9191
9192    # lieder@skyler.mavd.honeywell.com says without -lsocket,
9193    # socket/setsockopt and other routines are undefined under SCO ODT
9194    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
9195    # on later versions), says Simon Leinen: it contains gethostby*
9196    # variants that don't use the nameserver (or something).  -lsocket
9197    # must be given before -lnsl if both are needed.  We assume that
9198    # if connect needs -lnsl, so does gethostbyname.
9199    echo "$as_me:9199: checking for connect" >&5
9200echo $ECHO_N "checking for connect... $ECHO_C" >&6
9201if test "${ac_cv_func_connect+set}" = set; then
9202  echo $ECHO_N "(cached) $ECHO_C" >&6
9203else
9204  cat >"conftest.$ac_ext" <<_ACEOF
9205#line 9205 "configure"
9206#include "confdefs.h"
9207#define connect autoconf_temporary
9208#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9209#undef connect
9210
9211#ifdef __cplusplus
9212extern "C"
9213#endif
9214
9215/* We use char because int might match the return type of a gcc2
9216   builtin and then its argument prototype would still apply.  */
9217char connect (void);
9218
9219int
9220main (void)
9221{
9222
9223/* The GNU C library defines stubs for functions which it implements
9224    to always fail with ENOSYS.  Some functions are actually named
9225    something starting with __ and the normal name is an alias.  */
9226#if defined (__stub_connect) || defined (__stub___connect)
9227#error found stub for connect
9228#endif
9229
9230	return connect ();
9231  ;
9232  return 0;
9233}
9234_ACEOF
9235rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9236if { (eval echo "$as_me:9236: \"$ac_link\"") >&5
9237  (eval $ac_link) 2>&5
9238  ac_status=$?
9239  echo "$as_me:9239: \$? = $ac_status" >&5
9240  (exit "$ac_status"); } &&
9241         { ac_try='test -s "conftest$ac_exeext"'
9242  { (eval echo "$as_me:9242: \"$ac_try\"") >&5
9243  (eval $ac_try) 2>&5
9244  ac_status=$?
9245  echo "$as_me:9245: \$? = $ac_status" >&5
9246  (exit "$ac_status"); }; }; then
9247  ac_cv_func_connect=yes
9248else
9249  echo "$as_me: failed program was:" >&5
9250cat "conftest.$ac_ext" >&5
9251ac_cv_func_connect=no
9252fi
9253rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9254fi
9255echo "$as_me:9255: result: $ac_cv_func_connect" >&5
9256echo "${ECHO_T}$ac_cv_func_connect" >&6
9257
9258    if test $ac_cv_func_connect = no; then
9259      echo "$as_me:9259: checking for connect in -lsocket" >&5
9260echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
9261if test "${ac_cv_lib_socket_connect+set}" = set; then
9262  echo $ECHO_N "(cached) $ECHO_C" >&6
9263else
9264  ac_check_lib_save_LIBS=$LIBS
9265LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
9266cat >"conftest.$ac_ext" <<_ACEOF
9267#line 9267 "configure"
9268#include "confdefs.h"
9269
9270/* Override any gcc2 internal prototype to avoid an error.  */
9271#ifdef __cplusplus
9272extern "C"
9273#endif
9274/* We use char because int might match the return type of a gcc2
9275   builtin and then its argument prototype would still apply.  */
9276char connect ();
9277int
9278main (void)
9279{
9280connect ();
9281  ;
9282  return 0;
9283}
9284_ACEOF
9285rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9286if { (eval echo "$as_me:9286: \"$ac_link\"") >&5
9287  (eval $ac_link) 2>&5
9288  ac_status=$?
9289  echo "$as_me:9289: \$? = $ac_status" >&5
9290  (exit "$ac_status"); } &&
9291         { ac_try='test -s "conftest$ac_exeext"'
9292  { (eval echo "$as_me:9292: \"$ac_try\"") >&5
9293  (eval $ac_try) 2>&5
9294  ac_status=$?
9295  echo "$as_me:9295: \$? = $ac_status" >&5
9296  (exit "$ac_status"); }; }; then
9297  ac_cv_lib_socket_connect=yes
9298else
9299  echo "$as_me: failed program was:" >&5
9300cat "conftest.$ac_ext" >&5
9301ac_cv_lib_socket_connect=no
9302fi
9303rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9304LIBS=$ac_check_lib_save_LIBS
9305fi
9306echo "$as_me:9306: result: $ac_cv_lib_socket_connect" >&5
9307echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
9308if test "$ac_cv_lib_socket_connect" = yes; then
9309  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
9310fi
9311
9312    fi
9313
9314    # Guillermo Gomez says -lposix is necessary on A/UX.
9315    echo "$as_me:9315: checking for remove" >&5
9316echo $ECHO_N "checking for remove... $ECHO_C" >&6
9317if test "${ac_cv_func_remove+set}" = set; then
9318  echo $ECHO_N "(cached) $ECHO_C" >&6
9319else
9320  cat >"conftest.$ac_ext" <<_ACEOF
9321#line 9321 "configure"
9322#include "confdefs.h"
9323#define remove autoconf_temporary
9324#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9325#undef remove
9326
9327#ifdef __cplusplus
9328extern "C"
9329#endif
9330
9331/* We use char because int might match the return type of a gcc2
9332   builtin and then its argument prototype would still apply.  */
9333char remove (void);
9334
9335int
9336main (void)
9337{
9338
9339/* The GNU C library defines stubs for functions which it implements
9340    to always fail with ENOSYS.  Some functions are actually named
9341    something starting with __ and the normal name is an alias.  */
9342#if defined (__stub_remove) || defined (__stub___remove)
9343#error found stub for remove
9344#endif
9345
9346	return remove ();
9347  ;
9348  return 0;
9349}
9350_ACEOF
9351rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9352if { (eval echo "$as_me:9352: \"$ac_link\"") >&5
9353  (eval $ac_link) 2>&5
9354  ac_status=$?
9355  echo "$as_me:9355: \$? = $ac_status" >&5
9356  (exit "$ac_status"); } &&
9357         { ac_try='test -s "conftest$ac_exeext"'
9358  { (eval echo "$as_me:9358: \"$ac_try\"") >&5
9359  (eval $ac_try) 2>&5
9360  ac_status=$?
9361  echo "$as_me:9361: \$? = $ac_status" >&5
9362  (exit "$ac_status"); }; }; then
9363  ac_cv_func_remove=yes
9364else
9365  echo "$as_me: failed program was:" >&5
9366cat "conftest.$ac_ext" >&5
9367ac_cv_func_remove=no
9368fi
9369rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9370fi
9371echo "$as_me:9371: result: $ac_cv_func_remove" >&5
9372echo "${ECHO_T}$ac_cv_func_remove" >&6
9373
9374    if test $ac_cv_func_remove = no; then
9375      echo "$as_me:9375: checking for remove in -lposix" >&5
9376echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
9377if test "${ac_cv_lib_posix_remove+set}" = set; then
9378  echo $ECHO_N "(cached) $ECHO_C" >&6
9379else
9380  ac_check_lib_save_LIBS=$LIBS
9381LIBS="-lposix  $LIBS"
9382cat >"conftest.$ac_ext" <<_ACEOF
9383#line 9383 "configure"
9384#include "confdefs.h"
9385
9386/* Override any gcc2 internal prototype to avoid an error.  */
9387#ifdef __cplusplus
9388extern "C"
9389#endif
9390/* We use char because int might match the return type of a gcc2
9391   builtin and then its argument prototype would still apply.  */
9392char remove ();
9393int
9394main (void)
9395{
9396remove ();
9397  ;
9398  return 0;
9399}
9400_ACEOF
9401rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9402if { (eval echo "$as_me:9402: \"$ac_link\"") >&5
9403  (eval $ac_link) 2>&5
9404  ac_status=$?
9405  echo "$as_me:9405: \$? = $ac_status" >&5
9406  (exit "$ac_status"); } &&
9407         { ac_try='test -s "conftest$ac_exeext"'
9408  { (eval echo "$as_me:9408: \"$ac_try\"") >&5
9409  (eval $ac_try) 2>&5
9410  ac_status=$?
9411  echo "$as_me:9411: \$? = $ac_status" >&5
9412  (exit "$ac_status"); }; }; then
9413  ac_cv_lib_posix_remove=yes
9414else
9415  echo "$as_me: failed program was:" >&5
9416cat "conftest.$ac_ext" >&5
9417ac_cv_lib_posix_remove=no
9418fi
9419rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9420LIBS=$ac_check_lib_save_LIBS
9421fi
9422echo "$as_me:9422: result: $ac_cv_lib_posix_remove" >&5
9423echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
9424if test "$ac_cv_lib_posix_remove" = yes; then
9425  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
9426fi
9427
9428    fi
9429
9430    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
9431    echo "$as_me:9431: checking for shmat" >&5
9432echo $ECHO_N "checking for shmat... $ECHO_C" >&6
9433if test "${ac_cv_func_shmat+set}" = set; then
9434  echo $ECHO_N "(cached) $ECHO_C" >&6
9435else
9436  cat >"conftest.$ac_ext" <<_ACEOF
9437#line 9437 "configure"
9438#include "confdefs.h"
9439#define shmat autoconf_temporary
9440#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9441#undef shmat
9442
9443#ifdef __cplusplus
9444extern "C"
9445#endif
9446
9447/* We use char because int might match the return type of a gcc2
9448   builtin and then its argument prototype would still apply.  */
9449char shmat (void);
9450
9451int
9452main (void)
9453{
9454
9455/* The GNU C library defines stubs for functions which it implements
9456    to always fail with ENOSYS.  Some functions are actually named
9457    something starting with __ and the normal name is an alias.  */
9458#if defined (__stub_shmat) || defined (__stub___shmat)
9459#error found stub for shmat
9460#endif
9461
9462	return shmat ();
9463  ;
9464  return 0;
9465}
9466_ACEOF
9467rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9468if { (eval echo "$as_me:9468: \"$ac_link\"") >&5
9469  (eval $ac_link) 2>&5
9470  ac_status=$?
9471  echo "$as_me:9471: \$? = $ac_status" >&5
9472  (exit "$ac_status"); } &&
9473         { ac_try='test -s "conftest$ac_exeext"'
9474  { (eval echo "$as_me:9474: \"$ac_try\"") >&5
9475  (eval $ac_try) 2>&5
9476  ac_status=$?
9477  echo "$as_me:9477: \$? = $ac_status" >&5
9478  (exit "$ac_status"); }; }; then
9479  ac_cv_func_shmat=yes
9480else
9481  echo "$as_me: failed program was:" >&5
9482cat "conftest.$ac_ext" >&5
9483ac_cv_func_shmat=no
9484fi
9485rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9486fi
9487echo "$as_me:9487: result: $ac_cv_func_shmat" >&5
9488echo "${ECHO_T}$ac_cv_func_shmat" >&6
9489
9490    if test $ac_cv_func_shmat = no; then
9491      echo "$as_me:9491: checking for shmat in -lipc" >&5
9492echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
9493if test "${ac_cv_lib_ipc_shmat+set}" = set; then
9494  echo $ECHO_N "(cached) $ECHO_C" >&6
9495else
9496  ac_check_lib_save_LIBS=$LIBS
9497LIBS="-lipc  $LIBS"
9498cat >"conftest.$ac_ext" <<_ACEOF
9499#line 9499 "configure"
9500#include "confdefs.h"
9501
9502/* Override any gcc2 internal prototype to avoid an error.  */
9503#ifdef __cplusplus
9504extern "C"
9505#endif
9506/* We use char because int might match the return type of a gcc2
9507   builtin and then its argument prototype would still apply.  */
9508char shmat ();
9509int
9510main (void)
9511{
9512shmat ();
9513  ;
9514  return 0;
9515}
9516_ACEOF
9517rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9518if { (eval echo "$as_me:9518: \"$ac_link\"") >&5
9519  (eval $ac_link) 2>&5
9520  ac_status=$?
9521  echo "$as_me:9521: \$? = $ac_status" >&5
9522  (exit "$ac_status"); } &&
9523         { ac_try='test -s "conftest$ac_exeext"'
9524  { (eval echo "$as_me:9524: \"$ac_try\"") >&5
9525  (eval $ac_try) 2>&5
9526  ac_status=$?
9527  echo "$as_me:9527: \$? = $ac_status" >&5
9528  (exit "$ac_status"); }; }; then
9529  ac_cv_lib_ipc_shmat=yes
9530else
9531  echo "$as_me: failed program was:" >&5
9532cat "conftest.$ac_ext" >&5
9533ac_cv_lib_ipc_shmat=no
9534fi
9535rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9536LIBS=$ac_check_lib_save_LIBS
9537fi
9538echo "$as_me:9538: result: $ac_cv_lib_ipc_shmat" >&5
9539echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9540if test "$ac_cv_lib_ipc_shmat" = yes; then
9541  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9542fi
9543
9544    fi
9545  fi
9546
9547  # Check for libraries that X11R6 Xt/Xaw programs need.
9548  ac_save_LDFLAGS=$LDFLAGS
9549  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9550  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9551  # check for ICE first), but we must link in the order -lSM -lICE or
9552  # we get undefined symbols.  So assume we have SM if we have ICE.
9553  # These have to be linked with before -lX11, unlike the other
9554  # libraries we check for below, so use a different variable.
9555  # John Interrante, Karl Berry
9556  echo "$as_me:9556: checking for IceConnectionNumber in -lICE" >&5
9557echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9558if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9559  echo $ECHO_N "(cached) $ECHO_C" >&6
9560else
9561  ac_check_lib_save_LIBS=$LIBS
9562LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9563cat >"conftest.$ac_ext" <<_ACEOF
9564#line 9564 "configure"
9565#include "confdefs.h"
9566
9567/* Override any gcc2 internal prototype to avoid an error.  */
9568#ifdef __cplusplus
9569extern "C"
9570#endif
9571/* We use char because int might match the return type of a gcc2
9572   builtin and then its argument prototype would still apply.  */
9573char IceConnectionNumber ();
9574int
9575main (void)
9576{
9577IceConnectionNumber ();
9578  ;
9579  return 0;
9580}
9581_ACEOF
9582rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9583if { (eval echo "$as_me:9583: \"$ac_link\"") >&5
9584  (eval $ac_link) 2>&5
9585  ac_status=$?
9586  echo "$as_me:9586: \$? = $ac_status" >&5
9587  (exit "$ac_status"); } &&
9588         { ac_try='test -s "conftest$ac_exeext"'
9589  { (eval echo "$as_me:9589: \"$ac_try\"") >&5
9590  (eval $ac_try) 2>&5
9591  ac_status=$?
9592  echo "$as_me:9592: \$? = $ac_status" >&5
9593  (exit "$ac_status"); }; }; then
9594  ac_cv_lib_ICE_IceConnectionNumber=yes
9595else
9596  echo "$as_me: failed program was:" >&5
9597cat "conftest.$ac_ext" >&5
9598ac_cv_lib_ICE_IceConnectionNumber=no
9599fi
9600rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9601LIBS=$ac_check_lib_save_LIBS
9602fi
9603echo "$as_me:9603: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9604echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9605if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
9606  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9607fi
9608
9609  LDFLAGS=$ac_save_LDFLAGS
9610
9611fi
9612
9613echo "$as_me:9613: checking for sys/wait.h that is POSIX.1 compatible" >&5
9614echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
9615if test "${ac_cv_header_sys_wait_h+set}" = set; then
9616  echo $ECHO_N "(cached) $ECHO_C" >&6
9617else
9618  cat >"conftest.$ac_ext" <<_ACEOF
9619#line 9619 "configure"
9620#include "confdefs.h"
9621#include <sys/types.h>
9622#include <sys/wait.h>
9623#ifndef WEXITSTATUS
9624# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
9625#endif
9626#ifndef WIFEXITED
9627# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
9628#endif
9629
9630int
9631main (void)
9632{
9633  int s;
9634  wait (&s);
9635  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
9636  ;
9637  return 0;
9638}
9639_ACEOF
9640rm -f "conftest.$ac_objext"
9641if { (eval echo "$as_me:9641: \"$ac_compile\"") >&5
9642  (eval $ac_compile) 2>&5
9643  ac_status=$?
9644  echo "$as_me:9644: \$? = $ac_status" >&5
9645  (exit "$ac_status"); } &&
9646         { ac_try='test -s "conftest.$ac_objext"'
9647  { (eval echo "$as_me:9647: \"$ac_try\"") >&5
9648  (eval $ac_try) 2>&5
9649  ac_status=$?
9650  echo "$as_me:9650: \$? = $ac_status" >&5
9651  (exit "$ac_status"); }; }; then
9652  ac_cv_header_sys_wait_h=yes
9653else
9654  echo "$as_me: failed program was:" >&5
9655cat "conftest.$ac_ext" >&5
9656ac_cv_header_sys_wait_h=no
9657fi
9658rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9659fi
9660echo "$as_me:9660: result: $ac_cv_header_sys_wait_h" >&5
9661echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
9662if test $ac_cv_header_sys_wait_h = yes; then
9663
9664cat >>confdefs.h <<\EOF
9665#define HAVE_SYS_WAIT_H 1
9666EOF
9667
9668fi
9669
9670echo "$as_me:9670: checking for POSIX wait functions" >&5
9671echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
9672if test "${cf_cv_posix_wait+set}" = set; then
9673  echo $ECHO_N "(cached) $ECHO_C" >&6
9674else
9675
9676cat >"conftest.$ac_ext" <<_ACEOF
9677#line 9677 "configure"
9678#include "confdefs.h"
9679
9680#include <stdlib.h>
9681#include <stdio.h>
9682#include <sys/types.h>
9683#ifdef HAVE_SYS_WAIT_H
9684#include <sys/wait.h>
9685#endif
9686
9687int
9688main (void)
9689{
9690
9691	int stat_loc;
9692	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
9693	pid_t pid2 = wait(&stat_loc);
9694	(void)pid;
9695	(void)pid2;
9696
9697  ;
9698  return 0;
9699}
9700_ACEOF
9701rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9702if { (eval echo "$as_me:9702: \"$ac_link\"") >&5
9703  (eval $ac_link) 2>&5
9704  ac_status=$?
9705  echo "$as_me:9705: \$? = $ac_status" >&5
9706  (exit "$ac_status"); } &&
9707         { ac_try='test -s "conftest$ac_exeext"'
9708  { (eval echo "$as_me:9708: \"$ac_try\"") >&5
9709  (eval $ac_try) 2>&5
9710  ac_status=$?
9711  echo "$as_me:9711: \$? = $ac_status" >&5
9712  (exit "$ac_status"); }; }; then
9713  cf_cv_posix_wait=yes
9714else
9715  echo "$as_me: failed program was:" >&5
9716cat "conftest.$ac_ext" >&5
9717cf_cv_posix_wait=no
9718fi
9719rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9720
9721fi
9722echo "$as_me:9722: result: $cf_cv_posix_wait" >&5
9723echo "${ECHO_T}$cf_cv_posix_wait" >&6
9724test "$cf_cv_posix_wait" = yes &&
9725cat >>confdefs.h <<\EOF
9726#define USE_POSIX_WAIT 1
9727EOF
9728
9729echo "$as_me:9729: checking if external sys_nerr is declared" >&5
9730echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
9731if test "${cf_cv_dcl_sys_nerr+set}" = set; then
9732  echo $ECHO_N "(cached) $ECHO_C" >&6
9733else
9734
9735	cat >"conftest.$ac_ext" <<_ACEOF
9736#line 9736 "configure"
9737#include "confdefs.h"
9738
9739#ifdef HAVE_STDLIB_H
9740#include <stdlib.h>
9741#endif
9742#include <stdio.h>
9743#include <sys/types.h>
9744#include <errno.h>
9745int
9746main (void)
9747{
9748int x = (int) sys_nerr; (void)x
9749  ;
9750  return 0;
9751}
9752_ACEOF
9753rm -f "conftest.$ac_objext"
9754if { (eval echo "$as_me:9754: \"$ac_compile\"") >&5
9755  (eval $ac_compile) 2>&5
9756  ac_status=$?
9757  echo "$as_me:9757: \$? = $ac_status" >&5
9758  (exit "$ac_status"); } &&
9759         { ac_try='test -s "conftest.$ac_objext"'
9760  { (eval echo "$as_me:9760: \"$ac_try\"") >&5
9761  (eval $ac_try) 2>&5
9762  ac_status=$?
9763  echo "$as_me:9763: \$? = $ac_status" >&5
9764  (exit "$ac_status"); }; }; then
9765  cf_cv_dcl_sys_nerr=yes
9766else
9767  echo "$as_me: failed program was:" >&5
9768cat "conftest.$ac_ext" >&5
9769cf_cv_dcl_sys_nerr=no
9770fi
9771rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9772
9773fi
9774echo "$as_me:9774: result: $cf_cv_dcl_sys_nerr" >&5
9775echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
9776
9777if test "$cf_cv_dcl_sys_nerr" = no ; then
9778
9779cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9780
9781	cat >>confdefs.h <<EOF
9782#define $cf_result 1
9783EOF
9784
9785fi
9786
9787# It's possible (for near-UNIX clones) that the data doesn't exist
9788
9789echo "$as_me:9789: checking if external sys_nerr exists" >&5
9790echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
9791if test "${cf_cv_have_sys_nerr+set}" = set; then
9792  echo $ECHO_N "(cached) $ECHO_C" >&6
9793else
9794
9795	cat >"conftest.$ac_ext" <<_ACEOF
9796#line 9796 "configure"
9797#include "confdefs.h"
9798
9799#undef sys_nerr
9800extern int sys_nerr;
9801
9802int
9803main (void)
9804{
9805sys_nerr = 2
9806  ;
9807  return 0;
9808}
9809_ACEOF
9810rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9811if { (eval echo "$as_me:9811: \"$ac_link\"") >&5
9812  (eval $ac_link) 2>&5
9813  ac_status=$?
9814  echo "$as_me:9814: \$? = $ac_status" >&5
9815  (exit "$ac_status"); } &&
9816         { ac_try='test -s "conftest$ac_exeext"'
9817  { (eval echo "$as_me:9817: \"$ac_try\"") >&5
9818  (eval $ac_try) 2>&5
9819  ac_status=$?
9820  echo "$as_me:9820: \$? = $ac_status" >&5
9821  (exit "$ac_status"); }; }; then
9822  cf_cv_have_sys_nerr=yes
9823else
9824  echo "$as_me: failed program was:" >&5
9825cat "conftest.$ac_ext" >&5
9826cf_cv_have_sys_nerr=no
9827fi
9828rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9829
9830fi
9831echo "$as_me:9831: result: $cf_cv_have_sys_nerr" >&5
9832echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
9833
9834if test "$cf_cv_have_sys_nerr" = yes ; then
9835
9836cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9837
9838	cat >>confdefs.h <<EOF
9839#define $cf_result 1
9840EOF
9841
9842fi
9843
9844echo "$as_me:9844: checking if external sys_errlist is declared" >&5
9845echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
9846if test "${cf_cv_dcl_sys_errlist+set}" = set; then
9847  echo $ECHO_N "(cached) $ECHO_C" >&6
9848else
9849
9850	cat >"conftest.$ac_ext" <<_ACEOF
9851#line 9851 "configure"
9852#include "confdefs.h"
9853
9854#ifdef HAVE_STDLIB_H
9855#include <stdlib.h>
9856#endif
9857#include <stdio.h>
9858#include <sys/types.h>
9859#include <errno.h>
9860int
9861main (void)
9862{
9863int x = (int) sys_errlist; (void)x
9864  ;
9865  return 0;
9866}
9867_ACEOF
9868rm -f "conftest.$ac_objext"
9869if { (eval echo "$as_me:9869: \"$ac_compile\"") >&5
9870  (eval $ac_compile) 2>&5
9871  ac_status=$?
9872  echo "$as_me:9872: \$? = $ac_status" >&5
9873  (exit "$ac_status"); } &&
9874         { ac_try='test -s "conftest.$ac_objext"'
9875  { (eval echo "$as_me:9875: \"$ac_try\"") >&5
9876  (eval $ac_try) 2>&5
9877  ac_status=$?
9878  echo "$as_me:9878: \$? = $ac_status" >&5
9879  (exit "$ac_status"); }; }; then
9880  cf_cv_dcl_sys_errlist=yes
9881else
9882  echo "$as_me: failed program was:" >&5
9883cat "conftest.$ac_ext" >&5
9884cf_cv_dcl_sys_errlist=no
9885fi
9886rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9887
9888fi
9889echo "$as_me:9889: result: $cf_cv_dcl_sys_errlist" >&5
9890echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
9891
9892if test "$cf_cv_dcl_sys_errlist" = no ; then
9893
9894cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9895
9896	cat >>confdefs.h <<EOF
9897#define $cf_result 1
9898EOF
9899
9900fi
9901
9902# It's possible (for near-UNIX clones) that the data doesn't exist
9903
9904echo "$as_me:9904: checking if external sys_errlist exists" >&5
9905echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
9906if test "${cf_cv_have_sys_errlist+set}" = set; then
9907  echo $ECHO_N "(cached) $ECHO_C" >&6
9908else
9909
9910	cat >"conftest.$ac_ext" <<_ACEOF
9911#line 9911 "configure"
9912#include "confdefs.h"
9913
9914#undef sys_errlist
9915extern int sys_errlist;
9916
9917int
9918main (void)
9919{
9920sys_errlist = 2
9921  ;
9922  return 0;
9923}
9924_ACEOF
9925rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9926if { (eval echo "$as_me:9926: \"$ac_link\"") >&5
9927  (eval $ac_link) 2>&5
9928  ac_status=$?
9929  echo "$as_me:9929: \$? = $ac_status" >&5
9930  (exit "$ac_status"); } &&
9931         { ac_try='test -s "conftest$ac_exeext"'
9932  { (eval echo "$as_me:9932: \"$ac_try\"") >&5
9933  (eval $ac_try) 2>&5
9934  ac_status=$?
9935  echo "$as_me:9935: \$? = $ac_status" >&5
9936  (exit "$ac_status"); }; }; then
9937  cf_cv_have_sys_errlist=yes
9938else
9939  echo "$as_me: failed program was:" >&5
9940cat "conftest.$ac_ext" >&5
9941cf_cv_have_sys_errlist=no
9942fi
9943rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9944
9945fi
9946echo "$as_me:9946: result: $cf_cv_have_sys_errlist" >&5
9947echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
9948
9949if test "$cf_cv_have_sys_errlist" = yes ; then
9950
9951cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9952
9953	cat >>confdefs.h <<EOF
9954#define $cf_result 1
9955EOF
9956
9957fi
9958
9959cf_save_LIBS_CF_SYSV="$LIBS"
9960cf_save_CFLAGS_CF_SYSV="$CFLAGS"
9961cf_save_CPPFLAGS_CF_SYSV="$CPPFLAGS"
9962LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
9963for cf_X_CFLAGS in $X_CFLAGS
9964do
9965	case "x$cf_X_CFLAGS" in
9966	x-[IUD]*)
9967		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
9968		;;
9969	*)
9970		CFLAGS="$CFLAGS $cf_X_CFLAGS"
9971		;;
9972	esac
9973done
9974
9975for ac_header in \
9976termios.h \
9977stdlib.h \
9978X11/Intrinsic.h \
9979
9980do
9981as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9982echo "$as_me:9982: checking for $ac_header" >&5
9983echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9984if eval "test \"\${$as_ac_Header+set}\" = set"; then
9985  echo $ECHO_N "(cached) $ECHO_C" >&6
9986else
9987  cat >"conftest.$ac_ext" <<_ACEOF
9988#line 9988 "configure"
9989#include "confdefs.h"
9990#include <$ac_header>
9991_ACEOF
9992if { (eval echo "$as_me:9992: \"$ac_cpp "conftest.$ac_ext"\"") >&5
9993  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
9994  ac_status=$?
9995  $EGREP -v '^ *\+' conftest.er1 >conftest.err
9996  rm -f conftest.er1
9997  cat conftest.err >&5
9998  echo "$as_me:9998: \$? = $ac_status" >&5
9999  (exit "$ac_status"); } >/dev/null; then
10000  if test -s conftest.err; then
10001    ac_cpp_err=$ac_c_preproc_warn_flag
10002  else
10003    ac_cpp_err=
10004  fi
10005else
10006  ac_cpp_err=yes
10007fi
10008if test -z "$ac_cpp_err"; then
10009  eval "$as_ac_Header=yes"
10010else
10011  echo "$as_me: failed program was:" >&5
10012  cat "conftest.$ac_ext" >&5
10013  eval "$as_ac_Header=no"
10014fi
10015rm -f conftest.err "conftest.$ac_ext"
10016fi
10017echo "$as_me:10017: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
10018echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
10019if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
10020  cat >>confdefs.h <<EOF
10021#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10022EOF
10023
10024fi
10025done
10026
10027echo "$as_me:10027: checking if we should define SYSV" >&5
10028echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
10029if test "${cf_cv_sysv+set}" = set; then
10030  echo $ECHO_N "(cached) $ECHO_C" >&6
10031else
10032
10033cat >"conftest.$ac_ext" <<_ACEOF
10034#line 10034 "configure"
10035#include "confdefs.h"
10036
10037#undef  SYSV
10038#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
10039#ifdef HAVE_STDLIB_H
10040#include <stdlib.h>		/* look for wchar_t */
10041#endif
10042#ifdef HAVE_X11_INTRINSIC_H
10043#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
10044#endif
10045#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
10046#include <termios.h>
10047#define STRUCT_TERMIOS struct termios
10048#else
10049#define STRUCT_TERMIOS struct termio
10050#endif
10051#include <curses.h>
10052#include <term.h>		/* eliminate most BSD hacks */
10053#include <errno.h>		/* declare sys_errlist on older systems */
10054#include <sys/termio.h>		/* eliminate most of the remaining ones */
10055
10056int
10057main (void)
10058{
10059
10060static STRUCT_TERMIOS d_tio;
10061	d_tio.c_cc[VINTR] = 0;
10062	d_tio.c_cc[VQUIT] = 0;
10063	d_tio.c_cc[VERASE] = 0;
10064	d_tio.c_cc[VKILL] = 0;
10065	d_tio.c_cc[VEOF] = 0;
10066	d_tio.c_cc[VEOL] = 0;
10067	d_tio.c_cc[VMIN] = 0;
10068	d_tio.c_cc[VTIME] = 0;
10069#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
10070sys_errlist[0] = "";		/* Cygwin mis-declares this */
10071#endif
10072
10073  ;
10074  return 0;
10075}
10076_ACEOF
10077rm -f "conftest.$ac_objext"
10078if { (eval echo "$as_me:10078: \"$ac_compile\"") >&5
10079  (eval $ac_compile) 2>&5
10080  ac_status=$?
10081  echo "$as_me:10081: \$? = $ac_status" >&5
10082  (exit "$ac_status"); } &&
10083         { ac_try='test -s "conftest.$ac_objext"'
10084  { (eval echo "$as_me:10084: \"$ac_try\"") >&5
10085  (eval $ac_try) 2>&5
10086  ac_status=$?
10087  echo "$as_me:10087: \$? = $ac_status" >&5
10088  (exit "$ac_status"); }; }; then
10089  cf_cv_sysv=yes
10090else
10091  echo "$as_me: failed program was:" >&5
10092cat "conftest.$ac_ext" >&5
10093cf_cv_sysv=no
10094fi
10095rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10096
10097fi
10098echo "$as_me:10098: result: $cf_cv_sysv" >&5
10099echo "${ECHO_T}$cf_cv_sysv" >&6
10100test "$cf_cv_sysv" = yes &&
10101cat >>confdefs.h <<\EOF
10102#define SYSV 1
10103EOF
10104
10105LIBS="$cf_save_LIBS_CF_SYSV"
10106CFLAGS="$cf_save_CFLAGS_CF_SYSV"
10107CPPFLAGS="$cf_save_CPPFLAGS_CF_SYSV"
10108
10109echo "$as_me:10109: checking for elf_begin in -lelf" >&5
10110echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
10111if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
10112  echo $ECHO_N "(cached) $ECHO_C" >&6
10113else
10114  ac_check_lib_save_LIBS=$LIBS
10115LIBS="-lelf  $LIBS"
10116cat >"conftest.$ac_ext" <<_ACEOF
10117#line 10117 "configure"
10118#include "confdefs.h"
10119
10120/* Override any gcc2 internal prototype to avoid an error.  */
10121#ifdef __cplusplus
10122extern "C"
10123#endif
10124/* We use char because int might match the return type of a gcc2
10125   builtin and then its argument prototype would still apply.  */
10126char elf_begin ();
10127int
10128main (void)
10129{
10130elf_begin ();
10131  ;
10132  return 0;
10133}
10134_ACEOF
10135rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10136if { (eval echo "$as_me:10136: \"$ac_link\"") >&5
10137  (eval $ac_link) 2>&5
10138  ac_status=$?
10139  echo "$as_me:10139: \$? = $ac_status" >&5
10140  (exit "$ac_status"); } &&
10141         { ac_try='test -s "conftest$ac_exeext"'
10142  { (eval echo "$as_me:10142: \"$ac_try\"") >&5
10143  (eval $ac_try) 2>&5
10144  ac_status=$?
10145  echo "$as_me:10145: \$? = $ac_status" >&5
10146  (exit "$ac_status"); }; }; then
10147  ac_cv_lib_elf_elf_begin=yes
10148else
10149  echo "$as_me: failed program was:" >&5
10150cat "conftest.$ac_ext" >&5
10151ac_cv_lib_elf_elf_begin=no
10152fi
10153rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10154LIBS=$ac_check_lib_save_LIBS
10155fi
10156echo "$as_me:10156: result: $ac_cv_lib_elf_elf_begin" >&5
10157echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
10158if test "$ac_cv_lib_elf_elf_begin" = yes; then
10159
10160echo "$as_me:10160: checking if this is an SVR4 system" >&5
10161echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
10162if test "${cf_cv_svr4+set}" = set; then
10163  echo $ECHO_N "(cached) $ECHO_C" >&6
10164else
10165
10166cat >"conftest.$ac_ext" <<_ACEOF
10167#line 10167 "configure"
10168#include "confdefs.h"
10169
10170#if defined(__CYGWIN__)
10171make an error
10172#endif
10173#include <elf.h>
10174#include <sys/termio.h>
10175
10176int
10177main (void)
10178{
10179
10180static struct termio d_tio;
10181	d_tio.c_cc[VINTR] = 0;
10182	d_tio.c_cc[VQUIT] = 0;
10183	d_tio.c_cc[VERASE] = 0;
10184	d_tio.c_cc[VKILL] = 0;
10185	d_tio.c_cc[VEOF] = 0;
10186	d_tio.c_cc[VEOL] = 0;
10187	d_tio.c_cc[VMIN] = 0;
10188	d_tio.c_cc[VTIME] = 0;
10189	d_tio.c_cc[VLNEXT] = 0;
10190
10191  ;
10192  return 0;
10193}
10194_ACEOF
10195rm -f "conftest.$ac_objext"
10196if { (eval echo "$as_me:10196: \"$ac_compile\"") >&5
10197  (eval $ac_compile) 2>&5
10198  ac_status=$?
10199  echo "$as_me:10199: \$? = $ac_status" >&5
10200  (exit "$ac_status"); } &&
10201         { ac_try='test -s "conftest.$ac_objext"'
10202  { (eval echo "$as_me:10202: \"$ac_try\"") >&5
10203  (eval $ac_try) 2>&5
10204  ac_status=$?
10205  echo "$as_me:10205: \$? = $ac_status" >&5
10206  (exit "$ac_status"); }; }; then
10207  cf_cv_svr4=yes
10208else
10209  echo "$as_me: failed program was:" >&5
10210cat "conftest.$ac_ext" >&5
10211cf_cv_svr4=no
10212fi
10213rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10214
10215fi
10216echo "$as_me:10216: result: $cf_cv_svr4" >&5
10217echo "${ECHO_T}$cf_cv_svr4" >&6
10218
10219fi
10220
10221test "$cf_cv_svr4" = yes &&
10222cat >>confdefs.h <<\EOF
10223#define SVR4 1
10224EOF
10225
10226echo "$as_me:10226: checking if you want to use pkg-config" >&5
10227echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
10228
10229# Check whether --with-pkg-config or --without-pkg-config was given.
10230if test "${with_pkg_config+set}" = set; then
10231  withval="$with_pkg_config"
10232  cf_pkg_config=$withval
10233else
10234  cf_pkg_config=yes
10235fi;
10236echo "$as_me:10236: result: $cf_pkg_config" >&5
10237echo "${ECHO_T}$cf_pkg_config" >&6
10238
10239case "$cf_pkg_config" in
10240(no)
10241	PKG_CONFIG=none
10242	;;
10243(yes)
10244
10245if test -n "$ac_tool_prefix"; then
10246  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
10247set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
10248echo "$as_me:10248: checking for $ac_word" >&5
10249echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10250if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
10251  echo $ECHO_N "(cached) $ECHO_C" >&6
10252else
10253  case $PKG_CONFIG in
10254  [\\/]* | ?:[\\/]*)
10255  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
10256  ;;
10257  *)
10258  ac_save_IFS=$IFS; IFS=$ac_path_separator
10259ac_dummy="$PATH"
10260for ac_dir in $ac_dummy; do
10261  IFS=$ac_save_IFS
10262  test -z "$ac_dir" && ac_dir=.
10263  if $as_executable_p "$ac_dir/$ac_word"; then
10264   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
10265   echo "$as_me:10265: found $ac_dir/$ac_word" >&5
10266   break
10267fi
10268done
10269
10270  ;;
10271esac
10272fi
10273PKG_CONFIG=$ac_cv_path_PKG_CONFIG
10274
10275if test -n "$PKG_CONFIG"; then
10276  echo "$as_me:10276: result: $PKG_CONFIG" >&5
10277echo "${ECHO_T}$PKG_CONFIG" >&6
10278else
10279  echo "$as_me:10279: result: no" >&5
10280echo "${ECHO_T}no" >&6
10281fi
10282
10283fi
10284if test -z "$ac_cv_path_PKG_CONFIG"; then
10285  ac_pt_PKG_CONFIG=$PKG_CONFIG
10286  # Extract the first word of "pkg-config", so it can be a program name with args.
10287set dummy pkg-config; ac_word=$2
10288echo "$as_me:10288: checking for $ac_word" >&5
10289echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10290if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
10291  echo $ECHO_N "(cached) $ECHO_C" >&6
10292else
10293  case $ac_pt_PKG_CONFIG in
10294  [\\/]* | ?:[\\/]*)
10295  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
10296  ;;
10297  *)
10298  ac_save_IFS=$IFS; IFS=$ac_path_separator
10299ac_dummy="$PATH"
10300for ac_dir in $ac_dummy; do
10301  IFS=$ac_save_IFS
10302  test -z "$ac_dir" && ac_dir=.
10303  if $as_executable_p "$ac_dir/$ac_word"; then
10304   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
10305   echo "$as_me:10305: found $ac_dir/$ac_word" >&5
10306   break
10307fi
10308done
10309
10310  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
10311  ;;
10312esac
10313fi
10314ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
10315
10316if test -n "$ac_pt_PKG_CONFIG"; then
10317  echo "$as_me:10317: result: $ac_pt_PKG_CONFIG" >&5
10318echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
10319else
10320  echo "$as_me:10320: result: no" >&5
10321echo "${ECHO_T}no" >&6
10322fi
10323
10324  PKG_CONFIG=$ac_pt_PKG_CONFIG
10325else
10326  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
10327fi
10328
10329	;;
10330(*)
10331	PKG_CONFIG=$withval
10332	;;
10333esac
10334
10335test -z "$PKG_CONFIG" && PKG_CONFIG=none
10336if test "$PKG_CONFIG" != none ; then
10337
10338if test "x$prefix" != xNONE; then
10339	cf_path_syntax="$prefix"
10340else
10341	cf_path_syntax="$ac_default_prefix"
10342fi
10343
10344case ".$PKG_CONFIG" in
10345(.\$\(*\)*|.\'*\'*)
10346	;;
10347(..|./*|.\\*)
10348	;;
10349(.[a-zA-Z]:[\\/]*) # OS/2 EMX
10350	;;
10351(.\$\{*prefix\}*|.\$\{*dir\}*)
10352	eval PKG_CONFIG="$PKG_CONFIG"
10353	case ".$PKG_CONFIG" in
10354	(.NONE/*)
10355		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10356		;;
10357	esac
10358	;;
10359(.no|.NONE/*)
10360	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
10361	;;
10362(*)
10363	{ { echo "$as_me:10363: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
10364echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
10365   { (exit 1); exit 1; }; }
10366	;;
10367esac
10368
10369elif test "x$cf_pkg_config" != xno ; then
10370	{ echo "$as_me:10370: WARNING: pkg-config is not installed" >&5
10371echo "$as_me: WARNING: pkg-config is not installed" >&2;}
10372fi
10373
10374# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
10375# in some cases has installed dummy files in the former, other cases replaced
10376# it with a link to the new location).  This complicates the configure script.
10377# Check for that pitfall, and recover using pkg-config
10378#
10379# If none of these are set, the configuration is almost certainly broken.
10380if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
10381then
10382
10383if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
10384	test -n "$verbose" && echo "	found package x11" 1>&6
10385
10386echo "${as_me:-configure}:10386: testing found package x11 ..." 1>&5
10387
10388	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
10389	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
10390	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
10391
10392echo "${as_me:-configure}:10392: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10393
10394	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
10395
10396echo "${as_me:-configure}:10396: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
10397
10398cf_fix_cppflags=no
10399cf_new_cflags=
10400cf_new_cppflags=
10401cf_new_extra_cppflags=
10402
10403for cf_add_cflags in $cf_pkgconfig_incs
10404do
10405case "$cf_fix_cppflags" in
10406(no)
10407	case "$cf_add_cflags" in
10408	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10409		case "$cf_add_cflags" in
10410		(-D*)
10411			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10412
10413			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10414				&& test -z "${cf_tst_cflags}" \
10415				&& cf_fix_cppflags=yes
10416
10417			if test "$cf_fix_cppflags" = yes ; then
10418
10419	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10420	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10421
10422				continue
10423			elif test "${cf_tst_cflags}" = "\"'" ; then
10424
10425	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10426	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10427
10428				continue
10429			fi
10430			;;
10431		esac
10432		case "$CPPFLAGS" in
10433		(*$cf_add_cflags)
10434			;;
10435		(*)
10436			case "$cf_add_cflags" in
10437			(-D*)
10438				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10439
10440CPPFLAGS=`echo "$CPPFLAGS" | \
10441	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10442		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10443
10444				;;
10445			esac
10446
10447	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10448	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10449
10450			;;
10451		esac
10452		;;
10453	(*)
10454
10455	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10456	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10457
10458		;;
10459	esac
10460	;;
10461(yes)
10462
10463	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10464	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10465
10466	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10467
10468	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10469		&& test -z "${cf_tst_cflags}" \
10470		&& cf_fix_cppflags=no
10471	;;
10472esac
10473done
10474
10475if test -n "$cf_new_cflags" ; then
10476
10477	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10478	CFLAGS="${CFLAGS}$cf_new_cflags"
10479
10480fi
10481
10482if test -n "$cf_new_cppflags" ; then
10483
10484	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10485	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10486
10487fi
10488
10489if test -n "$cf_new_extra_cppflags" ; then
10490
10491	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10492	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10493
10494fi
10495
10496cf_add_libs="$LIBS"
10497# reverse order
10498cf_add_0lib=
10499for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10500# filter duplicates
10501for cf_add_1lib in $cf_add_0lib; do
10502	for cf_add_2lib in $cf_add_libs; do
10503		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10504			cf_add_1lib=
10505			break
10506		fi
10507	done
10508	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10509done
10510LIBS="$cf_add_libs"
10511
10512	:
10513else
10514	cf_pkgconfig_incs=
10515	cf_pkgconfig_libs=
10516	{ echo "$as_me:10516: WARNING: unable to find X11 library" >&5
10517echo "$as_me: WARNING: unable to find X11 library" >&2;}
10518fi
10519
10520if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
10521	test -n "$verbose" && echo "	found package ice" 1>&6
10522
10523echo "${as_me:-configure}:10523: testing found package ice ..." 1>&5
10524
10525	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
10526	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
10527	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10528
10529echo "${as_me:-configure}:10529: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10530
10531	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10532
10533echo "${as_me:-configure}:10533: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10534
10535cf_fix_cppflags=no
10536cf_new_cflags=
10537cf_new_cppflags=
10538cf_new_extra_cppflags=
10539
10540for cf_add_cflags in $cf_pkgconfig_incs
10541do
10542case "$cf_fix_cppflags" in
10543(no)
10544	case "$cf_add_cflags" in
10545	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10546		case "$cf_add_cflags" in
10547		(-D*)
10548			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10549
10550			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10551				&& test -z "${cf_tst_cflags}" \
10552				&& cf_fix_cppflags=yes
10553
10554			if test "$cf_fix_cppflags" = yes ; then
10555
10556	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10557	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10558
10559				continue
10560			elif test "${cf_tst_cflags}" = "\"'" ; then
10561
10562	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10563	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10564
10565				continue
10566			fi
10567			;;
10568		esac
10569		case "$CPPFLAGS" in
10570		(*$cf_add_cflags)
10571			;;
10572		(*)
10573			case "$cf_add_cflags" in
10574			(-D*)
10575				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10576
10577CPPFLAGS=`echo "$CPPFLAGS" | \
10578	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10579		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10580
10581				;;
10582			esac
10583
10584	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10585	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10586
10587			;;
10588		esac
10589		;;
10590	(*)
10591
10592	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10593	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10594
10595		;;
10596	esac
10597	;;
10598(yes)
10599
10600	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10601	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10602
10603	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10604
10605	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10606		&& test -z "${cf_tst_cflags}" \
10607		&& cf_fix_cppflags=no
10608	;;
10609esac
10610done
10611
10612if test -n "$cf_new_cflags" ; then
10613
10614	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10615	CFLAGS="${CFLAGS}$cf_new_cflags"
10616
10617fi
10618
10619if test -n "$cf_new_cppflags" ; then
10620
10621	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10622	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10623
10624fi
10625
10626if test -n "$cf_new_extra_cppflags" ; then
10627
10628	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10629	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10630
10631fi
10632
10633cf_add_libs="$LIBS"
10634# reverse order
10635cf_add_0lib=
10636for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10637# filter duplicates
10638for cf_add_1lib in $cf_add_0lib; do
10639	for cf_add_2lib in $cf_add_libs; do
10640		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10641			cf_add_1lib=
10642			break
10643		fi
10644	done
10645	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10646done
10647LIBS="$cf_add_libs"
10648
10649	:
10650else
10651	cf_pkgconfig_incs=
10652	cf_pkgconfig_libs=
10653	{ echo "$as_me:10653: WARNING: unable to find ICE library" >&5
10654echo "$as_me: WARNING: unable to find ICE library" >&2;}
10655fi
10656
10657if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
10658	test -n "$verbose" && echo "	found package sm" 1>&6
10659
10660echo "${as_me:-configure}:10660: testing found package sm ..." 1>&5
10661
10662	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
10663	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
10664	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10665
10666echo "${as_me:-configure}:10666: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10667
10668	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10669
10670echo "${as_me:-configure}:10670: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10671
10672cf_fix_cppflags=no
10673cf_new_cflags=
10674cf_new_cppflags=
10675cf_new_extra_cppflags=
10676
10677for cf_add_cflags in $cf_pkgconfig_incs
10678do
10679case "$cf_fix_cppflags" in
10680(no)
10681	case "$cf_add_cflags" in
10682	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10683		case "$cf_add_cflags" in
10684		(-D*)
10685			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10686
10687			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10688				&& test -z "${cf_tst_cflags}" \
10689				&& cf_fix_cppflags=yes
10690
10691			if test "$cf_fix_cppflags" = yes ; then
10692
10693	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10694	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10695
10696				continue
10697			elif test "${cf_tst_cflags}" = "\"'" ; then
10698
10699	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10700	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10701
10702				continue
10703			fi
10704			;;
10705		esac
10706		case "$CPPFLAGS" in
10707		(*$cf_add_cflags)
10708			;;
10709		(*)
10710			case "$cf_add_cflags" in
10711			(-D*)
10712				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10713
10714CPPFLAGS=`echo "$CPPFLAGS" | \
10715	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10716		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10717
10718				;;
10719			esac
10720
10721	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10722	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10723
10724			;;
10725		esac
10726		;;
10727	(*)
10728
10729	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10730	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10731
10732		;;
10733	esac
10734	;;
10735(yes)
10736
10737	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10738	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10739
10740	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10741
10742	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10743		&& test -z "${cf_tst_cflags}" \
10744		&& cf_fix_cppflags=no
10745	;;
10746esac
10747done
10748
10749if test -n "$cf_new_cflags" ; then
10750
10751	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10752	CFLAGS="${CFLAGS}$cf_new_cflags"
10753
10754fi
10755
10756if test -n "$cf_new_cppflags" ; then
10757
10758	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10759	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10760
10761fi
10762
10763if test -n "$cf_new_extra_cppflags" ; then
10764
10765	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10766	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10767
10768fi
10769
10770cf_add_libs="$LIBS"
10771# reverse order
10772cf_add_0lib=
10773for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10774# filter duplicates
10775for cf_add_1lib in $cf_add_0lib; do
10776	for cf_add_2lib in $cf_add_libs; do
10777		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10778			cf_add_1lib=
10779			break
10780		fi
10781	done
10782	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10783done
10784LIBS="$cf_add_libs"
10785
10786	:
10787else
10788	cf_pkgconfig_incs=
10789	cf_pkgconfig_libs=
10790	{ echo "$as_me:10790: WARNING: unable to find SM library" >&5
10791echo "$as_me: WARNING: unable to find SM library" >&2;}
10792fi
10793
10794if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10795	test -n "$verbose" && echo "	found package xt" 1>&6
10796
10797echo "${as_me:-configure}:10797: testing found package xt ..." 1>&5
10798
10799	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10800	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10801	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10802
10803echo "${as_me:-configure}:10803: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10804
10805	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10806
10807echo "${as_me:-configure}:10807: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10808
10809cf_fix_cppflags=no
10810cf_new_cflags=
10811cf_new_cppflags=
10812cf_new_extra_cppflags=
10813
10814for cf_add_cflags in $cf_pkgconfig_incs
10815do
10816case "$cf_fix_cppflags" in
10817(no)
10818	case "$cf_add_cflags" in
10819	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10820		case "$cf_add_cflags" in
10821		(-D*)
10822			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10823
10824			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10825				&& test -z "${cf_tst_cflags}" \
10826				&& cf_fix_cppflags=yes
10827
10828			if test "$cf_fix_cppflags" = yes ; then
10829
10830	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10831	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10832
10833				continue
10834			elif test "${cf_tst_cflags}" = "\"'" ; then
10835
10836	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10837	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10838
10839				continue
10840			fi
10841			;;
10842		esac
10843		case "$CPPFLAGS" in
10844		(*$cf_add_cflags)
10845			;;
10846		(*)
10847			case "$cf_add_cflags" in
10848			(-D*)
10849				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10850
10851CPPFLAGS=`echo "$CPPFLAGS" | \
10852	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10853		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10854
10855				;;
10856			esac
10857
10858	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10859	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10860
10861			;;
10862		esac
10863		;;
10864	(*)
10865
10866	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10867	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10868
10869		;;
10870	esac
10871	;;
10872(yes)
10873
10874	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10875	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10876
10877	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10878
10879	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10880		&& test -z "${cf_tst_cflags}" \
10881		&& cf_fix_cppflags=no
10882	;;
10883esac
10884done
10885
10886if test -n "$cf_new_cflags" ; then
10887
10888	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10889	CFLAGS="${CFLAGS}$cf_new_cflags"
10890
10891fi
10892
10893if test -n "$cf_new_cppflags" ; then
10894
10895	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10896	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10897
10898fi
10899
10900if test -n "$cf_new_extra_cppflags" ; then
10901
10902	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10903	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10904
10905fi
10906
10907cf_add_libs="$LIBS"
10908# reverse order
10909cf_add_0lib=
10910for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10911# filter duplicates
10912for cf_add_1lib in $cf_add_0lib; do
10913	for cf_add_2lib in $cf_add_libs; do
10914		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10915			cf_add_1lib=
10916			break
10917		fi
10918	done
10919	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10920done
10921LIBS="$cf_add_libs"
10922
10923	:
10924else
10925	cf_pkgconfig_incs=
10926	cf_pkgconfig_libs=
10927	{ echo "$as_me:10927: WARNING: unable to find Xt library" >&5
10928echo "$as_me: WARNING: unable to find Xt library" >&2;}
10929fi
10930
10931else
10932	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10933fi
10934
10935cf_have_X_LIBS=no
10936
10937if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
10938	test -n "$verbose" && echo "	found package xt" 1>&6
10939
10940echo "${as_me:-configure}:10940: testing found package xt ..." 1>&5
10941
10942	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
10943	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
10944	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
10945
10946echo "${as_me:-configure}:10946: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10947
10948	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
10949
10950echo "${as_me:-configure}:10950: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
10951
10952cf_fix_cppflags=no
10953cf_new_cflags=
10954cf_new_cppflags=
10955cf_new_extra_cppflags=
10956
10957for cf_add_cflags in $cf_pkgconfig_incs
10958do
10959case "$cf_fix_cppflags" in
10960(no)
10961	case "$cf_add_cflags" in
10962	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10963		case "$cf_add_cflags" in
10964		(-D*)
10965			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10966
10967			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10968				&& test -z "${cf_tst_cflags}" \
10969				&& cf_fix_cppflags=yes
10970
10971			if test "$cf_fix_cppflags" = yes ; then
10972
10973	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10974	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10975
10976				continue
10977			elif test "${cf_tst_cflags}" = "\"'" ; then
10978
10979	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10980	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10981
10982				continue
10983			fi
10984			;;
10985		esac
10986		case "$CPPFLAGS" in
10987		(*$cf_add_cflags)
10988			;;
10989		(*)
10990			case "$cf_add_cflags" in
10991			(-D*)
10992				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10993
10994CPPFLAGS=`echo "$CPPFLAGS" | \
10995	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10996		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10997
10998				;;
10999			esac
11000
11001	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11002	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11003
11004			;;
11005		esac
11006		;;
11007	(*)
11008
11009	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11010	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11011
11012		;;
11013	esac
11014	;;
11015(yes)
11016
11017	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11018	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11019
11020	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11021
11022	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11023		&& test -z "${cf_tst_cflags}" \
11024		&& cf_fix_cppflags=no
11025	;;
11026esac
11027done
11028
11029if test -n "$cf_new_cflags" ; then
11030
11031	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11032	CFLAGS="${CFLAGS}$cf_new_cflags"
11033
11034fi
11035
11036if test -n "$cf_new_cppflags" ; then
11037
11038	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11039	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11040
11041fi
11042
11043if test -n "$cf_new_extra_cppflags" ; then
11044
11045	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11046	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11047
11048fi
11049
11050cf_add_libs="$LIBS"
11051# reverse order
11052cf_add_0lib=
11053for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11054# filter duplicates
11055for cf_add_1lib in $cf_add_0lib; do
11056	for cf_add_2lib in $cf_add_libs; do
11057		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11058			cf_add_1lib=
11059			break
11060		fi
11061	done
11062	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11063done
11064LIBS="$cf_add_libs"
11065
11066	case "x$LIBS" in
11067	(*-lX11*)
11068		;;
11069	(*)
11070# we have an "xt" package, but it may omit Xt's dependency on X11
11071echo "$as_me:11071: checking for usable X dependency" >&5
11072echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11073if test "${cf_cv_xt_x11_compat+set}" = set; then
11074  echo $ECHO_N "(cached) $ECHO_C" >&6
11075else
11076
11077cat >"conftest.$ac_ext" <<_ACEOF
11078#line 11078 "configure"
11079#include "confdefs.h"
11080
11081#include <X11/Xlib.h>
11082
11083int
11084main (void)
11085{
11086
11087	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11088	int rc2 = XClearWindow((Display*) 0, (Window) 0);
11089	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11090	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11091
11092  ;
11093  return 0;
11094}
11095_ACEOF
11096rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11097if { (eval echo "$as_me:11097: \"$ac_link\"") >&5
11098  (eval $ac_link) 2>&5
11099  ac_status=$?
11100  echo "$as_me:11100: \$? = $ac_status" >&5
11101  (exit "$ac_status"); } &&
11102         { ac_try='test -s "conftest$ac_exeext"'
11103  { (eval echo "$as_me:11103: \"$ac_try\"") >&5
11104  (eval $ac_try) 2>&5
11105  ac_status=$?
11106  echo "$as_me:11106: \$? = $ac_status" >&5
11107  (exit "$ac_status"); }; }; then
11108  cf_cv_xt_x11_compat=yes
11109else
11110  echo "$as_me: failed program was:" >&5
11111cat "conftest.$ac_ext" >&5
11112cf_cv_xt_x11_compat=no
11113fi
11114rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11115fi
11116echo "$as_me:11116: result: $cf_cv_xt_x11_compat" >&5
11117echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11118		if test "$cf_cv_xt_x11_compat" = no
11119		then
11120			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
11121
11122echo "${as_me:-configure}:11122: testing work around broken X11 dependency ..." 1>&5
11123
11124			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11125
11126if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
11127	test -n "$verbose" && echo "	found package x11" 1>&6
11128
11129echo "${as_me:-configure}:11129: testing found package x11 ..." 1>&5
11130
11131	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
11132	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
11133	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11134
11135echo "${as_me:-configure}:11135: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11136
11137	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11138
11139echo "${as_me:-configure}:11139: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11140
11141cf_fix_cppflags=no
11142cf_new_cflags=
11143cf_new_cppflags=
11144cf_new_extra_cppflags=
11145
11146for cf_add_cflags in $cf_pkgconfig_incs
11147do
11148case "$cf_fix_cppflags" in
11149(no)
11150	case "$cf_add_cflags" in
11151	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11152		case "$cf_add_cflags" in
11153		(-D*)
11154			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11155
11156			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11157				&& test -z "${cf_tst_cflags}" \
11158				&& cf_fix_cppflags=yes
11159
11160			if test "$cf_fix_cppflags" = yes ; then
11161
11162	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11163	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11164
11165				continue
11166			elif test "${cf_tst_cflags}" = "\"'" ; then
11167
11168	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11169	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11170
11171				continue
11172			fi
11173			;;
11174		esac
11175		case "$CPPFLAGS" in
11176		(*$cf_add_cflags)
11177			;;
11178		(*)
11179			case "$cf_add_cflags" in
11180			(-D*)
11181				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11182
11183CPPFLAGS=`echo "$CPPFLAGS" | \
11184	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11185		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11186
11187				;;
11188			esac
11189
11190	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11191	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11192
11193			;;
11194		esac
11195		;;
11196	(*)
11197
11198	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11199	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11200
11201		;;
11202	esac
11203	;;
11204(yes)
11205
11206	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11207	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11208
11209	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11210
11211	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11212		&& test -z "${cf_tst_cflags}" \
11213		&& cf_fix_cppflags=no
11214	;;
11215esac
11216done
11217
11218if test -n "$cf_new_cflags" ; then
11219
11220	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11221	CFLAGS="${CFLAGS}$cf_new_cflags"
11222
11223fi
11224
11225if test -n "$cf_new_cppflags" ; then
11226
11227	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11228	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11229
11230fi
11231
11232if test -n "$cf_new_extra_cppflags" ; then
11233
11234	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11235	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11236
11237fi
11238
11239cf_add_libs="$LIBS"
11240# reverse order
11241cf_add_0lib=
11242for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11243# filter duplicates
11244for cf_add_1lib in $cf_add_0lib; do
11245	for cf_add_2lib in $cf_add_libs; do
11246		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11247			cf_add_1lib=
11248			break
11249		fi
11250	done
11251	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11252done
11253LIBS="$cf_add_libs"
11254
11255	:
11256else
11257	cf_pkgconfig_incs=
11258	cf_pkgconfig_libs=
11259
11260test -n "$verbose" && echo "	...before $LIBS" 1>&6
11261
11262echo "${as_me:-configure}:11262: testing ...before $LIBS ..." 1>&5
11263
11264LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
11265test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11266
11267echo "${as_me:-configure}:11267: testing ...after  $LIBS ..." 1>&5
11268
11269fi
11270
11271		fi
11272		;;
11273	esac
11274
11275echo "$as_me:11275: checking for usable X Toolkit package" >&5
11276echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
11277if test "${cf_cv_xt_ice_compat+set}" = set; then
11278  echo $ECHO_N "(cached) $ECHO_C" >&6
11279else
11280
11281cat >"conftest.$ac_ext" <<_ACEOF
11282#line 11282 "configure"
11283#include "confdefs.h"
11284
11285#include <X11/Shell.h>
11286
11287int
11288main (void)
11289{
11290int num = IceConnectionNumber(0); (void) num
11291
11292  ;
11293  return 0;
11294}
11295_ACEOF
11296rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11297if { (eval echo "$as_me:11297: \"$ac_link\"") >&5
11298  (eval $ac_link) 2>&5
11299  ac_status=$?
11300  echo "$as_me:11300: \$? = $ac_status" >&5
11301  (exit "$ac_status"); } &&
11302         { ac_try='test -s "conftest$ac_exeext"'
11303  { (eval echo "$as_me:11303: \"$ac_try\"") >&5
11304  (eval $ac_try) 2>&5
11305  ac_status=$?
11306  echo "$as_me:11306: \$? = $ac_status" >&5
11307  (exit "$ac_status"); }; }; then
11308  cf_cv_xt_ice_compat=yes
11309else
11310  echo "$as_me: failed program was:" >&5
11311cat "conftest.$ac_ext" >&5
11312cf_cv_xt_ice_compat=no
11313fi
11314rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11315fi
11316echo "$as_me:11316: result: $cf_cv_xt_ice_compat" >&5
11317echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
11318
11319	if test "$cf_cv_xt_ice_compat" = no
11320	then
11321		# workaround for broken ".pc" files used for X Toolkit.
11322		case "x$X_PRE_LIBS" in
11323		(*-lICE*)
11324			case "x$LIBS" in
11325			(*-lICE*)
11326				;;
11327			(*)
11328				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
11329
11330echo "${as_me:-configure}:11330: testing work around broken ICE dependency ..." 1>&5
11331
11332if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
11333	test -n "$verbose" && echo "	found package ice" 1>&6
11334
11335echo "${as_me:-configure}:11335: testing found package ice ..." 1>&5
11336
11337	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
11338	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
11339	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11340
11341echo "${as_me:-configure}:11341: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11342
11343	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
11344
11345echo "${as_me:-configure}:11345: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11346
11347cf_fix_cppflags=no
11348cf_new_cflags=
11349cf_new_cppflags=
11350cf_new_extra_cppflags=
11351
11352for cf_add_cflags in $cf_pkgconfig_incs
11353do
11354case "$cf_fix_cppflags" in
11355(no)
11356	case "$cf_add_cflags" in
11357	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11358		case "$cf_add_cflags" in
11359		(-D*)
11360			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11361
11362			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11363				&& test -z "${cf_tst_cflags}" \
11364				&& cf_fix_cppflags=yes
11365
11366			if test "$cf_fix_cppflags" = yes ; then
11367
11368	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11369	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11370
11371				continue
11372			elif test "${cf_tst_cflags}" = "\"'" ; then
11373
11374	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11375	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11376
11377				continue
11378			fi
11379			;;
11380		esac
11381		case "$CPPFLAGS" in
11382		(*$cf_add_cflags)
11383			;;
11384		(*)
11385			case "$cf_add_cflags" in
11386			(-D*)
11387				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11388
11389CPPFLAGS=`echo "$CPPFLAGS" | \
11390	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11391		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11392
11393				;;
11394			esac
11395
11396	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11397	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11398
11399			;;
11400		esac
11401		;;
11402	(*)
11403
11404	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11405	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11406
11407		;;
11408	esac
11409	;;
11410(yes)
11411
11412	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11413	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11414
11415	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11416
11417	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11418		&& test -z "${cf_tst_cflags}" \
11419		&& cf_fix_cppflags=no
11420	;;
11421esac
11422done
11423
11424if test -n "$cf_new_cflags" ; then
11425
11426	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11427	CFLAGS="${CFLAGS}$cf_new_cflags"
11428
11429fi
11430
11431if test -n "$cf_new_cppflags" ; then
11432
11433	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11434	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11435
11436fi
11437
11438if test -n "$cf_new_extra_cppflags" ; then
11439
11440	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11441	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11442
11443fi
11444
11445cf_add_libs="$LIBS"
11446# reverse order
11447cf_add_0lib=
11448for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11449# filter duplicates
11450for cf_add_1lib in $cf_add_0lib; do
11451	for cf_add_2lib in $cf_add_libs; do
11452		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11453			cf_add_1lib=
11454			break
11455		fi
11456	done
11457	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11458done
11459LIBS="$cf_add_libs"
11460
11461if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
11462	test -n "$verbose" && echo "	found package sm" 1>&6
11463
11464echo "${as_me:-configure}:11464: testing found package sm ..." 1>&5
11465
11466	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
11467	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
11468	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11469
11470echo "${as_me:-configure}:11470: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11471
11472	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11473
11474echo "${as_me:-configure}:11474: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11475
11476cf_fix_cppflags=no
11477cf_new_cflags=
11478cf_new_cppflags=
11479cf_new_extra_cppflags=
11480
11481for cf_add_cflags in $cf_pkgconfig_incs
11482do
11483case "$cf_fix_cppflags" in
11484(no)
11485	case "$cf_add_cflags" in
11486	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11487		case "$cf_add_cflags" in
11488		(-D*)
11489			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11490
11491			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11492				&& test -z "${cf_tst_cflags}" \
11493				&& cf_fix_cppflags=yes
11494
11495			if test "$cf_fix_cppflags" = yes ; then
11496
11497	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11498	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11499
11500				continue
11501			elif test "${cf_tst_cflags}" = "\"'" ; then
11502
11503	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11504	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11505
11506				continue
11507			fi
11508			;;
11509		esac
11510		case "$CPPFLAGS" in
11511		(*$cf_add_cflags)
11512			;;
11513		(*)
11514			case "$cf_add_cflags" in
11515			(-D*)
11516				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11517
11518CPPFLAGS=`echo "$CPPFLAGS" | \
11519	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11520		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11521
11522				;;
11523			esac
11524
11525	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11526	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11527
11528			;;
11529		esac
11530		;;
11531	(*)
11532
11533	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11534	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11535
11536		;;
11537	esac
11538	;;
11539(yes)
11540
11541	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11542	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11543
11544	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11545
11546	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11547		&& test -z "${cf_tst_cflags}" \
11548		&& cf_fix_cppflags=no
11549	;;
11550esac
11551done
11552
11553if test -n "$cf_new_cflags" ; then
11554
11555	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11556	CFLAGS="${CFLAGS}$cf_new_cflags"
11557
11558fi
11559
11560if test -n "$cf_new_cppflags" ; then
11561
11562	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11563	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11564
11565fi
11566
11567if test -n "$cf_new_extra_cppflags" ; then
11568
11569	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11570	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11571
11572fi
11573
11574cf_add_libs="$LIBS"
11575# reverse order
11576cf_add_0lib=
11577for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11578# filter duplicates
11579for cf_add_1lib in $cf_add_0lib; do
11580	for cf_add_2lib in $cf_add_libs; do
11581		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11582			cf_add_1lib=
11583			break
11584		fi
11585	done
11586	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11587done
11588LIBS="$cf_add_libs"
11589
11590	:
11591else
11592	cf_pkgconfig_incs=
11593	cf_pkgconfig_libs=
11594	:
11595fi
11596
11597else
11598	cf_pkgconfig_incs=
11599	cf_pkgconfig_libs=
11600
11601test -n "$verbose" && echo "	...before $LIBS" 1>&6
11602
11603echo "${as_me:-configure}:11603: testing ...before $LIBS ..." 1>&5
11604
11605LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
11606test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11607
11608echo "${as_me:-configure}:11608: testing ...after  $LIBS ..." 1>&5
11609
11610fi
11611
11612				;;
11613			esac
11614			;;
11615		esac
11616	fi
11617
11618	cf_have_X_LIBS=yes
11619
11620else
11621	cf_pkgconfig_incs=
11622	cf_pkgconfig_libs=
11623
11624	LDFLAGS="$X_LIBS $LDFLAGS"
11625
11626test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
11627
11628echo "${as_me:-configure}:11628: testing checking additions to CFLAGS ..." 1>&5
11629
11630cf_check_cflags="$CFLAGS"
11631cf_check_cppflags="$CPPFLAGS"
11632
11633cf_fix_cppflags=no
11634cf_new_cflags=
11635cf_new_cppflags=
11636cf_new_extra_cppflags=
11637
11638for cf_add_cflags in $X_CFLAGS
11639do
11640case "$cf_fix_cppflags" in
11641(no)
11642	case "$cf_add_cflags" in
11643	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11644		case "$cf_add_cflags" in
11645		(-D*)
11646			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11647
11648			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11649				&& test -z "${cf_tst_cflags}" \
11650				&& cf_fix_cppflags=yes
11651
11652			if test "$cf_fix_cppflags" = yes ; then
11653
11654	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11655	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11656
11657				continue
11658			elif test "${cf_tst_cflags}" = "\"'" ; then
11659
11660	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11661	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11662
11663				continue
11664			fi
11665			;;
11666		esac
11667		case "$CPPFLAGS" in
11668		(*$cf_add_cflags)
11669			;;
11670		(*)
11671			case "$cf_add_cflags" in
11672			(-D*)
11673				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11674
11675CPPFLAGS=`echo "$CPPFLAGS" | \
11676	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11677		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11678
11679				;;
11680			esac
11681
11682	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11683	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11684
11685			;;
11686		esac
11687		;;
11688	(*)
11689
11690	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11691	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11692
11693		;;
11694	esac
11695	;;
11696(yes)
11697
11698	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11699	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11700
11701	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11702
11703	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11704		&& test -z "${cf_tst_cflags}" \
11705		&& cf_fix_cppflags=no
11706	;;
11707esac
11708done
11709
11710if test -n "$cf_new_cflags" ; then
11711	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
11712
11713echo "${as_me:-configure}:11713: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
11714
11715	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11716	CFLAGS="${CFLAGS}$cf_new_cflags"
11717
11718fi
11719
11720if test -n "$cf_new_cppflags" ; then
11721	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
11722
11723echo "${as_me:-configure}:11723: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
11724
11725	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11726	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11727
11728fi
11729
11730if test -n "$cf_new_extra_cppflags" ; then
11731	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
11732
11733echo "${as_me:-configure}:11733: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
11734
11735	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11736	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11737
11738fi
11739
11740if test "x$cf_check_cflags" != "x$CFLAGS" ; then
11741cat >"conftest.$ac_ext" <<_ACEOF
11742#line 11742 "configure"
11743#include "confdefs.h"
11744#include <stdio.h>
11745int
11746main (void)
11747{
11748printf("Hello world");
11749  ;
11750  return 0;
11751}
11752_ACEOF
11753rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11754if { (eval echo "$as_me:11754: \"$ac_link\"") >&5
11755  (eval $ac_link) 2>&5
11756  ac_status=$?
11757  echo "$as_me:11757: \$? = $ac_status" >&5
11758  (exit "$ac_status"); } &&
11759         { ac_try='test -s "conftest$ac_exeext"'
11760  { (eval echo "$as_me:11760: \"$ac_try\"") >&5
11761  (eval $ac_try) 2>&5
11762  ac_status=$?
11763  echo "$as_me:11763: \$? = $ac_status" >&5
11764  (exit "$ac_status"); }; }; then
11765  :
11766else
11767  echo "$as_me: failed program was:" >&5
11768cat "conftest.$ac_ext" >&5
11769test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
11770
11771echo "${as_me:-configure}:11771: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
11772
11773	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
11774		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
11775
11776echo "${as_me:-configure}:11776: testing but keeping change to \$CPPFLAGS ..." 1>&5
11777
11778	 fi
11779	 CFLAGS="$cf_check_cflags"
11780fi
11781rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11782fi
11783
11784	echo "$as_me:11784: checking for XOpenDisplay" >&5
11785echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
11786if test "${ac_cv_func_XOpenDisplay+set}" = set; then
11787  echo $ECHO_N "(cached) $ECHO_C" >&6
11788else
11789  cat >"conftest.$ac_ext" <<_ACEOF
11790#line 11790 "configure"
11791#include "confdefs.h"
11792#define XOpenDisplay autoconf_temporary
11793#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11794#undef XOpenDisplay
11795
11796#ifdef __cplusplus
11797extern "C"
11798#endif
11799
11800/* We use char because int might match the return type of a gcc2
11801   builtin and then its argument prototype would still apply.  */
11802char XOpenDisplay (void);
11803
11804int
11805main (void)
11806{
11807
11808/* The GNU C library defines stubs for functions which it implements
11809    to always fail with ENOSYS.  Some functions are actually named
11810    something starting with __ and the normal name is an alias.  */
11811#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
11812#error found stub for XOpenDisplay
11813#endif
11814
11815	return XOpenDisplay ();
11816  ;
11817  return 0;
11818}
11819_ACEOF
11820rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11821if { (eval echo "$as_me:11821: \"$ac_link\"") >&5
11822  (eval $ac_link) 2>&5
11823  ac_status=$?
11824  echo "$as_me:11824: \$? = $ac_status" >&5
11825  (exit "$ac_status"); } &&
11826         { ac_try='test -s "conftest$ac_exeext"'
11827  { (eval echo "$as_me:11827: \"$ac_try\"") >&5
11828  (eval $ac_try) 2>&5
11829  ac_status=$?
11830  echo "$as_me:11830: \$? = $ac_status" >&5
11831  (exit "$ac_status"); }; }; then
11832  ac_cv_func_XOpenDisplay=yes
11833else
11834  echo "$as_me: failed program was:" >&5
11835cat "conftest.$ac_ext" >&5
11836ac_cv_func_XOpenDisplay=no
11837fi
11838rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11839fi
11840echo "$as_me:11840: result: $ac_cv_func_XOpenDisplay" >&5
11841echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
11842if test "$ac_cv_func_XOpenDisplay" = yes; then
11843  :
11844else
11845
11846	echo "$as_me:11846: checking for XOpenDisplay in -lX11" >&5
11847echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
11848if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
11849  echo $ECHO_N "(cached) $ECHO_C" >&6
11850else
11851  ac_check_lib_save_LIBS=$LIBS
11852LIBS="-lX11  $LIBS"
11853cat >"conftest.$ac_ext" <<_ACEOF
11854#line 11854 "configure"
11855#include "confdefs.h"
11856
11857/* Override any gcc2 internal prototype to avoid an error.  */
11858#ifdef __cplusplus
11859extern "C"
11860#endif
11861/* We use char because int might match the return type of a gcc2
11862   builtin and then its argument prototype would still apply.  */
11863char XOpenDisplay ();
11864int
11865main (void)
11866{
11867XOpenDisplay ();
11868  ;
11869  return 0;
11870}
11871_ACEOF
11872rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11873if { (eval echo "$as_me:11873: \"$ac_link\"") >&5
11874  (eval $ac_link) 2>&5
11875  ac_status=$?
11876  echo "$as_me:11876: \$? = $ac_status" >&5
11877  (exit "$ac_status"); } &&
11878         { ac_try='test -s "conftest$ac_exeext"'
11879  { (eval echo "$as_me:11879: \"$ac_try\"") >&5
11880  (eval $ac_try) 2>&5
11881  ac_status=$?
11882  echo "$as_me:11882: \$? = $ac_status" >&5
11883  (exit "$ac_status"); }; }; then
11884  ac_cv_lib_X11_XOpenDisplay=yes
11885else
11886  echo "$as_me: failed program was:" >&5
11887cat "conftest.$ac_ext" >&5
11888ac_cv_lib_X11_XOpenDisplay=no
11889fi
11890rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11891LIBS=$ac_check_lib_save_LIBS
11892fi
11893echo "$as_me:11893: result: $ac_cv_lib_X11_XOpenDisplay" >&5
11894echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
11895if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
11896
11897cf_add_libs="$LIBS"
11898# reverse order
11899cf_add_0lib=
11900for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11901# filter duplicates
11902for cf_add_1lib in $cf_add_0lib; do
11903	for cf_add_2lib in $cf_add_libs; do
11904		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11905			cf_add_1lib=
11906			break
11907		fi
11908	done
11909	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11910done
11911LIBS="$cf_add_libs"
11912
11913fi
11914
11915fi
11916
11917	echo "$as_me:11917: checking for XtAppInitialize" >&5
11918echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
11919if test "${ac_cv_func_XtAppInitialize+set}" = set; then
11920  echo $ECHO_N "(cached) $ECHO_C" >&6
11921else
11922  cat >"conftest.$ac_ext" <<_ACEOF
11923#line 11923 "configure"
11924#include "confdefs.h"
11925#define XtAppInitialize autoconf_temporary
11926#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11927#undef XtAppInitialize
11928
11929#ifdef __cplusplus
11930extern "C"
11931#endif
11932
11933/* We use char because int might match the return type of a gcc2
11934   builtin and then its argument prototype would still apply.  */
11935char XtAppInitialize (void);
11936
11937int
11938main (void)
11939{
11940
11941/* The GNU C library defines stubs for functions which it implements
11942    to always fail with ENOSYS.  Some functions are actually named
11943    something starting with __ and the normal name is an alias.  */
11944#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
11945#error found stub for XtAppInitialize
11946#endif
11947
11948	return XtAppInitialize ();
11949  ;
11950  return 0;
11951}
11952_ACEOF
11953rm -f "conftest.$ac_objext" "conftest$ac_exeext"
11954if { (eval echo "$as_me:11954: \"$ac_link\"") >&5
11955  (eval $ac_link) 2>&5
11956  ac_status=$?
11957  echo "$as_me:11957: \$? = $ac_status" >&5
11958  (exit "$ac_status"); } &&
11959         { ac_try='test -s "conftest$ac_exeext"'
11960  { (eval echo "$as_me:11960: \"$ac_try\"") >&5
11961  (eval $ac_try) 2>&5
11962  ac_status=$?
11963  echo "$as_me:11963: \$? = $ac_status" >&5
11964  (exit "$ac_status"); }; }; then
11965  ac_cv_func_XtAppInitialize=yes
11966else
11967  echo "$as_me: failed program was:" >&5
11968cat "conftest.$ac_ext" >&5
11969ac_cv_func_XtAppInitialize=no
11970fi
11971rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
11972fi
11973echo "$as_me:11973: result: $ac_cv_func_XtAppInitialize" >&5
11974echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
11975if test "$ac_cv_func_XtAppInitialize" = yes; then
11976  :
11977else
11978
11979	echo "$as_me:11979: checking for XtAppInitialize in -lXt" >&5
11980echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
11981if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
11982  echo $ECHO_N "(cached) $ECHO_C" >&6
11983else
11984  ac_check_lib_save_LIBS=$LIBS
11985LIBS="-lXt  $LIBS"
11986cat >"conftest.$ac_ext" <<_ACEOF
11987#line 11987 "configure"
11988#include "confdefs.h"
11989
11990/* Override any gcc2 internal prototype to avoid an error.  */
11991#ifdef __cplusplus
11992extern "C"
11993#endif
11994/* We use char because int might match the return type of a gcc2
11995   builtin and then its argument prototype would still apply.  */
11996char XtAppInitialize ();
11997int
11998main (void)
11999{
12000XtAppInitialize ();
12001  ;
12002  return 0;
12003}
12004_ACEOF
12005rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12006if { (eval echo "$as_me:12006: \"$ac_link\"") >&5
12007  (eval $ac_link) 2>&5
12008  ac_status=$?
12009  echo "$as_me:12009: \$? = $ac_status" >&5
12010  (exit "$ac_status"); } &&
12011         { ac_try='test -s "conftest$ac_exeext"'
12012  { (eval echo "$as_me:12012: \"$ac_try\"") >&5
12013  (eval $ac_try) 2>&5
12014  ac_status=$?
12015  echo "$as_me:12015: \$? = $ac_status" >&5
12016  (exit "$ac_status"); }; }; then
12017  ac_cv_lib_Xt_XtAppInitialize=yes
12018else
12019  echo "$as_me: failed program was:" >&5
12020cat "conftest.$ac_ext" >&5
12021ac_cv_lib_Xt_XtAppInitialize=no
12022fi
12023rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12024LIBS=$ac_check_lib_save_LIBS
12025fi
12026echo "$as_me:12026: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12027echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12028if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
12029
12030cat >>confdefs.h <<\EOF
12031#define HAVE_LIBXT 1
12032EOF
12033
12034		 cf_have_X_LIBS=Xt
12035		 LIBS="-lXt $LIBS"
12036fi
12037
12038fi
12039
12040fi
12041
12042if test "$cf_have_X_LIBS" = no ; then
12043	{ echo "$as_me:12043: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12044test program.  You will have to check and add the proper libraries by hand
12045to makefile." >&5
12046echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12047test program.  You will have to check and add the proper libraries by hand
12048to makefile." >&2;}
12049fi
12050
12051for ac_header in \
12052	X11/DECkeysym.h \
12053	X11/Sunkeysym.h \
12054	X11/XF86keysym.h \
12055	X11/XKBlib.h \
12056	X11/TranslateI.h \
12057	X11/Xpoll.h \
12058	X11/extensions/XKB.h \
12059
12060do
12061as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12062echo "$as_me:12062: checking for $ac_header" >&5
12063echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12064if eval "test \"\${$as_ac_Header+set}\" = set"; then
12065  echo $ECHO_N "(cached) $ECHO_C" >&6
12066else
12067  cat >"conftest.$ac_ext" <<_ACEOF
12068#line 12068 "configure"
12069#include "confdefs.h"
12070#include <$ac_header>
12071_ACEOF
12072if { (eval echo "$as_me:12072: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12073  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12074  ac_status=$?
12075  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12076  rm -f conftest.er1
12077  cat conftest.err >&5
12078  echo "$as_me:12078: \$? = $ac_status" >&5
12079  (exit "$ac_status"); } >/dev/null; then
12080  if test -s conftest.err; then
12081    ac_cpp_err=$ac_c_preproc_warn_flag
12082  else
12083    ac_cpp_err=
12084  fi
12085else
12086  ac_cpp_err=yes
12087fi
12088if test -z "$ac_cpp_err"; then
12089  eval "$as_ac_Header=yes"
12090else
12091  echo "$as_me: failed program was:" >&5
12092  cat "conftest.$ac_ext" >&5
12093  eval "$as_ac_Header=no"
12094fi
12095rm -f conftest.err "conftest.$ac_ext"
12096fi
12097echo "$as_me:12097: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12098echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12099if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12100  cat >>confdefs.h <<EOF
12101#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12102EOF
12103
12104fi
12105done
12106
12107ICON_SUFFIX=.xbm
12108
12109cf_save_cppflags="${CPPFLAGS}"
12110cf_save_ldflags="${LDFLAGS}"
12111
12112echo "$as_me:12112: checking if you want to use the Xpm library for colored icon" >&5
12113echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
12114
12115# Check whether --with-xpm or --without-xpm was given.
12116if test "${with_xpm+set}" = set; then
12117  withval="$with_xpm"
12118  cf_Xpm_library="$withval"
12119else
12120  cf_Xpm_library=yes
12121fi;
12122echo "$as_me:12122: result: $cf_Xpm_library" >&5
12123echo "${ECHO_T}$cf_Xpm_library" >&6
12124
12125if test "$cf_Xpm_library" != no ; then
12126    if test "$cf_Xpm_library" != yes ; then
12127	CPPFLAGS="$CPPFLAGS -I$withval/include"
12128	LDFLAGS="$LDFLAGS -L$withval/lib"
12129    fi
12130    echo "$as_me:12130: checking for X11/xpm.h" >&5
12131echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
12132if test "${ac_cv_header_X11_xpm_h+set}" = set; then
12133  echo $ECHO_N "(cached) $ECHO_C" >&6
12134else
12135  cat >"conftest.$ac_ext" <<_ACEOF
12136#line 12136 "configure"
12137#include "confdefs.h"
12138#include <X11/xpm.h>
12139_ACEOF
12140if { (eval echo "$as_me:12140: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12141  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12142  ac_status=$?
12143  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12144  rm -f conftest.er1
12145  cat conftest.err >&5
12146  echo "$as_me:12146: \$? = $ac_status" >&5
12147  (exit "$ac_status"); } >/dev/null; then
12148  if test -s conftest.err; then
12149    ac_cpp_err=$ac_c_preproc_warn_flag
12150  else
12151    ac_cpp_err=
12152  fi
12153else
12154  ac_cpp_err=yes
12155fi
12156if test -z "$ac_cpp_err"; then
12157  ac_cv_header_X11_xpm_h=yes
12158else
12159  echo "$as_me: failed program was:" >&5
12160  cat "conftest.$ac_ext" >&5
12161  ac_cv_header_X11_xpm_h=no
12162fi
12163rm -f conftest.err "conftest.$ac_ext"
12164fi
12165echo "$as_me:12165: result: $ac_cv_header_X11_xpm_h" >&5
12166echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
12167if test "$ac_cv_header_X11_xpm_h" = yes; then
12168
12169	echo "$as_me:12169: checking for XpmCreatePixmapFromData in -lXpm" >&5
12170echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
12171if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
12172  echo $ECHO_N "(cached) $ECHO_C" >&6
12173else
12174  ac_check_lib_save_LIBS=$LIBS
12175LIBS="-lXpm -lX11 $X_LIBS $LIBS"
12176cat >"conftest.$ac_ext" <<_ACEOF
12177#line 12177 "configure"
12178#include "confdefs.h"
12179
12180/* Override any gcc2 internal prototype to avoid an error.  */
12181#ifdef __cplusplus
12182extern "C"
12183#endif
12184/* We use char because int might match the return type of a gcc2
12185   builtin and then its argument prototype would still apply.  */
12186char XpmCreatePixmapFromData ();
12187int
12188main (void)
12189{
12190XpmCreatePixmapFromData ();
12191  ;
12192  return 0;
12193}
12194_ACEOF
12195rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12196if { (eval echo "$as_me:12196: \"$ac_link\"") >&5
12197  (eval $ac_link) 2>&5
12198  ac_status=$?
12199  echo "$as_me:12199: \$? = $ac_status" >&5
12200  (exit "$ac_status"); } &&
12201         { ac_try='test -s "conftest$ac_exeext"'
12202  { (eval echo "$as_me:12202: \"$ac_try\"") >&5
12203  (eval $ac_try) 2>&5
12204  ac_status=$?
12205  echo "$as_me:12205: \$? = $ac_status" >&5
12206  (exit "$ac_status"); }; }; then
12207  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
12208else
12209  echo "$as_me: failed program was:" >&5
12210cat "conftest.$ac_ext" >&5
12211ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
12212fi
12213rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12214LIBS=$ac_check_lib_save_LIBS
12215fi
12216echo "$as_me:12216: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
12217echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
12218if test "$ac_cv_lib_Xpm_XpmCreatePixmapFromData" = yes; then
12219
12220cat >>confdefs.h <<\EOF
12221#define HAVE_LIBXPM 1
12222EOF
12223
12224	    ICON_SUFFIX=.xpm
12225	    LIBS="-lXpm $LIBS"
12226else
12227  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12228fi
12229
12230else
12231  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
12232fi
12233
12234fi
12235
12236echo "$as_me:12236: checking if you want to use the Xinerama extension" >&5
12237echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
12238
12239# Check whether --with-xinerama or --without-xinerama was given.
12240if test "${with_xinerama+set}" = set; then
12241  withval="$with_xinerama"
12242  cf_with_xinerama="$withval"
12243else
12244  cf_with_xinerama=yes
12245fi;
12246echo "$as_me:12246: result: $cf_with_xinerama" >&5
12247echo "${ECHO_T}$cf_with_xinerama" >&6
12248if test "$cf_with_xinerama" = yes; then
12249
12250if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xinerama"; then
12251	test -n "$verbose" && echo "	found package xinerama" 1>&6
12252
12253echo "${as_me:-configure}:12253: testing found package xinerama ..." 1>&5
12254
12255	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xinerama" 2>/dev/null`"
12256	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xinerama" 2>/dev/null`"
12257	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
12258
12259echo "${as_me:-configure}:12259: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12260
12261	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
12262
12263echo "${as_me:-configure}:12263: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
12264
12265cf_fix_cppflags=no
12266cf_new_cflags=
12267cf_new_cppflags=
12268cf_new_extra_cppflags=
12269
12270for cf_add_cflags in $cf_pkgconfig_incs
12271do
12272case "$cf_fix_cppflags" in
12273(no)
12274	case "$cf_add_cflags" in
12275	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12276		case "$cf_add_cflags" in
12277		(-D*)
12278			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12279
12280			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12281				&& test -z "${cf_tst_cflags}" \
12282				&& cf_fix_cppflags=yes
12283
12284			if test "$cf_fix_cppflags" = yes ; then
12285
12286	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12287	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12288
12289				continue
12290			elif test "${cf_tst_cflags}" = "\"'" ; then
12291
12292	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12293	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12294
12295				continue
12296			fi
12297			;;
12298		esac
12299		case "$CPPFLAGS" in
12300		(*$cf_add_cflags)
12301			;;
12302		(*)
12303			case "$cf_add_cflags" in
12304			(-D*)
12305				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12306
12307CPPFLAGS=`echo "$CPPFLAGS" | \
12308	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12309		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12310
12311				;;
12312			esac
12313
12314	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12315	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12316
12317			;;
12318		esac
12319		;;
12320	(*)
12321
12322	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12323	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12324
12325		;;
12326	esac
12327	;;
12328(yes)
12329
12330	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12331	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12332
12333	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12334
12335	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12336		&& test -z "${cf_tst_cflags}" \
12337		&& cf_fix_cppflags=no
12338	;;
12339esac
12340done
12341
12342if test -n "$cf_new_cflags" ; then
12343
12344	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12345	CFLAGS="${CFLAGS}$cf_new_cflags"
12346
12347fi
12348
12349if test -n "$cf_new_cppflags" ; then
12350
12351	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12352	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12353
12354fi
12355
12356if test -n "$cf_new_extra_cppflags" ; then
12357
12358	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12359	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12360
12361fi
12362
12363cf_add_libs="$LIBS"
12364# reverse order
12365cf_add_0lib=
12366for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12367# filter duplicates
12368for cf_add_1lib in $cf_add_0lib; do
12369	for cf_add_2lib in $cf_add_libs; do
12370		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12371			cf_add_1lib=
12372			break
12373		fi
12374	done
12375	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12376done
12377LIBS="$cf_add_libs"
12378
12379	cat >>confdefs.h <<\EOF
12380#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
12381EOF
12382
12383else
12384	cf_pkgconfig_incs=
12385	cf_pkgconfig_libs=
12386
12387	echo "$as_me:12387: checking for XineramaQueryScreens in -lXinerama" >&5
12388echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
12389if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
12390  echo $ECHO_N "(cached) $ECHO_C" >&6
12391else
12392  ac_check_lib_save_LIBS=$LIBS
12393LIBS="-lXinerama  $LIBS"
12394cat >"conftest.$ac_ext" <<_ACEOF
12395#line 12395 "configure"
12396#include "confdefs.h"
12397
12398/* Override any gcc2 internal prototype to avoid an error.  */
12399#ifdef __cplusplus
12400extern "C"
12401#endif
12402/* We use char because int might match the return type of a gcc2
12403   builtin and then its argument prototype would still apply.  */
12404char XineramaQueryScreens ();
12405int
12406main (void)
12407{
12408XineramaQueryScreens ();
12409  ;
12410  return 0;
12411}
12412_ACEOF
12413rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12414if { (eval echo "$as_me:12414: \"$ac_link\"") >&5
12415  (eval $ac_link) 2>&5
12416  ac_status=$?
12417  echo "$as_me:12417: \$? = $ac_status" >&5
12418  (exit "$ac_status"); } &&
12419         { ac_try='test -s "conftest$ac_exeext"'
12420  { (eval echo "$as_me:12420: \"$ac_try\"") >&5
12421  (eval $ac_try) 2>&5
12422  ac_status=$?
12423  echo "$as_me:12423: \$? = $ac_status" >&5
12424  (exit "$ac_status"); }; }; then
12425  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
12426else
12427  echo "$as_me: failed program was:" >&5
12428cat "conftest.$ac_ext" >&5
12429ac_cv_lib_Xinerama_XineramaQueryScreens=no
12430fi
12431rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12432LIBS=$ac_check_lib_save_LIBS
12433fi
12434echo "$as_me:12434: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
12435echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
12436if test "$ac_cv_lib_Xinerama_XineramaQueryScreens" = yes; then
12437
12438cf_add_libs="$LIBS"
12439# reverse order
12440cf_add_0lib=
12441for cf_add_1lib in -lXinerama; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12442# filter duplicates
12443for cf_add_1lib in $cf_add_0lib; do
12444	for cf_add_2lib in $cf_add_libs; do
12445		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12446			cf_add_1lib=
12447			break
12448		fi
12449	done
12450	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12451done
12452LIBS="$cf_add_libs"
12453
12454for ac_header in \
12455			X11/extensions/Xinerama.h \
12456
12457do
12458as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12459echo "$as_me:12459: checking for $ac_header" >&5
12460echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12461if eval "test \"\${$as_ac_Header+set}\" = set"; then
12462  echo $ECHO_N "(cached) $ECHO_C" >&6
12463else
12464  cat >"conftest.$ac_ext" <<_ACEOF
12465#line 12465 "configure"
12466#include "confdefs.h"
12467#include <$ac_header>
12468_ACEOF
12469if { (eval echo "$as_me:12469: \"$ac_cpp "conftest.$ac_ext"\"") >&5
12470  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
12471  ac_status=$?
12472  $EGREP -v '^ *\+' conftest.er1 >conftest.err
12473  rm -f conftest.er1
12474  cat conftest.err >&5
12475  echo "$as_me:12475: \$? = $ac_status" >&5
12476  (exit "$ac_status"); } >/dev/null; then
12477  if test -s conftest.err; then
12478    ac_cpp_err=$ac_c_preproc_warn_flag
12479  else
12480    ac_cpp_err=
12481  fi
12482else
12483  ac_cpp_err=yes
12484fi
12485if test -z "$ac_cpp_err"; then
12486  eval "$as_ac_Header=yes"
12487else
12488  echo "$as_me: failed program was:" >&5
12489  cat "conftest.$ac_ext" >&5
12490  eval "$as_ac_Header=no"
12491fi
12492rm -f conftest.err "conftest.$ac_ext"
12493fi
12494echo "$as_me:12494: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
12495echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
12496if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
12497  cat >>confdefs.h <<EOF
12498#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12499EOF
12500
12501fi
12502done
12503
12504fi
12505
12506fi
12507
12508fi
12509
12510cf_x_athena=${cf_x_athena:-Xaw}
12511
12512echo "$as_me:12512: checking if you want to link with Xaw 3d library" >&5
12513echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
12514withval=
12515
12516# Check whether --with-Xaw3d or --without-Xaw3d was given.
12517if test "${with_Xaw3d+set}" = set; then
12518  withval="$with_Xaw3d"
12519
12520fi;
12521if test "$withval" = yes ; then
12522	cf_x_athena=Xaw3d
12523	echo "$as_me:12523: result: yes" >&5
12524echo "${ECHO_T}yes" >&6
12525else
12526	echo "$as_me:12526: result: no" >&5
12527echo "${ECHO_T}no" >&6
12528fi
12529
12530echo "$as_me:12530: checking if you want to link with Xaw 3d xft library" >&5
12531echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
12532withval=
12533
12534# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
12535if test "${with_Xaw3dxft+set}" = set; then
12536  withval="$with_Xaw3dxft"
12537
12538fi;
12539if test "$withval" = yes ; then
12540	cf_x_athena=Xaw3dxft
12541	echo "$as_me:12541: result: yes" >&5
12542echo "${ECHO_T}yes" >&6
12543else
12544	echo "$as_me:12544: result: no" >&5
12545echo "${ECHO_T}no" >&6
12546fi
12547
12548echo "$as_me:12548: checking if you want to link with neXT Athena library" >&5
12549echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
12550withval=
12551
12552# Check whether --with-neXtaw or --without-neXtaw was given.
12553if test "${with_neXtaw+set}" = set; then
12554  withval="$with_neXtaw"
12555
12556fi;
12557if test "$withval" = yes ; then
12558	cf_x_athena=neXtaw
12559	echo "$as_me:12559: result: yes" >&5
12560echo "${ECHO_T}yes" >&6
12561else
12562	echo "$as_me:12562: result: no" >&5
12563echo "${ECHO_T}no" >&6
12564fi
12565
12566echo "$as_me:12566: checking if you want to link with Athena-Plus library" >&5
12567echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
12568withval=
12569
12570# Check whether --with-XawPlus or --without-XawPlus was given.
12571if test "${with_XawPlus+set}" = set; then
12572  withval="$with_XawPlus"
12573
12574fi;
12575if test "$withval" = yes ; then
12576	cf_x_athena=XawPlus
12577	echo "$as_me:12577: result: yes" >&5
12578echo "${ECHO_T}yes" >&6
12579else
12580	echo "$as_me:12580: result: no" >&5
12581echo "${ECHO_T}no" >&6
12582fi
12583
12584cf_x_athena_lib=""
12585
12586if test "$PKG_CONFIG" != none ; then
12587	cf_athena_list=
12588	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
12589	for cf_athena_pkg in \
12590		$cf_athena_list \
12591		${cf_x_athena} \
12592		${cf_x_athena}-devel \
12593		lib${cf_x_athena} \
12594		lib${cf_x_athena}-devel
12595	do
12596
12597if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
12598	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
12599
12600echo "${as_me:-configure}:12600: testing found package $cf_athena_pkg ..." 1>&5
12601
12602	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
12603	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
12604	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
12605
12606echo "${as_me:-configure}:12606: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12607
12608	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
12609
12610echo "${as_me:-configure}:12610: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
12611
12612cf_fix_cppflags=no
12613cf_new_cflags=
12614cf_new_cppflags=
12615cf_new_extra_cppflags=
12616
12617for cf_add_cflags in $cf_pkgconfig_incs
12618do
12619case "$cf_fix_cppflags" in
12620(no)
12621	case "$cf_add_cflags" in
12622	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12623		case "$cf_add_cflags" in
12624		(-D*)
12625			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12626
12627			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12628				&& test -z "${cf_tst_cflags}" \
12629				&& cf_fix_cppflags=yes
12630
12631			if test "$cf_fix_cppflags" = yes ; then
12632
12633	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12634	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12635
12636				continue
12637			elif test "${cf_tst_cflags}" = "\"'" ; then
12638
12639	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12640	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12641
12642				continue
12643			fi
12644			;;
12645		esac
12646		case "$CPPFLAGS" in
12647		(*$cf_add_cflags)
12648			;;
12649		(*)
12650			case "$cf_add_cflags" in
12651			(-D*)
12652				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12653
12654CPPFLAGS=`echo "$CPPFLAGS" | \
12655	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12656		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12657
12658				;;
12659			esac
12660
12661	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12662	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12663
12664			;;
12665		esac
12666		;;
12667	(*)
12668
12669	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12670	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12671
12672		;;
12673	esac
12674	;;
12675(yes)
12676
12677	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12678	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12679
12680	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12681
12682	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12683		&& test -z "${cf_tst_cflags}" \
12684		&& cf_fix_cppflags=no
12685	;;
12686esac
12687done
12688
12689if test -n "$cf_new_cflags" ; then
12690
12691	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12692	CFLAGS="${CFLAGS}$cf_new_cflags"
12693
12694fi
12695
12696if test -n "$cf_new_cppflags" ; then
12697
12698	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12699	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12700
12701fi
12702
12703if test -n "$cf_new_extra_cppflags" ; then
12704
12705	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12706	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12707
12708fi
12709
12710cf_add_libs="$LIBS"
12711# reverse order
12712cf_add_0lib=
12713for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12714# filter duplicates
12715for cf_add_1lib in $cf_add_0lib; do
12716	for cf_add_2lib in $cf_add_libs; do
12717		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12718			cf_add_1lib=
12719			break
12720		fi
12721	done
12722	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12723done
12724LIBS="$cf_add_libs"
12725
12726			cf_x_athena_lib="$cf_pkgconfig_libs"
12727
12728cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12729
12730			cat >>confdefs.h <<EOF
12731#define $cf_x_athena_LIBS 1
12732EOF
12733
12734	for cf_trim_lib in Xmu Xt X11
12735	do
12736		case "$LIBS" in
12737		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12738			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12739			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12740
12741echo "${as_me:-configure}:12741: testing ..trimmed $LIBS ..." 1>&5
12742
12743			;;
12744		esac
12745	done
12746
12747echo "$as_me:12747: checking for usable $cf_x_athena/Xmu package" >&5
12748echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
12749if test "${cf_cv_xaw_compat+set}" = set; then
12750  echo $ECHO_N "(cached) $ECHO_C" >&6
12751else
12752
12753cat >"conftest.$ac_ext" <<_ACEOF
12754#line 12754 "configure"
12755#include "confdefs.h"
12756
12757#include <X11/Xmu/CharSet.h>
12758
12759int
12760main (void)
12761{
12762
12763int check = XmuCompareISOLatin1("big", "small");
12764(void)check;
12765
12766  ;
12767  return 0;
12768}
12769_ACEOF
12770rm -f "conftest.$ac_objext" "conftest$ac_exeext"
12771if { (eval echo "$as_me:12771: \"$ac_link\"") >&5
12772  (eval $ac_link) 2>&5
12773  ac_status=$?
12774  echo "$as_me:12774: \$? = $ac_status" >&5
12775  (exit "$ac_status"); } &&
12776         { ac_try='test -s "conftest$ac_exeext"'
12777  { (eval echo "$as_me:12777: \"$ac_try\"") >&5
12778  (eval $ac_try) 2>&5
12779  ac_status=$?
12780  echo "$as_me:12780: \$? = $ac_status" >&5
12781  (exit "$ac_status"); }; }; then
12782  cf_cv_xaw_compat=yes
12783else
12784  echo "$as_me: failed program was:" >&5
12785cat "conftest.$ac_ext" >&5
12786cf_cv_xaw_compat=no
12787fi
12788rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
12789fi
12790echo "$as_me:12790: result: $cf_cv_xaw_compat" >&5
12791echo "${ECHO_T}$cf_cv_xaw_compat" >&6
12792
12793			if test "$cf_cv_xaw_compat" = no
12794			then
12795				# workaround for broken ".pc" files...
12796				case "$cf_x_athena_lib" in
12797				(*-lXmu*)
12798					;;
12799				(*)
12800					test -n "$verbose" && echo "	work around broken package" 1>&6
12801
12802echo "${as_me:-configure}:12802: testing work around broken package ..." 1>&5
12803
12804					cf_save_xmu="$LIBS"
12805					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
12806
12807if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
12808	test -n "$verbose" && echo "	found package xmu" 1>&6
12809
12810echo "${as_me:-configure}:12810: testing found package xmu ..." 1>&5
12811
12812	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
12813	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
12814	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
12815
12816echo "${as_me:-configure}:12816: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12817
12818	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
12819
12820echo "${as_me:-configure}:12820: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
12821
12822cf_fix_cppflags=no
12823cf_new_cflags=
12824cf_new_cppflags=
12825cf_new_extra_cppflags=
12826
12827for cf_add_cflags in $cf_pkgconfig_incs
12828do
12829case "$cf_fix_cppflags" in
12830(no)
12831	case "$cf_add_cflags" in
12832	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12833		case "$cf_add_cflags" in
12834		(-D*)
12835			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12836
12837			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12838				&& test -z "${cf_tst_cflags}" \
12839				&& cf_fix_cppflags=yes
12840
12841			if test "$cf_fix_cppflags" = yes ; then
12842
12843	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12844	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12845
12846				continue
12847			elif test "${cf_tst_cflags}" = "\"'" ; then
12848
12849	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12850	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12851
12852				continue
12853			fi
12854			;;
12855		esac
12856		case "$CPPFLAGS" in
12857		(*$cf_add_cflags)
12858			;;
12859		(*)
12860			case "$cf_add_cflags" in
12861			(-D*)
12862				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12863
12864CPPFLAGS=`echo "$CPPFLAGS" | \
12865	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12866		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12867
12868				;;
12869			esac
12870
12871	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12872	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12873
12874			;;
12875		esac
12876		;;
12877	(*)
12878
12879	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12880	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12881
12882		;;
12883	esac
12884	;;
12885(yes)
12886
12887	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12888	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12889
12890	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12891
12892	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12893		&& test -z "${cf_tst_cflags}" \
12894		&& cf_fix_cppflags=no
12895	;;
12896esac
12897done
12898
12899if test -n "$cf_new_cflags" ; then
12900
12901	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12902	CFLAGS="${CFLAGS}$cf_new_cflags"
12903
12904fi
12905
12906if test -n "$cf_new_cppflags" ; then
12907
12908	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12909	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12910
12911fi
12912
12913if test -n "$cf_new_extra_cppflags" ; then
12914
12915	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12916	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12917
12918fi
12919
12920cf_add_libs="$LIBS"
12921# reverse order
12922cf_add_0lib=
12923for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12924# filter duplicates
12925for cf_add_1lib in $cf_add_0lib; do
12926	for cf_add_2lib in $cf_add_libs; do
12927		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12928			cf_add_1lib=
12929			break
12930		fi
12931	done
12932	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12933done
12934LIBS="$cf_add_libs"
12935
12936							LIBS="$cf_save_xmu"
12937
12938test -n "$verbose" && echo "	...before $LIBS" 1>&6
12939
12940echo "${as_me:-configure}:12940: testing ...before $LIBS ..." 1>&5
12941
12942LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
12943test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12944
12945echo "${as_me:-configure}:12945: testing ...after  $LIBS ..." 1>&5
12946
12947else
12948	cf_pkgconfig_incs=
12949	cf_pkgconfig_libs=
12950
12951test -n "$verbose" && echo "	...before $LIBS" 1>&6
12952
12953echo "${as_me:-configure}:12953: testing ...before $LIBS ..." 1>&5
12954
12955LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
12956test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12957
12958echo "${as_me:-configure}:12958: testing ...after  $LIBS ..." 1>&5
12959
12960fi
12961
12962	for cf_trim_lib in Xmu Xt X11
12963	do
12964		case "$LIBS" in
12965		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
12966			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
12967			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
12968
12969echo "${as_me:-configure}:12969: testing ..trimmed $LIBS ..." 1>&5
12970
12971			;;
12972		esac
12973	done
12974
12975					;;
12976				esac
12977			fi
12978
12979			break
12980else
12981	cf_pkgconfig_incs=
12982	cf_pkgconfig_libs=
12983	:
12984fi
12985
12986	done
12987fi
12988
12989if test -z "$cf_x_athena_lib" ; then
12990
12991if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
12992	test -n "$verbose" && echo "	found package Xext" 1>&6
12993
12994echo "${as_me:-configure}:12994: testing found package Xext ..." 1>&5
12995
12996	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
12997	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
12998	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
12999
13000echo "${as_me:-configure}:13000: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13001
13002	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
13003
13004echo "${as_me:-configure}:13004: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
13005
13006cf_fix_cppflags=no
13007cf_new_cflags=
13008cf_new_cppflags=
13009cf_new_extra_cppflags=
13010
13011for cf_add_cflags in $cf_pkgconfig_incs
13012do
13013case "$cf_fix_cppflags" in
13014(no)
13015	case "$cf_add_cflags" in
13016	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13017		case "$cf_add_cflags" in
13018		(-D*)
13019			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13020
13021			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13022				&& test -z "${cf_tst_cflags}" \
13023				&& cf_fix_cppflags=yes
13024
13025			if test "$cf_fix_cppflags" = yes ; then
13026
13027	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13028	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13029
13030				continue
13031			elif test "${cf_tst_cflags}" = "\"'" ; then
13032
13033	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13034	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13035
13036				continue
13037			fi
13038			;;
13039		esac
13040		case "$CPPFLAGS" in
13041		(*$cf_add_cflags)
13042			;;
13043		(*)
13044			case "$cf_add_cflags" in
13045			(-D*)
13046				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13047
13048CPPFLAGS=`echo "$CPPFLAGS" | \
13049	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13050		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13051
13052				;;
13053			esac
13054
13055	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13056	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13057
13058			;;
13059		esac
13060		;;
13061	(*)
13062
13063	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13064	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13065
13066		;;
13067	esac
13068	;;
13069(yes)
13070
13071	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13072	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13073
13074	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13075
13076	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13077		&& test -z "${cf_tst_cflags}" \
13078		&& cf_fix_cppflags=no
13079	;;
13080esac
13081done
13082
13083if test -n "$cf_new_cflags" ; then
13084
13085	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13086	CFLAGS="${CFLAGS}$cf_new_cflags"
13087
13088fi
13089
13090if test -n "$cf_new_cppflags" ; then
13091
13092	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13093	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13094
13095fi
13096
13097if test -n "$cf_new_extra_cppflags" ; then
13098
13099	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13100	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13101
13102fi
13103
13104cf_add_libs="$LIBS"
13105# reverse order
13106cf_add_0lib=
13107for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13108# filter duplicates
13109for cf_add_1lib in $cf_add_0lib; do
13110	for cf_add_2lib in $cf_add_libs; do
13111		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13112			cf_add_1lib=
13113			break
13114		fi
13115	done
13116	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13117done
13118LIBS="$cf_add_libs"
13119
13120	:
13121else
13122	cf_pkgconfig_incs=
13123	cf_pkgconfig_libs=
13124
13125	echo "$as_me:13125: checking for XextCreateExtension in -lXext" >&5
13126echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
13127if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
13128  echo $ECHO_N "(cached) $ECHO_C" >&6
13129else
13130  ac_check_lib_save_LIBS=$LIBS
13131LIBS="-lXext  $LIBS"
13132cat >"conftest.$ac_ext" <<_ACEOF
13133#line 13133 "configure"
13134#include "confdefs.h"
13135
13136/* Override any gcc2 internal prototype to avoid an error.  */
13137#ifdef __cplusplus
13138extern "C"
13139#endif
13140/* We use char because int might match the return type of a gcc2
13141   builtin and then its argument prototype would still apply.  */
13142char XextCreateExtension ();
13143int
13144main (void)
13145{
13146XextCreateExtension ();
13147  ;
13148  return 0;
13149}
13150_ACEOF
13151rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13152if { (eval echo "$as_me:13152: \"$ac_link\"") >&5
13153  (eval $ac_link) 2>&5
13154  ac_status=$?
13155  echo "$as_me:13155: \$? = $ac_status" >&5
13156  (exit "$ac_status"); } &&
13157         { ac_try='test -s "conftest$ac_exeext"'
13158  { (eval echo "$as_me:13158: \"$ac_try\"") >&5
13159  (eval $ac_try) 2>&5
13160  ac_status=$?
13161  echo "$as_me:13161: \$? = $ac_status" >&5
13162  (exit "$ac_status"); }; }; then
13163  ac_cv_lib_Xext_XextCreateExtension=yes
13164else
13165  echo "$as_me: failed program was:" >&5
13166cat "conftest.$ac_ext" >&5
13167ac_cv_lib_Xext_XextCreateExtension=no
13168fi
13169rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13170LIBS=$ac_check_lib_save_LIBS
13171fi
13172echo "$as_me:13172: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
13173echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
13174if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
13175
13176cf_add_libs="$LIBS"
13177# reverse order
13178cf_add_0lib=
13179for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13180# filter duplicates
13181for cf_add_1lib in $cf_add_0lib; do
13182	for cf_add_2lib in $cf_add_libs; do
13183		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13184			cf_add_1lib=
13185			break
13186		fi
13187	done
13188	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13189done
13190LIBS="$cf_add_libs"
13191
13192fi
13193
13194fi
13195
13196# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
13197# in some cases has installed dummy files in the former, other cases replaced
13198# it with a link to the new location).  This complicates the configure script.
13199# Check for that pitfall, and recover using pkg-config
13200#
13201# If none of these are set, the configuration is almost certainly broken.
13202if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
13203then
13204
13205if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13206	test -n "$verbose" && echo "	found package x11" 1>&6
13207
13208echo "${as_me:-configure}:13208: testing found package x11 ..." 1>&5
13209
13210	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13211	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13212	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13213
13214echo "${as_me:-configure}:13214: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13215
13216	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13217
13218echo "${as_me:-configure}:13218: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13219
13220cf_fix_cppflags=no
13221cf_new_cflags=
13222cf_new_cppflags=
13223cf_new_extra_cppflags=
13224
13225for cf_add_cflags in $cf_pkgconfig_incs
13226do
13227case "$cf_fix_cppflags" in
13228(no)
13229	case "$cf_add_cflags" in
13230	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13231		case "$cf_add_cflags" in
13232		(-D*)
13233			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13234
13235			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13236				&& test -z "${cf_tst_cflags}" \
13237				&& cf_fix_cppflags=yes
13238
13239			if test "$cf_fix_cppflags" = yes ; then
13240
13241	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13242	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13243
13244				continue
13245			elif test "${cf_tst_cflags}" = "\"'" ; then
13246
13247	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13248	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13249
13250				continue
13251			fi
13252			;;
13253		esac
13254		case "$CPPFLAGS" in
13255		(*$cf_add_cflags)
13256			;;
13257		(*)
13258			case "$cf_add_cflags" in
13259			(-D*)
13260				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13261
13262CPPFLAGS=`echo "$CPPFLAGS" | \
13263	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13264		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13265
13266				;;
13267			esac
13268
13269	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13270	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13271
13272			;;
13273		esac
13274		;;
13275	(*)
13276
13277	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13278	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13279
13280		;;
13281	esac
13282	;;
13283(yes)
13284
13285	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13286	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13287
13288	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13289
13290	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13291		&& test -z "${cf_tst_cflags}" \
13292		&& cf_fix_cppflags=no
13293	;;
13294esac
13295done
13296
13297if test -n "$cf_new_cflags" ; then
13298
13299	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13300	CFLAGS="${CFLAGS}$cf_new_cflags"
13301
13302fi
13303
13304if test -n "$cf_new_cppflags" ; then
13305
13306	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13307	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13308
13309fi
13310
13311if test -n "$cf_new_extra_cppflags" ; then
13312
13313	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13314	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13315
13316fi
13317
13318cf_add_libs="$LIBS"
13319# reverse order
13320cf_add_0lib=
13321for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13322# filter duplicates
13323for cf_add_1lib in $cf_add_0lib; do
13324	for cf_add_2lib in $cf_add_libs; do
13325		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13326			cf_add_1lib=
13327			break
13328		fi
13329	done
13330	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13331done
13332LIBS="$cf_add_libs"
13333
13334	:
13335else
13336	cf_pkgconfig_incs=
13337	cf_pkgconfig_libs=
13338	{ echo "$as_me:13338: WARNING: unable to find X11 library" >&5
13339echo "$as_me: WARNING: unable to find X11 library" >&2;}
13340fi
13341
13342if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
13343	test -n "$verbose" && echo "	found package ice" 1>&6
13344
13345echo "${as_me:-configure}:13345: testing found package ice ..." 1>&5
13346
13347	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
13348	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
13349	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13350
13351echo "${as_me:-configure}:13351: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13352
13353	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
13354
13355echo "${as_me:-configure}:13355: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13356
13357cf_fix_cppflags=no
13358cf_new_cflags=
13359cf_new_cppflags=
13360cf_new_extra_cppflags=
13361
13362for cf_add_cflags in $cf_pkgconfig_incs
13363do
13364case "$cf_fix_cppflags" in
13365(no)
13366	case "$cf_add_cflags" in
13367	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13368		case "$cf_add_cflags" in
13369		(-D*)
13370			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13371
13372			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13373				&& test -z "${cf_tst_cflags}" \
13374				&& cf_fix_cppflags=yes
13375
13376			if test "$cf_fix_cppflags" = yes ; then
13377
13378	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13379	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13380
13381				continue
13382			elif test "${cf_tst_cflags}" = "\"'" ; then
13383
13384	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13385	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13386
13387				continue
13388			fi
13389			;;
13390		esac
13391		case "$CPPFLAGS" in
13392		(*$cf_add_cflags)
13393			;;
13394		(*)
13395			case "$cf_add_cflags" in
13396			(-D*)
13397				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13398
13399CPPFLAGS=`echo "$CPPFLAGS" | \
13400	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13401		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13402
13403				;;
13404			esac
13405
13406	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13407	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13408
13409			;;
13410		esac
13411		;;
13412	(*)
13413
13414	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13415	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13416
13417		;;
13418	esac
13419	;;
13420(yes)
13421
13422	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13423	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13424
13425	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13426
13427	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13428		&& test -z "${cf_tst_cflags}" \
13429		&& cf_fix_cppflags=no
13430	;;
13431esac
13432done
13433
13434if test -n "$cf_new_cflags" ; then
13435
13436	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13437	CFLAGS="${CFLAGS}$cf_new_cflags"
13438
13439fi
13440
13441if test -n "$cf_new_cppflags" ; then
13442
13443	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13444	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13445
13446fi
13447
13448if test -n "$cf_new_extra_cppflags" ; then
13449
13450	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13451	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13452
13453fi
13454
13455cf_add_libs="$LIBS"
13456# reverse order
13457cf_add_0lib=
13458for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13459# filter duplicates
13460for cf_add_1lib in $cf_add_0lib; do
13461	for cf_add_2lib in $cf_add_libs; do
13462		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13463			cf_add_1lib=
13464			break
13465		fi
13466	done
13467	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13468done
13469LIBS="$cf_add_libs"
13470
13471	:
13472else
13473	cf_pkgconfig_incs=
13474	cf_pkgconfig_libs=
13475	{ echo "$as_me:13475: WARNING: unable to find ICE library" >&5
13476echo "$as_me: WARNING: unable to find ICE library" >&2;}
13477fi
13478
13479if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
13480	test -n "$verbose" && echo "	found package sm" 1>&6
13481
13482echo "${as_me:-configure}:13482: testing found package sm ..." 1>&5
13483
13484	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
13485	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
13486	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13487
13488echo "${as_me:-configure}:13488: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13489
13490	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
13491
13492echo "${as_me:-configure}:13492: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13493
13494cf_fix_cppflags=no
13495cf_new_cflags=
13496cf_new_cppflags=
13497cf_new_extra_cppflags=
13498
13499for cf_add_cflags in $cf_pkgconfig_incs
13500do
13501case "$cf_fix_cppflags" in
13502(no)
13503	case "$cf_add_cflags" in
13504	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13505		case "$cf_add_cflags" in
13506		(-D*)
13507			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13508
13509			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13510				&& test -z "${cf_tst_cflags}" \
13511				&& cf_fix_cppflags=yes
13512
13513			if test "$cf_fix_cppflags" = yes ; then
13514
13515	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13516	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13517
13518				continue
13519			elif test "${cf_tst_cflags}" = "\"'" ; then
13520
13521	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13522	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13523
13524				continue
13525			fi
13526			;;
13527		esac
13528		case "$CPPFLAGS" in
13529		(*$cf_add_cflags)
13530			;;
13531		(*)
13532			case "$cf_add_cflags" in
13533			(-D*)
13534				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13535
13536CPPFLAGS=`echo "$CPPFLAGS" | \
13537	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13538		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13539
13540				;;
13541			esac
13542
13543	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13544	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13545
13546			;;
13547		esac
13548		;;
13549	(*)
13550
13551	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13552	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13553
13554		;;
13555	esac
13556	;;
13557(yes)
13558
13559	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13560	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13561
13562	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13563
13564	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13565		&& test -z "${cf_tst_cflags}" \
13566		&& cf_fix_cppflags=no
13567	;;
13568esac
13569done
13570
13571if test -n "$cf_new_cflags" ; then
13572
13573	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13574	CFLAGS="${CFLAGS}$cf_new_cflags"
13575
13576fi
13577
13578if test -n "$cf_new_cppflags" ; then
13579
13580	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13581	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13582
13583fi
13584
13585if test -n "$cf_new_extra_cppflags" ; then
13586
13587	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13588	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13589
13590fi
13591
13592cf_add_libs="$LIBS"
13593# reverse order
13594cf_add_0lib=
13595for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13596# filter duplicates
13597for cf_add_1lib in $cf_add_0lib; do
13598	for cf_add_2lib in $cf_add_libs; do
13599		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13600			cf_add_1lib=
13601			break
13602		fi
13603	done
13604	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13605done
13606LIBS="$cf_add_libs"
13607
13608	:
13609else
13610	cf_pkgconfig_incs=
13611	cf_pkgconfig_libs=
13612	{ echo "$as_me:13612: WARNING: unable to find SM library" >&5
13613echo "$as_me: WARNING: unable to find SM library" >&2;}
13614fi
13615
13616if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13617	test -n "$verbose" && echo "	found package xt" 1>&6
13618
13619echo "${as_me:-configure}:13619: testing found package xt ..." 1>&5
13620
13621	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13622	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13623	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13624
13625echo "${as_me:-configure}:13625: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13626
13627	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13628
13629echo "${as_me:-configure}:13629: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13630
13631cf_fix_cppflags=no
13632cf_new_cflags=
13633cf_new_cppflags=
13634cf_new_extra_cppflags=
13635
13636for cf_add_cflags in $cf_pkgconfig_incs
13637do
13638case "$cf_fix_cppflags" in
13639(no)
13640	case "$cf_add_cflags" in
13641	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13642		case "$cf_add_cflags" in
13643		(-D*)
13644			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13645
13646			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13647				&& test -z "${cf_tst_cflags}" \
13648				&& cf_fix_cppflags=yes
13649
13650			if test "$cf_fix_cppflags" = yes ; then
13651
13652	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13653	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13654
13655				continue
13656			elif test "${cf_tst_cflags}" = "\"'" ; then
13657
13658	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13659	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13660
13661				continue
13662			fi
13663			;;
13664		esac
13665		case "$CPPFLAGS" in
13666		(*$cf_add_cflags)
13667			;;
13668		(*)
13669			case "$cf_add_cflags" in
13670			(-D*)
13671				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13672
13673CPPFLAGS=`echo "$CPPFLAGS" | \
13674	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13675		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13676
13677				;;
13678			esac
13679
13680	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13681	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13682
13683			;;
13684		esac
13685		;;
13686	(*)
13687
13688	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13689	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13690
13691		;;
13692	esac
13693	;;
13694(yes)
13695
13696	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13697	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13698
13699	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13700
13701	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13702		&& test -z "${cf_tst_cflags}" \
13703		&& cf_fix_cppflags=no
13704	;;
13705esac
13706done
13707
13708if test -n "$cf_new_cflags" ; then
13709
13710	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13711	CFLAGS="${CFLAGS}$cf_new_cflags"
13712
13713fi
13714
13715if test -n "$cf_new_cppflags" ; then
13716
13717	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13718	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13719
13720fi
13721
13722if test -n "$cf_new_extra_cppflags" ; then
13723
13724	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13725	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13726
13727fi
13728
13729cf_add_libs="$LIBS"
13730# reverse order
13731cf_add_0lib=
13732for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13733# filter duplicates
13734for cf_add_1lib in $cf_add_0lib; do
13735	for cf_add_2lib in $cf_add_libs; do
13736		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13737			cf_add_1lib=
13738			break
13739		fi
13740	done
13741	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13742done
13743LIBS="$cf_add_libs"
13744
13745	:
13746else
13747	cf_pkgconfig_incs=
13748	cf_pkgconfig_libs=
13749	{ echo "$as_me:13749: WARNING: unable to find Xt library" >&5
13750echo "$as_me: WARNING: unable to find Xt library" >&2;}
13751fi
13752
13753else
13754	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13755fi
13756
13757cf_have_X_LIBS=no
13758
13759if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
13760	test -n "$verbose" && echo "	found package xt" 1>&6
13761
13762echo "${as_me:-configure}:13762: testing found package xt ..." 1>&5
13763
13764	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
13765	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
13766	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
13767
13768echo "${as_me:-configure}:13768: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13769
13770	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
13771
13772echo "${as_me:-configure}:13772: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
13773
13774cf_fix_cppflags=no
13775cf_new_cflags=
13776cf_new_cppflags=
13777cf_new_extra_cppflags=
13778
13779for cf_add_cflags in $cf_pkgconfig_incs
13780do
13781case "$cf_fix_cppflags" in
13782(no)
13783	case "$cf_add_cflags" in
13784	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13785		case "$cf_add_cflags" in
13786		(-D*)
13787			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13788
13789			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13790				&& test -z "${cf_tst_cflags}" \
13791				&& cf_fix_cppflags=yes
13792
13793			if test "$cf_fix_cppflags" = yes ; then
13794
13795	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13796	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13797
13798				continue
13799			elif test "${cf_tst_cflags}" = "\"'" ; then
13800
13801	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13802	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13803
13804				continue
13805			fi
13806			;;
13807		esac
13808		case "$CPPFLAGS" in
13809		(*$cf_add_cflags)
13810			;;
13811		(*)
13812			case "$cf_add_cflags" in
13813			(-D*)
13814				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13815
13816CPPFLAGS=`echo "$CPPFLAGS" | \
13817	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13818		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13819
13820				;;
13821			esac
13822
13823	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13824	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13825
13826			;;
13827		esac
13828		;;
13829	(*)
13830
13831	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13832	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13833
13834		;;
13835	esac
13836	;;
13837(yes)
13838
13839	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13840	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13841
13842	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13843
13844	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13845		&& test -z "${cf_tst_cflags}" \
13846		&& cf_fix_cppflags=no
13847	;;
13848esac
13849done
13850
13851if test -n "$cf_new_cflags" ; then
13852
13853	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13854	CFLAGS="${CFLAGS}$cf_new_cflags"
13855
13856fi
13857
13858if test -n "$cf_new_cppflags" ; then
13859
13860	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13861	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13862
13863fi
13864
13865if test -n "$cf_new_extra_cppflags" ; then
13866
13867	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13868	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13869
13870fi
13871
13872cf_add_libs="$LIBS"
13873# reverse order
13874cf_add_0lib=
13875for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13876# filter duplicates
13877for cf_add_1lib in $cf_add_0lib; do
13878	for cf_add_2lib in $cf_add_libs; do
13879		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13880			cf_add_1lib=
13881			break
13882		fi
13883	done
13884	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13885done
13886LIBS="$cf_add_libs"
13887
13888	case "x$LIBS" in
13889	(*-lX11*)
13890		;;
13891	(*)
13892# we have an "xt" package, but it may omit Xt's dependency on X11
13893echo "$as_me:13893: checking for usable X dependency" >&5
13894echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
13895if test "${cf_cv_xt_x11_compat+set}" = set; then
13896  echo $ECHO_N "(cached) $ECHO_C" >&6
13897else
13898
13899cat >"conftest.$ac_ext" <<_ACEOF
13900#line 13900 "configure"
13901#include "confdefs.h"
13902
13903#include <X11/Xlib.h>
13904
13905int
13906main (void)
13907{
13908
13909	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
13910	int rc2 = XClearWindow((Display*) 0, (Window) 0);
13911	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
13912	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
13913
13914  ;
13915  return 0;
13916}
13917_ACEOF
13918rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13919if { (eval echo "$as_me:13919: \"$ac_link\"") >&5
13920  (eval $ac_link) 2>&5
13921  ac_status=$?
13922  echo "$as_me:13922: \$? = $ac_status" >&5
13923  (exit "$ac_status"); } &&
13924         { ac_try='test -s "conftest$ac_exeext"'
13925  { (eval echo "$as_me:13925: \"$ac_try\"") >&5
13926  (eval $ac_try) 2>&5
13927  ac_status=$?
13928  echo "$as_me:13928: \$? = $ac_status" >&5
13929  (exit "$ac_status"); }; }; then
13930  cf_cv_xt_x11_compat=yes
13931else
13932  echo "$as_me: failed program was:" >&5
13933cat "conftest.$ac_ext" >&5
13934cf_cv_xt_x11_compat=no
13935fi
13936rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13937fi
13938echo "$as_me:13938: result: $cf_cv_xt_x11_compat" >&5
13939echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
13940		if test "$cf_cv_xt_x11_compat" = no
13941		then
13942			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
13943
13944echo "${as_me:-configure}:13944: testing work around broken X11 dependency ..." 1>&5
13945
13946			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
13947
13948if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
13949	test -n "$verbose" && echo "	found package x11" 1>&6
13950
13951echo "${as_me:-configure}:13951: testing found package x11 ..." 1>&5
13952
13953	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
13954	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
13955	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
13956
13957echo "${as_me:-configure}:13957: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13958
13959	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
13960
13961echo "${as_me:-configure}:13961: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
13962
13963cf_fix_cppflags=no
13964cf_new_cflags=
13965cf_new_cppflags=
13966cf_new_extra_cppflags=
13967
13968for cf_add_cflags in $cf_pkgconfig_incs
13969do
13970case "$cf_fix_cppflags" in
13971(no)
13972	case "$cf_add_cflags" in
13973	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13974		case "$cf_add_cflags" in
13975		(-D*)
13976			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13977
13978			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13979				&& test -z "${cf_tst_cflags}" \
13980				&& cf_fix_cppflags=yes
13981
13982			if test "$cf_fix_cppflags" = yes ; then
13983
13984	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13985	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13986
13987				continue
13988			elif test "${cf_tst_cflags}" = "\"'" ; then
13989
13990	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13991	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13992
13993				continue
13994			fi
13995			;;
13996		esac
13997		case "$CPPFLAGS" in
13998		(*$cf_add_cflags)
13999			;;
14000		(*)
14001			case "$cf_add_cflags" in
14002			(-D*)
14003				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14004
14005CPPFLAGS=`echo "$CPPFLAGS" | \
14006	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14007		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14008
14009				;;
14010			esac
14011
14012	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14013	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14014
14015			;;
14016		esac
14017		;;
14018	(*)
14019
14020	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14021	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14022
14023		;;
14024	esac
14025	;;
14026(yes)
14027
14028	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14029	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14030
14031	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14032
14033	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14034		&& test -z "${cf_tst_cflags}" \
14035		&& cf_fix_cppflags=no
14036	;;
14037esac
14038done
14039
14040if test -n "$cf_new_cflags" ; then
14041
14042	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14043	CFLAGS="${CFLAGS}$cf_new_cflags"
14044
14045fi
14046
14047if test -n "$cf_new_cppflags" ; then
14048
14049	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14050	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14051
14052fi
14053
14054if test -n "$cf_new_extra_cppflags" ; then
14055
14056	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14057	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14058
14059fi
14060
14061cf_add_libs="$LIBS"
14062# reverse order
14063cf_add_0lib=
14064for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14065# filter duplicates
14066for cf_add_1lib in $cf_add_0lib; do
14067	for cf_add_2lib in $cf_add_libs; do
14068		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14069			cf_add_1lib=
14070			break
14071		fi
14072	done
14073	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14074done
14075LIBS="$cf_add_libs"
14076
14077	:
14078else
14079	cf_pkgconfig_incs=
14080	cf_pkgconfig_libs=
14081
14082test -n "$verbose" && echo "	...before $LIBS" 1>&6
14083
14084echo "${as_me:-configure}:14084: testing ...before $LIBS ..." 1>&5
14085
14086LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
14087test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14088
14089echo "${as_me:-configure}:14089: testing ...after  $LIBS ..." 1>&5
14090
14091fi
14092
14093		fi
14094		;;
14095	esac
14096
14097echo "$as_me:14097: checking for usable X Toolkit package" >&5
14098echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
14099if test "${cf_cv_xt_ice_compat+set}" = set; then
14100  echo $ECHO_N "(cached) $ECHO_C" >&6
14101else
14102
14103cat >"conftest.$ac_ext" <<_ACEOF
14104#line 14104 "configure"
14105#include "confdefs.h"
14106
14107#include <X11/Shell.h>
14108
14109int
14110main (void)
14111{
14112int num = IceConnectionNumber(0); (void) num
14113
14114  ;
14115  return 0;
14116}
14117_ACEOF
14118rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14119if { (eval echo "$as_me:14119: \"$ac_link\"") >&5
14120  (eval $ac_link) 2>&5
14121  ac_status=$?
14122  echo "$as_me:14122: \$? = $ac_status" >&5
14123  (exit "$ac_status"); } &&
14124         { ac_try='test -s "conftest$ac_exeext"'
14125  { (eval echo "$as_me:14125: \"$ac_try\"") >&5
14126  (eval $ac_try) 2>&5
14127  ac_status=$?
14128  echo "$as_me:14128: \$? = $ac_status" >&5
14129  (exit "$ac_status"); }; }; then
14130  cf_cv_xt_ice_compat=yes
14131else
14132  echo "$as_me: failed program was:" >&5
14133cat "conftest.$ac_ext" >&5
14134cf_cv_xt_ice_compat=no
14135fi
14136rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14137fi
14138echo "$as_me:14138: result: $cf_cv_xt_ice_compat" >&5
14139echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
14140
14141	if test "$cf_cv_xt_ice_compat" = no
14142	then
14143		# workaround for broken ".pc" files used for X Toolkit.
14144		case "x$X_PRE_LIBS" in
14145		(*-lICE*)
14146			case "x$LIBS" in
14147			(*-lICE*)
14148				;;
14149			(*)
14150				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
14151
14152echo "${as_me:-configure}:14152: testing work around broken ICE dependency ..." 1>&5
14153
14154if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
14155	test -n "$verbose" && echo "	found package ice" 1>&6
14156
14157echo "${as_me:-configure}:14157: testing found package ice ..." 1>&5
14158
14159	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
14160	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
14161	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
14162
14163echo "${as_me:-configure}:14163: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14164
14165	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
14166
14167echo "${as_me:-configure}:14167: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
14168
14169cf_fix_cppflags=no
14170cf_new_cflags=
14171cf_new_cppflags=
14172cf_new_extra_cppflags=
14173
14174for cf_add_cflags in $cf_pkgconfig_incs
14175do
14176case "$cf_fix_cppflags" in
14177(no)
14178	case "$cf_add_cflags" in
14179	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14180		case "$cf_add_cflags" in
14181		(-D*)
14182			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14183
14184			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14185				&& test -z "${cf_tst_cflags}" \
14186				&& cf_fix_cppflags=yes
14187
14188			if test "$cf_fix_cppflags" = yes ; then
14189
14190	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14191	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14192
14193				continue
14194			elif test "${cf_tst_cflags}" = "\"'" ; then
14195
14196	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14197	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14198
14199				continue
14200			fi
14201			;;
14202		esac
14203		case "$CPPFLAGS" in
14204		(*$cf_add_cflags)
14205			;;
14206		(*)
14207			case "$cf_add_cflags" in
14208			(-D*)
14209				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14210
14211CPPFLAGS=`echo "$CPPFLAGS" | \
14212	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14213		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14214
14215				;;
14216			esac
14217
14218	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14219	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14220
14221			;;
14222		esac
14223		;;
14224	(*)
14225
14226	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14227	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14228
14229		;;
14230	esac
14231	;;
14232(yes)
14233
14234	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14235	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14236
14237	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14238
14239	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14240		&& test -z "${cf_tst_cflags}" \
14241		&& cf_fix_cppflags=no
14242	;;
14243esac
14244done
14245
14246if test -n "$cf_new_cflags" ; then
14247
14248	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14249	CFLAGS="${CFLAGS}$cf_new_cflags"
14250
14251fi
14252
14253if test -n "$cf_new_cppflags" ; then
14254
14255	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14256	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14257
14258fi
14259
14260if test -n "$cf_new_extra_cppflags" ; then
14261
14262	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14263	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14264
14265fi
14266
14267cf_add_libs="$LIBS"
14268# reverse order
14269cf_add_0lib=
14270for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14271# filter duplicates
14272for cf_add_1lib in $cf_add_0lib; do
14273	for cf_add_2lib in $cf_add_libs; do
14274		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14275			cf_add_1lib=
14276			break
14277		fi
14278	done
14279	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14280done
14281LIBS="$cf_add_libs"
14282
14283if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
14284	test -n "$verbose" && echo "	found package sm" 1>&6
14285
14286echo "${as_me:-configure}:14286: testing found package sm ..." 1>&5
14287
14288	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
14289	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
14290	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
14291
14292echo "${as_me:-configure}:14292: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
14293
14294	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
14295
14296echo "${as_me:-configure}:14296: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
14297
14298cf_fix_cppflags=no
14299cf_new_cflags=
14300cf_new_cppflags=
14301cf_new_extra_cppflags=
14302
14303for cf_add_cflags in $cf_pkgconfig_incs
14304do
14305case "$cf_fix_cppflags" in
14306(no)
14307	case "$cf_add_cflags" in
14308	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14309		case "$cf_add_cflags" in
14310		(-D*)
14311			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14312
14313			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14314				&& test -z "${cf_tst_cflags}" \
14315				&& cf_fix_cppflags=yes
14316
14317			if test "$cf_fix_cppflags" = yes ; then
14318
14319	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14320	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14321
14322				continue
14323			elif test "${cf_tst_cflags}" = "\"'" ; then
14324
14325	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14326	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14327
14328				continue
14329			fi
14330			;;
14331		esac
14332		case "$CPPFLAGS" in
14333		(*$cf_add_cflags)
14334			;;
14335		(*)
14336			case "$cf_add_cflags" in
14337			(-D*)
14338				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14339
14340CPPFLAGS=`echo "$CPPFLAGS" | \
14341	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14342		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14343
14344				;;
14345			esac
14346
14347	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14348	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14349
14350			;;
14351		esac
14352		;;
14353	(*)
14354
14355	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14356	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14357
14358		;;
14359	esac
14360	;;
14361(yes)
14362
14363	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14364	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14365
14366	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14367
14368	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14369		&& test -z "${cf_tst_cflags}" \
14370		&& cf_fix_cppflags=no
14371	;;
14372esac
14373done
14374
14375if test -n "$cf_new_cflags" ; then
14376
14377	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14378	CFLAGS="${CFLAGS}$cf_new_cflags"
14379
14380fi
14381
14382if test -n "$cf_new_cppflags" ; then
14383
14384	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14385	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14386
14387fi
14388
14389if test -n "$cf_new_extra_cppflags" ; then
14390
14391	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14392	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14393
14394fi
14395
14396cf_add_libs="$LIBS"
14397# reverse order
14398cf_add_0lib=
14399for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14400# filter duplicates
14401for cf_add_1lib in $cf_add_0lib; do
14402	for cf_add_2lib in $cf_add_libs; do
14403		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14404			cf_add_1lib=
14405			break
14406		fi
14407	done
14408	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14409done
14410LIBS="$cf_add_libs"
14411
14412	:
14413else
14414	cf_pkgconfig_incs=
14415	cf_pkgconfig_libs=
14416	:
14417fi
14418
14419else
14420	cf_pkgconfig_incs=
14421	cf_pkgconfig_libs=
14422
14423test -n "$verbose" && echo "	...before $LIBS" 1>&6
14424
14425echo "${as_me:-configure}:14425: testing ...before $LIBS ..." 1>&5
14426
14427LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
14428test -n "$verbose" && echo "	...after  $LIBS" 1>&6
14429
14430echo "${as_me:-configure}:14430: testing ...after  $LIBS ..." 1>&5
14431
14432fi
14433
14434				;;
14435			esac
14436			;;
14437		esac
14438	fi
14439
14440	cf_have_X_LIBS=yes
14441
14442else
14443	cf_pkgconfig_incs=
14444	cf_pkgconfig_libs=
14445
14446	LDFLAGS="$X_LIBS $LDFLAGS"
14447
14448test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
14449
14450echo "${as_me:-configure}:14450: testing checking additions to CFLAGS ..." 1>&5
14451
14452cf_check_cflags="$CFLAGS"
14453cf_check_cppflags="$CPPFLAGS"
14454
14455cf_fix_cppflags=no
14456cf_new_cflags=
14457cf_new_cppflags=
14458cf_new_extra_cppflags=
14459
14460for cf_add_cflags in $X_CFLAGS
14461do
14462case "$cf_fix_cppflags" in
14463(no)
14464	case "$cf_add_cflags" in
14465	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14466		case "$cf_add_cflags" in
14467		(-D*)
14468			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14469
14470			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14471				&& test -z "${cf_tst_cflags}" \
14472				&& cf_fix_cppflags=yes
14473
14474			if test "$cf_fix_cppflags" = yes ; then
14475
14476	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14477	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14478
14479				continue
14480			elif test "${cf_tst_cflags}" = "\"'" ; then
14481
14482	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14483	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14484
14485				continue
14486			fi
14487			;;
14488		esac
14489		case "$CPPFLAGS" in
14490		(*$cf_add_cflags)
14491			;;
14492		(*)
14493			case "$cf_add_cflags" in
14494			(-D*)
14495				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14496
14497CPPFLAGS=`echo "$CPPFLAGS" | \
14498	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14499		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14500
14501				;;
14502			esac
14503
14504	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14505	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14506
14507			;;
14508		esac
14509		;;
14510	(*)
14511
14512	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14513	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14514
14515		;;
14516	esac
14517	;;
14518(yes)
14519
14520	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14521	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14522
14523	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
14524
14525	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14526		&& test -z "${cf_tst_cflags}" \
14527		&& cf_fix_cppflags=no
14528	;;
14529esac
14530done
14531
14532if test -n "$cf_new_cflags" ; then
14533	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
14534
14535echo "${as_me:-configure}:14535: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
14536
14537	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14538	CFLAGS="${CFLAGS}$cf_new_cflags"
14539
14540fi
14541
14542if test -n "$cf_new_cppflags" ; then
14543	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
14544
14545echo "${as_me:-configure}:14545: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
14546
14547	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14548	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14549
14550fi
14551
14552if test -n "$cf_new_extra_cppflags" ; then
14553	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
14554
14555echo "${as_me:-configure}:14555: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
14556
14557	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14558	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14559
14560fi
14561
14562if test "x$cf_check_cflags" != "x$CFLAGS" ; then
14563cat >"conftest.$ac_ext" <<_ACEOF
14564#line 14564 "configure"
14565#include "confdefs.h"
14566#include <stdio.h>
14567int
14568main (void)
14569{
14570printf("Hello world");
14571  ;
14572  return 0;
14573}
14574_ACEOF
14575rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14576if { (eval echo "$as_me:14576: \"$ac_link\"") >&5
14577  (eval $ac_link) 2>&5
14578  ac_status=$?
14579  echo "$as_me:14579: \$? = $ac_status" >&5
14580  (exit "$ac_status"); } &&
14581         { ac_try='test -s "conftest$ac_exeext"'
14582  { (eval echo "$as_me:14582: \"$ac_try\"") >&5
14583  (eval $ac_try) 2>&5
14584  ac_status=$?
14585  echo "$as_me:14585: \$? = $ac_status" >&5
14586  (exit "$ac_status"); }; }; then
14587  :
14588else
14589  echo "$as_me: failed program was:" >&5
14590cat "conftest.$ac_ext" >&5
14591test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
14592
14593echo "${as_me:-configure}:14593: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
14594
14595	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
14596		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
14597
14598echo "${as_me:-configure}:14598: testing but keeping change to \$CPPFLAGS ..." 1>&5
14599
14600	 fi
14601	 CFLAGS="$cf_check_cflags"
14602fi
14603rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14604fi
14605
14606	echo "$as_me:14606: checking for XOpenDisplay" >&5
14607echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
14608if test "${ac_cv_func_XOpenDisplay+set}" = set; then
14609  echo $ECHO_N "(cached) $ECHO_C" >&6
14610else
14611  cat >"conftest.$ac_ext" <<_ACEOF
14612#line 14612 "configure"
14613#include "confdefs.h"
14614#define XOpenDisplay autoconf_temporary
14615#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14616#undef XOpenDisplay
14617
14618#ifdef __cplusplus
14619extern "C"
14620#endif
14621
14622/* We use char because int might match the return type of a gcc2
14623   builtin and then its argument prototype would still apply.  */
14624char XOpenDisplay (void);
14625
14626int
14627main (void)
14628{
14629
14630/* The GNU C library defines stubs for functions which it implements
14631    to always fail with ENOSYS.  Some functions are actually named
14632    something starting with __ and the normal name is an alias.  */
14633#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
14634#error found stub for XOpenDisplay
14635#endif
14636
14637	return XOpenDisplay ();
14638  ;
14639  return 0;
14640}
14641_ACEOF
14642rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14643if { (eval echo "$as_me:14643: \"$ac_link\"") >&5
14644  (eval $ac_link) 2>&5
14645  ac_status=$?
14646  echo "$as_me:14646: \$? = $ac_status" >&5
14647  (exit "$ac_status"); } &&
14648         { ac_try='test -s "conftest$ac_exeext"'
14649  { (eval echo "$as_me:14649: \"$ac_try\"") >&5
14650  (eval $ac_try) 2>&5
14651  ac_status=$?
14652  echo "$as_me:14652: \$? = $ac_status" >&5
14653  (exit "$ac_status"); }; }; then
14654  ac_cv_func_XOpenDisplay=yes
14655else
14656  echo "$as_me: failed program was:" >&5
14657cat "conftest.$ac_ext" >&5
14658ac_cv_func_XOpenDisplay=no
14659fi
14660rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14661fi
14662echo "$as_me:14662: result: $ac_cv_func_XOpenDisplay" >&5
14663echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
14664if test "$ac_cv_func_XOpenDisplay" = yes; then
14665  :
14666else
14667
14668	echo "$as_me:14668: checking for XOpenDisplay in -lX11" >&5
14669echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
14670if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
14671  echo $ECHO_N "(cached) $ECHO_C" >&6
14672else
14673  ac_check_lib_save_LIBS=$LIBS
14674LIBS="-lX11  $LIBS"
14675cat >"conftest.$ac_ext" <<_ACEOF
14676#line 14676 "configure"
14677#include "confdefs.h"
14678
14679/* Override any gcc2 internal prototype to avoid an error.  */
14680#ifdef __cplusplus
14681extern "C"
14682#endif
14683/* We use char because int might match the return type of a gcc2
14684   builtin and then its argument prototype would still apply.  */
14685char XOpenDisplay ();
14686int
14687main (void)
14688{
14689XOpenDisplay ();
14690  ;
14691  return 0;
14692}
14693_ACEOF
14694rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14695if { (eval echo "$as_me:14695: \"$ac_link\"") >&5
14696  (eval $ac_link) 2>&5
14697  ac_status=$?
14698  echo "$as_me:14698: \$? = $ac_status" >&5
14699  (exit "$ac_status"); } &&
14700         { ac_try='test -s "conftest$ac_exeext"'
14701  { (eval echo "$as_me:14701: \"$ac_try\"") >&5
14702  (eval $ac_try) 2>&5
14703  ac_status=$?
14704  echo "$as_me:14704: \$? = $ac_status" >&5
14705  (exit "$ac_status"); }; }; then
14706  ac_cv_lib_X11_XOpenDisplay=yes
14707else
14708  echo "$as_me: failed program was:" >&5
14709cat "conftest.$ac_ext" >&5
14710ac_cv_lib_X11_XOpenDisplay=no
14711fi
14712rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14713LIBS=$ac_check_lib_save_LIBS
14714fi
14715echo "$as_me:14715: result: $ac_cv_lib_X11_XOpenDisplay" >&5
14716echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
14717if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
14718
14719cf_add_libs="$LIBS"
14720# reverse order
14721cf_add_0lib=
14722for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14723# filter duplicates
14724for cf_add_1lib in $cf_add_0lib; do
14725	for cf_add_2lib in $cf_add_libs; do
14726		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14727			cf_add_1lib=
14728			break
14729		fi
14730	done
14731	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14732done
14733LIBS="$cf_add_libs"
14734
14735fi
14736
14737fi
14738
14739	echo "$as_me:14739: checking for XtAppInitialize" >&5
14740echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
14741if test "${ac_cv_func_XtAppInitialize+set}" = set; then
14742  echo $ECHO_N "(cached) $ECHO_C" >&6
14743else
14744  cat >"conftest.$ac_ext" <<_ACEOF
14745#line 14745 "configure"
14746#include "confdefs.h"
14747#define XtAppInitialize autoconf_temporary
14748#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14749#undef XtAppInitialize
14750
14751#ifdef __cplusplus
14752extern "C"
14753#endif
14754
14755/* We use char because int might match the return type of a gcc2
14756   builtin and then its argument prototype would still apply.  */
14757char XtAppInitialize (void);
14758
14759int
14760main (void)
14761{
14762
14763/* The GNU C library defines stubs for functions which it implements
14764    to always fail with ENOSYS.  Some functions are actually named
14765    something starting with __ and the normal name is an alias.  */
14766#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
14767#error found stub for XtAppInitialize
14768#endif
14769
14770	return XtAppInitialize ();
14771  ;
14772  return 0;
14773}
14774_ACEOF
14775rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14776if { (eval echo "$as_me:14776: \"$ac_link\"") >&5
14777  (eval $ac_link) 2>&5
14778  ac_status=$?
14779  echo "$as_me:14779: \$? = $ac_status" >&5
14780  (exit "$ac_status"); } &&
14781         { ac_try='test -s "conftest$ac_exeext"'
14782  { (eval echo "$as_me:14782: \"$ac_try\"") >&5
14783  (eval $ac_try) 2>&5
14784  ac_status=$?
14785  echo "$as_me:14785: \$? = $ac_status" >&5
14786  (exit "$ac_status"); }; }; then
14787  ac_cv_func_XtAppInitialize=yes
14788else
14789  echo "$as_me: failed program was:" >&5
14790cat "conftest.$ac_ext" >&5
14791ac_cv_func_XtAppInitialize=no
14792fi
14793rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14794fi
14795echo "$as_me:14795: result: $ac_cv_func_XtAppInitialize" >&5
14796echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
14797if test "$ac_cv_func_XtAppInitialize" = yes; then
14798  :
14799else
14800
14801	echo "$as_me:14801: checking for XtAppInitialize in -lXt" >&5
14802echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
14803if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
14804  echo $ECHO_N "(cached) $ECHO_C" >&6
14805else
14806  ac_check_lib_save_LIBS=$LIBS
14807LIBS="-lXt  $LIBS"
14808cat >"conftest.$ac_ext" <<_ACEOF
14809#line 14809 "configure"
14810#include "confdefs.h"
14811
14812/* Override any gcc2 internal prototype to avoid an error.  */
14813#ifdef __cplusplus
14814extern "C"
14815#endif
14816/* We use char because int might match the return type of a gcc2
14817   builtin and then its argument prototype would still apply.  */
14818char XtAppInitialize ();
14819int
14820main (void)
14821{
14822XtAppInitialize ();
14823  ;
14824  return 0;
14825}
14826_ACEOF
14827rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14828if { (eval echo "$as_me:14828: \"$ac_link\"") >&5
14829  (eval $ac_link) 2>&5
14830  ac_status=$?
14831  echo "$as_me:14831: \$? = $ac_status" >&5
14832  (exit "$ac_status"); } &&
14833         { ac_try='test -s "conftest$ac_exeext"'
14834  { (eval echo "$as_me:14834: \"$ac_try\"") >&5
14835  (eval $ac_try) 2>&5
14836  ac_status=$?
14837  echo "$as_me:14837: \$? = $ac_status" >&5
14838  (exit "$ac_status"); }; }; then
14839  ac_cv_lib_Xt_XtAppInitialize=yes
14840else
14841  echo "$as_me: failed program was:" >&5
14842cat "conftest.$ac_ext" >&5
14843ac_cv_lib_Xt_XtAppInitialize=no
14844fi
14845rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14846LIBS=$ac_check_lib_save_LIBS
14847fi
14848echo "$as_me:14848: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
14849echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
14850if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
14851
14852cat >>confdefs.h <<\EOF
14853#define HAVE_LIBXT 1
14854EOF
14855
14856		 cf_have_X_LIBS=Xt
14857		 LIBS="-lXt $LIBS"
14858fi
14859
14860fi
14861
14862fi
14863
14864if test "$cf_have_X_LIBS" = no ; then
14865	{ echo "$as_me:14865: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14866test program.  You will have to check and add the proper libraries by hand
14867to makefile." >&5
14868echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
14869test program.  You will have to check and add the proper libraries by hand
14870to makefile." >&2;}
14871fi
14872
14873cf_x_athena_root=$cf_x_athena
14874cf_x_athena_inc=""
14875
14876for cf_path in default \
14877	/usr/contrib/X11R6 \
14878	/usr/contrib/X11R5 \
14879	/usr/lib/X11R5 \
14880	/usr/local
14881do
14882	if test -z "$cf_x_athena_inc" ; then
14883
14884cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
14885cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
14886cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
14887LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14888for cf_X_CFLAGS in $X_CFLAGS
14889do
14890	case "x$cf_X_CFLAGS" in
14891	x-[IUD]*)
14892		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
14893		;;
14894	*)
14895		CFLAGS="$CFLAGS $cf_X_CFLAGS"
14896		;;
14897	esac
14898done
14899
14900		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
14901		if test "$cf_path" != default ; then
14902
14903	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14904	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
14905
14906			echo "$as_me:14906: checking for $cf_test in $cf_path" >&5
14907echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
14908		else
14909			echo "$as_me:14909: checking for $cf_test" >&5
14910echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
14911		fi
14912		cat >"conftest.$ac_ext" <<_ACEOF
14913#line 14913 "configure"
14914#include "confdefs.h"
14915
14916#include <X11/Intrinsic.h>
14917#include <$cf_test>
14918int
14919main (void)
14920{
14921
14922  ;
14923  return 0;
14924}
14925_ACEOF
14926rm -f "conftest.$ac_objext"
14927if { (eval echo "$as_me:14927: \"$ac_compile\"") >&5
14928  (eval $ac_compile) 2>&5
14929  ac_status=$?
14930  echo "$as_me:14930: \$? = $ac_status" >&5
14931  (exit "$ac_status"); } &&
14932         { ac_try='test -s "conftest.$ac_objext"'
14933  { (eval echo "$as_me:14933: \"$ac_try\"") >&5
14934  (eval $ac_try) 2>&5
14935  ac_status=$?
14936  echo "$as_me:14936: \$? = $ac_status" >&5
14937  (exit "$ac_status"); }; }; then
14938  cf_result=yes
14939else
14940  echo "$as_me: failed program was:" >&5
14941cat "conftest.$ac_ext" >&5
14942cf_result=no
14943fi
14944rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14945		echo "$as_me:14945: result: $cf_result" >&5
14946echo "${ECHO_T}$cf_result" >&6
14947
14948LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
14949CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
14950CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
14951
14952		if test "$cf_result" = yes ; then
14953			test "$cf_path"  = default && cf_x_athena_inc=default
14954			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
14955			break
14956		fi
14957	fi
14958done
14959
14960if test -z "$cf_x_athena_inc" ; then
14961	{ echo "$as_me:14961: WARNING: Unable to find Athena header files" >&5
14962echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
14963elif test "$cf_x_athena_inc" != default ; then
14964
14965	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14966	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
14967
14968fi
14969
14970cf_x_athena_root=$cf_x_athena
14971cf_x_athena_lib=""
14972
14973for cf_path in default \
14974	/usr/contrib/X11R6 \
14975	/usr/contrib/X11R5 \
14976	/usr/lib/X11R5 \
14977	/usr/local
14978do
14979	for cf_lib in \
14980		${cf_x_athena_root} \
14981		${cf_x_athena_root}7 \
14982		${cf_x_athena_root}6
14983	do
14984	for cf_libs in \
14985		"-l$cf_lib -lXmu" \
14986		"-l$cf_lib -lXpm -lXmu" \
14987		"-l${cf_lib}_s -lXmu_s"
14988	do
14989		test -n "$cf_x_athena_lib" && break
14990
14991cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
14992cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
14993cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
14994LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
14995for cf_X_CFLAGS in $X_CFLAGS
14996do
14997	case "x$cf_X_CFLAGS" in
14998	x-[IUD]*)
14999		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
15000		;;
15001	*)
15002		CFLAGS="$CFLAGS $cf_X_CFLAGS"
15003		;;
15004	esac
15005done
15006
15007		cf_test=XawSimpleMenuAddGlobalActions
15008		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
15009
15010cf_add_libs="$LIBS"
15011# reverse order
15012cf_add_0lib=
15013for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15014# filter duplicates
15015for cf_add_1lib in $cf_add_0lib; do
15016	for cf_add_2lib in $cf_add_libs; do
15017		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15018			cf_add_1lib=
15019			break
15020		fi
15021	done
15022	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15023done
15024LIBS="$cf_add_libs"
15025
15026		echo "$as_me:15026: checking for $cf_test in $cf_libs" >&5
15027echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
15028		cat >"conftest.$ac_ext" <<_ACEOF
15029#line 15029 "configure"
15030#include "confdefs.h"
15031
15032#include <X11/Intrinsic.h>
15033#include <X11/$cf_x_athena_root/SimpleMenu.h>
15034
15035int
15036main (void)
15037{
15038
15039$cf_test((XtAppContext) 0)
15040  ;
15041  return 0;
15042}
15043_ACEOF
15044rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15045if { (eval echo "$as_me:15045: \"$ac_link\"") >&5
15046  (eval $ac_link) 2>&5
15047  ac_status=$?
15048  echo "$as_me:15048: \$? = $ac_status" >&5
15049  (exit "$ac_status"); } &&
15050         { ac_try='test -s "conftest$ac_exeext"'
15051  { (eval echo "$as_me:15051: \"$ac_try\"") >&5
15052  (eval $ac_try) 2>&5
15053  ac_status=$?
15054  echo "$as_me:15054: \$? = $ac_status" >&5
15055  (exit "$ac_status"); }; }; then
15056  cf_result=yes
15057else
15058  echo "$as_me: failed program was:" >&5
15059cat "conftest.$ac_ext" >&5
15060cf_result=no
15061fi
15062rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15063		echo "$as_me:15063: result: $cf_result" >&5
15064echo "${ECHO_T}$cf_result" >&6
15065
15066LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
15067CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
15068CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
15069
15070		if test "$cf_result" = yes ; then
15071			cf_x_athena_lib="$cf_libs"
15072			break
15073		fi
15074	done # cf_libs
15075		test -n "$cf_x_athena_lib" && break
15076	done # cf_lib
15077done
15078
15079if test -z "$cf_x_athena_lib" ; then
15080	{ { echo "$as_me:15080: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
15081echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
15082   { (exit 1); exit 1; }; }
15083fi
15084
15085cf_add_libs="$LIBS"
15086# reverse order
15087cf_add_0lib=
15088for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15089# filter duplicates
15090for cf_add_1lib in $cf_add_0lib; do
15091	for cf_add_2lib in $cf_add_libs; do
15092		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15093			cf_add_1lib=
15094			break
15095		fi
15096	done
15097	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15098done
15099LIBS="$cf_add_libs"
15100
15101cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15102
15103cat >>confdefs.h <<EOF
15104#define $cf_x_athena_LIBS 1
15105EOF
15106
15107fi
15108
15109for ac_header in X11/Xpoll.h
15110do
15111as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15112echo "$as_me:15112: checking for $ac_header" >&5
15113echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15114if eval "test \"\${$as_ac_Header+set}\" = set"; then
15115  echo $ECHO_N "(cached) $ECHO_C" >&6
15116else
15117  cat >"conftest.$ac_ext" <<_ACEOF
15118#line 15118 "configure"
15119#include "confdefs.h"
15120#include <$ac_header>
15121_ACEOF
15122if { (eval echo "$as_me:15122: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15123  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15124  ac_status=$?
15125  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15126  rm -f conftest.er1
15127  cat conftest.err >&5
15128  echo "$as_me:15128: \$? = $ac_status" >&5
15129  (exit "$ac_status"); } >/dev/null; then
15130  if test -s conftest.err; then
15131    ac_cpp_err=$ac_c_preproc_warn_flag
15132  else
15133    ac_cpp_err=
15134  fi
15135else
15136  ac_cpp_err=yes
15137fi
15138if test -z "$ac_cpp_err"; then
15139  eval "$as_ac_Header=yes"
15140else
15141  echo "$as_me: failed program was:" >&5
15142  cat "conftest.$ac_ext" >&5
15143  eval "$as_ac_Header=no"
15144fi
15145rm -f conftest.err "conftest.$ac_ext"
15146fi
15147echo "$as_me:15147: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15148echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15149if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15150  cat >>confdefs.h <<EOF
15151#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15152EOF
15153
15154fi
15155done
15156
15157echo "$as_me:15157: checking for declaration of fd_set" >&5
15158echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
15159if test "${cf_cv_type_fd_set+set}" = set; then
15160  echo $ECHO_N "(cached) $ECHO_C" >&6
15161else
15162
15163echo "${as_me:-configure}:15163: testing sys/types alone ..." 1>&5
15164
15165cat >"conftest.$ac_ext" <<_ACEOF
15166#line 15166 "configure"
15167#include "confdefs.h"
15168
15169#include <sys/types.h>
15170int
15171main (void)
15172{
15173fd_set x; (void)x
15174  ;
15175  return 0;
15176}
15177_ACEOF
15178rm -f "conftest.$ac_objext"
15179if { (eval echo "$as_me:15179: \"$ac_compile\"") >&5
15180  (eval $ac_compile) 2>&5
15181  ac_status=$?
15182  echo "$as_me:15182: \$? = $ac_status" >&5
15183  (exit "$ac_status"); } &&
15184         { ac_try='test -s "conftest.$ac_objext"'
15185  { (eval echo "$as_me:15185: \"$ac_try\"") >&5
15186  (eval $ac_try) 2>&5
15187  ac_status=$?
15188  echo "$as_me:15188: \$? = $ac_status" >&5
15189  (exit "$ac_status"); }; }; then
15190  cf_cv_type_fd_set=sys/types.h
15191else
15192  echo "$as_me: failed program was:" >&5
15193cat "conftest.$ac_ext" >&5
15194
15195echo "${as_me:-configure}:15195: testing X11/Xpoll.h ..." 1>&5
15196
15197cat >"conftest.$ac_ext" <<_ACEOF
15198#line 15198 "configure"
15199#include "confdefs.h"
15200
15201#ifdef HAVE_X11_XPOLL_H
15202#include <X11/Xpoll.h>
15203#endif
15204int
15205main (void)
15206{
15207fd_set x; (void)x
15208  ;
15209  return 0;
15210}
15211_ACEOF
15212rm -f "conftest.$ac_objext"
15213if { (eval echo "$as_me:15213: \"$ac_compile\"") >&5
15214  (eval $ac_compile) 2>&5
15215  ac_status=$?
15216  echo "$as_me:15216: \$? = $ac_status" >&5
15217  (exit "$ac_status"); } &&
15218         { ac_try='test -s "conftest.$ac_objext"'
15219  { (eval echo "$as_me:15219: \"$ac_try\"") >&5
15220  (eval $ac_try) 2>&5
15221  ac_status=$?
15222  echo "$as_me:15222: \$? = $ac_status" >&5
15223  (exit "$ac_status"); }; }; then
15224  cf_cv_type_fd_set=X11/Xpoll.h
15225else
15226  echo "$as_me: failed program was:" >&5
15227cat "conftest.$ac_ext" >&5
15228
15229echo "${as_me:-configure}:15229: testing sys/select.h ..." 1>&5
15230
15231cat >"conftest.$ac_ext" <<_ACEOF
15232#line 15232 "configure"
15233#include "confdefs.h"
15234
15235#include <sys/types.h>
15236#include <sys/select.h>
15237int
15238main (void)
15239{
15240fd_set x; (void)x
15241  ;
15242  return 0;
15243}
15244_ACEOF
15245rm -f "conftest.$ac_objext"
15246if { (eval echo "$as_me:15246: \"$ac_compile\"") >&5
15247  (eval $ac_compile) 2>&5
15248  ac_status=$?
15249  echo "$as_me:15249: \$? = $ac_status" >&5
15250  (exit "$ac_status"); } &&
15251         { ac_try='test -s "conftest.$ac_objext"'
15252  { (eval echo "$as_me:15252: \"$ac_try\"") >&5
15253  (eval $ac_try) 2>&5
15254  ac_status=$?
15255  echo "$as_me:15255: \$? = $ac_status" >&5
15256  (exit "$ac_status"); }; }; then
15257  cf_cv_type_fd_set=sys/select.h
15258else
15259  echo "$as_me: failed program was:" >&5
15260cat "conftest.$ac_ext" >&5
15261cf_cv_type_fd_set=unknown
15262fi
15263rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15264fi
15265rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15266fi
15267rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15268fi
15269echo "$as_me:15269: result: $cf_cv_type_fd_set" >&5
15270echo "${ECHO_T}$cf_cv_type_fd_set" >&6
15271if test $cf_cv_type_fd_set = sys/select.h ; then
15272
15273cat >>confdefs.h <<\EOF
15274#define USE_SYS_SELECT_H 1
15275EOF
15276
15277fi
15278
15279echo "$as_me:15279: checking for declaration of fd_mask" >&5
15280echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
15281if test "${cf_cv_type_fd_mask+set}" = set; then
15282  echo $ECHO_N "(cached) $ECHO_C" >&6
15283else
15284
15285    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
15286        cat >"conftest.$ac_ext" <<_ACEOF
15287#line 15287 "configure"
15288#include "confdefs.h"
15289
15290#include <X11/Xpoll.h>
15291int
15292main (void)
15293{
15294fd_mask x
15295  ;
15296  return 0;
15297}
15298_ACEOF
15299rm -f "conftest.$ac_objext"
15300if { (eval echo "$as_me:15300: \"$ac_compile\"") >&5
15301  (eval $ac_compile) 2>&5
15302  ac_status=$?
15303  echo "$as_me:15303: \$? = $ac_status" >&5
15304  (exit "$ac_status"); } &&
15305         { ac_try='test -s "conftest.$ac_objext"'
15306  { (eval echo "$as_me:15306: \"$ac_try\"") >&5
15307  (eval $ac_try) 2>&5
15308  ac_status=$?
15309  echo "$as_me:15309: \$? = $ac_status" >&5
15310  (exit "$ac_status"); }; }; then
15311  :
15312else
15313  echo "$as_me: failed program was:" >&5
15314cat "conftest.$ac_ext" >&5
15315
15316echo "${as_me:-configure}:15316: testing if we must define CSRG_BASED ..." 1>&5
15317
15318# Xosdefs.h on Mac OS X may not define this (but it should).
15319            cat >"conftest.$ac_ext" <<_ACEOF
15320#line 15320 "configure"
15321#include "confdefs.h"
15322
15323#define CSRG_BASED
15324#include <X11/Xpoll.h>
15325int
15326main (void)
15327{
15328fd_mask x
15329  ;
15330  return 0;
15331}
15332_ACEOF
15333rm -f "conftest.$ac_objext"
15334if { (eval echo "$as_me:15334: \"$ac_compile\"") >&5
15335  (eval $ac_compile) 2>&5
15336  ac_status=$?
15337  echo "$as_me:15337: \$? = $ac_status" >&5
15338  (exit "$ac_status"); } &&
15339         { ac_try='test -s "conftest.$ac_objext"'
15340  { (eval echo "$as_me:15340: \"$ac_try\"") >&5
15341  (eval $ac_try) 2>&5
15342  ac_status=$?
15343  echo "$as_me:15343: \$? = $ac_status" >&5
15344  (exit "$ac_status"); }; }; then
15345  cf_cv_type_fd_mask=CSRG_BASED
15346else
15347  echo "$as_me: failed program was:" >&5
15348cat "conftest.$ac_ext" >&5
15349fi
15350rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15351fi
15352rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15353    else
15354        cf_cv_type_fd_mask=$cf_cv_type_fd_set
15355    fi
15356
15357fi
15358echo "$as_me:15358: result: $cf_cv_type_fd_mask" >&5
15359echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
15360if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
15361
15362cat >>confdefs.h <<\EOF
15363#define CSRG_BASED 1
15364EOF
15365
15366fi
15367
15368echo "$as_me:15368: checking for IRIX 6.5 baud-rate redefinitions" >&5
15369echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
15370if test "${cf_cv_termio_c_ispeed+set}" = set; then
15371  echo $ECHO_N "(cached) $ECHO_C" >&6
15372else
15373
15374cat >"conftest.$ac_ext" <<_ACEOF
15375#line 15375 "configure"
15376#include "confdefs.h"
15377
15378#include <sys/types.h>
15379#include <sys/termio.h>
15380int
15381main (void)
15382{
15383
15384struct termio foo;
15385foo.c_ispeed = B38400;
15386foo.c_ospeed = B9600;
15387(void)foo;
15388
15389  ;
15390  return 0;
15391}
15392_ACEOF
15393rm -f "conftest.$ac_objext"
15394if { (eval echo "$as_me:15394: \"$ac_compile\"") >&5
15395  (eval $ac_compile) 2>&5
15396  ac_status=$?
15397  echo "$as_me:15397: \$? = $ac_status" >&5
15398  (exit "$ac_status"); } &&
15399         { ac_try='test -s "conftest.$ac_objext"'
15400  { (eval echo "$as_me:15400: \"$ac_try\"") >&5
15401  (eval $ac_try) 2>&5
15402  ac_status=$?
15403  echo "$as_me:15403: \$? = $ac_status" >&5
15404  (exit "$ac_status"); }; }; then
15405  cf_cv_termio_c_ispeed=yes
15406
15407else
15408  echo "$as_me: failed program was:" >&5
15409cat "conftest.$ac_ext" >&5
15410cf_cv_termio_c_ispeed=no
15411fi
15412rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15413
15414fi
15415echo "$as_me:15415: result: $cf_cv_termio_c_ispeed" >&5
15416echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
15417test "$cf_cv_termio_c_ispeed" = yes &&
15418cat >>confdefs.h <<\EOF
15419#define HAVE_TERMIO_C_ISPEED 1
15420EOF
15421
15422echo "$as_me:15422: checking for termios type tcflag_t" >&5
15423echo $ECHO_N "checking for termios type tcflag_t... $ECHO_C" >&6
15424if test "${cf_cv_havetype_tcflag_t+set}" = set; then
15425  echo $ECHO_N "(cached) $ECHO_C" >&6
15426else
15427
15428	cat >"conftest.$ac_ext" <<_ACEOF
15429#line 15429 "configure"
15430#include "confdefs.h"
15431#include <termios.h>
15432int
15433main (void)
15434{
15435
15436		tcflag_t x = 0; (void)x
15437  ;
15438  return 0;
15439}
15440_ACEOF
15441rm -f "conftest.$ac_objext"
15442if { (eval echo "$as_me:15442: \"$ac_compile\"") >&5
15443  (eval $ac_compile) 2>&5
15444  ac_status=$?
15445  echo "$as_me:15445: \$? = $ac_status" >&5
15446  (exit "$ac_status"); } &&
15447         { ac_try='test -s "conftest.$ac_objext"'
15448  { (eval echo "$as_me:15448: \"$ac_try\"") >&5
15449  (eval $ac_try) 2>&5
15450  ac_status=$?
15451  echo "$as_me:15451: \$? = $ac_status" >&5
15452  (exit "$ac_status"); }; }; then
15453  cf_cv_havetype_tcflag_t=yes
15454else
15455  echo "$as_me: failed program was:" >&5
15456cat "conftest.$ac_ext" >&5
15457cf_cv_havetype_tcflag_t=no
15458fi
15459rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15460
15461fi
15462echo "$as_me:15462: result: $cf_cv_havetype_tcflag_t" >&5
15463echo "${ECHO_T}$cf_cv_havetype_tcflag_t" >&6
15464test "$cf_cv_havetype_tcflag_t" = no &&
15465cat >>confdefs.h <<\EOF
15466#define tcflag_t unsigned long
15467EOF
15468
15469echo "$as_me:15469: checking for termios type speed_t" >&5
15470echo $ECHO_N "checking for termios type speed_t... $ECHO_C" >&6
15471if test "${cf_cv_havetype_speed_t+set}" = set; then
15472  echo $ECHO_N "(cached) $ECHO_C" >&6
15473else
15474
15475	cat >"conftest.$ac_ext" <<_ACEOF
15476#line 15476 "configure"
15477#include "confdefs.h"
15478#include <termios.h>
15479int
15480main (void)
15481{
15482
15483		speed_t x = 0; (void)x
15484  ;
15485  return 0;
15486}
15487_ACEOF
15488rm -f "conftest.$ac_objext"
15489if { (eval echo "$as_me:15489: \"$ac_compile\"") >&5
15490  (eval $ac_compile) 2>&5
15491  ac_status=$?
15492  echo "$as_me:15492: \$? = $ac_status" >&5
15493  (exit "$ac_status"); } &&
15494         { ac_try='test -s "conftest.$ac_objext"'
15495  { (eval echo "$as_me:15495: \"$ac_try\"") >&5
15496  (eval $ac_try) 2>&5
15497  ac_status=$?
15498  echo "$as_me:15498: \$? = $ac_status" >&5
15499  (exit "$ac_status"); }; }; then
15500  cf_cv_havetype_speed_t=yes
15501else
15502  echo "$as_me: failed program was:" >&5
15503cat "conftest.$ac_ext" >&5
15504cf_cv_havetype_speed_t=no
15505fi
15506rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15507
15508fi
15509echo "$as_me:15509: result: $cf_cv_havetype_speed_t" >&5
15510echo "${ECHO_T}$cf_cv_havetype_speed_t" >&6
15511test "$cf_cv_havetype_speed_t" = no &&
15512cat >>confdefs.h <<\EOF
15513#define speed_t unsigned short
15514EOF
15515
15516echo "$as_me:15516: checking for termios type cc_t" >&5
15517echo $ECHO_N "checking for termios type cc_t... $ECHO_C" >&6
15518if test "${cf_cv_havetype_cc_t+set}" = set; then
15519  echo $ECHO_N "(cached) $ECHO_C" >&6
15520else
15521
15522	cat >"conftest.$ac_ext" <<_ACEOF
15523#line 15523 "configure"
15524#include "confdefs.h"
15525#include <termios.h>
15526int
15527main (void)
15528{
15529
15530		cc_t x = 0; (void)x
15531  ;
15532  return 0;
15533}
15534_ACEOF
15535rm -f "conftest.$ac_objext"
15536if { (eval echo "$as_me:15536: \"$ac_compile\"") >&5
15537  (eval $ac_compile) 2>&5
15538  ac_status=$?
15539  echo "$as_me:15539: \$? = $ac_status" >&5
15540  (exit "$ac_status"); } &&
15541         { ac_try='test -s "conftest.$ac_objext"'
15542  { (eval echo "$as_me:15542: \"$ac_try\"") >&5
15543  (eval $ac_try) 2>&5
15544  ac_status=$?
15545  echo "$as_me:15545: \$? = $ac_status" >&5
15546  (exit "$ac_status"); }; }; then
15547  cf_cv_havetype_cc_t=yes
15548else
15549  echo "$as_me: failed program was:" >&5
15550cat "conftest.$ac_ext" >&5
15551cf_cv_havetype_cc_t=no
15552fi
15553rm -f "conftest.$ac_objext" "conftest.$ac_ext"
15554
15555fi
15556echo "$as_me:15556: result: $cf_cv_havetype_cc_t" >&5
15557echo "${ECHO_T}$cf_cv_havetype_cc_t" >&6
15558test "$cf_cv_havetype_cc_t" = no &&
15559cat >>confdefs.h <<\EOF
15560#define cc_t unsigned char
15561EOF
15562
15563# The Xcursor library is normally (weakly) linked via the X11 library rather
15564# than directly to applications.  xterm can select a cursor theme; users can
15565# also use environment variables to select cursor size.  We would only notice
15566# the library if there are development files for it.  Provide a way to disable
15567# the feature if it is unwanted.
15568echo "$as_me:15568: checking if we expect to use the Xcursor library" >&5
15569echo $ECHO_N "checking if we expect to use the Xcursor library... $ECHO_C" >&6
15570
15571# Check whether --enable-xcursor or --disable-xcursor was given.
15572if test "${enable_xcursor+set}" = set; then
15573  enableval="$enable_xcursor"
15574  test "$enableval" != no && enableval=yes
15575	if test "$enableval" != "yes" ; then
15576    enable_xcursor=no
15577	else
15578		enable_xcursor=yes
15579	fi
15580else
15581  enableval=yes
15582	enable_xcursor=yes
15583
15584fi;
15585echo "$as_me:15585: result: $enable_xcursor" >&5
15586echo "${ECHO_T}$enable_xcursor" >&6
15587if test "$enable_xcursor" = yes; then
15588
15589cat >>confdefs.h <<\EOF
15590#define HAVE_LIB_XCURSOR 1
15591EOF
15592
15593fi
15594
15595LIBS="$LIBS $X_EXTRA_LIBS"
15596
15597for ac_header in \
15598stropts.h \
15599
15600do
15601as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
15602echo "$as_me:15602: checking for $ac_header" >&5
15603echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
15604if eval "test \"\${$as_ac_Header+set}\" = set"; then
15605  echo $ECHO_N "(cached) $ECHO_C" >&6
15606else
15607  cat >"conftest.$ac_ext" <<_ACEOF
15608#line 15608 "configure"
15609#include "confdefs.h"
15610#include <$ac_header>
15611_ACEOF
15612if { (eval echo "$as_me:15612: \"$ac_cpp "conftest.$ac_ext"\"") >&5
15613  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
15614  ac_status=$?
15615  $EGREP -v '^ *\+' conftest.er1 >conftest.err
15616  rm -f conftest.er1
15617  cat conftest.err >&5
15618  echo "$as_me:15618: \$? = $ac_status" >&5
15619  (exit "$ac_status"); } >/dev/null; then
15620  if test -s conftest.err; then
15621    ac_cpp_err=$ac_c_preproc_warn_flag
15622  else
15623    ac_cpp_err=
15624  fi
15625else
15626  ac_cpp_err=yes
15627fi
15628if test -z "$ac_cpp_err"; then
15629  eval "$as_ac_Header=yes"
15630else
15631  echo "$as_me: failed program was:" >&5
15632  cat "conftest.$ac_ext" >&5
15633  eval "$as_ac_Header=no"
15634fi
15635rm -f conftest.err "conftest.$ac_ext"
15636fi
15637echo "$as_me:15637: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
15638echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
15639if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
15640  cat >>confdefs.h <<EOF
15641#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
15642EOF
15643
15644fi
15645done
15646
15647cf_func_grantpt="grantpt ptsname"
15648cf_prefer_openpt=no
15649case $host_os in
15650(darwin[0-9].*)
15651	;;
15652(openbsd[0-9].*)
15653	# The POSIX entrypoints exist, but have never worked.
15654	;;
15655(linux*)
15656	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15657	cf_prefer_openpt=yes
15658	;;
15659(*)
15660	cf_func_grantpt="$cf_func_grantpt posix_openpt"
15661	;;
15662esac
15663
15664for ac_func in $cf_func_grantpt
15665do
15666as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15667echo "$as_me:15667: checking for $ac_func" >&5
15668echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15669if eval "test \"\${$as_ac_var+set}\" = set"; then
15670  echo $ECHO_N "(cached) $ECHO_C" >&6
15671else
15672  cat >"conftest.$ac_ext" <<_ACEOF
15673#line 15673 "configure"
15674#include "confdefs.h"
15675#define $ac_func autoconf_temporary
15676#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15677#undef $ac_func
15678
15679#ifdef __cplusplus
15680extern "C"
15681#endif
15682
15683/* We use char because int might match the return type of a gcc2
15684   builtin and then its argument prototype would still apply.  */
15685char $ac_func (void);
15686
15687int
15688main (void)
15689{
15690
15691/* The GNU C library defines stubs for functions which it implements
15692    to always fail with ENOSYS.  Some functions are actually named
15693    something starting with __ and the normal name is an alias.  */
15694#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15695#error found stub for $ac_func
15696#endif
15697
15698	return $ac_func ();
15699  ;
15700  return 0;
15701}
15702_ACEOF
15703rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15704if { (eval echo "$as_me:15704: \"$ac_link\"") >&5
15705  (eval $ac_link) 2>&5
15706  ac_status=$?
15707  echo "$as_me:15707: \$? = $ac_status" >&5
15708  (exit "$ac_status"); } &&
15709         { ac_try='test -s "conftest$ac_exeext"'
15710  { (eval echo "$as_me:15710: \"$ac_try\"") >&5
15711  (eval $ac_try) 2>&5
15712  ac_status=$?
15713  echo "$as_me:15713: \$? = $ac_status" >&5
15714  (exit "$ac_status"); }; }; then
15715  eval "$as_ac_var=yes"
15716else
15717  echo "$as_me: failed program was:" >&5
15718cat "conftest.$ac_ext" >&5
15719eval "$as_ac_var=no"
15720fi
15721rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15722fi
15723echo "$as_me:15723: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15724echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15725if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15726  cat >>confdefs.h <<EOF
15727#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15728EOF
15729
15730fi
15731done
15732
15733cf_grantpt_opts=
15734if test "x$ac_cv_func_grantpt" = "xyes" ; then
15735	echo "$as_me:15735: checking if grantpt really works" >&5
15736echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
15737	cat >"conftest.$ac_ext" <<_ACEOF
15738#line 15738 "configure"
15739#include "confdefs.h"
15740
15741#include <stdlib.h>
15742#include <stdio.h>
15743#include <termios.h>
15744#include <unistd.h>
15745#include <signal.h>
15746#include <fcntl.h>
15747#include <errno.h>
15748
15749#ifndef HAVE_POSIX_OPENPT
15750#undef posix_openpt
15751#define posix_openpt(mode) open("/dev/ptmx", mode)
15752#endif
15753
15754#ifdef HAVE_STROPTS_H
15755#include <stropts.h>
15756#endif
15757
15758static void failed(int code)
15759{
15760	perror("conftest");
15761	exit(code);
15762}
15763
15764static void my_timeout(int sig)
15765{
15766	(void)sig;
15767	exit(99);
15768}
15769
15770int
15771main (void)
15772{
15773
15774	int code = 0;
15775	int pty;
15776	int tty;
15777	char *slave;
15778	struct termios tio;
15779
15780	(void)tio;
15781	signal(SIGALRM, my_timeout);
15782
15783	if (alarm(2) == 9)
15784		failed(9);
15785	else if ((pty = posix_openpt(O_RDWR)) < 0)
15786		failed(1);
15787	else if (grantpt(pty) < 0)
15788		failed(2);
15789	else if (unlockpt(pty) < 0)
15790		failed(3);
15791	else if ((slave = ptsname(pty)) == 0)
15792		failed(4);
15793#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15794	else if (!isatty(pty))
15795		failed(4);
15796#endif
15797#if CONFTEST >= 4
15798    else if (tcgetattr(pty, &tio) < 0)
15799		failed(20);
15800    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15801		failed(21);
15802#endif
15803	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15804	 * Linux does treat it that way.
15805	 */
15806	else if ((tty = open(slave, O_RDWR)) < 0)
15807		failed(5);
15808#ifdef CONFTEST
15809#ifdef I_PUSH
15810#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15811    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15812		failed(10);
15813#endif
15814#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15815    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15816		failed(11);
15817#endif
15818#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15819    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15820		failed(12);
15821#endif
15822#endif /* I_PUSH */
15823#if CONFTEST >= 5
15824    else if (tcgetattr(tty, &tio) < 0)
15825		failed(30);
15826    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15827		failed(31);
15828#endif
15829#endif /* CONFTEST */
15830    (void) tty;
15831	${cf_cv_main_return:-return}(code);
15832
15833  ;
15834  return 0;
15835}
15836_ACEOF
15837rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15838if { (eval echo "$as_me:15838: \"$ac_link\"") >&5
15839  (eval $ac_link) 2>&5
15840  ac_status=$?
15841  echo "$as_me:15841: \$? = $ac_status" >&5
15842  (exit "$ac_status"); } &&
15843         { ac_try='test -s "conftest$ac_exeext"'
15844  { (eval echo "$as_me:15844: \"$ac_try\"") >&5
15845  (eval $ac_try) 2>&5
15846  ac_status=$?
15847  echo "$as_me:15847: \$? = $ac_status" >&5
15848  (exit "$ac_status"); }; }; then
15849
15850	if test "$cross_compiling" = yes; then
15851  ac_cv_func_grantpt=maybe
15852else
15853  cat >"conftest.$ac_ext" <<_ACEOF
15854#line 15854 "configure"
15855#include "confdefs.h"
15856
15857#include <stdlib.h>
15858#include <stdio.h>
15859#include <termios.h>
15860#include <unistd.h>
15861#include <signal.h>
15862#include <fcntl.h>
15863#include <errno.h>
15864
15865#ifndef HAVE_POSIX_OPENPT
15866#undef posix_openpt
15867#define posix_openpt(mode) open("/dev/ptmx", mode)
15868#endif
15869
15870#ifdef HAVE_STROPTS_H
15871#include <stropts.h>
15872#endif
15873
15874static void failed(int code)
15875{
15876	perror("conftest");
15877	exit(code);
15878}
15879
15880static void my_timeout(int sig)
15881{
15882	(void)sig;
15883	exit(99);
15884}
15885
15886int main(void)
15887{
15888
15889	int code = 0;
15890	int pty;
15891	int tty;
15892	char *slave;
15893	struct termios tio;
15894
15895	(void)tio;
15896	signal(SIGALRM, my_timeout);
15897
15898	if (alarm(2) == 9)
15899		failed(9);
15900	else if ((pty = posix_openpt(O_RDWR)) < 0)
15901		failed(1);
15902	else if (grantpt(pty) < 0)
15903		failed(2);
15904	else if (unlockpt(pty) < 0)
15905		failed(3);
15906	else if ((slave = ptsname(pty)) == 0)
15907		failed(4);
15908#if (CONFTEST == 3) || defined(CONFTEST_isatty)
15909	else if (!isatty(pty))
15910		failed(4);
15911#endif
15912#if CONFTEST >= 4
15913    else if (tcgetattr(pty, &tio) < 0)
15914		failed(20);
15915    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
15916		failed(21);
15917#endif
15918	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
15919	 * Linux does treat it that way.
15920	 */
15921	else if ((tty = open(slave, O_RDWR)) < 0)
15922		failed(5);
15923#ifdef CONFTEST
15924#ifdef I_PUSH
15925#if (CONFTEST == 0) || defined(CONFTEST_ptem)
15926    else if (ioctl(tty, I_PUSH, "ptem") < 0)
15927		failed(10);
15928#endif
15929#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
15930    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
15931		failed(11);
15932#endif
15933#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
15934    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
15935		failed(12);
15936#endif
15937#endif /* I_PUSH */
15938#if CONFTEST >= 5
15939    else if (tcgetattr(tty, &tio) < 0)
15940		failed(30);
15941    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
15942		failed(31);
15943#endif
15944#endif /* CONFTEST */
15945    (void) tty;
15946	${cf_cv_main_return:-return}(code);
15947
15948}
15949
15950_ACEOF
15951rm -f "conftest$ac_exeext"
15952if { (eval echo "$as_me:15952: \"$ac_link\"") >&5
15953  (eval $ac_link) 2>&5
15954  ac_status=$?
15955  echo "$as_me:15955: \$? = $ac_status" >&5
15956  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
15957  { (eval echo "$as_me:15957: \"$ac_try\"") >&5
15958  (eval $ac_try) 2>&5
15959  ac_status=$?
15960  echo "$as_me:15960: \$? = $ac_status" >&5
15961  (exit "$ac_status"); }; }; then
15962  :
15963else
15964  echo "$as_me: program exited with status $ac_status" >&5
15965echo "$as_me: failed program was:" >&5
15966cat "conftest.$ac_ext" >&5
15967ac_cv_func_grantpt=no
15968
15969fi
15970rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
15971fi
15972
15973else
15974  echo "$as_me: failed program was:" >&5
15975cat "conftest.$ac_ext" >&5
15976ac_cv_func_grantpt=no
15977fi
15978rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15979	echo "$as_me:15979: result: $ac_cv_func_grantpt" >&5
15980echo "${ECHO_T}$ac_cv_func_grantpt" >&6
15981
15982	if test "x$ac_cv_func_grantpt" != "xno" ; then
15983
15984		if test "x$ac_cv_func_grantpt" = "xyes" ; then
15985			echo "$as_me:15985: checking for pty features" >&5
15986echo $ECHO_N "checking for pty features... $ECHO_C" >&6
15987			if test "x$ac_cv_header_stropts_h" = xyes
15988			then
15989				cf_pty_this=0
15990			else
15991				cf_pty_this=3
15992			fi
15993
15994			cf_pty_defines=
15995			while test $cf_pty_this != 6
15996			do
15997
15998				cf_pty_feature=
15999				cf_pty_next="`expr $cf_pty_this + 1`"
16000
16001echo "${as_me:-configure}:16001: testing pty feature test $cf_pty_next:5 ..." 1>&5
16002
16003				if test "$cross_compiling" = yes; then
16004  { { echo "$as_me:16004: error: cannot run test program while cross compiling" >&5
16005echo "$as_me: error: cannot run test program while cross compiling" >&2;}
16006   { (exit 1); exit 1; }; }
16007else
16008  cat >"conftest.$ac_ext" <<_ACEOF
16009#line 16009 "configure"
16010#include "confdefs.h"
16011#define CONFTEST $cf_pty_this
16012$cf_pty_defines
16013
16014#include <stdlib.h>
16015#include <stdio.h>
16016#include <termios.h>
16017#include <unistd.h>
16018#include <signal.h>
16019#include <fcntl.h>
16020#include <errno.h>
16021
16022#ifndef HAVE_POSIX_OPENPT
16023#undef posix_openpt
16024#define posix_openpt(mode) open("/dev/ptmx", mode)
16025#endif
16026
16027#ifdef HAVE_STROPTS_H
16028#include <stropts.h>
16029#endif
16030
16031static void failed(int code)
16032{
16033	perror("conftest");
16034	exit(code);
16035}
16036
16037static void my_timeout(int sig)
16038{
16039	(void)sig;
16040	exit(99);
16041}
16042
16043int main(void)
16044{
16045
16046	int code = 0;
16047	int pty;
16048	int tty;
16049	char *slave;
16050	struct termios tio;
16051
16052	(void)tio;
16053	signal(SIGALRM, my_timeout);
16054
16055	if (alarm(2) == 9)
16056		failed(9);
16057	else if ((pty = posix_openpt(O_RDWR)) < 0)
16058		failed(1);
16059	else if (grantpt(pty) < 0)
16060		failed(2);
16061	else if (unlockpt(pty) < 0)
16062		failed(3);
16063	else if ((slave = ptsname(pty)) == 0)
16064		failed(4);
16065#if (CONFTEST == 3) || defined(CONFTEST_isatty)
16066	else if (!isatty(pty))
16067		failed(4);
16068#endif
16069#if CONFTEST >= 4
16070    else if (tcgetattr(pty, &tio) < 0)
16071		failed(20);
16072    else if (tcsetattr(pty, TCSAFLUSH, &tio) < 0)
16073		failed(21);
16074#endif
16075	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
16076	 * Linux does treat it that way.
16077	 */
16078	else if ((tty = open(slave, O_RDWR)) < 0)
16079		failed(5);
16080#ifdef CONFTEST
16081#ifdef I_PUSH
16082#if (CONFTEST == 0) || defined(CONFTEST_ptem)
16083    else if (ioctl(tty, I_PUSH, "ptem") < 0)
16084		failed(10);
16085#endif
16086#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
16087    else if (ioctl(tty, I_PUSH, "ldterm") < 0)
16088		failed(11);
16089#endif
16090#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
16091    else if (ioctl(tty, I_PUSH, "ttcompat") < 0)
16092		failed(12);
16093#endif
16094#endif /* I_PUSH */
16095#if CONFTEST >= 5
16096    else if (tcgetattr(tty, &tio) < 0)
16097		failed(30);
16098    else if (tcsetattr(tty, TCSAFLUSH, &tio) < 0)
16099		failed(31);
16100#endif
16101#endif /* CONFTEST */
16102    (void) tty;
16103	${cf_cv_main_return:-return}(code);
16104
16105}
16106
16107_ACEOF
16108rm -f "conftest$ac_exeext"
16109if { (eval echo "$as_me:16109: \"$ac_link\"") >&5
16110  (eval $ac_link) 2>&5
16111  ac_status=$?
16112  echo "$as_me:16112: \$? = $ac_status" >&5
16113  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
16114  { (eval echo "$as_me:16114: \"$ac_try\"") >&5
16115  (eval $ac_try) 2>&5
16116  ac_status=$?
16117  echo "$as_me:16117: \$? = $ac_status" >&5
16118  (exit "$ac_status"); }; }; then
16119
16120				case $cf_pty_next in
16121				(1) # - streams
16122					cf_pty_feature=ptem
16123					;;
16124				(2) # - streams
16125					cf_pty_feature=ldterm
16126					;;
16127				(3) # - streams
16128					cf_pty_feature=ttcompat
16129					;;
16130				(4)
16131					cf_pty_feature=pty_isatty
16132					;;
16133				(5)
16134					cf_pty_feature=pty_tcsetattr
16135					;;
16136				(6)
16137					cf_pty_feature=tty_tcsetattr
16138					;;
16139				esac
16140
16141else
16142  echo "$as_me: program exited with status $ac_status" >&5
16143echo "$as_me: failed program was:" >&5
16144cat "conftest.$ac_ext" >&5
16145
16146				case $cf_pty_next in
16147				(1|2|3)
16148
16149echo "${as_me:-configure}:16149: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
16150
16151					cf_pty_next=3
16152					;;
16153				esac
16154
16155fi
16156rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
16157fi
16158				if test -n "$cf_pty_feature"
16159				then
16160					cf_pty_defines="$cf_pty_defines
16161#define CONFTEST_$cf_pty_feature 1
16162"
16163					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
16164				fi
16165
16166				cf_pty_this=$cf_pty_next
16167			done
16168			echo "$as_me:16168: result: $cf_grantpt_opts" >&5
16169echo "${ECHO_T}$cf_grantpt_opts" >&6
16170			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
16171		fi
16172	fi
16173fi
16174
16175if test "x$cf_prefer_posix_openpt" = "xyes" && test "x$ac_cv_func_posix_openpt" = "xyes" ; then
16176	test -n "$verbose" && echo "	prefer posix_openpt over openpty" 1>&6
16177
16178echo "${as_me:-configure}:16178: testing prefer posix_openpt over openpty ..." 1>&5
16179
16180elif test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
16181	echo "$as_me:16181: checking for openpty in -lutil" >&5
16182echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
16183if test "${ac_cv_lib_util_openpty+set}" = set; then
16184  echo $ECHO_N "(cached) $ECHO_C" >&6
16185else
16186  ac_check_lib_save_LIBS=$LIBS
16187LIBS="-lutil  $LIBS"
16188cat >"conftest.$ac_ext" <<_ACEOF
16189#line 16189 "configure"
16190#include "confdefs.h"
16191
16192/* Override any gcc2 internal prototype to avoid an error.  */
16193#ifdef __cplusplus
16194extern "C"
16195#endif
16196/* We use char because int might match the return type of a gcc2
16197   builtin and then its argument prototype would still apply.  */
16198char openpty ();
16199int
16200main (void)
16201{
16202openpty ();
16203  ;
16204  return 0;
16205}
16206_ACEOF
16207rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16208if { (eval echo "$as_me:16208: \"$ac_link\"") >&5
16209  (eval $ac_link) 2>&5
16210  ac_status=$?
16211  echo "$as_me:16211: \$? = $ac_status" >&5
16212  (exit "$ac_status"); } &&
16213         { ac_try='test -s "conftest$ac_exeext"'
16214  { (eval echo "$as_me:16214: \"$ac_try\"") >&5
16215  (eval $ac_try) 2>&5
16216  ac_status=$?
16217  echo "$as_me:16217: \$? = $ac_status" >&5
16218  (exit "$ac_status"); }; }; then
16219  ac_cv_lib_util_openpty=yes
16220else
16221  echo "$as_me: failed program was:" >&5
16222cat "conftest.$ac_ext" >&5
16223ac_cv_lib_util_openpty=no
16224fi
16225rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16226LIBS=$ac_check_lib_save_LIBS
16227fi
16228echo "$as_me:16228: result: $ac_cv_lib_util_openpty" >&5
16229echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
16230if test "$ac_cv_lib_util_openpty" = yes; then
16231  cf_have_openpty=yes
16232else
16233  cf_have_openpty=no
16234fi
16235
16236	if test "$cf_have_openpty" = yes ; then
16237		ac_cv_func_grantpt=no
16238		LIBS="-lutil $LIBS"
16239
16240cat >>confdefs.h <<\EOF
16241#define HAVE_OPENPTY 1
16242EOF
16243
16244for ac_header in \
16245			util.h \
16246			libutil.h \
16247			pty.h \
16248
16249do
16250as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16251echo "$as_me:16251: checking for $ac_header" >&5
16252echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16253if eval "test \"\${$as_ac_Header+set}\" = set"; then
16254  echo $ECHO_N "(cached) $ECHO_C" >&6
16255else
16256  cat >"conftest.$ac_ext" <<_ACEOF
16257#line 16257 "configure"
16258#include "confdefs.h"
16259#include <$ac_header>
16260_ACEOF
16261if { (eval echo "$as_me:16261: \"$ac_cpp "conftest.$ac_ext"\"") >&5
16262  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
16263  ac_status=$?
16264  $EGREP -v '^ *\+' conftest.er1 >conftest.err
16265  rm -f conftest.er1
16266  cat conftest.err >&5
16267  echo "$as_me:16267: \$? = $ac_status" >&5
16268  (exit "$ac_status"); } >/dev/null; then
16269  if test -s conftest.err; then
16270    ac_cpp_err=$ac_c_preproc_warn_flag
16271  else
16272    ac_cpp_err=
16273  fi
16274else
16275  ac_cpp_err=yes
16276fi
16277if test -z "$ac_cpp_err"; then
16278  eval "$as_ac_Header=yes"
16279else
16280  echo "$as_me: failed program was:" >&5
16281  cat "conftest.$ac_ext" >&5
16282  eval "$as_ac_Header=no"
16283fi
16284rm -f conftest.err "conftest.$ac_ext"
16285fi
16286echo "$as_me:16286: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
16287echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
16288if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
16289  cat >>confdefs.h <<EOF
16290#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16291EOF
16292
16293fi
16294done
16295
16296	fi
16297fi
16298
16299if test "x$ac_cv_func_grantpt" != xno
16300then
16301	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
16302
16303echo "${as_me:-configure}:16303: testing will rely upon grantpt ..." 1>&5
16304
16305cat >>confdefs.h <<\EOF
16306#define HAVE_WORKING_GRANTPT 1
16307EOF
16308
16309	for cf_feature in $cf_grantpt_opts
16310	do
16311		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
16312
16313cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16314
16315		cat >>confdefs.h <<EOF
16316#define HAVE_GRANTPT_$cf_FEATURE 1
16317EOF
16318
16319	done
16320elif test "x$cf_have_openpty" = xno
16321then
16322	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
16323
16324echo "${as_me:-configure}:16324: testing will rely upon BSD-pseudoterminals ..." 1>&5
16325
16326else
16327	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
16328
16329echo "${as_me:-configure}:16329: testing will rely upon openpty ..." 1>&5
16330
16331fi
16332
16333echo "$as_me:16333: checking if we can use XkbQueryExtension" >&5
16334echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
16335if test "${cf_cv_xkb_query_extension+set}" = set; then
16336  echo $ECHO_N "(cached) $ECHO_C" >&6
16337else
16338
16339cat >"conftest.$ac_ext" <<_ACEOF
16340#line 16340 "configure"
16341#include "confdefs.h"
16342
16343#include <X11/Xlib.h>
16344#include <X11/extensions/XKB.h>
16345#include <X11/XKBlib.h>
16346
16347int
16348main (void)
16349{
16350
16351	int xkbmajor = XkbMajorVersion;
16352	int xkbminor = XkbMinorVersion;
16353	int xkbopcode, xkbevent, xkberror;
16354
16355	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
16356	    && XkbQueryExtension((Display *)0,
16357				 &xkbopcode,
16358				 &xkbevent,
16359				 &xkberror,
16360				 &xkbmajor,
16361				 &xkbminor))
16362		 return 0;
16363
16364  ;
16365  return 0;
16366}
16367_ACEOF
16368rm -f "conftest.$ac_objext"
16369if { (eval echo "$as_me:16369: \"$ac_compile\"") >&5
16370  (eval $ac_compile) 2>&5
16371  ac_status=$?
16372  echo "$as_me:16372: \$? = $ac_status" >&5
16373  (exit "$ac_status"); } &&
16374         { ac_try='test -s "conftest.$ac_objext"'
16375  { (eval echo "$as_me:16375: \"$ac_try\"") >&5
16376  (eval $ac_try) 2>&5
16377  ac_status=$?
16378  echo "$as_me:16378: \$? = $ac_status" >&5
16379  (exit "$ac_status"); }; }; then
16380
16381cf_cv_xkb_query_extension=yes
16382
16383else
16384  echo "$as_me: failed program was:" >&5
16385cat "conftest.$ac_ext" >&5
16386
16387cf_cv_xkb_query_extension=no
16388
16389fi
16390rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16391
16392fi
16393echo "$as_me:16393: result: $cf_cv_xkb_query_extension" >&5
16394echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
16395
16396if test $cf_cv_xkb_query_extension = yes
16397then
16398
16399for ac_func in XkbQueryExtension
16400do
16401as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16402echo "$as_me:16402: checking for $ac_func" >&5
16403echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16404if eval "test \"\${$as_ac_var+set}\" = set"; then
16405  echo $ECHO_N "(cached) $ECHO_C" >&6
16406else
16407  cat >"conftest.$ac_ext" <<_ACEOF
16408#line 16408 "configure"
16409#include "confdefs.h"
16410#define $ac_func autoconf_temporary
16411#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16412#undef $ac_func
16413
16414#ifdef __cplusplus
16415extern "C"
16416#endif
16417
16418/* We use char because int might match the return type of a gcc2
16419   builtin and then its argument prototype would still apply.  */
16420char $ac_func (void);
16421
16422int
16423main (void)
16424{
16425
16426/* The GNU C library defines stubs for functions which it implements
16427    to always fail with ENOSYS.  Some functions are actually named
16428    something starting with __ and the normal name is an alias.  */
16429#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16430#error found stub for $ac_func
16431#endif
16432
16433	return $ac_func ();
16434  ;
16435  return 0;
16436}
16437_ACEOF
16438rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16439if { (eval echo "$as_me:16439: \"$ac_link\"") >&5
16440  (eval $ac_link) 2>&5
16441  ac_status=$?
16442  echo "$as_me:16442: \$? = $ac_status" >&5
16443  (exit "$ac_status"); } &&
16444         { ac_try='test -s "conftest$ac_exeext"'
16445  { (eval echo "$as_me:16445: \"$ac_try\"") >&5
16446  (eval $ac_try) 2>&5
16447  ac_status=$?
16448  echo "$as_me:16448: \$? = $ac_status" >&5
16449  (exit "$ac_status"); }; }; then
16450  eval "$as_ac_var=yes"
16451else
16452  echo "$as_me: failed program was:" >&5
16453cat "conftest.$ac_ext" >&5
16454eval "$as_ac_var=no"
16455fi
16456rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16457fi
16458echo "$as_me:16458: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16459echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16460if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16461  cat >>confdefs.h <<EOF
16462#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16463EOF
16464
16465fi
16466done
16467
16468fi
16469
16470echo "$as_me:16470: checking if we can use XkbKeycodeToKeysym" >&5
16471echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
16472if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
16473  echo $ECHO_N "(cached) $ECHO_C" >&6
16474else
16475
16476cat >"conftest.$ac_ext" <<_ACEOF
16477#line 16477 "configure"
16478#include "confdefs.h"
16479
16480#include <X11/Xlib.h>
16481#include <X11/XKBlib.h>
16482
16483int
16484main (void)
16485{
16486
16487    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
16488	(void)keysym;
16489
16490  ;
16491  return 0;
16492}
16493_ACEOF
16494rm -f "conftest.$ac_objext"
16495if { (eval echo "$as_me:16495: \"$ac_compile\"") >&5
16496  (eval $ac_compile) 2>&5
16497  ac_status=$?
16498  echo "$as_me:16498: \$? = $ac_status" >&5
16499  (exit "$ac_status"); } &&
16500         { ac_try='test -s "conftest.$ac_objext"'
16501  { (eval echo "$as_me:16501: \"$ac_try\"") >&5
16502  (eval $ac_try) 2>&5
16503  ac_status=$?
16504  echo "$as_me:16504: \$? = $ac_status" >&5
16505  (exit "$ac_status"); }; }; then
16506
16507cf_cv_xkb_keycode_to_keysym=yes
16508
16509else
16510  echo "$as_me: failed program was:" >&5
16511cat "conftest.$ac_ext" >&5
16512
16513cf_cv_xkb_keycode_to_keysym=no
16514
16515fi
16516rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16517
16518fi
16519echo "$as_me:16519: result: $cf_cv_xkb_keycode_to_keysym" >&5
16520echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
16521
16522if test $cf_cv_xkb_keycode_to_keysym = yes
16523then
16524
16525for ac_func in XkbKeycodeToKeysym
16526do
16527as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16528echo "$as_me:16528: checking for $ac_func" >&5
16529echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16530if eval "test \"\${$as_ac_var+set}\" = set"; then
16531  echo $ECHO_N "(cached) $ECHO_C" >&6
16532else
16533  cat >"conftest.$ac_ext" <<_ACEOF
16534#line 16534 "configure"
16535#include "confdefs.h"
16536#define $ac_func autoconf_temporary
16537#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16538#undef $ac_func
16539
16540#ifdef __cplusplus
16541extern "C"
16542#endif
16543
16544/* We use char because int might match the return type of a gcc2
16545   builtin and then its argument prototype would still apply.  */
16546char $ac_func (void);
16547
16548int
16549main (void)
16550{
16551
16552/* The GNU C library defines stubs for functions which it implements
16553    to always fail with ENOSYS.  Some functions are actually named
16554    something starting with __ and the normal name is an alias.  */
16555#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16556#error found stub for $ac_func
16557#endif
16558
16559	return $ac_func ();
16560  ;
16561  return 0;
16562}
16563_ACEOF
16564rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16565if { (eval echo "$as_me:16565: \"$ac_link\"") >&5
16566  (eval $ac_link) 2>&5
16567  ac_status=$?
16568  echo "$as_me:16568: \$? = $ac_status" >&5
16569  (exit "$ac_status"); } &&
16570         { ac_try='test -s "conftest$ac_exeext"'
16571  { (eval echo "$as_me:16571: \"$ac_try\"") >&5
16572  (eval $ac_try) 2>&5
16573  ac_status=$?
16574  echo "$as_me:16574: \$? = $ac_status" >&5
16575  (exit "$ac_status"); }; }; then
16576  eval "$as_ac_var=yes"
16577else
16578  echo "$as_me: failed program was:" >&5
16579cat "conftest.$ac_ext" >&5
16580eval "$as_ac_var=no"
16581fi
16582rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16583fi
16584echo "$as_me:16584: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16585echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16586if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16587  cat >>confdefs.h <<EOF
16588#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16589EOF
16590
16591fi
16592done
16593
16594fi
16595
16596cf_save_LIBS_CF_XKB_BELL_EXT="$LIBS"
16597cf_save_CFLAGS_CF_XKB_BELL_EXT="$CFLAGS"
16598cf_save_CPPFLAGS_CF_XKB_BELL_EXT="$CPPFLAGS"
16599LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
16600for cf_X_CFLAGS in $X_CFLAGS
16601do
16602	case "x$cf_X_CFLAGS" in
16603	x-[IUD]*)
16604		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
16605		;;
16606	*)
16607		CFLAGS="$CFLAGS $cf_X_CFLAGS"
16608		;;
16609	esac
16610done
16611
16612echo "$as_me:16612: checking for XKB Bell extension" >&5
16613echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
16614if test "${cf_cv_xkb_bell_ext+set}" = set; then
16615  echo $ECHO_N "(cached) $ECHO_C" >&6
16616else
16617
16618cat >"conftest.$ac_ext" <<_ACEOF
16619#line 16619 "configure"
16620#include "confdefs.h"
16621
16622#include <X11/Intrinsic.h>
16623#include <X11/XKBlib.h>		/* has the prototype */
16624#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
16625
16626int
16627main (void)
16628{
16629
16630	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
16631	Atom y = 0;
16632	(void)x;
16633	XkbBell((Display *)0, (Widget)0, 0, y);
16634
16635  ;
16636  return 0;
16637}
16638_ACEOF
16639rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16640if { (eval echo "$as_me:16640: \"$ac_link\"") >&5
16641  (eval $ac_link) 2>&5
16642  ac_status=$?
16643  echo "$as_me:16643: \$? = $ac_status" >&5
16644  (exit "$ac_status"); } &&
16645         { ac_try='test -s "conftest$ac_exeext"'
16646  { (eval echo "$as_me:16646: \"$ac_try\"") >&5
16647  (eval $ac_try) 2>&5
16648  ac_status=$?
16649  echo "$as_me:16649: \$? = $ac_status" >&5
16650  (exit "$ac_status"); }; }; then
16651  cf_cv_xkb_bell_ext=yes
16652else
16653  echo "$as_me: failed program was:" >&5
16654cat "conftest.$ac_ext" >&5
16655cf_cv_xkb_bell_ext=no
16656fi
16657rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16658
16659fi
16660echo "$as_me:16660: result: $cf_cv_xkb_bell_ext" >&5
16661echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
16662test "$cf_cv_xkb_bell_ext" = yes &&
16663cat >>confdefs.h <<\EOF
16664#define HAVE_XKB_BELL_EXT 1
16665EOF
16666
16667LIBS="$cf_save_LIBS_CF_XKB_BELL_EXT"
16668CFLAGS="$cf_save_CFLAGS_CF_XKB_BELL_EXT"
16669CPPFLAGS="$cf_save_CPPFLAGS_CF_XKB_BELL_EXT"
16670
16671for ac_func in Xutf8LookupString
16672do
16673as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16674echo "$as_me:16674: checking for $ac_func" >&5
16675echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16676if eval "test \"\${$as_ac_var+set}\" = set"; then
16677  echo $ECHO_N "(cached) $ECHO_C" >&6
16678else
16679  cat >"conftest.$ac_ext" <<_ACEOF
16680#line 16680 "configure"
16681#include "confdefs.h"
16682#define $ac_func autoconf_temporary
16683#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16684#undef $ac_func
16685
16686#ifdef __cplusplus
16687extern "C"
16688#endif
16689
16690/* We use char because int might match the return type of a gcc2
16691   builtin and then its argument prototype would still apply.  */
16692char $ac_func (void);
16693
16694int
16695main (void)
16696{
16697
16698/* The GNU C library defines stubs for functions which it implements
16699    to always fail with ENOSYS.  Some functions are actually named
16700    something starting with __ and the normal name is an alias.  */
16701#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16702#error found stub for $ac_func
16703#endif
16704
16705	return $ac_func ();
16706  ;
16707  return 0;
16708}
16709_ACEOF
16710rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16711if { (eval echo "$as_me:16711: \"$ac_link\"") >&5
16712  (eval $ac_link) 2>&5
16713  ac_status=$?
16714  echo "$as_me:16714: \$? = $ac_status" >&5
16715  (exit "$ac_status"); } &&
16716         { ac_try='test -s "conftest$ac_exeext"'
16717  { (eval echo "$as_me:16717: \"$ac_try\"") >&5
16718  (eval $ac_try) 2>&5
16719  ac_status=$?
16720  echo "$as_me:16720: \$? = $ac_status" >&5
16721  (exit "$ac_status"); }; }; then
16722  eval "$as_ac_var=yes"
16723else
16724  echo "$as_me: failed program was:" >&5
16725cat "conftest.$ac_ext" >&5
16726eval "$as_ac_var=no"
16727fi
16728rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16729fi
16730echo "$as_me:16730: result: `eval echo '${'"$as_ac_var"'}'`" >&5
16731echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
16732if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
16733  cat >>confdefs.h <<EOF
16734#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16735EOF
16736
16737else
16738
16739	EXTRAHDRS="$EXTRAHDRS xutf8.h"
16740	EXTRASRCS="$EXTRASRCS xutf8.c"
16741	EXTRAOBJS="$EXTRAOBJS xutf8.o"
16742
16743fi
16744done
16745
16746echo "$as_me:16746: checking if you want narrow prototypes for X libraries" >&5
16747echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
16748
16749case `$ac_config_guess` in
16750(*freebsd*|*gnu*|*irix5*|*irix6*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
16751	cf_default_narrowproto=yes
16752	;;
16753(*)
16754	cf_default_narrowproto=no
16755	;;
16756esac
16757
16758# Check whether --enable-narrowproto or --disable-narrowproto was given.
16759if test "${enable_narrowproto+set}" = set; then
16760  enableval="$enable_narrowproto"
16761  test "$enableval" != no && enableval=yes
16762	if test "$enableval" != "$cf_default_narrowproto" ; then
16763    enable_narrowproto=$enableval
16764	else
16765		enable_narrowproto=$cf_default_narrowproto
16766	fi
16767else
16768  enableval=$cf_default_narrowproto
16769	enable_narrowproto=$cf_default_narrowproto
16770
16771fi;
16772echo "$as_me:16772: result: $enable_narrowproto" >&5
16773echo "${ECHO_T}$enable_narrowproto" >&6
16774
16775echo "$as_me:16775: checking if we should use imake to help" >&5
16776echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
16777
16778# Check whether --enable-imake or --disable-imake was given.
16779if test "${enable_imake+set}" = set; then
16780  enableval="$enable_imake"
16781  test "$enableval" != no && enableval=yes
16782	if test "$enableval" != "yes" ; then
16783    enable_imake=no
16784	else
16785		enable_imake=yes
16786	fi
16787else
16788  enableval=yes
16789	enable_imake=yes
16790
16791fi;
16792echo "$as_me:16792: result: $enable_imake" >&5
16793echo "${ECHO_T}$enable_imake" >&6
16794
16795if test "$enable_imake" = yes ; then
16796
16797for ac_prog in xmkmf imake
16798do
16799  # Extract the first word of "$ac_prog", so it can be a program name with args.
16800set dummy $ac_prog; ac_word=$2
16801echo "$as_me:16801: checking for $ac_word" >&5
16802echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16803if test "${ac_cv_path_IMAKE+set}" = set; then
16804  echo $ECHO_N "(cached) $ECHO_C" >&6
16805else
16806  case $IMAKE in
16807  [\\/]* | ?:[\\/]*)
16808  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
16809  ;;
16810  *)
16811  ac_save_IFS=$IFS; IFS=$ac_path_separator
16812ac_dummy="$PATH"
16813for ac_dir in $ac_dummy; do
16814  IFS=$ac_save_IFS
16815  test -z "$ac_dir" && ac_dir=.
16816  if $as_executable_p "$ac_dir/$ac_word"; then
16817   ac_cv_path_IMAKE="$ac_dir/$ac_word"
16818   echo "$as_me:16818: found $ac_dir/$ac_word" >&5
16819   break
16820fi
16821done
16822
16823  ;;
16824esac
16825fi
16826IMAKE=$ac_cv_path_IMAKE
16827
16828if test -n "$IMAKE"; then
16829  echo "$as_me:16829: result: $IMAKE" >&5
16830echo "${ECHO_T}$IMAKE" >&6
16831else
16832  echo "$as_me:16832: result: no" >&5
16833echo "${ECHO_T}no" >&6
16834fi
16835
16836  test -n "$IMAKE" && break
16837done
16838
16839if test -n "$IMAKE" ; then
16840
16841case $IMAKE in
16842(*/imake)
16843	cf_imake_opts="-DUseInstalled=YES"
16844	;;
16845(*/util/xmkmf)
16846	# A single parameter tells xmkmf where the config-files are:
16847	cf_imake_opts="`echo "$IMAKE"|sed -e s,/config/util/xmkmf,,`"
16848	;;
16849(*)
16850	cf_imake_opts=
16851	;;
16852esac
16853
16854# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
16855# config directory.
16856if mkdir conftestdir; then
16857	CDPATH=; export CDPATH
16858	cf_makefile=`cd "$srcdir" || exit;pwd`/Imakefile
16859	cd conftestdir
16860
16861	cat >fix_cflags.sed <<'CF_EOF'
16862s/\\//g
16863s/[ 	][ 	]*/ /g
16864s/"//g
16865:pack
16866s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
16867t pack
16868s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
16869s/^IMAKE[ ]/IMAKE_CFLAGS="/
16870s/	/ /g
16871s/$/"/
16872CF_EOF
16873
16874	cat >fix_lflags.sed <<'CF_EOF'
16875s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
16876s/$/"/
16877CF_EOF
16878
16879	echo >./Imakefile
16880	test -f "$cf_makefile" && cat "$cf_makefile" >>./Imakefile
16881
16882	cat >> ./Imakefile <<'CF_EOF'
16883findstddefs:
16884	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
16885	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
16886CF_EOF
16887
16888	if ( $IMAKE "$cf_imake_opts" 1>/dev/null 2>&5 && test -f Makefile)
16889	then
16890		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
16891
16892echo "${as_me:-configure}:16892: testing Using $IMAKE $cf_imake_opts ..." 1>&5
16893
16894	else
16895		# sometimes imake doesn't have the config path compiled in.  Find it.
16896		cf_config=
16897		for cf_libpath in $X_LIBS $LIBS ; do
16898			case "$cf_libpath" in
16899			(-L*)
16900				cf_libpath=`echo ".$cf_libpath" | sed -e 's/^...//'`
16901				cf_libpath="$cf_libpath/X11/config"
16902				if test -d "$cf_libpath" ; then
16903					cf_config="$cf_libpath"
16904					break
16905				fi
16906				;;
16907			esac
16908		done
16909		if test -z "$cf_config" ; then
16910			{ echo "$as_me:16910: WARNING: Could not find imake config-directory" >&5
16911echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
16912		else
16913			cf_imake_opts="$cf_imake_opts -I$cf_config"
16914			if ( "$IMAKE" -v "$cf_imake_opts" 2>&5)
16915			then
16916				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
16917
16918echo "${as_me:-configure}:16918: testing Using $IMAKE $cf_config ..." 1>&5
16919
16920			else
16921				{ echo "$as_me:16921: WARNING: Cannot run $IMAKE" >&5
16922echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
16923			fi
16924		fi
16925	fi
16926
16927	# GNU make sometimes prints "make[1]: Entering...", which
16928	# would confuse us.
16929	eval "`make findstddefs 2>/dev/null | grep -v make`"
16930
16931	cd ..
16932	rm -rf conftestdir
16933
16934	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
16935	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
16936	# modified it to support site.cf, adding a kludge for the /usr/include
16937	# directory.  Try to filter that out, otherwise gcc won't find its
16938	# headers.
16939	if test -n "$GCC" ; then
16940	    if test -n "$IMAKE_CFLAGS" ; then
16941		cf_nostdinc=""
16942		cf_std_incl=""
16943		cf_cpp_opts=""
16944		for cf_opt in $IMAKE_CFLAGS
16945		do
16946		    case "$cf_opt" in
16947		    (-nostdinc)
16948			cf_nostdinc="$cf_opt"
16949			;;
16950		    (-I/usr/include)
16951			cf_std_incl="$cf_opt"
16952			;;
16953		    (*)
16954			cf_cpp_opts="$cf_cpp_opts $cf_opt"
16955			;;
16956		    esac
16957		done
16958		if test -z "$cf_nostdinc" ; then
16959		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
16960		elif test -z "$cf_std_incl" ; then
16961		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
16962		else
16963		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
16964
16965echo "${as_me:-configure}:16965: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
16966
16967		    IMAKE_CFLAGS="$cf_cpp_opts"
16968		fi
16969	    fi
16970	fi
16971fi
16972
16973# Some imake configurations define PROJECTROOT with an empty value.  Remove
16974# the empty definition.
16975case $IMAKE_CFLAGS in
16976(*-DPROJECTROOT=/*)
16977	;;
16978(*)
16979	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
16980	;;
16981esac
16982
16983fi
16984
16985test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
16986
16987echo "${as_me:-configure}:16987: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
16988
16989test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
16990
16991echo "${as_me:-configure}:16991: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
16992
16993fi
16994
16995if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
16996
16997cf_fix_cppflags=no
16998cf_new_cflags=
16999cf_new_cppflags=
17000cf_new_extra_cppflags=
17001
17002for cf_add_cflags in $IMAKE_CFLAGS
17003do
17004case "$cf_fix_cppflags" in
17005(no)
17006	case "$cf_add_cflags" in
17007	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17008		case "$cf_add_cflags" in
17009		(-D*)
17010			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17011
17012			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17013				&& test -z "${cf_tst_cflags}" \
17014				&& cf_fix_cppflags=yes
17015
17016			if test "$cf_fix_cppflags" = yes ; then
17017
17018	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17019	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17020
17021				continue
17022			elif test "${cf_tst_cflags}" = "\"'" ; then
17023
17024	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17025	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17026
17027				continue
17028			fi
17029			;;
17030		esac
17031		case "$CPPFLAGS" in
17032		(*$cf_add_cflags)
17033			;;
17034		(*)
17035			case "$cf_add_cflags" in
17036			(-D*)
17037				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17038
17039CPPFLAGS=`echo "$CPPFLAGS" | \
17040	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17041		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17042
17043				;;
17044			esac
17045
17046	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17047	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17048
17049			;;
17050		esac
17051		;;
17052	(*)
17053
17054	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17055	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17056
17057		;;
17058	esac
17059	;;
17060(yes)
17061
17062	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17063	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17064
17065	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17066
17067	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17068		&& test -z "${cf_tst_cflags}" \
17069		&& cf_fix_cppflags=no
17070	;;
17071esac
17072done
17073
17074if test -n "$cf_new_cflags" ; then
17075
17076	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17077	CFLAGS="${CFLAGS}$cf_new_cflags"
17078
17079fi
17080
17081if test -n "$cf_new_cppflags" ; then
17082
17083	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17084	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17085
17086fi
17087
17088if test -n "$cf_new_extra_cppflags" ; then
17089
17090	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17091	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17092
17093fi
17094
17095else
17096	IMAKE_CFLAGS=
17097	IMAKE_LOADFLAGS=
17098	test -n "$verbose" && echo "	make fallback definitions" 1>&6
17099
17100echo "${as_me:-configure}:17100: testing make fallback definitions ..." 1>&5
17101
17102	# We prefer config.guess' values when we can get them, to avoid
17103	# inconsistent results with uname (AIX for instance).  However,
17104	# config.guess is not always consistent either.
17105	case $host_os in
17106	(*[0-9].[0-9]*)
17107		UNAME_RELEASE="$host_os"
17108		;;
17109	(*)
17110		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
17111		;;
17112	esac
17113
17114	case .$UNAME_RELEASE in
17115	(*[0-9].[0-9]*)
17116		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
17117		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
17118		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
17119		test -z "$OSMINORVERSION" && OSMINORVERSION=0
17120		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
17121		;;
17122	esac
17123
17124	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
17125	# fallback/fragments for NeedPrototypes, etc.
17126	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
17127
17128	# If this is not set properly, Xaw's scrollbars will not work
17129	if test "$enable_narrowproto" = yes ; then
17130		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
17131	fi
17132
17133	# Other special definitions:
17134	case $host_os in
17135	(aix*)
17136		# imake on AIX 5.1 defines AIXV3.  really.
17137		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
17138		;;
17139	(irix[56].*)
17140		# these are needed to make SIGWINCH work in xterm
17141		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
17142		;;
17143	esac
17144
17145cf_fix_cppflags=no
17146cf_new_cflags=
17147cf_new_cppflags=
17148cf_new_extra_cppflags=
17149
17150for cf_add_cflags in $IMAKE_CFLAGS
17151do
17152case "$cf_fix_cppflags" in
17153(no)
17154	case "$cf_add_cflags" in
17155	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17156		case "$cf_add_cflags" in
17157		(-D*)
17158			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17159
17160			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17161				&& test -z "${cf_tst_cflags}" \
17162				&& cf_fix_cppflags=yes
17163
17164			if test "$cf_fix_cppflags" = yes ; then
17165
17166	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17167	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17168
17169				continue
17170			elif test "${cf_tst_cflags}" = "\"'" ; then
17171
17172	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17173	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17174
17175				continue
17176			fi
17177			;;
17178		esac
17179		case "$CPPFLAGS" in
17180		(*$cf_add_cflags)
17181			;;
17182		(*)
17183			case "$cf_add_cflags" in
17184			(-D*)
17185				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17186
17187CPPFLAGS=`echo "$CPPFLAGS" | \
17188	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17189		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17190
17191				;;
17192			esac
17193
17194	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17195	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17196
17197			;;
17198		esac
17199		;;
17200	(*)
17201
17202	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17203	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17204
17205		;;
17206	esac
17207	;;
17208(yes)
17209
17210	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17211	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17212
17213	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17214
17215	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17216		&& test -z "${cf_tst_cflags}" \
17217		&& cf_fix_cppflags=no
17218	;;
17219esac
17220done
17221
17222if test -n "$cf_new_cflags" ; then
17223
17224	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17225	CFLAGS="${CFLAGS}$cf_new_cflags"
17226
17227fi
17228
17229if test -n "$cf_new_cppflags" ; then
17230
17231	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17232	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17233
17234fi
17235
17236if test -n "$cf_new_extra_cppflags" ; then
17237
17238	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17239	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17240
17241fi
17242
17243fi
17244
17245# Extract the first word of "groff", so it can be a program name with args.
17246set dummy groff; ac_word=$2
17247echo "$as_me:17247: checking for $ac_word" >&5
17248echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17249if test "${ac_cv_path_GROFF_PATH+set}" = set; then
17250  echo $ECHO_N "(cached) $ECHO_C" >&6
17251else
17252  case $GROFF_PATH in
17253  [\\/]* | ?:[\\/]*)
17254  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
17255  ;;
17256  *)
17257  ac_save_IFS=$IFS; IFS=$ac_path_separator
17258ac_dummy="$PATH"
17259for ac_dir in $ac_dummy; do
17260  IFS=$ac_save_IFS
17261  test -z "$ac_dir" && ac_dir=.
17262  if $as_executable_p "$ac_dir/$ac_word"; then
17263   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
17264   echo "$as_me:17264: found $ac_dir/$ac_word" >&5
17265   break
17266fi
17267done
17268
17269  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
17270  ;;
17271esac
17272fi
17273GROFF_PATH=$ac_cv_path_GROFF_PATH
17274
17275if test -n "$GROFF_PATH"; then
17276  echo "$as_me:17276: result: $GROFF_PATH" >&5
17277echo "${ECHO_T}$GROFF_PATH" >&6
17278else
17279  echo "$as_me:17279: result: no" >&5
17280echo "${ECHO_T}no" >&6
17281fi
17282
17283for ac_prog in nroff mandoc
17284do
17285  # Extract the first word of "$ac_prog", so it can be a program name with args.
17286set dummy $ac_prog; ac_word=$2
17287echo "$as_me:17287: checking for $ac_word" >&5
17288echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17289if test "${ac_cv_path_NROFF_PATH+set}" = set; then
17290  echo $ECHO_N "(cached) $ECHO_C" >&6
17291else
17292  case $NROFF_PATH in
17293  [\\/]* | ?:[\\/]*)
17294  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
17295  ;;
17296  *)
17297  ac_save_IFS=$IFS; IFS=$ac_path_separator
17298ac_dummy="$PATH"
17299for ac_dir in $ac_dummy; do
17300  IFS=$ac_save_IFS
17301  test -z "$ac_dir" && ac_dir=.
17302  if $as_executable_p "$ac_dir/$ac_word"; then
17303   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
17304   echo "$as_me:17304: found $ac_dir/$ac_word" >&5
17305   break
17306fi
17307done
17308
17309  ;;
17310esac
17311fi
17312NROFF_PATH=$ac_cv_path_NROFF_PATH
17313
17314if test -n "$NROFF_PATH"; then
17315  echo "$as_me:17315: result: $NROFF_PATH" >&5
17316echo "${ECHO_T}$NROFF_PATH" >&6
17317else
17318  echo "$as_me:17318: result: no" >&5
17319echo "${ECHO_T}no" >&6
17320fi
17321
17322  test -n "$NROFF_PATH" && break
17323done
17324test -n "$NROFF_PATH" || NROFF_PATH="no"
17325
17326# Extract the first word of "tbl", so it can be a program name with args.
17327set dummy tbl; ac_word=$2
17328echo "$as_me:17328: checking for $ac_word" >&5
17329echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17330if test "${ac_cv_path_TBL_PATH+set}" = set; then
17331  echo $ECHO_N "(cached) $ECHO_C" >&6
17332else
17333  case $TBL_PATH in
17334  [\\/]* | ?:[\\/]*)
17335  ac_cv_path_TBL_PATH="$TBL_PATH" # Let the user override the test with a path.
17336  ;;
17337  *)
17338  ac_save_IFS=$IFS; IFS=$ac_path_separator
17339ac_dummy="$PATH"
17340for ac_dir in $ac_dummy; do
17341  IFS=$ac_save_IFS
17342  test -z "$ac_dir" && ac_dir=.
17343  if $as_executable_p "$ac_dir/$ac_word"; then
17344   ac_cv_path_TBL_PATH="$ac_dir/$ac_word"
17345   echo "$as_me:17345: found $ac_dir/$ac_word" >&5
17346   break
17347fi
17348done
17349
17350  test -z "$ac_cv_path_TBL_PATH" && ac_cv_path_TBL_PATH="cat"
17351  ;;
17352esac
17353fi
17354TBL_PATH=$ac_cv_path_TBL_PATH
17355
17356if test -n "$TBL_PATH"; then
17357  echo "$as_me:17357: result: $TBL_PATH" >&5
17358echo "${ECHO_T}$TBL_PATH" >&6
17359else
17360  echo "$as_me:17360: result: no" >&5
17361echo "${ECHO_T}no" >&6
17362fi
17363
17364if test "x$GROFF_PATH" = xno
17365then
17366	NROFF_NOTE=
17367	GROFF_NOTE="#"
17368else
17369	NROFF_NOTE="#"
17370	GROFF_NOTE=
17371fi
17372
17373echo "$as_me:17373: checking for fgrep" >&5
17374echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
17375if test "${ac_cv_path_FGREP+set}" = set; then
17376  echo $ECHO_N "(cached) $ECHO_C" >&6
17377else
17378  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
17379   then ac_cv_path_FGREP="$GREP -F"
17380   else
17381     for ac_prog in gfgrep fgrep
17382do
17383  # Extract the first word of "$ac_prog", so it can be a program name with args.
17384set dummy $ac_prog; ac_word=$2
17385echo "$as_me:17385: checking for $ac_word" >&5
17386echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17387if test "${ac_cv_path_FGREP+set}" = set; then
17388  echo $ECHO_N "(cached) $ECHO_C" >&6
17389else
17390  case $FGREP in
17391  [\\/]* | ?:[\\/]*)
17392  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
17393  ;;
17394  *)
17395  ac_save_IFS=$IFS; IFS=$ac_path_separator
17396ac_dummy="$PATH"
17397for ac_dir in $ac_dummy; do
17398  IFS=$ac_save_IFS
17399  test -z "$ac_dir" && ac_dir=.
17400  if $as_executable_p "$ac_dir/$ac_word"; then
17401   ac_cv_path_FGREP="$ac_dir/$ac_word"
17402   echo "$as_me:17402: found $ac_dir/$ac_word" >&5
17403   break
17404fi
17405done
17406
17407  ;;
17408esac
17409fi
17410FGREP=$ac_cv_path_FGREP
17411
17412if test -n "$FGREP"; then
17413  echo "$as_me:17413: result: $FGREP" >&5
17414echo "${ECHO_T}$FGREP" >&6
17415else
17416  echo "$as_me:17416: result: no" >&5
17417echo "${ECHO_T}no" >&6
17418fi
17419
17420  test -n "$FGREP" && break
17421done
17422test -n "$FGREP" || FGREP=": "
17423
17424     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:17424: error: cannot find workable fgrep" >&5
17425echo "$as_me: error: cannot find workable fgrep" >&2;}
17426   { (exit 1); exit 1; }; }
17427   fi
17428fi
17429echo "$as_me:17429: result: $ac_cv_path_FGREP" >&5
17430echo "${ECHO_T}$ac_cv_path_FGREP" >&6
17431 FGREP="$ac_cv_path_FGREP"
17432
17433case "x${with_man2html}" in
17434(xno)
17435	cf_man2html=no
17436	;;
17437(x|xyes)
17438	# Extract the first word of "man2html", so it can be a program name with args.
17439set dummy man2html; ac_word=$2
17440echo "$as_me:17440: checking for $ac_word" >&5
17441echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17442if test "${ac_cv_path_cf_man2html+set}" = set; then
17443  echo $ECHO_N "(cached) $ECHO_C" >&6
17444else
17445  case $cf_man2html in
17446  [\\/]* | ?:[\\/]*)
17447  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17448  ;;
17449  *)
17450  ac_save_IFS=$IFS; IFS=$ac_path_separator
17451ac_dummy="$PATH"
17452for ac_dir in $ac_dummy; do
17453  IFS=$ac_save_IFS
17454  test -z "$ac_dir" && ac_dir=.
17455  if $as_executable_p "$ac_dir/$ac_word"; then
17456   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17457   echo "$as_me:17457: found $ac_dir/$ac_word" >&5
17458   break
17459fi
17460done
17461
17462  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17463  ;;
17464esac
17465fi
17466cf_man2html=$ac_cv_path_cf_man2html
17467
17468if test -n "$cf_man2html"; then
17469  echo "$as_me:17469: result: $cf_man2html" >&5
17470echo "${ECHO_T}$cf_man2html" >&6
17471else
17472  echo "$as_me:17472: result: no" >&5
17473echo "${ECHO_T}no" >&6
17474fi
17475
17476	case "x$cf_man2html" in
17477	(x/*)
17478		echo "$as_me:17478: checking for the modified Earl Hood script" >&5
17479echo $ECHO_N "checking for the modified Earl Hood script... $ECHO_C" >&6
17480		if ( $cf_man2html -help 2>&1 | grep 'Make an index of headers at the end' >/dev/null )
17481		then
17482			cf_man2html_ok=yes
17483		else
17484			cf_man2html=no
17485			cf_man2html_ok=no
17486		fi
17487		echo "$as_me:17487: result: $cf_man2html_ok" >&5
17488echo "${ECHO_T}$cf_man2html_ok" >&6
17489		;;
17490	(*)
17491		cf_man2html=no
17492		;;
17493	esac
17494esac
17495
17496echo "$as_me:17496: checking for program to convert manpage to html" >&5
17497echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
17498
17499# Check whether --with-man2html or --without-man2html was given.
17500if test "${with_man2html+set}" = set; then
17501  withval="$with_man2html"
17502  cf_man2html=$withval
17503else
17504  cf_man2html=$cf_man2html
17505fi;
17506
17507cf_with_groff=no
17508
17509case $cf_man2html in
17510(yes)
17511	echo "$as_me:17511: result: man2html" >&5
17512echo "${ECHO_T}man2html" >&6
17513	# Extract the first word of "man2html", so it can be a program name with args.
17514set dummy man2html; ac_word=$2
17515echo "$as_me:17515: checking for $ac_word" >&5
17516echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17517if test "${ac_cv_path_cf_man2html+set}" = set; then
17518  echo $ECHO_N "(cached) $ECHO_C" >&6
17519else
17520  case $cf_man2html in
17521  [\\/]* | ?:[\\/]*)
17522  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
17523  ;;
17524  *)
17525  ac_save_IFS=$IFS; IFS=$ac_path_separator
17526ac_dummy="$PATH"
17527for ac_dir in $ac_dummy; do
17528  IFS=$ac_save_IFS
17529  test -z "$ac_dir" && ac_dir=.
17530  if $as_executable_p "$ac_dir/$ac_word"; then
17531   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
17532   echo "$as_me:17532: found $ac_dir/$ac_word" >&5
17533   break
17534fi
17535done
17536
17537  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
17538  ;;
17539esac
17540fi
17541cf_man2html=$ac_cv_path_cf_man2html
17542
17543if test -n "$cf_man2html"; then
17544  echo "$as_me:17544: result: $cf_man2html" >&5
17545echo "${ECHO_T}$cf_man2html" >&6
17546else
17547  echo "$as_me:17547: result: no" >&5
17548echo "${ECHO_T}no" >&6
17549fi
17550
17551	;;
17552(no|groff|*/groff*)
17553	cf_with_groff=yes
17554	cf_man2html=$GROFF_PATH
17555	echo "$as_me:17555: result: $cf_man2html" >&5
17556echo "${ECHO_T}$cf_man2html" >&6
17557	;;
17558(*)
17559	echo "$as_me:17559: result: $cf_man2html" >&5
17560echo "${ECHO_T}$cf_man2html" >&6
17561	;;
17562esac
17563
17564MAN2HTML_TEMP="man2html.tmp"
17565	cat >$MAN2HTML_TEMP <<CF_EOF
17566#!$SHELL
17567# Temporary script generated by CF_WITH_MAN2HTML
17568# Convert inputs to html, sending result to standard output.
17569#
17570# Parameters:
17571# \${1} = rootname of file to convert
17572# \${2} = suffix of file to convert, e.g., "1"
17573# \${3} = macros to use, e.g., "man"
17574#
17575ROOT=\$1
17576TYPE=\$2
17577MACS=\$3
17578
17579unset LANG
17580unset LC_ALL
17581unset LC_CTYPE
17582unset LANGUAGE
17583GROFF_NO_SGR=stupid
17584export GROFF_NO_SGR
17585
17586CF_EOF
17587
17588NROFF_OPTS=
17589if test "x$cf_with_groff" = xyes
17590then
17591	MAN2HTML_NOTE="$GROFF_NOTE"
17592	MAN2HTML_PATH="$GROFF_PATH"
17593	cat >>$MAN2HTML_TEMP <<CF_EOF
17594$SHELL -c "$TBL_PATH \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
17595CF_EOF
17596else
17597	# disable hyphenation if this is groff
17598	if test "x$GROFF_PATH" != xno
17599	then
17600		echo "$as_me:17600: checking if nroff is really groff" >&5
17601echo $ECHO_N "checking if nroff is really groff... $ECHO_C" >&6
17602		cf_check_groff="`$NROFF_PATH --version 2>/dev/null | grep groff`"
17603		test -n "$cf_check_groff" && cf_check_groff=yes
17604		test -n "$cf_check_groff" || cf_check_groff=no
17605		echo "$as_me:17605: result: $cf_check_groff" >&5
17606echo "${ECHO_T}$cf_check_groff" >&6
17607		test "x$cf_check_groff" = xyes && NROFF_OPTS="-rHY=0"
17608	fi
17609	MAN2HTML_NOTE=""
17610
17611if test "x$prefix" != xNONE; then
17612	cf_path_syntax="$prefix"
17613else
17614	cf_path_syntax="$ac_default_prefix"
17615fi
17616
17617case ".$cf_man2html" in
17618(.\$\(*\)*|.\'*\'*)
17619	;;
17620(..|./*|.\\*)
17621	;;
17622(.[a-zA-Z]:[\\/]*) # OS/2 EMX
17623	;;
17624(.\$\{*prefix\}*|.\$\{*dir\}*)
17625	eval cf_man2html="$cf_man2html"
17626	case ".$cf_man2html" in
17627	(.NONE/*)
17628		cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17629		;;
17630	esac
17631	;;
17632(.no|.NONE/*)
17633	cf_man2html=`echo "$cf_man2html" | sed -e s%NONE%$cf_path_syntax%`
17634	;;
17635(*)
17636	{ { echo "$as_me:17636: error: expected a pathname, not \"$cf_man2html\"" >&5
17637echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
17638   { (exit 1); exit 1; }; }
17639	;;
17640esac
17641
17642	MAN2HTML_PATH="$cf_man2html"
17643	echo "$as_me:17643: checking for $cf_man2html top/bottom margins" >&5
17644echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
17645
17646	# for this example, expect 3 lines of content, the remainder is head/foot
17647	cat >conftest.in <<CF_EOF
17648.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
17649.SH SECTION
17650MARKER
17651CF_EOF
17652
17653	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17654
17655	cf_man2html_1st="`${FGREP-fgrep} -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17656	cf_man2html_top=`expr "$cf_man2html_1st" - 2`
17657	cf_man2html_bot="`wc -l conftest.out |sed -e 's/[^0-9]//g'`"
17658	cf_man2html_bot=`expr "$cf_man2html_bot" - 2 - "$cf_man2html_top"`
17659	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
17660
17661	echo "$as_me:17661: result: $cf_man2html_top_bot" >&5
17662echo "${ECHO_T}$cf_man2html_top_bot" >&6
17663
17664	echo "$as_me:17664: checking for pagesize to use" >&5
17665echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
17666	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
17667	do
17668	cat >>conftest.in <<CF_EOF
17669.nf
176700
176711
176722
176733
176744
176755
176766
176777
176788
176799
17680CF_EOF
17681	done
17682
17683	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C $NROFF_PATH -man conftest.in >conftest.out
17684	cf_man2html_page="`${FGREP-fgrep} -n HEAD1 conftest.out |sed -n '$p' |sed -e 's/^[^0-9]*://' -e 's/:.*//'`"
17685	test -z "$cf_man2html_page" && cf_man2html_page=99999
17686	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
17687
17688	rm -rf conftest*
17689	echo "$as_me:17689: result: $cf_man2html_page" >&5
17690echo "${ECHO_T}$cf_man2html_page" >&6
17691
17692	cat >>$MAN2HTML_TEMP <<CF_EOF
17693: \${MAN2HTML_PATH=$MAN2HTML_PATH}
17694MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title=\"\$ROOT(\$TYPE)\" -compress -pgsize $cf_man2html_page"
17695case \${TYPE} in
17696(ms)
17697	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
17698	;;
17699(*)
17700	$TBL_PATH \${ROOT}.\${TYPE} | $NROFF_PATH $NROFF_OPTS -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
17701	;;
17702esac
17703CF_EOF
17704fi
17705
17706chmod 700 $MAN2HTML_TEMP
17707
17708# If we have already established that there is a full termcap implementation,
17709# suppress the definitions for terminfo that we make have imported from the
17710# imake-file.
17711if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
17712	case "$IMAKE_CFLAGS" in
17713	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
17714
17715	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
17716
17717echo "${as_me:-configure}:17717: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
17718
17719	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17720	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
17721
17722echo "${as_me:-configure}:17722: testing ...result $IMAKE_CFLAGS ..." 1>&5
17723
17724	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
17725
17726echo "${as_me:-configure}:17726: testing removing terminfo flags from CPPFLAGS ..." 1>&5
17727
17728	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
17729	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
17730
17731echo "${as_me:-configure}:17731: testing ...result $CPPFLAGS ..." 1>&5
17732
17733		;;
17734	esac
17735fi
17736
17737echo "$as_me:17737: checking for default terminal-id" >&5
17738echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
17739
17740# Check whether --with-terminal-id or --without-terminal-id was given.
17741if test "${with_terminal_id+set}" = set; then
17742  withval="$with_terminal_id"
17743  default_termid=$withval
17744else
17745  default_termid=vt420
17746fi;
17747echo "$as_me:17747: result: $default_termid" >&5
17748echo "${ECHO_T}$default_termid" >&6
17749case $default_termid in
17750(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
17751	;;
17752esac
17753
17754cat >>confdefs.h <<EOF
17755#define DFT_DECID "$default_termid"
17756EOF
17757
17758echo "$as_me:17758: checking for default terminal-type" >&5
17759echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
17760
17761# Check whether --with-terminal-type or --without-terminal-type was given.
17762if test "${with_terminal_type+set}" = set; then
17763  withval="$with_terminal_type"
17764  default_TERM=$withval
17765else
17766  default_TERM=xterm
17767fi;
17768echo "$as_me:17768: result: $default_TERM" >&5
17769echo "${ECHO_T}$default_TERM" >&6
17770
17771cat >>confdefs.h <<EOF
17772#define DFT_TERMTYPE "$default_TERM"
17773EOF
17774
17775###############################################################################
17776echo "$as_me:17776: checking if backarrow-key should be BS" >&5
17777echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
17778
17779# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
17780if test "${enable_backarrow_key+set}" = set; then
17781  enableval="$enable_backarrow_key"
17782  test "$enableval" != no && enableval=yes
17783	if test "$enableval" != "yes" ; then
17784    backarrow_is_bs=$enableval
17785	else
17786		backarrow_is_bs=yes
17787	fi
17788else
17789  enableval=yes
17790	backarrow_is_bs=yes
17791
17792fi;
17793
17794echo "$as_me:17794: result: $backarrow_is_bs" >&5
17795echo "${ECHO_T}$backarrow_is_bs" >&6
17796case $backarrow_is_bs in
17797(yes)
17798	backarrow_is_bs=true
17799	;;
17800(no)
17801	backarrow_is_bs=false
17802	;;
17803esac
17804cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
17805
17806cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17807
17808cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
17809backarrow_is_bs=${cf_xbool1}${cf_xbool2}
17810
17811cat >>confdefs.h <<EOF
17812#define DEF_BACKARO_BS $backarrow_is_bs
17813EOF
17814
17815echo "$as_me:17815: checking if backarrow-key should be treated as erase" >&5
17816echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
17817
17818# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
17819if test "${enable_backarrow_is_erase+set}" = set; then
17820  enableval="$enable_backarrow_is_erase"
17821  test "$enableval" != yes && enableval=no
17822	if test "$enableval" != "no" ; then
17823    backarrow_is_erase=$enableval
17824	else
17825		backarrow_is_erase=no
17826	fi
17827else
17828  enableval=no
17829	backarrow_is_erase=no
17830
17831fi;
17832
17833echo "$as_me:17833: result: $backarrow_is_erase" >&5
17834echo "${ECHO_T}$backarrow_is_erase" >&6
17835case $backarrow_is_erase in
17836(yes)
17837	backarrow_is_erase=true
17838	;;
17839(no)
17840	backarrow_is_erase=false
17841	;;
17842esac
17843cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
17844
17845cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17846
17847cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
17848backarrow_is_erase=${cf_xbool1}${cf_xbool2}
17849
17850cat >>confdefs.h <<EOF
17851#define DEF_BACKARO_ERASE $backarrow_is_erase
17852EOF
17853
17854echo "$as_me:17854: checking for default backspace/DEL setting" >&5
17855echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
17856
17857# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
17858if test "${enable_delete_is_del+set}" = set; then
17859  enableval="$enable_delete_is_del"
17860  delete_is_del=$enableval
17861else
17862  delete_is_del=maybe
17863fi;
17864
17865echo "$as_me:17865: result: $delete_is_del" >&5
17866echo "${ECHO_T}$delete_is_del" >&6
17867case $delete_is_del in
17868(yes)
17869	delete_is_del=true
17870	;;
17871(no)
17872	delete_is_del=false
17873	;;
17874esac
17875cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
17876
17877cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17878
17879cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
17880delete_is_del=${cf_xbool1}${cf_xbool2}
17881
17882cat >>confdefs.h <<EOF
17883#define DEFDELETE_DEL $delete_is_del
17884EOF
17885
17886echo "$as_me:17886: checking for default pty initial erase setting" >&5
17887echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
17888
17889# Check whether --enable-pty-erase or --disable-pty-erase was given.
17890if test "${enable_pty_erase+set}" = set; then
17891  enableval="$enable_pty_erase"
17892  initial_erase=$enableval
17893else
17894  initial_erase=False
17895fi;
17896
17897echo "$as_me:17897: result: $initial_erase" >&5
17898echo "${ECHO_T}$initial_erase" >&6
17899case $initial_erase in
17900(yes)
17901	initial_erase=true
17902	;;
17903(no)
17904	initial_erase=false
17905	;;
17906esac
17907cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
17908
17909cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17910
17911cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
17912initial_erase=${cf_xbool1}${cf_xbool2}
17913
17914cat >>confdefs.h <<EOF
17915#define DEF_INITIAL_ERASE $initial_erase
17916EOF
17917
17918echo "$as_me:17918: checking if alt should send ESC" >&5
17919echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
17920
17921# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
17922if test "${enable_alt_sends_esc+set}" = set; then
17923  enableval="$enable_alt_sends_esc"
17924  test "$enableval" != yes && enableval=no
17925	if test "$enableval" != "no" ; then
17926    alt_sends_esc=$enableval
17927	else
17928		alt_sends_esc=no
17929	fi
17930else
17931  enableval=no
17932	alt_sends_esc=no
17933
17934fi;
17935
17936echo "$as_me:17936: result: $alt_sends_esc" >&5
17937echo "${ECHO_T}$alt_sends_esc" >&6
17938case $alt_sends_esc in
17939(yes)
17940	alt_sends_esc=true
17941	;;
17942(no)
17943	alt_sends_esc=false
17944	;;
17945esac
17946cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17947
17948cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17949
17950cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
17951alt_sends_esc=${cf_xbool1}${cf_xbool2}
17952
17953cat >>confdefs.h <<EOF
17954#define DEF_ALT_SENDS_ESC $alt_sends_esc
17955EOF
17956
17957echo "$as_me:17957: checking if meta should send ESC" >&5
17958echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
17959
17960# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
17961if test "${enable_meta_sends_esc+set}" = set; then
17962  enableval="$enable_meta_sends_esc"
17963  test "$enableval" != yes && enableval=no
17964	if test "$enableval" != "no" ; then
17965    meta_sends_esc=$enableval
17966	else
17967		meta_sends_esc=no
17968	fi
17969else
17970  enableval=no
17971	meta_sends_esc=no
17972
17973fi;
17974
17975echo "$as_me:17975: result: $meta_sends_esc" >&5
17976echo "${ECHO_T}$meta_sends_esc" >&6
17977case $meta_sends_esc in
17978(yes)
17979	meta_sends_esc=true
17980	;;
17981(no)
17982	meta_sends_esc=false
17983	;;
17984esac
17985cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
17986
17987cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
17988
17989cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
17990meta_sends_esc=${cf_xbool1}${cf_xbool2}
17991
17992cat >>confdefs.h <<EOF
17993#define DEF_META_SENDS_ESC $meta_sends_esc
17994EOF
17995
17996###############################################################################
17997# Extract the first word of "tic", so it can be a program name with args.
17998set dummy tic; ac_word=$2
17999echo "$as_me:17999: checking for $ac_word" >&5
18000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18001if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
18002  echo $ECHO_N "(cached) $ECHO_C" >&6
18003else
18004  if test -n "$cf_tic_prog"; then
18005  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
18006else
18007  ac_save_IFS=$IFS; IFS=$ac_path_separator
18008ac_dummy="$PATH"
18009for ac_dir in $ac_dummy; do
18010  IFS=$ac_save_IFS
18011  test -z "$ac_dir" && ac_dir=.
18012  $as_executable_p "$ac_dir/$ac_word" || continue
18013ac_cv_prog_cf_tic_prog="yes"
18014echo "$as_me:18014: found $ac_dir/$ac_word" >&5
18015break
18016done
18017
18018  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
18019fi
18020fi
18021cf_tic_prog=$ac_cv_prog_cf_tic_prog
18022if test -n "$cf_tic_prog"; then
18023  echo "$as_me:18023: result: $cf_tic_prog" >&5
18024echo "${ECHO_T}$cf_tic_prog" >&6
18025else
18026  echo "$as_me:18026: result: no" >&5
18027echo "${ECHO_T}no" >&6
18028fi
18029
18030if test "$cf_tic_prog" = yes ; then
18031	if test -n "$TERMINFO"
18032	then
18033		case "$TERMINFO" in
18034		(/*)
18035			test -d "$TERMINFO" || unset TERMINFO
18036			;;
18037		(*)
18038			unset TERMINFO
18039			;;
18040		esac
18041	fi
18042	echo "$as_me:18042: checking for private terminfo-directory" >&5
18043echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
18044
18045# Check whether --with-own-terminfo or --without-own-terminfo was given.
18046if test "${with_own_terminfo+set}" = set; then
18047  withval="$with_own_terminfo"
18048  TERMINFO_DIR=$withval
18049else
18050  TERMINFO_DIR=${TERMINFO-none}
18051fi;
18052	echo "$as_me:18052: result: $TERMINFO_DIR" >&5
18053echo "${ECHO_T}$TERMINFO_DIR" >&6
18054	if test "$TERMINFO_DIR" = yes ; then
18055		{ echo "$as_me:18055: WARNING: no value given" >&5
18056echo "$as_me: WARNING: no value given" >&2;}
18057	elif test "$TERMINFO_DIR" != none ; then
18058		if test -d "$TERMINFO_DIR" ; then
18059
18060cat >>confdefs.h <<EOF
18061#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
18062EOF
18063
18064			echo "$as_me:18064: checking if \$TERMINFO should also be set" >&5
18065echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
18066
18067# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
18068if test "${enable_env_terminfo+set}" = set; then
18069  enableval="$enable_env_terminfo"
18070  cf_env_terminfo=yes
18071else
18072  cf_env_terminfo=no
18073fi;
18074			echo "$as_me:18074: result: $cf_env_terminfo" >&5
18075echo "${ECHO_T}$cf_env_terminfo" >&6
18076			test $cf_env_terminfo = yes &&
18077
18078cat >>confdefs.h <<\EOF
18079#define OWN_TERMINFO_ENV 1
18080EOF
18081
18082		else
18083			{ echo "$as_me:18083: WARNING: not a directory" >&5
18084echo "$as_me: WARNING: not a directory" >&2;}
18085		fi
18086	elif test "$prefix" != NONE ; then
18087		TERMINFO_DIR='${prefix}/lib/terminfo'
18088	elif test -d /usr/lib/terminfo ; then
18089		TERMINFO_DIR=/usr/lib/terminfo
18090	else
18091		TERMINFO_DIR=
18092	fi
18093	SET_TERMINFO=
18094	if test -n "$TERMINFO_DIR" ; then
18095		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
18096		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
18097	fi
18098	no_ticprog=
18099else
18100	no_ticprog="#"
18101	TERMINFO_DIR=
18102	SET_TERMINFO=
18103fi
18104
18105###############################################################################
18106
18107echo "$as_me:18107: checking if you want active-icons" >&5
18108echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
18109
18110# Check whether --enable-active-icon or --disable-active-icon was given.
18111if test "${enable_active_icon+set}" = set; then
18112  enableval="$enable_active_icon"
18113  test "$enableval" != no && enableval=yes
18114	if test "$enableval" != "yes" ; then
18115    enable_active_icon=no
18116	else
18117		enable_active_icon=yes
18118	fi
18119else
18120  enableval=yes
18121	enable_active_icon=yes
18122
18123fi;
18124echo "$as_me:18124: result: $enable_active_icon" >&5
18125echo "${ECHO_T}$enable_active_icon" >&6
18126if test "$enable_active_icon" = no ; then
18127
18128cat >>confdefs.h <<\EOF
18129#define NO_ACTIVE_ICON 1
18130EOF
18131
18132fi
18133
18134echo "$as_me:18134: checking if you want ANSI color" >&5
18135echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
18136
18137# Check whether --enable-ansi-color or --disable-ansi-color was given.
18138if test "${enable_ansi_color+set}" = set; then
18139  enableval="$enable_ansi_color"
18140  test "$enableval" != no && enableval=yes
18141	if test "$enableval" != "yes" ; then
18142    enable_ansi_color=no
18143	else
18144		enable_ansi_color=yes
18145	fi
18146else
18147  enableval=yes
18148	enable_ansi_color=yes
18149
18150fi;
18151echo "$as_me:18151: result: $enable_ansi_color" >&5
18152echo "${ECHO_T}$enable_ansi_color" >&6
18153test "$enable_ansi_color" = no &&
18154cat >>confdefs.h <<\EOF
18155#define OPT_ISO_COLORS 0
18156EOF
18157
18158if test "$enable_ansi_color" = yes ; then
18159
18160	echo "$as_me:18160: checking if you want 16 colors like aixterm" >&5
18161echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
18162
18163# Check whether --enable-16-color or --disable-16-color was given.
18164if test "${enable_16_color+set}" = set; then
18165  enableval="$enable_16_color"
18166  test "$enableval" != no && enableval=yes
18167	if test "$enableval" != "yes" ; then
18168    enable_16_color=no
18169	else
18170		enable_16_color=yes
18171	fi
18172else
18173  enableval=yes
18174	enable_16_color=yes
18175
18176fi;
18177	echo "$as_me:18177: result: $enable_16_color" >&5
18178echo "${ECHO_T}$enable_16_color" >&6
18179	test "$enable_16_color" = no &&
18180cat >>confdefs.h <<\EOF
18181#define OPT_AIX_COLORS 0
18182EOF
18183
18184	echo "$as_me:18184: checking if you want 256 colors" >&5
18185echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
18186
18187# Check whether --enable-256-color or --disable-256-color was given.
18188if test "${enable_256_color+set}" = set; then
18189  enableval="$enable_256_color"
18190  test "$enableval" != no && enableval=yes
18191	if test "$enableval" != "yes" ; then
18192    enable_256_color=no
18193	else
18194		enable_256_color=yes
18195	fi
18196else
18197  enableval=yes
18198	enable_256_color=yes
18199
18200fi;
18201	echo "$as_me:18201: result: $enable_256_color" >&5
18202echo "${ECHO_T}$enable_256_color" >&6
18203
18204	if test "$enable_256_color" = yes ; then
18205
18206		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
18207		EXTRAHDRS="$EXTRAHDRS 256colres.h"
18208
18209cat >>confdefs.h <<\EOF
18210#define OPT_256_COLORS 1
18211EOF
18212
18213		echo "$as_me:18213: checking if you want direct-color support" >&5
18214echo $ECHO_N "checking if you want direct-color support... $ECHO_C" >&6
18215
18216# Check whether --enable-direct-color or --disable-direct-color was given.
18217if test "${enable_direct_color+set}" = set; then
18218  enableval="$enable_direct_color"
18219  test "$enableval" != no && enableval=yes
18220	if test "$enableval" != "yes" ; then
18221    enable_direct_color=no
18222	else
18223		enable_direct_color=yes
18224	fi
18225else
18226  enableval=yes
18227	enable_direct_color=yes
18228
18229fi;
18230		echo "$as_me:18230: result: $enable_direct_color" >&5
18231echo "${ECHO_T}$enable_direct_color" >&6
18232		if test "$enable_direct_color" = yes ; then
18233
18234cat >>confdefs.h <<\EOF
18235#define OPT_DIRECT_COLOR 1
18236EOF
18237
18238		fi
18239
18240	else
18241
18242		echo "$as_me:18242: checking if you want 88 colors" >&5
18243echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
18244
18245# Check whether --enable-88-color or --disable-88-color was given.
18246if test "${enable_88_color+set}" = set; then
18247  enableval="$enable_88_color"
18248  test "$enableval" != no && enableval=yes
18249	if test "$enableval" != "yes" ; then
18250    enable_88_color=no
18251	else
18252		enable_88_color=yes
18253	fi
18254else
18255  enableval=yes
18256	enable_88_color=yes
18257
18258fi;
18259		echo "$as_me:18259: result: $enable_88_color" >&5
18260echo "${ECHO_T}$enable_88_color" >&6
18261		if test "$enable_88_color" = yes ; then
18262			CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
18263			EXTRAHDRS="$EXTRAHDRS 88colres.h"
18264
18265cat >>confdefs.h <<\EOF
18266#define OPT_88_COLORS 1
18267EOF
18268
18269		fi
18270
18271	fi
18272
18273fi
18274
18275echo "$as_me:18275: checking if you want blinking cursor" >&5
18276echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
18277
18278# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
18279if test "${enable_blink_cursor+set}" = set; then
18280  enableval="$enable_blink_cursor"
18281  test "$enableval" != no && enableval=yes
18282	if test "$enableval" != "yes" ; then
18283    enable_blink_curs=no
18284	else
18285		enable_blink_curs=yes
18286	fi
18287else
18288  enableval=yes
18289	enable_blink_curs=yes
18290
18291fi;
18292echo "$as_me:18292: result: $enable_blink_curs" >&5
18293echo "${ECHO_T}$enable_blink_curs" >&6
18294test "$enable_blink_curs" = no &&
18295cat >>confdefs.h <<\EOF
18296#define OPT_BLINK_CURS 0
18297EOF
18298
18299echo "$as_me:18299: checking if you want to ignore Linux's broken palette-strings" >&5
18300echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
18301
18302case $host_os in
18303(linux*)
18304	assume_broken_osc=yes ;;
18305(*)
18306	assume_broken_osc=no ;;
18307esac
18308
18309# Check whether --enable-broken-osc or --disable-broken-osc was given.
18310if test "${enable_broken_osc+set}" = set; then
18311  enableval="$enable_broken_osc"
18312  test "$enableval" != no && enableval=yes
18313	if test "$enableval" != "$assume_broken_osc" ; then
18314    enable_broken_osc=$enableval
18315	else
18316		enable_broken_osc=$enableval
18317	fi
18318else
18319  enableval=$assume_broken_osc
18320	enable_broken_osc=$enableval
18321
18322fi;
18323echo "$as_me:18323: result: $enable_broken_osc" >&5
18324echo "${ECHO_T}$enable_broken_osc" >&6
18325if test "$enable_broken_osc" = yes ; then
18326
18327cat >>confdefs.h <<\EOF
18328#define OPT_BROKEN_OSC 1
18329EOF
18330
18331else
18332
18333cat >>confdefs.h <<\EOF
18334#define OPT_BROKEN_OSC 0
18335EOF
18336
18337fi
18338
18339echo "$as_me:18339: checking if you want to allow broken string-terminators" >&5
18340echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
18341
18342# Check whether --enable-broken-st or --disable-broken-st was given.
18343if test "${enable_broken_st+set}" = set; then
18344  enableval="$enable_broken_st"
18345  test "$enableval" != yes && enableval=no
18346	if test "$enableval" != "no" ; then
18347    enable_broken_st=no
18348	else
18349		enable_broken_st=yes
18350	fi
18351else
18352  enableval=no
18353	enable_broken_st=yes
18354
18355fi;
18356echo "$as_me:18356: result: $enable_broken_st" >&5
18357echo "${ECHO_T}$enable_broken_st" >&6
18358test "$enable_broken_st" = no &&
18359cat >>confdefs.h <<\EOF
18360#define OPT_BROKEN_ST 0
18361EOF
18362
18363echo "$as_me:18363: checking if you want to compile-in icon data" >&5
18364echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
18365
18366# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
18367if test "${enable_builtin_xpms+set}" = set; then
18368  enableval="$enable_builtin_xpms"
18369  test "$enableval" != yes && enableval=no
18370	if test "$enableval" != "no" ; then
18371    enable_builtin_xpms=yes
18372	else
18373		enable_builtin_xpms=no
18374	fi
18375else
18376  enableval=no
18377	enable_builtin_xpms=no
18378
18379fi;
18380echo "$as_me:18380: result: $enable_builtin_xpms" >&5
18381echo "${ECHO_T}$enable_builtin_xpms" >&6
18382test "$enable_builtin_xpms" = yes &&
18383cat >>confdefs.h <<\EOF
18384#define OPT_BUILTIN_XPMS 1
18385EOF
18386
18387echo "$as_me:18387: checking if you want printable 128-159" >&5
18388echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
18389
18390# Check whether --enable-c1-print or --disable-c1-print was given.
18391if test "${enable_c1_print+set}" = set; then
18392  enableval="$enable_c1_print"
18393  test "$enableval" != no && enableval=yes
18394	if test "$enableval" != "yes" ; then
18395    enable_c1_print=no
18396	else
18397		enable_c1_print=yes
18398	fi
18399else
18400  enableval=yes
18401	enable_c1_print=yes
18402
18403fi;
18404echo "$as_me:18404: result: $enable_c1_print" >&5
18405echo "${ECHO_T}$enable_c1_print" >&6
18406test "$enable_c1_print" = no &&
18407cat >>confdefs.h <<\EOF
18408#define OPT_C1_PRINT 0
18409EOF
18410
18411if test "$enable_ansi_color" = yes ; then
18412
18413	echo "$as_me:18413: checking if you want bold colors mapped like IBM PC" >&5
18414echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
18415
18416# Check whether --enable-bold-color or --disable-bold-color was given.
18417if test "${enable_bold_color+set}" = set; then
18418  enableval="$enable_bold_color"
18419  test "$enableval" != no && enableval=yes
18420	if test "$enableval" != "yes" ; then
18421    enable_pc_color=no
18422	else
18423		enable_pc_color=yes
18424	fi
18425else
18426  enableval=yes
18427	enable_pc_color=yes
18428
18429fi;
18430	echo "$as_me:18430: result: $enable_pc_color" >&5
18431echo "${ECHO_T}$enable_pc_color" >&6
18432	test "$enable_pc_color" = no &&
18433cat >>confdefs.h <<\EOF
18434#define OPT_PC_COLORS 0
18435EOF
18436
18437	echo "$as_me:18437: checking if you want separate color-classes" >&5
18438echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
18439
18440# Check whether --enable-color-class or --disable-color-class was given.
18441if test "${enable_color_class+set}" = set; then
18442  enableval="$enable_color_class"
18443  test "$enableval" != no && enableval=yes
18444	if test "$enableval" != "yes" ; then
18445    enable_color_class=no
18446	else
18447		enable_color_class=yes
18448	fi
18449else
18450  enableval=yes
18451	enable_color_class=yes
18452
18453fi;
18454	echo "$as_me:18454: result: $enable_color_class" >&5
18455echo "${ECHO_T}$enable_color_class" >&6
18456	test "$enable_color_class" = no &&
18457cat >>confdefs.h <<\EOF
18458#define OPT_COLOR_CLASS 0
18459EOF
18460
18461	echo "$as_me:18461: checking if you want color-mode enabled by default" >&5
18462echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
18463
18464# Check whether --enable-color-mode or --disable-color-mode was given.
18465if test "${enable_color_mode+set}" = set; then
18466  enableval="$enable_color_mode"
18467  test "$enableval" != no && enableval=yes
18468	if test "$enableval" != "yes" ; then
18469    default_colormode=no
18470	else
18471		default_colormode=yes
18472	fi
18473else
18474  enableval=yes
18475	default_colormode=yes
18476
18477fi;
18478	echo "$as_me:18478: result: $default_colormode" >&5
18479echo "${ECHO_T}$default_colormode" >&6
18480	test "$default_colormode" = no &&
18481cat >>confdefs.h <<\EOF
18482#define DFT_COLORMODE 0
18483EOF
18484
18485fi
18486
18487echo "$as_me:18487: checking if you want support for color highlighting" >&5
18488echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
18489
18490# Check whether --enable-highlighting or --disable-highlighting was given.
18491if test "${enable_highlighting+set}" = set; then
18492  enableval="$enable_highlighting"
18493  test "$enableval" != no && enableval=yes
18494	if test "$enableval" != "yes" ; then
18495    default_highlight=no
18496	else
18497		default_highlight=yes
18498	fi
18499else
18500  enableval=yes
18501	default_highlight=yes
18502
18503fi;
18504echo "$as_me:18504: result: $default_highlight" >&5
18505echo "${ECHO_T}$default_highlight" >&6
18506test "$default_highlight" = no &&
18507cat >>confdefs.h <<\EOF
18508#define OPT_HIGHLIGHT_COLOR 0
18509EOF
18510
18511echo "$as_me:18511: checking if you want support for doublesize characters" >&5
18512echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
18513
18514# Check whether --enable-doublechars or --disable-doublechars was given.
18515if test "${enable_doublechars+set}" = set; then
18516  enableval="$enable_doublechars"
18517  test "$enableval" != no && enableval=yes
18518	if test "$enableval" != "yes" ; then
18519    enable_doublechars=no
18520	else
18521		enable_doublechars=yes
18522	fi
18523else
18524  enableval=yes
18525	enable_doublechars=yes
18526
18527fi;
18528echo "$as_me:18528: result: $enable_doublechars" >&5
18529echo "${ECHO_T}$enable_doublechars" >&6
18530test "$enable_doublechars" = no &&
18531cat >>confdefs.h <<\EOF
18532#define OPT_DEC_CHRSET 0
18533EOF
18534
18535echo "$as_me:18535: checking if you want fallback-support for box characters" >&5
18536echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
18537
18538# Check whether --enable-boxchars or --disable-boxchars was given.
18539if test "${enable_boxchars+set}" = set; then
18540  enableval="$enable_boxchars"
18541  test "$enableval" != no && enableval=yes
18542	if test "$enableval" != "yes" ; then
18543    enable_boxchars=no
18544	else
18545		enable_boxchars=yes
18546	fi
18547else
18548  enableval=yes
18549	enable_boxchars=yes
18550
18551fi;
18552echo "$as_me:18552: result: $enable_boxchars" >&5
18553echo "${ECHO_T}$enable_boxchars" >&6
18554test "$enable_boxchars" = no &&
18555cat >>confdefs.h <<\EOF
18556#define OPT_BOX_CHARS 0
18557EOF
18558
18559echo "$as_me:18559: checking if you want to allow spawning new xterms" >&5
18560echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
18561
18562# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
18563if test "${enable_exec_xterm+set}" = set; then
18564  enableval="$enable_exec_xterm"
18565  test "$enableval" != yes && enableval=no
18566	if test "$enableval" != "no" ; then
18567    enable_exec_xterm=yes
18568	else
18569		enable_exec_xterm=no
18570	fi
18571else
18572  enableval=no
18573	enable_exec_xterm=no
18574
18575fi;
18576echo "$as_me:18576: result: $enable_exec_xterm" >&5
18577echo "${ECHO_T}$enable_exec_xterm" >&6
18578if test "$enable_exec_xterm" = yes ; then
18579
18580echo "$as_me:18580: checking for proc tree with cwd-support" >&5
18581echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
18582if test "${cf_cv_procfs_cwd+set}" = set; then
18583  echo $ECHO_N "(cached) $ECHO_C" >&6
18584else
18585
18586cf_cv_procfs_cwd=no
18587for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
18588do
18589	if test -d "$cf_path" && \
18590	   test -d "$cf_path"/$$ && \
18591	   { test -d "$cf_path"/$$/cwd || \
18592	     test -L "$cf_path"/$$/cwd; }; then
18593		cf_cv_procfs_cwd="$cf_path"
18594		break
18595	fi
18596done
18597
18598fi
18599echo "$as_me:18599: result: $cf_cv_procfs_cwd" >&5
18600echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
18601
18602	if test "$cf_cv_procfs_cwd" = no ; then
18603		{ echo "$as_me:18603: WARNING: no suitable proc filesystem found" >&5
18604echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
18605	else
18606
18607cat >>confdefs.h <<EOF
18608#define PROCFS_ROOT "$cf_cv_procfs_cwd"
18609EOF
18610
18611cat >>confdefs.h <<\EOF
18612#define OPT_EXEC_XTERM 1
18613EOF
18614
18615	fi
18616fi
18617
18618if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
18619	test -n "$verbose" && echo "	found package Xext" 1>&6
18620
18621echo "${as_me:-configure}:18621: testing found package Xext ..." 1>&5
18622
18623	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
18624	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
18625	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
18626
18627echo "${as_me:-configure}:18627: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18628
18629	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
18630
18631echo "${as_me:-configure}:18631: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
18632
18633cf_fix_cppflags=no
18634cf_new_cflags=
18635cf_new_cppflags=
18636cf_new_extra_cppflags=
18637
18638for cf_add_cflags in $cf_pkgconfig_incs
18639do
18640case "$cf_fix_cppflags" in
18641(no)
18642	case "$cf_add_cflags" in
18643	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18644		case "$cf_add_cflags" in
18645		(-D*)
18646			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18647
18648			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18649				&& test -z "${cf_tst_cflags}" \
18650				&& cf_fix_cppflags=yes
18651
18652			if test "$cf_fix_cppflags" = yes ; then
18653
18654	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18655	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18656
18657				continue
18658			elif test "${cf_tst_cflags}" = "\"'" ; then
18659
18660	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18661	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18662
18663				continue
18664			fi
18665			;;
18666		esac
18667		case "$CPPFLAGS" in
18668		(*$cf_add_cflags)
18669			;;
18670		(*)
18671			case "$cf_add_cflags" in
18672			(-D*)
18673				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18674
18675CPPFLAGS=`echo "$CPPFLAGS" | \
18676	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18677		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18678
18679				;;
18680			esac
18681
18682	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18683	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18684
18685			;;
18686		esac
18687		;;
18688	(*)
18689
18690	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18691	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18692
18693		;;
18694	esac
18695	;;
18696(yes)
18697
18698	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18699	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18700
18701	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
18702
18703	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18704		&& test -z "${cf_tst_cflags}" \
18705		&& cf_fix_cppflags=no
18706	;;
18707esac
18708done
18709
18710if test -n "$cf_new_cflags" ; then
18711
18712	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18713	CFLAGS="${CFLAGS}$cf_new_cflags"
18714
18715fi
18716
18717if test -n "$cf_new_cppflags" ; then
18718
18719	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18720	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18721
18722fi
18723
18724if test -n "$cf_new_extra_cppflags" ; then
18725
18726	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18727	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18728
18729fi
18730
18731cf_add_libs="$LIBS"
18732# reverse order
18733cf_add_0lib=
18734for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18735# filter duplicates
18736for cf_add_1lib in $cf_add_0lib; do
18737	for cf_add_2lib in $cf_add_libs; do
18738		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18739			cf_add_1lib=
18740			break
18741		fi
18742	done
18743	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18744done
18745LIBS="$cf_add_libs"
18746
18747	:
18748else
18749	cf_pkgconfig_incs=
18750	cf_pkgconfig_libs=
18751
18752	echo "$as_me:18752: checking for XextCreateExtension in -lXext" >&5
18753echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
18754if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
18755  echo $ECHO_N "(cached) $ECHO_C" >&6
18756else
18757  ac_check_lib_save_LIBS=$LIBS
18758LIBS="-lXext  $LIBS"
18759cat >"conftest.$ac_ext" <<_ACEOF
18760#line 18760 "configure"
18761#include "confdefs.h"
18762
18763/* Override any gcc2 internal prototype to avoid an error.  */
18764#ifdef __cplusplus
18765extern "C"
18766#endif
18767/* We use char because int might match the return type of a gcc2
18768   builtin and then its argument prototype would still apply.  */
18769char XextCreateExtension ();
18770int
18771main (void)
18772{
18773XextCreateExtension ();
18774  ;
18775  return 0;
18776}
18777_ACEOF
18778rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18779if { (eval echo "$as_me:18779: \"$ac_link\"") >&5
18780  (eval $ac_link) 2>&5
18781  ac_status=$?
18782  echo "$as_me:18782: \$? = $ac_status" >&5
18783  (exit "$ac_status"); } &&
18784         { ac_try='test -s "conftest$ac_exeext"'
18785  { (eval echo "$as_me:18785: \"$ac_try\"") >&5
18786  (eval $ac_try) 2>&5
18787  ac_status=$?
18788  echo "$as_me:18788: \$? = $ac_status" >&5
18789  (exit "$ac_status"); }; }; then
18790  ac_cv_lib_Xext_XextCreateExtension=yes
18791else
18792  echo "$as_me: failed program was:" >&5
18793cat "conftest.$ac_ext" >&5
18794ac_cv_lib_Xext_XextCreateExtension=no
18795fi
18796rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18797LIBS=$ac_check_lib_save_LIBS
18798fi
18799echo "$as_me:18799: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
18800echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
18801if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
18802
18803cf_add_libs="$LIBS"
18804# reverse order
18805cf_add_0lib=
18806for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18807# filter duplicates
18808for cf_add_1lib in $cf_add_0lib; do
18809	for cf_add_2lib in $cf_add_libs; do
18810		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18811			cf_add_1lib=
18812			break
18813		fi
18814	done
18815	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18816done
18817LIBS="$cf_add_libs"
18818
18819fi
18820
18821fi
18822
18823echo "$as_me:18823: checking for X11/extensions/Xdbe.h" >&5
18824echo $ECHO_N "checking for X11/extensions/Xdbe.h... $ECHO_C" >&6
18825if test "${ac_cv_header_X11_extensions_Xdbe_h+set}" = set; then
18826  echo $ECHO_N "(cached) $ECHO_C" >&6
18827else
18828  cat >"conftest.$ac_ext" <<_ACEOF
18829#line 18829 "configure"
18830#include "confdefs.h"
18831#include <X11/extensions/Xdbe.h>
18832_ACEOF
18833if { (eval echo "$as_me:18833: \"$ac_cpp "conftest.$ac_ext"\"") >&5
18834  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
18835  ac_status=$?
18836  $EGREP -v '^ *\+' conftest.er1 >conftest.err
18837  rm -f conftest.er1
18838  cat conftest.err >&5
18839  echo "$as_me:18839: \$? = $ac_status" >&5
18840  (exit "$ac_status"); } >/dev/null; then
18841  if test -s conftest.err; then
18842    ac_cpp_err=$ac_c_preproc_warn_flag
18843  else
18844    ac_cpp_err=
18845  fi
18846else
18847  ac_cpp_err=yes
18848fi
18849if test -z "$ac_cpp_err"; then
18850  ac_cv_header_X11_extensions_Xdbe_h=yes
18851else
18852  echo "$as_me: failed program was:" >&5
18853  cat "conftest.$ac_ext" >&5
18854  ac_cv_header_X11_extensions_Xdbe_h=no
18855fi
18856rm -f conftest.err "conftest.$ac_ext"
18857fi
18858echo "$as_me:18858: result: $ac_cv_header_X11_extensions_Xdbe_h" >&5
18859echo "${ECHO_T}$ac_cv_header_X11_extensions_Xdbe_h" >&6
18860if test "$ac_cv_header_X11_extensions_Xdbe_h" = yes; then
18861
18862cat >>confdefs.h <<\EOF
18863#define HAVE_X11_EXTENSIONS_XDBE_H 1
18864EOF
18865
18866	echo "$as_me:18866: checking for XdbeSwapBuffers" >&5
18867echo $ECHO_N "checking for XdbeSwapBuffers... $ECHO_C" >&6
18868if test "${ac_cv_func_XdbeSwapBuffers+set}" = set; then
18869  echo $ECHO_N "(cached) $ECHO_C" >&6
18870else
18871  cat >"conftest.$ac_ext" <<_ACEOF
18872#line 18872 "configure"
18873#include "confdefs.h"
18874#define XdbeSwapBuffers autoconf_temporary
18875#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18876#undef XdbeSwapBuffers
18877
18878#ifdef __cplusplus
18879extern "C"
18880#endif
18881
18882/* We use char because int might match the return type of a gcc2
18883   builtin and then its argument prototype would still apply.  */
18884char XdbeSwapBuffers (void);
18885
18886int
18887main (void)
18888{
18889
18890/* The GNU C library defines stubs for functions which it implements
18891    to always fail with ENOSYS.  Some functions are actually named
18892    something starting with __ and the normal name is an alias.  */
18893#if defined (__stub_XdbeSwapBuffers) || defined (__stub___XdbeSwapBuffers)
18894#error found stub for XdbeSwapBuffers
18895#endif
18896
18897	return XdbeSwapBuffers ();
18898  ;
18899  return 0;
18900}
18901_ACEOF
18902rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18903if { (eval echo "$as_me:18903: \"$ac_link\"") >&5
18904  (eval $ac_link) 2>&5
18905  ac_status=$?
18906  echo "$as_me:18906: \$? = $ac_status" >&5
18907  (exit "$ac_status"); } &&
18908         { ac_try='test -s "conftest$ac_exeext"'
18909  { (eval echo "$as_me:18909: \"$ac_try\"") >&5
18910  (eval $ac_try) 2>&5
18911  ac_status=$?
18912  echo "$as_me:18912: \$? = $ac_status" >&5
18913  (exit "$ac_status"); }; }; then
18914  ac_cv_func_XdbeSwapBuffers=yes
18915else
18916  echo "$as_me: failed program was:" >&5
18917cat "conftest.$ac_ext" >&5
18918ac_cv_func_XdbeSwapBuffers=no
18919fi
18920rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18921fi
18922echo "$as_me:18922: result: $ac_cv_func_XdbeSwapBuffers" >&5
18923echo "${ECHO_T}$ac_cv_func_XdbeSwapBuffers" >&6
18924if test "$ac_cv_func_XdbeSwapBuffers" = yes; then
18925
18926cat >>confdefs.h <<\EOF
18927#define HAVE_XDBESWAPBUFFERS 1
18928EOF
18929
18930				   cf_x_ext_double_buffer=yes
18931fi
18932
18933fi
18934
18935double_buffer=False
18936if test "$cf_x_ext_double_buffer" = yes ; then
18937	echo "$as_me:18937: checking if you want to enable double-buffering in default resources" >&5
18938echo $ECHO_N "checking if you want to enable double-buffering in default resources... $ECHO_C" >&6
18939
18940# Check whether --enable-double-buffer or --disable-double-buffer was given.
18941if test "${enable_double_buffer+set}" = set; then
18942  enableval="$enable_double_buffer"
18943  test "$enableval" != yes && enableval=no
18944	if test "$enableval" != "no" ; then
18945    enable_double_bfr=yes
18946	else
18947		enable_double_bfr=no
18948	fi
18949else
18950  enableval=no
18951	enable_double_bfr=no
18952
18953fi;
18954	echo "$as_me:18954: result: $enable_double_bfr" >&5
18955echo "${ECHO_T}$enable_double_bfr" >&6
18956	if test "$enable_double_bfr" = yes ; then
18957
18958cat >>confdefs.h <<\EOF
18959#define OPT_DOUBLE_BUFFER 1
18960EOF
18961
18962		double_buffer=True
18963	fi
18964fi
18965
18966echo "$as_me:18966: checking if you want to use FreeType library" >&5
18967echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
18968
18969# Check whether --enable-freetype or --disable-freetype was given.
18970if test "${enable_freetype+set}" = set; then
18971  enableval="$enable_freetype"
18972  test "$enableval" != no && enableval=yes
18973	if test "$enableval" != "yes" ; then
18974    enable_freetype=no
18975	else
18976		enable_freetype=yes
18977	fi
18978else
18979  enableval=yes
18980	enable_freetype=yes
18981
18982fi;
18983echo "$as_me:18983: result: $enable_freetype" >&5
18984echo "${ECHO_T}$enable_freetype" >&6
18985if test "$enable_freetype" = yes ; then
18986
18987cf_cv_x_freetype_incs=no
18988cf_cv_x_freetype_libs=no
18989cf_extra_freetype_libs=
18990FREETYPE_CONFIG=none
18991FREETYPE_PARAMS=
18992
18993echo "$as_me:18993: checking for FreeType configuration script" >&5
18994echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
18995
18996# Check whether --with-freetype-config or --without-freetype-config was given.
18997if test "${with_freetype_config+set}" = set; then
18998  withval="$with_freetype_config"
18999  cf_cv_x_freetype_cfgs="$withval"
19000else
19001  cf_cv_x_freetype_cfgs=auto
19002fi;
19003test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
19004test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
19005echo "$as_me:19005: result: $cf_cv_x_freetype_cfgs" >&5
19006echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
19007
19008case $cf_cv_x_freetype_cfgs in
19009(none)
19010	echo "$as_me:19010: checking if you specified -D/-I options for FreeType" >&5
19011echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
19012
19013# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
19014if test "${with_freetype_cflags+set}" = set; then
19015  withval="$with_freetype_cflags"
19016  cf_cv_x_freetype_incs="$with_freetype_cflags"
19017else
19018  cf_cv_x_freetype_incs=no
19019fi;
19020	echo "$as_me:19020: result: $cf_cv_x_freetype_incs" >&5
19021echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19022
19023	echo "$as_me:19023: checking if you specified -L/-l options for FreeType" >&5
19024echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
19025
19026# Check whether --with-freetype-libs or --without-freetype-libs was given.
19027if test "${with_freetype_libs+set}" = set; then
19028  withval="$with_freetype_libs"
19029  cf_cv_x_freetype_libs="$with_freetype_libs"
19030else
19031  cf_cv_x_freetype_libs=no
19032fi;
19033	echo "$as_me:19033: result: $cf_cv_x_freetype_libs" >&5
19034echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19035	;;
19036(auto)
19037	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19038		FREETYPE_CONFIG=$PKG_CONFIG
19039		FREETYPE_PARAMS=xft
19040	else
19041		# Extract the first word of "freetype-config", so it can be a program name with args.
19042set dummy freetype-config; ac_word=$2
19043echo "$as_me:19043: checking for $ac_word" >&5
19044echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19045if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
19046  echo $ECHO_N "(cached) $ECHO_C" >&6
19047else
19048  case $FREETYPE_CONFIG in
19049  [\\/]* | ?:[\\/]*)
19050  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
19051  ;;
19052  *)
19053  ac_save_IFS=$IFS; IFS=$ac_path_separator
19054ac_dummy="$PATH"
19055for ac_dir in $ac_dummy; do
19056  IFS=$ac_save_IFS
19057  test -z "$ac_dir" && ac_dir=.
19058  if $as_executable_p "$ac_dir/$ac_word"; then
19059   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
19060   echo "$as_me:19060: found $ac_dir/$ac_word" >&5
19061   break
19062fi
19063done
19064
19065  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
19066  ;;
19067esac
19068fi
19069FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
19070
19071if test -n "$FREETYPE_CONFIG"; then
19072  echo "$as_me:19072: result: $FREETYPE_CONFIG" >&5
19073echo "${ECHO_T}$FREETYPE_CONFIG" >&6
19074else
19075  echo "$as_me:19075: result: no" >&5
19076echo "${ECHO_T}no" >&6
19077fi
19078
19079		if test "$FREETYPE_CONFIG" != none; then
19080			FREETYPE_CONFIG=$FREETYPE_CONFIG
19081			cf_extra_freetype_libs="-lXft"
19082		else
19083			# Extract the first word of "xft-config", so it can be a program name with args.
19084set dummy xft-config; ac_word=$2
19085echo "$as_me:19085: checking for $ac_word" >&5
19086echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19087if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
19088  echo $ECHO_N "(cached) $ECHO_C" >&6
19089else
19090  case $FREETYPE_OLD_CONFIG in
19091  [\\/]* | ?:[\\/]*)
19092  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
19093  ;;
19094  *)
19095  ac_save_IFS=$IFS; IFS=$ac_path_separator
19096ac_dummy="$PATH"
19097for ac_dir in $ac_dummy; do
19098  IFS=$ac_save_IFS
19099  test -z "$ac_dir" && ac_dir=.
19100  if $as_executable_p "$ac_dir/$ac_word"; then
19101   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
19102   echo "$as_me:19102: found $ac_dir/$ac_word" >&5
19103   break
19104fi
19105done
19106
19107  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
19108  ;;
19109esac
19110fi
19111FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
19112
19113if test -n "$FREETYPE_OLD_CONFIG"; then
19114  echo "$as_me:19114: result: $FREETYPE_OLD_CONFIG" >&5
19115echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
19116else
19117  echo "$as_me:19117: result: no" >&5
19118echo "${ECHO_T}no" >&6
19119fi
19120
19121			if test "$FREETYPE_OLD_CONFIG" != none; then
19122				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
19123			fi
19124		fi
19125	fi
19126	;;
19127(pkg*)
19128	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
19129		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
19130		FREETYPE_PARAMS=xft
19131	else
19132		{ echo "$as_me:19132: WARNING: cannot find pkg-config for Xft" >&5
19133echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
19134	fi
19135	;;
19136(*)
19137	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
19138set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
19139echo "$as_me:19139: checking for $ac_word" >&5
19140echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19141if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
19142  echo $ECHO_N "(cached) $ECHO_C" >&6
19143else
19144  case $FREETYPE_XFT_CONFIG in
19145  [\\/]* | ?:[\\/]*)
19146  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
19147  ;;
19148  *)
19149  ac_save_IFS=$IFS; IFS=$ac_path_separator
19150ac_dummy="$PATH"
19151for ac_dir in $ac_dummy; do
19152  IFS=$ac_save_IFS
19153  test -z "$ac_dir" && ac_dir=.
19154  if $as_executable_p "$ac_dir/$ac_word"; then
19155   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
19156   echo "$as_me:19156: found $ac_dir/$ac_word" >&5
19157   break
19158fi
19159done
19160
19161  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
19162  ;;
19163esac
19164fi
19165FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
19166
19167if test -n "$FREETYPE_XFT_CONFIG"; then
19168  echo "$as_me:19168: result: $FREETYPE_XFT_CONFIG" >&5
19169echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
19170else
19171  echo "$as_me:19171: result: no" >&5
19172echo "${ECHO_T}no" >&6
19173fi
19174
19175	if test "$FREETYPE_XFT_CONFIG" != none; then
19176		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
19177	else
19178		{ echo "$as_me:19178: WARNING: cannot find config script for Xft" >&5
19179echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
19180	fi
19181	;;
19182esac
19183
19184if test "$FREETYPE_CONFIG" != none ; then
19185	echo "$as_me:19185: checking for FreeType config" >&5
19186echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
19187	echo "$as_me:19187: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
19188echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
19189
19190	if test "$cf_cv_x_freetype_incs" = no ; then
19191		echo "$as_me:19191: checking for $FREETYPE_CONFIG cflags" >&5
19192echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
19193		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
19194		echo "$as_me:19194: result: $cf_cv_x_freetype_incs" >&5
19195echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
19196	fi
19197
19198	if test "$cf_cv_x_freetype_libs" = no ; then
19199		echo "$as_me:19199: checking for $FREETYPE_CONFIG libs" >&5
19200echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
19201		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
19202		echo "$as_me:19202: result: $cf_cv_x_freetype_libs" >&5
19203echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
19204	fi
19205fi
19206
19207if test "$cf_cv_x_freetype_incs" = no ; then
19208	cf_cv_x_freetype_incs=
19209fi
19210
19211if test "$cf_cv_x_freetype_libs" = no ; then
19212	cf_cv_x_freetype_libs=-lXft
19213fi
19214
19215echo "$as_me:19215: checking if we can link with FreeType libraries" >&5
19216echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
19217
19218cf_save_LIBS="$LIBS"
19219cf_save_INCS="$CPPFLAGS"
19220
19221cf_add_libs="$LIBS"
19222# reverse order
19223cf_add_0lib=
19224for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19225# filter duplicates
19226for cf_add_1lib in $cf_add_0lib; do
19227	for cf_add_2lib in $cf_add_libs; do
19228		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19229			cf_add_1lib=
19230			break
19231		fi
19232	done
19233	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19234done
19235LIBS="$cf_add_libs"
19236
19237CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
19238
19239cat >"conftest.$ac_ext" <<_ACEOF
19240#line 19240 "configure"
19241#include "confdefs.h"
19242
19243#include <X11/Xlib.h>
19244#include <X11/extensions/Xrender.h>
19245#include <X11/Xft/Xft.h>
19246int
19247main (void)
19248{
19249
19250	XftPattern  *pat = XftNameParse ("name"); (void)pat
19251  ;
19252  return 0;
19253}
19254_ACEOF
19255rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19256if { (eval echo "$as_me:19256: \"$ac_link\"") >&5
19257  (eval $ac_link) 2>&5
19258  ac_status=$?
19259  echo "$as_me:19259: \$? = $ac_status" >&5
19260  (exit "$ac_status"); } &&
19261         { ac_try='test -s "conftest$ac_exeext"'
19262  { (eval echo "$as_me:19262: \"$ac_try\"") >&5
19263  (eval $ac_try) 2>&5
19264  ac_status=$?
19265  echo "$as_me:19265: \$? = $ac_status" >&5
19266  (exit "$ac_status"); }; }; then
19267  cf_cv_found_freetype=yes
19268else
19269  echo "$as_me: failed program was:" >&5
19270cat "conftest.$ac_ext" >&5
19271cf_cv_found_freetype=no
19272fi
19273rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19274echo "$as_me:19274: result: $cf_cv_found_freetype" >&5
19275echo "${ECHO_T}$cf_cv_found_freetype" >&6
19276
19277LIBS="$cf_save_LIBS"
19278CPPFLAGS="$cf_save_INCS"
19279
19280if test "$cf_cv_found_freetype" = yes ; then
19281
19282cf_add_libs="$LIBS"
19283# reverse order
19284cf_add_0lib=
19285for cf_add_1lib in $cf_cv_x_freetype_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19286# filter duplicates
19287for cf_add_1lib in $cf_add_0lib; do
19288	for cf_add_2lib in $cf_add_libs; do
19289		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19290			cf_add_1lib=
19291			break
19292		fi
19293	done
19294	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19295done
19296LIBS="$cf_add_libs"
19297
19298cf_fix_cppflags=no
19299cf_new_cflags=
19300cf_new_cppflags=
19301cf_new_extra_cppflags=
19302
19303for cf_add_cflags in $cf_cv_x_freetype_incs
19304do
19305case "$cf_fix_cppflags" in
19306(no)
19307	case "$cf_add_cflags" in
19308	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19309		case "$cf_add_cflags" in
19310		(-D*)
19311			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19312
19313			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19314				&& test -z "${cf_tst_cflags}" \
19315				&& cf_fix_cppflags=yes
19316
19317			if test "$cf_fix_cppflags" = yes ; then
19318
19319	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19320	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19321
19322				continue
19323			elif test "${cf_tst_cflags}" = "\"'" ; then
19324
19325	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19326	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19327
19328				continue
19329			fi
19330			;;
19331		esac
19332		case "$CPPFLAGS" in
19333		(*$cf_add_cflags)
19334			;;
19335		(*)
19336			case "$cf_add_cflags" in
19337			(-D*)
19338				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19339
19340CPPFLAGS=`echo "$CPPFLAGS" | \
19341	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19342		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19343
19344				;;
19345			esac
19346
19347	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19348	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19349
19350			;;
19351		esac
19352		;;
19353	(*)
19354
19355	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19356	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19357
19358		;;
19359	esac
19360	;;
19361(yes)
19362
19363	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19364	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19365
19366	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19367
19368	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19369		&& test -z "${cf_tst_cflags}" \
19370		&& cf_fix_cppflags=no
19371	;;
19372esac
19373done
19374
19375if test -n "$cf_new_cflags" ; then
19376
19377	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19378	CFLAGS="${CFLAGS}$cf_new_cflags"
19379
19380fi
19381
19382if test -n "$cf_new_cppflags" ; then
19383
19384	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19385	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19386
19387fi
19388
19389if test -n "$cf_new_extra_cppflags" ; then
19390
19391	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19392	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19393
19394fi
19395
19396cat >>confdefs.h <<\EOF
19397#define XRENDERFONT 1
19398EOF
19399
19400for ac_func in \
19401	XftDrawCharSpec \
19402	XftDrawSetClip \
19403	XftDrawSetClipRectangles \
19404
19405do
19406as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19407echo "$as_me:19407: checking for $ac_func" >&5
19408echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19409if eval "test \"\${$as_ac_var+set}\" = set"; then
19410  echo $ECHO_N "(cached) $ECHO_C" >&6
19411else
19412  cat >"conftest.$ac_ext" <<_ACEOF
19413#line 19413 "configure"
19414#include "confdefs.h"
19415#define $ac_func autoconf_temporary
19416#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19417#undef $ac_func
19418
19419#ifdef __cplusplus
19420extern "C"
19421#endif
19422
19423/* We use char because int might match the return type of a gcc2
19424   builtin and then its argument prototype would still apply.  */
19425char $ac_func (void);
19426
19427int
19428main (void)
19429{
19430
19431/* The GNU C library defines stubs for functions which it implements
19432    to always fail with ENOSYS.  Some functions are actually named
19433    something starting with __ and the normal name is an alias.  */
19434#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19435#error found stub for $ac_func
19436#endif
19437
19438	return $ac_func ();
19439  ;
19440  return 0;
19441}
19442_ACEOF
19443rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19444if { (eval echo "$as_me:19444: \"$ac_link\"") >&5
19445  (eval $ac_link) 2>&5
19446  ac_status=$?
19447  echo "$as_me:19447: \$? = $ac_status" >&5
19448  (exit "$ac_status"); } &&
19449         { ac_try='test -s "conftest$ac_exeext"'
19450  { (eval echo "$as_me:19450: \"$ac_try\"") >&5
19451  (eval $ac_try) 2>&5
19452  ac_status=$?
19453  echo "$as_me:19453: \$? = $ac_status" >&5
19454  (exit "$ac_status"); }; }; then
19455  eval "$as_ac_var=yes"
19456else
19457  echo "$as_me: failed program was:" >&5
19458cat "conftest.$ac_ext" >&5
19459eval "$as_ac_var=no"
19460fi
19461rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19462fi
19463echo "$as_me:19463: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19464echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19465if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19466  cat >>confdefs.h <<EOF
19467#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19468EOF
19469
19470fi
19471done
19472
19473else
19474	{ echo "$as_me:19474: WARNING: No libraries found for FreeType" >&5
19475echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
19476	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19477fi
19478
19479# FIXME: revisit this if needed
19480
19481if test "$cf_cv_found_freetype" = yes ; then
19482echo "$as_me:19482: checking for usable Xft/fontconfig package" >&5
19483echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
19484if test "${cf_cv_xft_compat+set}" = set; then
19485  echo $ECHO_N "(cached) $ECHO_C" >&6
19486else
19487
19488cat >"conftest.$ac_ext" <<_ACEOF
19489#line 19489 "configure"
19490#include "confdefs.h"
19491
19492#include <X11/Xft/Xft.h>
19493
19494int
19495main (void)
19496{
19497
19498	XftPattern *pat = 0;
19499	XftPatternBuild(pat,
19500					XFT_FAMILY, XftTypeString, "mono",
19501					(void *) 0);
19502
19503  ;
19504  return 0;
19505}
19506_ACEOF
19507rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19508if { (eval echo "$as_me:19508: \"$ac_link\"") >&5
19509  (eval $ac_link) 2>&5
19510  ac_status=$?
19511  echo "$as_me:19511: \$? = $ac_status" >&5
19512  (exit "$ac_status"); } &&
19513         { ac_try='test -s "conftest$ac_exeext"'
19514  { (eval echo "$as_me:19514: \"$ac_try\"") >&5
19515  (eval $ac_try) 2>&5
19516  ac_status=$?
19517  echo "$as_me:19517: \$? = $ac_status" >&5
19518  (exit "$ac_status"); }; }; then
19519  cf_cv_xft_compat=yes
19520else
19521  echo "$as_me: failed program was:" >&5
19522cat "conftest.$ac_ext" >&5
19523cf_cv_xft_compat=no
19524fi
19525rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19526
19527fi
19528echo "$as_me:19528: result: $cf_cv_xft_compat" >&5
19529echo "${ECHO_T}$cf_cv_xft_compat" >&6
19530
19531if test "$cf_cv_xft_compat" = no
19532then
19533	# workaround for broken ".pc" files used for Xft.
19534	case "$cf_cv_x_freetype_libs" in
19535	(*-lfontconfig*)
19536		;;
19537	(*)
19538		test -n "$verbose" && echo "	work around broken package" 1>&6
19539
19540echo "${as_me:-configure}:19540: testing work around broken package ..." 1>&5
19541
19542		cf_save_fontconfig="$LIBS"
19543
19544if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "fontconfig"; then
19545	test -n "$verbose" && echo "	found package fontconfig" 1>&6
19546
19547echo "${as_me:-configure}:19547: testing found package fontconfig ..." 1>&5
19548
19549	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "fontconfig" 2>/dev/null`"
19550	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "fontconfig" 2>/dev/null`"
19551	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
19552
19553echo "${as_me:-configure}:19553: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19554
19555	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
19556
19557echo "${as_me:-configure}:19557: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
19558
19559cf_fix_cppflags=no
19560cf_new_cflags=
19561cf_new_cppflags=
19562cf_new_extra_cppflags=
19563
19564for cf_add_cflags in $cf_pkgconfig_incs
19565do
19566case "$cf_fix_cppflags" in
19567(no)
19568	case "$cf_add_cflags" in
19569	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19570		case "$cf_add_cflags" in
19571		(-D*)
19572			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19573
19574			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19575				&& test -z "${cf_tst_cflags}" \
19576				&& cf_fix_cppflags=yes
19577
19578			if test "$cf_fix_cppflags" = yes ; then
19579
19580	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19581	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19582
19583				continue
19584			elif test "${cf_tst_cflags}" = "\"'" ; then
19585
19586	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19587	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19588
19589				continue
19590			fi
19591			;;
19592		esac
19593		case "$CPPFLAGS" in
19594		(*$cf_add_cflags)
19595			;;
19596		(*)
19597			case "$cf_add_cflags" in
19598			(-D*)
19599				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19600
19601CPPFLAGS=`echo "$CPPFLAGS" | \
19602	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19603		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19604
19605				;;
19606			esac
19607
19608	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19609	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19610
19611			;;
19612		esac
19613		;;
19614	(*)
19615
19616	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19617	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19618
19619		;;
19620	esac
19621	;;
19622(yes)
19623
19624	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19625	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19626
19627	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19628
19629	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19630		&& test -z "${cf_tst_cflags}" \
19631		&& cf_fix_cppflags=no
19632	;;
19633esac
19634done
19635
19636if test -n "$cf_new_cflags" ; then
19637
19638	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19639	CFLAGS="${CFLAGS}$cf_new_cflags"
19640
19641fi
19642
19643if test -n "$cf_new_cppflags" ; then
19644
19645	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19646	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19647
19648fi
19649
19650if test -n "$cf_new_extra_cppflags" ; then
19651
19652	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19653	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19654
19655fi
19656
19657cf_add_libs="$LIBS"
19658# reverse order
19659cf_add_0lib=
19660for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19661# filter duplicates
19662for cf_add_1lib in $cf_add_0lib; do
19663	for cf_add_2lib in $cf_add_libs; do
19664		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19665			cf_add_1lib=
19666			break
19667		fi
19668	done
19669	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19670done
19671LIBS="$cf_add_libs"
19672
19673cf_fix_cppflags=no
19674cf_new_cflags=
19675cf_new_cppflags=
19676cf_new_extra_cppflags=
19677
19678for cf_add_cflags in $cf_pkgconfig_incs
19679do
19680case "$cf_fix_cppflags" in
19681(no)
19682	case "$cf_add_cflags" in
19683	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19684		case "$cf_add_cflags" in
19685		(-D*)
19686			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19687
19688			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19689				&& test -z "${cf_tst_cflags}" \
19690				&& cf_fix_cppflags=yes
19691
19692			if test "$cf_fix_cppflags" = yes ; then
19693
19694	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19695	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19696
19697				continue
19698			elif test "${cf_tst_cflags}" = "\"'" ; then
19699
19700	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19701	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19702
19703				continue
19704			fi
19705			;;
19706		esac
19707		case "$CPPFLAGS" in
19708		(*$cf_add_cflags)
19709			;;
19710		(*)
19711			case "$cf_add_cflags" in
19712			(-D*)
19713				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19714
19715CPPFLAGS=`echo "$CPPFLAGS" | \
19716	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19717		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19718
19719				;;
19720			esac
19721
19722	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19723	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19724
19725			;;
19726		esac
19727		;;
19728	(*)
19729
19730	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19731	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19732
19733		;;
19734	esac
19735	;;
19736(yes)
19737
19738	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19739	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19740
19741	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19742
19743	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19744		&& test -z "${cf_tst_cflags}" \
19745		&& cf_fix_cppflags=no
19746	;;
19747esac
19748done
19749
19750if test -n "$cf_new_cflags" ; then
19751
19752	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19753	CFLAGS="${CFLAGS}$cf_new_cflags"
19754
19755fi
19756
19757if test -n "$cf_new_cppflags" ; then
19758
19759	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19760	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19761
19762fi
19763
19764if test -n "$cf_new_extra_cppflags" ; then
19765
19766	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19767	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19768
19769fi
19770
19771				LIBS="$cf_save_fontconfig"
19772
19773test -n "$verbose" && echo "	...before $LIBS" 1>&6
19774
19775echo "${as_me:-configure}:19775: testing ...before $LIBS ..." 1>&5
19776
19777LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
19778test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19779
19780echo "${as_me:-configure}:19780: testing ...after  $LIBS ..." 1>&5
19781
19782else
19783	cf_pkgconfig_incs=
19784	cf_pkgconfig_libs=
19785
19786test -n "$verbose" && echo "	...before $LIBS" 1>&6
19787
19788echo "${as_me:-configure}:19788: testing ...before $LIBS ..." 1>&5
19789
19790LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
19791test -n "$verbose" && echo "	...after  $LIBS" 1>&6
19792
19793echo "${as_me:-configure}:19793: testing ...after  $LIBS ..." 1>&5
19794
19795fi
19796
19797		;;
19798	esac
19799fi
19800fi
19801
19802else
19803	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
19804fi
19805
19806echo "$as_me:19806: checking if you want support for HP-style function keys" >&5
19807echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
19808
19809# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
19810if test "${enable_hp_fkeys+set}" = set; then
19811  enableval="$enable_hp_fkeys"
19812  test "$enableval" != yes && enableval=no
19813	if test "$enableval" != "no" ; then
19814    enable_hp_fkeys=yes
19815	else
19816		enable_hp_fkeys=no
19817	fi
19818else
19819  enableval=no
19820	enable_hp_fkeys=no
19821
19822fi;
19823echo "$as_me:19823: result: $enable_hp_fkeys" >&5
19824echo "${ECHO_T}$enable_hp_fkeys" >&6
19825if test "$enable_hp_fkeys" = yes ; then
19826
19827cat >>confdefs.h <<\EOF
19828#define OPT_HP_FUNC_KEYS 1
19829EOF
19830
19831fi
19832
19833echo "$as_me:19833: checking if you want support for SCO-style function keys" >&5
19834echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
19835
19836# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
19837if test "${enable_sco_fkeys+set}" = set; then
19838  enableval="$enable_sco_fkeys"
19839  test "$enableval" != yes && enableval=no
19840	if test "$enableval" != "no" ; then
19841    enable_sco_fkeys=yes
19842	else
19843		enable_sco_fkeys=no
19844	fi
19845else
19846  enableval=no
19847	enable_sco_fkeys=no
19848
19849fi;
19850echo "$as_me:19850: result: $enable_sco_fkeys" >&5
19851echo "${ECHO_T}$enable_sco_fkeys" >&6
19852if test "$enable_sco_fkeys" = yes ; then
19853
19854cat >>confdefs.h <<\EOF
19855#define OPT_SCO_FUNC_KEYS 1
19856EOF
19857
19858fi
19859
19860echo "$as_me:19860: checking if you want support for Sun-style function keys" >&5
19861echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
19862
19863# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
19864if test "${enable_sun_fkeys+set}" = set; then
19865  enableval="$enable_sun_fkeys"
19866  test "$enableval" != no && enableval=yes
19867	if test "$enableval" != "yes" ; then
19868    enable_sun_fkeys=no
19869	else
19870		enable_sun_fkeys=yes
19871	fi
19872else
19873  enableval=yes
19874	enable_sun_fkeys=yes
19875
19876fi;
19877echo "$as_me:19877: result: $enable_sun_fkeys" >&5
19878echo "${ECHO_T}$enable_sun_fkeys" >&6
19879if test "$enable_sun_fkeys" = no ; then
19880
19881cat >>confdefs.h <<\EOF
19882#define OPT_SUN_FUNC_KEYS 0
19883EOF
19884
19885fi
19886
19887echo "$as_me:19887: checking if you want saved-lines stored as a FIFO" >&5
19888echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
19889
19890# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
19891if test "${enable_fifo_lines+set}" = set; then
19892  enableval="$enable_fifo_lines"
19893  test "$enableval" != no && enableval=yes
19894	if test "$enableval" != "yes" ; then
19895    enable_fifo_lines=no
19896	else
19897		enable_fifo_lines=yes
19898	fi
19899else
19900  enableval=yes
19901	enable_fifo_lines=yes
19902
19903fi;
19904echo "$as_me:19904: result: $enable_fifo_lines" >&5
19905echo "${ECHO_T}$enable_fifo_lines" >&6
19906if test "$enable_fifo_lines" != yes ; then
19907	{ echo "$as_me:19907: WARNING: this option has been deprecated" >&5
19908echo "$as_me: WARNING: this option has been deprecated" >&2;}
19909fi
19910
19911echo "$as_me:19911: checking if you want support for internationalization" >&5
19912echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
19913
19914# Check whether --enable-i18n or --disable-i18n was given.
19915if test "${enable_i18n+set}" = set; then
19916  enableval="$enable_i18n"
19917  test "$enableval" != no && enableval=yes
19918	if test "$enableval" != "yes" ; then
19919    enable_i18n=no
19920	else
19921		enable_i18n=yes
19922	fi
19923else
19924  enableval=yes
19925	enable_i18n=yes
19926
19927fi;
19928echo "$as_me:19928: result: $enable_i18n" >&5
19929echo "${ECHO_T}$enable_i18n" >&6
19930if test "$enable_i18n" = no ; then
19931
19932cat >>confdefs.h <<\EOF
19933#define OPT_I18N_SUPPORT 0
19934EOF
19935
19936fi
19937
19938echo "$as_me:19938: checking if you want support for initial-erase setup" >&5
19939echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
19940
19941# Check whether --enable-initial-erase or --disable-initial-erase was given.
19942if test "${enable_initial_erase+set}" = set; then
19943  enableval="$enable_initial_erase"
19944  test "$enableval" != no && enableval=yes
19945	if test "$enableval" != "yes" ; then
19946    enable_ie=no
19947	else
19948		enable_ie=yes
19949	fi
19950else
19951  enableval=yes
19952	enable_ie=yes
19953
19954fi;
19955echo "$as_me:19955: result: $enable_ie" >&5
19956echo "${ECHO_T}$enable_ie" >&6
19957if test "$enable_ie" = no ; then
19958
19959cat >>confdefs.h <<\EOF
19960#define OPT_INITIAL_ERASE 0
19961EOF
19962
19963fi
19964
19965echo "$as_me:19965: checking if you want support for input-method" >&5
19966echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
19967
19968# Check whether --enable-input-method or --disable-input-method was given.
19969if test "${enable_input_method+set}" = set; then
19970  enableval="$enable_input_method"
19971  test "$enableval" != no && enableval=yes
19972	if test "$enableval" != "yes" ; then
19973    enable_ximp=no
19974	else
19975		enable_ximp=$enable_i18n
19976	fi
19977else
19978  enableval=yes
19979	enable_ximp=$enable_i18n
19980
19981fi;
19982echo "$as_me:19982: result: $enable_ximp" >&5
19983echo "${ECHO_T}$enable_ximp" >&6
19984
19985echo "$as_me:19985: checking if X libraries support input-method" >&5
19986echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
19987if test "${cf_cv_input_method+set}" = set; then
19988  echo $ECHO_N "(cached) $ECHO_C" >&6
19989else
19990
19991cat >"conftest.$ac_ext" <<_ACEOF
19992#line 19992 "configure"
19993#include "confdefs.h"
19994
19995#include <X11/IntrinsicP.h>
19996#include <X11/Xatom.h>
19997#include <X11/Xutil.h>
19998#include <X11/Xmu/Atoms.h>
19999#include <X11/Xmu/Converters.h>
20000#include <X11/Xaw/XawImP.h>
20001
20002int
20003main (void)
20004{
20005
20006{
20007	XIM xim;
20008	XIMStyles *xim_styles = 0;
20009	XIMStyle input_style;
20010	Widget w = XtCreateWidget("none", (WidgetClass)0, None, (ArgList)0, 0);
20011
20012	XSetLocaleModifiers("@im=none");
20013	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
20014	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
20015	XCloseIM(xim);
20016	input_style = (XIMPreeditNothing | XIMStatusNothing);
20017	(void)xim_styles;
20018	(void)input_style;
20019}
20020
20021  ;
20022  return 0;
20023}
20024_ACEOF
20025rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20026if { (eval echo "$as_me:20026: \"$ac_link\"") >&5
20027  (eval $ac_link) 2>&5
20028  ac_status=$?
20029  echo "$as_me:20029: \$? = $ac_status" >&5
20030  (exit "$ac_status"); } &&
20031         { ac_try='test -s "conftest$ac_exeext"'
20032  { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033  (eval $ac_try) 2>&5
20034  ac_status=$?
20035  echo "$as_me:20035: \$? = $ac_status" >&5
20036  (exit "$ac_status"); }; }; then
20037  cf_cv_input_method=yes
20038else
20039  echo "$as_me: failed program was:" >&5
20040cat "conftest.$ac_ext" >&5
20041cf_cv_input_method=no
20042fi
20043rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20044fi
20045echo "$as_me:20045: result: $cf_cv_input_method" >&5
20046echo "${ECHO_T}$cf_cv_input_method" >&6
20047
20048test "$cf_cv_input_method" = no && enable_ximp=no
20049if test "$enable_ximp" != no ; then
20050	if test "$enable_i18n" = no ; then
20051		{ echo "$as_me:20051: WARNING: input-methor relies upon internationalization" >&5
20052echo "$as_me: WARNING: input-methor relies upon internationalization" >&2;}
20053		enable_ximp=no
20054	fi
20055fi
20056if test "$enable_ximp" = no ; then
20057
20058cat >>confdefs.h <<\EOF
20059#define OPT_INPUT_METHOD 0
20060EOF
20061
20062fi
20063
20064echo "$as_me:20064: checking if you want support for load-vt-fonts" >&5
20065echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
20066
20067# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
20068if test "${enable_load_vt_fonts+set}" = set; then
20069  enableval="$enable_load_vt_fonts"
20070  test "$enableval" != yes && enableval=no
20071	if test "$enableval" != "no" ; then
20072    enable_load_vt_fonts=yes
20073	else
20074		enable_load_vt_fonts=no
20075	fi
20076else
20077  enableval=no
20078	enable_load_vt_fonts=no
20079
20080fi;
20081echo "$as_me:20081: result: $enable_load_vt_fonts" >&5
20082echo "${ECHO_T}$enable_load_vt_fonts" >&6
20083if test "$enable_load_vt_fonts" = yes ; then
20084
20085cat >>confdefs.h <<\EOF
20086#define OPT_LOAD_VTFONTS 1
20087EOF
20088
20089fi
20090
20091echo "$as_me:20091: checking if you want support for logging" >&5
20092echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
20093
20094# Check whether --enable-logging or --disable-logging was given.
20095if test "${enable_logging+set}" = set; then
20096  enableval="$enable_logging"
20097  test "$enableval" != yes && enableval=no
20098	if test "$enableval" != "no" ; then
20099    enable_logging=yes
20100	else
20101		enable_logging=no
20102	fi
20103else
20104  enableval=no
20105	enable_logging=no
20106
20107fi;
20108echo "$as_me:20108: result: $enable_logging" >&5
20109echo "${ECHO_T}$enable_logging" >&6
20110if test "$enable_logging" = yes ; then
20111
20112cat >>confdefs.h <<\EOF
20113#define ALLOWLOGGING 1
20114EOF
20115
20116	echo "$as_me:20116: checking if you want to allow logging via a pipe" >&5
20117echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
20118
20119# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
20120if test "${enable_logfile_exec+set}" = set; then
20121  enableval="$enable_logfile_exec"
20122  test "$enableval" != yes && enableval=no
20123	if test "$enableval" != "no" ; then
20124    enable_log_exec=yes
20125	else
20126		enable_log_exec=no
20127	fi
20128else
20129  enableval=no
20130	enable_log_exec=no
20131
20132fi;
20133	echo "$as_me:20133: result: $enable_log_exec" >&5
20134echo "${ECHO_T}$enable_log_exec" >&6
20135	if test "$enable_log_exec" = yes ; then
20136
20137cat >>confdefs.h <<\EOF
20138#define ALLOWLOGFILEEXEC 1
20139EOF
20140
20141	fi
20142fi
20143
20144echo "$as_me:20144: checking if you want support for iconify/maximize translations" >&5
20145echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
20146
20147# Check whether --enable-maximize or --disable-maximize was given.
20148if test "${enable_maximize+set}" = set; then
20149  enableval="$enable_maximize"
20150  test "$enableval" != no && enableval=yes
20151	if test "$enableval" != "yes" ; then
20152    enable_maximize=no
20153	else
20154		enable_maximize=yes
20155	fi
20156else
20157  enableval=yes
20158	enable_maximize=yes
20159
20160fi;
20161echo "$as_me:20161: result: $enable_maximize" >&5
20162echo "${ECHO_T}$enable_maximize" >&6
20163test "$enable_maximize" = no &&
20164cat >>confdefs.h <<\EOF
20165#define OPT_MAXIMIZE 0
20166EOF
20167
20168echo "$as_me:20168: checking if you want NumLock to override keyboard tables" >&5
20169echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
20170
20171# Check whether --enable-num-lock or --disable-num-lock was given.
20172if test "${enable_num_lock+set}" = set; then
20173  enableval="$enable_num_lock"
20174  test "$enableval" != no && enableval=yes
20175	if test "$enableval" != "yes" ; then
20176    enable_numlock=no
20177	else
20178		enable_numlock=yes
20179	fi
20180else
20181  enableval=yes
20182	enable_numlock=yes
20183
20184fi;
20185echo "$as_me:20185: result: $enable_numlock" >&5
20186echo "${ECHO_T}$enable_numlock" >&6
20187test "$enable_numlock" = no &&
20188cat >>confdefs.h <<\EOF
20189#define OPT_NUM_LOCK 0
20190EOF
20191
20192echo "$as_me:20192: checking if you want support for get/set of base64 selection data" >&5
20193echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
20194
20195# Check whether --enable-paste64 or --disable-paste64 was given.
20196if test "${enable_paste64+set}" = set; then
20197  enableval="$enable_paste64"
20198  test "$enableval" != no && enableval=yes
20199	if test "$enableval" != "yes" ; then
20200    enable_paste64=no
20201	else
20202		enable_paste64=yes
20203	fi
20204else
20205  enableval=yes
20206	enable_paste64=yes
20207
20208fi;
20209echo "$as_me:20209: result: $enable_paste64" >&5
20210echo "${ECHO_T}$enable_paste64" >&6
20211if test "$enable_paste64" = yes ; then
20212
20213cat >>confdefs.h <<\EOF
20214#define OPT_PASTE64 1
20215EOF
20216
20217else
20218
20219cat >>confdefs.h <<\EOF
20220#define OPT_PASTE64 0
20221EOF
20222
20223fi
20224
20225echo "$as_me:20225: checking if you want support for pty-handshaking" >&5
20226echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
20227
20228# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
20229if test "${enable_pty_handshake+set}" = set; then
20230  enableval="$enable_pty_handshake"
20231  test "$enableval" != no && enableval=yes
20232	if test "$enableval" != "yes" ; then
20233    enable_pty_handshake=no
20234	else
20235		enable_pty_handshake=yes
20236	fi
20237else
20238  enableval=yes
20239	enable_pty_handshake=yes
20240
20241fi;
20242echo "$as_me:20242: result: $enable_pty_handshake" >&5
20243echo "${ECHO_T}$enable_pty_handshake" >&6
20244if test "$enable_pty_handshake" = yes ; then
20245
20246cat >>confdefs.h <<\EOF
20247#define OPT_PTY_HANDSHAKE 1
20248EOF
20249
20250else
20251
20252cat >>confdefs.h <<\EOF
20253#define OPT_PTY_HANDSHAKE 0
20254EOF
20255
20256fi
20257
20258echo "$as_me:20258: checking if you want support for mouse in readline applications" >&5
20259echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
20260
20261# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
20262if test "${enable_readline_mouse+set}" = set; then
20263  enableval="$enable_readline_mouse"
20264  test "$enableval" != yes && enableval=no
20265	if test "$enableval" != "no" ; then
20266    enable_readline_mouse=yes
20267	else
20268		enable_readline_mouse=no
20269	fi
20270else
20271  enableval=no
20272	enable_readline_mouse=no
20273
20274fi;
20275echo "$as_me:20275: result: $enable_readline_mouse" >&5
20276echo "${ECHO_T}$enable_readline_mouse" >&6
20277if test "$enable_readline_mouse" = yes ; then
20278
20279cat >>confdefs.h <<\EOF
20280#define OPT_READLINE 1
20281EOF
20282
20283fi
20284
20285echo "$as_me:20285: checking if you want support for regular-expression selections" >&5
20286echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
20287
20288# Check whether --enable-regex or --disable-regex was given.
20289if test "${enable_regex+set}" = set; then
20290  enableval="$enable_regex"
20291  test "$enableval" != no && enableval=yes
20292	if test "$enableval" != "yes" ; then
20293    enable_regex=no
20294	else
20295		enable_regex=yes
20296	fi
20297else
20298  enableval=yes
20299	enable_regex=yes
20300
20301fi;
20302echo "$as_me:20302: result: $enable_regex" >&5
20303echo "${ECHO_T}$enable_regex" >&6
20304if test "$enable_regex" = yes ; then
20305
20306echo "$as_me:20306: checking if you want to use PCRE2 for regular-expressions" >&5
20307echo $ECHO_N "checking if you want to use PCRE2 for regular-expressions... $ECHO_C" >&6
20308
20309# Check whether --with-pcre2 or --without-pcre2 was given.
20310if test "${with_pcre2+set}" = set; then
20311  withval="$with_pcre2"
20312
20313fi;
20314test -z "$with_pcre2" && with_pcre2=no
20315echo "$as_me:20315: result: $with_pcre2" >&5
20316echo "${ECHO_T}$with_pcre2" >&6
20317
20318if test "x$with_pcre2" != xno ; then
20319	cf_with_pcre2_ok=no
20320	for cf_with_pcre2 in libpcre2 libpcre2-posix libpcre
20321	do
20322
20323if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_with_pcre2"; then
20324	test -n "$verbose" && echo "	found package $cf_with_pcre2" 1>&6
20325
20326echo "${as_me:-configure}:20326: testing found package $cf_with_pcre2 ..." 1>&5
20327
20328	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_with_pcre2" 2>/dev/null`"
20329	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_with_pcre2" 2>/dev/null`"
20330	test -n "$verbose" && echo "	package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
20331
20332echo "${as_me:-configure}:20332: testing package $cf_with_pcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20333
20334	test -n "$verbose" && echo "	package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs" 1>&6
20335
20336echo "${as_me:-configure}:20336: testing package $cf_with_pcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
20337
20338cf_fix_cppflags=no
20339cf_new_cflags=
20340cf_new_cppflags=
20341cf_new_extra_cppflags=
20342
20343for cf_add_cflags in $cf_pkgconfig_incs
20344do
20345case "$cf_fix_cppflags" in
20346(no)
20347	case "$cf_add_cflags" in
20348	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20349		case "$cf_add_cflags" in
20350		(-D*)
20351			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20352
20353			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20354				&& test -z "${cf_tst_cflags}" \
20355				&& cf_fix_cppflags=yes
20356
20357			if test "$cf_fix_cppflags" = yes ; then
20358
20359	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20360	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20361
20362				continue
20363			elif test "${cf_tst_cflags}" = "\"'" ; then
20364
20365	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20366	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20367
20368				continue
20369			fi
20370			;;
20371		esac
20372		case "$CPPFLAGS" in
20373		(*$cf_add_cflags)
20374			;;
20375		(*)
20376			case "$cf_add_cflags" in
20377			(-D*)
20378				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20379
20380CPPFLAGS=`echo "$CPPFLAGS" | \
20381	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20382		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20383
20384				;;
20385			esac
20386
20387	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20388	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20389
20390			;;
20391		esac
20392		;;
20393	(*)
20394
20395	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20396	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20397
20398		;;
20399	esac
20400	;;
20401(yes)
20402
20403	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20404	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20405
20406	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20407
20408	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20409		&& test -z "${cf_tst_cflags}" \
20410		&& cf_fix_cppflags=no
20411	;;
20412esac
20413done
20414
20415if test -n "$cf_new_cflags" ; then
20416
20417	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20418	CFLAGS="${CFLAGS}$cf_new_cflags"
20419
20420fi
20421
20422if test -n "$cf_new_cppflags" ; then
20423
20424	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20425	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20426
20427fi
20428
20429if test -n "$cf_new_extra_cppflags" ; then
20430
20431	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20432	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20433
20434fi
20435
20436cf_add_libs="$LIBS"
20437# reverse order
20438cf_add_0lib=
20439for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20440# filter duplicates
20441for cf_add_1lib in $cf_add_0lib; do
20442	for cf_add_2lib in $cf_add_libs; do
20443		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20444			cf_add_1lib=
20445			break
20446		fi
20447	done
20448	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20449done
20450LIBS="$cf_add_libs"
20451
20452	cf_with_pcre2_ok=yes; break
20453else
20454	cf_pkgconfig_incs=
20455	cf_pkgconfig_libs=
20456	:
20457fi
20458
20459	done
20460	cf_with_pcre2_ok=yes || { { echo "$as_me:20460: error: Cannot find PCRE2 library" >&5
20461echo "$as_me: error: Cannot find PCRE2 library" >&2;}
20462   { (exit 1); exit 1; }; }
20463
20464cat >>confdefs.h <<\EOF
20465#define HAVE_LIB_PCRE2 1
20466EOF
20467
20468	# if pkgconfig gave no results, look for the libraries directly
20469	case "$LIBS" in
20470	(*pcre2-posix*|*pcreposix*)
20471		;;
20472	(*)
20473		echo "$as_me:20473: checking for regcomp in -lpcre2-posix" >&5
20474echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
20475if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
20476  echo $ECHO_N "(cached) $ECHO_C" >&6
20477else
20478  ac_check_lib_save_LIBS=$LIBS
20479LIBS="-lpcre2-posix  $LIBS"
20480cat >"conftest.$ac_ext" <<_ACEOF
20481#line 20481 "configure"
20482#include "confdefs.h"
20483
20484/* Override any gcc2 internal prototype to avoid an error.  */
20485#ifdef __cplusplus
20486extern "C"
20487#endif
20488/* We use char because int might match the return type of a gcc2
20489   builtin and then its argument prototype would still apply.  */
20490char regcomp ();
20491int
20492main (void)
20493{
20494regcomp ();
20495  ;
20496  return 0;
20497}
20498_ACEOF
20499rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20500if { (eval echo "$as_me:20500: \"$ac_link\"") >&5
20501  (eval $ac_link) 2>&5
20502  ac_status=$?
20503  echo "$as_me:20503: \$? = $ac_status" >&5
20504  (exit "$ac_status"); } &&
20505         { ac_try='test -s "conftest$ac_exeext"'
20506  { (eval echo "$as_me:20506: \"$ac_try\"") >&5
20507  (eval $ac_try) 2>&5
20508  ac_status=$?
20509  echo "$as_me:20509: \$? = $ac_status" >&5
20510  (exit "$ac_status"); }; }; then
20511  ac_cv_lib_pcre2_posix_regcomp=yes
20512else
20513  echo "$as_me: failed program was:" >&5
20514cat "conftest.$ac_ext" >&5
20515ac_cv_lib_pcre2_posix_regcomp=no
20516fi
20517rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20518LIBS=$ac_check_lib_save_LIBS
20519fi
20520echo "$as_me:20520: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
20521echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
20522if test "$ac_cv_lib_pcre2_posix_regcomp" = yes; then
20523
20524cf_add_libs="$LIBS"
20525# reverse order
20526cf_add_0lib=
20527for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20528# filter duplicates
20529for cf_add_1lib in $cf_add_0lib; do
20530	for cf_add_2lib in $cf_add_libs; do
20531		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20532			cf_add_1lib=
20533			break
20534		fi
20535	done
20536	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20537done
20538LIBS="$cf_add_libs"
20539
20540else
20541  echo "$as_me:20541: checking for regcomp in -lpcreposix" >&5
20542echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
20543if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
20544  echo $ECHO_N "(cached) $ECHO_C" >&6
20545else
20546  ac_check_lib_save_LIBS=$LIBS
20547LIBS="-lpcreposix  $LIBS"
20548cat >"conftest.$ac_ext" <<_ACEOF
20549#line 20549 "configure"
20550#include "confdefs.h"
20551
20552/* Override any gcc2 internal prototype to avoid an error.  */
20553#ifdef __cplusplus
20554extern "C"
20555#endif
20556/* We use char because int might match the return type of a gcc2
20557   builtin and then its argument prototype would still apply.  */
20558char regcomp ();
20559int
20560main (void)
20561{
20562regcomp ();
20563  ;
20564  return 0;
20565}
20566_ACEOF
20567rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20568if { (eval echo "$as_me:20568: \"$ac_link\"") >&5
20569  (eval $ac_link) 2>&5
20570  ac_status=$?
20571  echo "$as_me:20571: \$? = $ac_status" >&5
20572  (exit "$ac_status"); } &&
20573         { ac_try='test -s "conftest$ac_exeext"'
20574  { (eval echo "$as_me:20574: \"$ac_try\"") >&5
20575  (eval $ac_try) 2>&5
20576  ac_status=$?
20577  echo "$as_me:20577: \$? = $ac_status" >&5
20578  (exit "$ac_status"); }; }; then
20579  ac_cv_lib_pcreposix_regcomp=yes
20580else
20581  echo "$as_me: failed program was:" >&5
20582cat "conftest.$ac_ext" >&5
20583ac_cv_lib_pcreposix_regcomp=no
20584fi
20585rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20586LIBS=$ac_check_lib_save_LIBS
20587fi
20588echo "$as_me:20588: result: $ac_cv_lib_pcreposix_regcomp" >&5
20589echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
20590if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
20591
20592cf_add_libs="$LIBS"
20593# reverse order
20594cf_add_0lib=
20595for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20596# filter duplicates
20597for cf_add_1lib in $cf_add_0lib; do
20598	for cf_add_2lib in $cf_add_libs; do
20599		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20600			cf_add_1lib=
20601			break
20602		fi
20603	done
20604	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20605done
20606LIBS="$cf_add_libs"
20607
20608else
20609  { { echo "$as_me:20609: error: Cannot find PCRE2 POSIX library" >&5
20610echo "$as_me: error: Cannot find PCRE2 POSIX library" >&2;}
20611   { (exit 1); exit 1; }; }
20612fi
20613
20614fi
20615
20616		;;
20617	esac
20618
20619	# either way, check for the library header files
20620
20621for ac_header in pcre2posix.h pcreposix.h
20622do
20623as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
20624echo "$as_me:20624: checking for $ac_header" >&5
20625echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
20626if eval "test \"\${$as_ac_Header+set}\" = set"; then
20627  echo $ECHO_N "(cached) $ECHO_C" >&6
20628else
20629  cat >"conftest.$ac_ext" <<_ACEOF
20630#line 20630 "configure"
20631#include "confdefs.h"
20632#include <$ac_header>
20633_ACEOF
20634if { (eval echo "$as_me:20634: \"$ac_cpp "conftest.$ac_ext"\"") >&5
20635  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
20636  ac_status=$?
20637  $EGREP -v '^ *\+' conftest.er1 >conftest.err
20638  rm -f conftest.er1
20639  cat conftest.err >&5
20640  echo "$as_me:20640: \$? = $ac_status" >&5
20641  (exit "$ac_status"); } >/dev/null; then
20642  if test -s conftest.err; then
20643    ac_cpp_err=$ac_c_preproc_warn_flag
20644  else
20645    ac_cpp_err=
20646  fi
20647else
20648  ac_cpp_err=yes
20649fi
20650if test -z "$ac_cpp_err"; then
20651  eval "$as_ac_Header=yes"
20652else
20653  echo "$as_me: failed program was:" >&5
20654  cat "conftest.$ac_ext" >&5
20655  eval "$as_ac_Header=no"
20656fi
20657rm -f conftest.err "conftest.$ac_ext"
20658fi
20659echo "$as_me:20659: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
20660echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
20661if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
20662  cat >>confdefs.h <<EOF
20663#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
20664EOF
20665
20666fi
20667done
20668
20669for ac_func in PCRE2regcomp
20670do
20671as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20672echo "$as_me:20672: checking for $ac_func" >&5
20673echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20674if eval "test \"\${$as_ac_var+set}\" = set"; then
20675  echo $ECHO_N "(cached) $ECHO_C" >&6
20676else
20677  cat >"conftest.$ac_ext" <<_ACEOF
20678#line 20678 "configure"
20679#include "confdefs.h"
20680#define $ac_func autoconf_temporary
20681#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20682#undef $ac_func
20683
20684#ifdef __cplusplus
20685extern "C"
20686#endif
20687
20688/* We use char because int might match the return type of a gcc2
20689   builtin and then its argument prototype would still apply.  */
20690char $ac_func (void);
20691
20692int
20693main (void)
20694{
20695
20696/* The GNU C library defines stubs for functions which it implements
20697    to always fail with ENOSYS.  Some functions are actually named
20698    something starting with __ and the normal name is an alias.  */
20699#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20700#error found stub for $ac_func
20701#endif
20702
20703	return $ac_func ();
20704  ;
20705  return 0;
20706}
20707_ACEOF
20708rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20709if { (eval echo "$as_me:20709: \"$ac_link\"") >&5
20710  (eval $ac_link) 2>&5
20711  ac_status=$?
20712  echo "$as_me:20712: \$? = $ac_status" >&5
20713  (exit "$ac_status"); } &&
20714         { ac_try='test -s "conftest$ac_exeext"'
20715  { (eval echo "$as_me:20715: \"$ac_try\"") >&5
20716  (eval $ac_try) 2>&5
20717  ac_status=$?
20718  echo "$as_me:20718: \$? = $ac_status" >&5
20719  (exit "$ac_status"); }; }; then
20720  eval "$as_ac_var=yes"
20721else
20722  echo "$as_me: failed program was:" >&5
20723cat "conftest.$ac_ext" >&5
20724eval "$as_ac_var=no"
20725fi
20726rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20727fi
20728echo "$as_me:20728: result: `eval echo '${'"$as_ac_var"'}'`" >&5
20729echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
20730if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
20731  cat >>confdefs.h <<EOF
20732#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20733EOF
20734
20735fi
20736done
20737
20738fi
20739
20740	if test "$with_pcre2" = no ; then
20741
20742echo "$as_me:20742: checking if you want to use PCRE for regular-expressions" >&5
20743echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
20744
20745# Check whether --with-pcre or --without-pcre was given.
20746if test "${with_pcre+set}" = set; then
20747  withval="$with_pcre"
20748
20749fi;
20750test -z "$with_pcre" && with_pcre=no
20751echo "$as_me:20751: result: $with_pcre" >&5
20752echo "${ECHO_T}$with_pcre" >&6
20753
20754if test "$with_pcre" != no ; then
20755
20756if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "libpcre"; then
20757	test -n "$verbose" && echo "	found package libpcre" 1>&6
20758
20759echo "${as_me:-configure}:20759: testing found package libpcre ..." 1>&5
20760
20761	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "libpcre" 2>/dev/null`"
20762	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "libpcre" 2>/dev/null`"
20763	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
20764
20765echo "${as_me:-configure}:20765: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
20766
20767	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
20768
20769echo "${as_me:-configure}:20769: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
20770
20771cf_fix_cppflags=no
20772cf_new_cflags=
20773cf_new_cppflags=
20774cf_new_extra_cppflags=
20775
20776for cf_add_cflags in $cf_pkgconfig_incs
20777do
20778case "$cf_fix_cppflags" in
20779(no)
20780	case "$cf_add_cflags" in
20781	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20782		case "$cf_add_cflags" in
20783		(-D*)
20784			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20785
20786			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20787				&& test -z "${cf_tst_cflags}" \
20788				&& cf_fix_cppflags=yes
20789
20790			if test "$cf_fix_cppflags" = yes ; then
20791
20792	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20793	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20794
20795				continue
20796			elif test "${cf_tst_cflags}" = "\"'" ; then
20797
20798	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20799	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20800
20801				continue
20802			fi
20803			;;
20804		esac
20805		case "$CPPFLAGS" in
20806		(*$cf_add_cflags)
20807			;;
20808		(*)
20809			case "$cf_add_cflags" in
20810			(-D*)
20811				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20812
20813CPPFLAGS=`echo "$CPPFLAGS" | \
20814	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20815		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20816
20817				;;
20818			esac
20819
20820	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20821	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20822
20823			;;
20824		esac
20825		;;
20826	(*)
20827
20828	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20829	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20830
20831		;;
20832	esac
20833	;;
20834(yes)
20835
20836	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20837	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20838
20839	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20840
20841	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20842		&& test -z "${cf_tst_cflags}" \
20843		&& cf_fix_cppflags=no
20844	;;
20845esac
20846done
20847
20848if test -n "$cf_new_cflags" ; then
20849
20850	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20851	CFLAGS="${CFLAGS}$cf_new_cflags"
20852
20853fi
20854
20855if test -n "$cf_new_cppflags" ; then
20856
20857	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20858	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20859
20860fi
20861
20862if test -n "$cf_new_extra_cppflags" ; then
20863
20864	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20865	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20866
20867fi
20868
20869cf_add_libs="$LIBS"
20870# reverse order
20871cf_add_0lib=
20872for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20873# filter duplicates
20874for cf_add_1lib in $cf_add_0lib; do
20875	for cf_add_2lib in $cf_add_libs; do
20876		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20877			cf_add_1lib=
20878			break
20879		fi
20880	done
20881	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20882done
20883LIBS="$cf_add_libs"
20884
20885	:
20886else
20887	cf_pkgconfig_incs=
20888	cf_pkgconfig_libs=
20889
20890echo "$as_me:20890: checking for pcre_compile in -lpcre" >&5
20891echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
20892if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
20893  echo $ECHO_N "(cached) $ECHO_C" >&6
20894else
20895  ac_check_lib_save_LIBS=$LIBS
20896LIBS="-lpcre  $LIBS"
20897cat >"conftest.$ac_ext" <<_ACEOF
20898#line 20898 "configure"
20899#include "confdefs.h"
20900
20901/* Override any gcc2 internal prototype to avoid an error.  */
20902#ifdef __cplusplus
20903extern "C"
20904#endif
20905/* We use char because int might match the return type of a gcc2
20906   builtin and then its argument prototype would still apply.  */
20907char pcre_compile ();
20908int
20909main (void)
20910{
20911pcre_compile ();
20912  ;
20913  return 0;
20914}
20915_ACEOF
20916rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20917if { (eval echo "$as_me:20917: \"$ac_link\"") >&5
20918  (eval $ac_link) 2>&5
20919  ac_status=$?
20920  echo "$as_me:20920: \$? = $ac_status" >&5
20921  (exit "$ac_status"); } &&
20922         { ac_try='test -s "conftest$ac_exeext"'
20923  { (eval echo "$as_me:20923: \"$ac_try\"") >&5
20924  (eval $ac_try) 2>&5
20925  ac_status=$?
20926  echo "$as_me:20926: \$? = $ac_status" >&5
20927  (exit "$ac_status"); }; }; then
20928  ac_cv_lib_pcre_pcre_compile=yes
20929else
20930  echo "$as_me: failed program was:" >&5
20931cat "conftest.$ac_ext" >&5
20932ac_cv_lib_pcre_pcre_compile=no
20933fi
20934rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20935LIBS=$ac_check_lib_save_LIBS
20936fi
20937echo "$as_me:20937: result: $ac_cv_lib_pcre_pcre_compile" >&5
20938echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
20939if test "$ac_cv_lib_pcre_pcre_compile" = yes; then
20940  cat >>confdefs.h <<EOF
20941#define HAVE_LIBPCRE 1
20942EOF
20943
20944  LIBS="-lpcre $LIBS"
20945
20946else
20947  { { echo "$as_me:20947: error: Cannot find PCRE library" >&5
20948echo "$as_me: error: Cannot find PCRE library" >&2;}
20949   { (exit 1); exit 1; }; }
20950fi
20951
20952fi
20953
20954cat >>confdefs.h <<\EOF
20955#define HAVE_LIB_PCRE 1
20956EOF
20957
20958	case $LIBS in
20959	(*pcreposix*)
20960		;;
20961	(*)
20962		echo "$as_me:20962: checking for pcreposix_regcomp in -lpcreposix" >&5
20963echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
20964if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
20965  echo $ECHO_N "(cached) $ECHO_C" >&6
20966else
20967  ac_check_lib_save_LIBS=$LIBS
20968LIBS="-lpcreposix  $LIBS"
20969cat >"conftest.$ac_ext" <<_ACEOF
20970#line 20970 "configure"
20971#include "confdefs.h"
20972
20973/* Override any gcc2 internal prototype to avoid an error.  */
20974#ifdef __cplusplus
20975extern "C"
20976#endif
20977/* We use char because int might match the return type of a gcc2
20978   builtin and then its argument prototype would still apply.  */
20979char pcreposix_regcomp ();
20980int
20981main (void)
20982{
20983pcreposix_regcomp ();
20984  ;
20985  return 0;
20986}
20987_ACEOF
20988rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20989if { (eval echo "$as_me:20989: \"$ac_link\"") >&5
20990  (eval $ac_link) 2>&5
20991  ac_status=$?
20992  echo "$as_me:20992: \$? = $ac_status" >&5
20993  (exit "$ac_status"); } &&
20994         { ac_try='test -s "conftest$ac_exeext"'
20995  { (eval echo "$as_me:20995: \"$ac_try\"") >&5
20996  (eval $ac_try) 2>&5
20997  ac_status=$?
20998  echo "$as_me:20998: \$? = $ac_status" >&5
20999  (exit "$ac_status"); }; }; then
21000  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
21001else
21002  echo "$as_me: failed program was:" >&5
21003cat "conftest.$ac_ext" >&5
21004ac_cv_lib_pcreposix_pcreposix_regcomp=no
21005fi
21006rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21007LIBS=$ac_check_lib_save_LIBS
21008fi
21009echo "$as_me:21009: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
21010echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
21011if test "$ac_cv_lib_pcreposix_pcreposix_regcomp" = yes; then
21012
21013cat >>confdefs.h <<\EOF
21014#define HAVE_PCREPOSIX_H 1
21015EOF
21016
21017cf_add_libs="$LIBS"
21018# reverse order
21019cf_add_0lib=
21020for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21021# filter duplicates
21022for cf_add_1lib in $cf_add_0lib; do
21023	for cf_add_2lib in $cf_add_libs; do
21024		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21025			cf_add_1lib=
21026			break
21027		fi
21028	done
21029	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21030done
21031LIBS="$cf_add_libs"
21032
21033else
21034  echo "$as_me:21034: checking for regcomp in -lpcreposix" >&5
21035echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
21036if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
21037  echo $ECHO_N "(cached) $ECHO_C" >&6
21038else
21039  ac_check_lib_save_LIBS=$LIBS
21040LIBS="-lpcreposix  $LIBS"
21041cat >"conftest.$ac_ext" <<_ACEOF
21042#line 21042 "configure"
21043#include "confdefs.h"
21044
21045/* Override any gcc2 internal prototype to avoid an error.  */
21046#ifdef __cplusplus
21047extern "C"
21048#endif
21049/* We use char because int might match the return type of a gcc2
21050   builtin and then its argument prototype would still apply.  */
21051char regcomp ();
21052int
21053main (void)
21054{
21055regcomp ();
21056  ;
21057  return 0;
21058}
21059_ACEOF
21060rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21061if { (eval echo "$as_me:21061: \"$ac_link\"") >&5
21062  (eval $ac_link) 2>&5
21063  ac_status=$?
21064  echo "$as_me:21064: \$? = $ac_status" >&5
21065  (exit "$ac_status"); } &&
21066         { ac_try='test -s "conftest$ac_exeext"'
21067  { (eval echo "$as_me:21067: \"$ac_try\"") >&5
21068  (eval $ac_try) 2>&5
21069  ac_status=$?
21070  echo "$as_me:21070: \$? = $ac_status" >&5
21071  (exit "$ac_status"); }; }; then
21072  ac_cv_lib_pcreposix_regcomp=yes
21073else
21074  echo "$as_me: failed program was:" >&5
21075cat "conftest.$ac_ext" >&5
21076ac_cv_lib_pcreposix_regcomp=no
21077fi
21078rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21079LIBS=$ac_check_lib_save_LIBS
21080fi
21081echo "$as_me:21081: result: $ac_cv_lib_pcreposix_regcomp" >&5
21082echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
21083if test "$ac_cv_lib_pcreposix_regcomp" = yes; then
21084
21085cat >>confdefs.h <<\EOF
21086#define HAVE_PCREPOSIX_H 1
21087EOF
21088
21089cf_add_libs="$LIBS"
21090# reverse order
21091cf_add_0lib=
21092for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21093# filter duplicates
21094for cf_add_1lib in $cf_add_0lib; do
21095	for cf_add_2lib in $cf_add_libs; do
21096		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21097			cf_add_1lib=
21098			break
21099		fi
21100	done
21101	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21102done
21103LIBS="$cf_add_libs"
21104
21105else
21106  { { echo "$as_me:21106: error: Cannot find PCRE POSIX library" >&5
21107echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
21108   { (exit 1); exit 1; }; }
21109fi
21110
21111fi
21112
21113		;;
21114	esac
21115fi
21116
21117		if test "$with_pcre" = no ; then
21118
21119cf_regex_func=no
21120cf_regex_libs=
21121case "$host_os" in
21122(mingw*)
21123	# -lsystre -ltre -lintl -liconv
21124	echo "$as_me:21124: checking for regcomp in -lsystre" >&5
21125echo $ECHO_N "checking for regcomp in -lsystre... $ECHO_C" >&6
21126if test "${ac_cv_lib_systre_regcomp+set}" = set; then
21127  echo $ECHO_N "(cached) $ECHO_C" >&6
21128else
21129  ac_check_lib_save_LIBS=$LIBS
21130LIBS="-lsystre  $LIBS"
21131cat >"conftest.$ac_ext" <<_ACEOF
21132#line 21132 "configure"
21133#include "confdefs.h"
21134
21135/* Override any gcc2 internal prototype to avoid an error.  */
21136#ifdef __cplusplus
21137extern "C"
21138#endif
21139/* We use char because int might match the return type of a gcc2
21140   builtin and then its argument prototype would still apply.  */
21141char regcomp ();
21142int
21143main (void)
21144{
21145regcomp ();
21146  ;
21147  return 0;
21148}
21149_ACEOF
21150rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21151if { (eval echo "$as_me:21151: \"$ac_link\"") >&5
21152  (eval $ac_link) 2>&5
21153  ac_status=$?
21154  echo "$as_me:21154: \$? = $ac_status" >&5
21155  (exit "$ac_status"); } &&
21156         { ac_try='test -s "conftest$ac_exeext"'
21157  { (eval echo "$as_me:21157: \"$ac_try\"") >&5
21158  (eval $ac_try) 2>&5
21159  ac_status=$?
21160  echo "$as_me:21160: \$? = $ac_status" >&5
21161  (exit "$ac_status"); }; }; then
21162  ac_cv_lib_systre_regcomp=yes
21163else
21164  echo "$as_me: failed program was:" >&5
21165cat "conftest.$ac_ext" >&5
21166ac_cv_lib_systre_regcomp=no
21167fi
21168rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21169LIBS=$ac_check_lib_save_LIBS
21170fi
21171echo "$as_me:21171: result: $ac_cv_lib_systre_regcomp" >&5
21172echo "${ECHO_T}$ac_cv_lib_systre_regcomp" >&6
21173if test "$ac_cv_lib_systre_regcomp" = yes; then
21174
21175		echo "$as_me:21175: checking for libiconv_open in -liconv" >&5
21176echo $ECHO_N "checking for libiconv_open in -liconv... $ECHO_C" >&6
21177if test "${ac_cv_lib_iconv_libiconv_open+set}" = set; then
21178  echo $ECHO_N "(cached) $ECHO_C" >&6
21179else
21180  ac_check_lib_save_LIBS=$LIBS
21181LIBS="-liconv  $LIBS"
21182cat >"conftest.$ac_ext" <<_ACEOF
21183#line 21183 "configure"
21184#include "confdefs.h"
21185
21186/* Override any gcc2 internal prototype to avoid an error.  */
21187#ifdef __cplusplus
21188extern "C"
21189#endif
21190/* We use char because int might match the return type of a gcc2
21191   builtin and then its argument prototype would still apply.  */
21192char libiconv_open ();
21193int
21194main (void)
21195{
21196libiconv_open ();
21197  ;
21198  return 0;
21199}
21200_ACEOF
21201rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21202if { (eval echo "$as_me:21202: \"$ac_link\"") >&5
21203  (eval $ac_link) 2>&5
21204  ac_status=$?
21205  echo "$as_me:21205: \$? = $ac_status" >&5
21206  (exit "$ac_status"); } &&
21207         { ac_try='test -s "conftest$ac_exeext"'
21208  { (eval echo "$as_me:21208: \"$ac_try\"") >&5
21209  (eval $ac_try) 2>&5
21210  ac_status=$?
21211  echo "$as_me:21211: \$? = $ac_status" >&5
21212  (exit "$ac_status"); }; }; then
21213  ac_cv_lib_iconv_libiconv_open=yes
21214else
21215  echo "$as_me: failed program was:" >&5
21216cat "conftest.$ac_ext" >&5
21217ac_cv_lib_iconv_libiconv_open=no
21218fi
21219rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21220LIBS=$ac_check_lib_save_LIBS
21221fi
21222echo "$as_me:21222: result: $ac_cv_lib_iconv_libiconv_open" >&5
21223echo "${ECHO_T}$ac_cv_lib_iconv_libiconv_open" >&6
21224if test "$ac_cv_lib_iconv_libiconv_open" = yes; then
21225
21226cf_add_libs="$LIBS"
21227# reverse order
21228cf_add_0lib=
21229for cf_add_1lib in -liconv; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21230# filter duplicates
21231for cf_add_1lib in $cf_add_0lib; do
21232	for cf_add_2lib in $cf_add_libs; do
21233		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21234			cf_add_1lib=
21235			break
21236		fi
21237	done
21238	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21239done
21240LIBS="$cf_add_libs"
21241
21242fi
21243
21244		echo "$as_me:21244: checking for libintl_gettext in -lintl" >&5
21245echo $ECHO_N "checking for libintl_gettext in -lintl... $ECHO_C" >&6
21246if test "${ac_cv_lib_intl_libintl_gettext+set}" = set; then
21247  echo $ECHO_N "(cached) $ECHO_C" >&6
21248else
21249  ac_check_lib_save_LIBS=$LIBS
21250LIBS="-lintl  $LIBS"
21251cat >"conftest.$ac_ext" <<_ACEOF
21252#line 21252 "configure"
21253#include "confdefs.h"
21254
21255/* Override any gcc2 internal prototype to avoid an error.  */
21256#ifdef __cplusplus
21257extern "C"
21258#endif
21259/* We use char because int might match the return type of a gcc2
21260   builtin and then its argument prototype would still apply.  */
21261char libintl_gettext ();
21262int
21263main (void)
21264{
21265libintl_gettext ();
21266  ;
21267  return 0;
21268}
21269_ACEOF
21270rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21271if { (eval echo "$as_me:21271: \"$ac_link\"") >&5
21272  (eval $ac_link) 2>&5
21273  ac_status=$?
21274  echo "$as_me:21274: \$? = $ac_status" >&5
21275  (exit "$ac_status"); } &&
21276         { ac_try='test -s "conftest$ac_exeext"'
21277  { (eval echo "$as_me:21277: \"$ac_try\"") >&5
21278  (eval $ac_try) 2>&5
21279  ac_status=$?
21280  echo "$as_me:21280: \$? = $ac_status" >&5
21281  (exit "$ac_status"); }; }; then
21282  ac_cv_lib_intl_libintl_gettext=yes
21283else
21284  echo "$as_me: failed program was:" >&5
21285cat "conftest.$ac_ext" >&5
21286ac_cv_lib_intl_libintl_gettext=no
21287fi
21288rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21289LIBS=$ac_check_lib_save_LIBS
21290fi
21291echo "$as_me:21291: result: $ac_cv_lib_intl_libintl_gettext" >&5
21292echo "${ECHO_T}$ac_cv_lib_intl_libintl_gettext" >&6
21293if test "$ac_cv_lib_intl_libintl_gettext" = yes; then
21294
21295cf_add_libs="$LIBS"
21296# reverse order
21297cf_add_0lib=
21298for cf_add_1lib in -lintl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21299# filter duplicates
21300for cf_add_1lib in $cf_add_0lib; do
21301	for cf_add_2lib in $cf_add_libs; do
21302		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21303			cf_add_1lib=
21304			break
21305		fi
21306	done
21307	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21308done
21309LIBS="$cf_add_libs"
21310
21311fi
21312
21313		echo "$as_me:21313: checking for tre_regcomp in -ltre" >&5
21314echo $ECHO_N "checking for tre_regcomp in -ltre... $ECHO_C" >&6
21315if test "${ac_cv_lib_tre_tre_regcomp+set}" = set; then
21316  echo $ECHO_N "(cached) $ECHO_C" >&6
21317else
21318  ac_check_lib_save_LIBS=$LIBS
21319LIBS="-ltre  $LIBS"
21320cat >"conftest.$ac_ext" <<_ACEOF
21321#line 21321 "configure"
21322#include "confdefs.h"
21323
21324/* Override any gcc2 internal prototype to avoid an error.  */
21325#ifdef __cplusplus
21326extern "C"
21327#endif
21328/* We use char because int might match the return type of a gcc2
21329   builtin and then its argument prototype would still apply.  */
21330char tre_regcomp ();
21331int
21332main (void)
21333{
21334tre_regcomp ();
21335  ;
21336  return 0;
21337}
21338_ACEOF
21339rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21340if { (eval echo "$as_me:21340: \"$ac_link\"") >&5
21341  (eval $ac_link) 2>&5
21342  ac_status=$?
21343  echo "$as_me:21343: \$? = $ac_status" >&5
21344  (exit "$ac_status"); } &&
21345         { ac_try='test -s "conftest$ac_exeext"'
21346  { (eval echo "$as_me:21346: \"$ac_try\"") >&5
21347  (eval $ac_try) 2>&5
21348  ac_status=$?
21349  echo "$as_me:21349: \$? = $ac_status" >&5
21350  (exit "$ac_status"); }; }; then
21351  ac_cv_lib_tre_tre_regcomp=yes
21352else
21353  echo "$as_me: failed program was:" >&5
21354cat "conftest.$ac_ext" >&5
21355ac_cv_lib_tre_tre_regcomp=no
21356fi
21357rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21358LIBS=$ac_check_lib_save_LIBS
21359fi
21360echo "$as_me:21360: result: $ac_cv_lib_tre_tre_regcomp" >&5
21361echo "${ECHO_T}$ac_cv_lib_tre_tre_regcomp" >&6
21362if test "$ac_cv_lib_tre_tre_regcomp" = yes; then
21363
21364cf_add_libs="$LIBS"
21365# reverse order
21366cf_add_0lib=
21367for cf_add_1lib in -ltre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21368# filter duplicates
21369for cf_add_1lib in $cf_add_0lib; do
21370	for cf_add_2lib in $cf_add_libs; do
21371		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21372			cf_add_1lib=
21373			break
21374		fi
21375	done
21376	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21377done
21378LIBS="$cf_add_libs"
21379
21380fi
21381
21382cf_add_libs="$LIBS"
21383# reverse order
21384cf_add_0lib=
21385for cf_add_1lib in -lsystre; 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
21398		cf_regex_func=regcomp
21399
21400else
21401
21402		echo "$as_me:21402: checking for regcomp in -lgnurx" >&5
21403echo $ECHO_N "checking for regcomp in -lgnurx... $ECHO_C" >&6
21404if test "${ac_cv_lib_gnurx_regcomp+set}" = set; then
21405  echo $ECHO_N "(cached) $ECHO_C" >&6
21406else
21407  ac_check_lib_save_LIBS=$LIBS
21408LIBS="-lgnurx  $LIBS"
21409cat >"conftest.$ac_ext" <<_ACEOF
21410#line 21410 "configure"
21411#include "confdefs.h"
21412
21413/* Override any gcc2 internal prototype to avoid an error.  */
21414#ifdef __cplusplus
21415extern "C"
21416#endif
21417/* We use char because int might match the return type of a gcc2
21418   builtin and then its argument prototype would still apply.  */
21419char regcomp ();
21420int
21421main (void)
21422{
21423regcomp ();
21424  ;
21425  return 0;
21426}
21427_ACEOF
21428rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21429if { (eval echo "$as_me:21429: \"$ac_link\"") >&5
21430  (eval $ac_link) 2>&5
21431  ac_status=$?
21432  echo "$as_me:21432: \$? = $ac_status" >&5
21433  (exit "$ac_status"); } &&
21434         { ac_try='test -s "conftest$ac_exeext"'
21435  { (eval echo "$as_me:21435: \"$ac_try\"") >&5
21436  (eval $ac_try) 2>&5
21437  ac_status=$?
21438  echo "$as_me:21438: \$? = $ac_status" >&5
21439  (exit "$ac_status"); }; }; then
21440  ac_cv_lib_gnurx_regcomp=yes
21441else
21442  echo "$as_me: failed program was:" >&5
21443cat "conftest.$ac_ext" >&5
21444ac_cv_lib_gnurx_regcomp=no
21445fi
21446rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21447LIBS=$ac_check_lib_save_LIBS
21448fi
21449echo "$as_me:21449: result: $ac_cv_lib_gnurx_regcomp" >&5
21450echo "${ECHO_T}$ac_cv_lib_gnurx_regcomp" >&6
21451if test "$ac_cv_lib_gnurx_regcomp" = yes; then
21452
21453cf_add_libs="$LIBS"
21454# reverse order
21455cf_add_0lib=
21456for cf_add_1lib in -lgnurx; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21457# filter duplicates
21458for cf_add_1lib in $cf_add_0lib; do
21459	for cf_add_2lib in $cf_add_libs; do
21460		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21461			cf_add_1lib=
21462			break
21463		fi
21464	done
21465	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21466done
21467LIBS="$cf_add_libs"
21468
21469			cf_regex_func=regcomp
21470fi
21471
21472fi
21473
21474	;;
21475(*)
21476	cf_regex_libs="regex re"
21477	echo "$as_me:21477: checking for regcomp" >&5
21478echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
21479if test "${ac_cv_func_regcomp+set}" = set; then
21480  echo $ECHO_N "(cached) $ECHO_C" >&6
21481else
21482  cat >"conftest.$ac_ext" <<_ACEOF
21483#line 21483 "configure"
21484#include "confdefs.h"
21485#define regcomp autoconf_temporary
21486#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21487#undef regcomp
21488
21489#ifdef __cplusplus
21490extern "C"
21491#endif
21492
21493/* We use char because int might match the return type of a gcc2
21494   builtin and then its argument prototype would still apply.  */
21495char regcomp (void);
21496
21497int
21498main (void)
21499{
21500
21501/* The GNU C library defines stubs for functions which it implements
21502    to always fail with ENOSYS.  Some functions are actually named
21503    something starting with __ and the normal name is an alias.  */
21504#if defined (__stub_regcomp) || defined (__stub___regcomp)
21505#error found stub for regcomp
21506#endif
21507
21508	return regcomp ();
21509  ;
21510  return 0;
21511}
21512_ACEOF
21513rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21514if { (eval echo "$as_me:21514: \"$ac_link\"") >&5
21515  (eval $ac_link) 2>&5
21516  ac_status=$?
21517  echo "$as_me:21517: \$? = $ac_status" >&5
21518  (exit "$ac_status"); } &&
21519         { ac_try='test -s "conftest$ac_exeext"'
21520  { (eval echo "$as_me:21520: \"$ac_try\"") >&5
21521  (eval $ac_try) 2>&5
21522  ac_status=$?
21523  echo "$as_me:21523: \$? = $ac_status" >&5
21524  (exit "$ac_status"); }; }; then
21525  ac_cv_func_regcomp=yes
21526else
21527  echo "$as_me: failed program was:" >&5
21528cat "conftest.$ac_ext" >&5
21529ac_cv_func_regcomp=no
21530fi
21531rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21532fi
21533echo "$as_me:21533: result: $ac_cv_func_regcomp" >&5
21534echo "${ECHO_T}$ac_cv_func_regcomp" >&6
21535if test "$ac_cv_func_regcomp" = yes; then
21536  cf_regex_func=regcomp
21537else
21538
21539		for cf_regex_lib in $cf_regex_libs
21540		do
21541			as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
21542echo "$as_me:21542: checking for regcomp in -l$cf_regex_lib" >&5
21543echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
21544if eval "test \"\${$as_ac_Lib+set}\" = set"; then
21545  echo $ECHO_N "(cached) $ECHO_C" >&6
21546else
21547  ac_check_lib_save_LIBS=$LIBS
21548LIBS="-l$cf_regex_lib  $LIBS"
21549cat >"conftest.$ac_ext" <<_ACEOF
21550#line 21550 "configure"
21551#include "confdefs.h"
21552
21553/* Override any gcc2 internal prototype to avoid an error.  */
21554#ifdef __cplusplus
21555extern "C"
21556#endif
21557/* We use char because int might match the return type of a gcc2
21558   builtin and then its argument prototype would still apply.  */
21559char regcomp ();
21560int
21561main (void)
21562{
21563regcomp ();
21564  ;
21565  return 0;
21566}
21567_ACEOF
21568rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21569if { (eval echo "$as_me:21569: \"$ac_link\"") >&5
21570  (eval $ac_link) 2>&5
21571  ac_status=$?
21572  echo "$as_me:21572: \$? = $ac_status" >&5
21573  (exit "$ac_status"); } &&
21574         { ac_try='test -s "conftest$ac_exeext"'
21575  { (eval echo "$as_me:21575: \"$ac_try\"") >&5
21576  (eval $ac_try) 2>&5
21577  ac_status=$?
21578  echo "$as_me:21578: \$? = $ac_status" >&5
21579  (exit "$ac_status"); }; }; then
21580  eval "$as_ac_Lib=yes"
21581else
21582  echo "$as_me: failed program was:" >&5
21583cat "conftest.$ac_ext" >&5
21584eval "$as_ac_Lib=no"
21585fi
21586rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21587LIBS=$ac_check_lib_save_LIBS
21588fi
21589echo "$as_me:21589: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
21590echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
21591if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
21592
21593cf_add_libs="$LIBS"
21594# reverse order
21595cf_add_0lib=
21596for cf_add_1lib in -l$cf_regex_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21597# filter duplicates
21598for cf_add_1lib in $cf_add_0lib; do
21599	for cf_add_2lib in $cf_add_libs; do
21600		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21601			cf_add_1lib=
21602			break
21603		fi
21604	done
21605	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21606done
21607LIBS="$cf_add_libs"
21608
21609					cf_regex_func=regcomp
21610					break
21611fi
21612
21613		done
21614
21615fi
21616
21617	;;
21618esac
21619
21620if test "$cf_regex_func" = no ; then
21621	echo "$as_me:21621: checking for compile" >&5
21622echo $ECHO_N "checking for compile... $ECHO_C" >&6
21623if test "${ac_cv_func_compile+set}" = set; then
21624  echo $ECHO_N "(cached) $ECHO_C" >&6
21625else
21626  cat >"conftest.$ac_ext" <<_ACEOF
21627#line 21627 "configure"
21628#include "confdefs.h"
21629#define compile autoconf_temporary
21630#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
21631#undef compile
21632
21633#ifdef __cplusplus
21634extern "C"
21635#endif
21636
21637/* We use char because int might match the return type of a gcc2
21638   builtin and then its argument prototype would still apply.  */
21639char compile (void);
21640
21641int
21642main (void)
21643{
21644
21645/* The GNU C library defines stubs for functions which it implements
21646    to always fail with ENOSYS.  Some functions are actually named
21647    something starting with __ and the normal name is an alias.  */
21648#if defined (__stub_compile) || defined (__stub___compile)
21649#error found stub for compile
21650#endif
21651
21652	return compile ();
21653  ;
21654  return 0;
21655}
21656_ACEOF
21657rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21658if { (eval echo "$as_me:21658: \"$ac_link\"") >&5
21659  (eval $ac_link) 2>&5
21660  ac_status=$?
21661  echo "$as_me:21661: \$? = $ac_status" >&5
21662  (exit "$ac_status"); } &&
21663         { ac_try='test -s "conftest$ac_exeext"'
21664  { (eval echo "$as_me:21664: \"$ac_try\"") >&5
21665  (eval $ac_try) 2>&5
21666  ac_status=$?
21667  echo "$as_me:21667: \$? = $ac_status" >&5
21668  (exit "$ac_status"); }; }; then
21669  ac_cv_func_compile=yes
21670else
21671  echo "$as_me: failed program was:" >&5
21672cat "conftest.$ac_ext" >&5
21673ac_cv_func_compile=no
21674fi
21675rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21676fi
21677echo "$as_me:21677: result: $ac_cv_func_compile" >&5
21678echo "${ECHO_T}$ac_cv_func_compile" >&6
21679if test "$ac_cv_func_compile" = yes; then
21680  cf_regex_func=compile
21681else
21682
21683		echo "$as_me:21683: checking for compile in -lgen" >&5
21684echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
21685if test "${ac_cv_lib_gen_compile+set}" = set; then
21686  echo $ECHO_N "(cached) $ECHO_C" >&6
21687else
21688  ac_check_lib_save_LIBS=$LIBS
21689LIBS="-lgen  $LIBS"
21690cat >"conftest.$ac_ext" <<_ACEOF
21691#line 21691 "configure"
21692#include "confdefs.h"
21693
21694/* Override any gcc2 internal prototype to avoid an error.  */
21695#ifdef __cplusplus
21696extern "C"
21697#endif
21698/* We use char because int might match the return type of a gcc2
21699   builtin and then its argument prototype would still apply.  */
21700char compile ();
21701int
21702main (void)
21703{
21704compile ();
21705  ;
21706  return 0;
21707}
21708_ACEOF
21709rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21710if { (eval echo "$as_me:21710: \"$ac_link\"") >&5
21711  (eval $ac_link) 2>&5
21712  ac_status=$?
21713  echo "$as_me:21713: \$? = $ac_status" >&5
21714  (exit "$ac_status"); } &&
21715         { ac_try='test -s "conftest$ac_exeext"'
21716  { (eval echo "$as_me:21716: \"$ac_try\"") >&5
21717  (eval $ac_try) 2>&5
21718  ac_status=$?
21719  echo "$as_me:21719: \$? = $ac_status" >&5
21720  (exit "$ac_status"); }; }; then
21721  ac_cv_lib_gen_compile=yes
21722else
21723  echo "$as_me: failed program was:" >&5
21724cat "conftest.$ac_ext" >&5
21725ac_cv_lib_gen_compile=no
21726fi
21727rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21728LIBS=$ac_check_lib_save_LIBS
21729fi
21730echo "$as_me:21730: result: $ac_cv_lib_gen_compile" >&5
21731echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
21732if test "$ac_cv_lib_gen_compile" = yes; then
21733
21734cf_add_libs="$LIBS"
21735# reverse order
21736cf_add_0lib=
21737for cf_add_1lib in -lgen; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21738# filter duplicates
21739for cf_add_1lib in $cf_add_0lib; do
21740	for cf_add_2lib in $cf_add_libs; do
21741		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21742			cf_add_1lib=
21743			break
21744		fi
21745	done
21746	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21747done
21748LIBS="$cf_add_libs"
21749
21750				cf_regex_func=compile
21751fi
21752
21753fi
21754
21755fi
21756
21757if test "$cf_regex_func" = no ; then
21758	{ echo "$as_me:21758: WARNING: cannot find regular expression library" >&5
21759echo "$as_me: WARNING: cannot find regular expression library" >&2;}
21760fi
21761
21762echo "$as_me:21762: checking for regular-expression headers" >&5
21763echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
21764if test "${cf_cv_regex_hdrs+set}" = set; then
21765  echo $ECHO_N "(cached) $ECHO_C" >&6
21766else
21767
21768cf_cv_regex_hdrs=no
21769case "$cf_regex_func" in
21770(compile)
21771	for cf_regex_hdr in regexp.h regexpr.h
21772	do
21773		cat >"conftest.$ac_ext" <<_ACEOF
21774#line 21774 "configure"
21775#include "confdefs.h"
21776#include <$cf_regex_hdr>
21777int
21778main (void)
21779{
21780
21781			char *p = compile("", "", "", 0);
21782			int x = step("", "");
21783			(void)p;
21784			(void)x;
21785
21786  ;
21787  return 0;
21788}
21789_ACEOF
21790rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21791if { (eval echo "$as_me:21791: \"$ac_link\"") >&5
21792  (eval $ac_link) 2>&5
21793  ac_status=$?
21794  echo "$as_me:21794: \$? = $ac_status" >&5
21795  (exit "$ac_status"); } &&
21796         { ac_try='test -s "conftest$ac_exeext"'
21797  { (eval echo "$as_me:21797: \"$ac_try\"") >&5
21798  (eval $ac_try) 2>&5
21799  ac_status=$?
21800  echo "$as_me:21800: \$? = $ac_status" >&5
21801  (exit "$ac_status"); }; }; then
21802
21803			cf_cv_regex_hdrs=$cf_regex_hdr
21804			break
21805
21806else
21807  echo "$as_me: failed program was:" >&5
21808cat "conftest.$ac_ext" >&5
21809fi
21810rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21811	done
21812	;;
21813(*)
21814	for cf_regex_hdr in regex.h
21815	do
21816		cat >"conftest.$ac_ext" <<_ACEOF
21817#line 21817 "configure"
21818#include "confdefs.h"
21819#include <sys/types.h>
21820#include <$cf_regex_hdr>
21821int
21822main (void)
21823{
21824
21825			regex_t *p = 0;
21826			int x = regcomp(p, "", 0);
21827			int y = regexec(p, "", 0, 0, 0);
21828			(void)x;
21829			(void)y;
21830			regfree(p);
21831
21832  ;
21833  return 0;
21834}
21835_ACEOF
21836rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21837if { (eval echo "$as_me:21837: \"$ac_link\"") >&5
21838  (eval $ac_link) 2>&5
21839  ac_status=$?
21840  echo "$as_me:21840: \$? = $ac_status" >&5
21841  (exit "$ac_status"); } &&
21842         { ac_try='test -s "conftest$ac_exeext"'
21843  { (eval echo "$as_me:21843: \"$ac_try\"") >&5
21844  (eval $ac_try) 2>&5
21845  ac_status=$?
21846  echo "$as_me:21846: \$? = $ac_status" >&5
21847  (exit "$ac_status"); }; }; then
21848
21849			cf_cv_regex_hdrs=$cf_regex_hdr
21850			break
21851
21852else
21853  echo "$as_me: failed program was:" >&5
21854cat "conftest.$ac_ext" >&5
21855fi
21856rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21857	done
21858	;;
21859esac
21860
21861fi
21862echo "$as_me:21862: result: $cf_cv_regex_hdrs" >&5
21863echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
21864
21865case "$cf_cv_regex_hdrs" in
21866	(no)		{ echo "$as_me:21866: WARNING: no regular expression header found" >&5
21867echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
21868	(regex.h)
21869cat >>confdefs.h <<\EOF
21870#define HAVE_REGEX_H_FUNCS 1
21871EOF
21872 ;;
21873	(regexp.h)
21874cat >>confdefs.h <<\EOF
21875#define HAVE_REGEXP_H_FUNCS 1
21876EOF
21877 ;;
21878	(regexpr.h)
21879cat >>confdefs.h <<\EOF
21880#define HAVE_REGEXPR_H_FUNCS 1
21881EOF
21882 ;;
21883esac
21884
21885			if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
21886				{ { echo "$as_me:21886: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&5
21887echo "$as_me: error: Only POSIX, PCRE, or PCRE2 regular expressions are supported" >&2;}
21888   { (exit 1); exit 1; }; }
21889			fi
21890		fi
21891	fi
21892
21893cat >>confdefs.h <<\EOF
21894#define OPT_SELECT_REGEX 1
21895EOF
21896
21897fi
21898
21899echo "$as_me:21899: checking if you want support for right-scrollbar" >&5
21900echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
21901
21902# Check whether --enable-rightbar or --disable-rightbar was given.
21903if test "${enable_rightbar+set}" = set; then
21904  enableval="$enable_rightbar"
21905  test "$enableval" != no && enableval=yes
21906	if test "$enableval" != "yes" ; then
21907    enable_rightbar=no
21908	else
21909		enable_rightbar=yes
21910	fi
21911else
21912  enableval=yes
21913	enable_rightbar=yes
21914
21915fi;
21916echo "$as_me:21916: result: $enable_rightbar" >&5
21917echo "${ECHO_T}$enable_rightbar" >&6
21918if test "$enable_rightbar" = yes ; then
21919
21920cat >>confdefs.h <<\EOF
21921#define SCROLLBAR_RIGHT 1
21922EOF
21923
21924fi
21925
21926echo "$as_me:21926: checking if you want check for redundant name-change" >&5
21927echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
21928
21929# Check whether --enable-samename or --disable-samename was given.
21930if test "${enable_samename+set}" = set; then
21931  enableval="$enable_samename"
21932  test "$enableval" != no && enableval=yes
21933	if test "$enableval" != "yes" ; then
21934    enable_samename=no
21935	else
21936		enable_samename=yes
21937	fi
21938else
21939  enableval=yes
21940	enable_samename=yes
21941
21942fi;
21943echo "$as_me:21943: result: $enable_samename" >&5
21944echo "${ECHO_T}$enable_samename" >&6
21945test "$enable_samename" = no &&
21946cat >>confdefs.h <<\EOF
21947#define OPT_SAME_NAME 0
21948EOF
21949
21950echo "$as_me:21950: checking if you want support for selection-actions" >&5
21951echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
21952
21953# Check whether --enable-selection-ops or --disable-selection-ops was given.
21954if test "${enable_selection_ops+set}" = set; then
21955  enableval="$enable_selection_ops"
21956  test "$enableval" != no && enableval=yes
21957	if test "$enableval" != "yes" ; then
21958    enable_selection_ops=no
21959	else
21960		enable_selection_ops=yes
21961	fi
21962else
21963  enableval=yes
21964	enable_selection_ops=yes
21965
21966fi;
21967echo "$as_me:21967: result: $enable_selection_ops" >&5
21968echo "${ECHO_T}$enable_selection_ops" >&6
21969test "$enable_selection_ops" = no &&
21970cat >>confdefs.h <<\EOF
21971#define OPT_SELECTION_OPS 0
21972EOF
21973
21974echo "$as_me:21974: checking if you want support for session management" >&5
21975echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
21976
21977# Check whether --enable-session-mgt or --disable-session-mgt was given.
21978if test "${enable_session_mgt+set}" = set; then
21979  enableval="$enable_session_mgt"
21980  test "$enableval" != no && enableval=yes
21981	if test "$enableval" != "yes" ; then
21982    enable_session_mgt=no
21983	else
21984		enable_session_mgt=yes
21985	fi
21986else
21987  enableval=yes
21988	enable_session_mgt=yes
21989
21990fi;
21991echo "$as_me:21991: result: $enable_session_mgt" >&5
21992echo "${ECHO_T}$enable_session_mgt" >&6
21993test "$enable_session_mgt" = no &&
21994cat >>confdefs.h <<\EOF
21995#define OPT_SESSION_MGT 0
21996EOF
21997
21998echo "$as_me:21998: checking if you want to use termcap function-keys" >&5
21999echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
22000
22001# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
22002if test "${enable_tcap_fkeys+set}" = set; then
22003  enableval="$enable_tcap_fkeys"
22004  test "$enableval" != no && enableval=yes
22005	if test "$enableval" != "yes" ; then
22006    enable_tcap_fkeys=no
22007	else
22008		enable_tcap_fkeys=yes
22009	fi
22010else
22011  enableval=yes
22012	enable_tcap_fkeys=yes
22013
22014fi;
22015echo "$as_me:22015: result: $enable_tcap_fkeys" >&5
22016echo "${ECHO_T}$enable_tcap_fkeys" >&6
22017test "$enable_tcap_fkeys" = yes &&
22018cat >>confdefs.h <<\EOF
22019#define OPT_TCAP_FKEYS 1
22020EOF
22021
22022echo "$as_me:22022: checking if you want to use termcap-query/report" >&5
22023echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
22024
22025# Check whether --enable-tcap-query or --disable-tcap-query was given.
22026if test "${enable_tcap_query+set}" = set; then
22027  enableval="$enable_tcap_query"
22028  test "$enableval" != no && enableval=yes
22029	if test "$enableval" != "yes" ; then
22030    enable_tcap_query=no
22031	else
22032		enable_tcap_query=yes
22033	fi
22034else
22035  enableval=yes
22036	enable_tcap_query=yes
22037
22038fi;
22039echo "$as_me:22039: result: $enable_tcap_query" >&5
22040echo "${ECHO_T}$enable_tcap_query" >&6
22041test "$enable_tcap_query" = yes &&
22042cat >>confdefs.h <<\EOF
22043#define OPT_TCAP_QUERY 1
22044EOF
22045
22046echo "$as_me:22046: checking if you want support for tek4014" >&5
22047echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
22048
22049# Check whether --enable-tek4014 or --disable-tek4014 was given.
22050if test "${enable_tek4014+set}" = set; then
22051  enableval="$enable_tek4014"
22052  test "$enableval" != no && enableval=yes
22053	if test "$enableval" != "yes" ; then
22054    enable_tek4014=no
22055	else
22056		enable_tek4014=yes
22057	fi
22058else
22059  enableval=yes
22060	enable_tek4014=yes
22061
22062fi;
22063echo "$as_me:22063: result: $enable_tek4014" >&5
22064echo "${ECHO_T}$enable_tek4014" >&6
22065if test "$enable_tek4014" = no ; then
22066
22067cat >>confdefs.h <<\EOF
22068#define OPT_TEK4014 0
22069EOF
22070
22071else
22072	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
22073	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
22074	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
22075fi
22076
22077echo "$as_me:22077: checking if you want pulldown menus with a toolbar" >&5
22078echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
22079
22080# Check whether --enable-toolbar or --disable-toolbar was given.
22081if test "${enable_toolbar+set}" = set; then
22082  enableval="$enable_toolbar"
22083  test "$enableval" != yes && enableval=no
22084	if test "$enableval" != "no" ; then
22085    enable_toolbar=yes
22086	else
22087		enable_toolbar=no
22088	fi
22089else
22090  enableval=no
22091	enable_toolbar=no
22092
22093fi;
22094echo "$as_me:22094: result: $enable_toolbar" >&5
22095echo "${ECHO_T}$enable_toolbar" >&6
22096if test "$enable_toolbar" = yes ; then
22097
22098cat >>confdefs.h <<\EOF
22099#define OPT_TOOLBAR 1
22100EOF
22101
22102fi
22103
22104echo "$as_me:22104: checking if you want VT52 emulation" >&5
22105echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
22106
22107# Check whether --enable-vt52 or --disable-vt52 was given.
22108if test "${enable_vt52+set}" = set; then
22109  enableval="$enable_vt52"
22110  test "$enableval" != no && enableval=yes
22111	if test "$enableval" != "yes" ; then
22112    enable_vt52=no
22113	else
22114		enable_vt52=yes
22115	fi
22116else
22117  enableval=yes
22118	enable_vt52=yes
22119
22120fi;
22121echo "$as_me:22121: result: $enable_vt52" >&5
22122echo "${ECHO_T}$enable_vt52" >&6
22123test "$enable_vt52" = no &&
22124cat >>confdefs.h <<\EOF
22125#define OPT_VT52_MODE 0
22126EOF
22127
22128echo "$as_me:22128: checking if you want wide-attribute support" >&5
22129echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
22130
22131# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
22132if test "${enable_wide_attrs+set}" = set; then
22133  enableval="$enable_wide_attrs"
22134  test "$enableval" != no && enableval=yes
22135	if test "$enableval" != "yes" ; then
22136    enable_wattr=no
22137	else
22138		enable_wattr=yes
22139	fi
22140else
22141  enableval=yes
22142	enable_wattr=yes
22143
22144fi;
22145echo "$as_me:22145: result: $enable_wattr" >&5
22146echo "${ECHO_T}$enable_wattr" >&6
22147
22148if test x$enable_wattr = xno && test x$enable_direct_color = xyes ; then
22149	{ echo "$as_me:22149: WARNING: overriding wide-attributes to support direct color" >&5
22150echo "$as_me: WARNING: overriding wide-attributes to support direct color" >&2;}
22151	enable_wattr=yes
22152fi
22153
22154echo "$as_me:22154: checking if you want wide-character support" >&5
22155echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
22156
22157# Check whether --enable-wide-chars or --disable-wide-chars was given.
22158if test "${enable_wide_chars+set}" = set; then
22159  enableval="$enable_wide_chars"
22160  test "$enableval" != no && enableval=yes
22161	if test "$enableval" != "yes" ; then
22162    enable_wchar=no
22163	else
22164		enable_wchar=yes
22165	fi
22166else
22167  enableval=yes
22168	enable_wchar=yes
22169
22170fi;
22171echo "$as_me:22171: result: $enable_wchar" >&5
22172echo "${ECHO_T}$enable_wchar" >&6
22173test "x$enable_wattr" = xno &&
22174cat >>confdefs.h <<\EOF
22175#define OPT_WIDE_ATTRS 0
22176EOF
22177
22178echo "$as_me:22178: checking if you want only 16-bit character support" >&5
22179echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
22180
22181# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
22182if test "${enable_16bit_chars+set}" = set; then
22183  enableval="$enable_16bit_chars"
22184  test "$enableval" != yes && enableval=no
22185	if test "$enableval" != "no" ; then
22186    enable_16bit_chars=yes
22187	else
22188		enable_16bit_chars=no
22189	fi
22190else
22191  enableval=no
22192	enable_16bit_chars=no
22193
22194fi;
22195echo "$as_me:22195: result: $enable_16bit_chars" >&5
22196echo "${ECHO_T}$enable_16bit_chars" >&6
22197
22198if test "$enable_16bit_chars" = yes ; then
22199
22200cat >>confdefs.h <<\EOF
22201#define OPT_WIDER_ICHAR 0
22202EOF
22203
22204	enable_wchar=yes
22205fi
22206
22207if test "$enable_wchar" = yes ; then
22208
22209echo "$as_me:22209: checking if you want to use mini-luit/Latin9 built-in support" >&5
22210echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
22211
22212# Check whether --enable-mini-luit or --disable-mini-luit was given.
22213if test "${enable_mini_luit+set}" = set; then
22214  enableval="$enable_mini_luit"
22215  test "$enableval" != yes && enableval=no
22216	if test "$enableval" != "no" ; then
22217    enable_mini_luit=yes
22218	else
22219		enable_mini_luit=no
22220	fi
22221else
22222  enableval=no
22223	enable_mini_luit=no
22224
22225fi;
22226echo "$as_me:22226: result: $enable_mini_luit" >&5
22227echo "${ECHO_T}$enable_mini_luit" >&6
22228if test "$enable_mini_luit" = yes ; then
22229
22230cat >>confdefs.h <<\EOF
22231#define OPT_MINI_LUIT 1
22232EOF
22233
22234fi
22235
22236echo "$as_me:22236: checking if you want to use luit" >&5
22237echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
22238
22239# Check whether --enable-luit or --disable-luit was given.
22240if test "${enable_luit+set}" = set; then
22241  enableval="$enable_luit"
22242  test "$enableval" != no && enableval=yes
22243	if test "$enableval" != "yes" ; then
22244    enable_luit=no
22245	else
22246		enable_luit=yes
22247	fi
22248else
22249  enableval=yes
22250	enable_luit=yes
22251
22252fi;
22253echo "$as_me:22253: result: $enable_luit" >&5
22254echo "${ECHO_T}$enable_luit" >&6
22255if test "$enable_luit" = yes ; then
22256
22257cat >>confdefs.h <<\EOF
22258#define OPT_LUIT_PROG 1
22259EOF
22260
22261test -z "$LUIT" && LUIT="xterm-filter"
22262for ac_prog in $LUIT xterm-filter bluit luit
22263do
22264  # Extract the first word of "$ac_prog", so it can be a program name with args.
22265set dummy $ac_prog; ac_word=$2
22266echo "$as_me:22266: checking for $ac_word" >&5
22267echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
22268if test "${ac_cv_path_LUIT+set}" = set; then
22269  echo $ECHO_N "(cached) $ECHO_C" >&6
22270else
22271  case $LUIT in
22272  [\\/]* | ?:[\\/]*)
22273  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
22274  ;;
22275  *)
22276  ac_save_IFS=$IFS; IFS=$ac_path_separator
22277ac_dummy="$PATH"
22278for ac_dir in $ac_dummy; do
22279  IFS=$ac_save_IFS
22280  test -z "$ac_dir" && ac_dir=.
22281  if $as_executable_p "$ac_dir/$ac_word"; then
22282   ac_cv_path_LUIT="$ac_dir/$ac_word"
22283   echo "$as_me:22283: found $ac_dir/$ac_word" >&5
22284   break
22285fi
22286done
22287
22288  ;;
22289esac
22290fi
22291LUIT=$ac_cv_path_LUIT
22292
22293if test -n "$LUIT"; then
22294  echo "$as_me:22294: result: $LUIT" >&5
22295echo "${ECHO_T}$LUIT" >&6
22296else
22297  echo "$as_me:22297: result: no" >&5
22298echo "${ECHO_T}no" >&6
22299fi
22300
22301  test -n "$LUIT" && break
22302done
22303test -n "$LUIT" || LUIT="$LUIT"
22304
22305cf_path_prog=""
22306cf_path_args=""
22307IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
22308for cf_temp in $ac_cv_path_LUIT
22309do
22310	if test -z "$cf_path_prog" ; then
22311		if test "$with_full_paths" = yes ; then
22312
22313if test "x$prefix" != xNONE; then
22314	cf_path_syntax="$prefix"
22315else
22316	cf_path_syntax="$ac_default_prefix"
22317fi
22318
22319case ".$cf_temp" in
22320(.\$\(*\)*|.\'*\'*)
22321	;;
22322(..|./*|.\\*)
22323	;;
22324(.[a-zA-Z]:[\\/]*) # OS/2 EMX
22325	;;
22326(.\$\{*prefix\}*|.\$\{*dir\}*)
22327	eval cf_temp="$cf_temp"
22328	case ".$cf_temp" in
22329	(.NONE/*)
22330		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22331		;;
22332	esac
22333	;;
22334(.no|.NONE/*)
22335	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
22336	;;
22337(*)
22338	break
22339	;;
22340esac
22341
22342			cf_path_prog="$cf_temp"
22343		else
22344			cf_path_prog="`basename "$cf_temp"`"
22345		fi
22346	elif test -z "$cf_path_args" ; then
22347		cf_path_args="$cf_temp"
22348	else
22349		cf_path_args="$cf_path_args $cf_temp"
22350	fi
22351done
22352IFS="$cf_save_ifs"
22353
22354if test -n "$cf_path_prog" ; then
22355
22356echo "${as_me:-configure}:22356: testing defining path for ${cf_path_prog} ..." 1>&5
22357
22358cat >>confdefs.h <<EOF
22359#define LUIT_PATH "$cf_path_prog"
22360EOF
22361
22362	test -n "$cf_path_args" &&
22363cat >>confdefs.h <<EOF
22364#define LUIT_ARGS "$cf_path_args"
22365EOF
22366
22367fi
22368
22369fi
22370
22371cat >>confdefs.h <<\EOF
22372#define OPT_WIDE_CHARS 1
22373EOF
22374
22375	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
22376	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
22377	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
22378fi
22379
22380echo "$as_me:22380: checking if you want dynamic-abbreviation support" >&5
22381echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
22382
22383# Check whether --enable-dabbrev or --disable-dabbrev was given.
22384if test "${enable_dabbrev+set}" = set; then
22385  enableval="$enable_dabbrev"
22386  test "$enableval" != yes && enableval=no
22387	if test "$enableval" != "no" ; then
22388    enable_dabbrev=yes
22389	else
22390		enable_dabbrev=no
22391	fi
22392else
22393  enableval=no
22394	enable_dabbrev=no
22395
22396fi;
22397echo "$as_me:22397: result: $enable_dabbrev" >&5
22398echo "${ECHO_T}$enable_dabbrev" >&6
22399if test "$enable_dabbrev" = yes ; then
22400
22401cat >>confdefs.h <<\EOF
22402#define OPT_DABBREV 1
22403EOF
22404
22405fi
22406
22407echo "$as_me:22407: checking if you want DECterm Locator support" >&5
22408echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
22409
22410# Check whether --enable-dec-locator or --disable-dec-locator was given.
22411if test "${enable_dec_locator+set}" = set; then
22412  enableval="$enable_dec_locator"
22413  test "$enableval" != yes && enableval=no
22414	if test "$enableval" != "no" ; then
22415    enable_dec_locator=yes
22416	else
22417		enable_dec_locator=no
22418	fi
22419else
22420  enableval=no
22421	enable_dec_locator=no
22422
22423fi;
22424echo "$as_me:22424: result: $enable_dec_locator" >&5
22425echo "${ECHO_T}$enable_dec_locator" >&6
22426if test "$enable_dec_locator" = yes ; then
22427
22428cat >>confdefs.h <<\EOF
22429#define OPT_DEC_LOCATOR 1
22430EOF
22431
22432fi
22433
22434echo "$as_me:22434: checking if you want XHTML and SVG screen dump support" >&5
22435echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
22436
22437# Check whether --enable-screen-dumps or --disable-screen-dumps was given.
22438if test "${enable_screen_dumps+set}" = set; then
22439  enableval="$enable_screen_dumps"
22440  test "$enableval" != no && enableval=yes
22441	if test "$enableval" != "yes" ; then
22442    enable_screen_dumps=no
22443	else
22444		enable_screen_dumps=yes
22445	fi
22446else
22447  enableval=yes
22448	enable_screen_dumps=yes
22449
22450fi;
22451echo "$as_me:22451: result: $enable_screen_dumps" >&5
22452echo "${ECHO_T}$enable_screen_dumps" >&6
22453if test "$enable_screen_dumps" = yes ; then
22454	EXTRASRCS="$EXTRASRCS html.c svg.c"
22455	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
22456else
22457
22458cat >>confdefs.h <<\EOF
22459#define OPT_SCREEN_DUMPS 0
22460EOF
22461
22462fi
22463
22464echo "$as_me:22464: checking if you want ReGIS graphics support" >&5
22465echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
22466
22467# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
22468if test "${enable_regis_graphics+set}" = set; then
22469  enableval="$enable_regis_graphics"
22470  test "$enableval" != yes && enableval=no
22471	if test "$enableval" != "no" ; then
22472    enable_regis_graphics=yes
22473	else
22474		enable_regis_graphics=no
22475	fi
22476else
22477  enableval=no
22478	enable_regis_graphics=no
22479
22480fi;
22481echo "$as_me:22481: result: $enable_regis_graphics" >&5
22482echo "${ECHO_T}$enable_regis_graphics" >&6
22483if test "$enable_regis_graphics" = yes ; then
22484
22485cat >>confdefs.h <<\EOF
22486#define OPT_REGIS_GRAPHICS 1
22487EOF
22488
22489	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
22490	EXTRASRCS="$EXTRASRCS graphics_regis.c"
22491	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
22492
22493echo "$as_me:22493: checking if -lm needed for math functions" >&5
22494echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
22495if test "${cf_cv_need_libm+set}" = set; then
22496  echo $ECHO_N "(cached) $ECHO_C" >&6
22497else
22498
22499	cat >"conftest.$ac_ext" <<_ACEOF
22500#line 22500 "configure"
22501#include "confdefs.h"
22502
22503	#include <stdio.h>
22504	#include <stdlib.h>
22505	#include <math.h>
22506
22507int
22508main (void)
22509{
22510double x = rand(); printf("result = %g\\n", sin(x))
22511  ;
22512  return 0;
22513}
22514_ACEOF
22515rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22516if { (eval echo "$as_me:22516: \"$ac_link\"") >&5
22517  (eval $ac_link) 2>&5
22518  ac_status=$?
22519  echo "$as_me:22519: \$? = $ac_status" >&5
22520  (exit "$ac_status"); } &&
22521         { ac_try='test -s "conftest$ac_exeext"'
22522  { (eval echo "$as_me:22522: \"$ac_try\"") >&5
22523  (eval $ac_try) 2>&5
22524  ac_status=$?
22525  echo "$as_me:22525: \$? = $ac_status" >&5
22526  (exit "$ac_status"); }; }; then
22527  cf_cv_need_libm=no
22528else
22529  echo "$as_me: failed program was:" >&5
22530cat "conftest.$ac_ext" >&5
22531cf_cv_need_libm=yes
22532fi
22533rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22534fi
22535echo "$as_me:22535: result: $cf_cv_need_libm" >&5
22536echo "${ECHO_T}$cf_cv_need_libm" >&6
22537if test "$cf_cv_need_libm" = yes
22538then
22539
22540cf_add_libs="$LIBS"
22541# reverse order
22542cf_add_0lib=
22543for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22544# filter duplicates
22545for cf_add_1lib in $cf_add_0lib; do
22546	for cf_add_2lib in $cf_add_libs; do
22547		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22548			cf_add_1lib=
22549			break
22550		fi
22551	done
22552	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22553done
22554LIBS="$cf_add_libs"
22555
22556fi
22557
22558fi
22559
22560echo "$as_me:22560: checking if you want sixel graphics support" >&5
22561echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
22562
22563# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
22564if test "${enable_sixel_graphics+set}" = set; then
22565  enableval="$enable_sixel_graphics"
22566  test "$enableval" != no && enableval=yes
22567	if test "$enableval" != "yes" ; then
22568    enable_sixel_graphics=no
22569	else
22570		enable_sixel_graphics=yes
22571	fi
22572else
22573  enableval=yes
22574	enable_sixel_graphics=yes
22575
22576fi;
22577echo "$as_me:22577: result: $enable_sixel_graphics" >&5
22578echo "${ECHO_T}$enable_sixel_graphics" >&6
22579if test "$enable_sixel_graphics" = yes ; then
22580
22581cat >>confdefs.h <<\EOF
22582#define OPT_SIXEL_GRAPHICS 1
22583EOF
22584
22585	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
22586	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
22587	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
22588fi
22589
22590if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
22591
22592cat >>confdefs.h <<\EOF
22593#define OPT_GRAPHICS 1
22594EOF
22595
22596	EXTRAHDRS="$EXTRAHDRS graphics.h"
22597	EXTRASRCS="$EXTRASRCS graphics.c"
22598	EXTRAOBJS="$EXTRAOBJS graphics.o"
22599fi
22600
22601echo "$as_me:22601: checking if you want sixel screen dump support" >&5
22602echo $ECHO_N "checking if you want sixel screen dump support... $ECHO_C" >&6
22603
22604# Check whether --enable-print-graphics or --disable-print-graphics was given.
22605if test "${enable_print_graphics+set}" = set; then
22606  enableval="$enable_print_graphics"
22607  test "$enableval" != no && enableval=yes
22608	if test "$enableval" != "yes" ; then
22609    enable_print_graphics=no
22610	else
22611		enable_print_graphics=$enable_regis_graphics
22612	fi
22613else
22614  enableval=yes
22615	enable_print_graphics=$enable_regis_graphics
22616
22617fi;
22618echo "$as_me:22618: result: $enable_print_graphics" >&5
22619echo "${ECHO_T}$enable_print_graphics" >&6
22620if test "$enable_print_graphics" = yes ; then
22621
22622cat >>confdefs.h <<\EOF
22623#define OPT_PRINT_GRAPHICS 1
22624EOF
22625
22626fi
22627
22628echo "$as_me:22628: checking if you want VT420 rectangle support" >&5
22629echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
22630
22631# Check whether --enable-rectangles or --disable-rectangles was given.
22632if test "${enable_rectangles+set}" = set; then
22633  enableval="$enable_rectangles"
22634  test "$enableval" != no && enableval=yes
22635	if test "$enableval" != "yes" ; then
22636    enable_rectangles=no
22637	else
22638		enable_rectangles=yes
22639	fi
22640else
22641  enableval=yes
22642	enable_rectangles=yes
22643
22644fi;
22645echo "$as_me:22645: result: $enable_rectangles" >&5
22646echo "${ECHO_T}$enable_rectangles" >&6
22647if test "$enable_rectangles" = yes ; then
22648
22649cat >>confdefs.h <<\EOF
22650#define OPT_DEC_RECTOPS 1
22651EOF
22652
22653fi
22654
22655echo "$as_me:22655: checking if you want -ziconbeep option" >&5
22656echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
22657
22658# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
22659if test "${enable_ziconbeep+set}" = set; then
22660  enableval="$enable_ziconbeep"
22661  test "$enableval" != no && enableval=yes
22662	if test "$enableval" != "yes" ; then
22663    enable_ziconbeep=no
22664	else
22665		enable_ziconbeep=yes
22666	fi
22667else
22668  enableval=yes
22669	enable_ziconbeep=yes
22670
22671fi;
22672echo "$as_me:22672: result: $enable_ziconbeep" >&5
22673echo "${ECHO_T}$enable_ziconbeep" >&6
22674test "$enable_ziconbeep" = no &&
22675cat >>confdefs.h <<\EOF
22676#define OPT_ZICONBEEP 0
22677EOF
22678
22679###############################################################################
22680
22681echo "$as_me:22681: checking if you want debugging traces" >&5
22682echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
22683
22684# Check whether --enable-trace or --disable-trace was given.
22685if test "${enable_trace+set}" = set; then
22686  enableval="$enable_trace"
22687  test "$enableval" != yes && enableval=no
22688	if test "$enableval" != "no" ; then
22689    enable_trace=yes
22690	else
22691		enable_trace=no
22692	fi
22693else
22694  enableval=no
22695	enable_trace=no
22696
22697fi;
22698echo "$as_me:22698: result: $enable_trace" >&5
22699echo "${ECHO_T}$enable_trace" >&6
22700if test "$enable_trace" = yes ; then
22701
22702cat >>confdefs.h <<\EOF
22703#define OPT_TRACE 1
22704EOF
22705
22706	EXTRASRCS="$EXTRASRCS trace.c"
22707	EXTRAOBJS="$EXTRAOBJS trace.o"
22708fi
22709
22710echo "$as_me:22710: checking if you want to use dmalloc for testing" >&5
22711echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
22712
22713# Check whether --with-dmalloc or --without-dmalloc was given.
22714if test "${with_dmalloc+set}" = set; then
22715  withval="$with_dmalloc"
22716  case "x$withval" in
22717	(x|xno) ;;
22718	(*)
22719		: "${with_cflags:=-g}"
22720		: "${enable_leaks:=no}"
22721		with_dmalloc=yes
22722
22723cat >>confdefs.h <<EOF
22724#define USE_DMALLOC 1
22725EOF
22726
22727		;;
22728	esac
22729else
22730  with_dmalloc=
22731fi;
22732echo "$as_me:22732: result: ${with_dmalloc:-no}" >&5
22733echo "${ECHO_T}${with_dmalloc:-no}" >&6
22734
22735case ".$with_cflags" in
22736(.*-g*)
22737	case .$CFLAGS in
22738	(.*-g*)
22739		;;
22740	(*)
22741
22742cf_fix_cppflags=no
22743cf_new_cflags=
22744cf_new_cppflags=
22745cf_new_extra_cppflags=
22746
22747for cf_add_cflags in -g
22748do
22749case "$cf_fix_cppflags" in
22750(no)
22751	case "$cf_add_cflags" in
22752	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22753		case "$cf_add_cflags" in
22754		(-D*)
22755			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22756
22757			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22758				&& test -z "${cf_tst_cflags}" \
22759				&& cf_fix_cppflags=yes
22760
22761			if test "$cf_fix_cppflags" = yes ; then
22762
22763	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22764	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22765
22766				continue
22767			elif test "${cf_tst_cflags}" = "\"'" ; then
22768
22769	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22770	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22771
22772				continue
22773			fi
22774			;;
22775		esac
22776		case "$CPPFLAGS" in
22777		(*$cf_add_cflags)
22778			;;
22779		(*)
22780			case "$cf_add_cflags" in
22781			(-D*)
22782				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
22783
22784CPPFLAGS=`echo "$CPPFLAGS" | \
22785	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
22786		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
22787
22788				;;
22789			esac
22790
22791	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
22792	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
22793
22794			;;
22795		esac
22796		;;
22797	(*)
22798
22799	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
22800	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
22801
22802		;;
22803	esac
22804	;;
22805(yes)
22806
22807	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
22808	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
22809
22810	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
22811
22812	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22813		&& test -z "${cf_tst_cflags}" \
22814		&& cf_fix_cppflags=no
22815	;;
22816esac
22817done
22818
22819if test -n "$cf_new_cflags" ; then
22820
22821	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
22822	CFLAGS="${CFLAGS}$cf_new_cflags"
22823
22824fi
22825
22826if test -n "$cf_new_cppflags" ; then
22827
22828	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22829	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
22830
22831fi
22832
22833if test -n "$cf_new_extra_cppflags" ; then
22834
22835	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
22836	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
22837
22838fi
22839
22840		;;
22841	esac
22842	;;
22843esac
22844
22845if test "$with_dmalloc" = yes ; then
22846	echo "$as_me:22846: checking for dmalloc.h" >&5
22847echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
22848if test "${ac_cv_header_dmalloc_h+set}" = set; then
22849  echo $ECHO_N "(cached) $ECHO_C" >&6
22850else
22851  cat >"conftest.$ac_ext" <<_ACEOF
22852#line 22852 "configure"
22853#include "confdefs.h"
22854#include <dmalloc.h>
22855_ACEOF
22856if { (eval echo "$as_me:22856: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22857  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22858  ac_status=$?
22859  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22860  rm -f conftest.er1
22861  cat conftest.err >&5
22862  echo "$as_me:22862: \$? = $ac_status" >&5
22863  (exit "$ac_status"); } >/dev/null; then
22864  if test -s conftest.err; then
22865    ac_cpp_err=$ac_c_preproc_warn_flag
22866  else
22867    ac_cpp_err=
22868  fi
22869else
22870  ac_cpp_err=yes
22871fi
22872if test -z "$ac_cpp_err"; then
22873  ac_cv_header_dmalloc_h=yes
22874else
22875  echo "$as_me: failed program was:" >&5
22876  cat "conftest.$ac_ext" >&5
22877  ac_cv_header_dmalloc_h=no
22878fi
22879rm -f conftest.err "conftest.$ac_ext"
22880fi
22881echo "$as_me:22881: result: $ac_cv_header_dmalloc_h" >&5
22882echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
22883if test "$ac_cv_header_dmalloc_h" = yes; then
22884
22885echo "$as_me:22885: checking for dmalloc_debug in -ldmalloc" >&5
22886echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
22887if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
22888  echo $ECHO_N "(cached) $ECHO_C" >&6
22889else
22890  ac_check_lib_save_LIBS=$LIBS
22891LIBS="-ldmalloc  $LIBS"
22892cat >"conftest.$ac_ext" <<_ACEOF
22893#line 22893 "configure"
22894#include "confdefs.h"
22895
22896/* Override any gcc2 internal prototype to avoid an error.  */
22897#ifdef __cplusplus
22898extern "C"
22899#endif
22900/* We use char because int might match the return type of a gcc2
22901   builtin and then its argument prototype would still apply.  */
22902char dmalloc_debug ();
22903int
22904main (void)
22905{
22906dmalloc_debug ();
22907  ;
22908  return 0;
22909}
22910_ACEOF
22911rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22912if { (eval echo "$as_me:22912: \"$ac_link\"") >&5
22913  (eval $ac_link) 2>&5
22914  ac_status=$?
22915  echo "$as_me:22915: \$? = $ac_status" >&5
22916  (exit "$ac_status"); } &&
22917         { ac_try='test -s "conftest$ac_exeext"'
22918  { (eval echo "$as_me:22918: \"$ac_try\"") >&5
22919  (eval $ac_try) 2>&5
22920  ac_status=$?
22921  echo "$as_me:22921: \$? = $ac_status" >&5
22922  (exit "$ac_status"); }; }; then
22923  ac_cv_lib_dmalloc_dmalloc_debug=yes
22924else
22925  echo "$as_me: failed program was:" >&5
22926cat "conftest.$ac_ext" >&5
22927ac_cv_lib_dmalloc_dmalloc_debug=no
22928fi
22929rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22930LIBS=$ac_check_lib_save_LIBS
22931fi
22932echo "$as_me:22932: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
22933echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
22934if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
22935  cat >>confdefs.h <<EOF
22936#define HAVE_LIBDMALLOC 1
22937EOF
22938
22939  LIBS="-ldmalloc $LIBS"
22940
22941fi
22942
22943fi
22944
22945fi
22946
22947echo "$as_me:22947: checking if you want to use dbmalloc for testing" >&5
22948echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
22949
22950# Check whether --with-dbmalloc or --without-dbmalloc was given.
22951if test "${with_dbmalloc+set}" = set; then
22952  withval="$with_dbmalloc"
22953  case "x$withval" in
22954	(x|xno) ;;
22955	(*)
22956		: "${with_cflags:=-g}"
22957		: "${enable_leaks:=no}"
22958		with_dbmalloc=yes
22959
22960cat >>confdefs.h <<EOF
22961#define USE_DBMALLOC 1
22962EOF
22963
22964		;;
22965	esac
22966else
22967  with_dbmalloc=
22968fi;
22969echo "$as_me:22969: result: ${with_dbmalloc:-no}" >&5
22970echo "${ECHO_T}${with_dbmalloc:-no}" >&6
22971
22972case ".$with_cflags" in
22973(.*-g*)
22974	case .$CFLAGS in
22975	(.*-g*)
22976		;;
22977	(*)
22978
22979cf_fix_cppflags=no
22980cf_new_cflags=
22981cf_new_cppflags=
22982cf_new_extra_cppflags=
22983
22984for cf_add_cflags in -g
22985do
22986case "$cf_fix_cppflags" in
22987(no)
22988	case "$cf_add_cflags" in
22989	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
22990		case "$cf_add_cflags" in
22991		(-D*)
22992			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
22993
22994			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
22995				&& test -z "${cf_tst_cflags}" \
22996				&& cf_fix_cppflags=yes
22997
22998			if test "$cf_fix_cppflags" = yes ; then
22999
23000	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23001	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23002
23003				continue
23004			elif test "${cf_tst_cflags}" = "\"'" ; then
23005
23006	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23007	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23008
23009				continue
23010			fi
23011			;;
23012		esac
23013		case "$CPPFLAGS" in
23014		(*$cf_add_cflags)
23015			;;
23016		(*)
23017			case "$cf_add_cflags" in
23018			(-D*)
23019				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23020
23021CPPFLAGS=`echo "$CPPFLAGS" | \
23022	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23023		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23024
23025				;;
23026			esac
23027
23028	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23029	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23030
23031			;;
23032		esac
23033		;;
23034	(*)
23035
23036	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23037	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23038
23039		;;
23040	esac
23041	;;
23042(yes)
23043
23044	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23045	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23046
23047	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23048
23049	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23050		&& test -z "${cf_tst_cflags}" \
23051		&& cf_fix_cppflags=no
23052	;;
23053esac
23054done
23055
23056if test -n "$cf_new_cflags" ; then
23057
23058	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23059	CFLAGS="${CFLAGS}$cf_new_cflags"
23060
23061fi
23062
23063if test -n "$cf_new_cppflags" ; then
23064
23065	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23066	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23067
23068fi
23069
23070if test -n "$cf_new_extra_cppflags" ; then
23071
23072	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23073	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23074
23075fi
23076
23077		;;
23078	esac
23079	;;
23080esac
23081
23082if test "$with_dbmalloc" = yes ; then
23083	echo "$as_me:23083: checking for dbmalloc.h" >&5
23084echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
23085if test "${ac_cv_header_dbmalloc_h+set}" = set; then
23086  echo $ECHO_N "(cached) $ECHO_C" >&6
23087else
23088  cat >"conftest.$ac_ext" <<_ACEOF
23089#line 23089 "configure"
23090#include "confdefs.h"
23091#include <dbmalloc.h>
23092_ACEOF
23093if { (eval echo "$as_me:23093: \"$ac_cpp "conftest.$ac_ext"\"") >&5
23094  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
23095  ac_status=$?
23096  $EGREP -v '^ *\+' conftest.er1 >conftest.err
23097  rm -f conftest.er1
23098  cat conftest.err >&5
23099  echo "$as_me:23099: \$? = $ac_status" >&5
23100  (exit "$ac_status"); } >/dev/null; then
23101  if test -s conftest.err; then
23102    ac_cpp_err=$ac_c_preproc_warn_flag
23103  else
23104    ac_cpp_err=
23105  fi
23106else
23107  ac_cpp_err=yes
23108fi
23109if test -z "$ac_cpp_err"; then
23110  ac_cv_header_dbmalloc_h=yes
23111else
23112  echo "$as_me: failed program was:" >&5
23113  cat "conftest.$ac_ext" >&5
23114  ac_cv_header_dbmalloc_h=no
23115fi
23116rm -f conftest.err "conftest.$ac_ext"
23117fi
23118echo "$as_me:23118: result: $ac_cv_header_dbmalloc_h" >&5
23119echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
23120if test "$ac_cv_header_dbmalloc_h" = yes; then
23121
23122echo "$as_me:23122: checking for debug_malloc in -ldbmalloc" >&5
23123echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
23124if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
23125  echo $ECHO_N "(cached) $ECHO_C" >&6
23126else
23127  ac_check_lib_save_LIBS=$LIBS
23128LIBS="-ldbmalloc  $LIBS"
23129cat >"conftest.$ac_ext" <<_ACEOF
23130#line 23130 "configure"
23131#include "confdefs.h"
23132
23133/* Override any gcc2 internal prototype to avoid an error.  */
23134#ifdef __cplusplus
23135extern "C"
23136#endif
23137/* We use char because int might match the return type of a gcc2
23138   builtin and then its argument prototype would still apply.  */
23139char debug_malloc ();
23140int
23141main (void)
23142{
23143debug_malloc ();
23144  ;
23145  return 0;
23146}
23147_ACEOF
23148rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23149if { (eval echo "$as_me:23149: \"$ac_link\"") >&5
23150  (eval $ac_link) 2>&5
23151  ac_status=$?
23152  echo "$as_me:23152: \$? = $ac_status" >&5
23153  (exit "$ac_status"); } &&
23154         { ac_try='test -s "conftest$ac_exeext"'
23155  { (eval echo "$as_me:23155: \"$ac_try\"") >&5
23156  (eval $ac_try) 2>&5
23157  ac_status=$?
23158  echo "$as_me:23158: \$? = $ac_status" >&5
23159  (exit "$ac_status"); }; }; then
23160  ac_cv_lib_dbmalloc_debug_malloc=yes
23161else
23162  echo "$as_me: failed program was:" >&5
23163cat "conftest.$ac_ext" >&5
23164ac_cv_lib_dbmalloc_debug_malloc=no
23165fi
23166rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23167LIBS=$ac_check_lib_save_LIBS
23168fi
23169echo "$as_me:23169: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
23170echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
23171if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
23172  cat >>confdefs.h <<EOF
23173#define HAVE_LIBDBMALLOC 1
23174EOF
23175
23176  LIBS="-ldbmalloc $LIBS"
23177
23178fi
23179
23180fi
23181
23182fi
23183
23184echo "$as_me:23184: checking if you want to use valgrind for testing" >&5
23185echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
23186
23187# Check whether --with-valgrind or --without-valgrind was given.
23188if test "${with_valgrind+set}" = set; then
23189  withval="$with_valgrind"
23190  case "x$withval" in
23191	(x|xno) ;;
23192	(*)
23193		: "${with_cflags:=-g}"
23194		: "${enable_leaks:=no}"
23195		with_valgrind=yes
23196
23197cat >>confdefs.h <<EOF
23198#define USE_VALGRIND 1
23199EOF
23200
23201		;;
23202	esac
23203else
23204  with_valgrind=
23205fi;
23206echo "$as_me:23206: result: ${with_valgrind:-no}" >&5
23207echo "${ECHO_T}${with_valgrind:-no}" >&6
23208
23209case ".$with_cflags" in
23210(.*-g*)
23211	case .$CFLAGS in
23212	(.*-g*)
23213		;;
23214	(*)
23215
23216cf_fix_cppflags=no
23217cf_new_cflags=
23218cf_new_cppflags=
23219cf_new_extra_cppflags=
23220
23221for cf_add_cflags in -g
23222do
23223case "$cf_fix_cppflags" in
23224(no)
23225	case "$cf_add_cflags" in
23226	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23227		case "$cf_add_cflags" in
23228		(-D*)
23229			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23230
23231			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23232				&& test -z "${cf_tst_cflags}" \
23233				&& cf_fix_cppflags=yes
23234
23235			if test "$cf_fix_cppflags" = yes ; then
23236
23237	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23238	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23239
23240				continue
23241			elif test "${cf_tst_cflags}" = "\"'" ; then
23242
23243	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23244	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23245
23246				continue
23247			fi
23248			;;
23249		esac
23250		case "$CPPFLAGS" in
23251		(*$cf_add_cflags)
23252			;;
23253		(*)
23254			case "$cf_add_cflags" in
23255			(-D*)
23256				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23257
23258CPPFLAGS=`echo "$CPPFLAGS" | \
23259	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23260		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23261
23262				;;
23263			esac
23264
23265	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23266	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23267
23268			;;
23269		esac
23270		;;
23271	(*)
23272
23273	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23274	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23275
23276		;;
23277	esac
23278	;;
23279(yes)
23280
23281	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23282	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23283
23284	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23285
23286	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23287		&& test -z "${cf_tst_cflags}" \
23288		&& cf_fix_cppflags=no
23289	;;
23290esac
23291done
23292
23293if test -n "$cf_new_cflags" ; then
23294
23295	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23296	CFLAGS="${CFLAGS}$cf_new_cflags"
23297
23298fi
23299
23300if test -n "$cf_new_cppflags" ; then
23301
23302	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23303	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23304
23305fi
23306
23307if test -n "$cf_new_extra_cppflags" ; then
23308
23309	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23310	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23311
23312fi
23313
23314		;;
23315	esac
23316	;;
23317esac
23318
23319echo "$as_me:23319: checking if you want to perform memory-leak testing" >&5
23320echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
23321
23322# Check whether --enable-leaks or --disable-leaks was given.
23323if test "${enable_leaks+set}" = set; then
23324  enableval="$enable_leaks"
23325  enable_leaks=$enableval
23326else
23327  enable_leaks=yes
23328fi;
23329if test "x$enable_leaks" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
23330echo "$as_me:23330: result: $with_no_leaks" >&5
23331echo "${ECHO_T}$with_no_leaks" >&6
23332
23333if test "$enable_leaks" = no ; then
23334
23335cat >>confdefs.h <<\EOF
23336#define NO_LEAKS 1
23337EOF
23338
23339cat >>confdefs.h <<\EOF
23340#define YY_NO_LEAKS 1
23341EOF
23342
23343fi
23344
23345echo "$as_me:23345: checking if you want to see long compiling messages" >&5
23346echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
23347
23348# Check whether --enable-echo or --disable-echo was given.
23349if test "${enable_echo+set}" = set; then
23350  enableval="$enable_echo"
23351  test "$enableval" != no && enableval=yes
23352	if test "$enableval" != "yes" ; then
23353
23354	ECHO_LT='--silent'
23355	ECHO_LD='@echo linking $@;'
23356	RULE_CC='@echo compiling $<'
23357	SHOW_CC='@echo compiling $@'
23358	ECHO_CC='@'
23359
23360	else
23361
23362	ECHO_LT=''
23363	ECHO_LD=''
23364	RULE_CC=''
23365	SHOW_CC=''
23366	ECHO_CC=''
23367
23368	fi
23369else
23370  enableval=yes
23371
23372	ECHO_LT=''
23373	ECHO_LD=''
23374	RULE_CC=''
23375	SHOW_CC=''
23376	ECHO_CC=''
23377
23378fi;
23379echo "$as_me:23379: result: $enableval" >&5
23380echo "${ECHO_T}$enableval" >&6
23381
23382echo "$as_me:23382: checking if you want magic cookie emulation" >&5
23383echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
23384
23385# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
23386if test "${enable_xmc_glitch+set}" = set; then
23387  enableval="$enable_xmc_glitch"
23388  test "$enableval" != yes && enableval=no
23389	if test "$enableval" != "no" ; then
23390    enable_xmc=yes
23391	else
23392		enable_xmc=no
23393	fi
23394else
23395  enableval=no
23396	enable_xmc=no
23397
23398fi;
23399echo "$as_me:23399: result: $enable_xmc" >&5
23400echo "${ECHO_T}$enable_xmc" >&6
23401if test "$enable_xmc" = yes ; then
23402
23403cat >>confdefs.h <<\EOF
23404#define OPT_XMC_GLITCH 1
23405EOF
23406
23407	EXTRASRCS="$EXTRASRCS testxmc.c"
23408	EXTRAOBJS="$EXTRAOBJS testxmc.o"
23409fi
23410
23411for ac_func in tigetstr
23412do
23413as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23414echo "$as_me:23414: checking for $ac_func" >&5
23415echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23416if eval "test \"\${$as_ac_var+set}\" = set"; then
23417  echo $ECHO_N "(cached) $ECHO_C" >&6
23418else
23419  cat >"conftest.$ac_ext" <<_ACEOF
23420#line 23420 "configure"
23421#include "confdefs.h"
23422#define $ac_func autoconf_temporary
23423#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23424#undef $ac_func
23425
23426#ifdef __cplusplus
23427extern "C"
23428#endif
23429
23430/* We use char because int might match the return type of a gcc2
23431   builtin and then its argument prototype would still apply.  */
23432char $ac_func (void);
23433
23434int
23435main (void)
23436{
23437
23438/* The GNU C library defines stubs for functions which it implements
23439    to always fail with ENOSYS.  Some functions are actually named
23440    something starting with __ and the normal name is an alias.  */
23441#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23442#error found stub for $ac_func
23443#endif
23444
23445	return $ac_func ();
23446  ;
23447  return 0;
23448}
23449_ACEOF
23450rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23451if { (eval echo "$as_me:23451: \"$ac_link\"") >&5
23452  (eval $ac_link) 2>&5
23453  ac_status=$?
23454  echo "$as_me:23454: \$? = $ac_status" >&5
23455  (exit "$ac_status"); } &&
23456         { ac_try='test -s "conftest$ac_exeext"'
23457  { (eval echo "$as_me:23457: \"$ac_try\"") >&5
23458  (eval $ac_try) 2>&5
23459  ac_status=$?
23460  echo "$as_me:23460: \$? = $ac_status" >&5
23461  (exit "$ac_status"); }; }; then
23462  eval "$as_ac_var=yes"
23463else
23464  echo "$as_me: failed program was:" >&5
23465cat "conftest.$ac_ext" >&5
23466eval "$as_ac_var=no"
23467fi
23468rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23469fi
23470echo "$as_me:23470: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23471echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23472if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23473  cat >>confdefs.h <<EOF
23474#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23475EOF
23476
23477fi
23478done
23479
23480if test -n "$cf_cv_lib_part_tgetent"; then
23481
23482for ac_func in use_extended_names
23483do
23484as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
23485echo "$as_me:23485: checking for $ac_func" >&5
23486echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
23487if eval "test \"\${$as_ac_var+set}\" = set"; then
23488  echo $ECHO_N "(cached) $ECHO_C" >&6
23489else
23490  cat >"conftest.$ac_ext" <<_ACEOF
23491#line 23491 "configure"
23492#include "confdefs.h"
23493#define $ac_func autoconf_temporary
23494#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
23495#undef $ac_func
23496
23497#ifdef __cplusplus
23498extern "C"
23499#endif
23500
23501/* We use char because int might match the return type of a gcc2
23502   builtin and then its argument prototype would still apply.  */
23503char $ac_func (void);
23504
23505int
23506main (void)
23507{
23508
23509/* The GNU C library defines stubs for functions which it implements
23510    to always fail with ENOSYS.  Some functions are actually named
23511    something starting with __ and the normal name is an alias.  */
23512#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
23513#error found stub for $ac_func
23514#endif
23515
23516	return $ac_func ();
23517  ;
23518  return 0;
23519}
23520_ACEOF
23521rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23522if { (eval echo "$as_me:23522: \"$ac_link\"") >&5
23523  (eval $ac_link) 2>&5
23524  ac_status=$?
23525  echo "$as_me:23525: \$? = $ac_status" >&5
23526  (exit "$ac_status"); } &&
23527         { ac_try='test -s "conftest$ac_exeext"'
23528  { (eval echo "$as_me:23528: \"$ac_try\"") >&5
23529  (eval $ac_try) 2>&5
23530  ac_status=$?
23531  echo "$as_me:23531: \$? = $ac_status" >&5
23532  (exit "$ac_status"); }; }; then
23533  eval "$as_ac_var=yes"
23534else
23535  echo "$as_me: failed program was:" >&5
23536cat "conftest.$ac_ext" >&5
23537eval "$as_ac_var=no"
23538fi
23539rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23540fi
23541echo "$as_me:23541: result: `eval echo '${'"$as_ac_var"'}'`" >&5
23542echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
23543if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
23544  cat >>confdefs.h <<EOF
23545#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
23546EOF
23547
23548fi
23549done
23550
23551fi
23552
23553echo "$as_me:23553: checking if you want to use C11 _Noreturn feature" >&5
23554echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
23555
23556# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
23557if test "${enable_stdnoreturn+set}" = set; then
23558  enableval="$enable_stdnoreturn"
23559  test "$enableval" != yes && enableval=no
23560	if test "$enableval" != "no" ; then
23561    enable_stdnoreturn=yes
23562	else
23563		enable_stdnoreturn=no
23564	fi
23565else
23566  enableval=no
23567	enable_stdnoreturn=no
23568
23569fi;
23570echo "$as_me:23570: result: $enable_stdnoreturn" >&5
23571echo "${ECHO_T}$enable_stdnoreturn" >&6
23572
23573if test $enable_stdnoreturn = yes; then
23574echo "$as_me:23574: checking for C11 _Noreturn feature" >&5
23575echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
23576if test "${cf_cv_c11_noreturn+set}" = set; then
23577  echo $ECHO_N "(cached) $ECHO_C" >&6
23578else
23579  cat >"conftest.$ac_ext" <<_ACEOF
23580#line 23580 "configure"
23581#include "confdefs.h"
23582
23583#include <stdio.h>
23584#include <stdlib.h>
23585#include <stdnoreturn.h>
23586static _Noreturn void giveup(void) { exit(0); }
23587
23588int
23589main (void)
23590{
23591if (feof(stdin)) giveup()
23592  ;
23593  return 0;
23594}
23595_ACEOF
23596rm -f "conftest.$ac_objext"
23597if { (eval echo "$as_me:23597: \"$ac_compile\"") >&5
23598  (eval $ac_compile) 2>&5
23599  ac_status=$?
23600  echo "$as_me:23600: \$? = $ac_status" >&5
23601  (exit "$ac_status"); } &&
23602         { ac_try='test -s "conftest.$ac_objext"'
23603  { (eval echo "$as_me:23603: \"$ac_try\"") >&5
23604  (eval $ac_try) 2>&5
23605  ac_status=$?
23606  echo "$as_me:23606: \$? = $ac_status" >&5
23607  (exit "$ac_status"); }; }; then
23608  cf_cv_c11_noreturn=yes
23609else
23610  echo "$as_me: failed program was:" >&5
23611cat "conftest.$ac_ext" >&5
23612cf_cv_c11_noreturn=no
23613fi
23614rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23615
23616fi
23617echo "$as_me:23617: result: $cf_cv_c11_noreturn" >&5
23618echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
23619else
23620	cf_cv_c11_noreturn=no,
23621fi
23622
23623if test "$cf_cv_c11_noreturn" = yes; then
23624
23625cat >>confdefs.h <<\EOF
23626#define HAVE_STDNORETURN_H 1
23627EOF
23628
23629cat >>confdefs.h <<EOF
23630#define STDC_NORETURN _Noreturn
23631EOF
23632
23633	HAVE_STDNORETURN_H=1
23634else
23635	HAVE_STDNORETURN_H=0
23636fi
23637
23638if test "$GCC" = yes || test "$GXX" = yes
23639then
23640
23641if test "$GCC" = yes || test "$GXX" = yes
23642then
23643	case $CFLAGS in
23644	(*-Werror=*)
23645		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
23646
23647echo "${as_me:-configure}:23647: testing repairing CFLAGS: $CFLAGS ..." 1>&5
23648
23649		cf_temp_flags=
23650		for cf_temp_scan in $CFLAGS
23651		do
23652			case "x$cf_temp_scan" in
23653			(x-Werror=*)
23654
23655	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23656	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23657
23658				;;
23659			(*)
23660
23661	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23662	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23663
23664				;;
23665			esac
23666		done
23667		CFLAGS="$cf_temp_flags"
23668		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
23669
23670echo "${as_me:-configure}:23670: testing ... fixed $CFLAGS ..." 1>&5
23671
23672		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23673
23674echo "${as_me:-configure}:23674: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23675
23676		;;
23677	esac
23678fi
23679
23680if test "$GCC" = yes || test "$GXX" = yes
23681then
23682	case $CPPFLAGS in
23683	(*-Werror=*)
23684		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
23685
23686echo "${as_me:-configure}:23686: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
23687
23688		cf_temp_flags=
23689		for cf_temp_scan in $CPPFLAGS
23690		do
23691			case "x$cf_temp_scan" in
23692			(x-Werror=*)
23693
23694	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23695	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23696
23697				;;
23698			(*)
23699
23700	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23701	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23702
23703				;;
23704			esac
23705		done
23706		CPPFLAGS="$cf_temp_flags"
23707		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
23708
23709echo "${as_me:-configure}:23709: testing ... fixed $CPPFLAGS ..." 1>&5
23710
23711		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23712
23713echo "${as_me:-configure}:23713: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23714
23715		;;
23716	esac
23717fi
23718
23719if test "$GCC" = yes || test "$GXX" = yes
23720then
23721	case $LDFLAGS in
23722	(*-Werror=*)
23723		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
23724
23725echo "${as_me:-configure}:23725: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
23726
23727		cf_temp_flags=
23728		for cf_temp_scan in $LDFLAGS
23729		do
23730			case "x$cf_temp_scan" in
23731			(x-Werror=*)
23732
23733	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
23734	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
23735
23736				;;
23737			(*)
23738
23739	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
23740	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
23741
23742				;;
23743			esac
23744		done
23745		LDFLAGS="$cf_temp_flags"
23746		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
23747
23748echo "${as_me:-configure}:23748: testing ... fixed $LDFLAGS ..." 1>&5
23749
23750		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
23751
23752echo "${as_me:-configure}:23752: testing ... extra $EXTRA_CFLAGS ..." 1>&5
23753
23754		;;
23755	esac
23756fi
23757
23758echo "$as_me:23758: checking if you want to turn on gcc warnings" >&5
23759echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
23760
23761# Check whether --enable-warnings or --disable-warnings was given.
23762if test "${enable_warnings+set}" = set; then
23763  enableval="$enable_warnings"
23764  test "$enableval" != yes && enableval=no
23765	if test "$enableval" != "no" ; then
23766    enable_warnings=yes
23767	else
23768		enable_warnings=no
23769	fi
23770else
23771  enableval=no
23772	enable_warnings=no
23773
23774fi;
23775echo "$as_me:23775: result: $enable_warnings" >&5
23776echo "${ECHO_T}$enable_warnings" >&6
23777if test "$enable_warnings" = "yes"
23778then
23779
23780if test "$GCC" = yes || test "$GXX" = yes
23781then
23782cat > conftest.i <<EOF
23783#ifndef GCC_PRINTF
23784#define GCC_PRINTF 0
23785#endif
23786#ifndef GCC_SCANF
23787#define GCC_SCANF 0
23788#endif
23789#ifndef GCC_NORETURN
23790#define GCC_NORETURN /* nothing */
23791#endif
23792#ifndef GCC_UNUSED
23793#define GCC_UNUSED /* nothing */
23794#endif
23795EOF
23796if test "$GCC" = yes
23797then
23798	{ echo "$as_me:23798: checking for $CC __attribute__ directives..." >&5
23799echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
23800cat > "conftest.$ac_ext" <<EOF
23801#line 23801 "${as_me:-configure}"
23802#include "confdefs.h"
23803#include "conftest.h"
23804#include "conftest.i"
23805#if	GCC_PRINTF
23806#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
23807#else
23808#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
23809#endif
23810#if	GCC_SCANF
23811#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
23812#else
23813#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
23814#endif
23815extern void wow(char *,...) GCC_SCANFLIKE(1,2);
23816extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
23817extern GCC_NORETURN void foo(void);
23818int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
23819EOF
23820	cf_printf_attribute=no
23821	cf_scanf_attribute=no
23822	for cf_attribute in scanf printf unused noreturn
23823	do
23824
23825cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
23826
23827		cf_directive="__attribute__(($cf_attribute))"
23828		echo "checking for $CC $cf_directive" 1>&5
23829
23830		case "$cf_attribute" in
23831		(printf)
23832			cf_printf_attribute=yes
23833			cat >conftest.h <<EOF
23834#define GCC_$cf_ATTRIBUTE 1
23835EOF
23836			;;
23837		(scanf)
23838			cf_scanf_attribute=yes
23839			cat >conftest.h <<EOF
23840#define GCC_$cf_ATTRIBUTE 1
23841EOF
23842			;;
23843		(*)
23844			cat >conftest.h <<EOF
23845#define GCC_$cf_ATTRIBUTE $cf_directive
23846EOF
23847			;;
23848		esac
23849
23850		if { (eval echo "$as_me:23850: \"$ac_compile\"") >&5
23851  (eval $ac_compile) 2>&5
23852  ac_status=$?
23853  echo "$as_me:23853: \$? = $ac_status" >&5
23854  (exit "$ac_status"); }; then
23855			test -n "$verbose" && echo "$as_me:23855: result: ... $cf_attribute" >&5
23856echo "${ECHO_T}... $cf_attribute" >&6
23857			cat conftest.h >>confdefs.h
23858			case "$cf_attribute" in
23859			(noreturn)
23860
23861cat >>confdefs.h <<EOF
23862#define GCC_NORETURN $cf_directive
23863EOF
23864
23865				;;
23866			(printf)
23867				cf_value='/* nothing */'
23868				if test "$cf_printf_attribute" != no ; then
23869					cf_value='__attribute__((format(printf,fmt,var)))'
23870
23871cat >>confdefs.h <<\EOF
23872#define GCC_PRINTF 1
23873EOF
23874
23875				fi
23876
23877cat >>confdefs.h <<EOF
23878#define GCC_PRINTFLIKE(fmt,var) $cf_value
23879EOF
23880
23881				;;
23882			(scanf)
23883				cf_value='/* nothing */'
23884				if test "$cf_scanf_attribute" != no ; then
23885					cf_value='__attribute__((format(scanf,fmt,var)))'
23886
23887cat >>confdefs.h <<\EOF
23888#define GCC_SCANF 1
23889EOF
23890
23891				fi
23892
23893cat >>confdefs.h <<EOF
23894#define GCC_SCANFLIKE(fmt,var) $cf_value
23895EOF
23896
23897				;;
23898			(unused)
23899
23900cat >>confdefs.h <<EOF
23901#define GCC_UNUSED $cf_directive
23902EOF
23903
23904				;;
23905			esac
23906		fi
23907	done
23908else
23909	${FGREP-fgrep} define conftest.i >>confdefs.h
23910fi
23911rm -rf ./conftest*
23912fi
23913
23914if test "x$have_x" = xyes; then
23915
23916cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
23917cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
23918cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
23919LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
23920for cf_X_CFLAGS in $X_CFLAGS
23921do
23922	case "x$cf_X_CFLAGS" in
23923	x-[IUD]*)
23924		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
23925		;;
23926	*)
23927		CFLAGS="$CFLAGS $cf_X_CFLAGS"
23928		;;
23929	esac
23930done
23931
23932cat >"conftest.$ac_ext" <<_ACEOF
23933#line 23933 "configure"
23934#include "confdefs.h"
23935
23936#include <stdlib.h>
23937#include <X11/Intrinsic.h>
23938
23939int
23940main (void)
23941{
23942String foo = malloc(1); free((void*)foo)
23943  ;
23944  return 0;
23945}
23946_ACEOF
23947rm -f "conftest.$ac_objext"
23948if { (eval echo "$as_me:23948: \"$ac_compile\"") >&5
23949  (eval $ac_compile) 2>&5
23950  ac_status=$?
23951  echo "$as_me:23951: \$? = $ac_status" >&5
23952  (exit "$ac_status"); } &&
23953         { ac_try='test -s "conftest.$ac_objext"'
23954  { (eval echo "$as_me:23954: \"$ac_try\"") >&5
23955  (eval $ac_try) 2>&5
23956  ac_status=$?
23957  echo "$as_me:23957: \$? = $ac_status" >&5
23958  (exit "$ac_status"); }; }; then
23959
23960echo "$as_me:23960: checking for X11/Xt const-feature" >&5
23961echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
23962if test "${cf_cv_const_x_string+set}" = set; then
23963  echo $ECHO_N "(cached) $ECHO_C" >&6
23964else
23965
23966	cat >"conftest.$ac_ext" <<_ACEOF
23967#line 23967 "configure"
23968#include "confdefs.h"
23969
23970#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
23971#undef  XTSTRINGDEFINES	/* X11R5 and later */
23972#include <stdlib.h>
23973#include <X11/Intrinsic.h>
23974
23975int
23976main (void)
23977{
23978String foo = malloc(1); *foo = 0
23979  ;
23980  return 0;
23981}
23982_ACEOF
23983rm -f "conftest.$ac_objext"
23984if { (eval echo "$as_me:23984: \"$ac_compile\"") >&5
23985  (eval $ac_compile) 2>&5
23986  ac_status=$?
23987  echo "$as_me:23987: \$? = $ac_status" >&5
23988  (exit "$ac_status"); } &&
23989         { ac_try='test -s "conftest.$ac_objext"'
23990  { (eval echo "$as_me:23990: \"$ac_try\"") >&5
23991  (eval $ac_try) 2>&5
23992  ac_status=$?
23993  echo "$as_me:23993: \$? = $ac_status" >&5
23994  (exit "$ac_status"); }; }; then
23995
23996			cf_cv_const_x_string=no
23997
23998else
23999  echo "$as_me: failed program was:" >&5
24000cat "conftest.$ac_ext" >&5
24001
24002			cf_cv_const_x_string=yes
24003
24004fi
24005rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24006
24007fi
24008echo "$as_me:24008: result: $cf_cv_const_x_string" >&5
24009echo "${ECHO_T}$cf_cv_const_x_string" >&6
24010
24011LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
24012CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
24013CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
24014
24015case "$cf_cv_const_x_string" in
24016(no)
24017
24018	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24019	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
24020
24021	;;
24022(*)
24023
24024	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24025	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
24026
24027	;;
24028esac
24029
24030else
24031  echo "$as_me: failed program was:" >&5
24032cat "conftest.$ac_ext" >&5
24033fi
24034rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24035 fi
24036cat > "conftest.$ac_ext" <<EOF
24037#line 24037 "${as_me:-configure}"
24038int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
24039EOF
24040if test "$INTEL_COMPILER" = yes
24041then
24042# The "-wdXXX" options suppress warnings:
24043# remark #1419: external declaration in primary source file
24044# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
24045# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
24046# remark #193: zero used for undefined preprocessing identifier
24047# remark #593: variable "curs_sb_left_arrow" was set but never used
24048# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
24049# remark #869: parameter "tw" was never referenced
24050# remark #981: operands are evaluated in unspecified order
24051# warning #279: controlling expression is constant
24052
24053	{ echo "$as_me:24053: checking for $CC warning options..." >&5
24054echo "$as_me: checking for $CC warning options..." >&6;}
24055	cf_save_CFLAGS="$CFLAGS"
24056	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
24057	for cf_opt in \
24058		wd1419 \
24059		wd1683 \
24060		wd1684 \
24061		wd193 \
24062		wd593 \
24063		wd279 \
24064		wd810 \
24065		wd869 \
24066		wd981
24067	do
24068		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24069		if { (eval echo "$as_me:24069: \"$ac_compile\"") >&5
24070  (eval $ac_compile) 2>&5
24071  ac_status=$?
24072  echo "$as_me:24072: \$? = $ac_status" >&5
24073  (exit "$ac_status"); }; then
24074			test -n "$verbose" && echo "$as_me:24074: result: ... -$cf_opt" >&5
24075echo "${ECHO_T}... -$cf_opt" >&6
24076			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24077		fi
24078	done
24079	CFLAGS="$cf_save_CFLAGS"
24080elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
24081then
24082	{ echo "$as_me:24082: checking for $CC warning options..." >&5
24083echo "$as_me: checking for $CC warning options..." >&6;}
24084	cf_save_CFLAGS="$CFLAGS"
24085	cf_warn_CONST=""
24086	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
24087	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
24088	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
24089	for cf_opt in W Wall \
24090		Wbad-function-cast \
24091		Wcast-align \
24092		Wcast-qual \
24093		Wdeclaration-after-statement \
24094		Wextra \
24095		Winline \
24096		Wmissing-declarations \
24097		Wmissing-prototypes \
24098		Wnested-externs \
24099		Wpointer-arith \
24100		Wshadow \
24101		Wstrict-prototypes \
24102		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum Wno-cast-qual
24103	do
24104		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
24105		if { (eval echo "$as_me:24105: \"$ac_compile\"") >&5
24106  (eval $ac_compile) 2>&5
24107  ac_status=$?
24108  echo "$as_me:24108: \$? = $ac_status" >&5
24109  (exit "$ac_status"); }; then
24110			test -n "$verbose" && echo "$as_me:24110: result: ... -$cf_opt" >&5
24111echo "${ECHO_T}... -$cf_opt" >&6
24112			case "$cf_opt" in
24113			(Winline)
24114				case "$GCC_VERSION" in
24115				([34].*)
24116					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
24117
24118echo "${as_me:-configure}:24118: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24119
24120					continue;;
24121				esac
24122				;;
24123			(Wpointer-arith)
24124				case "$GCC_VERSION" in
24125				([12].*)
24126					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
24127
24128echo "${as_me:-configure}:24128: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
24129
24130					continue;;
24131				esac
24132				;;
24133			esac
24134			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
24135		fi
24136	done
24137	CFLAGS="$cf_save_CFLAGS"
24138fi
24139rm -rf ./conftest*
24140
24141fi
24142
24143fi
24144
24145test "$disable_setuid" = yes &&
24146cat >>confdefs.h <<\EOF
24147#define DISABLE_SETUID 1
24148EOF
24149
24150test "$disable_setgid" = yes &&
24151cat >>confdefs.h <<\EOF
24152#define DISABLE_SETGID 1
24153EOF
24154
24155if test $disable_setuid = yes ; then
24156	MAY_SETUID="#"
24157	NOT_SETUID=
24158elif test $disable_setgid = yes ; then
24159	MAY_SETUID="#"
24160	NOT_SETUID=
24161else
24162	MAY_SETUID=
24163	NOT_SETUID="#"
24164fi
24165
24166###	remove from CPPFLAGS the optional features we define in xtermcfg.h
24167###	or other conflicting symbols that may be defined via imake:
24168for cf_def in \
24169	__STDC__ \
24170	ALLOWLOGGING \
24171	ALLOWLOGFILEEXEC \
24172	OPT_LUIT_PROG \
24173	OPT_WIDE_CHARS \
24174	SCROLLBAR_RIGHT \
24175	USE_TTY_GROUP \
24176	USE_UTEMPTER \
24177	XRENDERFONT
24178do
24179	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
24180done
24181
24182echo "$as_me:24182: checking if filesystem supports mixed-case filenames" >&5
24183echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
24184if test "${cf_cv_mixedcase+set}" = set; then
24185  echo $ECHO_N "(cached) $ECHO_C" >&6
24186else
24187
24188if test "$cross_compiling" = yes ; then
24189	case "$target_alias" in
24190	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
24191		cf_cv_mixedcase=no
24192		;;
24193	(*)
24194		cf_cv_mixedcase=yes
24195		;;
24196	esac
24197else
24198	rm -f conftest CONFTEST
24199	echo test >conftest
24200	if test -f CONFTEST ; then
24201		cf_cv_mixedcase=no
24202	else
24203		cf_cv_mixedcase=yes
24204	fi
24205	rm -f conftest CONFTEST
24206fi
24207
24208fi
24209echo "$as_me:24209: result: $cf_cv_mixedcase" >&5
24210echo "${ECHO_T}$cf_cv_mixedcase" >&6
24211test "$cf_cv_mixedcase" = yes &&
24212cat >>confdefs.h <<\EOF
24213#define MIXEDCASE_FILENAMES 1
24214EOF
24215
24216for ac_prog in exctags ctags
24217do
24218  # Extract the first word of "$ac_prog", so it can be a program name with args.
24219set dummy $ac_prog; ac_word=$2
24220echo "$as_me:24220: checking for $ac_word" >&5
24221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24222if test "${ac_cv_prog_CTAGS+set}" = set; then
24223  echo $ECHO_N "(cached) $ECHO_C" >&6
24224else
24225  if test -n "$CTAGS"; then
24226  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
24227else
24228  ac_save_IFS=$IFS; IFS=$ac_path_separator
24229ac_dummy="$PATH"
24230for ac_dir in $ac_dummy; do
24231  IFS=$ac_save_IFS
24232  test -z "$ac_dir" && ac_dir=.
24233  $as_executable_p "$ac_dir/$ac_word" || continue
24234ac_cv_prog_CTAGS="$ac_prog"
24235echo "$as_me:24235: found $ac_dir/$ac_word" >&5
24236break
24237done
24238
24239fi
24240fi
24241CTAGS=$ac_cv_prog_CTAGS
24242if test -n "$CTAGS"; then
24243  echo "$as_me:24243: result: $CTAGS" >&5
24244echo "${ECHO_T}$CTAGS" >&6
24245else
24246  echo "$as_me:24246: result: no" >&5
24247echo "${ECHO_T}no" >&6
24248fi
24249
24250  test -n "$CTAGS" && break
24251done
24252
24253for ac_prog in exetags etags
24254do
24255  # Extract the first word of "$ac_prog", so it can be a program name with args.
24256set dummy $ac_prog; ac_word=$2
24257echo "$as_me:24257: checking for $ac_word" >&5
24258echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24259if test "${ac_cv_prog_ETAGS+set}" = set; then
24260  echo $ECHO_N "(cached) $ECHO_C" >&6
24261else
24262  if test -n "$ETAGS"; then
24263  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
24264else
24265  ac_save_IFS=$IFS; IFS=$ac_path_separator
24266ac_dummy="$PATH"
24267for ac_dir in $ac_dummy; do
24268  IFS=$ac_save_IFS
24269  test -z "$ac_dir" && ac_dir=.
24270  $as_executable_p "$ac_dir/$ac_word" || continue
24271ac_cv_prog_ETAGS="$ac_prog"
24272echo "$as_me:24272: found $ac_dir/$ac_word" >&5
24273break
24274done
24275
24276fi
24277fi
24278ETAGS=$ac_cv_prog_ETAGS
24279if test -n "$ETAGS"; then
24280  echo "$as_me:24280: result: $ETAGS" >&5
24281echo "${ECHO_T}$ETAGS" >&6
24282else
24283  echo "$as_me:24283: result: no" >&5
24284echo "${ECHO_T}no" >&6
24285fi
24286
24287  test -n "$ETAGS" && break
24288done
24289
24290# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
24291set dummy ${CTAGS:-ctags}; ac_word=$2
24292echo "$as_me:24292: checking for $ac_word" >&5
24293echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24294if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
24295  echo $ECHO_N "(cached) $ECHO_C" >&6
24296else
24297  if test -n "$MAKE_LOWER_TAGS"; then
24298  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
24299else
24300  ac_save_IFS=$IFS; IFS=$ac_path_separator
24301ac_dummy="$PATH"
24302for ac_dir in $ac_dummy; do
24303  IFS=$ac_save_IFS
24304  test -z "$ac_dir" && ac_dir=.
24305  $as_executable_p "$ac_dir/$ac_word" || continue
24306ac_cv_prog_MAKE_LOWER_TAGS="yes"
24307echo "$as_me:24307: found $ac_dir/$ac_word" >&5
24308break
24309done
24310
24311  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
24312fi
24313fi
24314MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
24315if test -n "$MAKE_LOWER_TAGS"; then
24316  echo "$as_me:24316: result: $MAKE_LOWER_TAGS" >&5
24317echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
24318else
24319  echo "$as_me:24319: result: no" >&5
24320echo "${ECHO_T}no" >&6
24321fi
24322
24323if test "$cf_cv_mixedcase" = yes ; then
24324	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
24325set dummy ${ETAGS:-etags}; 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_MAKE_UPPER_TAGS+set}" = set; then
24329  echo $ECHO_N "(cached) $ECHO_C" >&6
24330else
24331  if test -n "$MAKE_UPPER_TAGS"; then
24332  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # 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_MAKE_UPPER_TAGS="yes"
24341echo "$as_me:24341: found $ac_dir/$ac_word" >&5
24342break
24343done
24344
24345  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
24346fi
24347fi
24348MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
24349if test -n "$MAKE_UPPER_TAGS"; then
24350  echo "$as_me:24350: result: $MAKE_UPPER_TAGS" >&5
24351echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
24352else
24353  echo "$as_me:24353: result: no" >&5
24354echo "${ECHO_T}no" >&6
24355fi
24356
24357else
24358	MAKE_UPPER_TAGS=no
24359fi
24360
24361if test "$MAKE_UPPER_TAGS" = yes ; then
24362	MAKE_UPPER_TAGS=
24363else
24364	MAKE_UPPER_TAGS="#"
24365fi
24366
24367if test "$MAKE_LOWER_TAGS" = yes ; then
24368	MAKE_LOWER_TAGS=
24369else
24370	MAKE_LOWER_TAGS="#"
24371fi
24372
24373LD_RPATH_OPT=
24374if test "x$cf_cv_enable_rpath" != xno
24375then
24376	echo "$as_me:24376: checking for an rpath option" >&5
24377echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
24378	case "$cf_cv_system_name" in
24379	(irix*)
24380		if test "$GCC" = yes; then
24381			LD_RPATH_OPT="-Wl,-rpath,"
24382		else
24383			LD_RPATH_OPT="-rpath "
24384		fi
24385		;;
24386	(linux*|gnu*|k*bsd*-gnu|freebsd*)
24387		LD_RPATH_OPT="-Wl,-rpath,"
24388		;;
24389	(openbsd[2-9].*|mirbsd*)
24390		LD_RPATH_OPT="-Wl,-rpath,"
24391		;;
24392	(dragonfly*)
24393		LD_RPATH_OPT="-rpath "
24394		;;
24395	(netbsd*)
24396		LD_RPATH_OPT="-Wl,-rpath,"
24397		;;
24398	(osf*|mls+*)
24399		LD_RPATH_OPT="-rpath "
24400		;;
24401	(solaris2*)
24402		LD_RPATH_OPT="-R"
24403		;;
24404	(*)
24405		;;
24406	esac
24407	echo "$as_me:24407: result: $LD_RPATH_OPT" >&5
24408echo "${ECHO_T}$LD_RPATH_OPT" >&6
24409
24410	case "x$LD_RPATH_OPT" in
24411	(x-R*)
24412		echo "$as_me:24412: checking if we need a space after rpath option" >&5
24413echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
24414		cf_save_LIBS="$LIBS"
24415
24416cf_add_libs="$LIBS"
24417# reverse order
24418cf_add_0lib=
24419for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24420# filter duplicates
24421for cf_add_1lib in $cf_add_0lib; do
24422	for cf_add_2lib in $cf_add_libs; do
24423		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24424			cf_add_1lib=
24425			break
24426		fi
24427	done
24428	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24429done
24430LIBS="$cf_add_libs"
24431
24432		cat >"conftest.$ac_ext" <<_ACEOF
24433#line 24433 "configure"
24434#include "confdefs.h"
24435
24436int
24437main (void)
24438{
24439
24440  ;
24441  return 0;
24442}
24443_ACEOF
24444rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24445if { (eval echo "$as_me:24445: \"$ac_link\"") >&5
24446  (eval $ac_link) 2>&5
24447  ac_status=$?
24448  echo "$as_me:24448: \$? = $ac_status" >&5
24449  (exit "$ac_status"); } &&
24450         { ac_try='test -s "conftest$ac_exeext"'
24451  { (eval echo "$as_me:24451: \"$ac_try\"") >&5
24452  (eval $ac_try) 2>&5
24453  ac_status=$?
24454  echo "$as_me:24454: \$? = $ac_status" >&5
24455  (exit "$ac_status"); }; }; then
24456  cf_rpath_space=no
24457else
24458  echo "$as_me: failed program was:" >&5
24459cat "conftest.$ac_ext" >&5
24460cf_rpath_space=yes
24461fi
24462rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24463		LIBS="$cf_save_LIBS"
24464		echo "$as_me:24464: result: $cf_rpath_space" >&5
24465echo "${ECHO_T}$cf_rpath_space" >&6
24466		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
24467		;;
24468	esac
24469fi
24470
24471echo "$as_me:24471: checking if rpath-hack should be disabled" >&5
24472echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
24473
24474# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
24475if test "${enable_rpath_hack+set}" = set; then
24476  enableval="$enable_rpath_hack"
24477  test "$enableval" != no && enableval=yes
24478	if test "$enableval" != "yes" ; then
24479    enable_rpath_hack=no
24480	else
24481		enable_rpath_hack=yes
24482	fi
24483else
24484  enableval=yes
24485	enable_rpath_hack=yes
24486
24487fi;
24488if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
24489echo "$as_me:24489: result: $cf_disable_rpath_hack" >&5
24490echo "${ECHO_T}$cf_disable_rpath_hack" >&6
24491
24492if test "$enable_rpath_hack" = yes ; then
24493
24494echo "$as_me:24494: checking for updated LDFLAGS" >&5
24495echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
24496if test -n "$LD_RPATH_OPT" ; then
24497	echo "$as_me:24497: result: maybe" >&5
24498echo "${ECHO_T}maybe" >&6
24499
24500	for ac_prog in ldd
24501do
24502  # Extract the first word of "$ac_prog", so it can be a program name with args.
24503set dummy $ac_prog; ac_word=$2
24504echo "$as_me:24504: checking for $ac_word" >&5
24505echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
24506if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
24507  echo $ECHO_N "(cached) $ECHO_C" >&6
24508else
24509  if test -n "$cf_ldd_prog"; then
24510  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
24511else
24512  ac_save_IFS=$IFS; IFS=$ac_path_separator
24513ac_dummy="$PATH"
24514for ac_dir in $ac_dummy; do
24515  IFS=$ac_save_IFS
24516  test -z "$ac_dir" && ac_dir=.
24517  $as_executable_p "$ac_dir/$ac_word" || continue
24518ac_cv_prog_cf_ldd_prog="$ac_prog"
24519echo "$as_me:24519: found $ac_dir/$ac_word" >&5
24520break
24521done
24522
24523fi
24524fi
24525cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
24526if test -n "$cf_ldd_prog"; then
24527  echo "$as_me:24527: result: $cf_ldd_prog" >&5
24528echo "${ECHO_T}$cf_ldd_prog" >&6
24529else
24530  echo "$as_me:24530: result: no" >&5
24531echo "${ECHO_T}no" >&6
24532fi
24533
24534  test -n "$cf_ldd_prog" && break
24535done
24536test -n "$cf_ldd_prog" || cf_ldd_prog="no"
24537
24538	cf_rpath_list="/usr/lib /lib"
24539	if test "$cf_ldd_prog" != no
24540	then
24541		cf_rpath_oops=
24542
24543cat >"conftest.$ac_ext" <<_ACEOF
24544#line 24544 "configure"
24545#include "confdefs.h"
24546#include <stdio.h>
24547int
24548main (void)
24549{
24550printf("Hello");
24551  ;
24552  return 0;
24553}
24554_ACEOF
24555rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24556if { (eval echo "$as_me:24556: \"$ac_link\"") >&5
24557  (eval $ac_link) 2>&5
24558  ac_status=$?
24559  echo "$as_me:24559: \$? = $ac_status" >&5
24560  (exit "$ac_status"); } &&
24561         { ac_try='test -s "conftest$ac_exeext"'
24562  { (eval echo "$as_me:24562: \"$ac_try\"") >&5
24563  (eval $ac_try) 2>&5
24564  ac_status=$?
24565  echo "$as_me:24565: \$? = $ac_status" >&5
24566  (exit "$ac_status"); }; }; then
24567  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
24568		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
24569else
24570  echo "$as_me: failed program was:" >&5
24571cat "conftest.$ac_ext" >&5
24572fi
24573rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24574
24575		# If we passed the link-test, but get a "not found" on a given library,
24576		# this could be due to inept reconfiguration of gcc to make it only
24577		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
24578		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
24579		# /usr/local libraries.
24580		if test -n "$cf_rpath_oops"
24581		then
24582			for cf_rpath_src in $cf_rpath_oops
24583			do
24584				for cf_rpath_dir in \
24585					/usr/local \
24586					/usr/pkg \
24587					/opt/sfw
24588				do
24589					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
24590					then
24591						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
24592
24593echo "${as_me:-configure}:24593: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
24594
24595						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
24596						break
24597					fi
24598				done
24599			done
24600		fi
24601	fi
24602
24603	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24604
24605echo "${as_me:-configure}:24605: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24606
24607test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
24608
24609echo "${as_me:-configure}:24609: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
24610
24611cf_rpath_dst=
24612for cf_rpath_src in $LDFLAGS
24613do
24614	case "$cf_rpath_src" in
24615	(-L*)
24616
24617		# check if this refers to a directory which we will ignore
24618		cf_rpath_skip=no
24619		if test -n "$cf_rpath_list"
24620		then
24621			for cf_rpath_item in $cf_rpath_list
24622			do
24623				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24624				then
24625					cf_rpath_skip=yes
24626					break
24627				fi
24628			done
24629		fi
24630
24631		if test "$cf_rpath_skip" = no
24632		then
24633			# transform the option
24634			if test "$LD_RPATH_OPT" = "-R " ; then
24635				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24636			else
24637				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24638			fi
24639
24640			# if we have not already added this, add it now
24641			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24642			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24643			then
24644				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24645
24646echo "${as_me:-configure}:24646: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24647
24648				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24649			fi
24650		fi
24651		;;
24652	esac
24653	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24654done
24655LDFLAGS=$cf_rpath_dst
24656
24657test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
24658
24659echo "${as_me:-configure}:24659: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
24660
24661test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
24662
24663echo "${as_me:-configure}:24663: testing ...checking LIBS $LIBS ..." 1>&5
24664
24665cf_rpath_dst=
24666for cf_rpath_src in $LIBS
24667do
24668	case "$cf_rpath_src" in
24669	(-L*)
24670
24671		# check if this refers to a directory which we will ignore
24672		cf_rpath_skip=no
24673		if test -n "$cf_rpath_list"
24674		then
24675			for cf_rpath_item in $cf_rpath_list
24676			do
24677				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
24678				then
24679					cf_rpath_skip=yes
24680					break
24681				fi
24682			done
24683		fi
24684
24685		if test "$cf_rpath_skip" = no
24686		then
24687			# transform the option
24688			if test "$LD_RPATH_OPT" = "-R " ; then
24689				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
24690			else
24691				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
24692			fi
24693
24694			# if we have not already added this, add it now
24695			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
24696			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
24697			then
24698				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
24699
24700echo "${as_me:-configure}:24700: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
24701
24702				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
24703			fi
24704		fi
24705		;;
24706	esac
24707	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
24708done
24709LIBS=$cf_rpath_dst
24710
24711test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
24712
24713echo "${as_me:-configure}:24713: testing ...checked LIBS $LIBS ..." 1>&5
24714
24715	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
24716
24717echo "${as_me:-configure}:24717: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
24718
24719else
24720	echo "$as_me:24720: result: no" >&5
24721echo "${ECHO_T}no" >&6
24722fi
24723
24724fi
24725
24726# Force plink.sh to not trim pcre's libraries, which have the same symbol
24727# names as the system regexp.
24728if test "$with_pcre" != no
24729then
24730	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
24731fi
24732
24733###	output xtermcfg.h, etc
24734ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
24735
24736cat >confcache <<\_ACEOF
24737# This file is a shell script that caches the results of configure
24738# tests run on this system so they can be shared between configure
24739# scripts and configure runs, see configure's option --config-cache.
24740# It is not useful on other systems.  If it contains results you don't
24741# want to keep, you may remove or edit it.
24742#
24743# config.status only pays attention to the cache file if you give it
24744# the --recheck option to rerun configure.
24745#
24746# `ac_cv_env_foo' variables (set or unset) will be overriden when
24747# loading this file, other *unset* `ac_cv_foo' will be assigned the
24748# following values.
24749
24750_ACEOF
24751
24752# The following way of writing the cache mishandles newlines in values,
24753# but we know of no workaround that is simple, portable, and efficient.
24754# So, don't put newlines in cache variables' values.
24755# Ultrix sh set writes to stderr and can't be redirected directly,
24756# and sets the high bit in the cache file unless we assign to the vars.
24757{
24758  (set) 2>&1 |
24759    case `(ac_space=' '; set | grep ac_space) 2>&1` in
24760    *ac_space=\ *)
24761      # `set' does not quote correctly, so add quotes (double-quote
24762      # substitution turns \\\\ into \\, and sed turns \\ into \).
24763      sed -n \
24764        "s/'/'\\\\''/g;
24765    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
24766      ;;
24767    *)
24768      # `set' quotes correctly as required by POSIX, so do not add quotes.
24769      sed -n \
24770        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
24771      ;;
24772    esac;
24773} |
24774  sed '
24775     t clear
24776     : clear
24777     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
24778     t end
24779     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
24780     : end' >>confcache
24781if cmp -s $cache_file confcache; then :; else
24782  if test -w $cache_file; then
24783    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
24784    cat confcache >$cache_file
24785  else
24786    echo "not updating unwritable cache $cache_file"
24787  fi
24788fi
24789rm -f confcache
24790
24791test "x$prefix" = xNONE && prefix=$ac_default_prefix
24792# Let make expand exec_prefix.
24793test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
24794
24795# VPATH may cause trouble with some makes, so we remove $(srcdir),
24796# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
24797# trailing colons and then remove the whole line if VPATH becomes empty
24798# (actually we leave an empty line to preserve line numbers).
24799if test "x$srcdir" = x.; then
24800  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
24801s/:*\$(srcdir):*/:/;
24802s/:*\${srcdir}:*/:/;
24803s/:*@srcdir@:*/:/;
24804s/^\([^=]*=[ 	]*\):*/\1/;
24805s/:*$//;
24806s/^[^=]*=[ 	]*$//;
24807}'
24808fi
24809
24810DEFS=-DHAVE_CONFIG_H
24811
24812: "${CONFIG_STATUS=./config.status}"
24813ac_clean_files_save=$ac_clean_files
24814ac_clean_files="$ac_clean_files $CONFIG_STATUS"
24815{ echo "$as_me:24815: creating $CONFIG_STATUS" >&5
24816echo "$as_me: creating $CONFIG_STATUS" >&6;}
24817cat >"$CONFIG_STATUS" <<_ACEOF
24818#! $SHELL
24819# Generated automatically by configure.
24820# Run this file to recreate the current configuration.
24821# Compiler output produced by configure, useful for debugging
24822# configure, is in config.log if it exists.
24823
24824debug=false
24825SHELL=\${CONFIG_SHELL-$SHELL}
24826ac_cs_invocation="\$0 \$@"
24827
24828CLICOLOR_FORCE= GREP_OPTIONS=
24829unset CLICOLOR_FORCE GREP_OPTIONS
24830_ACEOF
24831
24832cat >>"$CONFIG_STATUS" <<\_ACEOF
24833# Be Bourne compatible
24834if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
24835  emulate sh
24836  NULLCMD=:
24837elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
24838  set -o posix
24839fi
24840
24841# Name of the executable.
24842as_me=`echo "$0" |sed 's,.*[\\/],,'`
24843
24844if expr a : '\(a\)' >/dev/null 2>&1; then
24845  as_expr=expr
24846else
24847  as_expr=false
24848fi
24849
24850rm -f conf$$ conf$$.exe conf$$.file
24851echo >conf$$.file
24852if ln -s conf$$.file conf$$ 2>/dev/null; then
24853  # We could just check for DJGPP; but this test a) works b) is more generic
24854  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
24855  if test -f conf$$.exe; then
24856    # Don't use ln at all; we don't have any links
24857    as_ln_s='cp -p'
24858  else
24859    as_ln_s='ln -s'
24860  fi
24861elif ln conf$$.file conf$$ 2>/dev/null; then
24862  as_ln_s=ln
24863else
24864  as_ln_s='cp -p'
24865fi
24866rm -f conf$$ conf$$.exe conf$$.file
24867
24868as_executable_p="test -f"
24869
24870# Support unset when possible.
24871if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
24872  as_unset="unset"
24873else
24874  as_unset="false"
24875fi
24876
24877# NLS nuisances.
24878$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
24879$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
24880$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
24881$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
24882$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
24883$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
24884$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
24885$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
24886
24887# IFS
24888# We need space, tab and new line, in precisely that order.
24889as_nl='
24890'
24891IFS=" 	$as_nl"
24892
24893# CDPATH.
24894$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
24895
24896exec 6>&1
24897
24898_ACEOF
24899
24900# Files that config.status was made for.
24901if test -n "$ac_config_files"; then
24902  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
24903fi
24904
24905if test -n "$ac_config_headers"; then
24906  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
24907fi
24908
24909if test -n "$ac_config_links"; then
24910  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
24911fi
24912
24913if test -n "$ac_config_commands"; then
24914  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
24915fi
24916
24917cat >>"$CONFIG_STATUS" <<\EOF
24918
24919ac_cs_usage="\
24920\`$as_me' instantiates files from templates according to the
24921current configuration.
24922
24923Usage: $0 [OPTIONS] [FILE]...
24924
24925  -h, --help       print this help, then exit
24926  -V, --version    print version number, then exit
24927  -d, --debug      don't remove temporary files
24928      --recheck    update $as_me by reconfiguring in the same conditions
24929  --file=FILE[:TEMPLATE]
24930                   instantiate the configuration file FILE
24931  --header=FILE[:TEMPLATE]
24932                   instantiate the configuration header FILE
24933
24934Configuration files:
24935$config_files
24936
24937Configuration headers:
24938$config_headers
24939
24940Report bugs to <dickey@invisible-island.net>."
24941EOF
24942
24943cat >>"$CONFIG_STATUS" <<EOF
24944ac_cs_version="\\
24945config.status
24946configured by $0, generated by GNU Autoconf 2.52.20210509,
24947  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
24948
24949Copyright 2003-2020,2021	Thomas E. Dickey
24950Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
24951Free Software Foundation, Inc.
24952This config.status script is free software; the Free Software Foundation
24953gives unlimited permission to copy, distribute and modify it."
24954srcdir="$srcdir"
24955INSTALL="$INSTALL"
24956EOF
24957
24958cat >>"$CONFIG_STATUS" <<\EOF
24959# If no file are specified by the user, then we need to provide default
24960# value.  By we need to know if files were specified by the user.
24961ac_need_defaults=:
24962while test $# != 0
24963do
24964  case $1 in
24965  --*=*)
24966    ac_option=`expr "x$1" : 'x\([^=]*\)='`
24967    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
24968    shift
24969    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
24970    shift
24971    ;;
24972  -*);;
24973  *) # This is not an option, so the user has probably given explicit
24974     # arguments.
24975     ac_need_defaults=false;;
24976  esac
24977
24978  case $1 in
24979  # Handling of the options.
24980EOF
24981cat >>"$CONFIG_STATUS" <<EOF
24982  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
24983    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
24984    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
24985EOF
24986cat >>"$CONFIG_STATUS" <<\EOF
24987  --version | --vers* | -V )
24988    echo "$ac_cs_version"; exit 0 ;;
24989  --he | --h)
24990    # Conflict between --help and --header
24991    { { echo "$as_me:24991: error: ambiguous option: $1
24992Try \`$0 --help' for more information." >&5
24993echo "$as_me: error: ambiguous option: $1
24994Try \`$0 --help' for more information." >&2;}
24995   { (exit 1); exit 1; }; };;
24996  --help | --hel | -h )
24997    echo "$ac_cs_usage"; exit 0 ;;
24998  --debug | --d* | -d )
24999    debug=: ;;
25000  --file | --fil | --fi | --f )
25001    shift
25002    CONFIG_FILES="$CONFIG_FILES $1"
25003    ac_need_defaults=false;;
25004  --header | --heade | --head | --hea )
25005    shift
25006    CONFIG_HEADERS="$CONFIG_HEADERS $1"
25007    ac_need_defaults=false;;
25008
25009  # This is an error.
25010  -*) { { echo "$as_me:25010: error: unrecognized option: $1
25011Try \`$0 --help' for more information." >&5
25012echo "$as_me: error: unrecognized option: $1
25013Try \`$0 --help' for more information." >&2;}
25014   { (exit 1); exit 1; }; } ;;
25015
25016  *) ac_config_targets="$ac_config_targets $1" ;;
25017
25018  esac
25019  shift
25020done
25021
25022exec 5>>config.log
25023cat >&5 << _ACEOF
25024
25025## ----------------------- ##
25026## Running config.status.  ##
25027## ----------------------- ##
25028
25029This file was extended by $as_me 2.52.20210509, executed with
25030  CONFIG_FILES    = $CONFIG_FILES
25031  CONFIG_HEADERS  = $CONFIG_HEADERS
25032  CONFIG_LINKS    = $CONFIG_LINKS
25033  CONFIG_COMMANDS = $CONFIG_COMMANDS
25034  > "$ac_cs_invocation"
25035on `(hostname || uname -n) 2>/dev/null | sed 1q`
25036
25037_ACEOF
25038EOF
25039
25040cat >>"$CONFIG_STATUS" <<\EOF
25041for ac_config_target in $ac_config_targets
25042do
25043  case "$ac_config_target" in
25044  # Handling of arguments.
25045  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
25046  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
25047  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
25048  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
25049  *) { { echo "$as_me:25049: error: invalid argument: $ac_config_target" >&5
25050echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
25051   { (exit 1); exit 1; }; };;
25052  esac
25053done
25054
25055# If the user did not use the arguments to specify the items to instantiate,
25056# then the envvar interface is used.  Set only those that are not.
25057# We use the long form for the default assignment because of an extremely
25058# bizarre bug on SunOS 4.1.3.
25059if "$ac_need_defaults"; then
25060  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
25061  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
25062fi
25063
25064# Create a temporary directory, and hook for its removal unless debugging.
25065$debug ||
25066{
25067  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
25068  trap '{ (exit 1); exit 1; }' 1 2 13 15
25069}
25070
25071# Create a (secure) tmp directory for tmp files.
25072: ${TMPDIR=/tmp}
25073{
25074  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
25075  test -n "$tmp" && test -d "$tmp"
25076}  ||
25077{
25078  tmp=$TMPDIR/cs$$-$RANDOM
25079  (umask 077 && mkdir $tmp)
25080} ||
25081{
25082   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
25083   { (exit 1); exit 1; }
25084}
25085
25086EOF
25087
25088cat >>"$CONFIG_STATUS" <<EOF
25089
25090#
25091# CONFIG_FILES section.
25092#
25093
25094# No need to generate the scripts if there are no CONFIG_FILES.
25095# This happens for instance when ./config.status config.h
25096if test -n "\$CONFIG_FILES"; then
25097  # Protect against being on the right side of a sed subst in config.status.
25098  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
25099   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
25100s,@SHELL@,$SHELL,;t t
25101s,@exec_prefix@,$exec_prefix,;t t
25102s,@prefix@,$prefix,;t t
25103s,@program_transform_name@,$program_transform_name,;t t
25104s,@bindir@,$bindir,;t t
25105s,@sbindir@,$sbindir,;t t
25106s,@libexecdir@,$libexecdir,;t t
25107s,@datarootdir@,$datarootdir,;t t
25108s,@datadir@,$datadir,;t t
25109s,@sysconfdir@,$sysconfdir,;t t
25110s,@sharedstatedir@,$sharedstatedir,;t t
25111s,@localstatedir@,$localstatedir,;t t
25112s,@runstatedir@,$runstatedir,;t t
25113s,@libdir@,$libdir,;t t
25114s,@includedir@,$includedir,;t t
25115s,@oldincludedir@,$oldincludedir,;t t
25116s,@infodir@,$infodir,;t t
25117s,@mandir@,$mandir,;t t
25118s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
25119s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
25120s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
25121s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
25122s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
25123s,@build_alias@,$build_alias,;t t
25124s,@host_alias@,$host_alias,;t t
25125s,@target_alias@,$target_alias,;t t
25126s,@ECHO_C@,$ECHO_C,;t t
25127s,@ECHO_N@,$ECHO_N,;t t
25128s,@ECHO_T@,$ECHO_T,;t t
25129s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
25130s,@DEFS@,$DEFS,;t t
25131s,@LIBS@,$LIBS,;t t
25132s,@build@,$build,;t t
25133s,@build_cpu@,$build_cpu,;t t
25134s,@build_vendor@,$build_vendor,;t t
25135s,@build_os@,$build_os,;t t
25136s,@host@,$host,;t t
25137s,@host_cpu@,$host_cpu,;t t
25138s,@host_vendor@,$host_vendor,;t t
25139s,@host_os@,$host_os,;t t
25140s,@CC@,$CC,;t t
25141s,@CFLAGS@,$CFLAGS,;t t
25142s,@LDFLAGS@,$LDFLAGS,;t t
25143s,@CPPFLAGS@,$CPPFLAGS,;t t
25144s,@ac_ct_CC@,$ac_ct_CC,;t t
25145s,@EXEEXT@,$EXEEXT,;t t
25146s,@OBJEXT@,$OBJEXT,;t t
25147s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
25148s,@CPP@,$CPP,;t t
25149s,@GREP@,$GREP,;t t
25150s,@EGREP@,$EGREP,;t t
25151s,@AWK@,$AWK,;t t
25152s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
25153s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
25154s,@INSTALL_DATA@,$INSTALL_DATA,;t t
25155s,@LN_S@,$LN_S,;t t
25156s,@LINT@,$LINT,;t t
25157s,@LINT_OPTS@,$LINT_OPTS,;t t
25158s,@APP_CLASS@,$APP_CLASS,;t t
25159s,@APPSDIR@,$APPSDIR,;t t
25160s,@no_appsdir@,$no_appsdir,;t t
25161s,@ICON_NAME@,$ICON_NAME,;t t
25162s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
25163s,@PIXMAPDIR@,$PIXMAPDIR,;t t
25164s,@no_pixmapdir@,$no_pixmapdir,;t t
25165s,@ICONDIR@,$ICONDIR,;t t
25166s,@no_icondir@,$no_icondir,;t t
25167s,@ICON_FORMAT@,$ICON_FORMAT,;t t
25168s,@ICON_THEME@,$ICON_THEME,;t t
25169s,@ICON_LIST@,$ICON_LIST,;t t
25170s,@desktop_utils@,$desktop_utils,;t t
25171s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
25172s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
25173s,@XTERM_PATH@,$XTERM_PATH,;t t
25174s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
25175s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
25176s,@X_CFLAGS@,$X_CFLAGS,;t t
25177s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
25178s,@X_LIBS@,$X_LIBS,;t t
25179s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
25180s,@PKG_CONFIG@,$PKG_CONFIG,;t t
25181s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
25182s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
25183s,@IMAKE@,$IMAKE,;t t
25184s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
25185s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
25186s,@GROFF_PATH@,$GROFF_PATH,;t t
25187s,@NROFF_PATH@,$NROFF_PATH,;t t
25188s,@TBL_PATH@,$TBL_PATH,;t t
25189s,@GROFF_NOTE@,$GROFF_NOTE,;t t
25190s,@NROFF_NOTE@,$NROFF_NOTE,;t t
25191s,@FGREP@,$FGREP,;t t
25192s,@cf_man2html@,$cf_man2html,;t t
25193s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
25194s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
25195s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
25196s,@default_termid@,$default_termid,;t t
25197s,@default_TERM@,$default_TERM,;t t
25198s,@backarrow_is_bs@,$backarrow_is_bs,;t t
25199s,@backarrow_is_erase@,$backarrow_is_erase,;t t
25200s,@delete_is_del@,$delete_is_del,;t t
25201s,@initial_erase@,$initial_erase,;t t
25202s,@alt_sends_esc@,$alt_sends_esc,;t t
25203s,@meta_sends_esc@,$meta_sends_esc,;t t
25204s,@cf_tic_prog@,$cf_tic_prog,;t t
25205s,@no_ticprog@,$no_ticprog,;t t
25206s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
25207s,@SET_TERMINFO@,$SET_TERMINFO,;t t
25208s,@double_buffer@,$double_buffer,;t t
25209s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
25210s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
25211s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
25212s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
25213s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
25214s,@LUIT@,$LUIT,;t t
25215s,@ECHO_LT@,$ECHO_LT,;t t
25216s,@ECHO_LD@,$ECHO_LD,;t t
25217s,@RULE_CC@,$RULE_CC,;t t
25218s,@SHOW_CC@,$SHOW_CC,;t t
25219s,@ECHO_CC@,$ECHO_CC,;t t
25220s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
25221s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
25222s,@STDC_NORETURN@,$STDC_NORETURN,;t t
25223s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
25224s,@EXTRAHDRS@,$EXTRAHDRS,;t t
25225s,@EXTRASRCS@,$EXTRASRCS,;t t
25226s,@EXTRAOBJS@,$EXTRAOBJS,;t t
25227s,@MAY_SETUID@,$MAY_SETUID,;t t
25228s,@NOT_SETUID@,$NOT_SETUID,;t t
25229s,@CTAGS@,$CTAGS,;t t
25230s,@ETAGS@,$ETAGS,;t t
25231s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
25232s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
25233s,@cf_ldd_prog@,$cf_ldd_prog,;t t
25234s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
25235CEOF
25236
25237EOF
25238
25239  cat >>"$CONFIG_STATUS" <<\EOF
25240  # Split the substitutions into bite-sized pieces for seds with
25241  # small command number limits, like on Digital OSF/1 and HP-UX.
25242  ac_max_sed_lines=48
25243  ac_sed_frag=1 # Number of current file.
25244  ac_beg=1 # First line for current file.
25245  ac_end=$ac_max_sed_lines # Line after last line for current file.
25246  ac_more_lines=:
25247  ac_sed_cmds=
25248  while "$ac_more_lines"; do
25249    if test "$ac_beg" -gt 1; then
25250      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25251    else
25252      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
25253    fi
25254    if test ! -s $tmp/subs.frag; then
25255      ac_more_lines=false
25256    else
25257      # The purpose of the label and of the branching condition is to
25258      # speed up the sed processing (if there are no `@' at all, there
25259      # is no need to browse any of the substitutions).
25260      # These are the two extra sed commands mentioned above.
25261      (echo ':t
25262  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
25263      # It is possible to make a multiline substitution using escaped newlines.
25264      # Ensure that we do not split the substitution between script fragments.
25265      ac_BEG=$ac_end
25266      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
25267      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
25268      if test -s $tmp/subs.next; then
25269        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
25270        if test ! -s $tmp/subs.edit; then
25271          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
25272          if test ! -s $tmp/subs.edit; then
25273            if test "$ac_beg" -gt 1; then
25274              ac_end=`expr "$ac_end" - 1`
25275              continue
25276            fi
25277          fi
25278        fi
25279      fi
25280
25281      if test -z "$ac_sed_cmds"; then
25282        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
25283      else
25284        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
25285      fi
25286      ac_sed_frag=`expr "$ac_sed_frag" + 1`
25287      ac_beg=$ac_end
25288      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
25289    fi
25290  done
25291  if test -z "$ac_sed_cmds"; then
25292    ac_sed_cmds=cat
25293  fi
25294fi # test -n "$CONFIG_FILES"
25295
25296EOF
25297cat >>"$CONFIG_STATUS" <<\EOF
25298for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
25299  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25300  case "$ac_file" in
25301  - | *:- | *:-:* ) # input from stdin
25302        cat >$tmp/stdin
25303        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25304        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25305  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25306        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25307  * )   ac_file_in=$ac_file.in ;;
25308  esac
25309
25310  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
25311  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25312         X"$ac_file" : 'X\(//\)[^/]' \| \
25313         X"$ac_file" : 'X\(//\)$' \| \
25314         X"$ac_file" : 'X\(/\)' \| \
25315         .     : '\(.\)' 2>/dev/null ||
25316echo X"$ac_file" |
25317    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25318  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25319  	  /^X\(\/\/\)$/{ s//\1/; q; }
25320  	  /^X\(\/\).*/{ s//\1/; q; }
25321  	  s/.*/./; q'`
25322  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25323    { case "$ac_dir" in
25324  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25325  *)                      as_incr_dir=.;;
25326esac
25327as_dummy="$ac_dir"
25328for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25329  case $as_mkdir_dir in
25330    # Skip DOS drivespec
25331    ?:) as_incr_dir=$as_mkdir_dir ;;
25332    *)
25333      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25334      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25335    ;;
25336  esac
25337done; }
25338
25339    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
25340    # A "../" for each directory in $ac_dir_suffix.
25341    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
25342  else
25343    ac_dir_suffix= ac_dots=
25344  fi
25345
25346  case "$srcdir" in
25347  .)  ac_srcdir=.
25348      if test -z "$ac_dots"; then
25349         ac_top_srcdir=.
25350      else
25351         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
25352      fi ;;
25353  [\\/]* | ?:[\\/]* )
25354      ac_srcdir="$srcdir$ac_dir_suffix";
25355      ac_top_srcdir="$srcdir" ;;
25356  *) # Relative path.
25357    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
25358    ac_top_srcdir="$ac_dots$srcdir" ;;
25359  esac
25360
25361  case $INSTALL in
25362  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
25363  *) ac_INSTALL=$ac_dots$INSTALL ;;
25364  esac
25365
25366  if test x"$ac_file" != x-; then
25367    { echo "$as_me:25367: creating $ac_file" >&5
25368echo "$as_me: creating $ac_file" >&6;}
25369    rm -f "$ac_file"
25370  fi
25371  # Let's still pretend it is `configure' which instantiates (i.e., don't
25372  # use $as_me), people would be surprised to read:
25373  #    /* config.h.  Generated automatically by config.status.  */
25374  configure_input="Generated automatically from `echo $ac_file_in |
25375                                                 sed 's,.*/,,'` by configure."
25376
25377  # First look for the input files in the build tree, otherwise in the
25378  # src tree.
25379  ac_file_inputs=`IFS=:
25380    for f in $ac_file_in; do
25381      case $f in
25382      -) echo $tmp/stdin ;;
25383      [\\/$]*)
25384         # Absolute (can't be DOS-style, as IFS=:)
25385         test -f "$f" || { { echo "$as_me:25385: error: cannot find input file: $f" >&5
25386echo "$as_me: error: cannot find input file: $f" >&2;}
25387   { (exit 1); exit 1; }; }
25388         echo $f;;
25389      *) # Relative
25390         if test -f "$f"; then
25391           # Build tree
25392           echo $f
25393         elif test -f "$srcdir/$f"; then
25394           # Source tree
25395           echo "$srcdir/$f"
25396         else
25397           # /dev/null tree
25398           { { echo "$as_me:25398: error: cannot find input file: $f" >&5
25399echo "$as_me: error: cannot find input file: $f" >&2;}
25400   { (exit 1); exit 1; }; }
25401         fi;;
25402      esac
25403    done` || { (exit 1); exit 1; }
25404EOF
25405cat >>"$CONFIG_STATUS" <<\EOF
25406  ac_warn_datarootdir=no
25407  if test x"$ac_file" != x-; then
25408    for ac_item in $ac_file_inputs
25409    do
25410      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
25411      if test -n "$ac_seen"; then
25412        ac_used=`grep '@datarootdir@' "$ac_item"`
25413        if test -z "$ac_used"; then
25414          { echo "$as_me:25414: WARNING: datarootdir was used implicitly but not set:
25415$ac_seen" >&5
25416echo "$as_me: WARNING: datarootdir was used implicitly but not set:
25417$ac_seen" >&2;}
25418          ac_warn_datarootdir=yes
25419        fi
25420      fi
25421      ac_seen=`grep '${datarootdir}' "$ac_item"`
25422      if test -n "$ac_seen"; then
25423        { echo "$as_me:25423: WARNING: datarootdir was used explicitly but not set:
25424$ac_seen" >&5
25425echo "$as_me: WARNING: datarootdir was used explicitly but not set:
25426$ac_seen" >&2;}
25427        ac_warn_datarootdir=yes
25428      fi
25429    done
25430  fi
25431
25432if test "x$ac_warn_datarootdir" = xyes; then
25433  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
25434fi
25435
25436EOF
25437cat >>"$CONFIG_STATUS" <<EOF
25438  sed "$ac_vpsub
25439$extrasub
25440EOF
25441cat >>"$CONFIG_STATUS" <<\EOF
25442:t
25443/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
25444s,@configure_input@,$configure_input,;t t
25445s,@srcdir@,$ac_srcdir,;t t
25446s,@top_srcdir@,$ac_top_srcdir,;t t
25447s,@INSTALL@,$ac_INSTALL,;t t
25448" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
25449  rm -f $tmp/stdin
25450  if test x"$ac_file" != x-; then
25451    cp "$tmp/out" "$ac_file"
25452
25453    for ac_name in prefix exec_prefix datarootdir
25454    do
25455        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
25456        if test -n "$ac_seen"; then
25457            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
25458            if test -z "$ac_init"; then
25459              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
25460              { echo "$as_me:25460: WARNING: Variable $ac_name is used but was not set:
25461$ac_seen" >&5
25462echo "$as_me: WARNING: Variable $ac_name is used but was not set:
25463$ac_seen" >&2;}
25464            fi
25465        fi
25466    done
25467    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
25468    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
25469    if test -s $tmp/out; then
25470      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
25471      { echo "$as_me:25471: WARNING: Some variables may not be substituted:
25472$ac_seen" >&5
25473echo "$as_me: WARNING: Some variables may not be substituted:
25474$ac_seen" >&2;}
25475    fi
25476  else
25477    cat $tmp/out
25478  fi
25479  rm -f $tmp/out
25480
25481done
25482EOF
25483cat >>"$CONFIG_STATUS" <<\EOF
25484
25485#
25486# CONFIG_HEADER section.
25487#
25488
25489# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
25490# NAME is the cpp macro being defined and VALUE is the value it is being given.
25491#
25492# ac_d sets the value in "#define NAME VALUE" lines.
25493ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
25494ac_dB='[ 	].*$,\1#\2'
25495ac_dC=' '
25496ac_dD=',;t'
25497# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
25498ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25499ac_iB='\([ 	]\),\1#\2define\3'
25500ac_iC=' '
25501ac_iD='\4,;t'
25502# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
25503ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
25504ac_uB='$,\1#\2define\3'
25505ac_uC=' '
25506ac_uD=',;t'
25507
25508for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
25509  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
25510  case "$ac_file" in
25511  - | *:- | *:-:* ) # input from stdin
25512        cat >$tmp/stdin
25513        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25514        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25515  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
25516        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
25517  * )   ac_file_in=$ac_file.in ;;
25518  esac
25519
25520  test x"$ac_file" != x- && { echo "$as_me:25520: creating $ac_file" >&5
25521echo "$as_me: creating $ac_file" >&6;}
25522
25523  # First look for the input files in the build tree, otherwise in the
25524  # src tree.
25525  ac_file_inputs=`IFS=:
25526    for f in $ac_file_in; do
25527      case $f in
25528      -) echo $tmp/stdin ;;
25529      [\\/$]*)
25530         # Absolute (can't be DOS-style, as IFS=:)
25531         test -f "$f" || { { echo "$as_me:25531: error: cannot find input file: $f" >&5
25532echo "$as_me: error: cannot find input file: $f" >&2;}
25533   { (exit 1); exit 1; }; }
25534         echo $f;;
25535      *) # Relative
25536         if test -f "$f"; then
25537           # Build tree
25538           echo $f
25539         elif test -f "$srcdir/$f"; then
25540           # Source tree
25541           echo "$srcdir/$f"
25542         else
25543           # /dev/null tree
25544           { { echo "$as_me:25544: error: cannot find input file: $f" >&5
25545echo "$as_me: error: cannot find input file: $f" >&2;}
25546   { (exit 1); exit 1; }; }
25547         fi;;
25548      esac
25549    done` || { (exit 1); exit 1; }
25550  # Remove the trailing spaces.
25551  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
25552
25553EOF
25554
25555# Transform confdefs.h into two sed scripts, `conftest.defines' and
25556# `conftest.undefs', that substitutes the proper values into
25557# config.h.in to produce config.h.  The first handles `#define'
25558# templates, and the second `#undef' templates.
25559# And first: Protect against being on the right side of a sed subst in
25560# config.status.  Protect against being in an unquoted here document
25561# in config.status.
25562rm -f conftest.defines conftest.undefs
25563# Using a here document instead of a string reduces the quoting nightmare.
25564# Putting comments in sed scripts is not portable.
25565#
25566# `end' is used to avoid that the second main sed command (meant for
25567# 0-ary CPP macros) applies to n-ary macro definitions.
25568# See the Autoconf documentation for `clear'.
25569cat >confdef2sed.sed <<\EOF
25570s/[\\&,]/\\&/g
25571s,[\\$`],\\&,g
25572t clear
25573: clear
25574s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
25575t end
25576s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
25577: end
25578EOF
25579# If some macros were called several times there might be several times
25580# the same #defines, which is useless.  Nevertheless, we may not want to
25581# sort them, since we want the *last* AC-DEFINE to be honored.
25582uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
25583sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
25584sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
25585rm -f confdef2sed.sed
25586
25587# This sed command replaces #undef with comments.  This is necessary, for
25588# example, in the case of _POSIX_SOURCE, which is predefined and required
25589# on some systems where configure will not decide to define it.
25590cat >>conftest.undefs <<\EOF
25591s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
25592EOF
25593
25594# Break up conftest.defines because some shells have a limit on the size
25595# of here documents, and old seds have small limits too (100 cmds).
25596echo '  # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
25597echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>"$CONFIG_STATUS"
25598echo '  # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
25599echo '  :' >>"$CONFIG_STATUS"
25600rm -f conftest.tail
25601while grep . conftest.defines >/dev/null
25602do
25603  # Write a limited-size here document to $tmp/defines.sed.
25604  echo '  cat >$tmp/defines.sed <<CEOF' >>"$CONFIG_STATUS"
25605  # Speed up: don't consider the non `#define' lines.
25606  echo '/^[ 	]*#[ 	]*define/!b' >>"$CONFIG_STATUS"
25607  # Work around the forget-to-reset-the-flag bug.
25608  echo 't clr' >>"$CONFIG_STATUS"
25609  echo ': clr' >>"$CONFIG_STATUS"
25610  sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
25611  echo 'CEOF
25612  sed -f $tmp/defines.sed $tmp/in >$tmp/out
25613  rm -f $tmp/in
25614  mv $tmp/out $tmp/in
25615' >>"$CONFIG_STATUS"
25616  sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
25617  rm -f conftest.defines
25618  mv conftest.tail conftest.defines
25619done
25620rm -f conftest.defines
25621echo '  fi # egrep' >>"$CONFIG_STATUS"
25622echo >>"$CONFIG_STATUS"
25623
25624# Break up conftest.undefs because some shells have a limit on the size
25625# of here documents, and old seds have small limits too (100 cmds).
25626echo '  # Handle all the #undef templates' >>"$CONFIG_STATUS"
25627rm -f conftest.tail
25628while grep . conftest.undefs >/dev/null
25629do
25630  # Write a limited-size here document to $tmp/undefs.sed.
25631  echo '  cat >$tmp/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
25632  # Speed up: don't consider the non `#undef'
25633  echo '/^[ 	]*#[ 	]*undef/!b' >>"$CONFIG_STATUS"
25634  # Work around the forget-to-reset-the-flag bug.
25635  echo 't clr' >>"$CONFIG_STATUS"
25636  echo ': clr' >>"$CONFIG_STATUS"
25637  sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
25638  echo 'CEOF
25639  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
25640  rm -f $tmp/in
25641  mv $tmp/out $tmp/in
25642' >>"$CONFIG_STATUS"
25643  sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
25644  rm -f conftest.undefs
25645  mv conftest.tail conftest.undefs
25646done
25647rm -f conftest.undefs
25648
25649cat >>"$CONFIG_STATUS" <<\EOF
25650  # Let's still pretend it is `configure' which instantiates (i.e., don't
25651  # use $as_me), people would be surprised to read:
25652  #    /* config.h.  Generated automatically by config.status.  */
25653  if test x"$ac_file" = x-; then
25654    echo "/* Generated automatically by configure.  */" >$tmp/config.h
25655  else
25656    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
25657  fi
25658  cat $tmp/in >>$tmp/config.h
25659  rm -f $tmp/in
25660  if test x"$ac_file" != x-; then
25661    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
25662      { echo "$as_me:25662: $ac_file is unchanged" >&5
25663echo "$as_me: $ac_file is unchanged" >&6;}
25664    else
25665      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
25666         X"$ac_file" : 'X\(//\)[^/]' \| \
25667         X"$ac_file" : 'X\(//\)$' \| \
25668         X"$ac_file" : 'X\(/\)' \| \
25669         .     : '\(.\)' 2>/dev/null ||
25670echo X"$ac_file" |
25671    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
25672  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
25673  	  /^X\(\/\/\)$/{ s//\1/; q; }
25674  	  /^X\(\/\).*/{ s//\1/; q; }
25675  	  s/.*/./; q'`
25676      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
25677        { case "$ac_dir" in
25678  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
25679  *)                      as_incr_dir=.;;
25680esac
25681as_dummy="$ac_dir"
25682for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
25683  case $as_mkdir_dir in
25684    # Skip DOS drivespec
25685    ?:) as_incr_dir=$as_mkdir_dir ;;
25686    *)
25687      as_incr_dir=$as_incr_dir/$as_mkdir_dir
25688      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
25689    ;;
25690  esac
25691done; }
25692
25693      fi
25694      rm -f "$ac_file"
25695      mv "$tmp/config.h" "$ac_file"
25696    fi
25697  else
25698    cat $tmp/config.h
25699    rm -f $tmp/config.h
25700  fi
25701done
25702EOF
25703
25704cat >>"$CONFIG_STATUS" <<\EOF
25705
25706{ (exit 0); exit 0; }
25707EOF
25708chmod +x "$CONFIG_STATUS"
25709ac_clean_files=$ac_clean_files_save
25710
25711# configure is writing to config.log, and then calls config.status.
25712# config.status does its own redirection, appending to config.log.
25713# Unfortunately, on DOS this fails, as config.log is still kept open
25714# by configure, so config.status won't be able to write to it; its
25715# output is simply discarded.  So we exec the FD to /dev/null,
25716# effectively closing config.log, so it can be properly (re)opened and
25717# appended to by config.status.  When coming back to configure, we
25718# need to make the FD available again.
25719if test "$no_create" != yes; then
25720  ac_cs_success=:
25721  exec 5>/dev/null
25722  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
25723  exec 5>>config.log
25724  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
25725  # would make configure fail if this is the last instruction.
25726  "$ac_cs_success" || { (exit 1); exit 1; }
25727fi
25728
25729