configure revision 01037d57
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20141204.
4#
5# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
6# Free Software Foundation, Inc.
7# This configure script is free software; the Free Software Foundation
8# gives unlimited permission to copy, distribute and modify it.
9
10# Avoid depending upon Character Ranges.
11as_cr_letters='abcdefghijklmnopqrstuvwxyz'
12as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
13as_cr_Letters=$as_cr_letters$as_cr_LETTERS
14as_cr_digits='0123456789'
15as_cr_alnum=$as_cr_Letters$as_cr_digits
16
17# Sed expression to map a string onto a valid variable name.
18as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
19
20# Sed expression to map a string onto a valid CPP name.
21as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
22
23# Be Bourne compatible
24if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
25  emulate sh
26  NULLCMD=:
27elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
28  set -o posix
29fi
30
31# Name of the executable.
32as_me=`echo "$0" |sed 's,.*[\\/],,'`
33
34if expr a : '\(a\)' >/dev/null 2>&1; then
35  as_expr=expr
36else
37  as_expr=false
38fi
39
40rm -f conf$$ conf$$.exe conf$$.file
41echo >conf$$.file
42if ln -s conf$$.file conf$$ 2>/dev/null; then
43  # We could just check for DJGPP; but this test a) works b) is more generic
44  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
45  if test -f conf$$.exe; then
46    # Don't use ln at all; we don't have any links
47    as_ln_s='cp -p'
48  else
49    as_ln_s='ln -s'
50  fi
51elif ln conf$$.file conf$$ 2>/dev/null; then
52  as_ln_s=ln
53else
54  as_ln_s='cp -p'
55fi
56rm -f conf$$ conf$$.exe conf$$.file
57
58as_executable_p="test -f"
59
60# Support unset when possible.
61if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
62  as_unset=unset
63else
64  as_unset=false
65fi
66
67# NLS nuisances.
68$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
69$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
70$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
71$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
72$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
73$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
74$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
75$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
76
77# IFS
78# We need space, tab and new line, in precisely that order.
79as_nl='
80'
81IFS=" 	$as_nl"
82
83# CDPATH.
84$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
85
86# Name of the host.
87# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
88# so uname gets run too.
89ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
90
91exec 6>&1
92
93#
94# Initializations.
95#
96ac_default_prefix=/usr/local
97cross_compiling=no
98subdirs=
99MFLAGS= MAKEFLAGS=
100SHELL=${CONFIG_SHELL-/bin/sh}
101
102# Maximum number of lines to put in a shell here document.
103# This variable seems obsolete.  It should probably be removed, and
104# only ac_max_sed_lines should be used.
105: ${ac_max_here_lines=38}
106
107ac_unique_file="charproc.c"
108# Factoring default headers for most tests.
109ac_includes_default="\
110#include <stdio.h>
111#if HAVE_SYS_TYPES_H
112# include <sys/types.h>
113#endif
114#if HAVE_SYS_STAT_H
115# include <sys/stat.h>
116#endif
117#if STDC_HEADERS
118# include <stdlib.h>
119# include <stddef.h>
120#else
121# if HAVE_STDLIB_H
122#  include <stdlib.h>
123# endif
124#endif
125#if HAVE_STRING_H
126# if !STDC_HEADERS && HAVE_MEMORY_H
127#  include <memory.h>
128# endif
129# include <string.h>
130#endif
131#if HAVE_STRINGS_H
132# include <strings.h>
133#endif
134#if HAVE_INTTYPES_H
135# include <inttypes.h>
136#else
137# if HAVE_STDINT_H
138#  include <stdint.h>
139# endif
140#endif
141#if HAVE_UNISTD_H
142# include <unistd.h>
143#endif"
144
145# Initialize some variables set by options.
146ac_init_help=
147ac_init_version=false
148# The variables have the same names as the options, with
149# dashes changed to underlines.
150cache_file=/dev/null
151exec_prefix=NONE
152no_create=
153no_recursion=
154prefix=NONE
155program_prefix=NONE
156program_suffix=NONE
157program_transform_name=s,x,x,
158silent=
159site=
160srcdir=
161verbose=
162x_includes=NONE
163x_libraries=NONE
164
165# Installation directory options.
166# These are left unexpanded so users can "make install exec_prefix=/foo"
167# and all the variables that are supposed to be based on exec_prefix
168# by default will actually change.
169# Use braces instead of parens because sh, perl, etc. also accept them.
170bindir='${exec_prefix}/bin'
171sbindir='${exec_prefix}/sbin'
172libexecdir='${exec_prefix}/libexec'
173datarootdir='${prefix}/share'
174datadir='${datarootdir}'
175sysconfdir='${prefix}/etc'
176sharedstatedir='${prefix}/com'
177localstatedir='${prefix}/var'
178libdir='${exec_prefix}/lib'
179includedir='${prefix}/include'
180oldincludedir='/usr/include'
181infodir='${datarootdir}/info'
182mandir='${datarootdir}/man'
183
184# Identity of this package.
185PACKAGE_NAME=
186PACKAGE_TARNAME=
187PACKAGE_VERSION=
188PACKAGE_STRING=
189PACKAGE_BUGREPORT=
190
191ac_prev=
192for ac_option
193do
194  # If the previous option needs an argument, assign it.
195  if test -n "$ac_prev"; then
196    eval "$ac_prev=\$ac_option"
197    ac_prev=
198    continue
199  fi
200
201  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
202
203  # Accept the important Cygnus configure options, so we can diagnose typos.
204
205  case $ac_option in
206
207  -bindir | --bindir | --bindi | --bind | --bin | --bi)
208    ac_prev=bindir ;;
209  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
210    bindir=$ac_optarg ;;
211
212  -build | --build | --buil | --bui | --bu)
213    ac_prev=build_alias ;;
214  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
215    build_alias=$ac_optarg ;;
216
217  -cache-file | --cache-file | --cache-fil | --cache-fi \
218  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
219    ac_prev=cache_file ;;
220  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
221  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
222    cache_file=$ac_optarg ;;
223
224  --config-cache | -C)
225    cache_file=config.cache ;;
226
227  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
228    ac_prev=datadir ;;
229  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
230  | --da=*)
231    datadir=$ac_optarg ;;
232
233  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
234  | --dataroo | --dataro | --datar)
235    ac_prev=datarootdir ;;
236  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
237  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
238    datarootdir=$ac_optarg ;;
239
240  -disable-* | --disable-*)
241    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
242    # Reject names that are not valid shell variable names.
243    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
244      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
245   { (exit 1); exit 1; }; }
246    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
247    eval "enable_$ac_feature=no" ;;
248
249  -enable-* | --enable-*)
250    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
251    # Reject names that are not valid shell variable names.
252    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
253      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
254   { (exit 1); exit 1; }; }
255    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
256    case $ac_option in
257      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
258      *) ac_optarg=yes ;;
259    esac
260    eval "enable_$ac_feature='$ac_optarg'" ;;
261
262  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
263  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
264  | --exec | --exe | --ex)
265    ac_prev=exec_prefix ;;
266  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
267  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
268  | --exec=* | --exe=* | --ex=*)
269    exec_prefix=$ac_optarg ;;
270
271  -gas | --gas | --ga | --g)
272    # Obsolete; use --with-gas.
273    with_gas=yes ;;
274
275  -help | --help | --hel | --he | -h)
276    ac_init_help=long ;;
277  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
278    ac_init_help=recursive ;;
279  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
280    ac_init_help=short ;;
281
282  -host | --host | --hos | --ho)
283    ac_prev=host_alias ;;
284  -host=* | --host=* | --hos=* | --ho=*)
285    host_alias=$ac_optarg ;;
286
287  -includedir | --includedir | --includedi | --included | --include \
288  | --includ | --inclu | --incl | --inc)
289    ac_prev=includedir ;;
290  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
291  | --includ=* | --inclu=* | --incl=* | --inc=*)
292    includedir=$ac_optarg ;;
293
294  -infodir | --infodir | --infodi | --infod | --info | --inf)
295    ac_prev=infodir ;;
296  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
297    infodir=$ac_optarg ;;
298
299  -libdir | --libdir | --libdi | --libd)
300    ac_prev=libdir ;;
301  -libdir=* | --libdir=* | --libdi=* | --libd=*)
302    libdir=$ac_optarg ;;
303
304  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
305  | --libexe | --libex | --libe)
306    ac_prev=libexecdir ;;
307  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
308  | --libexe=* | --libex=* | --libe=*)
309    libexecdir=$ac_optarg ;;
310
311  -localstatedir | --localstatedir | --localstatedi | --localstated \
312  | --localstate | --localstat | --localsta | --localst \
313  | --locals | --local | --loca | --loc | --lo)
314    ac_prev=localstatedir ;;
315  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
316  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
317  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
318    localstatedir=$ac_optarg ;;
319
320  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
321    ac_prev=mandir ;;
322  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
323    mandir=$ac_optarg ;;
324
325  -nfp | --nfp | --nf)
326    # Obsolete; use --without-fp.
327    with_fp=no ;;
328
329  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
330  | --no-cr | --no-c)
331    no_create=yes ;;
332
333  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
334  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
335    no_recursion=yes ;;
336
337  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
338  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
339  | --oldin | --oldi | --old | --ol | --o)
340    ac_prev=oldincludedir ;;
341  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
342  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
343  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
344    oldincludedir=$ac_optarg ;;
345
346  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
347    ac_prev=prefix ;;
348  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
349    prefix=$ac_optarg ;;
350
351  -program-prefix | --program-prefix | --program-prefi | --program-pref \
352  | --program-pre | --program-pr | --program-p)
353    ac_prev=program_prefix ;;
354  -program-prefix=* | --program-prefix=* | --program-prefi=* \
355  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
356    program_prefix=$ac_optarg ;;
357
358  -program-suffix | --program-suffix | --program-suffi | --program-suff \
359  | --program-suf | --program-su | --program-s)
360    ac_prev=program_suffix ;;
361  -program-suffix=* | --program-suffix=* | --program-suffi=* \
362  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
363    program_suffix=$ac_optarg ;;
364
365  -program-transform-name | --program-transform-name \
366  | --program-transform-nam | --program-transform-na \
367  | --program-transform-n | --program-transform- \
368  | --program-transform | --program-transfor \
369  | --program-transfo | --program-transf \
370  | --program-trans | --program-tran \
371  | --progr-tra | --program-tr | --program-t)
372    ac_prev=program_transform_name ;;
373  -program-transform-name=* | --program-transform-name=* \
374  | --program-transform-nam=* | --program-transform-na=* \
375  | --program-transform-n=* | --program-transform-=* \
376  | --program-transform=* | --program-transfor=* \
377  | --program-transfo=* | --program-transf=* \
378  | --program-trans=* | --program-tran=* \
379  | --progr-tra=* | --program-tr=* | --program-t=*)
380    program_transform_name=$ac_optarg ;;
381
382  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
383  | -silent | --silent | --silen | --sile | --sil)
384    silent=yes ;;
385
386  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
387    ac_prev=sbindir ;;
388  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
389  | --sbi=* | --sb=*)
390    sbindir=$ac_optarg ;;
391
392  -sharedstatedir | --sharedstatedir | --sharedstatedi \
393  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
394  | --sharedst | --shareds | --shared | --share | --shar \
395  | --sha | --sh)
396    ac_prev=sharedstatedir ;;
397  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
398  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
399  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
400  | --sha=* | --sh=*)
401    sharedstatedir=$ac_optarg ;;
402
403  -site | --site | --sit)
404    ac_prev=site ;;
405  -site=* | --site=* | --sit=*)
406    site=$ac_optarg ;;
407
408  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
409    ac_prev=srcdir ;;
410  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
411    srcdir=$ac_optarg ;;
412
413  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
414  | --syscon | --sysco | --sysc | --sys | --sy)
415    ac_prev=sysconfdir ;;
416  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
417  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
418    sysconfdir=$ac_optarg ;;
419
420  -target | --target | --targe | --targ | --tar | --ta | --t)
421    ac_prev=target_alias ;;
422  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
423    target_alias=$ac_optarg ;;
424
425  -v | -verbose | --verbose | --verbos | --verbo | --verb)
426    verbose=yes ;;
427
428  -version | --version | --versio | --versi | --vers | -V)
429    ac_init_version=: ;;
430
431  -with-* | --with-*)
432    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
433    # Reject names that are not valid shell variable names.
434    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
435      { echo "$as_me: error: invalid package name: $ac_package" >&2
436   { (exit 1); exit 1; }; }
437    ac_package=`echo $ac_package| sed 's/-/_/g'`
438    case $ac_option in
439      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
440      *) ac_optarg=yes ;;
441    esac
442    eval "with_$ac_package='$ac_optarg'" ;;
443
444  -without-* | --without-*)
445    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
446    # Reject names that are not valid shell variable names.
447    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
448      { echo "$as_me: error: invalid package name: $ac_package" >&2
449   { (exit 1); exit 1; }; }
450    ac_package=`echo $ac_package | sed 's/-/_/g'`
451    eval "with_$ac_package=no" ;;
452
453  --x)
454    # Obsolete; use --with-x.
455    with_x=yes ;;
456
457  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
458  | --x-incl | --x-inc | --x-in | --x-i)
459    ac_prev=x_includes ;;
460  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
461  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
462    x_includes=$ac_optarg ;;
463
464  -x-libraries | --x-libraries | --x-librarie | --x-librari \
465  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
466    ac_prev=x_libraries ;;
467  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
468  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
469    x_libraries=$ac_optarg ;;
470
471  -*) { echo "$as_me: error: unrecognized option: $ac_option
472Try \`$0 --help' for more information." >&2
473   { (exit 1); exit 1; }; }
474    ;;
475
476  *=*)
477    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
478    # Reject names that are not valid shell variable names.
479    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
480      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
481   { (exit 1); exit 1; }; }
482    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
483    eval "$ac_envvar='$ac_optarg'"
484    export $ac_envvar ;;
485
486  *)
487    # FIXME: should be removed in autoconf 3.0.
488    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
489    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
490      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
491    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
492    ;;
493
494  esac
495done
496
497if test -n "$ac_prev"; then
498  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
499  { echo "$as_me: error: missing argument to $ac_option" >&2
500   { (exit 1); exit 1; }; }
501fi
502
503# Be sure to have absolute paths.
504for ac_var in exec_prefix prefix
505do
506  eval ac_val=$`echo $ac_var`
507  case $ac_val in
508    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
509    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
510   { (exit 1); exit 1; }; };;
511  esac
512done
513
514# Be sure to have absolute paths.
515for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
516              localstatedir libdir includedir oldincludedir infodir mandir
517do
518  eval ac_val=$`echo $ac_var`
519  case $ac_val in
520    [\\/$]* | ?:[\\/]* ) ;;
521    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
522   { (exit 1); exit 1; }; };;
523  esac
524done
525
526# There might be people who depend on the old broken behavior: `$host'
527# used to hold the argument of --host etc.
528build=$build_alias
529host=$host_alias
530target=$target_alias
531
532# FIXME: should be removed in autoconf 3.0.
533if test "x$host_alias" != x; then
534  if test "x$build_alias" = x; then
535    cross_compiling=maybe
536    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
537    If a cross compiler is detected then cross compile mode will be used." >&2
538  elif test "x$build_alias" != "x$host_alias"; then
539    cross_compiling=yes
540  fi
541fi
542
543ac_tool_prefix=
544test -n "$host_alias" && ac_tool_prefix=$host_alias-
545
546test "$silent" = yes && exec 6>/dev/null
547
548# Find the source files, if location was not specified.
549if test -z "$srcdir"; then
550  ac_srcdir_defaulted=yes
551  # Try the directory containing this script, then its parent.
552  ac_prog=$0
553  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
554  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
555  srcdir=$ac_confdir
556  if test ! -r $srcdir/$ac_unique_file; then
557    srcdir=..
558  fi
559else
560  ac_srcdir_defaulted=no
561fi
562if test ! -r $srcdir/$ac_unique_file; then
563  if test "$ac_srcdir_defaulted" = yes; then
564    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
565   { (exit 1); exit 1; }; }
566  else
567    { echo "$as_me: error: cannot find sources in $srcdir" >&2
568   { (exit 1); exit 1; }; }
569  fi
570fi
571srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
572ac_env_build_alias_set=${build_alias+set}
573ac_env_build_alias_value=$build_alias
574ac_cv_env_build_alias_set=${build_alias+set}
575ac_cv_env_build_alias_value=$build_alias
576ac_env_host_alias_set=${host_alias+set}
577ac_env_host_alias_value=$host_alias
578ac_cv_env_host_alias_set=${host_alias+set}
579ac_cv_env_host_alias_value=$host_alias
580ac_env_target_alias_set=${target_alias+set}
581ac_env_target_alias_value=$target_alias
582ac_cv_env_target_alias_set=${target_alias+set}
583ac_cv_env_target_alias_value=$target_alias
584ac_env_CC_set=${CC+set}
585ac_env_CC_value=$CC
586ac_cv_env_CC_set=${CC+set}
587ac_cv_env_CC_value=$CC
588ac_env_CFLAGS_set=${CFLAGS+set}
589ac_env_CFLAGS_value=$CFLAGS
590ac_cv_env_CFLAGS_set=${CFLAGS+set}
591ac_cv_env_CFLAGS_value=$CFLAGS
592ac_env_LDFLAGS_set=${LDFLAGS+set}
593ac_env_LDFLAGS_value=$LDFLAGS
594ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
595ac_cv_env_LDFLAGS_value=$LDFLAGS
596ac_env_CPPFLAGS_set=${CPPFLAGS+set}
597ac_env_CPPFLAGS_value=$CPPFLAGS
598ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
599ac_cv_env_CPPFLAGS_value=$CPPFLAGS
600ac_env_CPP_set=${CPP+set}
601ac_env_CPP_value=$CPP
602ac_cv_env_CPP_set=${CPP+set}
603ac_cv_env_CPP_value=$CPP
604
605#
606# Report the --help message.
607#
608if test "$ac_init_help" = "long"; then
609  # Omit some internal or obsolete options to make the list less imposing.
610  # This message is too long to be a string in the A/UX 3.1 sh.
611  cat <<EOF
612\`configure' configures this package to adapt to many kinds of systems.
613
614Usage: $0 [OPTION]... [VAR=VALUE]...
615
616To assign environment variables (e.g., CC, CFLAGS...), specify them as
617VAR=VALUE.  See below for descriptions of some of the useful variables.
618
619Defaults for the options are specified in brackets.
620
621Configuration:
622  -h, --help              display this help and exit
623      --help=short        display options specific to this package
624      --help=recursive    display the short help of all the included packages
625  -V, --version           display version information and exit
626  -q, --quiet, --silent   do not print \`checking...' messages
627      --cache-file=FILE   cache test results in FILE [disabled]
628  -C, --config-cache      alias for \`--cache-file=config.cache'
629  -n, --no-create         do not create output files
630      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
631
632EOF
633
634  cat <<EOF
635Installation directories:
636  --prefix=PREFIX         install architecture-independent files in PREFIX
637                          [$ac_default_prefix]
638  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
639                          [PREFIX]
640
641By default, \`make install' will install all the files in
642\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
643an installation prefix other than \`$ac_default_prefix' using \`--prefix',
644for instance \`--prefix=\$HOME'.
645
646For better control, use the options below.
647
648Fine tuning of the installation directories:
649  --bindir=DIR            user executables [EPREFIX/bin]
650  --sbindir=DIR           system admin executables [EPREFIX/sbin]
651  --libexecdir=DIR        program executables [EPREFIX/libexec]
652  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
653  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
654  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
655  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
656  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
657  --libdir=DIR            object code libraries [EPREFIX/lib]
658  --includedir=DIR        C header files [PREFIX/include]
659  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
660  --infodir=DIR           info documentation [DATAROOTDIR/info]
661  --mandir=DIR            man documentation [DATAROOTDIR/man]
662EOF
663
664  cat <<\EOF
665
666Program names:
667  --program-prefix=PREFIX            prepend PREFIX to installed program names
668  --program-suffix=SUFFIX            append SUFFIX to installed program names
669  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
670
671X features:
672  --x-includes=DIR    X include files are in DIR
673  --x-libraries=DIR   X library files are in DIR
674
675System types:
676  --build=BUILD           configure for building on BUILD [guessed]
677  --host=HOST       build programs to run on HOST [BUILD]
678EOF
679fi
680
681if test -n "$ac_init_help"; then
682
683  cat <<\EOF
684
685Optional Features:
686  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
687  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
688
689Optional Packages:
690  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
691  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
692
693Compile/Install Options:
694  --disable-full-tgetent  disable check for full tgetent function
695  --with-app-class=XXX    override X applications class (default XTerm)
696  --with-app-defaults=DIR directory in which to install resource files (EPREFIX/lib/X11/app-defaults)
697  --with-icon-name=XXXX   override icon name (default: xterm-color)
698  --with-icon-symlink=XXX make symbolic link for icon name (default: xterm)
699  --with-pixmapdir=DIR    directory in which to install pixmaps (DATADIR/pixmaps)
700  --with-icondir=DIR      directory in which to install icons for desktop
701  --with-icon-theme=XXX   install icons into desktop theme (hicolor)
702  --disable-desktop       disable install of xterm desktop files
703  --with-desktop-category=XXX  one or more desktop catgories or auto
704  --with-reference=XXX    program to use as permissions-reference
705  --with-xterm-symlink=XXX make symbolic link to installed xterm
706  --disable-openpty       disable openpty, prefer other interfaces
707  --disable-setuid        disable setuid in xterm, do not install setuid/setgid
708  --disable-setgid        disable setgid in xterm, do not install setuid/setgid
709  --with-setuid=XXX       use the given setuid user
710  --with-utmp-setgid=XXX  use setgid to match utmp/utmpx file
711  --with-utempter         use utempter library for access to utmp
712  --with-tty-group=XXX    use XXX for the tty-group
713  --with-x                use the X Window System
714  --with-pkg-config{=path} enable/disable use of pkg-config
715  --with-xpm=DIR          use Xpm library for colored icon, may specify path
716  --with-Xaw3d            link with Xaw 3d library
717  --with-Xaw3dxft         link with Xaw 3d xft library
718  --with-neXtaw           link with neXT Athena library
719  --with-XawPlus          link with Athena-Plus library
720  --enable-narrowproto    enable narrow prototypes for X libraries
721  --disable-imake         disable use of imake for definitions
722  --with-man2html=XXX     use XXX rather than groff
723Terminal Configuration:
724  --with-terminal-id=V    set default decTerminalID (default: vt420)
725  --with-terminal-type=T  set default $TERM (default: xterm)
726  --enable-backarrow-key  set default backarrowKey resource (default: true)
727  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
728  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
729  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)
730  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
731  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
732  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
733Optional Features:
734  --disable-active-icon   disable X11R6.3 active-icon feature
735  --disable-ansi-color    disable ANSI color
736  --disable-16-color      disable 16-color support
737  --enable-256-color      enable 256-color support
738  --enable-88-color       enable 88-color support
739  --disable-blink-cursor  disable support for blinking cursor
740  --enable-broken-osc     allow broken Linux OSC-strings
741  --disable-broken-st     disallow broken string-terminators
742  --enable-builtin-xpms   compile-in icon data
743  --disable-c1-print      disallow -k8 option for printable 128-159
744  --disable-bold-color    disable PC-style mapping of bold colors
745  --disable-color-class   disable separate color class resources
746  --disable-color-mode    disable default colorMode resource
747  --disable-highlighting  disable support for color highlighting
748  --disable-doublechars   disable support for double-size chars
749  --disable-boxchars      disable fallback-support for box chars
750  --enable-exec-xterm     enable "spawn-new-terminal" action
751  --enable-double-buffer  enable double-buffering
752  --disable-freetype      disable freetype library-support
753  --with-freetype-config  configure script to use for FreeType
754  --with-freetype-cflags  -D/-I options for compiling with FreeType
755  --with-freetype-libs    -L/-l options to link FreeType
756  --enable-hp-fkeys       enable support for HP-style function keys
757  --enable-sco-fkeys      enable support for SCO-style function keys
758  --disable-sun-fkeys     disable support for Sun-style function keys
759  --disable-fifo-lines    disable FIFO-storage for saved-lines
760  --disable-i18n          disable internationalization
761  --disable-initial-erase disable setup for stty erase
762  --disable-input-method  disable input-method
763  --enable-load-vt-fonts  enable load-vt-fonts() action
764  --enable-logging        enable logging
765  --enable-logfile-exec   enable exec'd logfile filter
766  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
767  --disable-num-lock      disable NumLock keypad support
768  --disable-paste64       disable get/set base64 selection data
769  --disable-pty-handshake disable pty-handshake support
770  --enable-readline-mouse enable support for mouse in readline applications
771  --disable-regex         disable regular-expression selections
772  --with-pcre             use PCRE for regular-expressions
773  --disable-rightbar      disable right-scrollbar support
774  --disable-samename      disable check for redundant name-change
775  --disable-selection-ops disable selection-action operations
776  --disable-session-mgt   disable support for session management
777  --disable-tcap-fkeys    disable termcap function-keys support
778  --disable-tcap-query    disable compiled-in termcap-query support
779  --disable-tek4014       disable tek4014 emulation
780  --enable-toolbar        compile-in toolbar for pulldown menus
781  --disable-vt52          disable VT52 emulation
782  --disable-wide-attrs    disable wide-attribute support
783  --disable-wide-chars    disable wide-character support
784  --enable-16bit-chars    enable 16-bit character support
785  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
786  --disable-luit          enable luit filter (Unicode translation)
787  --enable-dabbrev        enable dynamic-abbreviation support
788  --enable-dec-locator    enable DECterm Locator support
789  --enable-regis-graphics enable ReGIS graphics support
790  --enable-sixel-graphics enable sixel graphics support
791  --disable-rectangles    disable VT420 rectangle support
792  --disable-ziconbeep     disable -ziconbeep option
793Testing/development Options:
794  --enable-trace          test: set to enable debugging traces
795  --with-dmalloc          test: use Gray Watson's dmalloc library
796  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
797  --with-valgrind         test: use valgrind
798  --disable-leaks         test: free permanent memory, analyze leaks
799  --disable-echo          do not display "compiling" commands
800  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
801  --enable-warnings       test: turn on GCC compiler warnings
802  --disable-rpath-hack    don't add rpath options for additional libraries
803
804Some influential environment variables:
805  CC          C compiler command
806  CFLAGS      C compiler flags
807  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
808              nonstandard directory <lib dir>
809  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
810              headers in a nonstandard directory <include dir>
811  CPP         C preprocessor
812
813Use these variables to override the choices made by `configure' or to help
814it to find libraries and programs with nonstandard names/locations.
815
816EOF
817fi
818
819if test "$ac_init_help" = "recursive"; then
820  # If there are subdirs, report their specific --help.
821  ac_popdir=`pwd`
822  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
823    cd $ac_subdir
824    # A "../" for each directory in /$ac_subdir.
825    ac_dots=`echo $ac_subdir |
826             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
827
828    case $srcdir in
829    .) # No --srcdir option.  We are building in place.
830      ac_sub_srcdir=$srcdir ;;
831    [\\/]* | ?:[\\/]* ) # Absolute path.
832      ac_sub_srcdir=$srcdir/$ac_subdir ;;
833    *) # Relative path.
834      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
835    esac
836
837    # Check for guested configure; otherwise get Cygnus style configure.
838    if test -f $ac_sub_srcdir/configure.gnu; then
839      echo
840      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
841    elif test -f $ac_sub_srcdir/configure; then
842      echo
843      $SHELL $ac_sub_srcdir/configure  --help=recursive
844    elif test -f $ac_sub_srcdir/configure.ac ||
845           test -f $ac_sub_srcdir/configure.in; then
846      echo
847      $ac_configure --help
848    else
849      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
850    fi
851    cd $ac_popdir
852  done
853fi
854
855test -n "$ac_init_help" && exit 0
856if $ac_init_version; then
857  cat <<\EOF
858
859Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
860Free Software Foundation, Inc.
861This configure script is free software; the Free Software Foundation
862gives unlimited permission to copy, distribute and modify it.
863EOF
864  exit 0
865fi
866exec 5>config.log
867cat >&5 <<EOF
868This file contains any messages produced by compilers while
869running configure, to aid debugging if configure makes a mistake.
870
871It was created by $as_me, which was
872generated by GNU Autoconf 2.52.20141204.  Invocation command line was
873
874  $ $0 $@
875
876EOF
877{
878cat <<_ASUNAME
879## ---------- ##
880## Platform.  ##
881## ---------- ##
882
883hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
884uname -m = `(uname -m) 2>/dev/null || echo unknown`
885uname -r = `(uname -r) 2>/dev/null || echo unknown`
886uname -s = `(uname -s) 2>/dev/null || echo unknown`
887uname -v = `(uname -v) 2>/dev/null || echo unknown`
888
889/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
890/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
891
892/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
893/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
894/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
895hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
896/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
897/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
898/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
899
900PATH = $PATH
901
902_ASUNAME
903} >&5
904
905cat >&5 <<EOF
906## ------------ ##
907## Core tests.  ##
908## ------------ ##
909
910EOF
911
912# Keep a trace of the command line.
913# Strip out --no-create and --no-recursion so they do not pile up.
914# Also quote any args containing shell meta-characters.
915ac_configure_args=
916ac_sep=
917for ac_arg
918do
919  case $ac_arg in
920  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
921  | --no-cr | --no-c) ;;
922  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
923  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
924  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
925    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
926    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
927    ac_sep=" " ;;
928  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
929     ac_sep=" " ;;
930  esac
931  # Get rid of the leading space.
932done
933
934# When interrupted or exit'd, cleanup temporary files, and complete
935# config.log.  We remove comments because anyway the quotes in there
936# would cause problems or look ugly.
937trap 'exit_status=$?
938  # Save into config.log some information that might help in debugging.
939  echo >&5
940  echo "## ----------------- ##" >&5
941  echo "## Cache variables.  ##" >&5
942  echo "## ----------------- ##" >&5
943  echo >&5
944  # The following way of writing the cache mishandles newlines in values,
945{
946  (set) 2>&1 |
947    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
948    *ac_space=\ *)
949      sed -n \
950        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
951    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
952      ;;
953    *)
954      sed -n \
955        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
956      ;;
957    esac;
958} >&5
959  sed "/^$/d" confdefs.h >conftest.log
960  if test -s conftest.log; then
961    echo >&5
962    echo "## ------------ ##" >&5
963    echo "## confdefs.h.  ##" >&5
964    echo "## ------------ ##" >&5
965    echo >&5
966    cat conftest.log >&5
967  fi
968  (echo; echo) >&5
969  test "$ac_signal" != 0 &&
970    echo "$as_me: caught signal $ac_signal" >&5
971  echo "$as_me: exit $exit_status" >&5
972  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
973    exit $exit_status
974     ' 0
975for ac_signal in 1 2 13 15; do
976  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
977done
978ac_signal=0
979
980# confdefs.h avoids OS command line length limits that DEFS can exceed.
981rm -rf conftest* confdefs.h
982# AIX cpp loses on an empty file, so make sure it contains at least a newline.
983echo >confdefs.h
984
985# Let the site file select an alternate cache file if it wants to.
986# Prefer explicitly selected file to automatically selected ones.
987if test -z "$CONFIG_SITE"; then
988  if test "x$prefix" != xNONE; then
989    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
990  else
991    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
992  fi
993fi
994for ac_site_file in $CONFIG_SITE; do
995  if test -r "$ac_site_file"; then
996    { echo "$as_me:996: loading site script $ac_site_file" >&5
997echo "$as_me: loading site script $ac_site_file" >&6;}
998    cat "$ac_site_file" >&5
999    . "$ac_site_file"
1000  fi
1001done
1002
1003if test -r "$cache_file"; then
1004  # Some versions of bash will fail to source /dev/null (special
1005  # files actually), so we avoid doing that.
1006  if test -f "$cache_file"; then
1007    { echo "$as_me:1007: loading cache $cache_file" >&5
1008echo "$as_me: loading cache $cache_file" >&6;}
1009    case $cache_file in
1010      [\\/]* | ?:[\\/]* ) . $cache_file;;
1011      *)                      . ./$cache_file;;
1012    esac
1013  fi
1014else
1015  { echo "$as_me:1015: creating cache $cache_file" >&5
1016echo "$as_me: creating cache $cache_file" >&6;}
1017  >$cache_file
1018fi
1019
1020# Check that the precious variables saved in the cache have kept the same
1021# value.
1022ac_cache_corrupted=false
1023for ac_var in `(set) 2>&1 |
1024               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1025  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1026  eval ac_new_set=\$ac_env_${ac_var}_set
1027  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1028  eval ac_new_val="\$ac_env_${ac_var}_value"
1029  case $ac_old_set,$ac_new_set in
1030    set,)
1031      { echo "$as_me:1031: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1032echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1033      ac_cache_corrupted=: ;;
1034    ,set)
1035      { echo "$as_me:1035: error: \`$ac_var' was not set in the previous run" >&5
1036echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1037      ac_cache_corrupted=: ;;
1038    ,);;
1039    *)
1040      if test "x$ac_old_val" != "x$ac_new_val"; then
1041        { echo "$as_me:1041: error: \`$ac_var' has changed since the previous run:" >&5
1042echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1043        { echo "$as_me:1043:   former value:  $ac_old_val" >&5
1044echo "$as_me:   former value:  $ac_old_val" >&2;}
1045        { echo "$as_me:1045:   current value: $ac_new_val" >&5
1046echo "$as_me:   current value: $ac_new_val" >&2;}
1047        ac_cache_corrupted=:
1048      fi;;
1049  esac
1050  # Pass precious variables to config.status.  It doesn't matter if
1051  # we pass some twice (in addition to the command line arguments).
1052  if test "$ac_new_set" = set; then
1053    case $ac_new_val in
1054    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1055      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1056      ac_configure_args="$ac_configure_args '$ac_arg'"
1057      ;;
1058    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1059       ;;
1060    esac
1061  fi
1062done
1063if $ac_cache_corrupted; then
1064  { echo "$as_me:1064: error: changes in the environment can compromise the build" >&5
1065echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1066  { { echo "$as_me:1066: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1067echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1068   { (exit 1); exit 1; }; }
1069fi
1070
1071ac_ext=c
1072ac_cpp='$CPP $CPPFLAGS'
1073ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1074ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1075ac_compiler_gnu=$ac_cv_c_compiler_gnu
1076ac_main_return=return
1077
1078case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1079  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1080		   ECHO_T='	' ;;
1081  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1082  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1083esac
1084echo "#! $SHELL" >conftest.sh
1085echo  "exit 0"   >>conftest.sh
1086chmod +x conftest.sh
1087if { (echo "$as_me:1087: PATH=\".;.\"; conftest.sh") >&5
1088  (PATH=".;."; conftest.sh) 2>&5
1089  ac_status=$?
1090  echo "$as_me:1090: \$? = $ac_status" >&5
1091  (exit $ac_status); }; then
1092  ac_path_separator=';'
1093else
1094  ac_path_separator=:
1095fi
1096PATH_SEPARATOR="$ac_path_separator"
1097rm -f conftest.sh
1098
1099ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1100
1101ac_aux_dir=
1102for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1103  if test -f $ac_dir/install-sh; then
1104    ac_aux_dir=$ac_dir
1105    ac_install_sh="$ac_aux_dir/install-sh -c"
1106    break
1107  elif test -f $ac_dir/install.sh; then
1108    ac_aux_dir=$ac_dir
1109    ac_install_sh="$ac_aux_dir/install.sh -c"
1110    break
1111  elif test -f $ac_dir/shtool; then
1112    ac_aux_dir=$ac_dir
1113    ac_install_sh="$ac_aux_dir/shtool install -c"
1114    break
1115  fi
1116done
1117if test -z "$ac_aux_dir"; then
1118  { { echo "$as_me:1118: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1119echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1120   { (exit 1); exit 1; }; }
1121fi
1122ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1123ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1124ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1125
1126# Make sure we can run config.sub.
1127$ac_config_sub sun4 >/dev/null 2>&1 ||
1128  { { echo "$as_me:1128: error: cannot run $ac_config_sub" >&5
1129echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1130   { (exit 1); exit 1; }; }
1131
1132echo "$as_me:1132: checking build system type" >&5
1133echo $ECHO_N "checking build system type... $ECHO_C" >&6
1134if test "${ac_cv_build+set}" = set; then
1135  echo $ECHO_N "(cached) $ECHO_C" >&6
1136else
1137  ac_cv_build_alias=$build_alias
1138test -z "$ac_cv_build_alias" &&
1139  ac_cv_build_alias=`$ac_config_guess`
1140test -z "$ac_cv_build_alias" &&
1141  { { echo "$as_me:1141: error: cannot guess build type; you must specify one" >&5
1142echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1143   { (exit 1); exit 1; }; }
1144ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1145  { { echo "$as_me:1145: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1146echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1147   { (exit 1); exit 1; }; }
1148
1149fi
1150echo "$as_me:1150: result: $ac_cv_build" >&5
1151echo "${ECHO_T}$ac_cv_build" >&6
1152build=$ac_cv_build
1153build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1154build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1155build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1156
1157if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1158	echo "$as_me:1158: checking host system type" >&5
1159echo $ECHO_N "checking host system type... $ECHO_C" >&6
1160if test "${ac_cv_host+set}" = set; then
1161  echo $ECHO_N "(cached) $ECHO_C" >&6
1162else
1163  ac_cv_host_alias=$host_alias
1164test -z "$ac_cv_host_alias" &&
1165  ac_cv_host_alias=$ac_cv_build_alias
1166ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1167  { { echo "$as_me:1167: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1168echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1169   { (exit 1); exit 1; }; }
1170
1171fi
1172echo "$as_me:1172: result: $ac_cv_host" >&5
1173echo "${ECHO_T}$ac_cv_host" >&6
1174host=$ac_cv_host
1175host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1176host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1177host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1178
1179	system_name="$host_os"
1180else
1181	system_name="`(uname -s -r) 2>/dev/null`"
1182	if test -z "$system_name" ; then
1183		system_name="`(hostname) 2>/dev/null`"
1184	fi
1185fi
1186test -n "$system_name" &&
1187cat >>confdefs.h <<EOF
1188#define SYSTEM_NAME "$system_name"
1189EOF
1190
1191if test "${cf_cv_system_name+set}" = set; then
1192  echo $ECHO_N "(cached) $ECHO_C" >&6
1193else
1194  cf_cv_system_name="$system_name"
1195fi
1196
1197test -z "$system_name" && system_name="$cf_cv_system_name"
1198test -n "$cf_cv_system_name" && echo "$as_me:1198: result: Configuring for $cf_cv_system_name" >&5
1199echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1200
1201if test ".$system_name" != ".$cf_cv_system_name" ; then
1202	echo "$as_me:1202: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1203echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1204	{ { echo "$as_me:1204: error: \"Please remove config.cache and try again.\"" >&5
1205echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1206   { (exit 1); exit 1; }; }
1207fi
1208
1209###	checks for alternative programs
1210
1211case "$host_os" in
1212(openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1213		: ${CPPFLAGS="-D_ALL_SOURCE"}
1214		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1215		: ${CC=c89};;
1216(darwin*)
1217		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1218esac
1219
1220ac_ext=c
1221ac_cpp='$CPP $CPPFLAGS'
1222ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1223ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1224ac_compiler_gnu=$ac_cv_c_compiler_gnu
1225ac_main_return=return
1226if test -n "$ac_tool_prefix"; then
1227  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1228set dummy ${ac_tool_prefix}gcc; ac_word=$2
1229echo "$as_me:1229: checking for $ac_word" >&5
1230echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1231if test "${ac_cv_prog_CC+set}" = set; then
1232  echo $ECHO_N "(cached) $ECHO_C" >&6
1233else
1234  if test -n "$CC"; then
1235  ac_cv_prog_CC="$CC" # Let the user override the test.
1236else
1237  ac_save_IFS=$IFS; IFS=$ac_path_separator
1238ac_dummy="$PATH"
1239for ac_dir in $ac_dummy; do
1240  IFS=$ac_save_IFS
1241  test -z "$ac_dir" && ac_dir=.
1242  $as_executable_p "$ac_dir/$ac_word" || continue
1243ac_cv_prog_CC="${ac_tool_prefix}gcc"
1244echo "$as_me:1244: found $ac_dir/$ac_word" >&5
1245break
1246done
1247
1248fi
1249fi
1250CC=$ac_cv_prog_CC
1251if test -n "$CC"; then
1252  echo "$as_me:1252: result: $CC" >&5
1253echo "${ECHO_T}$CC" >&6
1254else
1255  echo "$as_me:1255: result: no" >&5
1256echo "${ECHO_T}no" >&6
1257fi
1258
1259fi
1260if test -z "$ac_cv_prog_CC"; then
1261  ac_ct_CC=$CC
1262  # Extract the first word of "gcc", so it can be a program name with args.
1263set dummy gcc; ac_word=$2
1264echo "$as_me:1264: checking for $ac_word" >&5
1265echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1266if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1267  echo $ECHO_N "(cached) $ECHO_C" >&6
1268else
1269  if test -n "$ac_ct_CC"; then
1270  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1271else
1272  ac_save_IFS=$IFS; IFS=$ac_path_separator
1273ac_dummy="$PATH"
1274for ac_dir in $ac_dummy; do
1275  IFS=$ac_save_IFS
1276  test -z "$ac_dir" && ac_dir=.
1277  $as_executable_p "$ac_dir/$ac_word" || continue
1278ac_cv_prog_ac_ct_CC="gcc"
1279echo "$as_me:1279: found $ac_dir/$ac_word" >&5
1280break
1281done
1282
1283fi
1284fi
1285ac_ct_CC=$ac_cv_prog_ac_ct_CC
1286if test -n "$ac_ct_CC"; then
1287  echo "$as_me:1287: result: $ac_ct_CC" >&5
1288echo "${ECHO_T}$ac_ct_CC" >&6
1289else
1290  echo "$as_me:1290: result: no" >&5
1291echo "${ECHO_T}no" >&6
1292fi
1293
1294  CC=$ac_ct_CC
1295else
1296  CC="$ac_cv_prog_CC"
1297fi
1298
1299if test -z "$CC"; then
1300  if test -n "$ac_tool_prefix"; then
1301  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1302set dummy ${ac_tool_prefix}cc; ac_word=$2
1303echo "$as_me:1303: checking for $ac_word" >&5
1304echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1305if test "${ac_cv_prog_CC+set}" = set; then
1306  echo $ECHO_N "(cached) $ECHO_C" >&6
1307else
1308  if test -n "$CC"; then
1309  ac_cv_prog_CC="$CC" # Let the user override the test.
1310else
1311  ac_save_IFS=$IFS; IFS=$ac_path_separator
1312ac_dummy="$PATH"
1313for ac_dir in $ac_dummy; do
1314  IFS=$ac_save_IFS
1315  test -z "$ac_dir" && ac_dir=.
1316  $as_executable_p "$ac_dir/$ac_word" || continue
1317ac_cv_prog_CC="${ac_tool_prefix}cc"
1318echo "$as_me:1318: found $ac_dir/$ac_word" >&5
1319break
1320done
1321
1322fi
1323fi
1324CC=$ac_cv_prog_CC
1325if test -n "$CC"; then
1326  echo "$as_me:1326: result: $CC" >&5
1327echo "${ECHO_T}$CC" >&6
1328else
1329  echo "$as_me:1329: result: no" >&5
1330echo "${ECHO_T}no" >&6
1331fi
1332
1333fi
1334if test -z "$ac_cv_prog_CC"; then
1335  ac_ct_CC=$CC
1336  # Extract the first word of "cc", so it can be a program name with args.
1337set dummy cc; ac_word=$2
1338echo "$as_me:1338: checking for $ac_word" >&5
1339echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1340if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1341  echo $ECHO_N "(cached) $ECHO_C" >&6
1342else
1343  if test -n "$ac_ct_CC"; then
1344  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1345else
1346  ac_save_IFS=$IFS; IFS=$ac_path_separator
1347ac_dummy="$PATH"
1348for ac_dir in $ac_dummy; do
1349  IFS=$ac_save_IFS
1350  test -z "$ac_dir" && ac_dir=.
1351  $as_executable_p "$ac_dir/$ac_word" || continue
1352ac_cv_prog_ac_ct_CC="cc"
1353echo "$as_me:1353: found $ac_dir/$ac_word" >&5
1354break
1355done
1356
1357fi
1358fi
1359ac_ct_CC=$ac_cv_prog_ac_ct_CC
1360if test -n "$ac_ct_CC"; then
1361  echo "$as_me:1361: result: $ac_ct_CC" >&5
1362echo "${ECHO_T}$ac_ct_CC" >&6
1363else
1364  echo "$as_me:1364: result: no" >&5
1365echo "${ECHO_T}no" >&6
1366fi
1367
1368  CC=$ac_ct_CC
1369else
1370  CC="$ac_cv_prog_CC"
1371fi
1372
1373fi
1374if test -z "$CC"; then
1375  # Extract the first word of "cc", so it can be a program name with args.
1376set dummy cc; ac_word=$2
1377echo "$as_me:1377: checking for $ac_word" >&5
1378echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1379if test "${ac_cv_prog_CC+set}" = set; then
1380  echo $ECHO_N "(cached) $ECHO_C" >&6
1381else
1382  if test -n "$CC"; then
1383  ac_cv_prog_CC="$CC" # Let the user override the test.
1384else
1385  ac_prog_rejected=no
1386  ac_save_IFS=$IFS; IFS=$ac_path_separator
1387ac_dummy="$PATH"
1388for ac_dir in $ac_dummy; do
1389  IFS=$ac_save_IFS
1390  test -z "$ac_dir" && ac_dir=.
1391  $as_executable_p "$ac_dir/$ac_word" || continue
1392if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1393  ac_prog_rejected=yes
1394  continue
1395fi
1396ac_cv_prog_CC="cc"
1397echo "$as_me:1397: found $ac_dir/$ac_word" >&5
1398break
1399done
1400
1401if test $ac_prog_rejected = yes; then
1402  # We found a bogon in the path, so make sure we never use it.
1403  set dummy $ac_cv_prog_CC
1404  shift
1405  if test $# != 0; then
1406    # We chose a different compiler from the bogus one.
1407    # However, it has the same basename, so the bogon will be chosen
1408    # first if we set CC to just the basename; use the full file name.
1409    shift
1410    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1411    shift
1412    ac_cv_prog_CC="$@"
1413  fi
1414fi
1415fi
1416fi
1417CC=$ac_cv_prog_CC
1418if test -n "$CC"; then
1419  echo "$as_me:1419: result: $CC" >&5
1420echo "${ECHO_T}$CC" >&6
1421else
1422  echo "$as_me:1422: result: no" >&5
1423echo "${ECHO_T}no" >&6
1424fi
1425
1426fi
1427if test -z "$CC"; then
1428  if test -n "$ac_tool_prefix"; then
1429  for ac_prog in cl
1430  do
1431    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1432set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1433echo "$as_me:1433: checking for $ac_word" >&5
1434echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1435if test "${ac_cv_prog_CC+set}" = set; then
1436  echo $ECHO_N "(cached) $ECHO_C" >&6
1437else
1438  if test -n "$CC"; then
1439  ac_cv_prog_CC="$CC" # Let the user override the test.
1440else
1441  ac_save_IFS=$IFS; IFS=$ac_path_separator
1442ac_dummy="$PATH"
1443for ac_dir in $ac_dummy; do
1444  IFS=$ac_save_IFS
1445  test -z "$ac_dir" && ac_dir=.
1446  $as_executable_p "$ac_dir/$ac_word" || continue
1447ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1448echo "$as_me:1448: found $ac_dir/$ac_word" >&5
1449break
1450done
1451
1452fi
1453fi
1454CC=$ac_cv_prog_CC
1455if test -n "$CC"; then
1456  echo "$as_me:1456: result: $CC" >&5
1457echo "${ECHO_T}$CC" >&6
1458else
1459  echo "$as_me:1459: result: no" >&5
1460echo "${ECHO_T}no" >&6
1461fi
1462
1463    test -n "$CC" && break
1464  done
1465fi
1466if test -z "$CC"; then
1467  ac_ct_CC=$CC
1468  for ac_prog in cl
1469do
1470  # Extract the first word of "$ac_prog", so it can be a program name with args.
1471set dummy $ac_prog; ac_word=$2
1472echo "$as_me:1472: checking for $ac_word" >&5
1473echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1474if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1475  echo $ECHO_N "(cached) $ECHO_C" >&6
1476else
1477  if test -n "$ac_ct_CC"; then
1478  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1479else
1480  ac_save_IFS=$IFS; IFS=$ac_path_separator
1481ac_dummy="$PATH"
1482for ac_dir in $ac_dummy; do
1483  IFS=$ac_save_IFS
1484  test -z "$ac_dir" && ac_dir=.
1485  $as_executable_p "$ac_dir/$ac_word" || continue
1486ac_cv_prog_ac_ct_CC="$ac_prog"
1487echo "$as_me:1487: found $ac_dir/$ac_word" >&5
1488break
1489done
1490
1491fi
1492fi
1493ac_ct_CC=$ac_cv_prog_ac_ct_CC
1494if test -n "$ac_ct_CC"; then
1495  echo "$as_me:1495: result: $ac_ct_CC" >&5
1496echo "${ECHO_T}$ac_ct_CC" >&6
1497else
1498  echo "$as_me:1498: result: no" >&5
1499echo "${ECHO_T}no" >&6
1500fi
1501
1502  test -n "$ac_ct_CC" && break
1503done
1504
1505  CC=$ac_ct_CC
1506fi
1507
1508fi
1509
1510test -z "$CC" && { { echo "$as_me:1510: error: no acceptable cc found in \$PATH" >&5
1511echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1512   { (exit 1); exit 1; }; }
1513
1514# Provide some information about the compiler.
1515echo "$as_me:1515:" \
1516     "checking for C compiler version" >&5
1517ac_compiler=`set X $ac_compile; echo $2`
1518{ (eval echo "$as_me:1518: \"$ac_compiler --version </dev/null >&5\"") >&5
1519  (eval $ac_compiler --version </dev/null >&5) 2>&5
1520  ac_status=$?
1521  echo "$as_me:1521: \$? = $ac_status" >&5
1522  (exit $ac_status); }
1523{ (eval echo "$as_me:1523: \"$ac_compiler -v </dev/null >&5\"") >&5
1524  (eval $ac_compiler -v </dev/null >&5) 2>&5
1525  ac_status=$?
1526  echo "$as_me:1526: \$? = $ac_status" >&5
1527  (exit $ac_status); }
1528{ (eval echo "$as_me:1528: \"$ac_compiler -V </dev/null >&5\"") >&5
1529  (eval $ac_compiler -V </dev/null >&5) 2>&5
1530  ac_status=$?
1531  echo "$as_me:1531: \$? = $ac_status" >&5
1532  (exit $ac_status); }
1533
1534cat >conftest.$ac_ext <<_ACEOF
1535#line 1535 "configure"
1536#include "confdefs.h"
1537
1538int
1539main ()
1540{
1541
1542  ;
1543  return 0;
1544}
1545_ACEOF
1546ac_clean_files_save=$ac_clean_files
1547ac_clean_files="$ac_clean_files a.out a.exe"
1548# Try to create an executable without -o first, disregard a.out.
1549# It will help us diagnose broken compilers, and finding out an intuition
1550# of exeext.
1551echo "$as_me:1551: checking for C compiler default output" >&5
1552echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1553ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1554if { (eval echo "$as_me:1554: \"$ac_link_default\"") >&5
1555  (eval $ac_link_default) 2>&5
1556  ac_status=$?
1557  echo "$as_me:1557: \$? = $ac_status" >&5
1558  (exit $ac_status); }; then
1559  # Find the output, starting from the most likely.  This scheme is
1560# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1561# resort.
1562for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1563                ls a.out conftest 2>/dev/null;
1564                ls a.* conftest.* 2>/dev/null`; do
1565  case $ac_file in
1566    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1567    a.out ) # We found the default executable, but exeext='' is most
1568            # certainly right.
1569            break;;
1570    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1571          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1572          export ac_cv_exeext
1573          break;;
1574    * ) break;;
1575  esac
1576done
1577else
1578  echo "$as_me: failed program was:" >&5
1579cat conftest.$ac_ext >&5
1580{ { echo "$as_me:1580: error: C compiler cannot create executables" >&5
1581echo "$as_me: error: C compiler cannot create executables" >&2;}
1582   { (exit 77); exit 77; }; }
1583fi
1584
1585ac_exeext=$ac_cv_exeext
1586echo "$as_me:1586: result: $ac_file" >&5
1587echo "${ECHO_T}$ac_file" >&6
1588
1589# Check the compiler produces executables we can run.  If not, either
1590# the compiler is broken, or we cross compile.
1591echo "$as_me:1591: checking whether the C compiler works" >&5
1592echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1593# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1594# If not cross compiling, check that we can run a simple program.
1595if test "$cross_compiling" != yes; then
1596  if { ac_try='./$ac_file'
1597  { (eval echo "$as_me:1597: \"$ac_try\"") >&5
1598  (eval $ac_try) 2>&5
1599  ac_status=$?
1600  echo "$as_me:1600: \$? = $ac_status" >&5
1601  (exit $ac_status); }; }; then
1602    cross_compiling=no
1603  else
1604    if test "$cross_compiling" = maybe; then
1605	cross_compiling=yes
1606    else
1607	{ { echo "$as_me:1607: error: cannot run C compiled programs.
1608If you meant to cross compile, use \`--host'." >&5
1609echo "$as_me: error: cannot run C compiled programs.
1610If you meant to cross compile, use \`--host'." >&2;}
1611   { (exit 1); exit 1; }; }
1612    fi
1613  fi
1614fi
1615echo "$as_me:1615: result: yes" >&5
1616echo "${ECHO_T}yes" >&6
1617
1618rm -f a.out a.exe conftest$ac_cv_exeext
1619ac_clean_files=$ac_clean_files_save
1620# Check the compiler produces executables we can run.  If not, either
1621# the compiler is broken, or we cross compile.
1622echo "$as_me:1622: checking whether we are cross compiling" >&5
1623echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1624echo "$as_me:1624: result: $cross_compiling" >&5
1625echo "${ECHO_T}$cross_compiling" >&6
1626
1627echo "$as_me:1627: checking for executable suffix" >&5
1628echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1629if { (eval echo "$as_me:1629: \"$ac_link\"") >&5
1630  (eval $ac_link) 2>&5
1631  ac_status=$?
1632  echo "$as_me:1632: \$? = $ac_status" >&5
1633  (exit $ac_status); }; then
1634  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1635# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1636# work properly (i.e., refer to `conftest.exe'), while it won't with
1637# `rm'.
1638for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1639  case $ac_file in
1640    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1641    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1642          export ac_cv_exeext
1643          break;;
1644    * ) break;;
1645  esac
1646done
1647else
1648  { { echo "$as_me:1648: error: cannot compute EXEEXT: cannot compile and link" >&5
1649echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1650   { (exit 1); exit 1; }; }
1651fi
1652
1653rm -f conftest$ac_cv_exeext
1654echo "$as_me:1654: result: $ac_cv_exeext" >&5
1655echo "${ECHO_T}$ac_cv_exeext" >&6
1656
1657rm -f conftest.$ac_ext
1658EXEEXT=$ac_cv_exeext
1659ac_exeext=$EXEEXT
1660echo "$as_me:1660: checking for object suffix" >&5
1661echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1662if test "${ac_cv_objext+set}" = set; then
1663  echo $ECHO_N "(cached) $ECHO_C" >&6
1664else
1665  cat >conftest.$ac_ext <<_ACEOF
1666#line 1666 "configure"
1667#include "confdefs.h"
1668
1669int
1670main ()
1671{
1672
1673  ;
1674  return 0;
1675}
1676_ACEOF
1677rm -f conftest.o conftest.obj
1678if { (eval echo "$as_me:1678: \"$ac_compile\"") >&5
1679  (eval $ac_compile) 2>&5
1680  ac_status=$?
1681  echo "$as_me:1681: \$? = $ac_status" >&5
1682  (exit $ac_status); }; then
1683  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1684  case $ac_file in
1685    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1686    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1687       break;;
1688  esac
1689done
1690else
1691  echo "$as_me: failed program was:" >&5
1692cat conftest.$ac_ext >&5
1693{ { echo "$as_me:1693: error: cannot compute OBJEXT: cannot compile" >&5
1694echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1695   { (exit 1); exit 1; }; }
1696fi
1697
1698rm -f conftest.$ac_cv_objext conftest.$ac_ext
1699fi
1700echo "$as_me:1700: result: $ac_cv_objext" >&5
1701echo "${ECHO_T}$ac_cv_objext" >&6
1702OBJEXT=$ac_cv_objext
1703ac_objext=$OBJEXT
1704echo "$as_me:1704: checking whether we are using the GNU C compiler" >&5
1705echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1706if test "${ac_cv_c_compiler_gnu+set}" = set; then
1707  echo $ECHO_N "(cached) $ECHO_C" >&6
1708else
1709  cat >conftest.$ac_ext <<_ACEOF
1710#line 1710 "configure"
1711#include "confdefs.h"
1712
1713int
1714main ()
1715{
1716#ifndef __GNUC__
1717       choke me
1718#endif
1719
1720  ;
1721  return 0;
1722}
1723_ACEOF
1724rm -f conftest.$ac_objext
1725if { (eval echo "$as_me:1725: \"$ac_compile\"") >&5
1726  (eval $ac_compile) 2>&5
1727  ac_status=$?
1728  echo "$as_me:1728: \$? = $ac_status" >&5
1729  (exit $ac_status); } &&
1730         { ac_try='test -s conftest.$ac_objext'
1731  { (eval echo "$as_me:1731: \"$ac_try\"") >&5
1732  (eval $ac_try) 2>&5
1733  ac_status=$?
1734  echo "$as_me:1734: \$? = $ac_status" >&5
1735  (exit $ac_status); }; }; then
1736  ac_compiler_gnu=yes
1737else
1738  echo "$as_me: failed program was:" >&5
1739cat conftest.$ac_ext >&5
1740ac_compiler_gnu=no
1741fi
1742rm -f conftest.$ac_objext conftest.$ac_ext
1743ac_cv_c_compiler_gnu=$ac_compiler_gnu
1744
1745fi
1746echo "$as_me:1746: result: $ac_cv_c_compiler_gnu" >&5
1747echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1748GCC=`test $ac_compiler_gnu = yes && echo yes`
1749ac_test_CFLAGS=${CFLAGS+set}
1750ac_save_CFLAGS=$CFLAGS
1751CFLAGS="-g"
1752echo "$as_me:1752: checking whether $CC accepts -g" >&5
1753echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1754if test "${ac_cv_prog_cc_g+set}" = set; then
1755  echo $ECHO_N "(cached) $ECHO_C" >&6
1756else
1757  cat >conftest.$ac_ext <<_ACEOF
1758#line 1758 "configure"
1759#include "confdefs.h"
1760
1761int
1762main ()
1763{
1764
1765  ;
1766  return 0;
1767}
1768_ACEOF
1769rm -f conftest.$ac_objext
1770if { (eval echo "$as_me:1770: \"$ac_compile\"") >&5
1771  (eval $ac_compile) 2>&5
1772  ac_status=$?
1773  echo "$as_me:1773: \$? = $ac_status" >&5
1774  (exit $ac_status); } &&
1775         { ac_try='test -s conftest.$ac_objext'
1776  { (eval echo "$as_me:1776: \"$ac_try\"") >&5
1777  (eval $ac_try) 2>&5
1778  ac_status=$?
1779  echo "$as_me:1779: \$? = $ac_status" >&5
1780  (exit $ac_status); }; }; then
1781  ac_cv_prog_cc_g=yes
1782else
1783  echo "$as_me: failed program was:" >&5
1784cat conftest.$ac_ext >&5
1785ac_cv_prog_cc_g=no
1786fi
1787rm -f conftest.$ac_objext conftest.$ac_ext
1788fi
1789echo "$as_me:1789: result: $ac_cv_prog_cc_g" >&5
1790echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1791if test "$ac_test_CFLAGS" = set; then
1792  CFLAGS=$ac_save_CFLAGS
1793elif test $ac_cv_prog_cc_g = yes; then
1794  if test "$GCC" = yes; then
1795    CFLAGS="-g -O2"
1796  else
1797    CFLAGS="-g"
1798  fi
1799else
1800  if test "$GCC" = yes; then
1801    CFLAGS="-O2"
1802  else
1803    CFLAGS=
1804  fi
1805fi
1806# Some people use a C++ compiler to compile C.  Since we use `exit',
1807# in C++ we need to declare it.  In case someone uses the same compiler
1808# for both compiling C and C++ we need to have the C++ compiler decide
1809# the declaration of exit, since it's the most demanding environment.
1810cat >conftest.$ac_ext <<_ACEOF
1811#ifndef __cplusplus
1812  choke me
1813#endif
1814_ACEOF
1815rm -f conftest.$ac_objext
1816if { (eval echo "$as_me:1816: \"$ac_compile\"") >&5
1817  (eval $ac_compile) 2>&5
1818  ac_status=$?
1819  echo "$as_me:1819: \$? = $ac_status" >&5
1820  (exit $ac_status); } &&
1821         { ac_try='test -s conftest.$ac_objext'
1822  { (eval echo "$as_me:1822: \"$ac_try\"") >&5
1823  (eval $ac_try) 2>&5
1824  ac_status=$?
1825  echo "$as_me:1825: \$? = $ac_status" >&5
1826  (exit $ac_status); }; }; then
1827  for ac_declaration in \
1828   ''\
1829   '#include <stdlib.h>' \
1830   'extern "C" void std::exit (int) throw (); using std::exit;' \
1831   'extern "C" void std::exit (int); using std::exit;' \
1832   'extern "C" void exit (int) throw ();' \
1833   'extern "C" void exit (int);' \
1834   'void exit (int);'
1835do
1836  cat >conftest.$ac_ext <<_ACEOF
1837#line 1837 "configure"
1838#include "confdefs.h"
1839#include <stdlib.h>
1840$ac_declaration
1841int
1842main ()
1843{
1844exit (42);
1845  ;
1846  return 0;
1847}
1848_ACEOF
1849rm -f conftest.$ac_objext
1850if { (eval echo "$as_me:1850: \"$ac_compile\"") >&5
1851  (eval $ac_compile) 2>&5
1852  ac_status=$?
1853  echo "$as_me:1853: \$? = $ac_status" >&5
1854  (exit $ac_status); } &&
1855         { ac_try='test -s conftest.$ac_objext'
1856  { (eval echo "$as_me:1856: \"$ac_try\"") >&5
1857  (eval $ac_try) 2>&5
1858  ac_status=$?
1859  echo "$as_me:1859: \$? = $ac_status" >&5
1860  (exit $ac_status); }; }; then
1861  :
1862else
1863  echo "$as_me: failed program was:" >&5
1864cat conftest.$ac_ext >&5
1865continue
1866fi
1867rm -f conftest.$ac_objext conftest.$ac_ext
1868  cat >conftest.$ac_ext <<_ACEOF
1869#line 1869 "configure"
1870#include "confdefs.h"
1871$ac_declaration
1872int
1873main ()
1874{
1875exit (42);
1876  ;
1877  return 0;
1878}
1879_ACEOF
1880rm -f conftest.$ac_objext
1881if { (eval echo "$as_me:1881: \"$ac_compile\"") >&5
1882  (eval $ac_compile) 2>&5
1883  ac_status=$?
1884  echo "$as_me:1884: \$? = $ac_status" >&5
1885  (exit $ac_status); } &&
1886         { ac_try='test -s conftest.$ac_objext'
1887  { (eval echo "$as_me:1887: \"$ac_try\"") >&5
1888  (eval $ac_try) 2>&5
1889  ac_status=$?
1890  echo "$as_me:1890: \$? = $ac_status" >&5
1891  (exit $ac_status); }; }; then
1892  break
1893else
1894  echo "$as_me: failed program was:" >&5
1895cat conftest.$ac_ext >&5
1896fi
1897rm -f conftest.$ac_objext conftest.$ac_ext
1898done
1899rm -rf conftest*
1900if test -n "$ac_declaration"; then
1901  echo '#ifdef __cplusplus' >>confdefs.h
1902  echo $ac_declaration      >>confdefs.h
1903  echo '#endif'             >>confdefs.h
1904fi
1905
1906else
1907  echo "$as_me: failed program was:" >&5
1908cat conftest.$ac_ext >&5
1909fi
1910rm -f conftest.$ac_objext conftest.$ac_ext
1911ac_ext=c
1912ac_cpp='$CPP $CPPFLAGS'
1913ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1914ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1915ac_compiler_gnu=$ac_cv_c_compiler_gnu
1916ac_main_return=return
1917
1918GCC_VERSION=none
1919if test "$GCC" = yes ; then
1920	echo "$as_me:1920: checking version of $CC" >&5
1921echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1922	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.].*//'`"
1923	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1924	echo "$as_me:1924: result: $GCC_VERSION" >&5
1925echo "${ECHO_T}$GCC_VERSION" >&6
1926fi
1927
1928echo "$as_me:1928: checking for $CC option to accept ANSI C" >&5
1929echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1930if test "${ac_cv_prog_cc_stdc+set}" = set; then
1931  echo $ECHO_N "(cached) $ECHO_C" >&6
1932else
1933  ac_cv_prog_cc_stdc=no
1934ac_save_CC=$CC
1935cat >conftest.$ac_ext <<_ACEOF
1936#line 1936 "configure"
1937#include "confdefs.h"
1938#include <stdarg.h>
1939#include <stdio.h>
1940#include <sys/types.h>
1941#include <sys/stat.h>
1942/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1943struct buf { int x; };
1944FILE * (*rcsopen) (struct buf *, struct stat *, int);
1945static char *e (p, i)
1946     char **p;
1947     int i;
1948{
1949  return p[i];
1950}
1951static char *f (char * (*g) (char **, int), char **p, ...)
1952{
1953  char *s;
1954  va_list v;
1955  va_start (v,p);
1956  s = g (p, va_arg (v,int));
1957  va_end (v);
1958  return s;
1959}
1960int test (int i, double x);
1961struct s1 {int (*f) (int a);};
1962struct s2 {int (*f) (double a);};
1963int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1964int argc;
1965char **argv;
1966int
1967main ()
1968{
1969return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1970  ;
1971  return 0;
1972}
1973_ACEOF
1974# Don't try gcc -ansi; that turns off useful extensions and
1975# breaks some systems' header files.
1976# AIX			-qlanglvl=ansi
1977# Ultrix and OSF/1	-std1
1978# HP-UX 10.20 and later	-Ae
1979# HP-UX older versions	-Aa -D_HPUX_SOURCE
1980# SVR4			-Xc -D__EXTENSIONS__
1981for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1982do
1983  CC="$ac_save_CC $ac_arg"
1984  rm -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  ac_cv_prog_cc_stdc=$ac_arg
1997break
1998else
1999  echo "$as_me: failed program was:" >&5
2000cat conftest.$ac_ext >&5
2001fi
2002rm -f conftest.$ac_objext
2003done
2004rm -f conftest.$ac_ext conftest.$ac_objext
2005CC=$ac_save_CC
2006
2007fi
2008
2009case "x$ac_cv_prog_cc_stdc" in
2010  x|xno)
2011    echo "$as_me:2011: result: none needed" >&5
2012echo "${ECHO_T}none needed" >&6 ;;
2013  *)
2014    echo "$as_me:2014: result: $ac_cv_prog_cc_stdc" >&5
2015echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2016    CC="$CC $ac_cv_prog_cc_stdc" ;;
2017esac
2018
2019# This should have been defined by AC_PROG_CC
2020: ${CC:=cc}
2021
2022echo "$as_me:2022: checking \$CC variable" >&5
2023echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2024case "$CC" in
2025(*[\ \	]-[IUD]*)
2026	echo "$as_me:2026: result: broken" >&5
2027echo "${ECHO_T}broken" >&6
2028	{ echo "$as_me:2028: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2029echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2030	# humor him...
2031	cf_flags=`echo "$CC" | sed -e 's/^[^ 	]*[ 	]//'`
2032	CC=`echo "$CC" | sed -e 's/[ 	].*//'`
2033
2034cf_fix_cppflags=no
2035cf_new_cflags=
2036cf_new_cppflags=
2037cf_new_extra_cppflags=
2038
2039for cf_add_cflags in $cf_flags
2040do
2041case $cf_fix_cppflags in
2042(no)
2043	case $cf_add_cflags in
2044	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2045		case $cf_add_cflags in
2046		(-D*)
2047			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2048
2049			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2050				&& test -z "${cf_tst_cflags}" \
2051				&& cf_fix_cppflags=yes
2052
2053			if test $cf_fix_cppflags = yes ; then
2054				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2055				continue
2056			elif test "${cf_tst_cflags}" = "\"'" ; then
2057				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2058				continue
2059			fi
2060			;;
2061		esac
2062		case "$CPPFLAGS" in
2063		(*$cf_add_cflags)
2064			;;
2065		(*)
2066			case $cf_add_cflags in
2067			(-D*)
2068				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2069
2070CPPFLAGS=`echo "$CPPFLAGS" | \
2071	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2072		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2073
2074				;;
2075			esac
2076			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2077			;;
2078		esac
2079		;;
2080	(*)
2081		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2082		;;
2083	esac
2084	;;
2085(yes)
2086	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2087
2088	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2089
2090	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2091		&& test -z "${cf_tst_cflags}" \
2092		&& cf_fix_cppflags=no
2093	;;
2094esac
2095done
2096
2097if test -n "$cf_new_cflags" ; then
2098
2099	CFLAGS="$CFLAGS $cf_new_cflags"
2100fi
2101
2102if test -n "$cf_new_cppflags" ; then
2103
2104	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2105fi
2106
2107if test -n "$cf_new_extra_cppflags" ; then
2108
2109	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2110fi
2111
2112	;;
2113(*)
2114	echo "$as_me:2114: result: ok" >&5
2115echo "${ECHO_T}ok" >&6
2116	;;
2117esac
2118
2119ac_ext=c
2120ac_cpp='$CPP $CPPFLAGS'
2121ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2122ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2123ac_compiler_gnu=$ac_cv_c_compiler_gnu
2124ac_main_return=return
2125echo "$as_me:2125: checking how to run the C preprocessor" >&5
2126echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2127# On Suns, sometimes $CPP names a directory.
2128if test -n "$CPP" && test -d "$CPP"; then
2129  CPP=
2130fi
2131if test -z "$CPP"; then
2132  if test "${ac_cv_prog_CPP+set}" = set; then
2133  echo $ECHO_N "(cached) $ECHO_C" >&6
2134else
2135      # Double quotes because CPP needs to be expanded
2136    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2137    do
2138      ac_preproc_ok=false
2139for ac_c_preproc_warn_flag in '' yes
2140do
2141  # Use a header file that comes with gcc, so configuring glibc
2142  # with a fresh cross-compiler works.
2143  # On the NeXT, cc -E runs the code through the compiler's parser,
2144  # not just through cpp. "Syntax error" is here to catch this case.
2145  cat >conftest.$ac_ext <<_ACEOF
2146#line 2146 "configure"
2147#include "confdefs.h"
2148#include <assert.h>
2149                     Syntax error
2150_ACEOF
2151if { (eval echo "$as_me:2151: \"$ac_cpp conftest.$ac_ext\"") >&5
2152  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2153  ac_status=$?
2154  egrep -v '^ *\+' conftest.er1 >conftest.err
2155  rm -f conftest.er1
2156  cat conftest.err >&5
2157  echo "$as_me:2157: \$? = $ac_status" >&5
2158  (exit $ac_status); } >/dev/null; then
2159  if test -s conftest.err; then
2160    ac_cpp_err=$ac_c_preproc_warn_flag
2161  else
2162    ac_cpp_err=
2163  fi
2164else
2165  ac_cpp_err=yes
2166fi
2167if test -z "$ac_cpp_err"; then
2168  :
2169else
2170  echo "$as_me: failed program was:" >&5
2171  cat conftest.$ac_ext >&5
2172  # Broken: fails on valid input.
2173continue
2174fi
2175rm -f conftest.err conftest.$ac_ext
2176
2177  # OK, works on sane cases.  Now check whether non-existent headers
2178  # can be detected and how.
2179  cat >conftest.$ac_ext <<_ACEOF
2180#line 2180 "configure"
2181#include "confdefs.h"
2182#include <ac_nonexistent.h>
2183_ACEOF
2184if { (eval echo "$as_me:2184: \"$ac_cpp conftest.$ac_ext\"") >&5
2185  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2186  ac_status=$?
2187  egrep -v '^ *\+' conftest.er1 >conftest.err
2188  rm -f conftest.er1
2189  cat conftest.err >&5
2190  echo "$as_me:2190: \$? = $ac_status" >&5
2191  (exit $ac_status); } >/dev/null; then
2192  if test -s conftest.err; then
2193    ac_cpp_err=$ac_c_preproc_warn_flag
2194  else
2195    ac_cpp_err=
2196  fi
2197else
2198  ac_cpp_err=yes
2199fi
2200if test -z "$ac_cpp_err"; then
2201  # Broken: success on invalid input.
2202continue
2203else
2204  echo "$as_me: failed program was:" >&5
2205  cat conftest.$ac_ext >&5
2206  # Passes both tests.
2207ac_preproc_ok=:
2208break
2209fi
2210rm -f conftest.err conftest.$ac_ext
2211
2212done
2213# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2214rm -f conftest.err conftest.$ac_ext
2215if $ac_preproc_ok; then
2216  break
2217fi
2218
2219    done
2220    ac_cv_prog_CPP=$CPP
2221
2222fi
2223  CPP=$ac_cv_prog_CPP
2224else
2225  ac_cv_prog_CPP=$CPP
2226fi
2227echo "$as_me:2227: result: $CPP" >&5
2228echo "${ECHO_T}$CPP" >&6
2229ac_preproc_ok=false
2230for ac_c_preproc_warn_flag in '' yes
2231do
2232  # Use a header file that comes with gcc, so configuring glibc
2233  # with a fresh cross-compiler works.
2234  # On the NeXT, cc -E runs the code through the compiler's parser,
2235  # not just through cpp. "Syntax error" is here to catch this case.
2236  cat >conftest.$ac_ext <<_ACEOF
2237#line 2237 "configure"
2238#include "confdefs.h"
2239#include <assert.h>
2240                     Syntax error
2241_ACEOF
2242if { (eval echo "$as_me:2242: \"$ac_cpp conftest.$ac_ext\"") >&5
2243  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2244  ac_status=$?
2245  egrep -v '^ *\+' conftest.er1 >conftest.err
2246  rm -f conftest.er1
2247  cat conftest.err >&5
2248  echo "$as_me:2248: \$? = $ac_status" >&5
2249  (exit $ac_status); } >/dev/null; then
2250  if test -s conftest.err; then
2251    ac_cpp_err=$ac_c_preproc_warn_flag
2252  else
2253    ac_cpp_err=
2254  fi
2255else
2256  ac_cpp_err=yes
2257fi
2258if test -z "$ac_cpp_err"; then
2259  :
2260else
2261  echo "$as_me: failed program was:" >&5
2262  cat conftest.$ac_ext >&5
2263  # Broken: fails on valid input.
2264continue
2265fi
2266rm -f conftest.err conftest.$ac_ext
2267
2268  # OK, works on sane cases.  Now check whether non-existent headers
2269  # can be detected and how.
2270  cat >conftest.$ac_ext <<_ACEOF
2271#line 2271 "configure"
2272#include "confdefs.h"
2273#include <ac_nonexistent.h>
2274_ACEOF
2275if { (eval echo "$as_me:2275: \"$ac_cpp conftest.$ac_ext\"") >&5
2276  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2277  ac_status=$?
2278  egrep -v '^ *\+' conftest.er1 >conftest.err
2279  rm -f conftest.er1
2280  cat conftest.err >&5
2281  echo "$as_me:2281: \$? = $ac_status" >&5
2282  (exit $ac_status); } >/dev/null; then
2283  if test -s conftest.err; then
2284    ac_cpp_err=$ac_c_preproc_warn_flag
2285  else
2286    ac_cpp_err=
2287  fi
2288else
2289  ac_cpp_err=yes
2290fi
2291if test -z "$ac_cpp_err"; then
2292  # Broken: success on invalid input.
2293continue
2294else
2295  echo "$as_me: failed program was:" >&5
2296  cat conftest.$ac_ext >&5
2297  # Passes both tests.
2298ac_preproc_ok=:
2299break
2300fi
2301rm -f conftest.err conftest.$ac_ext
2302
2303done
2304# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2305rm -f conftest.err conftest.$ac_ext
2306if $ac_preproc_ok; then
2307  :
2308else
2309  { { echo "$as_me:2309: error: C preprocessor \"$CPP\" fails sanity check" >&5
2310echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2311   { (exit 1); exit 1; }; }
2312fi
2313
2314ac_ext=c
2315ac_cpp='$CPP $CPPFLAGS'
2316ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2317ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2318ac_compiler_gnu=$ac_cv_c_compiler_gnu
2319ac_main_return=return
2320
2321for ac_prog in mawk gawk nawk awk
2322do
2323  # Extract the first word of "$ac_prog", so it can be a program name with args.
2324set dummy $ac_prog; ac_word=$2
2325echo "$as_me:2325: checking for $ac_word" >&5
2326echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2327if test "${ac_cv_prog_AWK+set}" = set; then
2328  echo $ECHO_N "(cached) $ECHO_C" >&6
2329else
2330  if test -n "$AWK"; then
2331  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2332else
2333  ac_save_IFS=$IFS; IFS=$ac_path_separator
2334ac_dummy="$PATH"
2335for ac_dir in $ac_dummy; do
2336  IFS=$ac_save_IFS
2337  test -z "$ac_dir" && ac_dir=.
2338  $as_executable_p "$ac_dir/$ac_word" || continue
2339ac_cv_prog_AWK="$ac_prog"
2340echo "$as_me:2340: found $ac_dir/$ac_word" >&5
2341break
2342done
2343
2344fi
2345fi
2346AWK=$ac_cv_prog_AWK
2347if test -n "$AWK"; then
2348  echo "$as_me:2348: result: $AWK" >&5
2349echo "${ECHO_T}$AWK" >&6
2350else
2351  echo "$as_me:2351: result: no" >&5
2352echo "${ECHO_T}no" >&6
2353fi
2354
2355  test -n "$AWK" && break
2356done
2357
2358# Find a good install program.  We prefer a C program (faster),
2359# so one script is as good as another.  But avoid the broken or
2360# incompatible versions:
2361# SysV /etc/install, /usr/sbin/install
2362# SunOS /usr/etc/install
2363# IRIX /sbin/install
2364# AIX /bin/install
2365# AmigaOS /C/install, which installs bootblocks on floppy discs
2366# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2367# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2368# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2369# ./install, which can be erroneously created by make from ./install.sh.
2370echo "$as_me:2370: checking for a BSD compatible install" >&5
2371echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2372if test -z "$INSTALL"; then
2373if test "${ac_cv_path_install+set}" = set; then
2374  echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376    ac_save_IFS=$IFS; IFS=$ac_path_separator
2377  for ac_dir in $PATH; do
2378    IFS=$ac_save_IFS
2379    # Account for people who put trailing slashes in PATH elements.
2380    case $ac_dir/ in
2381    / | ./ | .// | /cC/* \
2382    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2383    | /usr/ucb/* ) ;;
2384    *)
2385      # OSF1 and SCO ODT 3.0 have their own names for install.
2386      # Don't use installbsd from OSF since it installs stuff as root
2387      # by default.
2388      for ac_prog in ginstall scoinst install; do
2389        if $as_executable_p "$ac_dir/$ac_prog"; then
2390	  if test $ac_prog = install &&
2391            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2392	    # AIX install.  It has an incompatible calling convention.
2393	    :
2394	  elif test $ac_prog = install &&
2395	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2396	    # program-specific install script used by HP pwplus--don't use.
2397	    :
2398	  else
2399	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2400	    break 2
2401	  fi
2402	fi
2403      done
2404      ;;
2405    esac
2406  done
2407
2408fi
2409  if test "${ac_cv_path_install+set}" = set; then
2410    INSTALL=$ac_cv_path_install
2411  else
2412    # As a last resort, use the slow shell script.  We don't cache a
2413    # path for INSTALL within a source directory, because that will
2414    # break other packages using the cache if that directory is
2415    # removed, or if the path is relative.
2416    INSTALL=$ac_install_sh
2417  fi
2418fi
2419echo "$as_me:2419: result: $INSTALL" >&5
2420echo "${ECHO_T}$INSTALL" >&6
2421
2422# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2423# It thinks the first close brace ends the variable substitution.
2424test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2425
2426test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2427
2428test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2429
2430echo "$as_me:2430: checking whether ln -s works" >&5
2431echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2432LN_S=$as_ln_s
2433if test "$LN_S" = "ln -s"; then
2434  echo "$as_me:2434: result: yes" >&5
2435echo "${ECHO_T}yes" >&6
2436else
2437  echo "$as_me:2437: result: no, using $LN_S" >&5
2438echo "${ECHO_T}no, using $LN_S" >&6
2439fi
2440
2441test "$program_prefix" != NONE &&
2442  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2443# Use a double $ so make ignores it.
2444test "$program_suffix" != NONE &&
2445  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2446# Double any \ or $.  echo might interpret backslashes.
2447# By default was `s,x,x', remove it if useless.
2448cat <<\_ACEOF >conftest.sed
2449s/[\\$]/&&/g;s/;s,x,x,$//
2450_ACEOF
2451program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2452rm conftest.sed
2453
2454for ac_prog in tdlint lint alint
2455do
2456  # Extract the first word of "$ac_prog", so it can be a program name with args.
2457set dummy $ac_prog; ac_word=$2
2458echo "$as_me:2458: checking for $ac_word" >&5
2459echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2460if test "${ac_cv_prog_LINT+set}" = set; then
2461  echo $ECHO_N "(cached) $ECHO_C" >&6
2462else
2463  if test -n "$LINT"; then
2464  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2465else
2466  ac_save_IFS=$IFS; IFS=$ac_path_separator
2467ac_dummy="$PATH"
2468for ac_dir in $ac_dummy; do
2469  IFS=$ac_save_IFS
2470  test -z "$ac_dir" && ac_dir=.
2471  $as_executable_p "$ac_dir/$ac_word" || continue
2472ac_cv_prog_LINT="$ac_prog"
2473echo "$as_me:2473: found $ac_dir/$ac_word" >&5
2474break
2475done
2476
2477fi
2478fi
2479LINT=$ac_cv_prog_LINT
2480if test -n "$LINT"; then
2481  echo "$as_me:2481: result: $LINT" >&5
2482echo "${ECHO_T}$LINT" >&6
2483else
2484  echo "$as_me:2484: result: no" >&5
2485echo "${ECHO_T}no" >&6
2486fi
2487
2488  test -n "$LINT" && break
2489done
2490
2491###	checks for compiler characteristics
2492
2493cf_XOPEN_SOURCE=500
2494cf_POSIX_C_SOURCE=199506L
2495cf_xopen_source=
2496
2497case $host_os in
2498(aix[4-7]*)
2499	cf_xopen_source="-D_ALL_SOURCE"
2500	;;
2501(cygwin|msys)
2502	cf_XOPEN_SOURCE=600
2503	;;
2504(darwin[0-8].*)
2505	cf_xopen_source="-D_APPLE_C_SOURCE"
2506	;;
2507(darwin*)
2508	cf_xopen_source="-D_DARWIN_C_SOURCE"
2509	cf_XOPEN_SOURCE=
2510	;;
2511(freebsd*|dragonfly*)
2512	# 5.x headers associate
2513	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2514	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2515	cf_POSIX_C_SOURCE=200112L
2516	cf_XOPEN_SOURCE=600
2517	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2518	;;
2519(hpux11*)
2520	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2521	;;
2522(hpux*)
2523	cf_xopen_source="-D_HPUX_SOURCE"
2524	;;
2525(irix[56].*)
2526	cf_xopen_source="-D_SGI_SOURCE"
2527	cf_XOPEN_SOURCE=
2528	;;
2529(linux*|gnu*|mint*|k*bsd*-gnu)
2530
2531echo "$as_me:2531: checking if we must define _GNU_SOURCE" >&5
2532echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2533if test "${cf_cv_gnu_source+set}" = set; then
2534  echo $ECHO_N "(cached) $ECHO_C" >&6
2535else
2536
2537cat >conftest.$ac_ext <<_ACEOF
2538#line 2538 "configure"
2539#include "confdefs.h"
2540#include <sys/types.h>
2541int
2542main ()
2543{
2544
2545#ifndef _XOPEN_SOURCE
2546make an error
2547#endif
2548  ;
2549  return 0;
2550}
2551_ACEOF
2552rm -f conftest.$ac_objext
2553if { (eval echo "$as_me:2553: \"$ac_compile\"") >&5
2554  (eval $ac_compile) 2>&5
2555  ac_status=$?
2556  echo "$as_me:2556: \$? = $ac_status" >&5
2557  (exit $ac_status); } &&
2558         { ac_try='test -s conftest.$ac_objext'
2559  { (eval echo "$as_me:2559: \"$ac_try\"") >&5
2560  (eval $ac_try) 2>&5
2561  ac_status=$?
2562  echo "$as_me:2562: \$? = $ac_status" >&5
2563  (exit $ac_status); }; }; then
2564  cf_cv_gnu_source=no
2565else
2566  echo "$as_me: failed program was:" >&5
2567cat conftest.$ac_ext >&5
2568cf_save="$CPPFLAGS"
2569	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2570	 cat >conftest.$ac_ext <<_ACEOF
2571#line 2571 "configure"
2572#include "confdefs.h"
2573#include <sys/types.h>
2574int
2575main ()
2576{
2577
2578#ifdef _XOPEN_SOURCE
2579make an error
2580#endif
2581  ;
2582  return 0;
2583}
2584_ACEOF
2585rm -f conftest.$ac_objext
2586if { (eval echo "$as_me:2586: \"$ac_compile\"") >&5
2587  (eval $ac_compile) 2>&5
2588  ac_status=$?
2589  echo "$as_me:2589: \$? = $ac_status" >&5
2590  (exit $ac_status); } &&
2591         { ac_try='test -s conftest.$ac_objext'
2592  { (eval echo "$as_me:2592: \"$ac_try\"") >&5
2593  (eval $ac_try) 2>&5
2594  ac_status=$?
2595  echo "$as_me:2595: \$? = $ac_status" >&5
2596  (exit $ac_status); }; }; then
2597  cf_cv_gnu_source=no
2598else
2599  echo "$as_me: failed program was:" >&5
2600cat conftest.$ac_ext >&5
2601cf_cv_gnu_source=yes
2602fi
2603rm -f conftest.$ac_objext conftest.$ac_ext
2604	CPPFLAGS="$cf_save"
2605
2606fi
2607rm -f conftest.$ac_objext conftest.$ac_ext
2608
2609fi
2610echo "$as_me:2610: result: $cf_cv_gnu_source" >&5
2611echo "${ECHO_T}$cf_cv_gnu_source" >&6
2612test "$cf_cv_gnu_source" = yes && CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2613
2614	;;
2615(minix*)
2616	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2617	;;
2618(mirbsd*)
2619	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2620	cf_XOPEN_SOURCE=
2621
2622cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2623
2624cf_save_CFLAGS="$CFLAGS"
2625cf_save_CPPFLAGS="$CPPFLAGS"
2626
2627cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2628	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2629		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2630
2631cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2632	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2633		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2634
2635echo "$as_me:2635: checking if we should define _POSIX_C_SOURCE" >&5
2636echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2637if test "${cf_cv_posix_c_source+set}" = set; then
2638  echo $ECHO_N "(cached) $ECHO_C" >&6
2639else
2640
2641echo "${as_me:-configure}:2641: testing if the symbol is already defined go no further ..." 1>&5
2642
2643	cat >conftest.$ac_ext <<_ACEOF
2644#line 2644 "configure"
2645#include "confdefs.h"
2646#include <sys/types.h>
2647int
2648main ()
2649{
2650
2651#ifndef _POSIX_C_SOURCE
2652make an error
2653#endif
2654  ;
2655  return 0;
2656}
2657_ACEOF
2658rm -f conftest.$ac_objext
2659if { (eval echo "$as_me:2659: \"$ac_compile\"") >&5
2660  (eval $ac_compile) 2>&5
2661  ac_status=$?
2662  echo "$as_me:2662: \$? = $ac_status" >&5
2663  (exit $ac_status); } &&
2664         { ac_try='test -s conftest.$ac_objext'
2665  { (eval echo "$as_me:2665: \"$ac_try\"") >&5
2666  (eval $ac_try) 2>&5
2667  ac_status=$?
2668  echo "$as_me:2668: \$? = $ac_status" >&5
2669  (exit $ac_status); }; }; then
2670  cf_cv_posix_c_source=no
2671else
2672  echo "$as_me: failed program was:" >&5
2673cat conftest.$ac_ext >&5
2674cf_want_posix_source=no
2675	 case .$cf_POSIX_C_SOURCE in
2676	 (.[12]??*)
2677		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2678		;;
2679	 (.2)
2680		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2681		cf_want_posix_source=yes
2682		;;
2683	 (.*)
2684		cf_want_posix_source=yes
2685		;;
2686	 esac
2687	 if test "$cf_want_posix_source" = yes ; then
2688		cat >conftest.$ac_ext <<_ACEOF
2689#line 2689 "configure"
2690#include "confdefs.h"
2691#include <sys/types.h>
2692int
2693main ()
2694{
2695
2696#ifdef _POSIX_SOURCE
2697make an error
2698#endif
2699  ;
2700  return 0;
2701}
2702_ACEOF
2703rm -f conftest.$ac_objext
2704if { (eval echo "$as_me:2704: \"$ac_compile\"") >&5
2705  (eval $ac_compile) 2>&5
2706  ac_status=$?
2707  echo "$as_me:2707: \$? = $ac_status" >&5
2708  (exit $ac_status); } &&
2709         { ac_try='test -s conftest.$ac_objext'
2710  { (eval echo "$as_me:2710: \"$ac_try\"") >&5
2711  (eval $ac_try) 2>&5
2712  ac_status=$?
2713  echo "$as_me:2713: \$? = $ac_status" >&5
2714  (exit $ac_status); }; }; then
2715  :
2716else
2717  echo "$as_me: failed program was:" >&5
2718cat conftest.$ac_ext >&5
2719cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2720fi
2721rm -f conftest.$ac_objext conftest.$ac_ext
2722	 fi
2723
2724echo "${as_me:-configure}:2724: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2725
2726	 CFLAGS="$cf_trim_CFLAGS"
2727	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2728
2729echo "${as_me:-configure}:2729: testing if the second compile does not leave our definition intact error ..." 1>&5
2730
2731	 cat >conftest.$ac_ext <<_ACEOF
2732#line 2732 "configure"
2733#include "confdefs.h"
2734#include <sys/types.h>
2735int
2736main ()
2737{
2738
2739#ifndef _POSIX_C_SOURCE
2740make an error
2741#endif
2742  ;
2743  return 0;
2744}
2745_ACEOF
2746rm -f conftest.$ac_objext
2747if { (eval echo "$as_me:2747: \"$ac_compile\"") >&5
2748  (eval $ac_compile) 2>&5
2749  ac_status=$?
2750  echo "$as_me:2750: \$? = $ac_status" >&5
2751  (exit $ac_status); } &&
2752         { ac_try='test -s conftest.$ac_objext'
2753  { (eval echo "$as_me:2753: \"$ac_try\"") >&5
2754  (eval $ac_try) 2>&5
2755  ac_status=$?
2756  echo "$as_me:2756: \$? = $ac_status" >&5
2757  (exit $ac_status); }; }; then
2758  :
2759else
2760  echo "$as_me: failed program was:" >&5
2761cat conftest.$ac_ext >&5
2762cf_cv_posix_c_source=no
2763fi
2764rm -f conftest.$ac_objext conftest.$ac_ext
2765	 CFLAGS="$cf_save_CFLAGS"
2766	 CPPFLAGS="$cf_save_CPPFLAGS"
2767
2768fi
2769rm -f conftest.$ac_objext conftest.$ac_ext
2770
2771fi
2772echo "$as_me:2772: result: $cf_cv_posix_c_source" >&5
2773echo "${ECHO_T}$cf_cv_posix_c_source" >&6
2774
2775if test "$cf_cv_posix_c_source" != no ; then
2776	CFLAGS="$cf_trim_CFLAGS"
2777	CPPFLAGS="$cf_trim_CPPFLAGS"
2778
2779cf_fix_cppflags=no
2780cf_new_cflags=
2781cf_new_cppflags=
2782cf_new_extra_cppflags=
2783
2784for cf_add_cflags in $cf_cv_posix_c_source
2785do
2786case $cf_fix_cppflags in
2787(no)
2788	case $cf_add_cflags in
2789	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2790		case $cf_add_cflags in
2791		(-D*)
2792			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2793
2794			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2795				&& test -z "${cf_tst_cflags}" \
2796				&& cf_fix_cppflags=yes
2797
2798			if test $cf_fix_cppflags = yes ; then
2799				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2800				continue
2801			elif test "${cf_tst_cflags}" = "\"'" ; then
2802				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2803				continue
2804			fi
2805			;;
2806		esac
2807		case "$CPPFLAGS" in
2808		(*$cf_add_cflags)
2809			;;
2810		(*)
2811			case $cf_add_cflags in
2812			(-D*)
2813				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2814
2815CPPFLAGS=`echo "$CPPFLAGS" | \
2816	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2817		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2818
2819				;;
2820			esac
2821			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
2822			;;
2823		esac
2824		;;
2825	(*)
2826		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
2827		;;
2828	esac
2829	;;
2830(yes)
2831	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
2832
2833	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2834
2835	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2836		&& test -z "${cf_tst_cflags}" \
2837		&& cf_fix_cppflags=no
2838	;;
2839esac
2840done
2841
2842if test -n "$cf_new_cflags" ; then
2843
2844	CFLAGS="$CFLAGS $cf_new_cflags"
2845fi
2846
2847if test -n "$cf_new_cppflags" ; then
2848
2849	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
2850fi
2851
2852if test -n "$cf_new_extra_cppflags" ; then
2853
2854	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
2855fi
2856
2857fi
2858
2859	;;
2860(netbsd*)
2861	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2862	;;
2863(openbsd[4-9]*)
2864	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
2865	cf_xopen_source="-D_BSD_SOURCE"
2866	cf_XOPEN_SOURCE=600
2867	;;
2868(openbsd*)
2869	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2870	;;
2871(osf[45]*)
2872	cf_xopen_source="-D_OSF_SOURCE"
2873	;;
2874(nto-qnx*)
2875	cf_xopen_source="-D_QNX_SOURCE"
2876	;;
2877(sco*)
2878	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2879	;;
2880(solaris2.*)
2881	cf_xopen_source="-D__EXTENSIONS__"
2882	cf_cv_xopen_source=broken
2883	;;
2884(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
2885	cf_XOPEN_SOURCE=
2886	cf_POSIX_C_SOURCE=
2887	;;
2888(*)
2889
2890echo "$as_me:2890: checking if we should define _XOPEN_SOURCE" >&5
2891echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
2892if test "${cf_cv_xopen_source+set}" = set; then
2893  echo $ECHO_N "(cached) $ECHO_C" >&6
2894else
2895
2896	cat >conftest.$ac_ext <<_ACEOF
2897#line 2897 "configure"
2898#include "confdefs.h"
2899
2900#include <stdlib.h>
2901#include <string.h>
2902#include <sys/types.h>
2903
2904int
2905main ()
2906{
2907
2908#ifndef _XOPEN_SOURCE
2909make an error
2910#endif
2911  ;
2912  return 0;
2913}
2914_ACEOF
2915rm -f conftest.$ac_objext
2916if { (eval echo "$as_me:2916: \"$ac_compile\"") >&5
2917  (eval $ac_compile) 2>&5
2918  ac_status=$?
2919  echo "$as_me:2919: \$? = $ac_status" >&5
2920  (exit $ac_status); } &&
2921         { ac_try='test -s conftest.$ac_objext'
2922  { (eval echo "$as_me:2922: \"$ac_try\"") >&5
2923  (eval $ac_try) 2>&5
2924  ac_status=$?
2925  echo "$as_me:2925: \$? = $ac_status" >&5
2926  (exit $ac_status); }; }; then
2927  cf_cv_xopen_source=no
2928else
2929  echo "$as_me: failed program was:" >&5
2930cat conftest.$ac_ext >&5
2931cf_save="$CPPFLAGS"
2932	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2933	 cat >conftest.$ac_ext <<_ACEOF
2934#line 2934 "configure"
2935#include "confdefs.h"
2936
2937#include <stdlib.h>
2938#include <string.h>
2939#include <sys/types.h>
2940
2941int
2942main ()
2943{
2944
2945#ifdef _XOPEN_SOURCE
2946make an error
2947#endif
2948  ;
2949  return 0;
2950}
2951_ACEOF
2952rm -f conftest.$ac_objext
2953if { (eval echo "$as_me:2953: \"$ac_compile\"") >&5
2954  (eval $ac_compile) 2>&5
2955  ac_status=$?
2956  echo "$as_me:2956: \$? = $ac_status" >&5
2957  (exit $ac_status); } &&
2958         { ac_try='test -s conftest.$ac_objext'
2959  { (eval echo "$as_me:2959: \"$ac_try\"") >&5
2960  (eval $ac_try) 2>&5
2961  ac_status=$?
2962  echo "$as_me:2962: \$? = $ac_status" >&5
2963  (exit $ac_status); }; }; then
2964  cf_cv_xopen_source=no
2965else
2966  echo "$as_me: failed program was:" >&5
2967cat conftest.$ac_ext >&5
2968cf_cv_xopen_source=$cf_XOPEN_SOURCE
2969fi
2970rm -f conftest.$ac_objext conftest.$ac_ext
2971	CPPFLAGS="$cf_save"
2972
2973fi
2974rm -f conftest.$ac_objext conftest.$ac_ext
2975
2976fi
2977echo "$as_me:2977: result: $cf_cv_xopen_source" >&5
2978echo "${ECHO_T}$cf_cv_xopen_source" >&6
2979
2980if test "$cf_cv_xopen_source" != no ; then
2981
2982CFLAGS=`echo "$CFLAGS" | \
2983	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2984		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
2985
2986CPPFLAGS=`echo "$CPPFLAGS" | \
2987	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2988		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
2989
2990	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
2991
2992cf_fix_cppflags=no
2993cf_new_cflags=
2994cf_new_cppflags=
2995cf_new_extra_cppflags=
2996
2997for cf_add_cflags in $cf_temp_xopen_source
2998do
2999case $cf_fix_cppflags in
3000(no)
3001	case $cf_add_cflags in
3002	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3003		case $cf_add_cflags in
3004		(-D*)
3005			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3006
3007			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3008				&& test -z "${cf_tst_cflags}" \
3009				&& cf_fix_cppflags=yes
3010
3011			if test $cf_fix_cppflags = yes ; then
3012				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3013				continue
3014			elif test "${cf_tst_cflags}" = "\"'" ; then
3015				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3016				continue
3017			fi
3018			;;
3019		esac
3020		case "$CPPFLAGS" in
3021		(*$cf_add_cflags)
3022			;;
3023		(*)
3024			case $cf_add_cflags in
3025			(-D*)
3026				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3027
3028CPPFLAGS=`echo "$CPPFLAGS" | \
3029	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3030		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3031
3032				;;
3033			esac
3034			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3035			;;
3036		esac
3037		;;
3038	(*)
3039		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3040		;;
3041	esac
3042	;;
3043(yes)
3044	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3045
3046	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3047
3048	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3049		&& test -z "${cf_tst_cflags}" \
3050		&& cf_fix_cppflags=no
3051	;;
3052esac
3053done
3054
3055if test -n "$cf_new_cflags" ; then
3056
3057	CFLAGS="$CFLAGS $cf_new_cflags"
3058fi
3059
3060if test -n "$cf_new_cppflags" ; then
3061
3062	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3063fi
3064
3065if test -n "$cf_new_extra_cppflags" ; then
3066
3067	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3068fi
3069
3070fi
3071
3072cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3073
3074cf_save_CFLAGS="$CFLAGS"
3075cf_save_CPPFLAGS="$CPPFLAGS"
3076
3077cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3078	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3079		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3080
3081cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3082	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3083		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3084
3085echo "$as_me:3085: checking if we should define _POSIX_C_SOURCE" >&5
3086echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3087if test "${cf_cv_posix_c_source+set}" = set; then
3088  echo $ECHO_N "(cached) $ECHO_C" >&6
3089else
3090
3091echo "${as_me:-configure}:3091: testing if the symbol is already defined go no further ..." 1>&5
3092
3093	cat >conftest.$ac_ext <<_ACEOF
3094#line 3094 "configure"
3095#include "confdefs.h"
3096#include <sys/types.h>
3097int
3098main ()
3099{
3100
3101#ifndef _POSIX_C_SOURCE
3102make an error
3103#endif
3104  ;
3105  return 0;
3106}
3107_ACEOF
3108rm -f conftest.$ac_objext
3109if { (eval echo "$as_me:3109: \"$ac_compile\"") >&5
3110  (eval $ac_compile) 2>&5
3111  ac_status=$?
3112  echo "$as_me:3112: \$? = $ac_status" >&5
3113  (exit $ac_status); } &&
3114         { ac_try='test -s conftest.$ac_objext'
3115  { (eval echo "$as_me:3115: \"$ac_try\"") >&5
3116  (eval $ac_try) 2>&5
3117  ac_status=$?
3118  echo "$as_me:3118: \$? = $ac_status" >&5
3119  (exit $ac_status); }; }; then
3120  cf_cv_posix_c_source=no
3121else
3122  echo "$as_me: failed program was:" >&5
3123cat conftest.$ac_ext >&5
3124cf_want_posix_source=no
3125	 case .$cf_POSIX_C_SOURCE in
3126	 (.[12]??*)
3127		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3128		;;
3129	 (.2)
3130		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3131		cf_want_posix_source=yes
3132		;;
3133	 (.*)
3134		cf_want_posix_source=yes
3135		;;
3136	 esac
3137	 if test "$cf_want_posix_source" = yes ; then
3138		cat >conftest.$ac_ext <<_ACEOF
3139#line 3139 "configure"
3140#include "confdefs.h"
3141#include <sys/types.h>
3142int
3143main ()
3144{
3145
3146#ifdef _POSIX_SOURCE
3147make an error
3148#endif
3149  ;
3150  return 0;
3151}
3152_ACEOF
3153rm -f conftest.$ac_objext
3154if { (eval echo "$as_me:3154: \"$ac_compile\"") >&5
3155  (eval $ac_compile) 2>&5
3156  ac_status=$?
3157  echo "$as_me:3157: \$? = $ac_status" >&5
3158  (exit $ac_status); } &&
3159         { ac_try='test -s conftest.$ac_objext'
3160  { (eval echo "$as_me:3160: \"$ac_try\"") >&5
3161  (eval $ac_try) 2>&5
3162  ac_status=$?
3163  echo "$as_me:3163: \$? = $ac_status" >&5
3164  (exit $ac_status); }; }; then
3165  :
3166else
3167  echo "$as_me: failed program was:" >&5
3168cat conftest.$ac_ext >&5
3169cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3170fi
3171rm -f conftest.$ac_objext conftest.$ac_ext
3172	 fi
3173
3174echo "${as_me:-configure}:3174: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3175
3176	 CFLAGS="$cf_trim_CFLAGS"
3177	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3178
3179echo "${as_me:-configure}:3179: testing if the second compile does not leave our definition intact error ..." 1>&5
3180
3181	 cat >conftest.$ac_ext <<_ACEOF
3182#line 3182 "configure"
3183#include "confdefs.h"
3184#include <sys/types.h>
3185int
3186main ()
3187{
3188
3189#ifndef _POSIX_C_SOURCE
3190make an error
3191#endif
3192  ;
3193  return 0;
3194}
3195_ACEOF
3196rm -f conftest.$ac_objext
3197if { (eval echo "$as_me:3197: \"$ac_compile\"") >&5
3198  (eval $ac_compile) 2>&5
3199  ac_status=$?
3200  echo "$as_me:3200: \$? = $ac_status" >&5
3201  (exit $ac_status); } &&
3202         { ac_try='test -s conftest.$ac_objext'
3203  { (eval echo "$as_me:3203: \"$ac_try\"") >&5
3204  (eval $ac_try) 2>&5
3205  ac_status=$?
3206  echo "$as_me:3206: \$? = $ac_status" >&5
3207  (exit $ac_status); }; }; then
3208  :
3209else
3210  echo "$as_me: failed program was:" >&5
3211cat conftest.$ac_ext >&5
3212cf_cv_posix_c_source=no
3213fi
3214rm -f conftest.$ac_objext conftest.$ac_ext
3215	 CFLAGS="$cf_save_CFLAGS"
3216	 CPPFLAGS="$cf_save_CPPFLAGS"
3217
3218fi
3219rm -f conftest.$ac_objext conftest.$ac_ext
3220
3221fi
3222echo "$as_me:3222: result: $cf_cv_posix_c_source" >&5
3223echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3224
3225if test "$cf_cv_posix_c_source" != no ; then
3226	CFLAGS="$cf_trim_CFLAGS"
3227	CPPFLAGS="$cf_trim_CPPFLAGS"
3228
3229cf_fix_cppflags=no
3230cf_new_cflags=
3231cf_new_cppflags=
3232cf_new_extra_cppflags=
3233
3234for cf_add_cflags in $cf_cv_posix_c_source
3235do
3236case $cf_fix_cppflags in
3237(no)
3238	case $cf_add_cflags in
3239	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3240		case $cf_add_cflags in
3241		(-D*)
3242			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3243
3244			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3245				&& test -z "${cf_tst_cflags}" \
3246				&& cf_fix_cppflags=yes
3247
3248			if test $cf_fix_cppflags = yes ; then
3249				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3250				continue
3251			elif test "${cf_tst_cflags}" = "\"'" ; then
3252				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3253				continue
3254			fi
3255			;;
3256		esac
3257		case "$CPPFLAGS" in
3258		(*$cf_add_cflags)
3259			;;
3260		(*)
3261			case $cf_add_cflags in
3262			(-D*)
3263				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3264
3265CPPFLAGS=`echo "$CPPFLAGS" | \
3266	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3267		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3268
3269				;;
3270			esac
3271			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3272			;;
3273		esac
3274		;;
3275	(*)
3276		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3277		;;
3278	esac
3279	;;
3280(yes)
3281	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3282
3283	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3284
3285	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3286		&& test -z "${cf_tst_cflags}" \
3287		&& cf_fix_cppflags=no
3288	;;
3289esac
3290done
3291
3292if test -n "$cf_new_cflags" ; then
3293
3294	CFLAGS="$CFLAGS $cf_new_cflags"
3295fi
3296
3297if test -n "$cf_new_cppflags" ; then
3298
3299	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3300fi
3301
3302if test -n "$cf_new_extra_cppflags" ; then
3303
3304	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3305fi
3306
3307fi
3308
3309	;;
3310esac
3311
3312if test -n "$cf_xopen_source" ; then
3313
3314cf_fix_cppflags=no
3315cf_new_cflags=
3316cf_new_cppflags=
3317cf_new_extra_cppflags=
3318
3319for cf_add_cflags in $cf_xopen_source
3320do
3321case $cf_fix_cppflags in
3322(no)
3323	case $cf_add_cflags in
3324	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3325		case $cf_add_cflags in
3326		(-D*)
3327			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3328
3329			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3330				&& test -z "${cf_tst_cflags}" \
3331				&& cf_fix_cppflags=yes
3332
3333			if test $cf_fix_cppflags = yes ; then
3334				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3335				continue
3336			elif test "${cf_tst_cflags}" = "\"'" ; then
3337				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3338				continue
3339			fi
3340			;;
3341		esac
3342		case "$CPPFLAGS" in
3343		(*$cf_add_cflags)
3344			;;
3345		(*)
3346			case $cf_add_cflags in
3347			(-D*)
3348				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3349
3350CPPFLAGS=`echo "$CPPFLAGS" | \
3351	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3352		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3353
3354				;;
3355			esac
3356			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3357			;;
3358		esac
3359		;;
3360	(*)
3361		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3362		;;
3363	esac
3364	;;
3365(yes)
3366	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3367
3368	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3369
3370	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3371		&& test -z "${cf_tst_cflags}" \
3372		&& cf_fix_cppflags=no
3373	;;
3374esac
3375done
3376
3377if test -n "$cf_new_cflags" ; then
3378	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
3379
3380echo "${as_me:-configure}:3380: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3381
3382	CFLAGS="$CFLAGS $cf_new_cflags"
3383fi
3384
3385if test -n "$cf_new_cppflags" ; then
3386	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3387
3388echo "${as_me:-configure}:3388: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3389
3390	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3391fi
3392
3393if test -n "$cf_new_extra_cppflags" ; then
3394	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3395
3396echo "${as_me:-configure}:3396: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3397
3398	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3399fi
3400
3401fi
3402
3403if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3404	echo "$as_me:3404: checking if _XOPEN_SOURCE really is set" >&5
3405echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3406	cat >conftest.$ac_ext <<_ACEOF
3407#line 3407 "configure"
3408#include "confdefs.h"
3409#include <stdlib.h>
3410int
3411main ()
3412{
3413
3414#ifndef _XOPEN_SOURCE
3415make an error
3416#endif
3417  ;
3418  return 0;
3419}
3420_ACEOF
3421rm -f conftest.$ac_objext
3422if { (eval echo "$as_me:3422: \"$ac_compile\"") >&5
3423  (eval $ac_compile) 2>&5
3424  ac_status=$?
3425  echo "$as_me:3425: \$? = $ac_status" >&5
3426  (exit $ac_status); } &&
3427         { ac_try='test -s conftest.$ac_objext'
3428  { (eval echo "$as_me:3428: \"$ac_try\"") >&5
3429  (eval $ac_try) 2>&5
3430  ac_status=$?
3431  echo "$as_me:3431: \$? = $ac_status" >&5
3432  (exit $ac_status); }; }; then
3433  cf_XOPEN_SOURCE_set=yes
3434else
3435  echo "$as_me: failed program was:" >&5
3436cat conftest.$ac_ext >&5
3437cf_XOPEN_SOURCE_set=no
3438fi
3439rm -f conftest.$ac_objext conftest.$ac_ext
3440	echo "$as_me:3440: result: $cf_XOPEN_SOURCE_set" >&5
3441echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3442	if test $cf_XOPEN_SOURCE_set = yes
3443	then
3444		cat >conftest.$ac_ext <<_ACEOF
3445#line 3445 "configure"
3446#include "confdefs.h"
3447#include <stdlib.h>
3448int
3449main ()
3450{
3451
3452#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3453make an error
3454#endif
3455  ;
3456  return 0;
3457}
3458_ACEOF
3459rm -f conftest.$ac_objext
3460if { (eval echo "$as_me:3460: \"$ac_compile\"") >&5
3461  (eval $ac_compile) 2>&5
3462  ac_status=$?
3463  echo "$as_me:3463: \$? = $ac_status" >&5
3464  (exit $ac_status); } &&
3465         { ac_try='test -s conftest.$ac_objext'
3466  { (eval echo "$as_me:3466: \"$ac_try\"") >&5
3467  (eval $ac_try) 2>&5
3468  ac_status=$?
3469  echo "$as_me:3469: \$? = $ac_status" >&5
3470  (exit $ac_status); }; }; then
3471  cf_XOPEN_SOURCE_set_ok=yes
3472else
3473  echo "$as_me: failed program was:" >&5
3474cat conftest.$ac_ext >&5
3475cf_XOPEN_SOURCE_set_ok=no
3476fi
3477rm -f conftest.$ac_objext conftest.$ac_ext
3478		if test $cf_XOPEN_SOURCE_set_ok = no
3479		then
3480			{ echo "$as_me:3480: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3481echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3482		fi
3483	else
3484
3485echo "$as_me:3485: checking if we should define _XOPEN_SOURCE" >&5
3486echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3487if test "${cf_cv_xopen_source+set}" = set; then
3488  echo $ECHO_N "(cached) $ECHO_C" >&6
3489else
3490
3491	cat >conftest.$ac_ext <<_ACEOF
3492#line 3492 "configure"
3493#include "confdefs.h"
3494
3495#include <stdlib.h>
3496#include <string.h>
3497#include <sys/types.h>
3498
3499int
3500main ()
3501{
3502
3503#ifndef _XOPEN_SOURCE
3504make an error
3505#endif
3506  ;
3507  return 0;
3508}
3509_ACEOF
3510rm -f conftest.$ac_objext
3511if { (eval echo "$as_me:3511: \"$ac_compile\"") >&5
3512  (eval $ac_compile) 2>&5
3513  ac_status=$?
3514  echo "$as_me:3514: \$? = $ac_status" >&5
3515  (exit $ac_status); } &&
3516         { ac_try='test -s conftest.$ac_objext'
3517  { (eval echo "$as_me:3517: \"$ac_try\"") >&5
3518  (eval $ac_try) 2>&5
3519  ac_status=$?
3520  echo "$as_me:3520: \$? = $ac_status" >&5
3521  (exit $ac_status); }; }; then
3522  cf_cv_xopen_source=no
3523else
3524  echo "$as_me: failed program was:" >&5
3525cat conftest.$ac_ext >&5
3526cf_save="$CPPFLAGS"
3527	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3528	 cat >conftest.$ac_ext <<_ACEOF
3529#line 3529 "configure"
3530#include "confdefs.h"
3531
3532#include <stdlib.h>
3533#include <string.h>
3534#include <sys/types.h>
3535
3536int
3537main ()
3538{
3539
3540#ifdef _XOPEN_SOURCE
3541make an error
3542#endif
3543  ;
3544  return 0;
3545}
3546_ACEOF
3547rm -f conftest.$ac_objext
3548if { (eval echo "$as_me:3548: \"$ac_compile\"") >&5
3549  (eval $ac_compile) 2>&5
3550  ac_status=$?
3551  echo "$as_me:3551: \$? = $ac_status" >&5
3552  (exit $ac_status); } &&
3553         { ac_try='test -s conftest.$ac_objext'
3554  { (eval echo "$as_me:3554: \"$ac_try\"") >&5
3555  (eval $ac_try) 2>&5
3556  ac_status=$?
3557  echo "$as_me:3557: \$? = $ac_status" >&5
3558  (exit $ac_status); }; }; then
3559  cf_cv_xopen_source=no
3560else
3561  echo "$as_me: failed program was:" >&5
3562cat conftest.$ac_ext >&5
3563cf_cv_xopen_source=$cf_XOPEN_SOURCE
3564fi
3565rm -f conftest.$ac_objext conftest.$ac_ext
3566	CPPFLAGS="$cf_save"
3567
3568fi
3569rm -f conftest.$ac_objext conftest.$ac_ext
3570
3571fi
3572echo "$as_me:3572: result: $cf_cv_xopen_source" >&5
3573echo "${ECHO_T}$cf_cv_xopen_source" >&6
3574
3575if test "$cf_cv_xopen_source" != no ; then
3576
3577CFLAGS=`echo "$CFLAGS" | \
3578	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3579		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3580
3581CPPFLAGS=`echo "$CPPFLAGS" | \
3582	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3583		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3584
3585	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3586
3587cf_fix_cppflags=no
3588cf_new_cflags=
3589cf_new_cppflags=
3590cf_new_extra_cppflags=
3591
3592for cf_add_cflags in $cf_temp_xopen_source
3593do
3594case $cf_fix_cppflags in
3595(no)
3596	case $cf_add_cflags in
3597	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3598		case $cf_add_cflags in
3599		(-D*)
3600			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3601
3602			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3603				&& test -z "${cf_tst_cflags}" \
3604				&& cf_fix_cppflags=yes
3605
3606			if test $cf_fix_cppflags = yes ; then
3607				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3608				continue
3609			elif test "${cf_tst_cflags}" = "\"'" ; then
3610				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3611				continue
3612			fi
3613			;;
3614		esac
3615		case "$CPPFLAGS" in
3616		(*$cf_add_cflags)
3617			;;
3618		(*)
3619			case $cf_add_cflags in
3620			(-D*)
3621				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3622
3623CPPFLAGS=`echo "$CPPFLAGS" | \
3624	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3625		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3626
3627				;;
3628			esac
3629			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
3630			;;
3631		esac
3632		;;
3633	(*)
3634		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
3635		;;
3636	esac
3637	;;
3638(yes)
3639	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
3640
3641	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3642
3643	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3644		&& test -z "${cf_tst_cflags}" \
3645		&& cf_fix_cppflags=no
3646	;;
3647esac
3648done
3649
3650if test -n "$cf_new_cflags" ; then
3651
3652	CFLAGS="$CFLAGS $cf_new_cflags"
3653fi
3654
3655if test -n "$cf_new_cppflags" ; then
3656
3657	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
3658fi
3659
3660if test -n "$cf_new_extra_cppflags" ; then
3661
3662	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
3663fi
3664
3665fi
3666
3667	fi
3668fi
3669
3670echo "$as_me:3670: checking if SIGWINCH is defined" >&5
3671echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3672if test "${cf_cv_define_sigwinch+set}" = set; then
3673  echo $ECHO_N "(cached) $ECHO_C" >&6
3674else
3675
3676	cat >conftest.$ac_ext <<_ACEOF
3677#line 3677 "configure"
3678#include "confdefs.h"
3679
3680#include <sys/types.h>
3681#include <sys/signal.h>
3682
3683int
3684main ()
3685{
3686int x = SIGWINCH
3687  ;
3688  return 0;
3689}
3690_ACEOF
3691rm -f conftest.$ac_objext
3692if { (eval echo "$as_me:3692: \"$ac_compile\"") >&5
3693  (eval $ac_compile) 2>&5
3694  ac_status=$?
3695  echo "$as_me:3695: \$? = $ac_status" >&5
3696  (exit $ac_status); } &&
3697         { ac_try='test -s conftest.$ac_objext'
3698  { (eval echo "$as_me:3698: \"$ac_try\"") >&5
3699  (eval $ac_try) 2>&5
3700  ac_status=$?
3701  echo "$as_me:3701: \$? = $ac_status" >&5
3702  (exit $ac_status); }; }; then
3703  cf_cv_define_sigwinch=yes
3704else
3705  echo "$as_me: failed program was:" >&5
3706cat conftest.$ac_ext >&5
3707cat >conftest.$ac_ext <<_ACEOF
3708#line 3708 "configure"
3709#include "confdefs.h"
3710
3711#undef _XOPEN_SOURCE
3712#undef _POSIX_SOURCE
3713#undef _POSIX_C_SOURCE
3714#include <sys/types.h>
3715#include <sys/signal.h>
3716
3717int
3718main ()
3719{
3720int x = SIGWINCH
3721  ;
3722  return 0;
3723}
3724_ACEOF
3725rm -f conftest.$ac_objext
3726if { (eval echo "$as_me:3726: \"$ac_compile\"") >&5
3727  (eval $ac_compile) 2>&5
3728  ac_status=$?
3729  echo "$as_me:3729: \$? = $ac_status" >&5
3730  (exit $ac_status); } &&
3731         { ac_try='test -s conftest.$ac_objext'
3732  { (eval echo "$as_me:3732: \"$ac_try\"") >&5
3733  (eval $ac_try) 2>&5
3734  ac_status=$?
3735  echo "$as_me:3735: \$? = $ac_status" >&5
3736  (exit $ac_status); }; }; then
3737  cf_cv_define_sigwinch=maybe
3738else
3739  echo "$as_me: failed program was:" >&5
3740cat conftest.$ac_ext >&5
3741cf_cv_define_sigwinch=no
3742fi
3743rm -f conftest.$ac_objext conftest.$ac_ext
3744
3745fi
3746rm -f conftest.$ac_objext conftest.$ac_ext
3747
3748fi
3749echo "$as_me:3749: result: $cf_cv_define_sigwinch" >&5
3750echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3751
3752if test "$cf_cv_define_sigwinch" = maybe ; then
3753echo "$as_me:3753: checking for actual SIGWINCH definition" >&5
3754echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3755if test "${cf_cv_fixup_sigwinch+set}" = set; then
3756  echo $ECHO_N "(cached) $ECHO_C" >&6
3757else
3758
3759cf_cv_fixup_sigwinch=unknown
3760cf_sigwinch=32
3761while test $cf_sigwinch != 1
3762do
3763	cat >conftest.$ac_ext <<_ACEOF
3764#line 3764 "configure"
3765#include "confdefs.h"
3766
3767#undef _XOPEN_SOURCE
3768#undef _POSIX_SOURCE
3769#undef _POSIX_C_SOURCE
3770#include <sys/types.h>
3771#include <sys/signal.h>
3772
3773int
3774main ()
3775{
3776
3777#if SIGWINCH != $cf_sigwinch
3778make an error
3779#endif
3780int x = SIGWINCH
3781  ;
3782  return 0;
3783}
3784_ACEOF
3785rm -f conftest.$ac_objext
3786if { (eval echo "$as_me:3786: \"$ac_compile\"") >&5
3787  (eval $ac_compile) 2>&5
3788  ac_status=$?
3789  echo "$as_me:3789: \$? = $ac_status" >&5
3790  (exit $ac_status); } &&
3791         { ac_try='test -s conftest.$ac_objext'
3792  { (eval echo "$as_me:3792: \"$ac_try\"") >&5
3793  (eval $ac_try) 2>&5
3794  ac_status=$?
3795  echo "$as_me:3795: \$? = $ac_status" >&5
3796  (exit $ac_status); }; }; then
3797  cf_cv_fixup_sigwinch=$cf_sigwinch
3798	 break
3799else
3800  echo "$as_me: failed program was:" >&5
3801cat conftest.$ac_ext >&5
3802fi
3803rm -f conftest.$ac_objext conftest.$ac_ext
3804
3805cf_sigwinch=`expr $cf_sigwinch - 1`
3806done
3807
3808fi
3809echo "$as_me:3809: result: $cf_cv_fixup_sigwinch" >&5
3810echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
3811
3812	if test "$cf_cv_fixup_sigwinch" != unknown ; then
3813		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
3814	fi
3815fi
3816
3817###	checks for header files
3818
3819for ac_header in \
3820ncurses/curses.h \
3821ncurses/term.h \
3822stdlib.h \
3823sys/ptem.h sys/ttydefaults.h \
3824term.h \
3825termios.h \
3826unistd.h \
3827wchar.h \
3828
3829do
3830as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
3831echo "$as_me:3831: checking for $ac_header" >&5
3832echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
3833if eval "test \"\${$as_ac_Header+set}\" = set"; then
3834  echo $ECHO_N "(cached) $ECHO_C" >&6
3835else
3836  cat >conftest.$ac_ext <<_ACEOF
3837#line 3837 "configure"
3838#include "confdefs.h"
3839#include <$ac_header>
3840_ACEOF
3841if { (eval echo "$as_me:3841: \"$ac_cpp conftest.$ac_ext\"") >&5
3842  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
3843  ac_status=$?
3844  egrep -v '^ *\+' conftest.er1 >conftest.err
3845  rm -f conftest.er1
3846  cat conftest.err >&5
3847  echo "$as_me:3847: \$? = $ac_status" >&5
3848  (exit $ac_status); } >/dev/null; then
3849  if test -s conftest.err; then
3850    ac_cpp_err=$ac_c_preproc_warn_flag
3851  else
3852    ac_cpp_err=
3853  fi
3854else
3855  ac_cpp_err=yes
3856fi
3857if test -z "$ac_cpp_err"; then
3858  eval "$as_ac_Header=yes"
3859else
3860  echo "$as_me: failed program was:" >&5
3861  cat conftest.$ac_ext >&5
3862  eval "$as_ac_Header=no"
3863fi
3864rm -f conftest.err conftest.$ac_ext
3865fi
3866echo "$as_me:3866: result: `eval echo '${'$as_ac_Header'}'`" >&5
3867echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
3868if test `eval echo '${'$as_ac_Header'}'` = yes; then
3869  cat >>confdefs.h <<EOF
3870#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
3871EOF
3872
3873fi
3874done
3875
3876echo "$as_me:3876: checking whether time.h and sys/time.h may both be included" >&5
3877echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
3878if test "${ac_cv_header_time+set}" = set; then
3879  echo $ECHO_N "(cached) $ECHO_C" >&6
3880else
3881  cat >conftest.$ac_ext <<_ACEOF
3882#line 3882 "configure"
3883#include "confdefs.h"
3884#include <sys/types.h>
3885#include <sys/time.h>
3886#include <time.h>
3887
3888int
3889main ()
3890{
3891if ((struct tm *) 0)
3892return 0;
3893  ;
3894  return 0;
3895}
3896_ACEOF
3897rm -f conftest.$ac_objext
3898if { (eval echo "$as_me:3898: \"$ac_compile\"") >&5
3899  (eval $ac_compile) 2>&5
3900  ac_status=$?
3901  echo "$as_me:3901: \$? = $ac_status" >&5
3902  (exit $ac_status); } &&
3903         { ac_try='test -s conftest.$ac_objext'
3904  { (eval echo "$as_me:3904: \"$ac_try\"") >&5
3905  (eval $ac_try) 2>&5
3906  ac_status=$?
3907  echo "$as_me:3907: \$? = $ac_status" >&5
3908  (exit $ac_status); }; }; then
3909  ac_cv_header_time=yes
3910else
3911  echo "$as_me: failed program was:" >&5
3912cat conftest.$ac_ext >&5
3913ac_cv_header_time=no
3914fi
3915rm -f conftest.$ac_objext conftest.$ac_ext
3916fi
3917echo "$as_me:3917: result: $ac_cv_header_time" >&5
3918echo "${ECHO_T}$ac_cv_header_time" >&6
3919if test $ac_cv_header_time = yes; then
3920
3921cat >>confdefs.h <<\EOF
3922#define TIME_WITH_SYS_TIME 1
3923EOF
3924
3925fi
3926
3927  echo "$as_me:3927: checking for nl_langinfo and CODESET" >&5
3928echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
3929if test "${am_cv_langinfo_codeset+set}" = set; then
3930  echo $ECHO_N "(cached) $ECHO_C" >&6
3931else
3932  cat >conftest.$ac_ext <<_ACEOF
3933#line 3933 "configure"
3934#include "confdefs.h"
3935#include <langinfo.h>
3936int
3937main ()
3938{
3939char* cs = nl_langinfo(CODESET);
3940  ;
3941  return 0;
3942}
3943_ACEOF
3944rm -f conftest.$ac_objext conftest$ac_exeext
3945if { (eval echo "$as_me:3945: \"$ac_link\"") >&5
3946  (eval $ac_link) 2>&5
3947  ac_status=$?
3948  echo "$as_me:3948: \$? = $ac_status" >&5
3949  (exit $ac_status); } &&
3950         { ac_try='test -s conftest$ac_exeext'
3951  { (eval echo "$as_me:3951: \"$ac_try\"") >&5
3952  (eval $ac_try) 2>&5
3953  ac_status=$?
3954  echo "$as_me:3954: \$? = $ac_status" >&5
3955  (exit $ac_status); }; }; then
3956  am_cv_langinfo_codeset=yes
3957else
3958  echo "$as_me: failed program was:" >&5
3959cat conftest.$ac_ext >&5
3960am_cv_langinfo_codeset=no
3961fi
3962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
3963
3964fi
3965echo "$as_me:3965: result: $am_cv_langinfo_codeset" >&5
3966echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
3967  if test $am_cv_langinfo_codeset = yes; then
3968
3969cat >>confdefs.h <<\EOF
3970#define HAVE_LANGINFO_CODESET 1
3971EOF
3972
3973  fi
3974
3975###	checks for typedefs
3976
3977echo "$as_me:3977: checking for signal global datatype" >&5
3978echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
3979if test "${cf_cv_sig_atomic_t+set}" = set; then
3980  echo $ECHO_N "(cached) $ECHO_C" >&6
3981else
3982
3983	for cf_type in \
3984		"volatile sig_atomic_t" \
3985		"sig_atomic_t" \
3986		"int"
3987	do
3988	cat >conftest.$ac_ext <<_ACEOF
3989#line 3989 "configure"
3990#include "confdefs.h"
3991
3992#include <sys/types.h>
3993#include <signal.h>
3994#include <stdio.h>
3995
3996extern $cf_type x;
3997$cf_type x;
3998static void handler(int sig)
3999{
4000	x = 5;
4001}
4002int
4003main ()
4004{
4005signal(SIGINT, handler);
4006		 x = 1
4007  ;
4008  return 0;
4009}
4010_ACEOF
4011rm -f conftest.$ac_objext
4012if { (eval echo "$as_me:4012: \"$ac_compile\"") >&5
4013  (eval $ac_compile) 2>&5
4014  ac_status=$?
4015  echo "$as_me:4015: \$? = $ac_status" >&5
4016  (exit $ac_status); } &&
4017         { ac_try='test -s conftest.$ac_objext'
4018  { (eval echo "$as_me:4018: \"$ac_try\"") >&5
4019  (eval $ac_try) 2>&5
4020  ac_status=$?
4021  echo "$as_me:4021: \$? = $ac_status" >&5
4022  (exit $ac_status); }; }; then
4023  cf_cv_sig_atomic_t=$cf_type
4024else
4025  echo "$as_me: failed program was:" >&5
4026cat conftest.$ac_ext >&5
4027cf_cv_sig_atomic_t=no
4028fi
4029rm -f conftest.$ac_objext conftest.$ac_ext
4030		test "$cf_cv_sig_atomic_t" != no && break
4031	done
4032
4033fi
4034
4035echo "$as_me:4035: result: $cf_cv_sig_atomic_t" >&5
4036echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4037test "$cf_cv_sig_atomic_t" != no &&
4038cat >>confdefs.h <<EOF
4039#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4040EOF
4041
4042echo "$as_me:4042: checking for ANSI C header files" >&5
4043echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4044if test "${ac_cv_header_stdc+set}" = set; then
4045  echo $ECHO_N "(cached) $ECHO_C" >&6
4046else
4047  cat >conftest.$ac_ext <<_ACEOF
4048#line 4048 "configure"
4049#include "confdefs.h"
4050#include <stdlib.h>
4051#include <stdarg.h>
4052#include <string.h>
4053#include <float.h>
4054
4055_ACEOF
4056if { (eval echo "$as_me:4056: \"$ac_cpp conftest.$ac_ext\"") >&5
4057  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4058  ac_status=$?
4059  egrep -v '^ *\+' conftest.er1 >conftest.err
4060  rm -f conftest.er1
4061  cat conftest.err >&5
4062  echo "$as_me:4062: \$? = $ac_status" >&5
4063  (exit $ac_status); } >/dev/null; then
4064  if test -s conftest.err; then
4065    ac_cpp_err=$ac_c_preproc_warn_flag
4066  else
4067    ac_cpp_err=
4068  fi
4069else
4070  ac_cpp_err=yes
4071fi
4072if test -z "$ac_cpp_err"; then
4073  ac_cv_header_stdc=yes
4074else
4075  echo "$as_me: failed program was:" >&5
4076  cat conftest.$ac_ext >&5
4077  ac_cv_header_stdc=no
4078fi
4079rm -f conftest.err conftest.$ac_ext
4080
4081if test $ac_cv_header_stdc = yes; then
4082  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4083  cat >conftest.$ac_ext <<_ACEOF
4084#line 4084 "configure"
4085#include "confdefs.h"
4086#include <string.h>
4087
4088_ACEOF
4089if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4090  egrep "memchr" >/dev/null 2>&1; then
4091  :
4092else
4093  ac_cv_header_stdc=no
4094fi
4095rm -rf conftest*
4096
4097fi
4098
4099if test $ac_cv_header_stdc = yes; then
4100  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4101  cat >conftest.$ac_ext <<_ACEOF
4102#line 4102 "configure"
4103#include "confdefs.h"
4104#include <stdlib.h>
4105
4106_ACEOF
4107if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4108  egrep "free" >/dev/null 2>&1; then
4109  :
4110else
4111  ac_cv_header_stdc=no
4112fi
4113rm -rf conftest*
4114
4115fi
4116
4117if test $ac_cv_header_stdc = yes; then
4118  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4119  if test "$cross_compiling" = yes; then
4120  :
4121else
4122  cat >conftest.$ac_ext <<_ACEOF
4123#line 4123 "configure"
4124#include "confdefs.h"
4125#include <ctype.h>
4126#if ((' ' & 0x0FF) == 0x020)
4127# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4128# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4129#else
4130# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4131                     || ('j' <= (c) && (c) <= 'r') \
4132                     || ('s' <= (c) && (c) <= 'z'))
4133# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4134#endif
4135
4136#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4137int
4138main ()
4139{
4140  int i;
4141  for (i = 0; i < 256; i++)
4142    if (XOR (islower (i), ISLOWER (i))
4143        || toupper (i) != TOUPPER (i))
4144      $ac_main_return(2);
4145  $ac_main_return (0);
4146}
4147_ACEOF
4148rm -f conftest$ac_exeext
4149if { (eval echo "$as_me:4149: \"$ac_link\"") >&5
4150  (eval $ac_link) 2>&5
4151  ac_status=$?
4152  echo "$as_me:4152: \$? = $ac_status" >&5
4153  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4154  { (eval echo "$as_me:4154: \"$ac_try\"") >&5
4155  (eval $ac_try) 2>&5
4156  ac_status=$?
4157  echo "$as_me:4157: \$? = $ac_status" >&5
4158  (exit $ac_status); }; }; then
4159  :
4160else
4161  echo "$as_me: program exited with status $ac_status" >&5
4162echo "$as_me: failed program was:" >&5
4163cat conftest.$ac_ext >&5
4164ac_cv_header_stdc=no
4165fi
4166rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4167fi
4168fi
4169fi
4170echo "$as_me:4170: result: $ac_cv_header_stdc" >&5
4171echo "${ECHO_T}$ac_cv_header_stdc" >&6
4172if test $ac_cv_header_stdc = yes; then
4173
4174cat >>confdefs.h <<\EOF
4175#define STDC_HEADERS 1
4176EOF
4177
4178fi
4179
4180# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4181
4182for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4183                  inttypes.h stdint.h unistd.h
4184do
4185as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4186echo "$as_me:4186: checking for $ac_header" >&5
4187echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4188if eval "test \"\${$as_ac_Header+set}\" = set"; then
4189  echo $ECHO_N "(cached) $ECHO_C" >&6
4190else
4191  cat >conftest.$ac_ext <<_ACEOF
4192#line 4192 "configure"
4193#include "confdefs.h"
4194$ac_includes_default
4195#include <$ac_header>
4196_ACEOF
4197rm -f conftest.$ac_objext
4198if { (eval echo "$as_me:4198: \"$ac_compile\"") >&5
4199  (eval $ac_compile) 2>&5
4200  ac_status=$?
4201  echo "$as_me:4201: \$? = $ac_status" >&5
4202  (exit $ac_status); } &&
4203         { ac_try='test -s conftest.$ac_objext'
4204  { (eval echo "$as_me:4204: \"$ac_try\"") >&5
4205  (eval $ac_try) 2>&5
4206  ac_status=$?
4207  echo "$as_me:4207: \$? = $ac_status" >&5
4208  (exit $ac_status); }; }; then
4209  eval "$as_ac_Header=yes"
4210else
4211  echo "$as_me: failed program was:" >&5
4212cat conftest.$ac_ext >&5
4213eval "$as_ac_Header=no"
4214fi
4215rm -f conftest.$ac_objext conftest.$ac_ext
4216fi
4217echo "$as_me:4217: result: `eval echo '${'$as_ac_Header'}'`" >&5
4218echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4219if test `eval echo '${'$as_ac_Header'}'` = yes; then
4220  cat >>confdefs.h <<EOF
4221#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4222EOF
4223
4224fi
4225done
4226
4227echo "$as_me:4227: checking for time_t" >&5
4228echo $ECHO_N "checking for time_t... $ECHO_C" >&6
4229if test "${ac_cv_type_time_t+set}" = set; then
4230  echo $ECHO_N "(cached) $ECHO_C" >&6
4231else
4232  cat >conftest.$ac_ext <<_ACEOF
4233#line 4233 "configure"
4234#include "confdefs.h"
4235$ac_includes_default
4236int
4237main ()
4238{
4239if ((time_t *) 0)
4240  return 0;
4241if (sizeof (time_t))
4242  return 0;
4243  ;
4244  return 0;
4245}
4246_ACEOF
4247rm -f conftest.$ac_objext
4248if { (eval echo "$as_me:4248: \"$ac_compile\"") >&5
4249  (eval $ac_compile) 2>&5
4250  ac_status=$?
4251  echo "$as_me:4251: \$? = $ac_status" >&5
4252  (exit $ac_status); } &&
4253         { ac_try='test -s conftest.$ac_objext'
4254  { (eval echo "$as_me:4254: \"$ac_try\"") >&5
4255  (eval $ac_try) 2>&5
4256  ac_status=$?
4257  echo "$as_me:4257: \$? = $ac_status" >&5
4258  (exit $ac_status); }; }; then
4259  ac_cv_type_time_t=yes
4260else
4261  echo "$as_me: failed program was:" >&5
4262cat conftest.$ac_ext >&5
4263ac_cv_type_time_t=no
4264fi
4265rm -f conftest.$ac_objext conftest.$ac_ext
4266fi
4267echo "$as_me:4267: result: $ac_cv_type_time_t" >&5
4268echo "${ECHO_T}$ac_cv_type_time_t" >&6
4269if test $ac_cv_type_time_t = yes; then
4270  :
4271else
4272
4273cat >>confdefs.h <<EOF
4274#define time_t long
4275EOF
4276
4277fi
4278
4279echo "$as_me:4279: checking for cc_t in <termios.h> or <termio.h>" >&5
4280echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
4281if test "${cf_cv_type_cc_t+set}" = set; then
4282  echo $ECHO_N "(cached) $ECHO_C" >&6
4283else
4284
4285	cat >conftest.$ac_ext <<_ACEOF
4286#line 4286 "configure"
4287#include "confdefs.h"
4288
4289#include <sys/types.h>
4290#if defined(HAVE_TERMIOS_H)
4291#include <termios.h>
4292#else
4293#include <termio.h>
4294#include <sys/ioctl.h>
4295#endif
4296
4297int
4298main ()
4299{
4300cc_t x
4301  ;
4302  return 0;
4303}
4304_ACEOF
4305rm -f conftest.$ac_objext
4306if { (eval echo "$as_me:4306: \"$ac_compile\"") >&5
4307  (eval $ac_compile) 2>&5
4308  ac_status=$?
4309  echo "$as_me:4309: \$? = $ac_status" >&5
4310  (exit $ac_status); } &&
4311         { ac_try='test -s conftest.$ac_objext'
4312  { (eval echo "$as_me:4312: \"$ac_try\"") >&5
4313  (eval $ac_try) 2>&5
4314  ac_status=$?
4315  echo "$as_me:4315: \$? = $ac_status" >&5
4316  (exit $ac_status); }; }; then
4317  cf_cv_type_cc_t=yes
4318else
4319  echo "$as_me: failed program was:" >&5
4320cat conftest.$ac_ext >&5
4321cf_cv_type_cc_t=no
4322fi
4323rm -f conftest.$ac_objext conftest.$ac_ext
4324
4325fi
4326
4327echo "$as_me:4327: result: $cf_cv_type_cc_t" >&5
4328echo "${ECHO_T}$cf_cv_type_cc_t" >&6
4329test $cf_cv_type_cc_t = no &&
4330cat >>confdefs.h <<\EOF
4331#define cc_t unsigned char
4332EOF
4333
4334echo "$as_me:4334: checking for mode_t" >&5
4335echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4336if test "${ac_cv_type_mode_t+set}" = set; then
4337  echo $ECHO_N "(cached) $ECHO_C" >&6
4338else
4339  cat >conftest.$ac_ext <<_ACEOF
4340#line 4340 "configure"
4341#include "confdefs.h"
4342$ac_includes_default
4343int
4344main ()
4345{
4346if ((mode_t *) 0)
4347  return 0;
4348if (sizeof (mode_t))
4349  return 0;
4350  ;
4351  return 0;
4352}
4353_ACEOF
4354rm -f conftest.$ac_objext
4355if { (eval echo "$as_me:4355: \"$ac_compile\"") >&5
4356  (eval $ac_compile) 2>&5
4357  ac_status=$?
4358  echo "$as_me:4358: \$? = $ac_status" >&5
4359  (exit $ac_status); } &&
4360         { ac_try='test -s conftest.$ac_objext'
4361  { (eval echo "$as_me:4361: \"$ac_try\"") >&5
4362  (eval $ac_try) 2>&5
4363  ac_status=$?
4364  echo "$as_me:4364: \$? = $ac_status" >&5
4365  (exit $ac_status); }; }; then
4366  ac_cv_type_mode_t=yes
4367else
4368  echo "$as_me: failed program was:" >&5
4369cat conftest.$ac_ext >&5
4370ac_cv_type_mode_t=no
4371fi
4372rm -f conftest.$ac_objext conftest.$ac_ext
4373fi
4374echo "$as_me:4374: result: $ac_cv_type_mode_t" >&5
4375echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4376if test $ac_cv_type_mode_t = yes; then
4377  :
4378else
4379
4380cat >>confdefs.h <<EOF
4381#define mode_t int
4382EOF
4383
4384fi
4385
4386echo "$as_me:4386: checking for pid_t" >&5
4387echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4388if test "${ac_cv_type_pid_t+set}" = set; then
4389  echo $ECHO_N "(cached) $ECHO_C" >&6
4390else
4391  cat >conftest.$ac_ext <<_ACEOF
4392#line 4392 "configure"
4393#include "confdefs.h"
4394$ac_includes_default
4395int
4396main ()
4397{
4398if ((pid_t *) 0)
4399  return 0;
4400if (sizeof (pid_t))
4401  return 0;
4402  ;
4403  return 0;
4404}
4405_ACEOF
4406rm -f conftest.$ac_objext
4407if { (eval echo "$as_me:4407: \"$ac_compile\"") >&5
4408  (eval $ac_compile) 2>&5
4409  ac_status=$?
4410  echo "$as_me:4410: \$? = $ac_status" >&5
4411  (exit $ac_status); } &&
4412         { ac_try='test -s conftest.$ac_objext'
4413  { (eval echo "$as_me:4413: \"$ac_try\"") >&5
4414  (eval $ac_try) 2>&5
4415  ac_status=$?
4416  echo "$as_me:4416: \$? = $ac_status" >&5
4417  (exit $ac_status); }; }; then
4418  ac_cv_type_pid_t=yes
4419else
4420  echo "$as_me: failed program was:" >&5
4421cat conftest.$ac_ext >&5
4422ac_cv_type_pid_t=no
4423fi
4424rm -f conftest.$ac_objext conftest.$ac_ext
4425fi
4426echo "$as_me:4426: result: $ac_cv_type_pid_t" >&5
4427echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4428if test $ac_cv_type_pid_t = yes; then
4429  :
4430else
4431
4432cat >>confdefs.h <<EOF
4433#define pid_t int
4434EOF
4435
4436fi
4437
4438echo "$as_me:4438: checking for uid_t in sys/types.h" >&5
4439echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4440if test "${ac_cv_type_uid_t+set}" = set; then
4441  echo $ECHO_N "(cached) $ECHO_C" >&6
4442else
4443  cat >conftest.$ac_ext <<_ACEOF
4444#line 4444 "configure"
4445#include "confdefs.h"
4446#include <sys/types.h>
4447
4448_ACEOF
4449if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4450  egrep "uid_t" >/dev/null 2>&1; then
4451  ac_cv_type_uid_t=yes
4452else
4453  ac_cv_type_uid_t=no
4454fi
4455rm -rf conftest*
4456
4457fi
4458echo "$as_me:4458: result: $ac_cv_type_uid_t" >&5
4459echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4460if test $ac_cv_type_uid_t = no; then
4461
4462cat >>confdefs.h <<\EOF
4463#define uid_t int
4464EOF
4465
4466cat >>confdefs.h <<\EOF
4467#define gid_t int
4468EOF
4469
4470fi
4471
4472echo "$as_me:4472: checking for off_t" >&5
4473echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4474if test "${ac_cv_type_off_t+set}" = set; then
4475  echo $ECHO_N "(cached) $ECHO_C" >&6
4476else
4477  cat >conftest.$ac_ext <<_ACEOF
4478#line 4478 "configure"
4479#include "confdefs.h"
4480$ac_includes_default
4481int
4482main ()
4483{
4484if ((off_t *) 0)
4485  return 0;
4486if (sizeof (off_t))
4487  return 0;
4488  ;
4489  return 0;
4490}
4491_ACEOF
4492rm -f conftest.$ac_objext
4493if { (eval echo "$as_me:4493: \"$ac_compile\"") >&5
4494  (eval $ac_compile) 2>&5
4495  ac_status=$?
4496  echo "$as_me:4496: \$? = $ac_status" >&5
4497  (exit $ac_status); } &&
4498         { ac_try='test -s conftest.$ac_objext'
4499  { (eval echo "$as_me:4499: \"$ac_try\"") >&5
4500  (eval $ac_try) 2>&5
4501  ac_status=$?
4502  echo "$as_me:4502: \$? = $ac_status" >&5
4503  (exit $ac_status); }; }; then
4504  ac_cv_type_off_t=yes
4505else
4506  echo "$as_me: failed program was:" >&5
4507cat conftest.$ac_ext >&5
4508ac_cv_type_off_t=no
4509fi
4510rm -f conftest.$ac_objext conftest.$ac_ext
4511fi
4512echo "$as_me:4512: result: $ac_cv_type_off_t" >&5
4513echo "${ECHO_T}$ac_cv_type_off_t" >&6
4514if test $ac_cv_type_off_t = yes; then
4515  :
4516else
4517
4518cat >>confdefs.h <<EOF
4519#define off_t long
4520EOF
4521
4522fi
4523
4524###	checks for library functions
4525
4526for ac_func in \
4527	gethostname \
4528	getlogin \
4529	initgroups \
4530	mkdtemp \
4531	putenv \
4532	unsetenv \
4533	sched_yield \
4534	setpgid \
4535	strftime \
4536	tcgetattr \
4537	waitpid \
4538	wcswidth \
4539	wcwidth
4540do
4541as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4542echo "$as_me:4542: checking for $ac_func" >&5
4543echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4544if eval "test \"\${$as_ac_var+set}\" = set"; then
4545  echo $ECHO_N "(cached) $ECHO_C" >&6
4546else
4547  cat >conftest.$ac_ext <<_ACEOF
4548#line 4548 "configure"
4549#include "confdefs.h"
4550/* System header to define __stub macros and hopefully few prototypes,
4551    which can conflict with char $ac_func (); below.  */
4552#include <assert.h>
4553/* Override any gcc2 internal prototype to avoid an error.  */
4554#ifdef __cplusplus
4555extern "C"
4556#endif
4557/* We use char because int might match the return type of a gcc2
4558   builtin and then its argument prototype would still apply.  */
4559char $ac_func ();
4560char (*f) ();
4561
4562int
4563main ()
4564{
4565/* The GNU C library defines this for functions which it implements
4566    to always fail with ENOSYS.  Some functions are actually named
4567    something starting with __ and the normal name is an alias.  */
4568#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4569choke me
4570#else
4571f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4572#endif
4573
4574  ;
4575  return 0;
4576}
4577_ACEOF
4578rm -f conftest.$ac_objext conftest$ac_exeext
4579if { (eval echo "$as_me:4579: \"$ac_link\"") >&5
4580  (eval $ac_link) 2>&5
4581  ac_status=$?
4582  echo "$as_me:4582: \$? = $ac_status" >&5
4583  (exit $ac_status); } &&
4584         { ac_try='test -s conftest$ac_exeext'
4585  { (eval echo "$as_me:4585: \"$ac_try\"") >&5
4586  (eval $ac_try) 2>&5
4587  ac_status=$?
4588  echo "$as_me:4588: \$? = $ac_status" >&5
4589  (exit $ac_status); }; }; then
4590  eval "$as_ac_var=yes"
4591else
4592  echo "$as_me: failed program was:" >&5
4593cat conftest.$ac_ext >&5
4594eval "$as_ac_var=no"
4595fi
4596rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4597fi
4598echo "$as_me:4598: result: `eval echo '${'$as_ac_var'}'`" >&5
4599echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4600if test `eval echo '${'$as_ac_var'}'` = yes; then
4601  cat >>confdefs.h <<EOF
4602#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4603EOF
4604
4605fi
4606done
4607
4608for ac_header in lastlog.h paths.h
4609do
4610as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4611echo "$as_me:4611: checking for $ac_header" >&5
4612echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4613if eval "test \"\${$as_ac_Header+set}\" = set"; then
4614  echo $ECHO_N "(cached) $ECHO_C" >&6
4615else
4616  cat >conftest.$ac_ext <<_ACEOF
4617#line 4617 "configure"
4618#include "confdefs.h"
4619#include <$ac_header>
4620_ACEOF
4621if { (eval echo "$as_me:4621: \"$ac_cpp conftest.$ac_ext\"") >&5
4622  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4623  ac_status=$?
4624  egrep -v '^ *\+' conftest.er1 >conftest.err
4625  rm -f conftest.er1
4626  cat conftest.err >&5
4627  echo "$as_me:4627: \$? = $ac_status" >&5
4628  (exit $ac_status); } >/dev/null; then
4629  if test -s conftest.err; then
4630    ac_cpp_err=$ac_c_preproc_warn_flag
4631  else
4632    ac_cpp_err=
4633  fi
4634else
4635  ac_cpp_err=yes
4636fi
4637if test -z "$ac_cpp_err"; then
4638  eval "$as_ac_Header=yes"
4639else
4640  echo "$as_me: failed program was:" >&5
4641  cat conftest.$ac_ext >&5
4642  eval "$as_ac_Header=no"
4643fi
4644rm -f conftest.err conftest.$ac_ext
4645fi
4646echo "$as_me:4646: result: `eval echo '${'$as_ac_Header'}'`" >&5
4647echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4648if test `eval echo '${'$as_ac_Header'}'` = yes; then
4649  cat >>confdefs.h <<EOF
4650#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4651EOF
4652
4653fi
4654done
4655
4656echo "$as_me:4656: checking for lastlog path" >&5
4657echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4658if test "${cf_cv_path_lastlog+set}" = set; then
4659  echo $ECHO_N "(cached) $ECHO_C" >&6
4660else
4661
4662cat >conftest.$ac_ext <<_ACEOF
4663#line 4663 "configure"
4664#include "confdefs.h"
4665
4666#include <sys/types.h>
4667#ifdef HAVE_LASTLOG_H
4668#include <lastlog.h>
4669#else
4670#ifdef HAVE_PATHS_H
4671#include <paths.h>
4672#endif
4673#endif
4674int
4675main ()
4676{
4677char *path = _PATH_LASTLOG
4678  ;
4679  return 0;
4680}
4681_ACEOF
4682rm -f conftest.$ac_objext
4683if { (eval echo "$as_me:4683: \"$ac_compile\"") >&5
4684  (eval $ac_compile) 2>&5
4685  ac_status=$?
4686  echo "$as_me:4686: \$? = $ac_status" >&5
4687  (exit $ac_status); } &&
4688         { ac_try='test -s conftest.$ac_objext'
4689  { (eval echo "$as_me:4689: \"$ac_try\"") >&5
4690  (eval $ac_try) 2>&5
4691  ac_status=$?
4692  echo "$as_me:4692: \$? = $ac_status" >&5
4693  (exit $ac_status); }; }; then
4694  cf_cv_path_lastlog="_PATH_LASTLOG"
4695else
4696  echo "$as_me: failed program was:" >&5
4697cat conftest.$ac_ext >&5
4698if test -f /usr/adm/lastlog ; then
4699	 	cf_cv_path_lastlog=/usr/adm/lastlog
4700	else
4701		cf_cv_path_lastlog=no
4702	fi
4703fi
4704rm -f conftest.$ac_objext conftest.$ac_ext
4705
4706fi
4707echo "$as_me:4707: result: $cf_cv_path_lastlog" >&5
4708echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4709test $cf_cv_path_lastlog != no &&
4710cat >>confdefs.h <<\EOF
4711#define USE_LASTLOG 1
4712EOF
4713
4714echo "$as_me:4714: checking for utmp implementation" >&5
4715echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4716if test "${cf_cv_have_utmp+set}" = set; then
4717  echo $ECHO_N "(cached) $ECHO_C" >&6
4718else
4719
4720	cf_cv_have_utmp=no
4721for cf_header in utmpx utmp ; do
4722cf_utmp_includes="
4723#include <sys/types.h>
4724#include <${cf_header}.h>
4725#define getutent getutxent
4726#ifdef USE_LASTLOG
4727#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4728#endif
4729"
4730	cat >conftest.$ac_ext <<_ACEOF
4731#line 4731 "configure"
4732#include "confdefs.h"
4733$cf_utmp_includes
4734int
4735main ()
4736{
4737struct $cf_header x;
4738	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4739
4740  ;
4741  return 0;
4742}
4743_ACEOF
4744rm -f conftest.$ac_objext
4745if { (eval echo "$as_me:4745: \"$ac_compile\"") >&5
4746  (eval $ac_compile) 2>&5
4747  ac_status=$?
4748  echo "$as_me:4748: \$? = $ac_status" >&5
4749  (exit $ac_status); } &&
4750         { ac_try='test -s conftest.$ac_objext'
4751  { (eval echo "$as_me:4751: \"$ac_try\"") >&5
4752  (eval $ac_try) 2>&5
4753  ac_status=$?
4754  echo "$as_me:4754: \$? = $ac_status" >&5
4755  (exit $ac_status); }; }; then
4756  cf_cv_have_utmp=$cf_header
4757	 break
4758else
4759  echo "$as_me: failed program was:" >&5
4760cat conftest.$ac_ext >&5
4761
4762	cat >conftest.$ac_ext <<_ACEOF
4763#line 4763 "configure"
4764#include "confdefs.h"
4765$cf_utmp_includes
4766int
4767main ()
4768{
4769struct $cf_header x;
4770	 char *name = x.ut_user; /* utmpx.h must declare this */
4771
4772  ;
4773  return 0;
4774}
4775_ACEOF
4776rm -f conftest.$ac_objext
4777if { (eval echo "$as_me:4777: \"$ac_compile\"") >&5
4778  (eval $ac_compile) 2>&5
4779  ac_status=$?
4780  echo "$as_me:4780: \$? = $ac_status" >&5
4781  (exit $ac_status); } &&
4782         { ac_try='test -s conftest.$ac_objext'
4783  { (eval echo "$as_me:4783: \"$ac_try\"") >&5
4784  (eval $ac_try) 2>&5
4785  ac_status=$?
4786  echo "$as_me:4786: \$? = $ac_status" >&5
4787  (exit $ac_status); }; }; then
4788  cf_cv_have_utmp=$cf_header
4789	 break
4790
4791else
4792  echo "$as_me: failed program was:" >&5
4793cat conftest.$ac_ext >&5
4794fi
4795rm -f conftest.$ac_objext conftest.$ac_ext
4796fi
4797rm -f conftest.$ac_objext conftest.$ac_ext
4798done
4799
4800fi
4801echo "$as_me:4801: result: $cf_cv_have_utmp" >&5
4802echo "${ECHO_T}$cf_cv_have_utmp" >&6
4803
4804if test $cf_cv_have_utmp != no ; then
4805
4806cat >>confdefs.h <<\EOF
4807#define HAVE_UTMP 1
4808EOF
4809
4810	test $cf_cv_have_utmp = utmpx &&
4811cat >>confdefs.h <<\EOF
4812#define UTMPX_FOR_UTMP 1
4813EOF
4814
4815if test $cf_cv_have_utmp != no ; then
4816echo "$as_me:4816: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
4817echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
4818if test "${cf_cv_have_utmp_ut_host+set}" = set; then
4819  echo $ECHO_N "(cached) $ECHO_C" >&6
4820else
4821
4822	cat >conftest.$ac_ext <<_ACEOF
4823#line 4823 "configure"
4824#include "confdefs.h"
4825
4826#include <sys/types.h>
4827#include <${cf_cv_have_utmp}.h>
4828int
4829main ()
4830{
4831struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
4832  ;
4833  return 0;
4834}
4835_ACEOF
4836rm -f conftest.$ac_objext
4837if { (eval echo "$as_me:4837: \"$ac_compile\"") >&5
4838  (eval $ac_compile) 2>&5
4839  ac_status=$?
4840  echo "$as_me:4840: \$? = $ac_status" >&5
4841  (exit $ac_status); } &&
4842         { ac_try='test -s conftest.$ac_objext'
4843  { (eval echo "$as_me:4843: \"$ac_try\"") >&5
4844  (eval $ac_try) 2>&5
4845  ac_status=$?
4846  echo "$as_me:4846: \$? = $ac_status" >&5
4847  (exit $ac_status); }; }; then
4848  cf_cv_have_utmp_ut_host=yes
4849else
4850  echo "$as_me: failed program was:" >&5
4851cat conftest.$ac_ext >&5
4852cf_cv_have_utmp_ut_host=no
4853fi
4854rm -f conftest.$ac_objext conftest.$ac_ext
4855
4856fi
4857
4858echo "$as_me:4858: result: $cf_cv_have_utmp_ut_host" >&5
4859echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
4860test $cf_cv_have_utmp_ut_host != no &&
4861cat >>confdefs.h <<\EOF
4862#define HAVE_UTMP_UT_HOST 1
4863EOF
4864
4865fi
4866
4867if test $cf_cv_have_utmp != no ; then
4868echo "$as_me:4868: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
4869echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
4870if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
4871  echo $ECHO_N "(cached) $ECHO_C" >&6
4872else
4873
4874	cat >conftest.$ac_ext <<_ACEOF
4875#line 4875 "configure"
4876#include "confdefs.h"
4877
4878#include <sys/types.h>
4879#include <${cf_cv_have_utmp}.h>
4880int
4881main ()
4882{
4883struct $cf_cv_have_utmp x; int y = x.ut_syslen
4884  ;
4885  return 0;
4886}
4887_ACEOF
4888rm -f conftest.$ac_objext
4889if { (eval echo "$as_me:4889: \"$ac_compile\"") >&5
4890  (eval $ac_compile) 2>&5
4891  ac_status=$?
4892  echo "$as_me:4892: \$? = $ac_status" >&5
4893  (exit $ac_status); } &&
4894         { ac_try='test -s conftest.$ac_objext'
4895  { (eval echo "$as_me:4895: \"$ac_try\"") >&5
4896  (eval $ac_try) 2>&5
4897  ac_status=$?
4898  echo "$as_me:4898: \$? = $ac_status" >&5
4899  (exit $ac_status); }; }; then
4900  cf_cv_have_utmp_ut_syslen=yes
4901else
4902  echo "$as_me: failed program was:" >&5
4903cat conftest.$ac_ext >&5
4904cf_cv_have_utmp_ut_syslen=no
4905fi
4906rm -f conftest.$ac_objext conftest.$ac_ext
4907
4908fi
4909
4910echo "$as_me:4910: result: $cf_cv_have_utmp_ut_syslen" >&5
4911echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
4912test $cf_cv_have_utmp_ut_syslen != no &&
4913cat >>confdefs.h <<\EOF
4914#define HAVE_UTMP_UT_SYSLEN 1
4915EOF
4916
4917fi
4918
4919if test $cf_cv_have_utmp != no ; then
4920echo "$as_me:4920: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
4921echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
4922if test "${cf_cv_have_utmp_ut_name+set}" = set; then
4923  echo $ECHO_N "(cached) $ECHO_C" >&6
4924else
4925
4926	cf_cv_have_utmp_ut_name=no
4927cf_utmp_includes="
4928#include <sys/types.h>
4929#include <${cf_cv_have_utmp}.h>
4930#define getutent getutxent
4931#ifdef USE_LASTLOG
4932#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
4933#endif
4934"
4935for cf_header in ut_name ut_user ; do
4936	cat >conftest.$ac_ext <<_ACEOF
4937#line 4937 "configure"
4938#include "confdefs.h"
4939$cf_utmp_includes
4940int
4941main ()
4942{
4943struct $cf_cv_have_utmp x;
4944	 char *name = x.$cf_header;
4945
4946  ;
4947  return 0;
4948}
4949_ACEOF
4950rm -f conftest.$ac_objext
4951if { (eval echo "$as_me:4951: \"$ac_compile\"") >&5
4952  (eval $ac_compile) 2>&5
4953  ac_status=$?
4954  echo "$as_me:4954: \$? = $ac_status" >&5
4955  (exit $ac_status); } &&
4956         { ac_try='test -s conftest.$ac_objext'
4957  { (eval echo "$as_me:4957: \"$ac_try\"") >&5
4958  (eval $ac_try) 2>&5
4959  ac_status=$?
4960  echo "$as_me:4960: \$? = $ac_status" >&5
4961  (exit $ac_status); }; }; then
4962  cf_cv_have_utmp_ut_name=$cf_header
4963	 break
4964else
4965  echo "$as_me: failed program was:" >&5
4966cat conftest.$ac_ext >&5
4967fi
4968rm -f conftest.$ac_objext conftest.$ac_ext
4969done
4970
4971fi
4972echo "$as_me:4972: result: $cf_cv_have_utmp_ut_name" >&5
4973echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
4974
4975case $cf_cv_have_utmp_ut_name in
4976(no)
4977	{ { echo "$as_me:4977: error: Cannot find declaration for ut.ut_name" >&5
4978echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
4979   { (exit 1); exit 1; }; }
4980	;;
4981(ut_user)
4982
4983cat >>confdefs.h <<\EOF
4984#define ut_name ut_user
4985EOF
4986
4987	;;
4988esac
4989fi
4990
4991if test $cf_cv_have_utmp != no ; then
4992echo "$as_me:4992: checking for exit-status in $cf_cv_have_utmp" >&5
4993echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
4994if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
4995  echo $ECHO_N "(cached) $ECHO_C" >&6
4996else
4997
4998for cf_result in \
4999	ut_exit.__e_exit \
5000	ut_exit.e_exit \
5001	ut_exit.ut_e_exit \
5002	ut_exit.ut_exit
5003do
5004cat >conftest.$ac_ext <<_ACEOF
5005#line 5005 "configure"
5006#include "confdefs.h"
5007
5008#include <sys/types.h>
5009#include <${cf_cv_have_utmp}.h>
5010int
5011main ()
5012{
5013struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
5014  ;
5015  return 0;
5016}
5017_ACEOF
5018rm -f conftest.$ac_objext
5019if { (eval echo "$as_me:5019: \"$ac_compile\"") >&5
5020  (eval $ac_compile) 2>&5
5021  ac_status=$?
5022  echo "$as_me:5022: \$? = $ac_status" >&5
5023  (exit $ac_status); } &&
5024         { ac_try='test -s conftest.$ac_objext'
5025  { (eval echo "$as_me:5025: \"$ac_try\"") >&5
5026  (eval $ac_try) 2>&5
5027  ac_status=$?
5028  echo "$as_me:5028: \$? = $ac_status" >&5
5029  (exit $ac_status); }; }; then
5030  cf_cv_have_utmp_ut_xstatus=$cf_result
5031	 break
5032else
5033  echo "$as_me: failed program was:" >&5
5034cat conftest.$ac_ext >&5
5035cf_cv_have_utmp_ut_xstatus=no
5036fi
5037rm -f conftest.$ac_objext conftest.$ac_ext
5038done
5039
5040fi
5041echo "$as_me:5041: result: $cf_cv_have_utmp_ut_xstatus" >&5
5042echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
5043if test $cf_cv_have_utmp_ut_xstatus != no ; then
5044
5045cat >>confdefs.h <<\EOF
5046#define HAVE_UTMP_UT_XSTATUS 1
5047EOF
5048
5049cat >>confdefs.h <<EOF
5050#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
5051EOF
5052
5053fi
5054fi
5055
5056if test $cf_cv_have_utmp != no ; then
5057echo "$as_me:5057: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
5058echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
5059if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
5060  echo $ECHO_N "(cached) $ECHO_C" >&6
5061else
5062
5063	cat >conftest.$ac_ext <<_ACEOF
5064#line 5064 "configure"
5065#include "confdefs.h"
5066
5067#include <sys/types.h>
5068#include <${cf_cv_have_utmp}.h>
5069int
5070main ()
5071{
5072struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
5073  ;
5074  return 0;
5075}
5076_ACEOF
5077rm -f conftest.$ac_objext
5078if { (eval echo "$as_me:5078: \"$ac_compile\"") >&5
5079  (eval $ac_compile) 2>&5
5080  ac_status=$?
5081  echo "$as_me:5081: \$? = $ac_status" >&5
5082  (exit $ac_status); } &&
5083         { ac_try='test -s conftest.$ac_objext'
5084  { (eval echo "$as_me:5084: \"$ac_try\"") >&5
5085  (eval $ac_try) 2>&5
5086  ac_status=$?
5087  echo "$as_me:5087: \$? = $ac_status" >&5
5088  (exit $ac_status); }; }; then
5089  cf_cv_have_utmp_ut_xtime=yes
5090else
5091  echo "$as_me: failed program was:" >&5
5092cat conftest.$ac_ext >&5
5093cat >conftest.$ac_ext <<_ACEOF
5094#line 5094 "configure"
5095#include "confdefs.h"
5096
5097#include <sys/types.h>
5098#include <${cf_cv_have_utmp}.h>
5099int
5100main ()
5101{
5102struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
5103  ;
5104  return 0;
5105}
5106_ACEOF
5107rm -f conftest.$ac_objext
5108if { (eval echo "$as_me:5108: \"$ac_compile\"") >&5
5109  (eval $ac_compile) 2>&5
5110  ac_status=$?
5111  echo "$as_me:5111: \$? = $ac_status" >&5
5112  (exit $ac_status); } &&
5113         { ac_try='test -s conftest.$ac_objext'
5114  { (eval echo "$as_me:5114: \"$ac_try\"") >&5
5115  (eval $ac_try) 2>&5
5116  ac_status=$?
5117  echo "$as_me:5117: \$? = $ac_status" >&5
5118  (exit $ac_status); }; }; then
5119  cf_cv_have_utmp_ut_xtime=define
5120else
5121  echo "$as_me: failed program was:" >&5
5122cat conftest.$ac_ext >&5
5123cf_cv_have_utmp_ut_xtime=no
5124fi
5125rm -f conftest.$ac_objext conftest.$ac_ext
5126
5127fi
5128rm -f conftest.$ac_objext conftest.$ac_ext
5129
5130fi
5131echo "$as_me:5131: result: $cf_cv_have_utmp_ut_xtime" >&5
5132echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
5133if test $cf_cv_have_utmp_ut_xtime != no ; then
5134
5135cat >>confdefs.h <<\EOF
5136#define HAVE_UTMP_UT_XTIME 1
5137EOF
5138
5139	if test $cf_cv_have_utmp_ut_xtime = define ; then
5140
5141cat >>confdefs.h <<\EOF
5142#define ut_xtime ut_tv.tv_sec
5143EOF
5144
5145	fi
5146fi
5147fi
5148
5149if test $cf_cv_have_utmp != no ; then
5150echo "$as_me:5150: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
5151echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
5152if test "${cf_cv_have_utmp_ut_session+set}" = set; then
5153  echo $ECHO_N "(cached) $ECHO_C" >&6
5154else
5155
5156	cat >conftest.$ac_ext <<_ACEOF
5157#line 5157 "configure"
5158#include "confdefs.h"
5159
5160#include <sys/types.h>
5161#include <${cf_cv_have_utmp}.h>
5162int
5163main ()
5164{
5165struct $cf_cv_have_utmp x; long y = x.ut_session
5166  ;
5167  return 0;
5168}
5169_ACEOF
5170rm -f conftest.$ac_objext
5171if { (eval echo "$as_me:5171: \"$ac_compile\"") >&5
5172  (eval $ac_compile) 2>&5
5173  ac_status=$?
5174  echo "$as_me:5174: \$? = $ac_status" >&5
5175  (exit $ac_status); } &&
5176         { ac_try='test -s conftest.$ac_objext'
5177  { (eval echo "$as_me:5177: \"$ac_try\"") >&5
5178  (eval $ac_try) 2>&5
5179  ac_status=$?
5180  echo "$as_me:5180: \$? = $ac_status" >&5
5181  (exit $ac_status); }; }; then
5182  cf_cv_have_utmp_ut_session=yes
5183else
5184  echo "$as_me: failed program was:" >&5
5185cat conftest.$ac_ext >&5
5186cf_cv_have_utmp_ut_session=no
5187fi
5188rm -f conftest.$ac_objext conftest.$ac_ext
5189
5190fi
5191echo "$as_me:5191: result: $cf_cv_have_utmp_ut_session" >&5
5192echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
5193if test $cf_cv_have_utmp_ut_session != no ; then
5194
5195cat >>confdefs.h <<\EOF
5196#define HAVE_UTMP_UT_SESSION 1
5197EOF
5198
5199fi
5200fi
5201
5202echo "$as_me:5202: checking if $cf_cv_have_utmp is SYSV flavor" >&5
5203echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
5204if test "${cf_cv_sysv_utmp+set}" = set; then
5205  echo $ECHO_N "(cached) $ECHO_C" >&6
5206else
5207
5208test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
5209cat >conftest.$ac_ext <<_ACEOF
5210#line 5210 "configure"
5211#include "confdefs.h"
5212
5213#include <sys/types.h>
5214#include <${cf_cv_have_utmp}.h>
5215int
5216main ()
5217{
5218
5219struct $cf_cv_have_utmp x;
5220	set${cf_prefix}ent ();
5221	get${cf_prefix}id(&x);
5222	put${cf_prefix}line(&x);
5223	end${cf_prefix}ent();
5224  ;
5225  return 0;
5226}
5227_ACEOF
5228rm -f conftest.$ac_objext conftest$ac_exeext
5229if { (eval echo "$as_me:5229: \"$ac_link\"") >&5
5230  (eval $ac_link) 2>&5
5231  ac_status=$?
5232  echo "$as_me:5232: \$? = $ac_status" >&5
5233  (exit $ac_status); } &&
5234         { ac_try='test -s conftest$ac_exeext'
5235  { (eval echo "$as_me:5235: \"$ac_try\"") >&5
5236  (eval $ac_try) 2>&5
5237  ac_status=$?
5238  echo "$as_me:5238: \$? = $ac_status" >&5
5239  (exit $ac_status); }; }; then
5240  cf_cv_sysv_utmp=yes
5241else
5242  echo "$as_me: failed program was:" >&5
5243cat conftest.$ac_ext >&5
5244cf_cv_sysv_utmp=no
5245fi
5246rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5247
5248fi
5249echo "$as_me:5249: result: $cf_cv_sysv_utmp" >&5
5250echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
5251test $cf_cv_sysv_utmp = yes &&
5252cat >>confdefs.h <<\EOF
5253#define USE_SYSV_UTMP 1
5254EOF
5255
5256fi
5257
5258for ac_header in lastlog.h
5259do
5260as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5261echo "$as_me:5261: checking for $ac_header" >&5
5262echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5263if eval "test \"\${$as_ac_Header+set}\" = set"; then
5264  echo $ECHO_N "(cached) $ECHO_C" >&6
5265else
5266  cat >conftest.$ac_ext <<_ACEOF
5267#line 5267 "configure"
5268#include "confdefs.h"
5269#include <$ac_header>
5270_ACEOF
5271if { (eval echo "$as_me:5271: \"$ac_cpp conftest.$ac_ext\"") >&5
5272  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5273  ac_status=$?
5274  egrep -v '^ *\+' conftest.er1 >conftest.err
5275  rm -f conftest.er1
5276  cat conftest.err >&5
5277  echo "$as_me:5277: \$? = $ac_status" >&5
5278  (exit $ac_status); } >/dev/null; then
5279  if test -s conftest.err; then
5280    ac_cpp_err=$ac_c_preproc_warn_flag
5281  else
5282    ac_cpp_err=
5283  fi
5284else
5285  ac_cpp_err=yes
5286fi
5287if test -z "$ac_cpp_err"; then
5288  eval "$as_ac_Header=yes"
5289else
5290  echo "$as_me: failed program was:" >&5
5291  cat conftest.$ac_ext >&5
5292  eval "$as_ac_Header=no"
5293fi
5294rm -f conftest.err conftest.$ac_ext
5295fi
5296echo "$as_me:5296: result: `eval echo '${'$as_ac_Header'}'`" >&5
5297echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5298if test `eval echo '${'$as_ac_Header'}'` = yes; then
5299  cat >>confdefs.h <<EOF
5300#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5301EOF
5302
5303fi
5304done
5305
5306echo "$as_me:5306: checking for struct lastlog" >&5
5307echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5308if test "${cf_cv_struct_lastlog+set}" = set; then
5309  echo $ECHO_N "(cached) $ECHO_C" >&6
5310else
5311
5312if test "$cross_compiling" = yes; then
5313
5314cf_cv_struct_lastlog=unknown
5315else
5316  cat >conftest.$ac_ext <<_ACEOF
5317#line 5317 "configure"
5318#include "confdefs.h"
5319
5320#include <sys/types.h>
5321#include <time.h>
5322#include <lastlog.h>
5323
5324int main()
5325{
5326	struct lastlog data;
5327	return (sizeof(data.ll_time) != sizeof(time_t));
5328}
5329_ACEOF
5330rm -f conftest$ac_exeext
5331if { (eval echo "$as_me:5331: \"$ac_link\"") >&5
5332  (eval $ac_link) 2>&5
5333  ac_status=$?
5334  echo "$as_me:5334: \$? = $ac_status" >&5
5335  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5336  { (eval echo "$as_me:5336: \"$ac_try\"") >&5
5337  (eval $ac_try) 2>&5
5338  ac_status=$?
5339  echo "$as_me:5339: \$? = $ac_status" >&5
5340  (exit $ac_status); }; }; then
5341
5342cf_cv_struct_lastlog=yes
5343else
5344  echo "$as_me: program exited with status $ac_status" >&5
5345echo "$as_me: failed program was:" >&5
5346cat conftest.$ac_ext >&5
5347
5348cf_cv_struct_lastlog=no
5349fi
5350rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5351fi
5352fi
5353echo "$as_me:5353: result: $cf_cv_struct_lastlog" >&5
5354echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5355
5356test $cf_cv_struct_lastlog != no &&
5357cat >>confdefs.h <<\EOF
5358#define USE_STRUCT_LASTLOG 1
5359EOF
5360
5361for ac_header in \
5362sys/param.h \
5363
5364do
5365as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5366echo "$as_me:5366: checking for $ac_header" >&5
5367echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5368if eval "test \"\${$as_ac_Header+set}\" = set"; then
5369  echo $ECHO_N "(cached) $ECHO_C" >&6
5370else
5371  cat >conftest.$ac_ext <<_ACEOF
5372#line 5372 "configure"
5373#include "confdefs.h"
5374#include <$ac_header>
5375_ACEOF
5376if { (eval echo "$as_me:5376: \"$ac_cpp conftest.$ac_ext\"") >&5
5377  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5378  ac_status=$?
5379  egrep -v '^ *\+' conftest.er1 >conftest.err
5380  rm -f conftest.er1
5381  cat conftest.err >&5
5382  echo "$as_me:5382: \$? = $ac_status" >&5
5383  (exit $ac_status); } >/dev/null; then
5384  if test -s conftest.err; then
5385    ac_cpp_err=$ac_c_preproc_warn_flag
5386  else
5387    ac_cpp_err=
5388  fi
5389else
5390  ac_cpp_err=yes
5391fi
5392if test -z "$ac_cpp_err"; then
5393  eval "$as_ac_Header=yes"
5394else
5395  echo "$as_me: failed program was:" >&5
5396  cat conftest.$ac_ext >&5
5397  eval "$as_ac_Header=no"
5398fi
5399rm -f conftest.err conftest.$ac_ext
5400fi
5401echo "$as_me:5401: result: `eval echo '${'$as_ac_Header'}'`" >&5
5402echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5403if test `eval echo '${'$as_ac_Header'}'` = yes; then
5404  cat >>confdefs.h <<EOF
5405#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5406EOF
5407
5408fi
5409done
5410
5411echo "$as_me:5411: checking if POSIX saved-ids are supported" >&5
5412echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5413if test "${cf_cv_posix_saved_ids+set}" = set; then
5414  echo $ECHO_N "(cached) $ECHO_C" >&6
5415else
5416
5417cat >conftest.$ac_ext <<_ACEOF
5418#line 5418 "configure"
5419#include "confdefs.h"
5420
5421#include <unistd.h>
5422#ifdef HAVE_SYS_PARAM_H
5423#include <sys/param.h>		/* this may define "BSD" */
5424#endif
5425
5426int
5427main ()
5428{
5429
5430#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5431	void *p = (void *) seteuid;
5432	int x = seteuid(geteuid());
5433#elif defined(BSD) && (BSD >= 199103)
5434/* The BSD's may implement the runtime check - and it fails.
5435 * However, saved-ids work almost like POSIX (close enough for most uses).
5436 */
5437#else
5438make an error
5439#endif
5440
5441  ;
5442  return 0;
5443}
5444_ACEOF
5445rm -f conftest.$ac_objext conftest$ac_exeext
5446if { (eval echo "$as_me:5446: \"$ac_link\"") >&5
5447  (eval $ac_link) 2>&5
5448  ac_status=$?
5449  echo "$as_me:5449: \$? = $ac_status" >&5
5450  (exit $ac_status); } &&
5451         { ac_try='test -s conftest$ac_exeext'
5452  { (eval echo "$as_me:5452: \"$ac_try\"") >&5
5453  (eval $ac_try) 2>&5
5454  ac_status=$?
5455  echo "$as_me:5455: \$? = $ac_status" >&5
5456  (exit $ac_status); }; }; then
5457  cf_cv_posix_saved_ids=yes
5458
5459else
5460  echo "$as_me: failed program was:" >&5
5461cat conftest.$ac_ext >&5
5462
5463if test "$cross_compiling" = yes; then
5464  cf_cv_posix_saved_ids=unknown
5465else
5466  cat >conftest.$ac_ext <<_ACEOF
5467#line 5467 "configure"
5468#include "confdefs.h"
5469
5470#ifdef HAVE_STDLIB_H
5471#include <stdlib.h>
5472#endif
5473#include <unistd.h>
5474int main()
5475{
5476	void *p = (void *) seteuid;
5477	long code = sysconf(_SC_SAVED_IDS);
5478	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5479}
5480_ACEOF
5481rm -f conftest$ac_exeext
5482if { (eval echo "$as_me:5482: \"$ac_link\"") >&5
5483  (eval $ac_link) 2>&5
5484  ac_status=$?
5485  echo "$as_me:5485: \$? = $ac_status" >&5
5486  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5487  { (eval echo "$as_me:5487: \"$ac_try\"") >&5
5488  (eval $ac_try) 2>&5
5489  ac_status=$?
5490  echo "$as_me:5490: \$? = $ac_status" >&5
5491  (exit $ac_status); }; }; then
5492  cf_cv_posix_saved_ids=yes
5493else
5494  echo "$as_me: program exited with status $ac_status" >&5
5495echo "$as_me: failed program was:" >&5
5496cat conftest.$ac_ext >&5
5497cf_cv_posix_saved_ids=no
5498fi
5499rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5500fi
5501
5502fi
5503rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5504
5505fi
5506echo "$as_me:5506: result: $cf_cv_posix_saved_ids" >&5
5507echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5508
5509test "$cf_cv_posix_saved_ids" = yes &&
5510cat >>confdefs.h <<\EOF
5511#define HAVE_POSIX_SAVED_IDS 1
5512EOF
5513
5514# compute a reasonable value for $TERM to give tgetent(), since we may be
5515# running in 'screen', which sets $TERMCAP to a specific entry that is not
5516# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5517# discard $TERMCAP.
5518cf_TERMVAR=vt100
5519if test -n "$TERMCAP"
5520then
5521	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
5522	case "$cf_TERMCAP" in
5523	(screen*.*)
5524		;;
5525	(*)
5526		cf_TERMVAR="$cf_TERMCAP"
5527		;;
5528	esac
5529fi
5530test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5531
5532echo "$as_me:5532: checking if we want full tgetent function" >&5
5533echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5534
5535# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5536if test "${enable_full_tgetent+set}" = set; then
5537  enableval="$enable_full_tgetent"
5538  test "$enableval" != no && enableval=yes
5539  if test "$enableval" != "yes" ; then
5540    cf_full_tgetent=no
5541  else
5542    cf_full_tgetent=yes
5543  fi
5544else
5545  enableval=yes
5546  cf_full_tgetent=yes
5547
5548fi;
5549echo "$as_me:5549: result: $cf_full_tgetent" >&5
5550echo "${ECHO_T}$cf_full_tgetent" >&6
5551
5552if test "$cf_full_tgetent" = yes ; then
5553	cf_test_message="full tgetent"
5554else
5555	cf_test_message="tgetent"
5556fi
5557
5558echo "$as_me:5558: checking for $cf_test_message function" >&5
5559echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5560if test "${cf_cv_lib_tgetent+set}" = set; then
5561  echo $ECHO_N "(cached) $ECHO_C" >&6
5562else
5563
5564cf_save_LIBS="$LIBS"
5565cf_cv_lib_tgetent=no
5566if test "$cf_full_tgetent" = yes ; then
5567	cf_TERMLIB="otermcap termcap termlib ncurses curses"
5568	cf_TERMTST="buffer[0] == 0"
5569else
5570	cf_TERMLIB="termlib ncurses curses"
5571	cf_TERMTST="0"
5572fi
5573for cf_termlib in '' $cf_TERMLIB ; do
5574	LIBS="$cf_save_LIBS"
5575	test -n "$cf_termlib" &&
5576cf_add_libs="-l$cf_termlib"
5577# Filter out duplicates - this happens with badly-designed ".pc" files...
5578for cf_add_1lib in $LIBS
5579do
5580	for cf_add_2lib in $cf_add_libs
5581	do
5582		if test "x$cf_add_1lib" = "x$cf_add_2lib"
5583		then
5584			cf_add_1lib=
5585			break
5586		fi
5587	done
5588	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5589done
5590LIBS="$cf_add_libs"
5591
5592	if test "$cross_compiling" = yes; then
5593  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5594else
5595  cat >conftest.$ac_ext <<_ACEOF
5596#line 5596 "configure"
5597#include "confdefs.h"
5598
5599/* terminfo implementations ignore the buffer argument, making it useless for
5600 * the xterm application, which uses this information to make a new TERMCAP
5601 * environment variable.
5602 */
5603int main()
5604{
5605	char buffer[1024];
5606	buffer[0] = 0;
5607	tgetent(buffer, "$cf_TERMVAR");
5608	${cf_cv_main_return:-return} ($cf_TERMTST); }
5609_ACEOF
5610rm -f conftest$ac_exeext
5611if { (eval echo "$as_me:5611: \"$ac_link\"") >&5
5612  (eval $ac_link) 2>&5
5613  ac_status=$?
5614  echo "$as_me:5614: \$? = $ac_status" >&5
5615  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5616  { (eval echo "$as_me:5616: \"$ac_try\"") >&5
5617  (eval $ac_try) 2>&5
5618  ac_status=$?
5619  echo "$as_me:5619: \$? = $ac_status" >&5
5620  (exit $ac_status); }; }; then
5621  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5622	 if test -n "$cf_termlib" ; then
5623	 	cf_cv_lib_tgetent="-l$cf_termlib"
5624	 else
5625	 	cf_cv_lib_tgetent=yes
5626	 fi
5627	 break
5628else
5629  echo "$as_me: program exited with status $ac_status" >&5
5630echo "$as_me: failed program was:" >&5
5631cat conftest.$ac_ext >&5
5632echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5633fi
5634rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5635fi
5636done
5637LIBS="$cf_save_LIBS"
5638
5639fi
5640echo "$as_me:5640: result: $cf_cv_lib_tgetent" >&5
5641echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5642
5643# If we found a working tgetent(), set LIBS and check for termcap.h.
5644# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5645# not have side effects other than setting the cache variable, because
5646# they are not executed when a cached value exists.)
5647if test "x$cf_cv_lib_tgetent" != xno ; then
5648	test "x$cf_cv_lib_tgetent" != xyes &&
5649cf_add_libs="$cf_cv_lib_tgetent"
5650# Filter out duplicates - this happens with badly-designed ".pc" files...
5651for cf_add_1lib in $LIBS
5652do
5653	for cf_add_2lib in $cf_add_libs
5654	do
5655		if test "x$cf_add_1lib" = "x$cf_add_2lib"
5656		then
5657			cf_add_1lib=
5658			break
5659		fi
5660	done
5661	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5662done
5663LIBS="$cf_add_libs"
5664
5665cat >>confdefs.h <<\EOF
5666#define USE_TERMCAP 1
5667EOF
5668
5669	if test "$cf_full_tgetent" = no ; then
5670		cat >conftest.$ac_ext <<_ACEOF
5671#line 5671 "configure"
5672#include "confdefs.h"
5673
5674#include <termcap.h>
5675int
5676main ()
5677{
5678
5679#ifdef NCURSES_VERSION
5680make an error
5681#endif
5682  ;
5683  return 0;
5684}
5685_ACEOF
5686rm -f conftest.$ac_objext
5687if { (eval echo "$as_me:5687: \"$ac_compile\"") >&5
5688  (eval $ac_compile) 2>&5
5689  ac_status=$?
5690  echo "$as_me:5690: \$? = $ac_status" >&5
5691  (exit $ac_status); } &&
5692         { ac_try='test -s conftest.$ac_objext'
5693  { (eval echo "$as_me:5693: \"$ac_try\"") >&5
5694  (eval $ac_try) 2>&5
5695  ac_status=$?
5696  echo "$as_me:5696: \$? = $ac_status" >&5
5697  (exit $ac_status); }; }; then
5698  cat >>confdefs.h <<\EOF
5699#define HAVE_TERMCAP_H 1
5700EOF
5701
5702else
5703  echo "$as_me: failed program was:" >&5
5704cat conftest.$ac_ext >&5
5705fi
5706rm -f conftest.$ac_objext conftest.$ac_ext
5707	else
5708
5709for ac_header in termcap.h
5710do
5711as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5712echo "$as_me:5712: checking for $ac_header" >&5
5713echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5714if eval "test \"\${$as_ac_Header+set}\" = set"; then
5715  echo $ECHO_N "(cached) $ECHO_C" >&6
5716else
5717  cat >conftest.$ac_ext <<_ACEOF
5718#line 5718 "configure"
5719#include "confdefs.h"
5720#include <$ac_header>
5721_ACEOF
5722if { (eval echo "$as_me:5722: \"$ac_cpp conftest.$ac_ext\"") >&5
5723  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5724  ac_status=$?
5725  egrep -v '^ *\+' conftest.er1 >conftest.err
5726  rm -f conftest.er1
5727  cat conftest.err >&5
5728  echo "$as_me:5728: \$? = $ac_status" >&5
5729  (exit $ac_status); } >/dev/null; then
5730  if test -s conftest.err; then
5731    ac_cpp_err=$ac_c_preproc_warn_flag
5732  else
5733    ac_cpp_err=
5734  fi
5735else
5736  ac_cpp_err=yes
5737fi
5738if test -z "$ac_cpp_err"; then
5739  eval "$as_ac_Header=yes"
5740else
5741  echo "$as_me: failed program was:" >&5
5742  cat conftest.$ac_ext >&5
5743  eval "$as_ac_Header=no"
5744fi
5745rm -f conftest.err conftest.$ac_ext
5746fi
5747echo "$as_me:5747: result: `eval echo '${'$as_ac_Header'}'`" >&5
5748echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5749if test `eval echo '${'$as_ac_Header'}'` = yes; then
5750  cat >>confdefs.h <<EOF
5751#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5752EOF
5753
5754fi
5755done
5756
5757	fi
5758else
5759        # If we didn't find a tgetent() that supports the buffer
5760        # argument, look again to see whether we can find even
5761        # a crippled one.  A crippled tgetent() is still useful to
5762        # validate values for the TERM environment variable given to
5763        # child processes.
5764	echo "$as_me:5764: checking for partial tgetent function" >&5
5765echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5766if test "${cf_cv_lib_part_tgetent+set}" = set; then
5767  echo $ECHO_N "(cached) $ECHO_C" >&6
5768else
5769
5770	cf_cv_lib_part_tgetent=no
5771	for cf_termlib in $cf_TERMLIB ; do
5772		LIBS="$cf_save_LIBS -l$cf_termlib"
5773		cat >conftest.$ac_ext <<_ACEOF
5774#line 5774 "configure"
5775#include "confdefs.h"
5776
5777int
5778main ()
5779{
5780tgetent(0, "$cf_TERMVAR")
5781  ;
5782  return 0;
5783}
5784_ACEOF
5785rm -f conftest.$ac_objext conftest$ac_exeext
5786if { (eval echo "$as_me:5786: \"$ac_link\"") >&5
5787  (eval $ac_link) 2>&5
5788  ac_status=$?
5789  echo "$as_me:5789: \$? = $ac_status" >&5
5790  (exit $ac_status); } &&
5791         { ac_try='test -s conftest$ac_exeext'
5792  { (eval echo "$as_me:5792: \"$ac_try\"") >&5
5793  (eval $ac_try) 2>&5
5794  ac_status=$?
5795  echo "$as_me:5795: \$? = $ac_status" >&5
5796  (exit $ac_status); }; }; then
5797  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5798			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5799			 break
5800else
5801  echo "$as_me: failed program was:" >&5
5802cat conftest.$ac_ext >&5
5803fi
5804rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5805	done
5806	LIBS="$cf_save_LIBS"
5807
5808fi
5809echo "$as_me:5809: result: $cf_cv_lib_part_tgetent" >&5
5810echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
5811
5812	if test "$cf_cv_lib_part_tgetent" != no ; then
5813
5814cf_add_libs="$cf_cv_lib_part_tgetent"
5815# Filter out duplicates - this happens with badly-designed ".pc" files...
5816for cf_add_1lib in $LIBS
5817do
5818	for cf_add_2lib in $cf_add_libs
5819	do
5820		if test "x$cf_add_1lib" = "x$cf_add_2lib"
5821		then
5822			cf_add_1lib=
5823			break
5824		fi
5825	done
5826	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5827done
5828LIBS="$cf_add_libs"
5829
5830for ac_header in termcap.h
5831do
5832as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5833echo "$as_me:5833: checking for $ac_header" >&5
5834echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5835if eval "test \"\${$as_ac_Header+set}\" = set"; then
5836  echo $ECHO_N "(cached) $ECHO_C" >&6
5837else
5838  cat >conftest.$ac_ext <<_ACEOF
5839#line 5839 "configure"
5840#include "confdefs.h"
5841#include <$ac_header>
5842_ACEOF
5843if { (eval echo "$as_me:5843: \"$ac_cpp conftest.$ac_ext\"") >&5
5844  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5845  ac_status=$?
5846  egrep -v '^ *\+' conftest.er1 >conftest.err
5847  rm -f conftest.er1
5848  cat conftest.err >&5
5849  echo "$as_me:5849: \$? = $ac_status" >&5
5850  (exit $ac_status); } >/dev/null; then
5851  if test -s conftest.err; then
5852    ac_cpp_err=$ac_c_preproc_warn_flag
5853  else
5854    ac_cpp_err=
5855  fi
5856else
5857  ac_cpp_err=yes
5858fi
5859if test -z "$ac_cpp_err"; then
5860  eval "$as_ac_Header=yes"
5861else
5862  echo "$as_me: failed program was:" >&5
5863  cat conftest.$ac_ext >&5
5864  eval "$as_ac_Header=no"
5865fi
5866rm -f conftest.err conftest.$ac_ext
5867fi
5868echo "$as_me:5868: result: `eval echo '${'$as_ac_Header'}'`" >&5
5869echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5870if test `eval echo '${'$as_ac_Header'}'` = yes; then
5871  cat >>confdefs.h <<EOF
5872#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5873EOF
5874
5875fi
5876done
5877
5878                # If this is linking against ncurses, we'll trigger the
5879                # ifdef in resize.c that turns the termcap stuff back off.
5880
5881cat >>confdefs.h <<\EOF
5882#define USE_TERMINFO 1
5883EOF
5884
5885	fi
5886fi
5887
5888echo "$as_me:5888: checking for X applications class" >&5
5889echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
5890
5891# Check whether --with-app-class or --without-app-class was given.
5892if test "${with_app_class+set}" = set; then
5893  withval="$with_app_class"
5894  APP_CLASS=$withval
5895else
5896  APP_CLASS=XTerm
5897fi;
5898
5899case x$APP_CLASS in
5900(*[/@,%]*)
5901	{ echo "$as_me:5901: WARNING: X applications class cannot contain punctuation" >&5
5902echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
5903	APP_CLASS=XTerm
5904	;;
5905(x[A-Z]*)
5906	;;
5907(*)
5908	{ echo "$as_me:5908: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
5909echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
5910	APP_CLASS=XTerm
5911	;;
5912esac
5913
5914echo "$as_me:5914: result: $APP_CLASS" >&5
5915echo "${ECHO_T}$APP_CLASS" >&6
5916
5917echo "$as_me:5917: checking for directory to install resource files" >&5
5918echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
5919
5920# Check whether --with-app-defaults or --without-app-defaults was given.
5921if test "${with_app_defaults+set}" = set; then
5922  withval="$with_app_defaults"
5923  APPSDIR=$withval
5924else
5925  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
5926fi;
5927
5928if test "x$APPSDIR" = xauto
5929then
5930	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
5931	for cf_path in \
5932		/opt/local/share/X11/app-defaults \
5933		/opt/X11/share/X11/app-defaults \
5934		/usr/share/X11/app-defaults \
5935		/usr/X11/share/X11/app-defaults \
5936		/usr/X11/lib/X11/app-defaults \
5937		/usr/lib/X11/app-defaults \
5938		/etc/X11/app-defaults \
5939		/usr/pkg/lib/X11/app-defaults \
5940		/usr/X11R7/lib/X11/app-defaults \
5941		/usr/X11R6/lib/X11/app-defaults \
5942		/usr/X11R5/lib/X11/app-defaults \
5943		/usr/X11R4/lib/X11/app-defaults \
5944		/usr/local/lib/X11/app-defaults \
5945		/usr/local/share/X11/app-defaults \
5946		/usr/lib64/X11/app-defaults
5947	do
5948		if test -d "$cf_path" ; then
5949			APPSDIR="$cf_path"
5950			break
5951		fi
5952	done
5953else
5954	cf_path=$APPSDIR
5955
5956if test "x$prefix" != xNONE; then
5957  cf_path_syntax="$prefix"
5958else
5959  cf_path_syntax="$ac_default_prefix"
5960fi
5961
5962case ".$cf_path" in
5963(.\$\(*\)*|.\'*\'*)
5964  ;;
5965(..|./*|.\\*)
5966  ;;
5967(.[a-zA-Z]:[\\/]*) # OS/2 EMX
5968  ;;
5969(.\${*prefix}*|.\${*dir}*)
5970  eval cf_path="$cf_path"
5971  case ".$cf_path" in
5972  (.NONE/*)
5973    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
5974    ;;
5975  esac
5976  ;;
5977(.no|.NONE/*)
5978  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
5979  ;;
5980(*)
5981  { { echo "$as_me:5981: error: expected a pathname, not \"$cf_path\"" >&5
5982echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
5983   { (exit 1); exit 1; }; }
5984  ;;
5985esac
5986
5987fi
5988
5989echo "$as_me:5989: result: $APPSDIR" >&5
5990echo "${ECHO_T}$APPSDIR" >&6
5991
5992no_appsdir=
5993if test "$APPSDIR" = no
5994then
5995	no_appsdir="#"
5996else
5997	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
5998fi
5999
6000echo "$as_me:6000: checking for the icon name" >&5
6001echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
6002
6003# Check whether --with-icon-name or --without-icon-name was given.
6004if test "${with_icon_name+set}" = set; then
6005  withval="$with_icon_name"
6006  ICON_NAME="$withval"
6007else
6008  ICON_NAME=xterm-color
6009fi;
6010case "x$ICON_NAME" in
6011(xyes|xno|x)
6012	ICON_NAME=xterm-color
6013	;;
6014esac
6015
6016echo "$as_me:6016: result: $ICON_NAME" >&5
6017echo "${ECHO_T}$ICON_NAME" >&6
6018
6019echo "$as_me:6019: checking for icon symlink to use" >&5
6020echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
6021
6022# Check whether --with-icon-symlink or --without-icon-symlink was given.
6023if test "${with_icon_symlink+set}" = set; then
6024  withval="$with_icon_symlink"
6025  ICON_SYMLINK="$withval"
6026else
6027  ICON_SYMLINK=NONE
6028fi;
6029case "x$ICON_SYMLINK" in
6030(xyes)
6031	ICON_SYMLINK=xterm
6032	;;
6033(xno|x)
6034	ICON_SYMLINK=NONE
6035	;;
6036esac
6037
6038echo "$as_me:6038: result: $ICON_SYMLINK" >&5
6039echo "${ECHO_T}$ICON_SYMLINK" >&6
6040
6041echo "$as_me:6041: checking for directory to install pixmaps" >&5
6042echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
6043
6044# Check whether --with-pixmapdir or --without-pixmapdir was given.
6045if test "${with_pixmapdir+set}" = set; then
6046  withval="$with_pixmapdir"
6047  PIXMAPDIR=$withval
6048else
6049  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
6050fi;
6051
6052if test "x$PIXMAPDIR" = xauto
6053then
6054	PIXMAPDIR='${datadir}/pixmaps'
6055	for cf_path in \
6056		/usr/share/pixmaps \
6057		/usr/X11R6/share/pixmaps
6058	do
6059		if test -d "$cf_path" ; then
6060			PIXMAPDIR="$cf_path"
6061			break
6062		fi
6063	done
6064else
6065	cf_path=$PIXMAPDIR
6066
6067if test "x$prefix" != xNONE; then
6068  cf_path_syntax="$prefix"
6069else
6070  cf_path_syntax="$ac_default_prefix"
6071fi
6072
6073case ".$cf_path" in
6074(.\$\(*\)*|.\'*\'*)
6075  ;;
6076(..|./*|.\\*)
6077  ;;
6078(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6079  ;;
6080(.\${*prefix}*|.\${*dir}*)
6081  eval cf_path="$cf_path"
6082  case ".$cf_path" in
6083  (.NONE/*)
6084    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6085    ;;
6086  esac
6087  ;;
6088(.no|.NONE/*)
6089  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6090  ;;
6091(*)
6092  { { echo "$as_me:6092: error: expected a pathname, not \"$cf_path\"" >&5
6093echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6094   { (exit 1); exit 1; }; }
6095  ;;
6096esac
6097
6098fi
6099echo "$as_me:6099: result: $PIXMAPDIR" >&5
6100echo "${ECHO_T}$PIXMAPDIR" >&6
6101
6102no_pixmapdir=
6103if test "$PIXMAPDIR" = no
6104then
6105	no_pixmapdir="#"
6106else
6107	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
6108fi
6109
6110echo "$as_me:6110: checking for directory to install icons" >&5
6111echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
6112
6113# Check whether --with-icondir or --without-icondir was given.
6114if test "${with_icondir+set}" = set; then
6115  withval="$with_icondir"
6116  ICONDIR=$withval
6117else
6118  test -z "$ICONDIR" && ICONDIR=no
6119fi;
6120
6121if test "x$ICONDIR" = xauto
6122then
6123	ICONDIR='${datadir}/icons'
6124	for cf_path in \
6125		/usr/share/icons \
6126		/usr/X11R6/share/icons
6127	do
6128		if test -d "$cf_path" ; then
6129			ICONDIR="$cf_path"
6130			break
6131		fi
6132	done
6133else
6134	cf_path=$ICONDIR
6135
6136if test "x$prefix" != xNONE; then
6137  cf_path_syntax="$prefix"
6138else
6139  cf_path_syntax="$ac_default_prefix"
6140fi
6141
6142case ".$cf_path" in
6143(.\$\(*\)*|.\'*\'*)
6144  ;;
6145(..|./*|.\\*)
6146  ;;
6147(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6148  ;;
6149(.\${*prefix}*|.\${*dir}*)
6150  eval cf_path="$cf_path"
6151  case ".$cf_path" in
6152  (.NONE/*)
6153    cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6154    ;;
6155  esac
6156  ;;
6157(.no|.NONE/*)
6158  cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6159  ;;
6160(*)
6161  { { echo "$as_me:6161: error: expected a pathname, not \"$cf_path\"" >&5
6162echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6163   { (exit 1); exit 1; }; }
6164  ;;
6165esac
6166
6167fi
6168echo "$as_me:6168: result: $ICONDIR" >&5
6169echo "${ECHO_T}$ICONDIR" >&6
6170
6171no_icondir=
6172if test "$ICONDIR" = no
6173then
6174	no_icondir="#"
6175else
6176	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
6177fi
6178
6179echo "$as_me:6179: checking if icon theme should be used" >&5
6180echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
6181
6182# Check whether --with-icon-theme or --without-icon-theme was given.
6183if test "${with_icon_theme+set}" = set; then
6184  withval="$with_icon_theme"
6185  ICON_THEME=$withval
6186else
6187  ICON_THEME=no
6188fi;
6189
6190case "x$ICON_THEME" in
6191(xno)
6192	;;
6193(x|xyes)
6194	ICON_THEME=hicolor
6195	;;
6196esac
6197echo "$as_me:6197: result: $ICON_THEME" >&5
6198echo "${ECHO_T}$ICON_THEME" >&6
6199
6200if test "x$ICON_THEME" = xno
6201then
6202	if test "x$ICONDIR" != xno
6203	then
6204		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
6205
6206echo "${as_me:-configure}:6206: testing ignoring icondir without theme ..." 1>&5
6207
6208		no_icondir="#"
6209	fi
6210else
6211	if test "x$ICONDIR" = xno
6212	then
6213		{ { echo "$as_me:6213: error: icondir must be set for icon theme" >&5
6214echo "$as_me: error: icondir must be set for icon theme" >&2;}
6215   { (exit 1); exit 1; }; }
6216	fi
6217fi
6218
6219: ${ICON_FORMAT:=".svg .png .xpm"}
6220
6221# ICON_NAME=
6222ICON_LIST=
6223
6224if test "x$ICON_THEME" != xno
6225then
6226	cf_icon_list="icons/$ICON_NAME icons/${ICON_NAME}_48x48"
6227else
6228	cf_icon_list="icons/${ICON_NAME}_48x48"
6229fi
6230
6231echo "$as_me:6231: checking for icon(s) to install" >&5
6232echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
6233for cf_name in $cf_icon_list
6234do
6235	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
6236
6237echo "${as_me:-configure}:6237: testing using $ICON_FORMAT ..." 1>&5
6238
6239	for cf_suffix in $ICON_FORMAT
6240	do
6241		cf_icon="${cf_name}${cf_suffix}"
6242		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6243		if test ! -f "${cf_left}"
6244		then
6245			if test "x$srcdir" != "x."
6246			then
6247				cf_icon="${srcdir}/${cf_left}"
6248				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6249				if test ! -f "${cf_left}"
6250				then
6251					continue
6252				fi
6253			else
6254				continue
6255			fi
6256		fi
6257		if test "x$ICON_THEME" != xno
6258		then
6259			cf_base=`basename $cf_left`
6260			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
6261			case "x${cf_base}" in
6262			(*:*)
6263				cf_next=$cf_base
6264				# user-defined mapping
6265				;;
6266			(*.png)
6267				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'`
6268				if test -z "$cf_size"
6269				then
6270					{ echo "$as_me:6270: WARNING: cannot determine size of $cf_left" >&5
6271echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
6272					continue
6273				fi
6274				cf_next="$cf_size/apps/$cf_trim"
6275				;;
6276			(*.svg)
6277				cf_next="scalable/apps/$cf_trim"
6278				;;
6279			(*.xpm)
6280				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
6281
6282echo "${as_me:-configure}:6282: testing ignored XPM file in icon theme ..." 1>&5
6283
6284				continue
6285				;;
6286			(*_[0-9][0-9]*x[0-9][0-9]*.*)
6287				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
6288				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
6289				cf_next="$cf_size/apps/$cf_base"
6290				;;
6291			esac
6292			test -n "$verbose" && echo "	adding $cf_next" 1>&6
6293
6294echo "${as_me:-configure}:6294: testing adding $cf_next ..." 1>&5
6295
6296			cf_icon="${cf_icon}:${cf_next}"
6297		fi
6298		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
6299		ICON_LIST="$ICON_LIST${cf_icon}"
6300		if test -z "$ICON_NAME"
6301		then
6302			ICON_NAME=`basename $cf_icon | sed -e 's/[.:].*//'`
6303		fi
6304	done
6305done
6306
6307if test -n "$verbose"
6308then
6309	echo "$as_me:6309: checking result" >&5
6310echo $ECHO_N "checking result... $ECHO_C" >&6
6311fi
6312echo "$as_me:6312: result: $ICON_LIST" >&5
6313echo "${ECHO_T}$ICON_LIST" >&6
6314
6315if test -z "$ICON_LIST"
6316then
6317	{ { echo "$as_me:6317: error: no icons found" >&5
6318echo "$as_me: error: no icons found" >&2;}
6319   { (exit 1); exit 1; }; }
6320fi
6321
6322echo "$as_me:6322: checking for icon name" >&5
6323echo $ECHO_N "checking for icon name... $ECHO_C" >&6
6324echo "$as_me:6324: result: $ICON_NAME" >&5
6325echo "${ECHO_T}$ICON_NAME" >&6
6326
6327# Comment-out the install-desktop rule if the desktop-utils are not found.
6328echo "$as_me:6328: checking if you want to install desktop files" >&5
6329echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
6330
6331# Check whether --enable-desktop or --disable-desktop was given.
6332if test "${enable_desktop+set}" = set; then
6333  enableval="$enable_desktop"
6334  test "$enableval" != no && enableval=yes
6335  if test "$enableval" != "yes" ; then
6336    enable_desktop=$enableval
6337  else
6338    enable_desktop=$enableval
6339  fi
6340else
6341  enableval=yes
6342  enable_desktop=$enableval
6343
6344fi;
6345echo "$as_me:6345: result: $enable_desktop" >&5
6346echo "${ECHO_T}$enable_desktop" >&6
6347
6348desktop_utils=
6349if test "$enable_desktop" = yes ; then
6350# Extract the first word of "desktop-file-install", so it can be a program name with args.
6351set dummy desktop-file-install; ac_word=$2
6352echo "$as_me:6352: checking for $ac_word" >&5
6353echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6354if test "${ac_cv_prog_desktop_utils+set}" = set; then
6355  echo $ECHO_N "(cached) $ECHO_C" >&6
6356else
6357  if test -n "$desktop_utils"; then
6358  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
6359else
6360  ac_save_IFS=$IFS; IFS=$ac_path_separator
6361ac_dummy="$PATH"
6362for ac_dir in $ac_dummy; do
6363  IFS=$ac_save_IFS
6364  test -z "$ac_dir" && ac_dir=.
6365  $as_executable_p "$ac_dir/$ac_word" || continue
6366ac_cv_prog_desktop_utils="yes"
6367echo "$as_me:6367: found $ac_dir/$ac_word" >&5
6368break
6369done
6370
6371  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
6372fi
6373fi
6374desktop_utils=$ac_cv_prog_desktop_utils
6375if test -n "$desktop_utils"; then
6376  echo "$as_me:6376: result: $desktop_utils" >&5
6377echo "${ECHO_T}$desktop_utils" >&6
6378else
6379  echo "$as_me:6379: result: no" >&5
6380echo "${ECHO_T}no" >&6
6381fi
6382
6383fi
6384
6385test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
6386
6387if test -z "$desktop_utils"
6388then
6389	echo "$as_me:6389: checking for requested desktop-category" >&5
6390echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
6391
6392# Check whether --with-desktop-category or --without-desktop-category was given.
6393if test "${with_desktop_category+set}" = set; then
6394  withval="$with_desktop_category"
6395  cf_desktop_want=$withval
6396else
6397  cf_desktop_want=auto
6398fi;
6399	echo "$as_me:6399: result: $cf_desktop_want" >&5
6400echo "${ECHO_T}$cf_desktop_want" >&6
6401
6402	if test "$cf_desktop_want" = auto
6403	then
6404		rm -rf conftest*
6405		cf_desktop_also=
6406		for cf_desktop_dir in  \
6407			/usr/share/app-install \
6408			/usr/share/applications
6409		do
6410			if test -d $cf_desktop_dir
6411			then
6412				find $cf_desktop_dir -name '*.desktop' | \
6413				while true
6414				do
6415					read cf_desktop_path
6416					test -z "$cf_desktop_path" && break
6417					cf_desktop_name=`basename $cf_desktop_path .desktop`
6418					case $cf_desktop_name in
6419					(xterm|*-xterm|*rxvt*|konsole|*-terminal)
6420						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
6421
6422echo "${as_me:-configure}:6422: testing inspect $cf_desktop_path ..." 1>&5
6423
6424						egrep '^Categories=' $cf_desktop_path | \
6425							tr ';' '\n' | \
6426							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
6427						;;
6428					esac
6429				done
6430			fi
6431		done
6432		if test -s conftest.1
6433		then
6434			cf_desktop_last=
6435			sort conftest.1 | \
6436			while true
6437			do
6438				read cf_desktop_this
6439				test -z "$cf_desktop_this" && break
6440				case $cf_desktop_this in
6441				(Qt*|GTK*|KDE*|GNOME*|*XFCE*|*Xfce*)
6442					;;
6443				(System|TerminalEmulator|Utility|*)
6444					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo $cf_desktop_this >>conftest.2
6445					;;
6446				esac
6447				cf_desktop_last=$cf_desktop_this
6448			done
6449			cf_desktop_want=`cat conftest.2 | tr '\n' ';'`
6450		fi
6451		if test -n "$cf_desktop_want"
6452		then
6453			if test "$cf_desktop_want" = auto
6454			then
6455				cf_desktop_want=
6456			else
6457				# do a sanity check on the semicolon-separated list, ignore on failure
6458				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
6459				test -z "$cf_desktop_test" && cf_desktop_want=
6460				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
6461				test -z "$cf_desktop_test" && cf_desktop_want=
6462			fi
6463		fi
6464		if test -z "$cf_desktop_want"
6465		then
6466			cf_desktop_want="`echo "System|TerminalEmulator|Utility|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
6467			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
6468
6469echo "${as_me:-configure}:6469: testing no usable value found for desktop category ..." 1>&5
6470
6471		fi
6472	fi
6473	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
6474	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
6475
6476echo "${as_me:-configure}:6476: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
6477
6478fi
6479
6480echo "$as_me:6480: checking for install-permissions reference" >&5
6481echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
6482
6483# Check whether --with-reference or --without-reference was given.
6484if test "${with_reference+set}" = set; then
6485  withval="$with_reference"
6486  with_reference=$withval
6487else
6488  with_reference=xterm
6489fi;
6490echo "$as_me:6490: result: $with_reference" >&5
6491echo "${ECHO_T}$with_reference" >&6
6492
6493with_full_paths=yes
6494
6495	echo "$as_me:6495: checking for PATH separator" >&5
6496echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6497	case $cf_cv_system_name in
6498	(os2*)	PATH_SEPARATOR=';'  ;;
6499	(*)	${PATH_SEPARATOR:=':'}  ;;
6500	esac
6501
6502	echo "$as_me:6502: result: $PATH_SEPARATOR" >&5
6503echo "${ECHO_T}$PATH_SEPARATOR" >&6
6504
6505test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
6506for ac_prog in $XTERM_PATH $with_reference
6507do
6508  # Extract the first word of "$ac_prog", so it can be a program name with args.
6509set dummy $ac_prog; ac_word=$2
6510echo "$as_me:6510: checking for $ac_word" >&5
6511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6512if test "${ac_cv_path_XTERM_PATH+set}" = set; then
6513  echo $ECHO_N "(cached) $ECHO_C" >&6
6514else
6515  case $XTERM_PATH in
6516  [\\/]* | ?:[\\/]*)
6517  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
6518  ;;
6519  *)
6520  ac_save_IFS=$IFS; IFS=$ac_path_separator
6521ac_dummy="$PATH"
6522for ac_dir in $ac_dummy; do
6523  IFS=$ac_save_IFS
6524  test -z "$ac_dir" && ac_dir=.
6525  if $as_executable_p "$ac_dir/$ac_word"; then
6526   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
6527   echo "$as_me:6527: found $ac_dir/$ac_word" >&5
6528   break
6529fi
6530done
6531
6532  ;;
6533esac
6534fi
6535XTERM_PATH=$ac_cv_path_XTERM_PATH
6536
6537if test -n "$XTERM_PATH"; then
6538  echo "$as_me:6538: result: $XTERM_PATH" >&5
6539echo "${ECHO_T}$XTERM_PATH" >&6
6540else
6541  echo "$as_me:6541: result: no" >&5
6542echo "${ECHO_T}no" >&6
6543fi
6544
6545  test -n "$XTERM_PATH" && break
6546done
6547test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
6548
6549cf_path_prog=""
6550cf_path_args=""
6551IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
6552for cf_temp in $ac_cv_path_XTERM_PATH
6553do
6554	if test -z "$cf_path_prog" ; then
6555		if test "$with_full_paths" = yes ; then
6556
6557if test "x$prefix" != xNONE; then
6558  cf_path_syntax="$prefix"
6559else
6560  cf_path_syntax="$ac_default_prefix"
6561fi
6562
6563case ".$cf_temp" in
6564(.\$\(*\)*|.\'*\'*)
6565  ;;
6566(..|./*|.\\*)
6567  ;;
6568(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6569  ;;
6570(.\${*prefix}*|.\${*dir}*)
6571  eval cf_temp="$cf_temp"
6572  case ".$cf_temp" in
6573  (.NONE/*)
6574    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6575    ;;
6576  esac
6577  ;;
6578(.no|.NONE/*)
6579  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6580  ;;
6581(*)
6582  break
6583  ;;
6584esac
6585
6586			cf_path_prog="$cf_temp"
6587		else
6588			cf_path_prog="`basename $cf_temp`"
6589		fi
6590	elif test -z "$cf_path_args" ; then
6591		cf_path_args="$cf_temp"
6592	else
6593		cf_path_args="$cf_path_args $cf_temp"
6594	fi
6595done
6596IFS="$cf_save_ifs"
6597
6598if test -n "$cf_path_prog" ; then
6599
6600echo "${as_me:-configure}:6600: testing defining path for ${cf_path_prog} ..." 1>&5
6601
6602cat >>confdefs.h <<EOF
6603#define XTERM_PATH_PATH "$cf_path_prog"
6604EOF
6605
6606	test -n "$cf_path_args" &&
6607cat >>confdefs.h <<EOF
6608#define XTERM_PATH_ARGS "$cf_path_args"
6609EOF
6610
6611fi
6612
6613# If any of --program-prefix, --program-suffix or --program-transform-name is
6614# given, accept an option tell the makefile to create a symbolic link, e.g.,
6615# to "xterm" on install.
6616XTERM_SYMLINK=NONE
6617
6618if test "$program_transform_name" != "'s,,,'" ; then
6619cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
6620cf_name=`echo xterm |sed -e "$cf_name"`
6621echo "$as_me:6621: checking for symbolic link to create to $cf_name" >&5
6622echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
6623
6624# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
6625if test "${with_xterm_symlink+set}" = set; then
6626  withval="$with_xterm_symlink"
6627  with_symlink=$withval
6628else
6629  with_symlink=xterm
6630fi;
6631echo "$as_me:6631: result: $with_symlink" >&5
6632echo "${ECHO_T}$with_symlink" >&6
6633test "$with_symlink" = yes && with_symlink=xterm
6634test -n "$with_symlink" && \
6635	test "$with_symlink" != no && \
6636	test "$with_symlink" != $cf_name && \
6637	XTERM_SYMLINK="$with_symlink"
6638fi
6639
6640echo "$as_me:6640: checking if you want to disable openpty" >&5
6641echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
6642
6643# Check whether --enable-openpty or --disable-openpty was given.
6644if test "${enable_openpty+set}" = set; then
6645  enableval="$enable_openpty"
6646  test "$enableval" != no && enableval=yes
6647  if test "$enableval" != "yes" ; then
6648    disable_openpty=yes
6649  else
6650    disable_openpty=no
6651  fi
6652else
6653  enableval=yes
6654  disable_openpty=no
6655
6656fi;
6657echo "$as_me:6657: result: $disable_openpty" >&5
6658echo "${ECHO_T}$disable_openpty" >&6
6659
6660echo "$as_me:6660: checking if you want to disable setuid" >&5
6661echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
6662
6663# Check whether --enable-setuid or --disable-setuid was given.
6664if test "${enable_setuid+set}" = set; then
6665  enableval="$enable_setuid"
6666  test "$enableval" != no && enableval=yes
6667  if test "$enableval" != "yes" ; then
6668    disable_setuid=yes
6669  else
6670    disable_setuid=no
6671  fi
6672else
6673  enableval=yes
6674  disable_setuid=no
6675
6676fi;
6677echo "$as_me:6677: result: $disable_setuid" >&5
6678echo "${ECHO_T}$disable_setuid" >&6
6679
6680echo "$as_me:6680: checking if you want to disable setgid" >&5
6681echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
6682
6683# Check whether --enable-setgid or --disable-setgid was given.
6684if test "${enable_setgid+set}" = set; then
6685  enableval="$enable_setgid"
6686  test "$enableval" != no && enableval=yes
6687  if test "$enableval" != "yes" ; then
6688    disable_setgid=yes
6689  else
6690    disable_setgid=no
6691  fi
6692else
6693  enableval=yes
6694  disable_setgid=no
6695
6696fi;
6697echo "$as_me:6697: result: $disable_setgid" >&5
6698echo "${ECHO_T}$disable_setgid" >&6
6699
6700echo "$as_me:6700: checking if you want to run xterm setuid to a given user" >&5
6701echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
6702
6703# Check whether --with-setuid or --without-setuid was given.
6704if test "${with_setuid+set}" = set; then
6705  withval="$with_setuid"
6706  use_given_setuid=$withval
6707else
6708  use_given_setuid=no
6709fi;
6710echo "$as_me:6710: result: $use_given_setuid" >&5
6711echo "${ECHO_T}$use_given_setuid" >&6
6712
6713if test "$use_given_setuid" != no ; then
6714	if test "$use_given_setuid" = yes ; then
6715		cf_cv_given_setuid=root
6716	else
6717		cf_cv_given_setuid=$use_given_setuid
6718	fi
6719	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
6720	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
6721fi
6722
6723echo "$as_me:6723: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
6724echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
6725
6726# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
6727if test "${with_utmp_setgid+set}" = set; then
6728  withval="$with_utmp_setgid"
6729  use_utmp_setgid=$withval
6730else
6731  use_utmp_setgid=no
6732fi;
6733echo "$as_me:6733: result: $use_utmp_setgid" >&5
6734echo "${ECHO_T}$use_utmp_setgid" >&6
6735
6736if test "$use_utmp_setgid" != no ; then
6737	if test "$use_utmp_setgid" = yes ; then
6738
6739if test $cf_cv_have_utmp != no ; then
6740echo "$as_me:6740: checking for utmp/utmpx group" >&5
6741echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
6742if test "${cf_cv_utmp_group+set}" = set; then
6743  echo $ECHO_N "(cached) $ECHO_C" >&6
6744else
6745
6746for cf_utmp_path in /var/adm /var/run
6747do
6748	for cf_utmp_file in utmpx utmp
6749	do
6750		if test -f $cf_utmp_path/$cf_utmp_file
6751		then
6752			cf_cv_utmp_group=root
6753
6754			cf_option="-l -L"
6755
6756			# Expect listing to have fields like this:
6757			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
6758			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6759			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6760			if test -z "$cf_rest" ; then
6761				cf_option="$cf_option -g"
6762				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6763				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6764			fi
6765			rm -f conftest
6766
6767			# If we have a pathname, and the date fields look right, assume we've
6768			# captured the group as well.
6769			if test -n "$cf_rest" ; then
6770				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
6771				if test -z "$cf_test" ; then
6772					cf_cv_utmp_group=$cf_grp;
6773				fi
6774			fi
6775			break
6776		fi
6777	done
6778	test -n "$cf_cv_utmp_group" && break
6779done
6780
6781fi
6782echo "$as_me:6782: result: $cf_cv_utmp_group" >&5
6783echo "${ECHO_T}$cf_cv_utmp_group" >&6
6784else
6785	{ { echo "$as_me:6785: error: cannot find utmp group" >&5
6786echo "$as_me: error: cannot find utmp group" >&2;}
6787   { (exit 1); exit 1; }; }
6788fi
6789
6790	else
6791		cf_cv_utmp_group=$use_utmp_setgid
6792	fi
6793	if test "$cf_cv_posix_saved_ids" != yes ; then
6794		{ { echo "$as_me:6794: error: Your system does not support POSIX saved-ids" >&5
6795echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
6796   { (exit 1); exit 1; }; }
6797	fi
6798
6799cat >>confdefs.h <<\EOF
6800#define USE_UTMP_SETGID 1
6801EOF
6802
6803	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
6804fi
6805
6806echo "$as_me:6806: checking if you want to link with utempter" >&5
6807echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
6808
6809# Check whether --with-utempter or --without-utempter was given.
6810if test "${with_utempter+set}" = set; then
6811  withval="$with_utempter"
6812  use_utempter=$withval
6813else
6814  use_utempter=no
6815fi;
6816echo "$as_me:6816: result: $use_utempter" >&5
6817echo "${ECHO_T}$use_utempter" >&6
6818
6819if test "$use_utempter" = yes ; then
6820
6821echo "$as_me:6821: checking if we can link with utempter library" >&5
6822echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
6823if test "${cf_cv_have_utempter+set}" = set; then
6824  echo $ECHO_N "(cached) $ECHO_C" >&6
6825else
6826
6827cf_save_LIBS="$LIBS"
6828
6829cf_add_libs="-lutempter"
6830# Filter out duplicates - this happens with badly-designed ".pc" files...
6831for cf_add_1lib in $LIBS
6832do
6833	for cf_add_2lib in $cf_add_libs
6834	do
6835		if test "x$cf_add_1lib" = "x$cf_add_2lib"
6836		then
6837			cf_add_1lib=
6838			break
6839		fi
6840	done
6841	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6842done
6843LIBS="$cf_add_libs"
6844
6845cat >conftest.$ac_ext <<_ACEOF
6846#line 6846 "configure"
6847#include "confdefs.h"
6848
6849#include <utempter.h>
6850
6851int
6852main ()
6853{
6854
6855	addToUtmp("/dev/tty", 0, 1);
6856	removeFromUtmp();
6857
6858  ;
6859  return 0;
6860}
6861_ACEOF
6862rm -f conftest.$ac_objext conftest$ac_exeext
6863if { (eval echo "$as_me:6863: \"$ac_link\"") >&5
6864  (eval $ac_link) 2>&5
6865  ac_status=$?
6866  echo "$as_me:6866: \$? = $ac_status" >&5
6867  (exit $ac_status); } &&
6868         { ac_try='test -s conftest$ac_exeext'
6869  { (eval echo "$as_me:6869: \"$ac_try\"") >&5
6870  (eval $ac_try) 2>&5
6871  ac_status=$?
6872  echo "$as_me:6872: \$? = $ac_status" >&5
6873  (exit $ac_status); }; }; then
6874
6875	cf_cv_have_utempter=yes
6876else
6877  echo "$as_me: failed program was:" >&5
6878cat conftest.$ac_ext >&5
6879
6880	cf_cv_have_utempter=no
6881fi
6882rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6883LIBS="$cf_save_LIBS"
6884
6885fi
6886echo "$as_me:6886: result: $cf_cv_have_utempter" >&5
6887echo "${ECHO_T}$cf_cv_have_utempter" >&6
6888if test "$cf_cv_have_utempter" = yes ; then
6889
6890cat >>confdefs.h <<\EOF
6891#define USE_UTEMPTER 1
6892EOF
6893
6894cf_add_libs="-lutempter"
6895# Filter out duplicates - this happens with badly-designed ".pc" files...
6896for cf_add_1lib in $LIBS
6897do
6898	for cf_add_2lib in $cf_add_libs
6899	do
6900		if test "x$cf_add_1lib" = "x$cf_add_2lib"
6901		then
6902			cf_add_1lib=
6903			break
6904		fi
6905	done
6906	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6907done
6908LIBS="$cf_add_libs"
6909
6910fi
6911
6912	test "$cf_cv_have_utempter" != yes && use_utempter=no
6913else
6914	use_utempter=no
6915fi
6916
6917# Some configurations permit (or require) either setuid or setgid mode.
6918# Let the user decide.
6919if test "$use_utempter" = yes ; then
6920	if test "${enable_setuid+set}" != set ; then
6921		disable_setuid=yes
6922		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
6923
6924echo "${as_me:-configure}:6924: testing No --disable-setuid option given, force to yes ..." 1>&5
6925
6926	fi
6927fi
6928
6929###	checks for external data
6930
6931echo "$as_me:6931: checking if external errno is declared" >&5
6932echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
6933if test "${cf_cv_dcl_errno+set}" = set; then
6934  echo $ECHO_N "(cached) $ECHO_C" >&6
6935else
6936
6937    cat >conftest.$ac_ext <<_ACEOF
6938#line 6938 "configure"
6939#include "confdefs.h"
6940
6941#ifdef HAVE_STDLIB_H
6942#include <stdlib.h>
6943#endif
6944#include <stdio.h>
6945#include <sys/types.h>
6946#include <errno.h>
6947int
6948main ()
6949{
6950int x = (int) errno
6951  ;
6952  return 0;
6953}
6954_ACEOF
6955rm -f conftest.$ac_objext
6956if { (eval echo "$as_me:6956: \"$ac_compile\"") >&5
6957  (eval $ac_compile) 2>&5
6958  ac_status=$?
6959  echo "$as_me:6959: \$? = $ac_status" >&5
6960  (exit $ac_status); } &&
6961         { ac_try='test -s conftest.$ac_objext'
6962  { (eval echo "$as_me:6962: \"$ac_try\"") >&5
6963  (eval $ac_try) 2>&5
6964  ac_status=$?
6965  echo "$as_me:6965: \$? = $ac_status" >&5
6966  (exit $ac_status); }; }; then
6967  cf_cv_dcl_errno=yes
6968else
6969  echo "$as_me: failed program was:" >&5
6970cat conftest.$ac_ext >&5
6971cf_cv_dcl_errno=no
6972fi
6973rm -f conftest.$ac_objext conftest.$ac_ext
6974
6975fi
6976echo "$as_me:6976: result: $cf_cv_dcl_errno" >&5
6977echo "${ECHO_T}$cf_cv_dcl_errno" >&6
6978
6979if test "$cf_cv_dcl_errno" = no ; then
6980
6981cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
6982
6983    cat >>confdefs.h <<EOF
6984#define $cf_result 1
6985EOF
6986
6987fi
6988
6989# It's possible (for near-UNIX clones) that the data doesn't exist
6990
6991echo "$as_me:6991: checking if external errno exists" >&5
6992echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
6993if test "${cf_cv_have_errno+set}" = set; then
6994  echo $ECHO_N "(cached) $ECHO_C" >&6
6995else
6996
6997    cat >conftest.$ac_ext <<_ACEOF
6998#line 6998 "configure"
6999#include "confdefs.h"
7000
7001#undef errno
7002extern int errno;
7003
7004int
7005main ()
7006{
7007errno = 2
7008  ;
7009  return 0;
7010}
7011_ACEOF
7012rm -f conftest.$ac_objext conftest$ac_exeext
7013if { (eval echo "$as_me:7013: \"$ac_link\"") >&5
7014  (eval $ac_link) 2>&5
7015  ac_status=$?
7016  echo "$as_me:7016: \$? = $ac_status" >&5
7017  (exit $ac_status); } &&
7018         { ac_try='test -s conftest$ac_exeext'
7019  { (eval echo "$as_me:7019: \"$ac_try\"") >&5
7020  (eval $ac_try) 2>&5
7021  ac_status=$?
7022  echo "$as_me:7022: \$? = $ac_status" >&5
7023  (exit $ac_status); }; }; then
7024  cf_cv_have_errno=yes
7025else
7026  echo "$as_me: failed program was:" >&5
7027cat conftest.$ac_ext >&5
7028cf_cv_have_errno=no
7029fi
7030rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7031
7032fi
7033echo "$as_me:7033: result: $cf_cv_have_errno" >&5
7034echo "${ECHO_T}$cf_cv_have_errno" >&6
7035
7036if test "$cf_cv_have_errno" = yes ; then
7037
7038cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7039
7040    cat >>confdefs.h <<EOF
7041#define $cf_result 1
7042EOF
7043
7044fi
7045
7046echo "$as_me:7046: checking for explicit tty group name" >&5
7047echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
7048
7049# Check whether --with-tty-group or --without-tty-group was given.
7050if test "${with_tty_group+set}" = set; then
7051  withval="$with_tty_group"
7052  cf_tty_group=$withval
7053else
7054  cf_tty_group=auto...
7055fi;
7056test -z "$cf_tty_group"    && cf_tty_group=auto...
7057test "$cf_tty_group" = yes && cf_tty_group=auto...
7058echo "$as_me:7058: result: $cf_tty_group" >&5
7059echo "${ECHO_T}$cf_tty_group" >&6
7060
7061if test "$cf_tty_group" = "auto..." ; then
7062echo "$as_me:7062: checking for tty group name" >&5
7063echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
7064if test "${cf_cv_tty_group_name+set}" = set; then
7065  echo $ECHO_N "(cached) $ECHO_C" >&6
7066else
7067
7068# If we are configuring as root, it is hard to get a clue about the tty group.
7069# But we'll guess based on how our connection is set up - assuming it is done
7070# properly.
7071
7072cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
7073# )vi
7074if test "$cf_uid" != 0 ; then
7075cf_cv_tty_group_name=
7076cf_tty_name=`tty`
7077test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
7078test -z "$cf_tty_name" && cf_tty_name=/dev/tty
7079if test -c "$cf_tty_name"
7080then
7081	cf_option="-l -L"
7082
7083	# Expect listing to have fields like this:
7084	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
7085	ls $cf_option $cf_tty_name >conftest.out
7086	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7087	if test -z "$cf_rest" ; then
7088		cf_option="$cf_option -g"
7089		ls $cf_option $cf_tty_name >conftest.out
7090		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7091	fi
7092	rm -f conftest.out
7093	cf_cv_tty_group_name=$cf_grp
7094fi
7095fi
7096
7097# If we cannot deduce the tty group, fall back on hardcoded cases
7098
7099if test -z "$cf_cv_tty_group_name"
7100then
7101case $host_os in
7102(osf*)
7103	cf_cv_tty_group_name="terminal"
7104	;;
7105(*)
7106	cf_cv_tty_group_name="unknown"
7107	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
7108		cf_cv_tty_group_name="tty"
7109	fi
7110	;;
7111esac
7112fi
7113
7114fi
7115echo "$as_me:7115: result: $cf_cv_tty_group_name" >&5
7116echo "${ECHO_T}$cf_cv_tty_group_name" >&6
7117cf_tty_group="$cf_cv_tty_group_name"
7118else
7119	# if configure option, always do this
7120
7121cat >>confdefs.h <<\EOF
7122#define USE_TTY_GROUP 1
7123EOF
7124
7125fi
7126
7127cat >>confdefs.h <<EOF
7128#define TTY_GROUP_NAME "$cf_tty_group"
7129EOF
7130
7131# This is only a double-check that the group-name we obtained above really
7132# does apply to the device.  We cannot perform this test if we are in batch
7133# mode, or if we are cross-compiling.
7134
7135echo "$as_me:7135: checking if we may use the $cf_tty_group group" >&5
7136echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
7137if test "${cf_cv_tty_group+set}" = set; then
7138  echo $ECHO_N "(cached) $ECHO_C" >&6
7139else
7140
7141cf_tty_name=`tty`
7142if test "$cf_tty_name" != "not a tty"
7143then
7144if test "$cross_compiling" = yes; then
7145  cf_cv_tty_group=unknown
7146else
7147  cat >conftest.$ac_ext <<_ACEOF
7148#line 7148 "configure"
7149#include "confdefs.h"
7150
7151#include <unistd.h>
7152#include <sys/types.h>
7153#include <sys/stat.h>
7154#include <grp.h>
7155int main()
7156{
7157	struct stat sb;
7158	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
7159	char *name = ttyname(0);
7160
7161	endgrent();
7162	if (ttygrp != 0
7163	 && name != 0
7164	 && stat(name, &sb) == 0
7165	 && sb.st_gid != getgid()
7166	 && sb.st_gid == ttygrp->gr_gid) {
7167		${cf_cv_main_return:-return} (0);
7168	}
7169	${cf_cv_main_return:-return} (1);
7170}
7171
7172_ACEOF
7173rm -f conftest$ac_exeext
7174if { (eval echo "$as_me:7174: \"$ac_link\"") >&5
7175  (eval $ac_link) 2>&5
7176  ac_status=$?
7177  echo "$as_me:7177: \$? = $ac_status" >&5
7178  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7179  { (eval echo "$as_me:7179: \"$ac_try\"") >&5
7180  (eval $ac_try) 2>&5
7181  ac_status=$?
7182  echo "$as_me:7182: \$? = $ac_status" >&5
7183  (exit $ac_status); }; }; then
7184  cf_cv_tty_group=yes
7185else
7186  echo "$as_me: program exited with status $ac_status" >&5
7187echo "$as_me: failed program was:" >&5
7188cat conftest.$ac_ext >&5
7189cf_cv_tty_group=no
7190fi
7191rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7192fi
7193elif test "$cross_compiling" = yes; then
7194	cf_cv_tty_group=unknown
7195else
7196	cf_cv_tty_group=yes
7197fi
7198
7199fi
7200echo "$as_me:7200: result: $cf_cv_tty_group" >&5
7201echo "${ECHO_T}$cf_cv_tty_group" >&6
7202
7203if test $cf_cv_tty_group = no ; then
7204	{ echo "$as_me:7204: WARNING: Cannot use $cf_tty_group group" >&5
7205echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
7206else
7207	cat >>confdefs.h <<\EOF
7208#define USE_TTY_GROUP 1
7209EOF
7210
7211fi
7212
7213###	checks for system services and user specified options
7214
7215echo "$as_me:7215: checking for sys/wait.h that is POSIX.1 compatible" >&5
7216echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7217if test "${ac_cv_header_sys_wait_h+set}" = set; then
7218  echo $ECHO_N "(cached) $ECHO_C" >&6
7219else
7220  cat >conftest.$ac_ext <<_ACEOF
7221#line 7221 "configure"
7222#include "confdefs.h"
7223#include <sys/types.h>
7224#include <sys/wait.h>
7225#ifndef WEXITSTATUS
7226# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7227#endif
7228#ifndef WIFEXITED
7229# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7230#endif
7231
7232int
7233main ()
7234{
7235  int s;
7236  wait (&s);
7237  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7238  ;
7239  return 0;
7240}
7241_ACEOF
7242rm -f conftest.$ac_objext
7243if { (eval echo "$as_me:7243: \"$ac_compile\"") >&5
7244  (eval $ac_compile) 2>&5
7245  ac_status=$?
7246  echo "$as_me:7246: \$? = $ac_status" >&5
7247  (exit $ac_status); } &&
7248         { ac_try='test -s conftest.$ac_objext'
7249  { (eval echo "$as_me:7249: \"$ac_try\"") >&5
7250  (eval $ac_try) 2>&5
7251  ac_status=$?
7252  echo "$as_me:7252: \$? = $ac_status" >&5
7253  (exit $ac_status); }; }; then
7254  ac_cv_header_sys_wait_h=yes
7255else
7256  echo "$as_me: failed program was:" >&5
7257cat conftest.$ac_ext >&5
7258ac_cv_header_sys_wait_h=no
7259fi
7260rm -f conftest.$ac_objext conftest.$ac_ext
7261fi
7262echo "$as_me:7262: result: $ac_cv_header_sys_wait_h" >&5
7263echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
7264if test $ac_cv_header_sys_wait_h = yes; then
7265
7266cat >>confdefs.h <<\EOF
7267#define HAVE_SYS_WAIT_H 1
7268EOF
7269
7270fi
7271
7272echo "$as_me:7272: checking for POSIX wait functions" >&5
7273echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
7274if test "${cf_cv_posix_wait+set}" = set; then
7275  echo $ECHO_N "(cached) $ECHO_C" >&6
7276else
7277
7278cat >conftest.$ac_ext <<_ACEOF
7279#line 7279 "configure"
7280#include "confdefs.h"
7281
7282#include <stdlib.h>
7283#include <stdio.h>
7284#include <sys/types.h>
7285#ifdef HAVE_SYS_WAIT_H
7286#include <sys/wait.h>
7287#endif
7288
7289int
7290main ()
7291{
7292
7293	int stat_loc;
7294	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
7295	pid_t pid2 = wait(&stat_loc);
7296
7297  ;
7298  return 0;
7299}
7300_ACEOF
7301rm -f conftest.$ac_objext conftest$ac_exeext
7302if { (eval echo "$as_me:7302: \"$ac_link\"") >&5
7303  (eval $ac_link) 2>&5
7304  ac_status=$?
7305  echo "$as_me:7305: \$? = $ac_status" >&5
7306  (exit $ac_status); } &&
7307         { ac_try='test -s conftest$ac_exeext'
7308  { (eval echo "$as_me:7308: \"$ac_try\"") >&5
7309  (eval $ac_try) 2>&5
7310  ac_status=$?
7311  echo "$as_me:7311: \$? = $ac_status" >&5
7312  (exit $ac_status); }; }; then
7313  cf_cv_posix_wait=yes
7314else
7315  echo "$as_me: failed program was:" >&5
7316cat conftest.$ac_ext >&5
7317cf_cv_posix_wait=no
7318fi
7319rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7320
7321fi
7322echo "$as_me:7322: result: $cf_cv_posix_wait" >&5
7323echo "${ECHO_T}$cf_cv_posix_wait" >&6
7324test "$cf_cv_posix_wait" = yes &&
7325cat >>confdefs.h <<\EOF
7326#define USE_POSIX_WAIT 1
7327EOF
7328
7329echo "$as_me:7329: checking if external sys_nerr is declared" >&5
7330echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
7331if test "${cf_cv_dcl_sys_nerr+set}" = set; then
7332  echo $ECHO_N "(cached) $ECHO_C" >&6
7333else
7334
7335    cat >conftest.$ac_ext <<_ACEOF
7336#line 7336 "configure"
7337#include "confdefs.h"
7338
7339#ifdef HAVE_STDLIB_H
7340#include <stdlib.h>
7341#endif
7342#include <stdio.h>
7343#include <sys/types.h>
7344#include <errno.h>
7345int
7346main ()
7347{
7348int x = (int) sys_nerr
7349  ;
7350  return 0;
7351}
7352_ACEOF
7353rm -f conftest.$ac_objext
7354if { (eval echo "$as_me:7354: \"$ac_compile\"") >&5
7355  (eval $ac_compile) 2>&5
7356  ac_status=$?
7357  echo "$as_me:7357: \$? = $ac_status" >&5
7358  (exit $ac_status); } &&
7359         { ac_try='test -s conftest.$ac_objext'
7360  { (eval echo "$as_me:7360: \"$ac_try\"") >&5
7361  (eval $ac_try) 2>&5
7362  ac_status=$?
7363  echo "$as_me:7363: \$? = $ac_status" >&5
7364  (exit $ac_status); }; }; then
7365  cf_cv_dcl_sys_nerr=yes
7366else
7367  echo "$as_me: failed program was:" >&5
7368cat conftest.$ac_ext >&5
7369cf_cv_dcl_sys_nerr=no
7370fi
7371rm -f conftest.$ac_objext conftest.$ac_ext
7372
7373fi
7374echo "$as_me:7374: result: $cf_cv_dcl_sys_nerr" >&5
7375echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
7376
7377if test "$cf_cv_dcl_sys_nerr" = no ; then
7378
7379cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7380
7381    cat >>confdefs.h <<EOF
7382#define $cf_result 1
7383EOF
7384
7385fi
7386
7387# It's possible (for near-UNIX clones) that the data doesn't exist
7388
7389echo "$as_me:7389: checking if external sys_nerr exists" >&5
7390echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
7391if test "${cf_cv_have_sys_nerr+set}" = set; then
7392  echo $ECHO_N "(cached) $ECHO_C" >&6
7393else
7394
7395    cat >conftest.$ac_ext <<_ACEOF
7396#line 7396 "configure"
7397#include "confdefs.h"
7398
7399#undef sys_nerr
7400extern int sys_nerr;
7401
7402int
7403main ()
7404{
7405sys_nerr = 2
7406  ;
7407  return 0;
7408}
7409_ACEOF
7410rm -f conftest.$ac_objext conftest$ac_exeext
7411if { (eval echo "$as_me:7411: \"$ac_link\"") >&5
7412  (eval $ac_link) 2>&5
7413  ac_status=$?
7414  echo "$as_me:7414: \$? = $ac_status" >&5
7415  (exit $ac_status); } &&
7416         { ac_try='test -s conftest$ac_exeext'
7417  { (eval echo "$as_me:7417: \"$ac_try\"") >&5
7418  (eval $ac_try) 2>&5
7419  ac_status=$?
7420  echo "$as_me:7420: \$? = $ac_status" >&5
7421  (exit $ac_status); }; }; then
7422  cf_cv_have_sys_nerr=yes
7423else
7424  echo "$as_me: failed program was:" >&5
7425cat conftest.$ac_ext >&5
7426cf_cv_have_sys_nerr=no
7427fi
7428rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7429
7430fi
7431echo "$as_me:7431: result: $cf_cv_have_sys_nerr" >&5
7432echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
7433
7434if test "$cf_cv_have_sys_nerr" = yes ; then
7435
7436cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7437
7438    cat >>confdefs.h <<EOF
7439#define $cf_result 1
7440EOF
7441
7442fi
7443
7444echo "$as_me:7444: checking if external sys_errlist is declared" >&5
7445echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
7446if test "${cf_cv_dcl_sys_errlist+set}" = set; then
7447  echo $ECHO_N "(cached) $ECHO_C" >&6
7448else
7449
7450    cat >conftest.$ac_ext <<_ACEOF
7451#line 7451 "configure"
7452#include "confdefs.h"
7453
7454#ifdef HAVE_STDLIB_H
7455#include <stdlib.h>
7456#endif
7457#include <stdio.h>
7458#include <sys/types.h>
7459#include <errno.h>
7460int
7461main ()
7462{
7463int x = (int) sys_errlist
7464  ;
7465  return 0;
7466}
7467_ACEOF
7468rm -f conftest.$ac_objext
7469if { (eval echo "$as_me:7469: \"$ac_compile\"") >&5
7470  (eval $ac_compile) 2>&5
7471  ac_status=$?
7472  echo "$as_me:7472: \$? = $ac_status" >&5
7473  (exit $ac_status); } &&
7474         { ac_try='test -s conftest.$ac_objext'
7475  { (eval echo "$as_me:7475: \"$ac_try\"") >&5
7476  (eval $ac_try) 2>&5
7477  ac_status=$?
7478  echo "$as_me:7478: \$? = $ac_status" >&5
7479  (exit $ac_status); }; }; then
7480  cf_cv_dcl_sys_errlist=yes
7481else
7482  echo "$as_me: failed program was:" >&5
7483cat conftest.$ac_ext >&5
7484cf_cv_dcl_sys_errlist=no
7485fi
7486rm -f conftest.$ac_objext conftest.$ac_ext
7487
7488fi
7489echo "$as_me:7489: result: $cf_cv_dcl_sys_errlist" >&5
7490echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
7491
7492if test "$cf_cv_dcl_sys_errlist" = no ; then
7493
7494cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7495
7496    cat >>confdefs.h <<EOF
7497#define $cf_result 1
7498EOF
7499
7500fi
7501
7502# It's possible (for near-UNIX clones) that the data doesn't exist
7503
7504echo "$as_me:7504: checking if external sys_errlist exists" >&5
7505echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
7506if test "${cf_cv_have_sys_errlist+set}" = set; then
7507  echo $ECHO_N "(cached) $ECHO_C" >&6
7508else
7509
7510    cat >conftest.$ac_ext <<_ACEOF
7511#line 7511 "configure"
7512#include "confdefs.h"
7513
7514#undef sys_errlist
7515extern int sys_errlist;
7516
7517int
7518main ()
7519{
7520sys_errlist = 2
7521  ;
7522  return 0;
7523}
7524_ACEOF
7525rm -f conftest.$ac_objext conftest$ac_exeext
7526if { (eval echo "$as_me:7526: \"$ac_link\"") >&5
7527  (eval $ac_link) 2>&5
7528  ac_status=$?
7529  echo "$as_me:7529: \$? = $ac_status" >&5
7530  (exit $ac_status); } &&
7531         { ac_try='test -s conftest$ac_exeext'
7532  { (eval echo "$as_me:7532: \"$ac_try\"") >&5
7533  (eval $ac_try) 2>&5
7534  ac_status=$?
7535  echo "$as_me:7535: \$? = $ac_status" >&5
7536  (exit $ac_status); }; }; then
7537  cf_cv_have_sys_errlist=yes
7538else
7539  echo "$as_me: failed program was:" >&5
7540cat conftest.$ac_ext >&5
7541cf_cv_have_sys_errlist=no
7542fi
7543rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7544
7545fi
7546echo "$as_me:7546: result: $cf_cv_have_sys_errlist" >&5
7547echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
7548
7549if test "$cf_cv_have_sys_errlist" = yes ; then
7550
7551cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7552
7553    cat >>confdefs.h <<EOF
7554#define $cf_result 1
7555EOF
7556
7557fi
7558
7559for ac_header in \
7560termios.h \
7561stdlib.h \
7562X11/Intrinsic.h \
7563
7564do
7565as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7566echo "$as_me:7566: checking for $ac_header" >&5
7567echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7568if eval "test \"\${$as_ac_Header+set}\" = set"; then
7569  echo $ECHO_N "(cached) $ECHO_C" >&6
7570else
7571  cat >conftest.$ac_ext <<_ACEOF
7572#line 7572 "configure"
7573#include "confdefs.h"
7574#include <$ac_header>
7575_ACEOF
7576if { (eval echo "$as_me:7576: \"$ac_cpp conftest.$ac_ext\"") >&5
7577  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7578  ac_status=$?
7579  egrep -v '^ *\+' conftest.er1 >conftest.err
7580  rm -f conftest.er1
7581  cat conftest.err >&5
7582  echo "$as_me:7582: \$? = $ac_status" >&5
7583  (exit $ac_status); } >/dev/null; then
7584  if test -s conftest.err; then
7585    ac_cpp_err=$ac_c_preproc_warn_flag
7586  else
7587    ac_cpp_err=
7588  fi
7589else
7590  ac_cpp_err=yes
7591fi
7592if test -z "$ac_cpp_err"; then
7593  eval "$as_ac_Header=yes"
7594else
7595  echo "$as_me: failed program was:" >&5
7596  cat conftest.$ac_ext >&5
7597  eval "$as_ac_Header=no"
7598fi
7599rm -f conftest.err conftest.$ac_ext
7600fi
7601echo "$as_me:7601: result: `eval echo '${'$as_ac_Header'}'`" >&5
7602echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7603if test `eval echo '${'$as_ac_Header'}'` = yes; then
7604  cat >>confdefs.h <<EOF
7605#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7606EOF
7607
7608fi
7609done
7610
7611echo "$as_me:7611: checking if we should define SYSV" >&5
7612echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
7613if test "${cf_cv_sysv+set}" = set; then
7614  echo $ECHO_N "(cached) $ECHO_C" >&6
7615else
7616
7617cat >conftest.$ac_ext <<_ACEOF
7618#line 7618 "configure"
7619#include "confdefs.h"
7620
7621#undef  SYSV
7622#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
7623#ifdef HAVE_STDLIB_H
7624#include <stdlib.h>		/* look for wchar_t */
7625#endif
7626#ifdef HAVE_X11_INTRINSIC_H
7627#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
7628#endif
7629#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
7630#include <termios.h>
7631#define STRUCT_TERMIOS struct termios
7632#else
7633#define STRUCT_TERMIOS struct termio
7634#endif
7635#include <curses.h>
7636#include <term.h>		/* eliminate most BSD hacks */
7637#include <errno.h>		/* declare sys_errlist on older systems */
7638#include <sys/termio.h>		/* eliminate most of the remaining ones */
7639
7640int
7641main ()
7642{
7643
7644static STRUCT_TERMIOS d_tio;
7645	d_tio.c_cc[VINTR] = 0;
7646	d_tio.c_cc[VQUIT] = 0;
7647	d_tio.c_cc[VERASE] = 0;
7648	d_tio.c_cc[VKILL] = 0;
7649	d_tio.c_cc[VEOF] = 0;
7650	d_tio.c_cc[VEOL] = 0;
7651	d_tio.c_cc[VMIN] = 0;
7652	d_tio.c_cc[VTIME] = 0;
7653#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
7654sys_errlist[0] = "";		/* Cygwin mis-declares this */
7655#endif
7656
7657  ;
7658  return 0;
7659}
7660_ACEOF
7661rm -f conftest.$ac_objext
7662if { (eval echo "$as_me:7662: \"$ac_compile\"") >&5
7663  (eval $ac_compile) 2>&5
7664  ac_status=$?
7665  echo "$as_me:7665: \$? = $ac_status" >&5
7666  (exit $ac_status); } &&
7667         { ac_try='test -s conftest.$ac_objext'
7668  { (eval echo "$as_me:7668: \"$ac_try\"") >&5
7669  (eval $ac_try) 2>&5
7670  ac_status=$?
7671  echo "$as_me:7671: \$? = $ac_status" >&5
7672  (exit $ac_status); }; }; then
7673  cf_cv_sysv=yes
7674else
7675  echo "$as_me: failed program was:" >&5
7676cat conftest.$ac_ext >&5
7677cf_cv_sysv=no
7678fi
7679rm -f conftest.$ac_objext conftest.$ac_ext
7680
7681fi
7682echo "$as_me:7682: result: $cf_cv_sysv" >&5
7683echo "${ECHO_T}$cf_cv_sysv" >&6
7684test "$cf_cv_sysv" = yes &&
7685cat >>confdefs.h <<\EOF
7686#define SYSV 1
7687EOF
7688
7689echo "$as_me:7689: checking for elf_begin in -lelf" >&5
7690echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
7691if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7692  echo $ECHO_N "(cached) $ECHO_C" >&6
7693else
7694  ac_check_lib_save_LIBS=$LIBS
7695LIBS="-lelf  $LIBS"
7696cat >conftest.$ac_ext <<_ACEOF
7697#line 7697 "configure"
7698#include "confdefs.h"
7699
7700/* Override any gcc2 internal prototype to avoid an error.  */
7701#ifdef __cplusplus
7702extern "C"
7703#endif
7704/* We use char because int might match the return type of a gcc2
7705   builtin and then its argument prototype would still apply.  */
7706char elf_begin ();
7707int
7708main ()
7709{
7710elf_begin ();
7711  ;
7712  return 0;
7713}
7714_ACEOF
7715rm -f conftest.$ac_objext conftest$ac_exeext
7716if { (eval echo "$as_me:7716: \"$ac_link\"") >&5
7717  (eval $ac_link) 2>&5
7718  ac_status=$?
7719  echo "$as_me:7719: \$? = $ac_status" >&5
7720  (exit $ac_status); } &&
7721         { ac_try='test -s conftest$ac_exeext'
7722  { (eval echo "$as_me:7722: \"$ac_try\"") >&5
7723  (eval $ac_try) 2>&5
7724  ac_status=$?
7725  echo "$as_me:7725: \$? = $ac_status" >&5
7726  (exit $ac_status); }; }; then
7727  ac_cv_lib_elf_elf_begin=yes
7728else
7729  echo "$as_me: failed program was:" >&5
7730cat conftest.$ac_ext >&5
7731ac_cv_lib_elf_elf_begin=no
7732fi
7733rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7734LIBS=$ac_check_lib_save_LIBS
7735fi
7736echo "$as_me:7736: result: $ac_cv_lib_elf_elf_begin" >&5
7737echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
7738if test $ac_cv_lib_elf_elf_begin = yes; then
7739
7740echo "$as_me:7740: checking if this is an SVR4 system" >&5
7741echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
7742if test "${cf_cv_svr4+set}" = set; then
7743  echo $ECHO_N "(cached) $ECHO_C" >&6
7744else
7745
7746cat >conftest.$ac_ext <<_ACEOF
7747#line 7747 "configure"
7748#include "confdefs.h"
7749
7750#if defined(__CYGWIN__)
7751make an error
7752#endif
7753#include <elf.h>
7754#include <sys/termio.h>
7755
7756int
7757main ()
7758{
7759
7760static struct termio d_tio;
7761	d_tio.c_cc[VINTR] = 0;
7762	d_tio.c_cc[VQUIT] = 0;
7763	d_tio.c_cc[VERASE] = 0;
7764	d_tio.c_cc[VKILL] = 0;
7765	d_tio.c_cc[VEOF] = 0;
7766	d_tio.c_cc[VEOL] = 0;
7767	d_tio.c_cc[VMIN] = 0;
7768	d_tio.c_cc[VTIME] = 0;
7769	d_tio.c_cc[VLNEXT] = 0;
7770
7771  ;
7772  return 0;
7773}
7774_ACEOF
7775rm -f conftest.$ac_objext
7776if { (eval echo "$as_me:7776: \"$ac_compile\"") >&5
7777  (eval $ac_compile) 2>&5
7778  ac_status=$?
7779  echo "$as_me:7779: \$? = $ac_status" >&5
7780  (exit $ac_status); } &&
7781         { ac_try='test -s conftest.$ac_objext'
7782  { (eval echo "$as_me:7782: \"$ac_try\"") >&5
7783  (eval $ac_try) 2>&5
7784  ac_status=$?
7785  echo "$as_me:7785: \$? = $ac_status" >&5
7786  (exit $ac_status); }; }; then
7787  cf_cv_svr4=yes
7788else
7789  echo "$as_me: failed program was:" >&5
7790cat conftest.$ac_ext >&5
7791cf_cv_svr4=no
7792fi
7793rm -f conftest.$ac_objext conftest.$ac_ext
7794
7795fi
7796echo "$as_me:7796: result: $cf_cv_svr4" >&5
7797echo "${ECHO_T}$cf_cv_svr4" >&6
7798
7799fi
7800
7801test "$cf_cv_svr4" = yes &&
7802cat >>confdefs.h <<\EOF
7803#define SVR4 1
7804EOF
7805
7806echo "$as_me:7806: checking for X" >&5
7807echo $ECHO_N "checking for X... $ECHO_C" >&6
7808
7809# Check whether --with-x or --without-x was given.
7810if test "${with_x+set}" = set; then
7811  withval="$with_x"
7812
7813fi;
7814# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7815if test "x$with_x" = xno; then
7816  # The user explicitly disabled X.
7817  have_x=disabled
7818else
7819  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7820    # Both variables are already set.
7821    have_x=yes
7822  else
7823    if test "${ac_cv_have_x+set}" = set; then
7824  echo $ECHO_N "(cached) $ECHO_C" >&6
7825else
7826  # One or both of the vars are not set, and there is no cached value.
7827ac_x_includes=no ac_x_libraries=no
7828rm -fr conftest.dir
7829if mkdir conftest.dir; then
7830  cd conftest.dir
7831  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7832  cat >Imakefile <<'EOF'
7833acfindx:
7834	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7835EOF
7836  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7837    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7838    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7839    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7840    for ac_extension in a so sl dylib dll; do
7841      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7842         test -f $ac_im_libdir/libX11.$ac_extension; then
7843        ac_im_usrlibdir=$ac_im_libdir; break
7844      fi
7845    done
7846    # Screen out bogus values from the imake configuration.  They are
7847    # bogus both because they are the default anyway, and because
7848    # using them would break gcc on systems where it needs fixed includes.
7849    case $ac_im_incroot in
7850	/usr/include) ;;
7851	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7852    esac
7853    case $ac_im_usrlibdir in
7854	/usr/lib | /lib) ;;
7855	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7856    esac
7857  fi
7858  cd ..
7859  rm -fr conftest.dir
7860fi
7861
7862# Standard set of common directories for X headers.
7863# Check X11 before X11Rn because it is often a symlink to the current release.
7864ac_x_header_dirs='
7865/usr/X11/include
7866/usr/X11R6/include
7867/usr/X11R5/include
7868/usr/X11R4/include
7869
7870/usr/include/X11
7871/usr/include/X11R6
7872/usr/include/X11R5
7873/usr/include/X11R4
7874
7875/usr/local/X11/include
7876/usr/local/X11R6/include
7877/usr/local/X11R5/include
7878/usr/local/X11R4/include
7879
7880/usr/local/include/X11
7881/usr/local/include/X11R6
7882/usr/local/include/X11R5
7883/usr/local/include/X11R4
7884
7885/usr/X386/include
7886/usr/x386/include
7887/usr/XFree86/include/X11
7888
7889/usr/include
7890/usr/local/include
7891/usr/unsupported/include
7892/usr/athena/include
7893/usr/local/x11r5/include
7894/usr/lpp/Xamples/include
7895
7896/usr/openwin/include
7897/usr/openwin/share/include'
7898
7899if test "$ac_x_includes" = no; then
7900  # Guess where to find include files, by looking for Intrinsic.h.
7901  # First, try using that file with no special directory specified.
7902  cat >conftest.$ac_ext <<_ACEOF
7903#line 7903 "configure"
7904#include "confdefs.h"
7905#include <X11/Intrinsic.h>
7906_ACEOF
7907if { (eval echo "$as_me:7907: \"$ac_cpp conftest.$ac_ext\"") >&5
7908  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7909  ac_status=$?
7910  egrep -v '^ *\+' conftest.er1 >conftest.err
7911  rm -f conftest.er1
7912  cat conftest.err >&5
7913  echo "$as_me:7913: \$? = $ac_status" >&5
7914  (exit $ac_status); } >/dev/null; then
7915  if test -s conftest.err; then
7916    ac_cpp_err=$ac_c_preproc_warn_flag
7917  else
7918    ac_cpp_err=
7919  fi
7920else
7921  ac_cpp_err=yes
7922fi
7923if test -z "$ac_cpp_err"; then
7924  # We can compile using X headers with no special include directory.
7925ac_x_includes=
7926else
7927  echo "$as_me: failed program was:" >&5
7928  cat conftest.$ac_ext >&5
7929  for ac_dir in $ac_x_header_dirs; do
7930  if test -r "$ac_dir/X11/Intrinsic.h"; then
7931    ac_x_includes=$ac_dir
7932    break
7933  fi
7934done
7935fi
7936rm -f conftest.err conftest.$ac_ext
7937fi # $ac_x_includes = no
7938
7939if test "$ac_x_libraries" = no; then
7940  # Check for the libraries.
7941  # See if we find them without any special options.
7942  # Don't add to $LIBS permanently.
7943  ac_save_LIBS=$LIBS
7944  LIBS="-lXt $LIBS"
7945  cat >conftest.$ac_ext <<_ACEOF
7946#line 7946 "configure"
7947#include "confdefs.h"
7948#include <X11/Intrinsic.h>
7949int
7950main ()
7951{
7952XtMalloc (0)
7953  ;
7954  return 0;
7955}
7956_ACEOF
7957rm -f conftest.$ac_objext conftest$ac_exeext
7958if { (eval echo "$as_me:7958: \"$ac_link\"") >&5
7959  (eval $ac_link) 2>&5
7960  ac_status=$?
7961  echo "$as_me:7961: \$? = $ac_status" >&5
7962  (exit $ac_status); } &&
7963         { ac_try='test -s conftest$ac_exeext'
7964  { (eval echo "$as_me:7964: \"$ac_try\"") >&5
7965  (eval $ac_try) 2>&5
7966  ac_status=$?
7967  echo "$as_me:7967: \$? = $ac_status" >&5
7968  (exit $ac_status); }; }; then
7969  LIBS=$ac_save_LIBS
7970# We can link X programs with no special library path.
7971ac_x_libraries=
7972else
7973  echo "$as_me: failed program was:" >&5
7974cat conftest.$ac_ext >&5
7975LIBS=$ac_save_LIBS
7976for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7977do
7978  # Don't even attempt the hair of trying to link an X program!
7979  for ac_extension in a so sl dylib dll; do
7980    if test -r $ac_dir/libXt.$ac_extension; then
7981      ac_x_libraries=$ac_dir
7982      break 2
7983    fi
7984  done
7985done
7986fi
7987rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7988fi # $ac_x_libraries = no
7989
7990if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7991  # Didn't find X anywhere.  Cache the known absence of X.
7992  ac_cv_have_x="have_x=no"
7993else
7994  # Record where we found X for the cache.
7995  ac_cv_have_x="have_x=yes \
7996	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7997fi
7998fi
7999
8000  fi
8001  eval "$ac_cv_have_x"
8002fi # $with_x != no
8003
8004if test "$have_x" != yes; then
8005  echo "$as_me:8005: result: $have_x" >&5
8006echo "${ECHO_T}$have_x" >&6
8007  no_x=yes
8008else
8009  # If each of the values was on the command line, it overrides each guess.
8010  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8011  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8012  # Update the cache value to reflect the command line values.
8013  ac_cv_have_x="have_x=yes \
8014		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8015  echo "$as_me:8015: result: libraries $x_libraries, headers $x_includes" >&5
8016echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8017fi
8018
8019if test "$no_x" = yes; then
8020  # Not all programs may use this symbol, but it does not hurt to define it.
8021
8022cat >>confdefs.h <<\EOF
8023#define X_DISPLAY_MISSING 1
8024EOF
8025
8026  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8027else
8028  if test -n "$x_includes"; then
8029    X_CFLAGS="$X_CFLAGS -I$x_includes"
8030  fi
8031
8032  # It would also be nice to do this for all -L options, not just this one.
8033  if test -n "$x_libraries"; then
8034    X_LIBS="$X_LIBS -L$x_libraries"
8035    # For Solaris; some versions of Sun CC require a space after -R and
8036    # others require no space.  Words are not sufficient . . . .
8037    case `(uname -sr) 2>/dev/null` in
8038    "SunOS 5"*)
8039      echo "$as_me:8039: checking whether -R must be followed by a space" >&5
8040echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8041      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8042      cat >conftest.$ac_ext <<_ACEOF
8043#line 8043 "configure"
8044#include "confdefs.h"
8045
8046int
8047main ()
8048{
8049
8050  ;
8051  return 0;
8052}
8053_ACEOF
8054rm -f conftest.$ac_objext conftest$ac_exeext
8055if { (eval echo "$as_me:8055: \"$ac_link\"") >&5
8056  (eval $ac_link) 2>&5
8057  ac_status=$?
8058  echo "$as_me:8058: \$? = $ac_status" >&5
8059  (exit $ac_status); } &&
8060         { ac_try='test -s conftest$ac_exeext'
8061  { (eval echo "$as_me:8061: \"$ac_try\"") >&5
8062  (eval $ac_try) 2>&5
8063  ac_status=$?
8064  echo "$as_me:8064: \$? = $ac_status" >&5
8065  (exit $ac_status); }; }; then
8066  ac_R_nospace=yes
8067else
8068  echo "$as_me: failed program was:" >&5
8069cat conftest.$ac_ext >&5
8070ac_R_nospace=no
8071fi
8072rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8073      if test $ac_R_nospace = yes; then
8074	echo "$as_me:8074: result: no" >&5
8075echo "${ECHO_T}no" >&6
8076	X_LIBS="$X_LIBS -R$x_libraries"
8077      else
8078	LIBS="$ac_xsave_LIBS -R $x_libraries"
8079	cat >conftest.$ac_ext <<_ACEOF
8080#line 8080 "configure"
8081#include "confdefs.h"
8082
8083int
8084main ()
8085{
8086
8087  ;
8088  return 0;
8089}
8090_ACEOF
8091rm -f conftest.$ac_objext conftest$ac_exeext
8092if { (eval echo "$as_me:8092: \"$ac_link\"") >&5
8093  (eval $ac_link) 2>&5
8094  ac_status=$?
8095  echo "$as_me:8095: \$? = $ac_status" >&5
8096  (exit $ac_status); } &&
8097         { ac_try='test -s conftest$ac_exeext'
8098  { (eval echo "$as_me:8098: \"$ac_try\"") >&5
8099  (eval $ac_try) 2>&5
8100  ac_status=$?
8101  echo "$as_me:8101: \$? = $ac_status" >&5
8102  (exit $ac_status); }; }; then
8103  ac_R_space=yes
8104else
8105  echo "$as_me: failed program was:" >&5
8106cat conftest.$ac_ext >&5
8107ac_R_space=no
8108fi
8109rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8110	if test $ac_R_space = yes; then
8111	  echo "$as_me:8111: result: yes" >&5
8112echo "${ECHO_T}yes" >&6
8113	  X_LIBS="$X_LIBS -R $x_libraries"
8114	else
8115	  echo "$as_me:8115: result: neither works" >&5
8116echo "${ECHO_T}neither works" >&6
8117	fi
8118      fi
8119      LIBS=$ac_xsave_LIBS
8120    esac
8121  fi
8122
8123  # Check for system-dependent libraries X programs must link with.
8124  # Do this before checking for the system-independent R6 libraries
8125  # (-lICE), since we may need -lsocket or whatever for X linking.
8126
8127  if test "$ISC" = yes; then
8128    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8129  else
8130    # Martyn Johnson says this is needed for Ultrix, if the X
8131    # libraries were built with DECnet support.  And Karl Berry says
8132    # the Alpha needs dnet_stub (dnet does not exist).
8133    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8134    cat >conftest.$ac_ext <<_ACEOF
8135#line 8135 "configure"
8136#include "confdefs.h"
8137
8138/* Override any gcc2 internal prototype to avoid an error.  */
8139#ifdef __cplusplus
8140extern "C"
8141#endif
8142/* We use char because int might match the return type of a gcc2
8143   builtin and then its argument prototype would still apply.  */
8144char XOpenDisplay ();
8145int
8146main ()
8147{
8148XOpenDisplay ();
8149  ;
8150  return 0;
8151}
8152_ACEOF
8153rm -f conftest.$ac_objext conftest$ac_exeext
8154if { (eval echo "$as_me:8154: \"$ac_link\"") >&5
8155  (eval $ac_link) 2>&5
8156  ac_status=$?
8157  echo "$as_me:8157: \$? = $ac_status" >&5
8158  (exit $ac_status); } &&
8159         { ac_try='test -s conftest$ac_exeext'
8160  { (eval echo "$as_me:8160: \"$ac_try\"") >&5
8161  (eval $ac_try) 2>&5
8162  ac_status=$?
8163  echo "$as_me:8163: \$? = $ac_status" >&5
8164  (exit $ac_status); }; }; then
8165  :
8166else
8167  echo "$as_me: failed program was:" >&5
8168cat conftest.$ac_ext >&5
8169echo "$as_me:8169: checking for dnet_ntoa in -ldnet" >&5
8170echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8171if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8172  echo $ECHO_N "(cached) $ECHO_C" >&6
8173else
8174  ac_check_lib_save_LIBS=$LIBS
8175LIBS="-ldnet  $LIBS"
8176cat >conftest.$ac_ext <<_ACEOF
8177#line 8177 "configure"
8178#include "confdefs.h"
8179
8180/* Override any gcc2 internal prototype to avoid an error.  */
8181#ifdef __cplusplus
8182extern "C"
8183#endif
8184/* We use char because int might match the return type of a gcc2
8185   builtin and then its argument prototype would still apply.  */
8186char dnet_ntoa ();
8187int
8188main ()
8189{
8190dnet_ntoa ();
8191  ;
8192  return 0;
8193}
8194_ACEOF
8195rm -f conftest.$ac_objext conftest$ac_exeext
8196if { (eval echo "$as_me:8196: \"$ac_link\"") >&5
8197  (eval $ac_link) 2>&5
8198  ac_status=$?
8199  echo "$as_me:8199: \$? = $ac_status" >&5
8200  (exit $ac_status); } &&
8201         { ac_try='test -s conftest$ac_exeext'
8202  { (eval echo "$as_me:8202: \"$ac_try\"") >&5
8203  (eval $ac_try) 2>&5
8204  ac_status=$?
8205  echo "$as_me:8205: \$? = $ac_status" >&5
8206  (exit $ac_status); }; }; then
8207  ac_cv_lib_dnet_dnet_ntoa=yes
8208else
8209  echo "$as_me: failed program was:" >&5
8210cat conftest.$ac_ext >&5
8211ac_cv_lib_dnet_dnet_ntoa=no
8212fi
8213rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8214LIBS=$ac_check_lib_save_LIBS
8215fi
8216echo "$as_me:8216: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8217echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8218if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
8219  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8220fi
8221
8222    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8223      echo "$as_me:8223: checking for dnet_ntoa in -ldnet_stub" >&5
8224echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8225if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8226  echo $ECHO_N "(cached) $ECHO_C" >&6
8227else
8228  ac_check_lib_save_LIBS=$LIBS
8229LIBS="-ldnet_stub  $LIBS"
8230cat >conftest.$ac_ext <<_ACEOF
8231#line 8231 "configure"
8232#include "confdefs.h"
8233
8234/* Override any gcc2 internal prototype to avoid an error.  */
8235#ifdef __cplusplus
8236extern "C"
8237#endif
8238/* We use char because int might match the return type of a gcc2
8239   builtin and then its argument prototype would still apply.  */
8240char dnet_ntoa ();
8241int
8242main ()
8243{
8244dnet_ntoa ();
8245  ;
8246  return 0;
8247}
8248_ACEOF
8249rm -f conftest.$ac_objext conftest$ac_exeext
8250if { (eval echo "$as_me:8250: \"$ac_link\"") >&5
8251  (eval $ac_link) 2>&5
8252  ac_status=$?
8253  echo "$as_me:8253: \$? = $ac_status" >&5
8254  (exit $ac_status); } &&
8255         { ac_try='test -s conftest$ac_exeext'
8256  { (eval echo "$as_me:8256: \"$ac_try\"") >&5
8257  (eval $ac_try) 2>&5
8258  ac_status=$?
8259  echo "$as_me:8259: \$? = $ac_status" >&5
8260  (exit $ac_status); }; }; then
8261  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8262else
8263  echo "$as_me: failed program was:" >&5
8264cat conftest.$ac_ext >&5
8265ac_cv_lib_dnet_stub_dnet_ntoa=no
8266fi
8267rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8268LIBS=$ac_check_lib_save_LIBS
8269fi
8270echo "$as_me:8270: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8271echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8272if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
8273  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8274fi
8275
8276    fi
8277fi
8278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8279    LIBS="$ac_xsave_LIBS"
8280
8281    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8282    # to get the SysV transport functions.
8283    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8284    # needs -lnsl.
8285    # The nsl library prevents programs from opening the X display
8286    # on Irix 5.2, according to T.E. Dickey.
8287    # The functions gethostbyname, getservbyname, and inet_addr are
8288    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8289    echo "$as_me:8289: checking for gethostbyname" >&5
8290echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8291if test "${ac_cv_func_gethostbyname+set}" = set; then
8292  echo $ECHO_N "(cached) $ECHO_C" >&6
8293else
8294  cat >conftest.$ac_ext <<_ACEOF
8295#line 8295 "configure"
8296#include "confdefs.h"
8297/* System header to define __stub macros and hopefully few prototypes,
8298    which can conflict with char gethostbyname (); below.  */
8299#include <assert.h>
8300/* Override any gcc2 internal prototype to avoid an error.  */
8301#ifdef __cplusplus
8302extern "C"
8303#endif
8304/* We use char because int might match the return type of a gcc2
8305   builtin and then its argument prototype would still apply.  */
8306char gethostbyname ();
8307char (*f) ();
8308
8309int
8310main ()
8311{
8312/* The GNU C library defines this for functions which it implements
8313    to always fail with ENOSYS.  Some functions are actually named
8314    something starting with __ and the normal name is an alias.  */
8315#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8316choke me
8317#else
8318f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8319#endif
8320
8321  ;
8322  return 0;
8323}
8324_ACEOF
8325rm -f conftest.$ac_objext conftest$ac_exeext
8326if { (eval echo "$as_me:8326: \"$ac_link\"") >&5
8327  (eval $ac_link) 2>&5
8328  ac_status=$?
8329  echo "$as_me:8329: \$? = $ac_status" >&5
8330  (exit $ac_status); } &&
8331         { ac_try='test -s conftest$ac_exeext'
8332  { (eval echo "$as_me:8332: \"$ac_try\"") >&5
8333  (eval $ac_try) 2>&5
8334  ac_status=$?
8335  echo "$as_me:8335: \$? = $ac_status" >&5
8336  (exit $ac_status); }; }; then
8337  ac_cv_func_gethostbyname=yes
8338else
8339  echo "$as_me: failed program was:" >&5
8340cat conftest.$ac_ext >&5
8341ac_cv_func_gethostbyname=no
8342fi
8343rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8344fi
8345echo "$as_me:8345: result: $ac_cv_func_gethostbyname" >&5
8346echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8347
8348    if test $ac_cv_func_gethostbyname = no; then
8349      echo "$as_me:8349: checking for gethostbyname in -lnsl" >&5
8350echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8351if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8352  echo $ECHO_N "(cached) $ECHO_C" >&6
8353else
8354  ac_check_lib_save_LIBS=$LIBS
8355LIBS="-lnsl  $LIBS"
8356cat >conftest.$ac_ext <<_ACEOF
8357#line 8357 "configure"
8358#include "confdefs.h"
8359
8360/* Override any gcc2 internal prototype to avoid an error.  */
8361#ifdef __cplusplus
8362extern "C"
8363#endif
8364/* We use char because int might match the return type of a gcc2
8365   builtin and then its argument prototype would still apply.  */
8366char gethostbyname ();
8367int
8368main ()
8369{
8370gethostbyname ();
8371  ;
8372  return 0;
8373}
8374_ACEOF
8375rm -f conftest.$ac_objext conftest$ac_exeext
8376if { (eval echo "$as_me:8376: \"$ac_link\"") >&5
8377  (eval $ac_link) 2>&5
8378  ac_status=$?
8379  echo "$as_me:8379: \$? = $ac_status" >&5
8380  (exit $ac_status); } &&
8381         { ac_try='test -s conftest$ac_exeext'
8382  { (eval echo "$as_me:8382: \"$ac_try\"") >&5
8383  (eval $ac_try) 2>&5
8384  ac_status=$?
8385  echo "$as_me:8385: \$? = $ac_status" >&5
8386  (exit $ac_status); }; }; then
8387  ac_cv_lib_nsl_gethostbyname=yes
8388else
8389  echo "$as_me: failed program was:" >&5
8390cat conftest.$ac_ext >&5
8391ac_cv_lib_nsl_gethostbyname=no
8392fi
8393rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8394LIBS=$ac_check_lib_save_LIBS
8395fi
8396echo "$as_me:8396: result: $ac_cv_lib_nsl_gethostbyname" >&5
8397echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
8398if test $ac_cv_lib_nsl_gethostbyname = yes; then
8399  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8400fi
8401
8402      if test $ac_cv_lib_nsl_gethostbyname = no; then
8403        echo "$as_me:8403: checking for gethostbyname in -lbsd" >&5
8404echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
8405if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
8406  echo $ECHO_N "(cached) $ECHO_C" >&6
8407else
8408  ac_check_lib_save_LIBS=$LIBS
8409LIBS="-lbsd  $LIBS"
8410cat >conftest.$ac_ext <<_ACEOF
8411#line 8411 "configure"
8412#include "confdefs.h"
8413
8414/* Override any gcc2 internal prototype to avoid an error.  */
8415#ifdef __cplusplus
8416extern "C"
8417#endif
8418/* We use char because int might match the return type of a gcc2
8419   builtin and then its argument prototype would still apply.  */
8420char gethostbyname ();
8421int
8422main ()
8423{
8424gethostbyname ();
8425  ;
8426  return 0;
8427}
8428_ACEOF
8429rm -f conftest.$ac_objext conftest$ac_exeext
8430if { (eval echo "$as_me:8430: \"$ac_link\"") >&5
8431  (eval $ac_link) 2>&5
8432  ac_status=$?
8433  echo "$as_me:8433: \$? = $ac_status" >&5
8434  (exit $ac_status); } &&
8435         { ac_try='test -s conftest$ac_exeext'
8436  { (eval echo "$as_me:8436: \"$ac_try\"") >&5
8437  (eval $ac_try) 2>&5
8438  ac_status=$?
8439  echo "$as_me:8439: \$? = $ac_status" >&5
8440  (exit $ac_status); }; }; then
8441  ac_cv_lib_bsd_gethostbyname=yes
8442else
8443  echo "$as_me: failed program was:" >&5
8444cat conftest.$ac_ext >&5
8445ac_cv_lib_bsd_gethostbyname=no
8446fi
8447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8448LIBS=$ac_check_lib_save_LIBS
8449fi
8450echo "$as_me:8450: result: $ac_cv_lib_bsd_gethostbyname" >&5
8451echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
8452if test $ac_cv_lib_bsd_gethostbyname = yes; then
8453  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8454fi
8455
8456      fi
8457    fi
8458
8459    # lieder@skyler.mavd.honeywell.com says without -lsocket,
8460    # socket/setsockopt and other routines are undefined under SCO ODT
8461    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8462    # on later versions), says Simon Leinen: it contains gethostby*
8463    # variants that don't use the nameserver (or something).  -lsocket
8464    # must be given before -lnsl if both are needed.  We assume that
8465    # if connect needs -lnsl, so does gethostbyname.
8466    echo "$as_me:8466: checking for connect" >&5
8467echo $ECHO_N "checking for connect... $ECHO_C" >&6
8468if test "${ac_cv_func_connect+set}" = set; then
8469  echo $ECHO_N "(cached) $ECHO_C" >&6
8470else
8471  cat >conftest.$ac_ext <<_ACEOF
8472#line 8472 "configure"
8473#include "confdefs.h"
8474/* System header to define __stub macros and hopefully few prototypes,
8475    which can conflict with char connect (); below.  */
8476#include <assert.h>
8477/* Override any gcc2 internal prototype to avoid an error.  */
8478#ifdef __cplusplus
8479extern "C"
8480#endif
8481/* We use char because int might match the return type of a gcc2
8482   builtin and then its argument prototype would still apply.  */
8483char connect ();
8484char (*f) ();
8485
8486int
8487main ()
8488{
8489/* The GNU C library defines this for functions which it implements
8490    to always fail with ENOSYS.  Some functions are actually named
8491    something starting with __ and the normal name is an alias.  */
8492#if defined (__stub_connect) || defined (__stub___connect)
8493choke me
8494#else
8495f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8496#endif
8497
8498  ;
8499  return 0;
8500}
8501_ACEOF
8502rm -f conftest.$ac_objext conftest$ac_exeext
8503if { (eval echo "$as_me:8503: \"$ac_link\"") >&5
8504  (eval $ac_link) 2>&5
8505  ac_status=$?
8506  echo "$as_me:8506: \$? = $ac_status" >&5
8507  (exit $ac_status); } &&
8508         { ac_try='test -s conftest$ac_exeext'
8509  { (eval echo "$as_me:8509: \"$ac_try\"") >&5
8510  (eval $ac_try) 2>&5
8511  ac_status=$?
8512  echo "$as_me:8512: \$? = $ac_status" >&5
8513  (exit $ac_status); }; }; then
8514  ac_cv_func_connect=yes
8515else
8516  echo "$as_me: failed program was:" >&5
8517cat conftest.$ac_ext >&5
8518ac_cv_func_connect=no
8519fi
8520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8521fi
8522echo "$as_me:8522: result: $ac_cv_func_connect" >&5
8523echo "${ECHO_T}$ac_cv_func_connect" >&6
8524
8525    if test $ac_cv_func_connect = no; then
8526      echo "$as_me:8526: checking for connect in -lsocket" >&5
8527echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
8528if test "${ac_cv_lib_socket_connect+set}" = set; then
8529  echo $ECHO_N "(cached) $ECHO_C" >&6
8530else
8531  ac_check_lib_save_LIBS=$LIBS
8532LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8533cat >conftest.$ac_ext <<_ACEOF
8534#line 8534 "configure"
8535#include "confdefs.h"
8536
8537/* Override any gcc2 internal prototype to avoid an error.  */
8538#ifdef __cplusplus
8539extern "C"
8540#endif
8541/* We use char because int might match the return type of a gcc2
8542   builtin and then its argument prototype would still apply.  */
8543char connect ();
8544int
8545main ()
8546{
8547connect ();
8548  ;
8549  return 0;
8550}
8551_ACEOF
8552rm -f conftest.$ac_objext conftest$ac_exeext
8553if { (eval echo "$as_me:8553: \"$ac_link\"") >&5
8554  (eval $ac_link) 2>&5
8555  ac_status=$?
8556  echo "$as_me:8556: \$? = $ac_status" >&5
8557  (exit $ac_status); } &&
8558         { ac_try='test -s conftest$ac_exeext'
8559  { (eval echo "$as_me:8559: \"$ac_try\"") >&5
8560  (eval $ac_try) 2>&5
8561  ac_status=$?
8562  echo "$as_me:8562: \$? = $ac_status" >&5
8563  (exit $ac_status); }; }; then
8564  ac_cv_lib_socket_connect=yes
8565else
8566  echo "$as_me: failed program was:" >&5
8567cat conftest.$ac_ext >&5
8568ac_cv_lib_socket_connect=no
8569fi
8570rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8571LIBS=$ac_check_lib_save_LIBS
8572fi
8573echo "$as_me:8573: result: $ac_cv_lib_socket_connect" >&5
8574echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
8575if test $ac_cv_lib_socket_connect = yes; then
8576  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8577fi
8578
8579    fi
8580
8581    # Guillermo Gomez says -lposix is necessary on A/UX.
8582    echo "$as_me:8582: checking for remove" >&5
8583echo $ECHO_N "checking for remove... $ECHO_C" >&6
8584if test "${ac_cv_func_remove+set}" = set; then
8585  echo $ECHO_N "(cached) $ECHO_C" >&6
8586else
8587  cat >conftest.$ac_ext <<_ACEOF
8588#line 8588 "configure"
8589#include "confdefs.h"
8590/* System header to define __stub macros and hopefully few prototypes,
8591    which can conflict with char remove (); below.  */
8592#include <assert.h>
8593/* Override any gcc2 internal prototype to avoid an error.  */
8594#ifdef __cplusplus
8595extern "C"
8596#endif
8597/* We use char because int might match the return type of a gcc2
8598   builtin and then its argument prototype would still apply.  */
8599char remove ();
8600char (*f) ();
8601
8602int
8603main ()
8604{
8605/* The GNU C library defines this for functions which it implements
8606    to always fail with ENOSYS.  Some functions are actually named
8607    something starting with __ and the normal name is an alias.  */
8608#if defined (__stub_remove) || defined (__stub___remove)
8609choke me
8610#else
8611f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8612#endif
8613
8614  ;
8615  return 0;
8616}
8617_ACEOF
8618rm -f conftest.$ac_objext conftest$ac_exeext
8619if { (eval echo "$as_me:8619: \"$ac_link\"") >&5
8620  (eval $ac_link) 2>&5
8621  ac_status=$?
8622  echo "$as_me:8622: \$? = $ac_status" >&5
8623  (exit $ac_status); } &&
8624         { ac_try='test -s conftest$ac_exeext'
8625  { (eval echo "$as_me:8625: \"$ac_try\"") >&5
8626  (eval $ac_try) 2>&5
8627  ac_status=$?
8628  echo "$as_me:8628: \$? = $ac_status" >&5
8629  (exit $ac_status); }; }; then
8630  ac_cv_func_remove=yes
8631else
8632  echo "$as_me: failed program was:" >&5
8633cat conftest.$ac_ext >&5
8634ac_cv_func_remove=no
8635fi
8636rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8637fi
8638echo "$as_me:8638: result: $ac_cv_func_remove" >&5
8639echo "${ECHO_T}$ac_cv_func_remove" >&6
8640
8641    if test $ac_cv_func_remove = no; then
8642      echo "$as_me:8642: checking for remove in -lposix" >&5
8643echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
8644if test "${ac_cv_lib_posix_remove+set}" = set; then
8645  echo $ECHO_N "(cached) $ECHO_C" >&6
8646else
8647  ac_check_lib_save_LIBS=$LIBS
8648LIBS="-lposix  $LIBS"
8649cat >conftest.$ac_ext <<_ACEOF
8650#line 8650 "configure"
8651#include "confdefs.h"
8652
8653/* Override any gcc2 internal prototype to avoid an error.  */
8654#ifdef __cplusplus
8655extern "C"
8656#endif
8657/* We use char because int might match the return type of a gcc2
8658   builtin and then its argument prototype would still apply.  */
8659char remove ();
8660int
8661main ()
8662{
8663remove ();
8664  ;
8665  return 0;
8666}
8667_ACEOF
8668rm -f conftest.$ac_objext conftest$ac_exeext
8669if { (eval echo "$as_me:8669: \"$ac_link\"") >&5
8670  (eval $ac_link) 2>&5
8671  ac_status=$?
8672  echo "$as_me:8672: \$? = $ac_status" >&5
8673  (exit $ac_status); } &&
8674         { ac_try='test -s conftest$ac_exeext'
8675  { (eval echo "$as_me:8675: \"$ac_try\"") >&5
8676  (eval $ac_try) 2>&5
8677  ac_status=$?
8678  echo "$as_me:8678: \$? = $ac_status" >&5
8679  (exit $ac_status); }; }; then
8680  ac_cv_lib_posix_remove=yes
8681else
8682  echo "$as_me: failed program was:" >&5
8683cat conftest.$ac_ext >&5
8684ac_cv_lib_posix_remove=no
8685fi
8686rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8687LIBS=$ac_check_lib_save_LIBS
8688fi
8689echo "$as_me:8689: result: $ac_cv_lib_posix_remove" >&5
8690echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
8691if test $ac_cv_lib_posix_remove = yes; then
8692  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8693fi
8694
8695    fi
8696
8697    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8698    echo "$as_me:8698: checking for shmat" >&5
8699echo $ECHO_N "checking for shmat... $ECHO_C" >&6
8700if test "${ac_cv_func_shmat+set}" = set; then
8701  echo $ECHO_N "(cached) $ECHO_C" >&6
8702else
8703  cat >conftest.$ac_ext <<_ACEOF
8704#line 8704 "configure"
8705#include "confdefs.h"
8706/* System header to define __stub macros and hopefully few prototypes,
8707    which can conflict with char shmat (); below.  */
8708#include <assert.h>
8709/* Override any gcc2 internal prototype to avoid an error.  */
8710#ifdef __cplusplus
8711extern "C"
8712#endif
8713/* We use char because int might match the return type of a gcc2
8714   builtin and then its argument prototype would still apply.  */
8715char shmat ();
8716char (*f) ();
8717
8718int
8719main ()
8720{
8721/* The GNU C library defines this for functions which it implements
8722    to always fail with ENOSYS.  Some functions are actually named
8723    something starting with __ and the normal name is an alias.  */
8724#if defined (__stub_shmat) || defined (__stub___shmat)
8725choke me
8726#else
8727f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8728#endif
8729
8730  ;
8731  return 0;
8732}
8733_ACEOF
8734rm -f conftest.$ac_objext conftest$ac_exeext
8735if { (eval echo "$as_me:8735: \"$ac_link\"") >&5
8736  (eval $ac_link) 2>&5
8737  ac_status=$?
8738  echo "$as_me:8738: \$? = $ac_status" >&5
8739  (exit $ac_status); } &&
8740         { ac_try='test -s conftest$ac_exeext'
8741  { (eval echo "$as_me:8741: \"$ac_try\"") >&5
8742  (eval $ac_try) 2>&5
8743  ac_status=$?
8744  echo "$as_me:8744: \$? = $ac_status" >&5
8745  (exit $ac_status); }; }; then
8746  ac_cv_func_shmat=yes
8747else
8748  echo "$as_me: failed program was:" >&5
8749cat conftest.$ac_ext >&5
8750ac_cv_func_shmat=no
8751fi
8752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8753fi
8754echo "$as_me:8754: result: $ac_cv_func_shmat" >&5
8755echo "${ECHO_T}$ac_cv_func_shmat" >&6
8756
8757    if test $ac_cv_func_shmat = no; then
8758      echo "$as_me:8758: checking for shmat in -lipc" >&5
8759echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
8760if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8761  echo $ECHO_N "(cached) $ECHO_C" >&6
8762else
8763  ac_check_lib_save_LIBS=$LIBS
8764LIBS="-lipc  $LIBS"
8765cat >conftest.$ac_ext <<_ACEOF
8766#line 8766 "configure"
8767#include "confdefs.h"
8768
8769/* Override any gcc2 internal prototype to avoid an error.  */
8770#ifdef __cplusplus
8771extern "C"
8772#endif
8773/* We use char because int might match the return type of a gcc2
8774   builtin and then its argument prototype would still apply.  */
8775char shmat ();
8776int
8777main ()
8778{
8779shmat ();
8780  ;
8781  return 0;
8782}
8783_ACEOF
8784rm -f conftest.$ac_objext conftest$ac_exeext
8785if { (eval echo "$as_me:8785: \"$ac_link\"") >&5
8786  (eval $ac_link) 2>&5
8787  ac_status=$?
8788  echo "$as_me:8788: \$? = $ac_status" >&5
8789  (exit $ac_status); } &&
8790         { ac_try='test -s conftest$ac_exeext'
8791  { (eval echo "$as_me:8791: \"$ac_try\"") >&5
8792  (eval $ac_try) 2>&5
8793  ac_status=$?
8794  echo "$as_me:8794: \$? = $ac_status" >&5
8795  (exit $ac_status); }; }; then
8796  ac_cv_lib_ipc_shmat=yes
8797else
8798  echo "$as_me: failed program was:" >&5
8799cat conftest.$ac_ext >&5
8800ac_cv_lib_ipc_shmat=no
8801fi
8802rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8803LIBS=$ac_check_lib_save_LIBS
8804fi
8805echo "$as_me:8805: result: $ac_cv_lib_ipc_shmat" >&5
8806echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
8807if test $ac_cv_lib_ipc_shmat = yes; then
8808  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8809fi
8810
8811    fi
8812  fi
8813
8814  # Check for libraries that X11R6 Xt/Xaw programs need.
8815  ac_save_LDFLAGS=$LDFLAGS
8816  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8817  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8818  # check for ICE first), but we must link in the order -lSM -lICE or
8819  # we get undefined symbols.  So assume we have SM if we have ICE.
8820  # These have to be linked with before -lX11, unlike the other
8821  # libraries we check for below, so use a different variable.
8822  # John Interrante, Karl Berry
8823  echo "$as_me:8823: checking for IceConnectionNumber in -lICE" >&5
8824echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
8825if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8826  echo $ECHO_N "(cached) $ECHO_C" >&6
8827else
8828  ac_check_lib_save_LIBS=$LIBS
8829LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8830cat >conftest.$ac_ext <<_ACEOF
8831#line 8831 "configure"
8832#include "confdefs.h"
8833
8834/* Override any gcc2 internal prototype to avoid an error.  */
8835#ifdef __cplusplus
8836extern "C"
8837#endif
8838/* We use char because int might match the return type of a gcc2
8839   builtin and then its argument prototype would still apply.  */
8840char IceConnectionNumber ();
8841int
8842main ()
8843{
8844IceConnectionNumber ();
8845  ;
8846  return 0;
8847}
8848_ACEOF
8849rm -f conftest.$ac_objext conftest$ac_exeext
8850if { (eval echo "$as_me:8850: \"$ac_link\"") >&5
8851  (eval $ac_link) 2>&5
8852  ac_status=$?
8853  echo "$as_me:8853: \$? = $ac_status" >&5
8854  (exit $ac_status); } &&
8855         { ac_try='test -s conftest$ac_exeext'
8856  { (eval echo "$as_me:8856: \"$ac_try\"") >&5
8857  (eval $ac_try) 2>&5
8858  ac_status=$?
8859  echo "$as_me:8859: \$? = $ac_status" >&5
8860  (exit $ac_status); }; }; then
8861  ac_cv_lib_ICE_IceConnectionNumber=yes
8862else
8863  echo "$as_me: failed program was:" >&5
8864cat conftest.$ac_ext >&5
8865ac_cv_lib_ICE_IceConnectionNumber=no
8866fi
8867rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8868LIBS=$ac_check_lib_save_LIBS
8869fi
8870echo "$as_me:8870: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8871echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
8872if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8873  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8874fi
8875
8876  LDFLAGS=$ac_save_LDFLAGS
8877
8878fi
8879
8880echo "$as_me:8880: checking if you want to use pkg-config" >&5
8881echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
8882
8883# Check whether --with-pkg-config or --without-pkg-config was given.
8884if test "${with_pkg_config+set}" = set; then
8885  withval="$with_pkg_config"
8886  cf_pkg_config=$withval
8887else
8888  cf_pkg_config=yes
8889fi;
8890echo "$as_me:8890: result: $cf_pkg_config" >&5
8891echo "${ECHO_T}$cf_pkg_config" >&6
8892
8893case $cf_pkg_config in
8894(no)
8895	PKG_CONFIG=none
8896	;;
8897(yes)
8898
8899if test -n "$ac_tool_prefix"; then
8900  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
8901set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
8902echo "$as_me:8902: checking for $ac_word" >&5
8903echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8904if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
8905  echo $ECHO_N "(cached) $ECHO_C" >&6
8906else
8907  case $PKG_CONFIG in
8908  [\\/]* | ?:[\\/]*)
8909  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
8910  ;;
8911  *)
8912  ac_save_IFS=$IFS; IFS=$ac_path_separator
8913ac_dummy="$PATH"
8914for ac_dir in $ac_dummy; do
8915  IFS=$ac_save_IFS
8916  test -z "$ac_dir" && ac_dir=.
8917  if $as_executable_p "$ac_dir/$ac_word"; then
8918   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
8919   echo "$as_me:8919: found $ac_dir/$ac_word" >&5
8920   break
8921fi
8922done
8923
8924  ;;
8925esac
8926fi
8927PKG_CONFIG=$ac_cv_path_PKG_CONFIG
8928
8929if test -n "$PKG_CONFIG"; then
8930  echo "$as_me:8930: result: $PKG_CONFIG" >&5
8931echo "${ECHO_T}$PKG_CONFIG" >&6
8932else
8933  echo "$as_me:8933: result: no" >&5
8934echo "${ECHO_T}no" >&6
8935fi
8936
8937fi
8938if test -z "$ac_cv_path_PKG_CONFIG"; then
8939  ac_pt_PKG_CONFIG=$PKG_CONFIG
8940  # Extract the first word of "pkg-config", so it can be a program name with args.
8941set dummy pkg-config; ac_word=$2
8942echo "$as_me:8942: checking for $ac_word" >&5
8943echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8944if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
8945  echo $ECHO_N "(cached) $ECHO_C" >&6
8946else
8947  case $ac_pt_PKG_CONFIG in
8948  [\\/]* | ?:[\\/]*)
8949  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
8950  ;;
8951  *)
8952  ac_save_IFS=$IFS; IFS=$ac_path_separator
8953ac_dummy="$PATH"
8954for ac_dir in $ac_dummy; do
8955  IFS=$ac_save_IFS
8956  test -z "$ac_dir" && ac_dir=.
8957  if $as_executable_p "$ac_dir/$ac_word"; then
8958   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
8959   echo "$as_me:8959: found $ac_dir/$ac_word" >&5
8960   break
8961fi
8962done
8963
8964  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
8965  ;;
8966esac
8967fi
8968ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
8969
8970if test -n "$ac_pt_PKG_CONFIG"; then
8971  echo "$as_me:8971: result: $ac_pt_PKG_CONFIG" >&5
8972echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
8973else
8974  echo "$as_me:8974: result: no" >&5
8975echo "${ECHO_T}no" >&6
8976fi
8977
8978  PKG_CONFIG=$ac_pt_PKG_CONFIG
8979else
8980  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
8981fi
8982
8983	;;
8984(*)
8985	PKG_CONFIG=$withval
8986	;;
8987esac
8988
8989test -z "$PKG_CONFIG" && PKG_CONFIG=none
8990if test "$PKG_CONFIG" != none ; then
8991
8992if test "x$prefix" != xNONE; then
8993  cf_path_syntax="$prefix"
8994else
8995  cf_path_syntax="$ac_default_prefix"
8996fi
8997
8998case ".$PKG_CONFIG" in
8999(.\$\(*\)*|.\'*\'*)
9000  ;;
9001(..|./*|.\\*)
9002  ;;
9003(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9004  ;;
9005(.\${*prefix}*|.\${*dir}*)
9006  eval PKG_CONFIG="$PKG_CONFIG"
9007  case ".$PKG_CONFIG" in
9008  (.NONE/*)
9009    PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9010    ;;
9011  esac
9012  ;;
9013(.no|.NONE/*)
9014  PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9015  ;;
9016(*)
9017  { { echo "$as_me:9017: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9018echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9019   { (exit 1); exit 1; }; }
9020  ;;
9021esac
9022
9023else
9024	{ echo "$as_me:9024: WARNING: pkg-config is not installed" >&5
9025echo "$as_me: WARNING: pkg-config is not installed" >&2;}
9026fi
9027
9028# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
9029# in some cases has installed dummy files in the former, other cases replaced
9030# it with a link to the new location).  This complicates the configure script.
9031# Check for that pitfall, and recover using pkg-config
9032#
9033# If none of these are set, the configuration is almost certainly broken.
9034if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
9035then
9036
9037if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9038	test -n "$verbose" && echo "	found package x11" 1>&6
9039
9040echo "${as_me:-configure}:9040: testing found package x11 ..." 1>&5
9041
9042	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
9043	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
9044	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
9045
9046echo "${as_me:-configure}:9046: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9047
9048	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
9049
9050echo "${as_me:-configure}:9050: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
9051
9052cf_fix_cppflags=no
9053cf_new_cflags=
9054cf_new_cppflags=
9055cf_new_extra_cppflags=
9056
9057for cf_add_cflags in $cf_pkgconfig_incs
9058do
9059case $cf_fix_cppflags in
9060(no)
9061	case $cf_add_cflags in
9062	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9063		case $cf_add_cflags in
9064		(-D*)
9065			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9066
9067			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9068				&& test -z "${cf_tst_cflags}" \
9069				&& cf_fix_cppflags=yes
9070
9071			if test $cf_fix_cppflags = yes ; then
9072				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9073				continue
9074			elif test "${cf_tst_cflags}" = "\"'" ; then
9075				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9076				continue
9077			fi
9078			;;
9079		esac
9080		case "$CPPFLAGS" in
9081		(*$cf_add_cflags)
9082			;;
9083		(*)
9084			case $cf_add_cflags in
9085			(-D*)
9086				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9087
9088CPPFLAGS=`echo "$CPPFLAGS" | \
9089	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9090		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9091
9092				;;
9093			esac
9094			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9095			;;
9096		esac
9097		;;
9098	(*)
9099		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9100		;;
9101	esac
9102	;;
9103(yes)
9104	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9105
9106	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9107
9108	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9109		&& test -z "${cf_tst_cflags}" \
9110		&& cf_fix_cppflags=no
9111	;;
9112esac
9113done
9114
9115if test -n "$cf_new_cflags" ; then
9116
9117	CFLAGS="$CFLAGS $cf_new_cflags"
9118fi
9119
9120if test -n "$cf_new_cppflags" ; then
9121
9122	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9123fi
9124
9125if test -n "$cf_new_extra_cppflags" ; then
9126
9127	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9128fi
9129
9130cf_add_libs="$cf_pkgconfig_libs"
9131# Filter out duplicates - this happens with badly-designed ".pc" files...
9132for cf_add_1lib in $LIBS
9133do
9134	for cf_add_2lib in $cf_add_libs
9135	do
9136		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9137		then
9138			cf_add_1lib=
9139			break
9140		fi
9141	done
9142	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9143done
9144LIBS="$cf_add_libs"
9145
9146	:
9147else
9148	cf_pkgconfig_incs=
9149	cf_pkgconfig_libs=
9150	{ echo "$as_me:9150: WARNING: unable to find X11 library" >&5
9151echo "$as_me: WARNING: unable to find X11 library" >&2;}
9152fi
9153
9154if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
9155	test -n "$verbose" && echo "	found package ice" 1>&6
9156
9157echo "${as_me:-configure}:9157: testing found package ice ..." 1>&5
9158
9159	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
9160	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
9161	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
9162
9163echo "${as_me:-configure}:9163: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9164
9165	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
9166
9167echo "${as_me:-configure}:9167: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
9168
9169cf_fix_cppflags=no
9170cf_new_cflags=
9171cf_new_cppflags=
9172cf_new_extra_cppflags=
9173
9174for cf_add_cflags in $cf_pkgconfig_incs
9175do
9176case $cf_fix_cppflags in
9177(no)
9178	case $cf_add_cflags in
9179	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9180		case $cf_add_cflags in
9181		(-D*)
9182			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9183
9184			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9185				&& test -z "${cf_tst_cflags}" \
9186				&& cf_fix_cppflags=yes
9187
9188			if test $cf_fix_cppflags = yes ; then
9189				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9190				continue
9191			elif test "${cf_tst_cflags}" = "\"'" ; then
9192				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9193				continue
9194			fi
9195			;;
9196		esac
9197		case "$CPPFLAGS" in
9198		(*$cf_add_cflags)
9199			;;
9200		(*)
9201			case $cf_add_cflags in
9202			(-D*)
9203				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9204
9205CPPFLAGS=`echo "$CPPFLAGS" | \
9206	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9207		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9208
9209				;;
9210			esac
9211			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9212			;;
9213		esac
9214		;;
9215	(*)
9216		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9217		;;
9218	esac
9219	;;
9220(yes)
9221	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9222
9223	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9224
9225	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9226		&& test -z "${cf_tst_cflags}" \
9227		&& cf_fix_cppflags=no
9228	;;
9229esac
9230done
9231
9232if test -n "$cf_new_cflags" ; then
9233
9234	CFLAGS="$CFLAGS $cf_new_cflags"
9235fi
9236
9237if test -n "$cf_new_cppflags" ; then
9238
9239	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9240fi
9241
9242if test -n "$cf_new_extra_cppflags" ; then
9243
9244	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9245fi
9246
9247cf_add_libs="$cf_pkgconfig_libs"
9248# Filter out duplicates - this happens with badly-designed ".pc" files...
9249for cf_add_1lib in $LIBS
9250do
9251	for cf_add_2lib in $cf_add_libs
9252	do
9253		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9254		then
9255			cf_add_1lib=
9256			break
9257		fi
9258	done
9259	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9260done
9261LIBS="$cf_add_libs"
9262
9263	:
9264else
9265	cf_pkgconfig_incs=
9266	cf_pkgconfig_libs=
9267	{ echo "$as_me:9267: WARNING: unable to find ICE library" >&5
9268echo "$as_me: WARNING: unable to find ICE library" >&2;}
9269fi
9270
9271if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
9272	test -n "$verbose" && echo "	found package sm" 1>&6
9273
9274echo "${as_me:-configure}:9274: testing found package sm ..." 1>&5
9275
9276	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
9277	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
9278	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
9279
9280echo "${as_me:-configure}:9280: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9281
9282	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
9283
9284echo "${as_me:-configure}:9284: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
9285
9286cf_fix_cppflags=no
9287cf_new_cflags=
9288cf_new_cppflags=
9289cf_new_extra_cppflags=
9290
9291for cf_add_cflags in $cf_pkgconfig_incs
9292do
9293case $cf_fix_cppflags in
9294(no)
9295	case $cf_add_cflags in
9296	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9297		case $cf_add_cflags in
9298		(-D*)
9299			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9300
9301			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9302				&& test -z "${cf_tst_cflags}" \
9303				&& cf_fix_cppflags=yes
9304
9305			if test $cf_fix_cppflags = yes ; then
9306				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9307				continue
9308			elif test "${cf_tst_cflags}" = "\"'" ; then
9309				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9310				continue
9311			fi
9312			;;
9313		esac
9314		case "$CPPFLAGS" in
9315		(*$cf_add_cflags)
9316			;;
9317		(*)
9318			case $cf_add_cflags in
9319			(-D*)
9320				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9321
9322CPPFLAGS=`echo "$CPPFLAGS" | \
9323	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9324		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9325
9326				;;
9327			esac
9328			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9329			;;
9330		esac
9331		;;
9332	(*)
9333		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9334		;;
9335	esac
9336	;;
9337(yes)
9338	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9339
9340	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9341
9342	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9343		&& test -z "${cf_tst_cflags}" \
9344		&& cf_fix_cppflags=no
9345	;;
9346esac
9347done
9348
9349if test -n "$cf_new_cflags" ; then
9350
9351	CFLAGS="$CFLAGS $cf_new_cflags"
9352fi
9353
9354if test -n "$cf_new_cppflags" ; then
9355
9356	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9357fi
9358
9359if test -n "$cf_new_extra_cppflags" ; then
9360
9361	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9362fi
9363
9364cf_add_libs="$cf_pkgconfig_libs"
9365# Filter out duplicates - this happens with badly-designed ".pc" files...
9366for cf_add_1lib in $LIBS
9367do
9368	for cf_add_2lib in $cf_add_libs
9369	do
9370		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9371		then
9372			cf_add_1lib=
9373			break
9374		fi
9375	done
9376	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9377done
9378LIBS="$cf_add_libs"
9379
9380	:
9381else
9382	cf_pkgconfig_incs=
9383	cf_pkgconfig_libs=
9384	{ echo "$as_me:9384: WARNING: unable to find SM library" >&5
9385echo "$as_me: WARNING: unable to find SM library" >&2;}
9386fi
9387
9388if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
9389	test -n "$verbose" && echo "	found package xt" 1>&6
9390
9391echo "${as_me:-configure}:9391: testing found package xt ..." 1>&5
9392
9393	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
9394	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
9395	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
9396
9397echo "${as_me:-configure}:9397: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9398
9399	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
9400
9401echo "${as_me:-configure}:9401: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
9402
9403cf_fix_cppflags=no
9404cf_new_cflags=
9405cf_new_cppflags=
9406cf_new_extra_cppflags=
9407
9408for cf_add_cflags in $cf_pkgconfig_incs
9409do
9410case $cf_fix_cppflags in
9411(no)
9412	case $cf_add_cflags in
9413	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9414		case $cf_add_cflags in
9415		(-D*)
9416			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9417
9418			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9419				&& test -z "${cf_tst_cflags}" \
9420				&& cf_fix_cppflags=yes
9421
9422			if test $cf_fix_cppflags = yes ; then
9423				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9424				continue
9425			elif test "${cf_tst_cflags}" = "\"'" ; then
9426				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9427				continue
9428			fi
9429			;;
9430		esac
9431		case "$CPPFLAGS" in
9432		(*$cf_add_cflags)
9433			;;
9434		(*)
9435			case $cf_add_cflags in
9436			(-D*)
9437				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9438
9439CPPFLAGS=`echo "$CPPFLAGS" | \
9440	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9441		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9442
9443				;;
9444			esac
9445			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9446			;;
9447		esac
9448		;;
9449	(*)
9450		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9451		;;
9452	esac
9453	;;
9454(yes)
9455	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9456
9457	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9458
9459	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9460		&& test -z "${cf_tst_cflags}" \
9461		&& cf_fix_cppflags=no
9462	;;
9463esac
9464done
9465
9466if test -n "$cf_new_cflags" ; then
9467
9468	CFLAGS="$CFLAGS $cf_new_cflags"
9469fi
9470
9471if test -n "$cf_new_cppflags" ; then
9472
9473	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9474fi
9475
9476if test -n "$cf_new_extra_cppflags" ; then
9477
9478	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9479fi
9480
9481cf_add_libs="$cf_pkgconfig_libs"
9482# Filter out duplicates - this happens with badly-designed ".pc" files...
9483for cf_add_1lib in $LIBS
9484do
9485	for cf_add_2lib in $cf_add_libs
9486	do
9487		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9488		then
9489			cf_add_1lib=
9490			break
9491		fi
9492	done
9493	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9494done
9495LIBS="$cf_add_libs"
9496
9497	:
9498else
9499	cf_pkgconfig_incs=
9500	cf_pkgconfig_libs=
9501	{ echo "$as_me:9501: WARNING: unable to find Xt library" >&5
9502echo "$as_me: WARNING: unable to find Xt library" >&2;}
9503fi
9504
9505fi
9506
9507cf_have_X_LIBS=no
9508
9509if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
9510	test -n "$verbose" && echo "	found package xt" 1>&6
9511
9512echo "${as_me:-configure}:9512: testing found package xt ..." 1>&5
9513
9514	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
9515	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
9516	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
9517
9518echo "${as_me:-configure}:9518: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9519
9520	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
9521
9522echo "${as_me:-configure}:9522: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
9523
9524cf_fix_cppflags=no
9525cf_new_cflags=
9526cf_new_cppflags=
9527cf_new_extra_cppflags=
9528
9529for cf_add_cflags in $cf_pkgconfig_incs
9530do
9531case $cf_fix_cppflags in
9532(no)
9533	case $cf_add_cflags in
9534	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9535		case $cf_add_cflags in
9536		(-D*)
9537			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9538
9539			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9540				&& test -z "${cf_tst_cflags}" \
9541				&& cf_fix_cppflags=yes
9542
9543			if test $cf_fix_cppflags = yes ; then
9544				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9545				continue
9546			elif test "${cf_tst_cflags}" = "\"'" ; then
9547				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9548				continue
9549			fi
9550			;;
9551		esac
9552		case "$CPPFLAGS" in
9553		(*$cf_add_cflags)
9554			;;
9555		(*)
9556			case $cf_add_cflags in
9557			(-D*)
9558				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9559
9560CPPFLAGS=`echo "$CPPFLAGS" | \
9561	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9562		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9563
9564				;;
9565			esac
9566			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9567			;;
9568		esac
9569		;;
9570	(*)
9571		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9572		;;
9573	esac
9574	;;
9575(yes)
9576	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9577
9578	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9579
9580	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9581		&& test -z "${cf_tst_cflags}" \
9582		&& cf_fix_cppflags=no
9583	;;
9584esac
9585done
9586
9587if test -n "$cf_new_cflags" ; then
9588
9589	CFLAGS="$CFLAGS $cf_new_cflags"
9590fi
9591
9592if test -n "$cf_new_cppflags" ; then
9593
9594	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9595fi
9596
9597if test -n "$cf_new_extra_cppflags" ; then
9598
9599	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9600fi
9601
9602cf_add_libs="$cf_pkgconfig_libs"
9603# Filter out duplicates - this happens with badly-designed ".pc" files...
9604for cf_add_1lib in $LIBS
9605do
9606	for cf_add_2lib in $cf_add_libs
9607	do
9608		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9609		then
9610			cf_add_1lib=
9611			break
9612		fi
9613	done
9614	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9615done
9616LIBS="$cf_add_libs"
9617
9618	case "x$LIBS" in
9619	(*-lX11*)
9620		;;
9621	(*)
9622# we have an "xt" package, but it may omit Xt's dependency on X11
9623echo "$as_me:9623: checking for usable X dependency" >&5
9624echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
9625if test "${cf_cv_xt_x11_compat+set}" = set; then
9626  echo $ECHO_N "(cached) $ECHO_C" >&6
9627else
9628
9629cat >conftest.$ac_ext <<_ACEOF
9630#line 9630 "configure"
9631#include "confdefs.h"
9632
9633#include <X11/Xlib.h>
9634
9635int
9636main ()
9637{
9638
9639	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
9640	int rc2 = XClearWindow((Display*) 0, (Window) 0);
9641	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
9642	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
9643
9644  ;
9645  return 0;
9646}
9647_ACEOF
9648rm -f conftest.$ac_objext conftest$ac_exeext
9649if { (eval echo "$as_me:9649: \"$ac_link\"") >&5
9650  (eval $ac_link) 2>&5
9651  ac_status=$?
9652  echo "$as_me:9652: \$? = $ac_status" >&5
9653  (exit $ac_status); } &&
9654         { ac_try='test -s conftest$ac_exeext'
9655  { (eval echo "$as_me:9655: \"$ac_try\"") >&5
9656  (eval $ac_try) 2>&5
9657  ac_status=$?
9658  echo "$as_me:9658: \$? = $ac_status" >&5
9659  (exit $ac_status); }; }; then
9660  cf_cv_xt_x11_compat=yes
9661else
9662  echo "$as_me: failed program was:" >&5
9663cat conftest.$ac_ext >&5
9664cf_cv_xt_x11_compat=no
9665fi
9666rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9667fi
9668echo "$as_me:9668: result: $cf_cv_xt_x11_compat" >&5
9669echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
9670		if test "$cf_cv_xt_x11_compat" = no
9671		then
9672			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
9673
9674echo "${as_me:-configure}:9674: testing work around broken X11 dependency ..." 1>&5
9675
9676			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
9677
9678if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9679	test -n "$verbose" && echo "	found package x11" 1>&6
9680
9681echo "${as_me:-configure}:9681: testing found package x11 ..." 1>&5
9682
9683	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
9684	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
9685	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
9686
9687echo "${as_me:-configure}:9687: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9688
9689	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
9690
9691echo "${as_me:-configure}:9691: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
9692
9693cf_fix_cppflags=no
9694cf_new_cflags=
9695cf_new_cppflags=
9696cf_new_extra_cppflags=
9697
9698for cf_add_cflags in $cf_pkgconfig_incs
9699do
9700case $cf_fix_cppflags in
9701(no)
9702	case $cf_add_cflags in
9703	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9704		case $cf_add_cflags in
9705		(-D*)
9706			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9707
9708			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9709				&& test -z "${cf_tst_cflags}" \
9710				&& cf_fix_cppflags=yes
9711
9712			if test $cf_fix_cppflags = yes ; then
9713				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9714				continue
9715			elif test "${cf_tst_cflags}" = "\"'" ; then
9716				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9717				continue
9718			fi
9719			;;
9720		esac
9721		case "$CPPFLAGS" in
9722		(*$cf_add_cflags)
9723			;;
9724		(*)
9725			case $cf_add_cflags in
9726			(-D*)
9727				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9728
9729CPPFLAGS=`echo "$CPPFLAGS" | \
9730	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9731		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9732
9733				;;
9734			esac
9735			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9736			;;
9737		esac
9738		;;
9739	(*)
9740		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9741		;;
9742	esac
9743	;;
9744(yes)
9745	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9746
9747	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9748
9749	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9750		&& test -z "${cf_tst_cflags}" \
9751		&& cf_fix_cppflags=no
9752	;;
9753esac
9754done
9755
9756if test -n "$cf_new_cflags" ; then
9757
9758	CFLAGS="$CFLAGS $cf_new_cflags"
9759fi
9760
9761if test -n "$cf_new_cppflags" ; then
9762
9763	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9764fi
9765
9766if test -n "$cf_new_extra_cppflags" ; then
9767
9768	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9769fi
9770
9771cf_add_libs="$cf_pkgconfig_libs"
9772# Filter out duplicates - this happens with badly-designed ".pc" files...
9773for cf_add_1lib in $LIBS
9774do
9775	for cf_add_2lib in $cf_add_libs
9776	do
9777		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9778		then
9779			cf_add_1lib=
9780			break
9781		fi
9782	done
9783	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9784done
9785LIBS="$cf_add_libs"
9786
9787	:
9788else
9789	cf_pkgconfig_incs=
9790	cf_pkgconfig_libs=
9791
9792test -n "$verbose" && echo "	...before $LIBS" 1>&6
9793
9794echo "${as_me:-configure}:9794: testing ...before $LIBS ..." 1>&5
9795
9796LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
9797test -n "$verbose" && echo "	...after  $LIBS" 1>&6
9798
9799echo "${as_me:-configure}:9799: testing ...after  $LIBS ..." 1>&5
9800
9801fi
9802
9803		fi
9804		;;
9805	esac
9806
9807echo "$as_me:9807: checking for usable X Toolkit package" >&5
9808echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
9809if test "${cf_cv_xt_ice_compat+set}" = set; then
9810  echo $ECHO_N "(cached) $ECHO_C" >&6
9811else
9812
9813cat >conftest.$ac_ext <<_ACEOF
9814#line 9814 "configure"
9815#include "confdefs.h"
9816
9817#include <X11/Shell.h>
9818
9819int
9820main ()
9821{
9822int num = IceConnectionNumber(0)
9823
9824  ;
9825  return 0;
9826}
9827_ACEOF
9828rm -f conftest.$ac_objext conftest$ac_exeext
9829if { (eval echo "$as_me:9829: \"$ac_link\"") >&5
9830  (eval $ac_link) 2>&5
9831  ac_status=$?
9832  echo "$as_me:9832: \$? = $ac_status" >&5
9833  (exit $ac_status); } &&
9834         { ac_try='test -s conftest$ac_exeext'
9835  { (eval echo "$as_me:9835: \"$ac_try\"") >&5
9836  (eval $ac_try) 2>&5
9837  ac_status=$?
9838  echo "$as_me:9838: \$? = $ac_status" >&5
9839  (exit $ac_status); }; }; then
9840  cf_cv_xt_ice_compat=yes
9841else
9842  echo "$as_me: failed program was:" >&5
9843cat conftest.$ac_ext >&5
9844cf_cv_xt_ice_compat=no
9845fi
9846rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9847fi
9848echo "$as_me:9848: result: $cf_cv_xt_ice_compat" >&5
9849echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
9850
9851	if test "$cf_cv_xt_ice_compat" = no
9852	then
9853		# workaround for broken ".pc" files used for X Toolkit.
9854		case "x$X_PRE_LIBS" in
9855		(*-lICE*)
9856			case "x$LIBS" in
9857			(*-lICE*)
9858				;;
9859			(*)
9860				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
9861
9862echo "${as_me:-configure}:9862: testing work around broken ICE dependency ..." 1>&5
9863
9864if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
9865	test -n "$verbose" && echo "	found package ice" 1>&6
9866
9867echo "${as_me:-configure}:9867: testing found package ice ..." 1>&5
9868
9869	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
9870	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
9871	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
9872
9873echo "${as_me:-configure}:9873: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9874
9875	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
9876
9877echo "${as_me:-configure}:9877: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
9878
9879cf_fix_cppflags=no
9880cf_new_cflags=
9881cf_new_cppflags=
9882cf_new_extra_cppflags=
9883
9884for cf_add_cflags in $cf_pkgconfig_incs
9885do
9886case $cf_fix_cppflags in
9887(no)
9888	case $cf_add_cflags in
9889	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9890		case $cf_add_cflags in
9891		(-D*)
9892			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9893
9894			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9895				&& test -z "${cf_tst_cflags}" \
9896				&& cf_fix_cppflags=yes
9897
9898			if test $cf_fix_cppflags = yes ; then
9899				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9900				continue
9901			elif test "${cf_tst_cflags}" = "\"'" ; then
9902				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9903				continue
9904			fi
9905			;;
9906		esac
9907		case "$CPPFLAGS" in
9908		(*$cf_add_cflags)
9909			;;
9910		(*)
9911			case $cf_add_cflags in
9912			(-D*)
9913				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9914
9915CPPFLAGS=`echo "$CPPFLAGS" | \
9916	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9917		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9918
9919				;;
9920			esac
9921			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
9922			;;
9923		esac
9924		;;
9925	(*)
9926		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
9927		;;
9928	esac
9929	;;
9930(yes)
9931	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
9932
9933	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9934
9935	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9936		&& test -z "${cf_tst_cflags}" \
9937		&& cf_fix_cppflags=no
9938	;;
9939esac
9940done
9941
9942if test -n "$cf_new_cflags" ; then
9943
9944	CFLAGS="$CFLAGS $cf_new_cflags"
9945fi
9946
9947if test -n "$cf_new_cppflags" ; then
9948
9949	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
9950fi
9951
9952if test -n "$cf_new_extra_cppflags" ; then
9953
9954	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
9955fi
9956
9957cf_add_libs="$cf_pkgconfig_libs"
9958# Filter out duplicates - this happens with badly-designed ".pc" files...
9959for cf_add_1lib in $LIBS
9960do
9961	for cf_add_2lib in $cf_add_libs
9962	do
9963		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9964		then
9965			cf_add_1lib=
9966			break
9967		fi
9968	done
9969	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9970done
9971LIBS="$cf_add_libs"
9972
9973if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
9974	test -n "$verbose" && echo "	found package sm" 1>&6
9975
9976echo "${as_me:-configure}:9976: testing found package sm ..." 1>&5
9977
9978	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
9979	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
9980	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
9981
9982echo "${as_me:-configure}:9982: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9983
9984	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
9985
9986echo "${as_me:-configure}:9986: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
9987
9988cf_fix_cppflags=no
9989cf_new_cflags=
9990cf_new_cppflags=
9991cf_new_extra_cppflags=
9992
9993for cf_add_cflags in $cf_pkgconfig_incs
9994do
9995case $cf_fix_cppflags in
9996(no)
9997	case $cf_add_cflags in
9998	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9999		case $cf_add_cflags in
10000		(-D*)
10001			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10002
10003			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10004				&& test -z "${cf_tst_cflags}" \
10005				&& cf_fix_cppflags=yes
10006
10007			if test $cf_fix_cppflags = yes ; then
10008				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10009				continue
10010			elif test "${cf_tst_cflags}" = "\"'" ; then
10011				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10012				continue
10013			fi
10014			;;
10015		esac
10016		case "$CPPFLAGS" in
10017		(*$cf_add_cflags)
10018			;;
10019		(*)
10020			case $cf_add_cflags in
10021			(-D*)
10022				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10023
10024CPPFLAGS=`echo "$CPPFLAGS" | \
10025	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10026		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10027
10028				;;
10029			esac
10030			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10031			;;
10032		esac
10033		;;
10034	(*)
10035		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10036		;;
10037	esac
10038	;;
10039(yes)
10040	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10041
10042	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10043
10044	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10045		&& test -z "${cf_tst_cflags}" \
10046		&& cf_fix_cppflags=no
10047	;;
10048esac
10049done
10050
10051if test -n "$cf_new_cflags" ; then
10052
10053	CFLAGS="$CFLAGS $cf_new_cflags"
10054fi
10055
10056if test -n "$cf_new_cppflags" ; then
10057
10058	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10059fi
10060
10061if test -n "$cf_new_extra_cppflags" ; then
10062
10063	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10064fi
10065
10066cf_add_libs="$cf_pkgconfig_libs"
10067# Filter out duplicates - this happens with badly-designed ".pc" files...
10068for cf_add_1lib in $LIBS
10069do
10070	for cf_add_2lib in $cf_add_libs
10071	do
10072		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10073		then
10074			cf_add_1lib=
10075			break
10076		fi
10077	done
10078	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10079done
10080LIBS="$cf_add_libs"
10081
10082	:
10083else
10084	cf_pkgconfig_incs=
10085	cf_pkgconfig_libs=
10086	:
10087fi
10088
10089else
10090	cf_pkgconfig_incs=
10091	cf_pkgconfig_libs=
10092
10093test -n "$verbose" && echo "	...before $LIBS" 1>&6
10094
10095echo "${as_me:-configure}:10095: testing ...before $LIBS ..." 1>&5
10096
10097LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
10098test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10099
10100echo "${as_me:-configure}:10100: testing ...after  $LIBS ..." 1>&5
10101
10102fi
10103
10104				;;
10105			esac
10106			;;
10107		esac
10108	fi
10109
10110	cf_have_X_LIBS=yes
10111
10112else
10113	cf_pkgconfig_incs=
10114	cf_pkgconfig_libs=
10115
10116	LDFLAGS="$X_LIBS $LDFLAGS"
10117
10118test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
10119
10120echo "${as_me:-configure}:10120: testing checking additions to CFLAGS ..." 1>&5
10121
10122cf_check_cflags="$CFLAGS"
10123cf_check_cppflags="$CPPFLAGS"
10124
10125cf_fix_cppflags=no
10126cf_new_cflags=
10127cf_new_cppflags=
10128cf_new_extra_cppflags=
10129
10130for cf_add_cflags in $X_CFLAGS
10131do
10132case $cf_fix_cppflags in
10133(no)
10134	case $cf_add_cflags in
10135	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10136		case $cf_add_cflags in
10137		(-D*)
10138			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10139
10140			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10141				&& test -z "${cf_tst_cflags}" \
10142				&& cf_fix_cppflags=yes
10143
10144			if test $cf_fix_cppflags = yes ; then
10145				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10146				continue
10147			elif test "${cf_tst_cflags}" = "\"'" ; then
10148				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10149				continue
10150			fi
10151			;;
10152		esac
10153		case "$CPPFLAGS" in
10154		(*$cf_add_cflags)
10155			;;
10156		(*)
10157			case $cf_add_cflags in
10158			(-D*)
10159				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10160
10161CPPFLAGS=`echo "$CPPFLAGS" | \
10162	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10163		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10164
10165				;;
10166			esac
10167			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10168			;;
10169		esac
10170		;;
10171	(*)
10172		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10173		;;
10174	esac
10175	;;
10176(yes)
10177	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10178
10179	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10180
10181	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10182		&& test -z "${cf_tst_cflags}" \
10183		&& cf_fix_cppflags=no
10184	;;
10185esac
10186done
10187
10188if test -n "$cf_new_cflags" ; then
10189	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
10190
10191echo "${as_me:-configure}:10191: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10192
10193	CFLAGS="$CFLAGS $cf_new_cflags"
10194fi
10195
10196if test -n "$cf_new_cppflags" ; then
10197	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10198
10199echo "${as_me:-configure}:10199: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10200
10201	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10202fi
10203
10204if test -n "$cf_new_extra_cppflags" ; then
10205	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10206
10207echo "${as_me:-configure}:10207: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10208
10209	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10210fi
10211
10212if test "x$cf_check_cflags" != "x$CFLAGS" ; then
10213cat >conftest.$ac_ext <<_ACEOF
10214#line 10214 "configure"
10215#include "confdefs.h"
10216#include <stdio.h>
10217int
10218main ()
10219{
10220printf("Hello world");
10221  ;
10222  return 0;
10223}
10224_ACEOF
10225rm -f conftest.$ac_objext conftest$ac_exeext
10226if { (eval echo "$as_me:10226: \"$ac_link\"") >&5
10227  (eval $ac_link) 2>&5
10228  ac_status=$?
10229  echo "$as_me:10229: \$? = $ac_status" >&5
10230  (exit $ac_status); } &&
10231         { ac_try='test -s conftest$ac_exeext'
10232  { (eval echo "$as_me:10232: \"$ac_try\"") >&5
10233  (eval $ac_try) 2>&5
10234  ac_status=$?
10235  echo "$as_me:10235: \$? = $ac_status" >&5
10236  (exit $ac_status); }; }; then
10237  :
10238else
10239  echo "$as_me: failed program was:" >&5
10240cat conftest.$ac_ext >&5
10241test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
10242
10243echo "${as_me:-configure}:10243: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
10244
10245	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
10246		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
10247
10248echo "${as_me:-configure}:10248: testing but keeping change to \$CPPFLAGS ..." 1>&5
10249
10250	 fi
10251	 CFLAGS="$cf_check_flags"
10252fi
10253rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10254fi
10255
10256	echo "$as_me:10256: checking for XOpenDisplay" >&5
10257echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
10258if test "${ac_cv_func_XOpenDisplay+set}" = set; then
10259  echo $ECHO_N "(cached) $ECHO_C" >&6
10260else
10261  cat >conftest.$ac_ext <<_ACEOF
10262#line 10262 "configure"
10263#include "confdefs.h"
10264/* System header to define __stub macros and hopefully few prototypes,
10265    which can conflict with char XOpenDisplay (); below.  */
10266#include <assert.h>
10267/* Override any gcc2 internal prototype to avoid an error.  */
10268#ifdef __cplusplus
10269extern "C"
10270#endif
10271/* We use char because int might match the return type of a gcc2
10272   builtin and then its argument prototype would still apply.  */
10273char XOpenDisplay ();
10274char (*f) ();
10275
10276int
10277main ()
10278{
10279/* The GNU C library defines this for functions which it implements
10280    to always fail with ENOSYS.  Some functions are actually named
10281    something starting with __ and the normal name is an alias.  */
10282#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
10283choke me
10284#else
10285f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10286#endif
10287
10288  ;
10289  return 0;
10290}
10291_ACEOF
10292rm -f conftest.$ac_objext conftest$ac_exeext
10293if { (eval echo "$as_me:10293: \"$ac_link\"") >&5
10294  (eval $ac_link) 2>&5
10295  ac_status=$?
10296  echo "$as_me:10296: \$? = $ac_status" >&5
10297  (exit $ac_status); } &&
10298         { ac_try='test -s conftest$ac_exeext'
10299  { (eval echo "$as_me:10299: \"$ac_try\"") >&5
10300  (eval $ac_try) 2>&5
10301  ac_status=$?
10302  echo "$as_me:10302: \$? = $ac_status" >&5
10303  (exit $ac_status); }; }; then
10304  ac_cv_func_XOpenDisplay=yes
10305else
10306  echo "$as_me: failed program was:" >&5
10307cat conftest.$ac_ext >&5
10308ac_cv_func_XOpenDisplay=no
10309fi
10310rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10311fi
10312echo "$as_me:10312: result: $ac_cv_func_XOpenDisplay" >&5
10313echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
10314if test $ac_cv_func_XOpenDisplay = yes; then
10315  :
10316else
10317
10318	echo "$as_me:10318: checking for XOpenDisplay in -lX11" >&5
10319echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
10320if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
10321  echo $ECHO_N "(cached) $ECHO_C" >&6
10322else
10323  ac_check_lib_save_LIBS=$LIBS
10324LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10325cat >conftest.$ac_ext <<_ACEOF
10326#line 10326 "configure"
10327#include "confdefs.h"
10328
10329/* Override any gcc2 internal prototype to avoid an error.  */
10330#ifdef __cplusplus
10331extern "C"
10332#endif
10333/* We use char because int might match the return type of a gcc2
10334   builtin and then its argument prototype would still apply.  */
10335char XOpenDisplay ();
10336int
10337main ()
10338{
10339XOpenDisplay ();
10340  ;
10341  return 0;
10342}
10343_ACEOF
10344rm -f conftest.$ac_objext conftest$ac_exeext
10345if { (eval echo "$as_me:10345: \"$ac_link\"") >&5
10346  (eval $ac_link) 2>&5
10347  ac_status=$?
10348  echo "$as_me:10348: \$? = $ac_status" >&5
10349  (exit $ac_status); } &&
10350         { ac_try='test -s conftest$ac_exeext'
10351  { (eval echo "$as_me:10351: \"$ac_try\"") >&5
10352  (eval $ac_try) 2>&5
10353  ac_status=$?
10354  echo "$as_me:10354: \$? = $ac_status" >&5
10355  (exit $ac_status); }; }; then
10356  ac_cv_lib_X11_XOpenDisplay=yes
10357else
10358  echo "$as_me: failed program was:" >&5
10359cat conftest.$ac_ext >&5
10360ac_cv_lib_X11_XOpenDisplay=no
10361fi
10362rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10363LIBS=$ac_check_lib_save_LIBS
10364fi
10365echo "$as_me:10365: result: $ac_cv_lib_X11_XOpenDisplay" >&5
10366echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
10367if test $ac_cv_lib_X11_XOpenDisplay = yes; then
10368
10369cf_add_libs="-lX11"
10370# Filter out duplicates - this happens with badly-designed ".pc" files...
10371for cf_add_1lib in $LIBS
10372do
10373	for cf_add_2lib in $cf_add_libs
10374	do
10375		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10376		then
10377			cf_add_1lib=
10378			break
10379		fi
10380	done
10381	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10382done
10383LIBS="$cf_add_libs"
10384
10385fi
10386
10387fi
10388
10389	echo "$as_me:10389: checking for XtAppInitialize" >&5
10390echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
10391if test "${ac_cv_func_XtAppInitialize+set}" = set; then
10392  echo $ECHO_N "(cached) $ECHO_C" >&6
10393else
10394  cat >conftest.$ac_ext <<_ACEOF
10395#line 10395 "configure"
10396#include "confdefs.h"
10397/* System header to define __stub macros and hopefully few prototypes,
10398    which can conflict with char XtAppInitialize (); below.  */
10399#include <assert.h>
10400/* Override any gcc2 internal prototype to avoid an error.  */
10401#ifdef __cplusplus
10402extern "C"
10403#endif
10404/* We use char because int might match the return type of a gcc2
10405   builtin and then its argument prototype would still apply.  */
10406char XtAppInitialize ();
10407char (*f) ();
10408
10409int
10410main ()
10411{
10412/* The GNU C library defines this for functions which it implements
10413    to always fail with ENOSYS.  Some functions are actually named
10414    something starting with __ and the normal name is an alias.  */
10415#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
10416choke me
10417#else
10418f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10419#endif
10420
10421  ;
10422  return 0;
10423}
10424_ACEOF
10425rm -f conftest.$ac_objext conftest$ac_exeext
10426if { (eval echo "$as_me:10426: \"$ac_link\"") >&5
10427  (eval $ac_link) 2>&5
10428  ac_status=$?
10429  echo "$as_me:10429: \$? = $ac_status" >&5
10430  (exit $ac_status); } &&
10431         { ac_try='test -s conftest$ac_exeext'
10432  { (eval echo "$as_me:10432: \"$ac_try\"") >&5
10433  (eval $ac_try) 2>&5
10434  ac_status=$?
10435  echo "$as_me:10435: \$? = $ac_status" >&5
10436  (exit $ac_status); }; }; then
10437  ac_cv_func_XtAppInitialize=yes
10438else
10439  echo "$as_me: failed program was:" >&5
10440cat conftest.$ac_ext >&5
10441ac_cv_func_XtAppInitialize=no
10442fi
10443rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10444fi
10445echo "$as_me:10445: result: $ac_cv_func_XtAppInitialize" >&5
10446echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
10447if test $ac_cv_func_XtAppInitialize = yes; then
10448  :
10449else
10450
10451	echo "$as_me:10451: checking for XtAppInitialize in -lXt" >&5
10452echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
10453if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
10454  echo $ECHO_N "(cached) $ECHO_C" >&6
10455else
10456  ac_check_lib_save_LIBS=$LIBS
10457LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10458cat >conftest.$ac_ext <<_ACEOF
10459#line 10459 "configure"
10460#include "confdefs.h"
10461
10462/* Override any gcc2 internal prototype to avoid an error.  */
10463#ifdef __cplusplus
10464extern "C"
10465#endif
10466/* We use char because int might match the return type of a gcc2
10467   builtin and then its argument prototype would still apply.  */
10468char XtAppInitialize ();
10469int
10470main ()
10471{
10472XtAppInitialize ();
10473  ;
10474  return 0;
10475}
10476_ACEOF
10477rm -f conftest.$ac_objext conftest$ac_exeext
10478if { (eval echo "$as_me:10478: \"$ac_link\"") >&5
10479  (eval $ac_link) 2>&5
10480  ac_status=$?
10481  echo "$as_me:10481: \$? = $ac_status" >&5
10482  (exit $ac_status); } &&
10483         { ac_try='test -s conftest$ac_exeext'
10484  { (eval echo "$as_me:10484: \"$ac_try\"") >&5
10485  (eval $ac_try) 2>&5
10486  ac_status=$?
10487  echo "$as_me:10487: \$? = $ac_status" >&5
10488  (exit $ac_status); }; }; then
10489  ac_cv_lib_Xt_XtAppInitialize=yes
10490else
10491  echo "$as_me: failed program was:" >&5
10492cat conftest.$ac_ext >&5
10493ac_cv_lib_Xt_XtAppInitialize=no
10494fi
10495rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10496LIBS=$ac_check_lib_save_LIBS
10497fi
10498echo "$as_me:10498: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
10499echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
10500if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
10501
10502cat >>confdefs.h <<\EOF
10503#define HAVE_LIBXT 1
10504EOF
10505
10506		 cf_have_X_LIBS=Xt
10507		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10508fi
10509
10510fi
10511
10512fi
10513
10514if test $cf_have_X_LIBS = no ; then
10515	{ echo "$as_me:10515: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10516test program.  You will have to check and add the proper libraries by hand
10517to makefile." >&5
10518echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10519test program.  You will have to check and add the proper libraries by hand
10520to makefile." >&2;}
10521fi
10522
10523for ac_header in \
10524	X11/DECkeysym.h \
10525	X11/Sunkeysym.h \
10526	X11/XF86keysym.h \
10527	X11/XKBlib.h \
10528	X11/Xpoll.h \
10529	X11/extensions/XKB.h \
10530
10531do
10532as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10533echo "$as_me:10533: checking for $ac_header" >&5
10534echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10535if eval "test \"\${$as_ac_Header+set}\" = set"; then
10536  echo $ECHO_N "(cached) $ECHO_C" >&6
10537else
10538  cat >conftest.$ac_ext <<_ACEOF
10539#line 10539 "configure"
10540#include "confdefs.h"
10541#include <$ac_header>
10542_ACEOF
10543if { (eval echo "$as_me:10543: \"$ac_cpp conftest.$ac_ext\"") >&5
10544  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10545  ac_status=$?
10546  egrep -v '^ *\+' conftest.er1 >conftest.err
10547  rm -f conftest.er1
10548  cat conftest.err >&5
10549  echo "$as_me:10549: \$? = $ac_status" >&5
10550  (exit $ac_status); } >/dev/null; then
10551  if test -s conftest.err; then
10552    ac_cpp_err=$ac_c_preproc_warn_flag
10553  else
10554    ac_cpp_err=
10555  fi
10556else
10557  ac_cpp_err=yes
10558fi
10559if test -z "$ac_cpp_err"; then
10560  eval "$as_ac_Header=yes"
10561else
10562  echo "$as_me: failed program was:" >&5
10563  cat conftest.$ac_ext >&5
10564  eval "$as_ac_Header=no"
10565fi
10566rm -f conftest.err conftest.$ac_ext
10567fi
10568echo "$as_me:10568: result: `eval echo '${'$as_ac_Header'}'`" >&5
10569echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10570if test `eval echo '${'$as_ac_Header'}'` = yes; then
10571  cat >>confdefs.h <<EOF
10572#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10573EOF
10574
10575fi
10576done
10577
10578ICON_SUFFIX=.xbm
10579
10580cf_save_cppflags="${CPPFLAGS}"
10581cf_save_ldflags="${LDFLAGS}"
10582
10583echo "$as_me:10583: checking if you want to use the Xpm library for colored icon" >&5
10584echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
10585
10586# Check whether --with-xpm or --without-xpm was given.
10587if test "${with_xpm+set}" = set; then
10588  withval="$with_xpm"
10589  cf_Xpm_library="$withval"
10590else
10591  cf_Xpm_library=yes
10592fi;
10593echo "$as_me:10593: result: $cf_Xpm_library" >&5
10594echo "${ECHO_T}$cf_Xpm_library" >&6
10595
10596if test "$cf_Xpm_library" != no ; then
10597    if test "$cf_Xpm_library" != yes ; then
10598	CPPFLAGS="$CPPFLAGS -I$withval/include"
10599	LDFLAGS="$LDFLAGS -L$withval/lib"
10600    fi
10601    echo "$as_me:10601: checking for X11/xpm.h" >&5
10602echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
10603if test "${ac_cv_header_X11_xpm_h+set}" = set; then
10604  echo $ECHO_N "(cached) $ECHO_C" >&6
10605else
10606  cat >conftest.$ac_ext <<_ACEOF
10607#line 10607 "configure"
10608#include "confdefs.h"
10609#include <X11/xpm.h>
10610_ACEOF
10611if { (eval echo "$as_me:10611: \"$ac_cpp conftest.$ac_ext\"") >&5
10612  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10613  ac_status=$?
10614  egrep -v '^ *\+' conftest.er1 >conftest.err
10615  rm -f conftest.er1
10616  cat conftest.err >&5
10617  echo "$as_me:10617: \$? = $ac_status" >&5
10618  (exit $ac_status); } >/dev/null; then
10619  if test -s conftest.err; then
10620    ac_cpp_err=$ac_c_preproc_warn_flag
10621  else
10622    ac_cpp_err=
10623  fi
10624else
10625  ac_cpp_err=yes
10626fi
10627if test -z "$ac_cpp_err"; then
10628  ac_cv_header_X11_xpm_h=yes
10629else
10630  echo "$as_me: failed program was:" >&5
10631  cat conftest.$ac_ext >&5
10632  ac_cv_header_X11_xpm_h=no
10633fi
10634rm -f conftest.err conftest.$ac_ext
10635fi
10636echo "$as_me:10636: result: $ac_cv_header_X11_xpm_h" >&5
10637echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
10638if test $ac_cv_header_X11_xpm_h = yes; then
10639
10640	echo "$as_me:10640: checking for XpmCreatePixmapFromData in -lXpm" >&5
10641echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
10642if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
10643  echo $ECHO_N "(cached) $ECHO_C" >&6
10644else
10645  ac_check_lib_save_LIBS=$LIBS
10646LIBS="-lXpm -lX11 $X_LIBS $LIBS"
10647cat >conftest.$ac_ext <<_ACEOF
10648#line 10648 "configure"
10649#include "confdefs.h"
10650
10651/* Override any gcc2 internal prototype to avoid an error.  */
10652#ifdef __cplusplus
10653extern "C"
10654#endif
10655/* We use char because int might match the return type of a gcc2
10656   builtin and then its argument prototype would still apply.  */
10657char XpmCreatePixmapFromData ();
10658int
10659main ()
10660{
10661XpmCreatePixmapFromData ();
10662  ;
10663  return 0;
10664}
10665_ACEOF
10666rm -f conftest.$ac_objext conftest$ac_exeext
10667if { (eval echo "$as_me:10667: \"$ac_link\"") >&5
10668  (eval $ac_link) 2>&5
10669  ac_status=$?
10670  echo "$as_me:10670: \$? = $ac_status" >&5
10671  (exit $ac_status); } &&
10672         { ac_try='test -s conftest$ac_exeext'
10673  { (eval echo "$as_me:10673: \"$ac_try\"") >&5
10674  (eval $ac_try) 2>&5
10675  ac_status=$?
10676  echo "$as_me:10676: \$? = $ac_status" >&5
10677  (exit $ac_status); }; }; then
10678  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
10679else
10680  echo "$as_me: failed program was:" >&5
10681cat conftest.$ac_ext >&5
10682ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
10683fi
10684rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10685LIBS=$ac_check_lib_save_LIBS
10686fi
10687echo "$as_me:10687: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
10688echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
10689if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
10690
10691cat >>confdefs.h <<\EOF
10692#define HAVE_LIBXPM 1
10693EOF
10694
10695	    ICON_SUFFIX=.xpm
10696	    LIBS="-lXpm $LIBS"
10697else
10698  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
10699fi
10700
10701else
10702  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
10703fi
10704
10705fi
10706
10707cf_x_athena=${cf_x_athena:-Xaw}
10708
10709echo "$as_me:10709: checking if you want to link with Xaw 3d library" >&5
10710echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
10711withval=
10712
10713# Check whether --with-Xaw3d or --without-Xaw3d was given.
10714if test "${with_Xaw3d+set}" = set; then
10715  withval="$with_Xaw3d"
10716
10717fi;
10718if test "$withval" = yes ; then
10719	cf_x_athena=Xaw3d
10720	echo "$as_me:10720: result: yes" >&5
10721echo "${ECHO_T}yes" >&6
10722else
10723	echo "$as_me:10723: result: no" >&5
10724echo "${ECHO_T}no" >&6
10725fi
10726
10727echo "$as_me:10727: checking if you want to link with Xaw 3d xft library" >&5
10728echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
10729withval=
10730
10731# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
10732if test "${with_Xaw3dxft+set}" = set; then
10733  withval="$with_Xaw3dxft"
10734
10735fi;
10736if test "$withval" = yes ; then
10737	cf_x_athena=Xaw3dxft
10738	echo "$as_me:10738: result: yes" >&5
10739echo "${ECHO_T}yes" >&6
10740else
10741	echo "$as_me:10741: result: no" >&5
10742echo "${ECHO_T}no" >&6
10743fi
10744
10745echo "$as_me:10745: checking if you want to link with neXT Athena library" >&5
10746echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
10747withval=
10748
10749# Check whether --with-neXtaw or --without-neXtaw was given.
10750if test "${with_neXtaw+set}" = set; then
10751  withval="$with_neXtaw"
10752
10753fi;
10754if test "$withval" = yes ; then
10755	cf_x_athena=neXtaw
10756	echo "$as_me:10756: result: yes" >&5
10757echo "${ECHO_T}yes" >&6
10758else
10759	echo "$as_me:10759: result: no" >&5
10760echo "${ECHO_T}no" >&6
10761fi
10762
10763echo "$as_me:10763: checking if you want to link with Athena-Plus library" >&5
10764echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
10765withval=
10766
10767# Check whether --with-XawPlus or --without-XawPlus was given.
10768if test "${with_XawPlus+set}" = set; then
10769  withval="$with_XawPlus"
10770
10771fi;
10772if test "$withval" = yes ; then
10773	cf_x_athena=XawPlus
10774	echo "$as_me:10774: result: yes" >&5
10775echo "${ECHO_T}yes" >&6
10776else
10777	echo "$as_me:10777: result: no" >&5
10778echo "${ECHO_T}no" >&6
10779fi
10780
10781cf_x_athena_lib=""
10782
10783if test "$PKG_CONFIG" != none ; then
10784	cf_athena_list=
10785	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
10786	for cf_athena_pkg in \
10787		$cf_athena_list \
10788		${cf_x_athena} \
10789		${cf_x_athena}-devel \
10790		lib${cf_x_athena} \
10791		lib${cf_x_athena}-devel
10792	do
10793
10794if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
10795	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
10796
10797echo "${as_me:-configure}:10797: testing found package $cf_athena_pkg ..." 1>&5
10798
10799	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
10800	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
10801	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
10802
10803echo "${as_me:-configure}:10803: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10804
10805	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
10806
10807echo "${as_me:-configure}:10807: testing package $cf_athena_pkg 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				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10830				continue
10831			elif test "${cf_tst_cflags}" = "\"'" ; then
10832				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10833				continue
10834			fi
10835			;;
10836		esac
10837		case "$CPPFLAGS" in
10838		(*$cf_add_cflags)
10839			;;
10840		(*)
10841			case $cf_add_cflags in
10842			(-D*)
10843				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10844
10845CPPFLAGS=`echo "$CPPFLAGS" | \
10846	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10847		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10848
10849				;;
10850			esac
10851			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
10852			;;
10853		esac
10854		;;
10855	(*)
10856		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
10857		;;
10858	esac
10859	;;
10860(yes)
10861	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
10862
10863	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10864
10865	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10866		&& test -z "${cf_tst_cflags}" \
10867		&& cf_fix_cppflags=no
10868	;;
10869esac
10870done
10871
10872if test -n "$cf_new_cflags" ; then
10873
10874	CFLAGS="$CFLAGS $cf_new_cflags"
10875fi
10876
10877if test -n "$cf_new_cppflags" ; then
10878
10879	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
10880fi
10881
10882if test -n "$cf_new_extra_cppflags" ; then
10883
10884	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
10885fi
10886
10887cf_add_libs="$cf_pkgconfig_libs"
10888# Filter out duplicates - this happens with badly-designed ".pc" files...
10889for cf_add_1lib in $LIBS
10890do
10891	for cf_add_2lib in $cf_add_libs
10892	do
10893		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10894		then
10895			cf_add_1lib=
10896			break
10897		fi
10898	done
10899	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10900done
10901LIBS="$cf_add_libs"
10902
10903			cf_x_athena_lib="$cf_pkgconfig_libs"
10904
10905cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10906
10907			cat >>confdefs.h <<EOF
10908#define $cf_x_athena_LIBS 1
10909EOF
10910
10911	for cf_trim_lib in Xmu Xt X11
10912	do
10913		case "$LIBS" in
10914		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
10915			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
10916			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
10917
10918echo "${as_me:-configure}:10918: testing ..trimmed $LIBS ..." 1>&5
10919
10920			;;
10921		esac
10922	done
10923
10924echo "$as_me:10924: checking for usable $cf_x_athena/Xmu package" >&5
10925echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
10926if test "${cf_cv_xaw_compat+set}" = set; then
10927  echo $ECHO_N "(cached) $ECHO_C" >&6
10928else
10929
10930cat >conftest.$ac_ext <<_ACEOF
10931#line 10931 "configure"
10932#include "confdefs.h"
10933
10934#include <X11/Xmu/CharSet.h>
10935
10936int
10937main ()
10938{
10939
10940int check = XmuCompareISOLatin1("big", "small")
10941
10942  ;
10943  return 0;
10944}
10945_ACEOF
10946rm -f conftest.$ac_objext conftest$ac_exeext
10947if { (eval echo "$as_me:10947: \"$ac_link\"") >&5
10948  (eval $ac_link) 2>&5
10949  ac_status=$?
10950  echo "$as_me:10950: \$? = $ac_status" >&5
10951  (exit $ac_status); } &&
10952         { ac_try='test -s conftest$ac_exeext'
10953  { (eval echo "$as_me:10953: \"$ac_try\"") >&5
10954  (eval $ac_try) 2>&5
10955  ac_status=$?
10956  echo "$as_me:10956: \$? = $ac_status" >&5
10957  (exit $ac_status); }; }; then
10958  cf_cv_xaw_compat=yes
10959else
10960  echo "$as_me: failed program was:" >&5
10961cat conftest.$ac_ext >&5
10962cf_cv_xaw_compat=no
10963fi
10964rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10965fi
10966echo "$as_me:10966: result: $cf_cv_xaw_compat" >&5
10967echo "${ECHO_T}$cf_cv_xaw_compat" >&6
10968
10969			if test "$cf_cv_xaw_compat" = no
10970			then
10971				# workaround for broken ".pc" files...
10972				case "$cf_x_athena_lib" in
10973				(*-lXmu*)
10974					;;
10975				(*)
10976					test -n "$verbose" && echo "	work around broken package" 1>&6
10977
10978echo "${as_me:-configure}:10978: testing work around broken package ..." 1>&5
10979
10980					cf_save_xmu="$LIBS"
10981					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
10982
10983if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
10984	test -n "$verbose" && echo "	found package xmu" 1>&6
10985
10986echo "${as_me:-configure}:10986: testing found package xmu ..." 1>&5
10987
10988	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
10989	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
10990	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
10991
10992echo "${as_me:-configure}:10992: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10993
10994	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
10995
10996echo "${as_me:-configure}:10996: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
10997
10998cf_fix_cppflags=no
10999cf_new_cflags=
11000cf_new_cppflags=
11001cf_new_extra_cppflags=
11002
11003for cf_add_cflags in $cf_pkgconfig_incs
11004do
11005case $cf_fix_cppflags in
11006(no)
11007	case $cf_add_cflags in
11008	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11009		case $cf_add_cflags in
11010		(-D*)
11011			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11012
11013			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11014				&& test -z "${cf_tst_cflags}" \
11015				&& cf_fix_cppflags=yes
11016
11017			if test $cf_fix_cppflags = yes ; then
11018				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11019				continue
11020			elif test "${cf_tst_cflags}" = "\"'" ; then
11021				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11022				continue
11023			fi
11024			;;
11025		esac
11026		case "$CPPFLAGS" in
11027		(*$cf_add_cflags)
11028			;;
11029		(*)
11030			case $cf_add_cflags in
11031			(-D*)
11032				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11033
11034CPPFLAGS=`echo "$CPPFLAGS" | \
11035	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11036		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11037
11038				;;
11039			esac
11040			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11041			;;
11042		esac
11043		;;
11044	(*)
11045		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11046		;;
11047	esac
11048	;;
11049(yes)
11050	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11051
11052	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11053
11054	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11055		&& test -z "${cf_tst_cflags}" \
11056		&& cf_fix_cppflags=no
11057	;;
11058esac
11059done
11060
11061if test -n "$cf_new_cflags" ; then
11062
11063	CFLAGS="$CFLAGS $cf_new_cflags"
11064fi
11065
11066if test -n "$cf_new_cppflags" ; then
11067
11068	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11069fi
11070
11071if test -n "$cf_new_extra_cppflags" ; then
11072
11073	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11074fi
11075
11076cf_add_libs="$cf_pkgconfig_libs"
11077# Filter out duplicates - this happens with badly-designed ".pc" files...
11078for cf_add_1lib in $LIBS
11079do
11080	for cf_add_2lib in $cf_add_libs
11081	do
11082		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11083		then
11084			cf_add_1lib=
11085			break
11086		fi
11087	done
11088	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11089done
11090LIBS="$cf_add_libs"
11091
11092							LIBS="$cf_save_xmu"
11093
11094test -n "$verbose" && echo "	...before $LIBS" 1>&6
11095
11096echo "${as_me:-configure}:11096: testing ...before $LIBS ..." 1>&5
11097
11098LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
11099test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11100
11101echo "${as_me:-configure}:11101: testing ...after  $LIBS ..." 1>&5
11102
11103else
11104	cf_pkgconfig_incs=
11105	cf_pkgconfig_libs=
11106
11107test -n "$verbose" && echo "	...before $LIBS" 1>&6
11108
11109echo "${as_me:-configure}:11109: testing ...before $LIBS ..." 1>&5
11110
11111LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
11112test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11113
11114echo "${as_me:-configure}:11114: testing ...after  $LIBS ..." 1>&5
11115
11116fi
11117
11118	for cf_trim_lib in Xmu Xt X11
11119	do
11120		case "$LIBS" in
11121		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11122			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11123			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
11124
11125echo "${as_me:-configure}:11125: testing ..trimmed $LIBS ..." 1>&5
11126
11127			;;
11128		esac
11129	done
11130
11131					;;
11132				esac
11133			fi
11134
11135			break
11136else
11137	cf_pkgconfig_incs=
11138	cf_pkgconfig_libs=
11139	:
11140fi
11141
11142	done
11143fi
11144
11145if test -z "$cf_x_athena_lib" ; then
11146
11147if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11148	test -n "$verbose" && echo "	found package Xext" 1>&6
11149
11150echo "${as_me:-configure}:11150: testing found package Xext ..." 1>&5
11151
11152	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11153	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
11154	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11155
11156echo "${as_me:-configure}:11156: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11157
11158	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11159
11160echo "${as_me:-configure}:11160: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11161
11162cf_fix_cppflags=no
11163cf_new_cflags=
11164cf_new_cppflags=
11165cf_new_extra_cppflags=
11166
11167for cf_add_cflags in $cf_pkgconfig_incs
11168do
11169case $cf_fix_cppflags in
11170(no)
11171	case $cf_add_cflags in
11172	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11173		case $cf_add_cflags in
11174		(-D*)
11175			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11176
11177			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11178				&& test -z "${cf_tst_cflags}" \
11179				&& cf_fix_cppflags=yes
11180
11181			if test $cf_fix_cppflags = yes ; then
11182				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11183				continue
11184			elif test "${cf_tst_cflags}" = "\"'" ; then
11185				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11186				continue
11187			fi
11188			;;
11189		esac
11190		case "$CPPFLAGS" in
11191		(*$cf_add_cflags)
11192			;;
11193		(*)
11194			case $cf_add_cflags in
11195			(-D*)
11196				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11197
11198CPPFLAGS=`echo "$CPPFLAGS" | \
11199	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11200		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11201
11202				;;
11203			esac
11204			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11205			;;
11206		esac
11207		;;
11208	(*)
11209		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11210		;;
11211	esac
11212	;;
11213(yes)
11214	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11215
11216	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11217
11218	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11219		&& test -z "${cf_tst_cflags}" \
11220		&& cf_fix_cppflags=no
11221	;;
11222esac
11223done
11224
11225if test -n "$cf_new_cflags" ; then
11226
11227	CFLAGS="$CFLAGS $cf_new_cflags"
11228fi
11229
11230if test -n "$cf_new_cppflags" ; then
11231
11232	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11233fi
11234
11235if test -n "$cf_new_extra_cppflags" ; then
11236
11237	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11238fi
11239
11240cf_add_libs="$cf_pkgconfig_libs"
11241# Filter out duplicates - this happens with badly-designed ".pc" files...
11242for cf_add_1lib in $LIBS
11243do
11244	for cf_add_2lib in $cf_add_libs
11245	do
11246		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11247		then
11248			cf_add_1lib=
11249			break
11250		fi
11251	done
11252	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11253done
11254LIBS="$cf_add_libs"
11255
11256	:
11257else
11258	cf_pkgconfig_incs=
11259	cf_pkgconfig_libs=
11260
11261	echo "$as_me:11261: checking for XextCreateExtension in -lXext" >&5
11262echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11263if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11264  echo $ECHO_N "(cached) $ECHO_C" >&6
11265else
11266  ac_check_lib_save_LIBS=$LIBS
11267LIBS="-lXext  $LIBS"
11268cat >conftest.$ac_ext <<_ACEOF
11269#line 11269 "configure"
11270#include "confdefs.h"
11271
11272/* Override any gcc2 internal prototype to avoid an error.  */
11273#ifdef __cplusplus
11274extern "C"
11275#endif
11276/* We use char because int might match the return type of a gcc2
11277   builtin and then its argument prototype would still apply.  */
11278char XextCreateExtension ();
11279int
11280main ()
11281{
11282XextCreateExtension ();
11283  ;
11284  return 0;
11285}
11286_ACEOF
11287rm -f conftest.$ac_objext conftest$ac_exeext
11288if { (eval echo "$as_me:11288: \"$ac_link\"") >&5
11289  (eval $ac_link) 2>&5
11290  ac_status=$?
11291  echo "$as_me:11291: \$? = $ac_status" >&5
11292  (exit $ac_status); } &&
11293         { ac_try='test -s conftest$ac_exeext'
11294  { (eval echo "$as_me:11294: \"$ac_try\"") >&5
11295  (eval $ac_try) 2>&5
11296  ac_status=$?
11297  echo "$as_me:11297: \$? = $ac_status" >&5
11298  (exit $ac_status); }; }; then
11299  ac_cv_lib_Xext_XextCreateExtension=yes
11300else
11301  echo "$as_me: failed program was:" >&5
11302cat conftest.$ac_ext >&5
11303ac_cv_lib_Xext_XextCreateExtension=no
11304fi
11305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11306LIBS=$ac_check_lib_save_LIBS
11307fi
11308echo "$as_me:11308: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
11309echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
11310if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
11311
11312cf_add_libs="-lXext"
11313# Filter out duplicates - this happens with badly-designed ".pc" files...
11314for cf_add_1lib in $LIBS
11315do
11316	for cf_add_2lib in $cf_add_libs
11317	do
11318		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11319		then
11320			cf_add_1lib=
11321			break
11322		fi
11323	done
11324	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11325done
11326LIBS="$cf_add_libs"
11327
11328fi
11329
11330fi
11331
11332# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
11333# in some cases has installed dummy files in the former, other cases replaced
11334# it with a link to the new location).  This complicates the configure script.
11335# Check for that pitfall, and recover using pkg-config
11336#
11337# If none of these are set, the configuration is almost certainly broken.
11338if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
11339then
11340
11341if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11342	test -n "$verbose" && echo "	found package x11" 1>&6
11343
11344echo "${as_me:-configure}:11344: testing found package x11 ..." 1>&5
11345
11346	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11347	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11348	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11349
11350echo "${as_me:-configure}:11350: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11351
11352	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11353
11354echo "${as_me:-configure}:11354: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11355
11356cf_fix_cppflags=no
11357cf_new_cflags=
11358cf_new_cppflags=
11359cf_new_extra_cppflags=
11360
11361for cf_add_cflags in $cf_pkgconfig_incs
11362do
11363case $cf_fix_cppflags in
11364(no)
11365	case $cf_add_cflags in
11366	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11367		case $cf_add_cflags in
11368		(-D*)
11369			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11370
11371			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11372				&& test -z "${cf_tst_cflags}" \
11373				&& cf_fix_cppflags=yes
11374
11375			if test $cf_fix_cppflags = yes ; then
11376				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11377				continue
11378			elif test "${cf_tst_cflags}" = "\"'" ; then
11379				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11380				continue
11381			fi
11382			;;
11383		esac
11384		case "$CPPFLAGS" in
11385		(*$cf_add_cflags)
11386			;;
11387		(*)
11388			case $cf_add_cflags in
11389			(-D*)
11390				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11391
11392CPPFLAGS=`echo "$CPPFLAGS" | \
11393	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11394		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11395
11396				;;
11397			esac
11398			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11399			;;
11400		esac
11401		;;
11402	(*)
11403		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11404		;;
11405	esac
11406	;;
11407(yes)
11408	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11409
11410	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11411
11412	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11413		&& test -z "${cf_tst_cflags}" \
11414		&& cf_fix_cppflags=no
11415	;;
11416esac
11417done
11418
11419if test -n "$cf_new_cflags" ; then
11420
11421	CFLAGS="$CFLAGS $cf_new_cflags"
11422fi
11423
11424if test -n "$cf_new_cppflags" ; then
11425
11426	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11427fi
11428
11429if test -n "$cf_new_extra_cppflags" ; then
11430
11431	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11432fi
11433
11434cf_add_libs="$cf_pkgconfig_libs"
11435# Filter out duplicates - this happens with badly-designed ".pc" files...
11436for cf_add_1lib in $LIBS
11437do
11438	for cf_add_2lib in $cf_add_libs
11439	do
11440		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11441		then
11442			cf_add_1lib=
11443			break
11444		fi
11445	done
11446	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11447done
11448LIBS="$cf_add_libs"
11449
11450	:
11451else
11452	cf_pkgconfig_incs=
11453	cf_pkgconfig_libs=
11454	{ echo "$as_me:11454: WARNING: unable to find X11 library" >&5
11455echo "$as_me: WARNING: unable to find X11 library" >&2;}
11456fi
11457
11458if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
11459	test -n "$verbose" && echo "	found package ice" 1>&6
11460
11461echo "${as_me:-configure}:11461: testing found package ice ..." 1>&5
11462
11463	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
11464	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
11465	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
11466
11467echo "${as_me:-configure}:11467: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11468
11469	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
11470
11471echo "${as_me:-configure}:11471: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
11472
11473cf_fix_cppflags=no
11474cf_new_cflags=
11475cf_new_cppflags=
11476cf_new_extra_cppflags=
11477
11478for cf_add_cflags in $cf_pkgconfig_incs
11479do
11480case $cf_fix_cppflags in
11481(no)
11482	case $cf_add_cflags in
11483	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11484		case $cf_add_cflags in
11485		(-D*)
11486			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11487
11488			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11489				&& test -z "${cf_tst_cflags}" \
11490				&& cf_fix_cppflags=yes
11491
11492			if test $cf_fix_cppflags = yes ; then
11493				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11494				continue
11495			elif test "${cf_tst_cflags}" = "\"'" ; then
11496				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11497				continue
11498			fi
11499			;;
11500		esac
11501		case "$CPPFLAGS" in
11502		(*$cf_add_cflags)
11503			;;
11504		(*)
11505			case $cf_add_cflags in
11506			(-D*)
11507				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11508
11509CPPFLAGS=`echo "$CPPFLAGS" | \
11510	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11511		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11512
11513				;;
11514			esac
11515			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11516			;;
11517		esac
11518		;;
11519	(*)
11520		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11521		;;
11522	esac
11523	;;
11524(yes)
11525	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11526
11527	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11528
11529	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11530		&& test -z "${cf_tst_cflags}" \
11531		&& cf_fix_cppflags=no
11532	;;
11533esac
11534done
11535
11536if test -n "$cf_new_cflags" ; then
11537
11538	CFLAGS="$CFLAGS $cf_new_cflags"
11539fi
11540
11541if test -n "$cf_new_cppflags" ; then
11542
11543	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11544fi
11545
11546if test -n "$cf_new_extra_cppflags" ; then
11547
11548	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11549fi
11550
11551cf_add_libs="$cf_pkgconfig_libs"
11552# Filter out duplicates - this happens with badly-designed ".pc" files...
11553for cf_add_1lib in $LIBS
11554do
11555	for cf_add_2lib in $cf_add_libs
11556	do
11557		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11558		then
11559			cf_add_1lib=
11560			break
11561		fi
11562	done
11563	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11564done
11565LIBS="$cf_add_libs"
11566
11567	:
11568else
11569	cf_pkgconfig_incs=
11570	cf_pkgconfig_libs=
11571	{ echo "$as_me:11571: WARNING: unable to find ICE library" >&5
11572echo "$as_me: WARNING: unable to find ICE library" >&2;}
11573fi
11574
11575if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
11576	test -n "$verbose" && echo "	found package sm" 1>&6
11577
11578echo "${as_me:-configure}:11578: testing found package sm ..." 1>&5
11579
11580	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
11581	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
11582	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
11583
11584echo "${as_me:-configure}:11584: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11585
11586	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
11587
11588echo "${as_me:-configure}:11588: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
11589
11590cf_fix_cppflags=no
11591cf_new_cflags=
11592cf_new_cppflags=
11593cf_new_extra_cppflags=
11594
11595for cf_add_cflags in $cf_pkgconfig_incs
11596do
11597case $cf_fix_cppflags in
11598(no)
11599	case $cf_add_cflags in
11600	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11601		case $cf_add_cflags in
11602		(-D*)
11603			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11604
11605			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11606				&& test -z "${cf_tst_cflags}" \
11607				&& cf_fix_cppflags=yes
11608
11609			if test $cf_fix_cppflags = yes ; then
11610				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11611				continue
11612			elif test "${cf_tst_cflags}" = "\"'" ; then
11613				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11614				continue
11615			fi
11616			;;
11617		esac
11618		case "$CPPFLAGS" in
11619		(*$cf_add_cflags)
11620			;;
11621		(*)
11622			case $cf_add_cflags in
11623			(-D*)
11624				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11625
11626CPPFLAGS=`echo "$CPPFLAGS" | \
11627	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11628		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11629
11630				;;
11631			esac
11632			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11633			;;
11634		esac
11635		;;
11636	(*)
11637		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11638		;;
11639	esac
11640	;;
11641(yes)
11642	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11643
11644	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11645
11646	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11647		&& test -z "${cf_tst_cflags}" \
11648		&& cf_fix_cppflags=no
11649	;;
11650esac
11651done
11652
11653if test -n "$cf_new_cflags" ; then
11654
11655	CFLAGS="$CFLAGS $cf_new_cflags"
11656fi
11657
11658if test -n "$cf_new_cppflags" ; then
11659
11660	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11661fi
11662
11663if test -n "$cf_new_extra_cppflags" ; then
11664
11665	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11666fi
11667
11668cf_add_libs="$cf_pkgconfig_libs"
11669# Filter out duplicates - this happens with badly-designed ".pc" files...
11670for cf_add_1lib in $LIBS
11671do
11672	for cf_add_2lib in $cf_add_libs
11673	do
11674		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11675		then
11676			cf_add_1lib=
11677			break
11678		fi
11679	done
11680	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11681done
11682LIBS="$cf_add_libs"
11683
11684	:
11685else
11686	cf_pkgconfig_incs=
11687	cf_pkgconfig_libs=
11688	{ echo "$as_me:11688: WARNING: unable to find SM library" >&5
11689echo "$as_me: WARNING: unable to find SM library" >&2;}
11690fi
11691
11692if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11693	test -n "$verbose" && echo "	found package xt" 1>&6
11694
11695echo "${as_me:-configure}:11695: testing found package xt ..." 1>&5
11696
11697	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11698	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11699	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11700
11701echo "${as_me:-configure}:11701: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11702
11703	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
11704
11705echo "${as_me:-configure}:11705: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11706
11707cf_fix_cppflags=no
11708cf_new_cflags=
11709cf_new_cppflags=
11710cf_new_extra_cppflags=
11711
11712for cf_add_cflags in $cf_pkgconfig_incs
11713do
11714case $cf_fix_cppflags in
11715(no)
11716	case $cf_add_cflags in
11717	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11718		case $cf_add_cflags in
11719		(-D*)
11720			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11721
11722			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11723				&& test -z "${cf_tst_cflags}" \
11724				&& cf_fix_cppflags=yes
11725
11726			if test $cf_fix_cppflags = yes ; then
11727				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11728				continue
11729			elif test "${cf_tst_cflags}" = "\"'" ; then
11730				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11731				continue
11732			fi
11733			;;
11734		esac
11735		case "$CPPFLAGS" in
11736		(*$cf_add_cflags)
11737			;;
11738		(*)
11739			case $cf_add_cflags in
11740			(-D*)
11741				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11742
11743CPPFLAGS=`echo "$CPPFLAGS" | \
11744	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11745		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11746
11747				;;
11748			esac
11749			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11750			;;
11751		esac
11752		;;
11753	(*)
11754		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11755		;;
11756	esac
11757	;;
11758(yes)
11759	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11760
11761	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11762
11763	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11764		&& test -z "${cf_tst_cflags}" \
11765		&& cf_fix_cppflags=no
11766	;;
11767esac
11768done
11769
11770if test -n "$cf_new_cflags" ; then
11771
11772	CFLAGS="$CFLAGS $cf_new_cflags"
11773fi
11774
11775if test -n "$cf_new_cppflags" ; then
11776
11777	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11778fi
11779
11780if test -n "$cf_new_extra_cppflags" ; then
11781
11782	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11783fi
11784
11785cf_add_libs="$cf_pkgconfig_libs"
11786# Filter out duplicates - this happens with badly-designed ".pc" files...
11787for cf_add_1lib in $LIBS
11788do
11789	for cf_add_2lib in $cf_add_libs
11790	do
11791		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11792		then
11793			cf_add_1lib=
11794			break
11795		fi
11796	done
11797	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11798done
11799LIBS="$cf_add_libs"
11800
11801	:
11802else
11803	cf_pkgconfig_incs=
11804	cf_pkgconfig_libs=
11805	{ echo "$as_me:11805: WARNING: unable to find Xt library" >&5
11806echo "$as_me: WARNING: unable to find Xt library" >&2;}
11807fi
11808
11809fi
11810
11811cf_have_X_LIBS=no
11812
11813if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
11814	test -n "$verbose" && echo "	found package xt" 1>&6
11815
11816echo "${as_me:-configure}:11816: testing found package xt ..." 1>&5
11817
11818	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
11819	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
11820	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
11821
11822echo "${as_me:-configure}:11822: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11823
11824	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
11825
11826echo "${as_me:-configure}:11826: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
11827
11828cf_fix_cppflags=no
11829cf_new_cflags=
11830cf_new_cppflags=
11831cf_new_extra_cppflags=
11832
11833for cf_add_cflags in $cf_pkgconfig_incs
11834do
11835case $cf_fix_cppflags in
11836(no)
11837	case $cf_add_cflags in
11838	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11839		case $cf_add_cflags in
11840		(-D*)
11841			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11842
11843			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11844				&& test -z "${cf_tst_cflags}" \
11845				&& cf_fix_cppflags=yes
11846
11847			if test $cf_fix_cppflags = yes ; then
11848				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11849				continue
11850			elif test "${cf_tst_cflags}" = "\"'" ; then
11851				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11852				continue
11853			fi
11854			;;
11855		esac
11856		case "$CPPFLAGS" in
11857		(*$cf_add_cflags)
11858			;;
11859		(*)
11860			case $cf_add_cflags in
11861			(-D*)
11862				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11863
11864CPPFLAGS=`echo "$CPPFLAGS" | \
11865	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11866		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11867
11868				;;
11869			esac
11870			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
11871			;;
11872		esac
11873		;;
11874	(*)
11875		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
11876		;;
11877	esac
11878	;;
11879(yes)
11880	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
11881
11882	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11883
11884	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11885		&& test -z "${cf_tst_cflags}" \
11886		&& cf_fix_cppflags=no
11887	;;
11888esac
11889done
11890
11891if test -n "$cf_new_cflags" ; then
11892
11893	CFLAGS="$CFLAGS $cf_new_cflags"
11894fi
11895
11896if test -n "$cf_new_cppflags" ; then
11897
11898	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
11899fi
11900
11901if test -n "$cf_new_extra_cppflags" ; then
11902
11903	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
11904fi
11905
11906cf_add_libs="$cf_pkgconfig_libs"
11907# Filter out duplicates - this happens with badly-designed ".pc" files...
11908for cf_add_1lib in $LIBS
11909do
11910	for cf_add_2lib in $cf_add_libs
11911	do
11912		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11913		then
11914			cf_add_1lib=
11915			break
11916		fi
11917	done
11918	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11919done
11920LIBS="$cf_add_libs"
11921
11922	case "x$LIBS" in
11923	(*-lX11*)
11924		;;
11925	(*)
11926# we have an "xt" package, but it may omit Xt's dependency on X11
11927echo "$as_me:11927: checking for usable X dependency" >&5
11928echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
11929if test "${cf_cv_xt_x11_compat+set}" = set; then
11930  echo $ECHO_N "(cached) $ECHO_C" >&6
11931else
11932
11933cat >conftest.$ac_ext <<_ACEOF
11934#line 11934 "configure"
11935#include "confdefs.h"
11936
11937#include <X11/Xlib.h>
11938
11939int
11940main ()
11941{
11942
11943	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
11944	int rc2 = XClearWindow((Display*) 0, (Window) 0);
11945	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
11946	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
11947
11948  ;
11949  return 0;
11950}
11951_ACEOF
11952rm -f conftest.$ac_objext conftest$ac_exeext
11953if { (eval echo "$as_me:11953: \"$ac_link\"") >&5
11954  (eval $ac_link) 2>&5
11955  ac_status=$?
11956  echo "$as_me:11956: \$? = $ac_status" >&5
11957  (exit $ac_status); } &&
11958         { ac_try='test -s conftest$ac_exeext'
11959  { (eval echo "$as_me:11959: \"$ac_try\"") >&5
11960  (eval $ac_try) 2>&5
11961  ac_status=$?
11962  echo "$as_me:11962: \$? = $ac_status" >&5
11963  (exit $ac_status); }; }; then
11964  cf_cv_xt_x11_compat=yes
11965else
11966  echo "$as_me: failed program was:" >&5
11967cat conftest.$ac_ext >&5
11968cf_cv_xt_x11_compat=no
11969fi
11970rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11971fi
11972echo "$as_me:11972: result: $cf_cv_xt_x11_compat" >&5
11973echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
11974		if test "$cf_cv_xt_x11_compat" = no
11975		then
11976			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
11977
11978echo "${as_me:-configure}:11978: testing work around broken X11 dependency ..." 1>&5
11979
11980			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
11981
11982if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
11983	test -n "$verbose" && echo "	found package x11" 1>&6
11984
11985echo "${as_me:-configure}:11985: testing found package x11 ..." 1>&5
11986
11987	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
11988	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
11989	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
11990
11991echo "${as_me:-configure}:11991: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11992
11993	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
11994
11995echo "${as_me:-configure}:11995: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
11996
11997cf_fix_cppflags=no
11998cf_new_cflags=
11999cf_new_cppflags=
12000cf_new_extra_cppflags=
12001
12002for cf_add_cflags in $cf_pkgconfig_incs
12003do
12004case $cf_fix_cppflags in
12005(no)
12006	case $cf_add_cflags in
12007	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12008		case $cf_add_cflags in
12009		(-D*)
12010			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12011
12012			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12013				&& test -z "${cf_tst_cflags}" \
12014				&& cf_fix_cppflags=yes
12015
12016			if test $cf_fix_cppflags = yes ; then
12017				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12018				continue
12019			elif test "${cf_tst_cflags}" = "\"'" ; then
12020				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12021				continue
12022			fi
12023			;;
12024		esac
12025		case "$CPPFLAGS" in
12026		(*$cf_add_cflags)
12027			;;
12028		(*)
12029			case $cf_add_cflags in
12030			(-D*)
12031				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12032
12033CPPFLAGS=`echo "$CPPFLAGS" | \
12034	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12035		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12036
12037				;;
12038			esac
12039			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12040			;;
12041		esac
12042		;;
12043	(*)
12044		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12045		;;
12046	esac
12047	;;
12048(yes)
12049	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12050
12051	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12052
12053	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12054		&& test -z "${cf_tst_cflags}" \
12055		&& cf_fix_cppflags=no
12056	;;
12057esac
12058done
12059
12060if test -n "$cf_new_cflags" ; then
12061
12062	CFLAGS="$CFLAGS $cf_new_cflags"
12063fi
12064
12065if test -n "$cf_new_cppflags" ; then
12066
12067	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12068fi
12069
12070if test -n "$cf_new_extra_cppflags" ; then
12071
12072	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12073fi
12074
12075cf_add_libs="$cf_pkgconfig_libs"
12076# Filter out duplicates - this happens with badly-designed ".pc" files...
12077for cf_add_1lib in $LIBS
12078do
12079	for cf_add_2lib in $cf_add_libs
12080	do
12081		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12082		then
12083			cf_add_1lib=
12084			break
12085		fi
12086	done
12087	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12088done
12089LIBS="$cf_add_libs"
12090
12091	:
12092else
12093	cf_pkgconfig_incs=
12094	cf_pkgconfig_libs=
12095
12096test -n "$verbose" && echo "	...before $LIBS" 1>&6
12097
12098echo "${as_me:-configure}:12098: testing ...before $LIBS ..." 1>&5
12099
12100LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
12101test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12102
12103echo "${as_me:-configure}:12103: testing ...after  $LIBS ..." 1>&5
12104
12105fi
12106
12107		fi
12108		;;
12109	esac
12110
12111echo "$as_me:12111: checking for usable X Toolkit package" >&5
12112echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12113if test "${cf_cv_xt_ice_compat+set}" = set; then
12114  echo $ECHO_N "(cached) $ECHO_C" >&6
12115else
12116
12117cat >conftest.$ac_ext <<_ACEOF
12118#line 12118 "configure"
12119#include "confdefs.h"
12120
12121#include <X11/Shell.h>
12122
12123int
12124main ()
12125{
12126int num = IceConnectionNumber(0)
12127
12128  ;
12129  return 0;
12130}
12131_ACEOF
12132rm -f conftest.$ac_objext conftest$ac_exeext
12133if { (eval echo "$as_me:12133: \"$ac_link\"") >&5
12134  (eval $ac_link) 2>&5
12135  ac_status=$?
12136  echo "$as_me:12136: \$? = $ac_status" >&5
12137  (exit $ac_status); } &&
12138         { ac_try='test -s conftest$ac_exeext'
12139  { (eval echo "$as_me:12139: \"$ac_try\"") >&5
12140  (eval $ac_try) 2>&5
12141  ac_status=$?
12142  echo "$as_me:12142: \$? = $ac_status" >&5
12143  (exit $ac_status); }; }; then
12144  cf_cv_xt_ice_compat=yes
12145else
12146  echo "$as_me: failed program was:" >&5
12147cat conftest.$ac_ext >&5
12148cf_cv_xt_ice_compat=no
12149fi
12150rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12151fi
12152echo "$as_me:12152: result: $cf_cv_xt_ice_compat" >&5
12153echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12154
12155	if test "$cf_cv_xt_ice_compat" = no
12156	then
12157		# workaround for broken ".pc" files used for X Toolkit.
12158		case "x$X_PRE_LIBS" in
12159		(*-lICE*)
12160			case "x$LIBS" in
12161			(*-lICE*)
12162				;;
12163			(*)
12164				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
12165
12166echo "${as_me:-configure}:12166: testing work around broken ICE dependency ..." 1>&5
12167
12168if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12169	test -n "$verbose" && echo "	found package ice" 1>&6
12170
12171echo "${as_me:-configure}:12171: testing found package ice ..." 1>&5
12172
12173	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12174	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
12175	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12176
12177echo "${as_me:-configure}:12177: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12178
12179	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
12180
12181echo "${as_me:-configure}:12181: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12182
12183cf_fix_cppflags=no
12184cf_new_cflags=
12185cf_new_cppflags=
12186cf_new_extra_cppflags=
12187
12188for cf_add_cflags in $cf_pkgconfig_incs
12189do
12190case $cf_fix_cppflags in
12191(no)
12192	case $cf_add_cflags in
12193	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12194		case $cf_add_cflags in
12195		(-D*)
12196			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12197
12198			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12199				&& test -z "${cf_tst_cflags}" \
12200				&& cf_fix_cppflags=yes
12201
12202			if test $cf_fix_cppflags = yes ; then
12203				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12204				continue
12205			elif test "${cf_tst_cflags}" = "\"'" ; then
12206				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12207				continue
12208			fi
12209			;;
12210		esac
12211		case "$CPPFLAGS" in
12212		(*$cf_add_cflags)
12213			;;
12214		(*)
12215			case $cf_add_cflags in
12216			(-D*)
12217				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12218
12219CPPFLAGS=`echo "$CPPFLAGS" | \
12220	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12221		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12222
12223				;;
12224			esac
12225			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12226			;;
12227		esac
12228		;;
12229	(*)
12230		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12231		;;
12232	esac
12233	;;
12234(yes)
12235	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12236
12237	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12238
12239	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12240		&& test -z "${cf_tst_cflags}" \
12241		&& cf_fix_cppflags=no
12242	;;
12243esac
12244done
12245
12246if test -n "$cf_new_cflags" ; then
12247
12248	CFLAGS="$CFLAGS $cf_new_cflags"
12249fi
12250
12251if test -n "$cf_new_cppflags" ; then
12252
12253	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12254fi
12255
12256if test -n "$cf_new_extra_cppflags" ; then
12257
12258	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12259fi
12260
12261cf_add_libs="$cf_pkgconfig_libs"
12262# Filter out duplicates - this happens with badly-designed ".pc" files...
12263for cf_add_1lib in $LIBS
12264do
12265	for cf_add_2lib in $cf_add_libs
12266	do
12267		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12268		then
12269			cf_add_1lib=
12270			break
12271		fi
12272	done
12273	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12274done
12275LIBS="$cf_add_libs"
12276
12277if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12278	test -n "$verbose" && echo "	found package sm" 1>&6
12279
12280echo "${as_me:-configure}:12280: testing found package sm ..." 1>&5
12281
12282	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12283	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
12284	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12285
12286echo "${as_me:-configure}:12286: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12287
12288	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
12289
12290echo "${as_me:-configure}:12290: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12291
12292cf_fix_cppflags=no
12293cf_new_cflags=
12294cf_new_cppflags=
12295cf_new_extra_cppflags=
12296
12297for cf_add_cflags in $cf_pkgconfig_incs
12298do
12299case $cf_fix_cppflags in
12300(no)
12301	case $cf_add_cflags in
12302	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12303		case $cf_add_cflags in
12304		(-D*)
12305			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12306
12307			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12308				&& test -z "${cf_tst_cflags}" \
12309				&& cf_fix_cppflags=yes
12310
12311			if test $cf_fix_cppflags = yes ; then
12312				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12313				continue
12314			elif test "${cf_tst_cflags}" = "\"'" ; then
12315				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12316				continue
12317			fi
12318			;;
12319		esac
12320		case "$CPPFLAGS" in
12321		(*$cf_add_cflags)
12322			;;
12323		(*)
12324			case $cf_add_cflags in
12325			(-D*)
12326				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12327
12328CPPFLAGS=`echo "$CPPFLAGS" | \
12329	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12330		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12331
12332				;;
12333			esac
12334			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12335			;;
12336		esac
12337		;;
12338	(*)
12339		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12340		;;
12341	esac
12342	;;
12343(yes)
12344	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12345
12346	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12347
12348	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12349		&& test -z "${cf_tst_cflags}" \
12350		&& cf_fix_cppflags=no
12351	;;
12352esac
12353done
12354
12355if test -n "$cf_new_cflags" ; then
12356
12357	CFLAGS="$CFLAGS $cf_new_cflags"
12358fi
12359
12360if test -n "$cf_new_cppflags" ; then
12361
12362	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12363fi
12364
12365if test -n "$cf_new_extra_cppflags" ; then
12366
12367	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12368fi
12369
12370cf_add_libs="$cf_pkgconfig_libs"
12371# Filter out duplicates - this happens with badly-designed ".pc" files...
12372for cf_add_1lib in $LIBS
12373do
12374	for cf_add_2lib in $cf_add_libs
12375	do
12376		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12377		then
12378			cf_add_1lib=
12379			break
12380		fi
12381	done
12382	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12383done
12384LIBS="$cf_add_libs"
12385
12386	:
12387else
12388	cf_pkgconfig_incs=
12389	cf_pkgconfig_libs=
12390	:
12391fi
12392
12393else
12394	cf_pkgconfig_incs=
12395	cf_pkgconfig_libs=
12396
12397test -n "$verbose" && echo "	...before $LIBS" 1>&6
12398
12399echo "${as_me:-configure}:12399: testing ...before $LIBS ..." 1>&5
12400
12401LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
12402test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12403
12404echo "${as_me:-configure}:12404: testing ...after  $LIBS ..." 1>&5
12405
12406fi
12407
12408				;;
12409			esac
12410			;;
12411		esac
12412	fi
12413
12414	cf_have_X_LIBS=yes
12415
12416else
12417	cf_pkgconfig_incs=
12418	cf_pkgconfig_libs=
12419
12420	LDFLAGS="$X_LIBS $LDFLAGS"
12421
12422test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
12423
12424echo "${as_me:-configure}:12424: testing checking additions to CFLAGS ..." 1>&5
12425
12426cf_check_cflags="$CFLAGS"
12427cf_check_cppflags="$CPPFLAGS"
12428
12429cf_fix_cppflags=no
12430cf_new_cflags=
12431cf_new_cppflags=
12432cf_new_extra_cppflags=
12433
12434for cf_add_cflags in $X_CFLAGS
12435do
12436case $cf_fix_cppflags in
12437(no)
12438	case $cf_add_cflags in
12439	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12440		case $cf_add_cflags in
12441		(-D*)
12442			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12443
12444			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12445				&& test -z "${cf_tst_cflags}" \
12446				&& cf_fix_cppflags=yes
12447
12448			if test $cf_fix_cppflags = yes ; then
12449				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12450				continue
12451			elif test "${cf_tst_cflags}" = "\"'" ; then
12452				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12453				continue
12454			fi
12455			;;
12456		esac
12457		case "$CPPFLAGS" in
12458		(*$cf_add_cflags)
12459			;;
12460		(*)
12461			case $cf_add_cflags in
12462			(-D*)
12463				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12464
12465CPPFLAGS=`echo "$CPPFLAGS" | \
12466	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12467		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12468
12469				;;
12470			esac
12471			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
12472			;;
12473		esac
12474		;;
12475	(*)
12476		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
12477		;;
12478	esac
12479	;;
12480(yes)
12481	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
12482
12483	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12484
12485	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12486		&& test -z "${cf_tst_cflags}" \
12487		&& cf_fix_cppflags=no
12488	;;
12489esac
12490done
12491
12492if test -n "$cf_new_cflags" ; then
12493	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
12494
12495echo "${as_me:-configure}:12495: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12496
12497	CFLAGS="$CFLAGS $cf_new_cflags"
12498fi
12499
12500if test -n "$cf_new_cppflags" ; then
12501	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12502
12503echo "${as_me:-configure}:12503: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12504
12505	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
12506fi
12507
12508if test -n "$cf_new_extra_cppflags" ; then
12509	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12510
12511echo "${as_me:-configure}:12511: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12512
12513	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
12514fi
12515
12516if test "x$cf_check_cflags" != "x$CFLAGS" ; then
12517cat >conftest.$ac_ext <<_ACEOF
12518#line 12518 "configure"
12519#include "confdefs.h"
12520#include <stdio.h>
12521int
12522main ()
12523{
12524printf("Hello world");
12525  ;
12526  return 0;
12527}
12528_ACEOF
12529rm -f conftest.$ac_objext conftest$ac_exeext
12530if { (eval echo "$as_me:12530: \"$ac_link\"") >&5
12531  (eval $ac_link) 2>&5
12532  ac_status=$?
12533  echo "$as_me:12533: \$? = $ac_status" >&5
12534  (exit $ac_status); } &&
12535         { ac_try='test -s conftest$ac_exeext'
12536  { (eval echo "$as_me:12536: \"$ac_try\"") >&5
12537  (eval $ac_try) 2>&5
12538  ac_status=$?
12539  echo "$as_me:12539: \$? = $ac_status" >&5
12540  (exit $ac_status); }; }; then
12541  :
12542else
12543  echo "$as_me: failed program was:" >&5
12544cat conftest.$ac_ext >&5
12545test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
12546
12547echo "${as_me:-configure}:12547: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
12548
12549	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
12550		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
12551
12552echo "${as_me:-configure}:12552: testing but keeping change to \$CPPFLAGS ..." 1>&5
12553
12554	 fi
12555	 CFLAGS="$cf_check_flags"
12556fi
12557rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12558fi
12559
12560	echo "$as_me:12560: checking for XOpenDisplay" >&5
12561echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
12562if test "${ac_cv_func_XOpenDisplay+set}" = set; then
12563  echo $ECHO_N "(cached) $ECHO_C" >&6
12564else
12565  cat >conftest.$ac_ext <<_ACEOF
12566#line 12566 "configure"
12567#include "confdefs.h"
12568/* System header to define __stub macros and hopefully few prototypes,
12569    which can conflict with char XOpenDisplay (); below.  */
12570#include <assert.h>
12571/* Override any gcc2 internal prototype to avoid an error.  */
12572#ifdef __cplusplus
12573extern "C"
12574#endif
12575/* We use char because int might match the return type of a gcc2
12576   builtin and then its argument prototype would still apply.  */
12577char XOpenDisplay ();
12578char (*f) ();
12579
12580int
12581main ()
12582{
12583/* The GNU C library defines this for functions which it implements
12584    to always fail with ENOSYS.  Some functions are actually named
12585    something starting with __ and the normal name is an alias.  */
12586#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
12587choke me
12588#else
12589f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12590#endif
12591
12592  ;
12593  return 0;
12594}
12595_ACEOF
12596rm -f conftest.$ac_objext conftest$ac_exeext
12597if { (eval echo "$as_me:12597: \"$ac_link\"") >&5
12598  (eval $ac_link) 2>&5
12599  ac_status=$?
12600  echo "$as_me:12600: \$? = $ac_status" >&5
12601  (exit $ac_status); } &&
12602         { ac_try='test -s conftest$ac_exeext'
12603  { (eval echo "$as_me:12603: \"$ac_try\"") >&5
12604  (eval $ac_try) 2>&5
12605  ac_status=$?
12606  echo "$as_me:12606: \$? = $ac_status" >&5
12607  (exit $ac_status); }; }; then
12608  ac_cv_func_XOpenDisplay=yes
12609else
12610  echo "$as_me: failed program was:" >&5
12611cat conftest.$ac_ext >&5
12612ac_cv_func_XOpenDisplay=no
12613fi
12614rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12615fi
12616echo "$as_me:12616: result: $ac_cv_func_XOpenDisplay" >&5
12617echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
12618if test $ac_cv_func_XOpenDisplay = yes; then
12619  :
12620else
12621
12622	echo "$as_me:12622: checking for XOpenDisplay in -lX11" >&5
12623echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
12624if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
12625  echo $ECHO_N "(cached) $ECHO_C" >&6
12626else
12627  ac_check_lib_save_LIBS=$LIBS
12628LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12629cat >conftest.$ac_ext <<_ACEOF
12630#line 12630 "configure"
12631#include "confdefs.h"
12632
12633/* Override any gcc2 internal prototype to avoid an error.  */
12634#ifdef __cplusplus
12635extern "C"
12636#endif
12637/* We use char because int might match the return type of a gcc2
12638   builtin and then its argument prototype would still apply.  */
12639char XOpenDisplay ();
12640int
12641main ()
12642{
12643XOpenDisplay ();
12644  ;
12645  return 0;
12646}
12647_ACEOF
12648rm -f conftest.$ac_objext conftest$ac_exeext
12649if { (eval echo "$as_me:12649: \"$ac_link\"") >&5
12650  (eval $ac_link) 2>&5
12651  ac_status=$?
12652  echo "$as_me:12652: \$? = $ac_status" >&5
12653  (exit $ac_status); } &&
12654         { ac_try='test -s conftest$ac_exeext'
12655  { (eval echo "$as_me:12655: \"$ac_try\"") >&5
12656  (eval $ac_try) 2>&5
12657  ac_status=$?
12658  echo "$as_me:12658: \$? = $ac_status" >&5
12659  (exit $ac_status); }; }; then
12660  ac_cv_lib_X11_XOpenDisplay=yes
12661else
12662  echo "$as_me: failed program was:" >&5
12663cat conftest.$ac_ext >&5
12664ac_cv_lib_X11_XOpenDisplay=no
12665fi
12666rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12667LIBS=$ac_check_lib_save_LIBS
12668fi
12669echo "$as_me:12669: result: $ac_cv_lib_X11_XOpenDisplay" >&5
12670echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
12671if test $ac_cv_lib_X11_XOpenDisplay = yes; then
12672
12673cf_add_libs="-lX11"
12674# Filter out duplicates - this happens with badly-designed ".pc" files...
12675for cf_add_1lib in $LIBS
12676do
12677	for cf_add_2lib in $cf_add_libs
12678	do
12679		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12680		then
12681			cf_add_1lib=
12682			break
12683		fi
12684	done
12685	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12686done
12687LIBS="$cf_add_libs"
12688
12689fi
12690
12691fi
12692
12693	echo "$as_me:12693: checking for XtAppInitialize" >&5
12694echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
12695if test "${ac_cv_func_XtAppInitialize+set}" = set; then
12696  echo $ECHO_N "(cached) $ECHO_C" >&6
12697else
12698  cat >conftest.$ac_ext <<_ACEOF
12699#line 12699 "configure"
12700#include "confdefs.h"
12701/* System header to define __stub macros and hopefully few prototypes,
12702    which can conflict with char XtAppInitialize (); below.  */
12703#include <assert.h>
12704/* Override any gcc2 internal prototype to avoid an error.  */
12705#ifdef __cplusplus
12706extern "C"
12707#endif
12708/* We use char because int might match the return type of a gcc2
12709   builtin and then its argument prototype would still apply.  */
12710char XtAppInitialize ();
12711char (*f) ();
12712
12713int
12714main ()
12715{
12716/* The GNU C library defines this for functions which it implements
12717    to always fail with ENOSYS.  Some functions are actually named
12718    something starting with __ and the normal name is an alias.  */
12719#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
12720choke me
12721#else
12722f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
12723#endif
12724
12725  ;
12726  return 0;
12727}
12728_ACEOF
12729rm -f conftest.$ac_objext conftest$ac_exeext
12730if { (eval echo "$as_me:12730: \"$ac_link\"") >&5
12731  (eval $ac_link) 2>&5
12732  ac_status=$?
12733  echo "$as_me:12733: \$? = $ac_status" >&5
12734  (exit $ac_status); } &&
12735         { ac_try='test -s conftest$ac_exeext'
12736  { (eval echo "$as_me:12736: \"$ac_try\"") >&5
12737  (eval $ac_try) 2>&5
12738  ac_status=$?
12739  echo "$as_me:12739: \$? = $ac_status" >&5
12740  (exit $ac_status); }; }; then
12741  ac_cv_func_XtAppInitialize=yes
12742else
12743  echo "$as_me: failed program was:" >&5
12744cat conftest.$ac_ext >&5
12745ac_cv_func_XtAppInitialize=no
12746fi
12747rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12748fi
12749echo "$as_me:12749: result: $ac_cv_func_XtAppInitialize" >&5
12750echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
12751if test $ac_cv_func_XtAppInitialize = yes; then
12752  :
12753else
12754
12755	echo "$as_me:12755: checking for XtAppInitialize in -lXt" >&5
12756echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
12757if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
12758  echo $ECHO_N "(cached) $ECHO_C" >&6
12759else
12760  ac_check_lib_save_LIBS=$LIBS
12761LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
12762cat >conftest.$ac_ext <<_ACEOF
12763#line 12763 "configure"
12764#include "confdefs.h"
12765
12766/* Override any gcc2 internal prototype to avoid an error.  */
12767#ifdef __cplusplus
12768extern "C"
12769#endif
12770/* We use char because int might match the return type of a gcc2
12771   builtin and then its argument prototype would still apply.  */
12772char XtAppInitialize ();
12773int
12774main ()
12775{
12776XtAppInitialize ();
12777  ;
12778  return 0;
12779}
12780_ACEOF
12781rm -f conftest.$ac_objext conftest$ac_exeext
12782if { (eval echo "$as_me:12782: \"$ac_link\"") >&5
12783  (eval $ac_link) 2>&5
12784  ac_status=$?
12785  echo "$as_me:12785: \$? = $ac_status" >&5
12786  (exit $ac_status); } &&
12787         { ac_try='test -s conftest$ac_exeext'
12788  { (eval echo "$as_me:12788: \"$ac_try\"") >&5
12789  (eval $ac_try) 2>&5
12790  ac_status=$?
12791  echo "$as_me:12791: \$? = $ac_status" >&5
12792  (exit $ac_status); }; }; then
12793  ac_cv_lib_Xt_XtAppInitialize=yes
12794else
12795  echo "$as_me: failed program was:" >&5
12796cat conftest.$ac_ext >&5
12797ac_cv_lib_Xt_XtAppInitialize=no
12798fi
12799rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12800LIBS=$ac_check_lib_save_LIBS
12801fi
12802echo "$as_me:12802: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
12803echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
12804if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
12805
12806cat >>confdefs.h <<\EOF
12807#define HAVE_LIBXT 1
12808EOF
12809
12810		 cf_have_X_LIBS=Xt
12811		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
12812fi
12813
12814fi
12815
12816fi
12817
12818if test $cf_have_X_LIBS = no ; then
12819	{ echo "$as_me:12819: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12820test program.  You will have to check and add the proper libraries by hand
12821to makefile." >&5
12822echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
12823test program.  You will have to check and add the proper libraries by hand
12824to makefile." >&2;}
12825fi
12826
12827cf_x_athena_root=$cf_x_athena
12828cf_x_athena_inc=""
12829
12830for cf_path in default \
12831	/usr/contrib/X11R6 \
12832	/usr/contrib/X11R5 \
12833	/usr/lib/X11R5 \
12834	/usr/local
12835do
12836	if test -z "$cf_x_athena_inc" ; then
12837		cf_save="$CPPFLAGS"
12838		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
12839		if test $cf_path != default ; then
12840			CPPFLAGS="$cf_save -I$cf_path/include"
12841			echo "$as_me:12841: checking for $cf_test in $cf_path" >&5
12842echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
12843		else
12844			echo "$as_me:12844: checking for $cf_test" >&5
12845echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
12846		fi
12847		cat >conftest.$ac_ext <<_ACEOF
12848#line 12848 "configure"
12849#include "confdefs.h"
12850
12851#include <X11/Intrinsic.h>
12852#include <$cf_test>
12853int
12854main ()
12855{
12856
12857  ;
12858  return 0;
12859}
12860_ACEOF
12861rm -f conftest.$ac_objext
12862if { (eval echo "$as_me:12862: \"$ac_compile\"") >&5
12863  (eval $ac_compile) 2>&5
12864  ac_status=$?
12865  echo "$as_me:12865: \$? = $ac_status" >&5
12866  (exit $ac_status); } &&
12867         { ac_try='test -s conftest.$ac_objext'
12868  { (eval echo "$as_me:12868: \"$ac_try\"") >&5
12869  (eval $ac_try) 2>&5
12870  ac_status=$?
12871  echo "$as_me:12871: \$? = $ac_status" >&5
12872  (exit $ac_status); }; }; then
12873  cf_result=yes
12874else
12875  echo "$as_me: failed program was:" >&5
12876cat conftest.$ac_ext >&5
12877cf_result=no
12878fi
12879rm -f conftest.$ac_objext conftest.$ac_ext
12880		echo "$as_me:12880: result: $cf_result" >&5
12881echo "${ECHO_T}$cf_result" >&6
12882		if test "$cf_result" = yes ; then
12883			cf_x_athena_inc=$cf_path
12884			break
12885		else
12886			CPPFLAGS="$cf_save"
12887		fi
12888	fi
12889done
12890
12891if test -z "$cf_x_athena_inc" ; then
12892	{ echo "$as_me:12892: WARNING: Unable to successfully find Athena header files with test program" >&5
12893echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
12894elif test "$cf_x_athena_inc" != default ; then
12895	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
12896fi
12897
12898cf_x_athena_root=$cf_x_athena
12899cf_x_athena_lib=""
12900
12901for cf_path in default \
12902	/usr/contrib/X11R6 \
12903	/usr/contrib/X11R5 \
12904	/usr/lib/X11R5 \
12905	/usr/local
12906do
12907	for cf_lib in \
12908		${cf_x_athena_root} \
12909		${cf_x_athena_root}7 \
12910		${cf_x_athena_root}6
12911	do
12912	for cf_libs in \
12913		"-l$cf_lib -lXmu" \
12914		"-l$cf_lib -lXpm -lXmu" \
12915		"-l${cf_lib}_s -lXmu_s"
12916	do
12917		if test -z "$cf_x_athena_lib" ; then
12918			cf_save="$LIBS"
12919			cf_test=XawSimpleMenuAddGlobalActions
12920			if test $cf_path != default ; then
12921
12922cf_add_libs="-L$cf_path/lib $cf_libs"
12923# Filter out duplicates - this happens with badly-designed ".pc" files...
12924for cf_add_1lib in $LIBS
12925do
12926	for cf_add_2lib in $cf_add_libs
12927	do
12928		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12929		then
12930			cf_add_1lib=
12931			break
12932		fi
12933	done
12934	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12935done
12936LIBS="$cf_add_libs"
12937
12938				echo "$as_me:12938: checking for $cf_libs in $cf_path" >&5
12939echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
12940			else
12941
12942cf_add_libs="$cf_libs"
12943# Filter out duplicates - this happens with badly-designed ".pc" files...
12944for cf_add_1lib in $LIBS
12945do
12946	for cf_add_2lib in $cf_add_libs
12947	do
12948		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12949		then
12950			cf_add_1lib=
12951			break
12952		fi
12953	done
12954	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12955done
12956LIBS="$cf_add_libs"
12957
12958				echo "$as_me:12958: checking for $cf_test in $cf_libs" >&5
12959echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
12960			fi
12961			cat >conftest.$ac_ext <<_ACEOF
12962#line 12962 "configure"
12963#include "confdefs.h"
12964
12965#include <X11/Intrinsic.h>
12966#include <X11/$cf_x_athena_root/SimpleMenu.h>
12967
12968int
12969main ()
12970{
12971
12972$cf_test((XtAppContext) 0)
12973  ;
12974  return 0;
12975}
12976_ACEOF
12977rm -f conftest.$ac_objext conftest$ac_exeext
12978if { (eval echo "$as_me:12978: \"$ac_link\"") >&5
12979  (eval $ac_link) 2>&5
12980  ac_status=$?
12981  echo "$as_me:12981: \$? = $ac_status" >&5
12982  (exit $ac_status); } &&
12983         { ac_try='test -s conftest$ac_exeext'
12984  { (eval echo "$as_me:12984: \"$ac_try\"") >&5
12985  (eval $ac_try) 2>&5
12986  ac_status=$?
12987  echo "$as_me:12987: \$? = $ac_status" >&5
12988  (exit $ac_status); }; }; then
12989  cf_result=yes
12990else
12991  echo "$as_me: failed program was:" >&5
12992cat conftest.$ac_ext >&5
12993cf_result=no
12994fi
12995rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12996			echo "$as_me:12996: result: $cf_result" >&5
12997echo "${ECHO_T}$cf_result" >&6
12998			if test "$cf_result" = yes ; then
12999				cf_x_athena_lib="$cf_libs"
13000				break
13001			fi
13002			LIBS="$cf_save"
13003		fi
13004	done # cf_libs
13005		test -n "$cf_x_athena_lib" && break
13006	done # cf_lib
13007done
13008
13009if test -z "$cf_x_athena_lib" ; then
13010	{ { echo "$as_me:13010: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13011echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13012   { (exit 1); exit 1; }; }
13013fi
13014
13015cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13016
13017cat >>confdefs.h <<EOF
13018#define $cf_x_athena_LIBS 1
13019EOF
13020
13021fi
13022
13023for ac_header in X11/Xpoll.h
13024do
13025as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13026echo "$as_me:13026: checking for $ac_header" >&5
13027echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13028if eval "test \"\${$as_ac_Header+set}\" = set"; then
13029  echo $ECHO_N "(cached) $ECHO_C" >&6
13030else
13031  cat >conftest.$ac_ext <<_ACEOF
13032#line 13032 "configure"
13033#include "confdefs.h"
13034#include <$ac_header>
13035_ACEOF
13036if { (eval echo "$as_me:13036: \"$ac_cpp conftest.$ac_ext\"") >&5
13037  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13038  ac_status=$?
13039  egrep -v '^ *\+' conftest.er1 >conftest.err
13040  rm -f conftest.er1
13041  cat conftest.err >&5
13042  echo "$as_me:13042: \$? = $ac_status" >&5
13043  (exit $ac_status); } >/dev/null; then
13044  if test -s conftest.err; then
13045    ac_cpp_err=$ac_c_preproc_warn_flag
13046  else
13047    ac_cpp_err=
13048  fi
13049else
13050  ac_cpp_err=yes
13051fi
13052if test -z "$ac_cpp_err"; then
13053  eval "$as_ac_Header=yes"
13054else
13055  echo "$as_me: failed program was:" >&5
13056  cat conftest.$ac_ext >&5
13057  eval "$as_ac_Header=no"
13058fi
13059rm -f conftest.err conftest.$ac_ext
13060fi
13061echo "$as_me:13061: result: `eval echo '${'$as_ac_Header'}'`" >&5
13062echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13063if test `eval echo '${'$as_ac_Header'}'` = yes; then
13064  cat >>confdefs.h <<EOF
13065#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13066EOF
13067
13068fi
13069done
13070
13071echo "$as_me:13071: checking for declaration of fd_set" >&5
13072echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
13073if test "${cf_cv_type_fd_set+set}" = set; then
13074  echo $ECHO_N "(cached) $ECHO_C" >&6
13075else
13076
13077echo "${as_me:-configure}:13077: testing sys/types alone ..." 1>&5
13078
13079cat >conftest.$ac_ext <<_ACEOF
13080#line 13080 "configure"
13081#include "confdefs.h"
13082
13083#include <sys/types.h>
13084int
13085main ()
13086{
13087fd_set x
13088  ;
13089  return 0;
13090}
13091_ACEOF
13092rm -f conftest.$ac_objext
13093if { (eval echo "$as_me:13093: \"$ac_compile\"") >&5
13094  (eval $ac_compile) 2>&5
13095  ac_status=$?
13096  echo "$as_me:13096: \$? = $ac_status" >&5
13097  (exit $ac_status); } &&
13098         { ac_try='test -s conftest.$ac_objext'
13099  { (eval echo "$as_me:13099: \"$ac_try\"") >&5
13100  (eval $ac_try) 2>&5
13101  ac_status=$?
13102  echo "$as_me:13102: \$? = $ac_status" >&5
13103  (exit $ac_status); }; }; then
13104  cf_cv_type_fd_set=sys/types.h
13105else
13106  echo "$as_me: failed program was:" >&5
13107cat conftest.$ac_ext >&5
13108
13109echo "${as_me:-configure}:13109: testing X11/Xpoll.h ..." 1>&5
13110
13111cat >conftest.$ac_ext <<_ACEOF
13112#line 13112 "configure"
13113#include "confdefs.h"
13114
13115#ifdef HAVE_X11_XPOLL_H
13116#include <X11/Xpoll.h>
13117#endif
13118int
13119main ()
13120{
13121fd_set x
13122  ;
13123  return 0;
13124}
13125_ACEOF
13126rm -f conftest.$ac_objext
13127if { (eval echo "$as_me:13127: \"$ac_compile\"") >&5
13128  (eval $ac_compile) 2>&5
13129  ac_status=$?
13130  echo "$as_me:13130: \$? = $ac_status" >&5
13131  (exit $ac_status); } &&
13132         { ac_try='test -s conftest.$ac_objext'
13133  { (eval echo "$as_me:13133: \"$ac_try\"") >&5
13134  (eval $ac_try) 2>&5
13135  ac_status=$?
13136  echo "$as_me:13136: \$? = $ac_status" >&5
13137  (exit $ac_status); }; }; then
13138  cf_cv_type_fd_set=X11/Xpoll.h
13139else
13140  echo "$as_me: failed program was:" >&5
13141cat conftest.$ac_ext >&5
13142
13143echo "${as_me:-configure}:13143: testing sys/select.h ..." 1>&5
13144
13145cat >conftest.$ac_ext <<_ACEOF
13146#line 13146 "configure"
13147#include "confdefs.h"
13148
13149#include <sys/types.h>
13150#include <sys/select.h>
13151int
13152main ()
13153{
13154fd_set x
13155  ;
13156  return 0;
13157}
13158_ACEOF
13159rm -f conftest.$ac_objext
13160if { (eval echo "$as_me:13160: \"$ac_compile\"") >&5
13161  (eval $ac_compile) 2>&5
13162  ac_status=$?
13163  echo "$as_me:13163: \$? = $ac_status" >&5
13164  (exit $ac_status); } &&
13165         { ac_try='test -s conftest.$ac_objext'
13166  { (eval echo "$as_me:13166: \"$ac_try\"") >&5
13167  (eval $ac_try) 2>&5
13168  ac_status=$?
13169  echo "$as_me:13169: \$? = $ac_status" >&5
13170  (exit $ac_status); }; }; then
13171  cf_cv_type_fd_set=sys/select.h
13172else
13173  echo "$as_me: failed program was:" >&5
13174cat conftest.$ac_ext >&5
13175cf_cv_type_fd_set=unknown
13176fi
13177rm -f conftest.$ac_objext conftest.$ac_ext
13178fi
13179rm -f conftest.$ac_objext conftest.$ac_ext
13180fi
13181rm -f conftest.$ac_objext conftest.$ac_ext
13182fi
13183echo "$as_me:13183: result: $cf_cv_type_fd_set" >&5
13184echo "${ECHO_T}$cf_cv_type_fd_set" >&6
13185if test $cf_cv_type_fd_set = sys/select.h ; then
13186
13187cat >>confdefs.h <<\EOF
13188#define USE_SYS_SELECT_H 1
13189EOF
13190
13191fi
13192
13193echo "$as_me:13193: checking for declaration of fd_mask" >&5
13194echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
13195if test "${cf_cv_type_fd_mask+set}" = set; then
13196  echo $ECHO_N "(cached) $ECHO_C" >&6
13197else
13198
13199    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
13200        cat >conftest.$ac_ext <<_ACEOF
13201#line 13201 "configure"
13202#include "confdefs.h"
13203
13204#include <X11/Xpoll.h>
13205int
13206main ()
13207{
13208fd_mask x
13209  ;
13210  return 0;
13211}
13212_ACEOF
13213rm -f conftest.$ac_objext
13214if { (eval echo "$as_me:13214: \"$ac_compile\"") >&5
13215  (eval $ac_compile) 2>&5
13216  ac_status=$?
13217  echo "$as_me:13217: \$? = $ac_status" >&5
13218  (exit $ac_status); } &&
13219         { ac_try='test -s conftest.$ac_objext'
13220  { (eval echo "$as_me:13220: \"$ac_try\"") >&5
13221  (eval $ac_try) 2>&5
13222  ac_status=$?
13223  echo "$as_me:13223: \$? = $ac_status" >&5
13224  (exit $ac_status); }; }; then
13225  :
13226else
13227  echo "$as_me: failed program was:" >&5
13228cat conftest.$ac_ext >&5
13229
13230echo "${as_me:-configure}:13230: testing if we must define CSRG_BASED ..." 1>&5
13231
13232# Xosdefs.h on Mac OS X may not define this (but it should).
13233            cat >conftest.$ac_ext <<_ACEOF
13234#line 13234 "configure"
13235#include "confdefs.h"
13236
13237#define CSRG_BASED
13238#include <X11/Xpoll.h>
13239int
13240main ()
13241{
13242fd_mask x
13243  ;
13244  return 0;
13245}
13246_ACEOF
13247rm -f conftest.$ac_objext
13248if { (eval echo "$as_me:13248: \"$ac_compile\"") >&5
13249  (eval $ac_compile) 2>&5
13250  ac_status=$?
13251  echo "$as_me:13251: \$? = $ac_status" >&5
13252  (exit $ac_status); } &&
13253         { ac_try='test -s conftest.$ac_objext'
13254  { (eval echo "$as_me:13254: \"$ac_try\"") >&5
13255  (eval $ac_try) 2>&5
13256  ac_status=$?
13257  echo "$as_me:13257: \$? = $ac_status" >&5
13258  (exit $ac_status); }; }; then
13259  cf_cv_type_fd_mask=CSRG_BASED
13260else
13261  echo "$as_me: failed program was:" >&5
13262cat conftest.$ac_ext >&5
13263fi
13264rm -f conftest.$ac_objext conftest.$ac_ext
13265fi
13266rm -f conftest.$ac_objext conftest.$ac_ext
13267    else
13268        cf_cv_type_fd_mask=$cf_cv_type_fd_set
13269    fi
13270
13271fi
13272echo "$as_me:13272: result: $cf_cv_type_fd_mask" >&5
13273echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
13274if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
13275
13276cat >>confdefs.h <<\EOF
13277#define CSRG_BASED 1
13278EOF
13279
13280fi
13281
13282echo "$as_me:13282: checking for IRIX 6.5 baud-rate redefinitions" >&5
13283echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
13284if test "${cf_cv_termio_c_ispeed+set}" = set; then
13285  echo $ECHO_N "(cached) $ECHO_C" >&6
13286else
13287
13288cat >conftest.$ac_ext <<_ACEOF
13289#line 13289 "configure"
13290#include "confdefs.h"
13291
13292#include <sys/types.h>
13293#include <sys/termio.h>
13294int
13295main ()
13296{
13297
13298struct termio foo;
13299foo.c_ispeed = B38400;
13300foo.c_ospeed = B9600;
13301
13302  ;
13303  return 0;
13304}
13305_ACEOF
13306rm -f conftest.$ac_objext
13307if { (eval echo "$as_me:13307: \"$ac_compile\"") >&5
13308  (eval $ac_compile) 2>&5
13309  ac_status=$?
13310  echo "$as_me:13310: \$? = $ac_status" >&5
13311  (exit $ac_status); } &&
13312         { ac_try='test -s conftest.$ac_objext'
13313  { (eval echo "$as_me:13313: \"$ac_try\"") >&5
13314  (eval $ac_try) 2>&5
13315  ac_status=$?
13316  echo "$as_me:13316: \$? = $ac_status" >&5
13317  (exit $ac_status); }; }; then
13318  cf_cv_termio_c_ispeed=yes
13319
13320else
13321  echo "$as_me: failed program was:" >&5
13322cat conftest.$ac_ext >&5
13323cf_cv_termio_c_ispeed=no
13324fi
13325rm -f conftest.$ac_objext conftest.$ac_ext
13326
13327fi
13328echo "$as_me:13328: result: $cf_cv_termio_c_ispeed" >&5
13329echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
13330test "$cf_cv_termio_c_ispeed" = yes &&
13331cat >>confdefs.h <<\EOF
13332#define HAVE_TERMIO_C_ISPEED 1
13333EOF
13334
13335# If we notice Xcursor, there is a workaround needed.
13336echo "$as_me:13336: checking for XcursorGetTheme in -lXcursor" >&5
13337echo $ECHO_N "checking for XcursorGetTheme in -lXcursor... $ECHO_C" >&6
13338if test "${ac_cv_lib_Xcursor_XcursorGetTheme+set}" = set; then
13339  echo $ECHO_N "(cached) $ECHO_C" >&6
13340else
13341  ac_check_lib_save_LIBS=$LIBS
13342LIBS="-lXcursor  $LIBS"
13343cat >conftest.$ac_ext <<_ACEOF
13344#line 13344 "configure"
13345#include "confdefs.h"
13346
13347/* Override any gcc2 internal prototype to avoid an error.  */
13348#ifdef __cplusplus
13349extern "C"
13350#endif
13351/* We use char because int might match the return type of a gcc2
13352   builtin and then its argument prototype would still apply.  */
13353char XcursorGetTheme ();
13354int
13355main ()
13356{
13357XcursorGetTheme ();
13358  ;
13359  return 0;
13360}
13361_ACEOF
13362rm -f conftest.$ac_objext conftest$ac_exeext
13363if { (eval echo "$as_me:13363: \"$ac_link\"") >&5
13364  (eval $ac_link) 2>&5
13365  ac_status=$?
13366  echo "$as_me:13366: \$? = $ac_status" >&5
13367  (exit $ac_status); } &&
13368         { ac_try='test -s conftest$ac_exeext'
13369  { (eval echo "$as_me:13369: \"$ac_try\"") >&5
13370  (eval $ac_try) 2>&5
13371  ac_status=$?
13372  echo "$as_me:13372: \$? = $ac_status" >&5
13373  (exit $ac_status); }; }; then
13374  ac_cv_lib_Xcursor_XcursorGetTheme=yes
13375else
13376  echo "$as_me: failed program was:" >&5
13377cat conftest.$ac_ext >&5
13378ac_cv_lib_Xcursor_XcursorGetTheme=no
13379fi
13380rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13381LIBS=$ac_check_lib_save_LIBS
13382fi
13383echo "$as_me:13383: result: $ac_cv_lib_Xcursor_XcursorGetTheme" >&5
13384echo "${ECHO_T}$ac_cv_lib_Xcursor_XcursorGetTheme" >&6
13385if test $ac_cv_lib_Xcursor_XcursorGetTheme = yes; then
13386  cat >>confdefs.h <<\EOF
13387#define HAVE_LIB_XCURSOR 1
13388EOF
13389
13390fi
13391
13392LIBS="$LIBS $X_EXTRA_LIBS"
13393
13394for ac_header in \
13395stropts.h \
13396
13397do
13398as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13399echo "$as_me:13399: checking for $ac_header" >&5
13400echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13401if eval "test \"\${$as_ac_Header+set}\" = set"; then
13402  echo $ECHO_N "(cached) $ECHO_C" >&6
13403else
13404  cat >conftest.$ac_ext <<_ACEOF
13405#line 13405 "configure"
13406#include "confdefs.h"
13407#include <$ac_header>
13408_ACEOF
13409if { (eval echo "$as_me:13409: \"$ac_cpp conftest.$ac_ext\"") >&5
13410  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13411  ac_status=$?
13412  egrep -v '^ *\+' conftest.er1 >conftest.err
13413  rm -f conftest.er1
13414  cat conftest.err >&5
13415  echo "$as_me:13415: \$? = $ac_status" >&5
13416  (exit $ac_status); } >/dev/null; then
13417  if test -s conftest.err; then
13418    ac_cpp_err=$ac_c_preproc_warn_flag
13419  else
13420    ac_cpp_err=
13421  fi
13422else
13423  ac_cpp_err=yes
13424fi
13425if test -z "$ac_cpp_err"; then
13426  eval "$as_ac_Header=yes"
13427else
13428  echo "$as_me: failed program was:" >&5
13429  cat conftest.$ac_ext >&5
13430  eval "$as_ac_Header=no"
13431fi
13432rm -f conftest.err conftest.$ac_ext
13433fi
13434echo "$as_me:13434: result: `eval echo '${'$as_ac_Header'}'`" >&5
13435echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13436if test `eval echo '${'$as_ac_Header'}'` = yes; then
13437  cat >>confdefs.h <<EOF
13438#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13439EOF
13440
13441fi
13442done
13443
13444cf_func_grantpt="grantpt ptsname"
13445case $host_os in
13446(darwin[0-9].*)
13447	;;
13448(*)
13449	cf_func_grantpt="$cf_func_grantpt posix_openpt"
13450	;;
13451esac
13452
13453for ac_func in $cf_func_grantpt
13454do
13455as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
13456echo "$as_me:13456: checking for $ac_func" >&5
13457echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
13458if eval "test \"\${$as_ac_var+set}\" = set"; then
13459  echo $ECHO_N "(cached) $ECHO_C" >&6
13460else
13461  cat >conftest.$ac_ext <<_ACEOF
13462#line 13462 "configure"
13463#include "confdefs.h"
13464/* System header to define __stub macros and hopefully few prototypes,
13465    which can conflict with char $ac_func (); below.  */
13466#include <assert.h>
13467/* Override any gcc2 internal prototype to avoid an error.  */
13468#ifdef __cplusplus
13469extern "C"
13470#endif
13471/* We use char because int might match the return type of a gcc2
13472   builtin and then its argument prototype would still apply.  */
13473char $ac_func ();
13474char (*f) ();
13475
13476int
13477main ()
13478{
13479/* The GNU C library defines this for functions which it implements
13480    to always fail with ENOSYS.  Some functions are actually named
13481    something starting with __ and the normal name is an alias.  */
13482#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
13483choke me
13484#else
13485f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13486#endif
13487
13488  ;
13489  return 0;
13490}
13491_ACEOF
13492rm -f conftest.$ac_objext conftest$ac_exeext
13493if { (eval echo "$as_me:13493: \"$ac_link\"") >&5
13494  (eval $ac_link) 2>&5
13495  ac_status=$?
13496  echo "$as_me:13496: \$? = $ac_status" >&5
13497  (exit $ac_status); } &&
13498         { ac_try='test -s conftest$ac_exeext'
13499  { (eval echo "$as_me:13499: \"$ac_try\"") >&5
13500  (eval $ac_try) 2>&5
13501  ac_status=$?
13502  echo "$as_me:13502: \$? = $ac_status" >&5
13503  (exit $ac_status); }; }; then
13504  eval "$as_ac_var=yes"
13505else
13506  echo "$as_me: failed program was:" >&5
13507cat conftest.$ac_ext >&5
13508eval "$as_ac_var=no"
13509fi
13510rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13511fi
13512echo "$as_me:13512: result: `eval echo '${'$as_ac_var'}'`" >&5
13513echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
13514if test `eval echo '${'$as_ac_var'}'` = yes; then
13515  cat >>confdefs.h <<EOF
13516#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
13517EOF
13518
13519fi
13520done
13521
13522cf_grantpt_opts=
13523if test "x$ac_cv_func_grantpt" = "xyes" ; then
13524	echo "$as_me:13524: checking if grantpt really works" >&5
13525echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
13526	cat >conftest.$ac_ext <<_ACEOF
13527#line 13527 "configure"
13528#include "confdefs.h"
13529
13530#include <stdlib.h>
13531#include <termios.h>
13532#include <unistd.h>
13533#include <signal.h>
13534#include <fcntl.h>
13535#include <errno.h>
13536
13537#ifndef HAVE_POSIX_OPENPT
13538#undef posix_openpt
13539#define posix_openpt(mode) open("/dev/ptmx", mode)
13540#endif
13541
13542#ifdef HAVE_STROPTS_H
13543#include <stropts.h>
13544#endif
13545
13546static void failed(int code)
13547{
13548	perror("conftest");
13549	exit(code);
13550}
13551
13552static void my_timeout(int sig)
13553{
13554	exit(99);
13555}
13556
13557int
13558main ()
13559{
13560
13561	int code = 0;
13562	int rc;
13563	int pty;
13564	int tty;
13565	char *slave;
13566	struct termios tio;
13567
13568	signal(SIGALRM, my_timeout);
13569
13570	if (alarm(2) == 9)
13571		failed(9);
13572	else if ((pty = posix_openpt(O_RDWR)) < 0)
13573		failed(1);
13574	else if ((rc = grantpt(pty)) < 0)
13575		failed(2);
13576	else if ((rc = unlockpt(pty)) < 0)
13577		failed(3);
13578	else if ((slave = ptsname(pty)) == 0)
13579		failed(4);
13580#if (CONFTEST == 3) || defined(CONFTEST_isatty)
13581	else if (!isatty(pty))
13582		failed(4);
13583#endif
13584#if CONFTEST >= 4
13585    else if ((rc = tcgetattr(pty, &tio)) < 0)
13586		failed(20);
13587    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
13588		failed(21);
13589#endif
13590	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
13591	 * Linux does treat it that way.
13592	 */
13593	else if ((tty = open(slave, O_RDWR)) < 0)
13594		failed(5);
13595#ifdef CONFTEST
13596#ifdef I_PUSH
13597#if (CONFTEST == 0) || defined(CONFTEST_ptem)
13598    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
13599		failed(10);
13600#endif
13601#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
13602    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
13603		failed(11);
13604#endif
13605#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
13606    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
13607		failed(12);
13608#endif
13609#endif /* I_PUSH */
13610#if CONFTEST >= 5
13611    else if ((rc = tcgetattr(tty, &tio)) < 0)
13612		failed(30);
13613    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
13614		failed(31);
13615#endif
13616#endif /* CONFTEST */
13617
13618	${cf_cv_main_return:-return}(code);
13619
13620  ;
13621  return 0;
13622}
13623_ACEOF
13624rm -f conftest.$ac_objext conftest$ac_exeext
13625if { (eval echo "$as_me:13625: \"$ac_link\"") >&5
13626  (eval $ac_link) 2>&5
13627  ac_status=$?
13628  echo "$as_me:13628: \$? = $ac_status" >&5
13629  (exit $ac_status); } &&
13630         { ac_try='test -s conftest$ac_exeext'
13631  { (eval echo "$as_me:13631: \"$ac_try\"") >&5
13632  (eval $ac_try) 2>&5
13633  ac_status=$?
13634  echo "$as_me:13634: \$? = $ac_status" >&5
13635  (exit $ac_status); }; }; then
13636
13637	if test "$cross_compiling" = yes; then
13638  ac_cv_func_grantpt=maybe
13639else
13640  cat >conftest.$ac_ext <<_ACEOF
13641#line 13641 "configure"
13642#include "confdefs.h"
13643
13644#include <stdlib.h>
13645#include <termios.h>
13646#include <unistd.h>
13647#include <signal.h>
13648#include <fcntl.h>
13649#include <errno.h>
13650
13651#ifndef HAVE_POSIX_OPENPT
13652#undef posix_openpt
13653#define posix_openpt(mode) open("/dev/ptmx", mode)
13654#endif
13655
13656#ifdef HAVE_STROPTS_H
13657#include <stropts.h>
13658#endif
13659
13660static void failed(int code)
13661{
13662	perror("conftest");
13663	exit(code);
13664}
13665
13666static void my_timeout(int sig)
13667{
13668	exit(99);
13669}
13670
13671int main(void)
13672{
13673
13674	int code = 0;
13675	int rc;
13676	int pty;
13677	int tty;
13678	char *slave;
13679	struct termios tio;
13680
13681	signal(SIGALRM, my_timeout);
13682
13683	if (alarm(2) == 9)
13684		failed(9);
13685	else if ((pty = posix_openpt(O_RDWR)) < 0)
13686		failed(1);
13687	else if ((rc = grantpt(pty)) < 0)
13688		failed(2);
13689	else if ((rc = unlockpt(pty)) < 0)
13690		failed(3);
13691	else if ((slave = ptsname(pty)) == 0)
13692		failed(4);
13693#if (CONFTEST == 3) || defined(CONFTEST_isatty)
13694	else if (!isatty(pty))
13695		failed(4);
13696#endif
13697#if CONFTEST >= 4
13698    else if ((rc = tcgetattr(pty, &tio)) < 0)
13699		failed(20);
13700    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
13701		failed(21);
13702#endif
13703	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
13704	 * Linux does treat it that way.
13705	 */
13706	else if ((tty = open(slave, O_RDWR)) < 0)
13707		failed(5);
13708#ifdef CONFTEST
13709#ifdef I_PUSH
13710#if (CONFTEST == 0) || defined(CONFTEST_ptem)
13711    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
13712		failed(10);
13713#endif
13714#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
13715    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
13716		failed(11);
13717#endif
13718#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
13719    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
13720		failed(12);
13721#endif
13722#endif /* I_PUSH */
13723#if CONFTEST >= 5
13724    else if ((rc = tcgetattr(tty, &tio)) < 0)
13725		failed(30);
13726    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
13727		failed(31);
13728#endif
13729#endif /* CONFTEST */
13730
13731	${cf_cv_main_return:-return}(code);
13732
13733}
13734
13735_ACEOF
13736rm -f conftest$ac_exeext
13737if { (eval echo "$as_me:13737: \"$ac_link\"") >&5
13738  (eval $ac_link) 2>&5
13739  ac_status=$?
13740  echo "$as_me:13740: \$? = $ac_status" >&5
13741  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13742  { (eval echo "$as_me:13742: \"$ac_try\"") >&5
13743  (eval $ac_try) 2>&5
13744  ac_status=$?
13745  echo "$as_me:13745: \$? = $ac_status" >&5
13746  (exit $ac_status); }; }; then
13747  :
13748else
13749  echo "$as_me: program exited with status $ac_status" >&5
13750echo "$as_me: failed program was:" >&5
13751cat conftest.$ac_ext >&5
13752ac_cv_func_grantpt=no
13753
13754fi
13755rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13756fi
13757
13758else
13759  echo "$as_me: failed program was:" >&5
13760cat conftest.$ac_ext >&5
13761ac_cv_func_grantpt=no
13762fi
13763rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13764	echo "$as_me:13764: result: $ac_cv_func_grantpt" >&5
13765echo "${ECHO_T}$ac_cv_func_grantpt" >&6
13766
13767	if test "x$ac_cv_func_grantpt" != "xno" ; then
13768
13769		if test "x$ac_cv_func_grantpt" = "xyes" ; then
13770			echo "$as_me:13770: checking for pty features" >&5
13771echo $ECHO_N "checking for pty features... $ECHO_C" >&6
13772			if test "x$ac_cv_header_stropts_h" = xyes
13773			then
13774				cf_pty_this=0
13775			else
13776				cf_pty_this=3
13777			fi
13778
13779			cf_pty_defines=
13780			while test $cf_pty_this != 6
13781			do
13782
13783				cf_pty_feature=
13784				cf_pty_next=`expr $cf_pty_this + 1`
13785
13786echo "${as_me:-configure}:13786: testing pty feature test $cf_pty_next:5 ..." 1>&5
13787
13788				if test "$cross_compiling" = yes; then
13789  { { echo "$as_me:13789: error: cannot run test program while cross compiling" >&5
13790echo "$as_me: error: cannot run test program while cross compiling" >&2;}
13791   { (exit 1); exit 1; }; }
13792else
13793  cat >conftest.$ac_ext <<_ACEOF
13794#line 13794 "configure"
13795#include "confdefs.h"
13796#define CONFTEST $cf_pty_this
13797$cf_pty_defines
13798
13799#include <stdlib.h>
13800#include <termios.h>
13801#include <unistd.h>
13802#include <signal.h>
13803#include <fcntl.h>
13804#include <errno.h>
13805
13806#ifndef HAVE_POSIX_OPENPT
13807#undef posix_openpt
13808#define posix_openpt(mode) open("/dev/ptmx", mode)
13809#endif
13810
13811#ifdef HAVE_STROPTS_H
13812#include <stropts.h>
13813#endif
13814
13815static void failed(int code)
13816{
13817	perror("conftest");
13818	exit(code);
13819}
13820
13821static void my_timeout(int sig)
13822{
13823	exit(99);
13824}
13825
13826int main(void)
13827{
13828
13829	int code = 0;
13830	int rc;
13831	int pty;
13832	int tty;
13833	char *slave;
13834	struct termios tio;
13835
13836	signal(SIGALRM, my_timeout);
13837
13838	if (alarm(2) == 9)
13839		failed(9);
13840	else if ((pty = posix_openpt(O_RDWR)) < 0)
13841		failed(1);
13842	else if ((rc = grantpt(pty)) < 0)
13843		failed(2);
13844	else if ((rc = unlockpt(pty)) < 0)
13845		failed(3);
13846	else if ((slave = ptsname(pty)) == 0)
13847		failed(4);
13848#if (CONFTEST == 3) || defined(CONFTEST_isatty)
13849	else if (!isatty(pty))
13850		failed(4);
13851#endif
13852#if CONFTEST >= 4
13853    else if ((rc = tcgetattr(pty, &tio)) < 0)
13854		failed(20);
13855    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
13856		failed(21);
13857#endif
13858	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
13859	 * Linux does treat it that way.
13860	 */
13861	else if ((tty = open(slave, O_RDWR)) < 0)
13862		failed(5);
13863#ifdef CONFTEST
13864#ifdef I_PUSH
13865#if (CONFTEST == 0) || defined(CONFTEST_ptem)
13866    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
13867		failed(10);
13868#endif
13869#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
13870    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
13871		failed(11);
13872#endif
13873#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
13874    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
13875		failed(12);
13876#endif
13877#endif /* I_PUSH */
13878#if CONFTEST >= 5
13879    else if ((rc = tcgetattr(tty, &tio)) < 0)
13880		failed(30);
13881    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
13882		failed(31);
13883#endif
13884#endif /* CONFTEST */
13885
13886	${cf_cv_main_return:-return}(code);
13887
13888}
13889
13890_ACEOF
13891rm -f conftest$ac_exeext
13892if { (eval echo "$as_me:13892: \"$ac_link\"") >&5
13893  (eval $ac_link) 2>&5
13894  ac_status=$?
13895  echo "$as_me:13895: \$? = $ac_status" >&5
13896  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13897  { (eval echo "$as_me:13897: \"$ac_try\"") >&5
13898  (eval $ac_try) 2>&5
13899  ac_status=$?
13900  echo "$as_me:13900: \$? = $ac_status" >&5
13901  (exit $ac_status); }; }; then
13902
13903				case $cf_pty_next in
13904				(1) # - streams
13905					cf_pty_feature=ptem
13906					;;
13907				(2) # - streams
13908					cf_pty_feature=ldterm
13909					;;
13910				(3) # - streams
13911					cf_pty_feature=ttcompat
13912					;;
13913				(4)
13914					cf_pty_feature=pty_isatty
13915					;;
13916				(5)
13917					cf_pty_feature=pty_tcsetattr
13918					;;
13919				(6)
13920					cf_pty_feature=tty_tcsetattr
13921					;;
13922				esac
13923
13924else
13925  echo "$as_me: program exited with status $ac_status" >&5
13926echo "$as_me: failed program was:" >&5
13927cat conftest.$ac_ext >&5
13928
13929				case $cf_pty_next in
13930				(1|2|3)
13931
13932echo "${as_me:-configure}:13932: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
13933
13934					cf_pty_next=3
13935					;;
13936				esac
13937
13938fi
13939rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13940fi
13941				if test -n "$cf_pty_feature"
13942				then
13943					cf_pty_defines="$cf_pty_defines
13944#define CONFTEST_$cf_pty_feature 1
13945"
13946					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
13947				fi
13948
13949				cf_pty_this=$cf_pty_next
13950			done
13951			echo "$as_me:13951: result: $cf_grantpt_opts" >&5
13952echo "${ECHO_T}$cf_grantpt_opts" >&6
13953			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
13954		fi
13955	fi
13956fi
13957
13958if test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
13959	echo "$as_me:13959: checking for openpty in -lutil" >&5
13960echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
13961if test "${ac_cv_lib_util_openpty+set}" = set; then
13962  echo $ECHO_N "(cached) $ECHO_C" >&6
13963else
13964  ac_check_lib_save_LIBS=$LIBS
13965LIBS="-lutil  $LIBS"
13966cat >conftest.$ac_ext <<_ACEOF
13967#line 13967 "configure"
13968#include "confdefs.h"
13969
13970/* Override any gcc2 internal prototype to avoid an error.  */
13971#ifdef __cplusplus
13972extern "C"
13973#endif
13974/* We use char because int might match the return type of a gcc2
13975   builtin and then its argument prototype would still apply.  */
13976char openpty ();
13977int
13978main ()
13979{
13980openpty ();
13981  ;
13982  return 0;
13983}
13984_ACEOF
13985rm -f conftest.$ac_objext conftest$ac_exeext
13986if { (eval echo "$as_me:13986: \"$ac_link\"") >&5
13987  (eval $ac_link) 2>&5
13988  ac_status=$?
13989  echo "$as_me:13989: \$? = $ac_status" >&5
13990  (exit $ac_status); } &&
13991         { ac_try='test -s conftest$ac_exeext'
13992  { (eval echo "$as_me:13992: \"$ac_try\"") >&5
13993  (eval $ac_try) 2>&5
13994  ac_status=$?
13995  echo "$as_me:13995: \$? = $ac_status" >&5
13996  (exit $ac_status); }; }; then
13997  ac_cv_lib_util_openpty=yes
13998else
13999  echo "$as_me: failed program was:" >&5
14000cat conftest.$ac_ext >&5
14001ac_cv_lib_util_openpty=no
14002fi
14003rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14004LIBS=$ac_check_lib_save_LIBS
14005fi
14006echo "$as_me:14006: result: $ac_cv_lib_util_openpty" >&5
14007echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14008if test $ac_cv_lib_util_openpty = yes; then
14009  cf_have_openpty=yes
14010else
14011  cf_have_openpty=no
14012fi
14013
14014	if test "$cf_have_openpty" = yes ; then
14015		ac_cv_func_grantpt=no
14016		LIBS="-lutil $LIBS"
14017
14018cat >>confdefs.h <<\EOF
14019#define HAVE_OPENPTY 1
14020EOF
14021
14022for ac_header in \
14023			util.h \
14024			libutil.h \
14025			pty.h \
14026
14027do
14028as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14029echo "$as_me:14029: checking for $ac_header" >&5
14030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14031if eval "test \"\${$as_ac_Header+set}\" = set"; then
14032  echo $ECHO_N "(cached) $ECHO_C" >&6
14033else
14034  cat >conftest.$ac_ext <<_ACEOF
14035#line 14035 "configure"
14036#include "confdefs.h"
14037#include <$ac_header>
14038_ACEOF
14039if { (eval echo "$as_me:14039: \"$ac_cpp conftest.$ac_ext\"") >&5
14040  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14041  ac_status=$?
14042  egrep -v '^ *\+' conftest.er1 >conftest.err
14043  rm -f conftest.er1
14044  cat conftest.err >&5
14045  echo "$as_me:14045: \$? = $ac_status" >&5
14046  (exit $ac_status); } >/dev/null; then
14047  if test -s conftest.err; then
14048    ac_cpp_err=$ac_c_preproc_warn_flag
14049  else
14050    ac_cpp_err=
14051  fi
14052else
14053  ac_cpp_err=yes
14054fi
14055if test -z "$ac_cpp_err"; then
14056  eval "$as_ac_Header=yes"
14057else
14058  echo "$as_me: failed program was:" >&5
14059  cat conftest.$ac_ext >&5
14060  eval "$as_ac_Header=no"
14061fi
14062rm -f conftest.err conftest.$ac_ext
14063fi
14064echo "$as_me:14064: result: `eval echo '${'$as_ac_Header'}'`" >&5
14065echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14066if test `eval echo '${'$as_ac_Header'}'` = yes; then
14067  cat >>confdefs.h <<EOF
14068#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14069EOF
14070
14071fi
14072done
14073
14074	fi
14075fi
14076
14077if test "x$ac_cv_func_grantpt" != xno
14078then
14079	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
14080
14081echo "${as_me:-configure}:14081: testing will rely upon grantpt ..." 1>&5
14082
14083cat >>confdefs.h <<\EOF
14084#define HAVE_WORKING_GRANTPT 1
14085EOF
14086
14087	for cf_feature in $cf_grantpt_opts
14088	do
14089		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
14090
14091cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14092
14093		cat >>confdefs.h <<EOF
14094#define HAVE_GRANTPT_$cf_FEATURE 1
14095EOF
14096
14097	done
14098elif test "x$cf_have_openpty" = xno
14099then
14100	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
14101
14102echo "${as_me:-configure}:14102: testing will rely upon BSD-pseudoterminals ..." 1>&5
14103
14104else
14105	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
14106
14107echo "${as_me:-configure}:14107: testing will rely upon openpty ..." 1>&5
14108
14109fi
14110
14111echo "$as_me:14111: checking if we can use XkbQueryExtension" >&5
14112echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
14113if test "${cf_cv_xkb_query_extension+set}" = set; then
14114  echo $ECHO_N "(cached) $ECHO_C" >&6
14115else
14116
14117cat >conftest.$ac_ext <<_ACEOF
14118#line 14118 "configure"
14119#include "confdefs.h"
14120
14121#include <X11/Xlib.h>
14122#include <X11/extensions/XKB.h>
14123#include <X11/XKBlib.h>
14124
14125int
14126main ()
14127{
14128
14129	int xkbmajor = XkbMajorVersion;
14130	int xkbminor = XkbMinorVersion;
14131	int xkbopcode, xkbevent, xkberror;
14132
14133	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
14134	    && XkbQueryExtension((Display *)0,
14135				 &xkbopcode,
14136				 &xkbevent,
14137				 &xkberror,
14138				 &xkbmajor,
14139				 &xkbminor))
14140		 return 0;
14141
14142  ;
14143  return 0;
14144}
14145_ACEOF
14146rm -f conftest.$ac_objext
14147if { (eval echo "$as_me:14147: \"$ac_compile\"") >&5
14148  (eval $ac_compile) 2>&5
14149  ac_status=$?
14150  echo "$as_me:14150: \$? = $ac_status" >&5
14151  (exit $ac_status); } &&
14152         { ac_try='test -s conftest.$ac_objext'
14153  { (eval echo "$as_me:14153: \"$ac_try\"") >&5
14154  (eval $ac_try) 2>&5
14155  ac_status=$?
14156  echo "$as_me:14156: \$? = $ac_status" >&5
14157  (exit $ac_status); }; }; then
14158
14159cf_cv_xkb_query_extension=yes
14160
14161else
14162  echo "$as_me: failed program was:" >&5
14163cat conftest.$ac_ext >&5
14164
14165cf_cv_xkb_query_extension=no
14166
14167fi
14168rm -f conftest.$ac_objext conftest.$ac_ext
14169
14170fi
14171echo "$as_me:14171: result: $cf_cv_xkb_query_extension" >&5
14172echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
14173
14174if test $cf_cv_xkb_query_extension = yes
14175then
14176
14177for ac_func in XkbQueryExtension
14178do
14179as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14180echo "$as_me:14180: checking for $ac_func" >&5
14181echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14182if eval "test \"\${$as_ac_var+set}\" = set"; then
14183  echo $ECHO_N "(cached) $ECHO_C" >&6
14184else
14185  cat >conftest.$ac_ext <<_ACEOF
14186#line 14186 "configure"
14187#include "confdefs.h"
14188/* System header to define __stub macros and hopefully few prototypes,
14189    which can conflict with char $ac_func (); below.  */
14190#include <assert.h>
14191/* Override any gcc2 internal prototype to avoid an error.  */
14192#ifdef __cplusplus
14193extern "C"
14194#endif
14195/* We use char because int might match the return type of a gcc2
14196   builtin and then its argument prototype would still apply.  */
14197char $ac_func ();
14198char (*f) ();
14199
14200int
14201main ()
14202{
14203/* The GNU C library defines this for functions which it implements
14204    to always fail with ENOSYS.  Some functions are actually named
14205    something starting with __ and the normal name is an alias.  */
14206#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14207choke me
14208#else
14209f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14210#endif
14211
14212  ;
14213  return 0;
14214}
14215_ACEOF
14216rm -f conftest.$ac_objext conftest$ac_exeext
14217if { (eval echo "$as_me:14217: \"$ac_link\"") >&5
14218  (eval $ac_link) 2>&5
14219  ac_status=$?
14220  echo "$as_me:14220: \$? = $ac_status" >&5
14221  (exit $ac_status); } &&
14222         { ac_try='test -s conftest$ac_exeext'
14223  { (eval echo "$as_me:14223: \"$ac_try\"") >&5
14224  (eval $ac_try) 2>&5
14225  ac_status=$?
14226  echo "$as_me:14226: \$? = $ac_status" >&5
14227  (exit $ac_status); }; }; then
14228  eval "$as_ac_var=yes"
14229else
14230  echo "$as_me: failed program was:" >&5
14231cat conftest.$ac_ext >&5
14232eval "$as_ac_var=no"
14233fi
14234rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14235fi
14236echo "$as_me:14236: result: `eval echo '${'$as_ac_var'}'`" >&5
14237echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14238if test `eval echo '${'$as_ac_var'}'` = yes; then
14239  cat >>confdefs.h <<EOF
14240#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14241EOF
14242
14243fi
14244done
14245
14246fi
14247
14248echo "$as_me:14248: checking if we can use XkbKeycodeToKeysym" >&5
14249echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
14250if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
14251  echo $ECHO_N "(cached) $ECHO_C" >&6
14252else
14253
14254cat >conftest.$ac_ext <<_ACEOF
14255#line 14255 "configure"
14256#include "confdefs.h"
14257
14258#include <X11/Xlib.h>
14259#include <X11/XKBlib.h>
14260
14261int
14262main ()
14263{
14264
14265    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
14266
14267  ;
14268  return 0;
14269}
14270_ACEOF
14271rm -f conftest.$ac_objext
14272if { (eval echo "$as_me:14272: \"$ac_compile\"") >&5
14273  (eval $ac_compile) 2>&5
14274  ac_status=$?
14275  echo "$as_me:14275: \$? = $ac_status" >&5
14276  (exit $ac_status); } &&
14277         { ac_try='test -s conftest.$ac_objext'
14278  { (eval echo "$as_me:14278: \"$ac_try\"") >&5
14279  (eval $ac_try) 2>&5
14280  ac_status=$?
14281  echo "$as_me:14281: \$? = $ac_status" >&5
14282  (exit $ac_status); }; }; then
14283
14284cf_cv_xkb_keycode_to_keysym=yes
14285
14286else
14287  echo "$as_me: failed program was:" >&5
14288cat conftest.$ac_ext >&5
14289
14290cf_cv_xkb_keycode_to_keysym=no
14291
14292fi
14293rm -f conftest.$ac_objext conftest.$ac_ext
14294
14295fi
14296echo "$as_me:14296: result: $cf_cv_xkb_keycode_to_keysym" >&5
14297echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
14298
14299if test $cf_cv_xkb_keycode_to_keysym = yes
14300then
14301
14302for ac_func in XkbKeycodeToKeysym
14303do
14304as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14305echo "$as_me:14305: checking for $ac_func" >&5
14306echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14307if eval "test \"\${$as_ac_var+set}\" = set"; then
14308  echo $ECHO_N "(cached) $ECHO_C" >&6
14309else
14310  cat >conftest.$ac_ext <<_ACEOF
14311#line 14311 "configure"
14312#include "confdefs.h"
14313/* System header to define __stub macros and hopefully few prototypes,
14314    which can conflict with char $ac_func (); below.  */
14315#include <assert.h>
14316/* Override any gcc2 internal prototype to avoid an error.  */
14317#ifdef __cplusplus
14318extern "C"
14319#endif
14320/* We use char because int might match the return type of a gcc2
14321   builtin and then its argument prototype would still apply.  */
14322char $ac_func ();
14323char (*f) ();
14324
14325int
14326main ()
14327{
14328/* The GNU C library defines this for functions which it implements
14329    to always fail with ENOSYS.  Some functions are actually named
14330    something starting with __ and the normal name is an alias.  */
14331#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14332choke me
14333#else
14334f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14335#endif
14336
14337  ;
14338  return 0;
14339}
14340_ACEOF
14341rm -f conftest.$ac_objext conftest$ac_exeext
14342if { (eval echo "$as_me:14342: \"$ac_link\"") >&5
14343  (eval $ac_link) 2>&5
14344  ac_status=$?
14345  echo "$as_me:14345: \$? = $ac_status" >&5
14346  (exit $ac_status); } &&
14347         { ac_try='test -s conftest$ac_exeext'
14348  { (eval echo "$as_me:14348: \"$ac_try\"") >&5
14349  (eval $ac_try) 2>&5
14350  ac_status=$?
14351  echo "$as_me:14351: \$? = $ac_status" >&5
14352  (exit $ac_status); }; }; then
14353  eval "$as_ac_var=yes"
14354else
14355  echo "$as_me: failed program was:" >&5
14356cat conftest.$ac_ext >&5
14357eval "$as_ac_var=no"
14358fi
14359rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14360fi
14361echo "$as_me:14361: result: `eval echo '${'$as_ac_var'}'`" >&5
14362echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14363if test `eval echo '${'$as_ac_var'}'` = yes; then
14364  cat >>confdefs.h <<EOF
14365#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14366EOF
14367
14368fi
14369done
14370
14371fi
14372
14373echo "$as_me:14373: checking for XKB Bell extension" >&5
14374echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
14375if test "${cf_cv_xkb_bell_ext+set}" = set; then
14376  echo $ECHO_N "(cached) $ECHO_C" >&6
14377else
14378
14379cat >conftest.$ac_ext <<_ACEOF
14380#line 14380 "configure"
14381#include "confdefs.h"
14382
14383#include <X11/Intrinsic.h>
14384#include <X11/XKBlib.h>		/* has the prototype */
14385#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
14386
14387int
14388main ()
14389{
14390
14391	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
14392	Atom y;
14393	XkbBell((Display *)0, (Widget)0, 0, y);
14394
14395  ;
14396  return 0;
14397}
14398_ACEOF
14399rm -f conftest.$ac_objext conftest$ac_exeext
14400if { (eval echo "$as_me:14400: \"$ac_link\"") >&5
14401  (eval $ac_link) 2>&5
14402  ac_status=$?
14403  echo "$as_me:14403: \$? = $ac_status" >&5
14404  (exit $ac_status); } &&
14405         { ac_try='test -s conftest$ac_exeext'
14406  { (eval echo "$as_me:14406: \"$ac_try\"") >&5
14407  (eval $ac_try) 2>&5
14408  ac_status=$?
14409  echo "$as_me:14409: \$? = $ac_status" >&5
14410  (exit $ac_status); }; }; then
14411  cf_cv_xkb_bell_ext=yes
14412else
14413  echo "$as_me: failed program was:" >&5
14414cat conftest.$ac_ext >&5
14415cf_cv_xkb_bell_ext=no
14416fi
14417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14418
14419fi
14420echo "$as_me:14420: result: $cf_cv_xkb_bell_ext" >&5
14421echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
14422test "$cf_cv_xkb_bell_ext" = yes &&
14423cat >>confdefs.h <<\EOF
14424#define HAVE_XKB_BELL_EXT 1
14425EOF
14426
14427for ac_func in Xutf8LookupString
14428do
14429as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14430echo "$as_me:14430: checking for $ac_func" >&5
14431echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14432if eval "test \"\${$as_ac_var+set}\" = set"; then
14433  echo $ECHO_N "(cached) $ECHO_C" >&6
14434else
14435  cat >conftest.$ac_ext <<_ACEOF
14436#line 14436 "configure"
14437#include "confdefs.h"
14438/* System header to define __stub macros and hopefully few prototypes,
14439    which can conflict with char $ac_func (); below.  */
14440#include <assert.h>
14441/* Override any gcc2 internal prototype to avoid an error.  */
14442#ifdef __cplusplus
14443extern "C"
14444#endif
14445/* We use char because int might match the return type of a gcc2
14446   builtin and then its argument prototype would still apply.  */
14447char $ac_func ();
14448char (*f) ();
14449
14450int
14451main ()
14452{
14453/* The GNU C library defines this for functions which it implements
14454    to always fail with ENOSYS.  Some functions are actually named
14455    something starting with __ and the normal name is an alias.  */
14456#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14457choke me
14458#else
14459f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14460#endif
14461
14462  ;
14463  return 0;
14464}
14465_ACEOF
14466rm -f conftest.$ac_objext conftest$ac_exeext
14467if { (eval echo "$as_me:14467: \"$ac_link\"") >&5
14468  (eval $ac_link) 2>&5
14469  ac_status=$?
14470  echo "$as_me:14470: \$? = $ac_status" >&5
14471  (exit $ac_status); } &&
14472         { ac_try='test -s conftest$ac_exeext'
14473  { (eval echo "$as_me:14473: \"$ac_try\"") >&5
14474  (eval $ac_try) 2>&5
14475  ac_status=$?
14476  echo "$as_me:14476: \$? = $ac_status" >&5
14477  (exit $ac_status); }; }; then
14478  eval "$as_ac_var=yes"
14479else
14480  echo "$as_me: failed program was:" >&5
14481cat conftest.$ac_ext >&5
14482eval "$as_ac_var=no"
14483fi
14484rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14485fi
14486echo "$as_me:14486: result: `eval echo '${'$as_ac_var'}'`" >&5
14487echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14488if test `eval echo '${'$as_ac_var'}'` = yes; then
14489  cat >>confdefs.h <<EOF
14490#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14491EOF
14492
14493else
14494
14495	EXTRAHDRS="$EXTRAHDRS xutf8.h"
14496	EXTRASRCS="$EXTRASRCS xutf8.c"
14497	EXTRAOBJS="$EXTRAOBJS xutf8.o"
14498
14499fi
14500done
14501
14502echo "$as_me:14502: checking if you want narrow prototypes for X libraries" >&5
14503echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
14504
14505case `$ac_config_guess` in
14506(*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
14507	cf_default_narrowproto=yes
14508	;;
14509(*)
14510	cf_default_narrowproto=no
14511	;;
14512esac
14513
14514# Check whether --enable-narrowproto or --disable-narrowproto was given.
14515if test "${enable_narrowproto+set}" = set; then
14516  enableval="$enable_narrowproto"
14517  test "$enableval" != no && enableval=yes
14518  if test "$enableval" != "$cf_default_narrowproto" ; then
14519    enable_narrowproto=$enableval
14520  else
14521    enable_narrowproto=$cf_default_narrowproto
14522  fi
14523else
14524  enableval=$cf_default_narrowproto
14525  enable_narrowproto=$cf_default_narrowproto
14526
14527fi;
14528echo "$as_me:14528: result: $enable_narrowproto" >&5
14529echo "${ECHO_T}$enable_narrowproto" >&6
14530
14531echo "$as_me:14531: checking if we should use imake to help" >&5
14532echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
14533
14534# Check whether --enable-imake or --disable-imake was given.
14535if test "${enable_imake+set}" = set; then
14536  enableval="$enable_imake"
14537  test "$enableval" != no && enableval=yes
14538  if test "$enableval" != "yes" ; then
14539    enable_imake=no
14540  else
14541    enable_imake=yes
14542  fi
14543else
14544  enableval=yes
14545  enable_imake=yes
14546
14547fi;
14548echo "$as_me:14548: result: $enable_imake" >&5
14549echo "${ECHO_T}$enable_imake" >&6
14550
14551if test "$enable_imake" = yes ; then
14552
14553for ac_prog in xmkmf imake
14554do
14555  # Extract the first word of "$ac_prog", so it can be a program name with args.
14556set dummy $ac_prog; ac_word=$2
14557echo "$as_me:14557: checking for $ac_word" >&5
14558echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14559if test "${ac_cv_path_IMAKE+set}" = set; then
14560  echo $ECHO_N "(cached) $ECHO_C" >&6
14561else
14562  case $IMAKE in
14563  [\\/]* | ?:[\\/]*)
14564  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
14565  ;;
14566  *)
14567  ac_save_IFS=$IFS; IFS=$ac_path_separator
14568ac_dummy="$PATH"
14569for ac_dir in $ac_dummy; do
14570  IFS=$ac_save_IFS
14571  test -z "$ac_dir" && ac_dir=.
14572  if $as_executable_p "$ac_dir/$ac_word"; then
14573   ac_cv_path_IMAKE="$ac_dir/$ac_word"
14574   echo "$as_me:14574: found $ac_dir/$ac_word" >&5
14575   break
14576fi
14577done
14578
14579  ;;
14580esac
14581fi
14582IMAKE=$ac_cv_path_IMAKE
14583
14584if test -n "$IMAKE"; then
14585  echo "$as_me:14585: result: $IMAKE" >&5
14586echo "${ECHO_T}$IMAKE" >&6
14587else
14588  echo "$as_me:14588: result: no" >&5
14589echo "${ECHO_T}no" >&6
14590fi
14591
14592  test -n "$IMAKE" && break
14593done
14594
14595if test -n "$IMAKE" ; then
14596
14597case $IMAKE in
14598(*/imake)
14599	cf_imake_opts="-DUseInstalled=YES"
14600	;;
14601(*/util/xmkmf)
14602	# A single parameter tells xmkmf where the config-files are:
14603	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`"
14604	;;
14605(*)
14606	cf_imake_opts=
14607	;;
14608esac
14609
14610# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
14611# config directory.
14612if mkdir conftestdir; then
14613	CDPATH=; export CDPATH
14614	cf_makefile=`cd $srcdir;pwd`/Imakefile
14615	cd conftestdir
14616
14617	cat >fix_cflags.sed <<'CF_EOF'
14618s/\\//g
14619s/[ 	][ 	]*/ /g
14620s/"//g
14621:pack
14622s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
14623t pack
14624s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
14625s/^IMAKE[ ]/IMAKE_CFLAGS="/
14626s/	/ /g
14627s/$/"/
14628CF_EOF
14629
14630	cat >fix_lflags.sed <<'CF_EOF'
14631s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
14632s/$/"/
14633CF_EOF
14634
14635	echo >./Imakefile
14636	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
14637
14638	cat >> ./Imakefile <<'CF_EOF'
14639findstddefs:
14640	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
14641	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
14642CF_EOF
14643
14644	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
14645	then
14646		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
14647
14648echo "${as_me:-configure}:14648: testing Using $IMAKE $cf_imake_opts ..." 1>&5
14649
14650	else
14651		# sometimes imake doesn't have the config path compiled in.  Find it.
14652		cf_config=
14653		for cf_libpath in $X_LIBS $LIBS ; do
14654			case $cf_libpath in
14655			(-L*)
14656				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
14657				cf_libpath=$cf_libpath/X11/config
14658				if test -d $cf_libpath ; then
14659					cf_config=$cf_libpath
14660					break
14661				fi
14662				;;
14663			esac
14664		done
14665		if test -z "$cf_config" ; then
14666			{ echo "$as_me:14666: WARNING: Could not find imake config-directory" >&5
14667echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
14668		else
14669			cf_imake_opts="$cf_imake_opts -I$cf_config"
14670			if ( $IMAKE -v $cf_imake_opts 2>&5)
14671			then
14672				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
14673
14674echo "${as_me:-configure}:14674: testing Using $IMAKE $cf_config ..." 1>&5
14675
14676			else
14677				{ echo "$as_me:14677: WARNING: Cannot run $IMAKE" >&5
14678echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
14679			fi
14680		fi
14681	fi
14682
14683	# GNU make sometimes prints "make[1]: Entering...", which
14684	# would confuse us.
14685	eval `make findstddefs 2>/dev/null | grep -v make`
14686
14687	cd ..
14688	rm -rf conftestdir
14689
14690	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
14691	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
14692	# modified it to support site.cf, adding a kludge for the /usr/include
14693	# directory.  Try to filter that out, otherwise gcc won't find its
14694	# headers.
14695	if test -n "$GCC" ; then
14696	    if test -n "$IMAKE_CFLAGS" ; then
14697		cf_nostdinc=""
14698		cf_std_incl=""
14699		cf_cpp_opts=""
14700		for cf_opt in $IMAKE_CFLAGS
14701		do
14702		    case "$cf_opt" in
14703		    (-nostdinc)
14704			cf_nostdinc="$cf_opt"
14705			;;
14706		    (-I/usr/include)
14707			cf_std_incl="$cf_opt"
14708			;;
14709		    (*)
14710			cf_cpp_opts="$cf_cpp_opts $cf_opt"
14711			;;
14712		    esac
14713		done
14714		if test -z "$cf_nostdinc" ; then
14715		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
14716		elif test -z "$cf_std_incl" ; then
14717		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
14718		else
14719		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
14720
14721echo "${as_me:-configure}:14721: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
14722
14723		    IMAKE_CFLAGS="$cf_cpp_opts"
14724		fi
14725	    fi
14726	fi
14727fi
14728
14729# Some imake configurations define PROJECTROOT with an empty value.  Remove
14730# the empty definition.
14731case $IMAKE_CFLAGS in
14732(*-DPROJECTROOT=/*)
14733	;;
14734(*)
14735	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
14736	;;
14737esac
14738
14739fi
14740
14741test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
14742
14743echo "${as_me:-configure}:14743: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
14744
14745test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
14746
14747echo "${as_me:-configure}:14747: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
14748
14749fi
14750
14751if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
14752
14753cf_fix_cppflags=no
14754cf_new_cflags=
14755cf_new_cppflags=
14756cf_new_extra_cppflags=
14757
14758for cf_add_cflags in $IMAKE_CFLAGS
14759do
14760case $cf_fix_cppflags in
14761(no)
14762	case $cf_add_cflags in
14763	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14764		case $cf_add_cflags in
14765		(-D*)
14766			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14767
14768			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14769				&& test -z "${cf_tst_cflags}" \
14770				&& cf_fix_cppflags=yes
14771
14772			if test $cf_fix_cppflags = yes ; then
14773				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14774				continue
14775			elif test "${cf_tst_cflags}" = "\"'" ; then
14776				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14777				continue
14778			fi
14779			;;
14780		esac
14781		case "$CPPFLAGS" in
14782		(*$cf_add_cflags)
14783			;;
14784		(*)
14785			case $cf_add_cflags in
14786			(-D*)
14787				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14788
14789CPPFLAGS=`echo "$CPPFLAGS" | \
14790	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14791		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14792
14793				;;
14794			esac
14795			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14796			;;
14797		esac
14798		;;
14799	(*)
14800		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14801		;;
14802	esac
14803	;;
14804(yes)
14805	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14806
14807	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14808
14809	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14810		&& test -z "${cf_tst_cflags}" \
14811		&& cf_fix_cppflags=no
14812	;;
14813esac
14814done
14815
14816if test -n "$cf_new_cflags" ; then
14817
14818	CFLAGS="$CFLAGS $cf_new_cflags"
14819fi
14820
14821if test -n "$cf_new_cppflags" ; then
14822
14823	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14824fi
14825
14826if test -n "$cf_new_extra_cppflags" ; then
14827
14828	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14829fi
14830
14831else
14832	IMAKE_CFLAGS=
14833	IMAKE_LOADFLAGS=
14834	test -n "$verbose" && echo "	make fallback definitions" 1>&6
14835
14836echo "${as_me:-configure}:14836: testing make fallback definitions ..." 1>&5
14837
14838	# We prefer config.guess' values when we can get them, to avoid
14839	# inconsistent results with uname (AIX for instance).  However,
14840	# config.guess is not always consistent either.
14841	case $host_os in
14842	(*[0-9].[0-9]*)
14843		UNAME_RELEASE="$host_os"
14844		;;
14845	(*)
14846		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
14847		;;
14848	esac
14849
14850	case .$UNAME_RELEASE in
14851	(*[0-9].[0-9]*)
14852		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
14853		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
14854		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
14855		test -z "$OSMINORVERSION" && OSMINORVERSION=0
14856		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
14857		;;
14858	esac
14859
14860	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
14861	# fallback/fragments for NeedPrototypes, etc.
14862	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
14863
14864	# If this is not set properly, Xaw's scrollbars will not work
14865	if test "$enable_narrowproto" = yes ; then
14866		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
14867	fi
14868
14869	# Other special definitions:
14870	case $host_os in
14871	(aix*)
14872		# imake on AIX 5.1 defines AIXV3.  really.
14873		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
14874		;;
14875	(irix[56].*)
14876		# these are needed to make SIGWINCH work in xterm
14877		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
14878		;;
14879	esac
14880
14881cf_fix_cppflags=no
14882cf_new_cflags=
14883cf_new_cppflags=
14884cf_new_extra_cppflags=
14885
14886for cf_add_cflags in $IMAKE_CFLAGS
14887do
14888case $cf_fix_cppflags in
14889(no)
14890	case $cf_add_cflags in
14891	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14892		case $cf_add_cflags in
14893		(-D*)
14894			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14895
14896			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14897				&& test -z "${cf_tst_cflags}" \
14898				&& cf_fix_cppflags=yes
14899
14900			if test $cf_fix_cppflags = yes ; then
14901				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14902				continue
14903			elif test "${cf_tst_cflags}" = "\"'" ; then
14904				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14905				continue
14906			fi
14907			;;
14908		esac
14909		case "$CPPFLAGS" in
14910		(*$cf_add_cflags)
14911			;;
14912		(*)
14913			case $cf_add_cflags in
14914			(-D*)
14915				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14916
14917CPPFLAGS=`echo "$CPPFLAGS" | \
14918	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14919		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14920
14921				;;
14922			esac
14923			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
14924			;;
14925		esac
14926		;;
14927	(*)
14928		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
14929		;;
14930	esac
14931	;;
14932(yes)
14933	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
14934
14935	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14936
14937	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14938		&& test -z "${cf_tst_cflags}" \
14939		&& cf_fix_cppflags=no
14940	;;
14941esac
14942done
14943
14944if test -n "$cf_new_cflags" ; then
14945
14946	CFLAGS="$CFLAGS $cf_new_cflags"
14947fi
14948
14949if test -n "$cf_new_cppflags" ; then
14950
14951	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
14952fi
14953
14954if test -n "$cf_new_extra_cppflags" ; then
14955
14956	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
14957fi
14958
14959fi
14960
14961# Extract the first word of "groff", so it can be a program name with args.
14962set dummy groff; ac_word=$2
14963echo "$as_me:14963: checking for $ac_word" >&5
14964echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14965if test "${ac_cv_path_GROFF_PATH+set}" = set; then
14966  echo $ECHO_N "(cached) $ECHO_C" >&6
14967else
14968  case $GROFF_PATH in
14969  [\\/]* | ?:[\\/]*)
14970  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
14971  ;;
14972  *)
14973  ac_save_IFS=$IFS; IFS=$ac_path_separator
14974ac_dummy="$PATH"
14975for ac_dir in $ac_dummy; do
14976  IFS=$ac_save_IFS
14977  test -z "$ac_dir" && ac_dir=.
14978  if $as_executable_p "$ac_dir/$ac_word"; then
14979   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
14980   echo "$as_me:14980: found $ac_dir/$ac_word" >&5
14981   break
14982fi
14983done
14984
14985  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
14986  ;;
14987esac
14988fi
14989GROFF_PATH=$ac_cv_path_GROFF_PATH
14990
14991if test -n "$GROFF_PATH"; then
14992  echo "$as_me:14992: result: $GROFF_PATH" >&5
14993echo "${ECHO_T}$GROFF_PATH" >&6
14994else
14995  echo "$as_me:14995: result: no" >&5
14996echo "${ECHO_T}no" >&6
14997fi
14998
14999if test "x$GROFF_PATH" = xno
15000then
15001	NROFF_NOTE=
15002	GROFF_NOTE="#"
15003else
15004	NROFF_NOTE="#"
15005	GROFF_NOTE=
15006fi
15007
15008echo "$as_me:15008: checking for program to convert manpage to html" >&5
15009echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
15010
15011# Check whether --with-man2html or --without-man2html was given.
15012if test "${with_man2html+set}" = set; then
15013  withval="$with_man2html"
15014  cf_man2html=$withval
15015else
15016  cf_man2html=$GROFF_PATH
15017fi;
15018
15019cf_with_groff=no
15020
15021case $cf_man2html in
15022(yes)
15023	echo "$as_me:15023: result: man2html" >&5
15024echo "${ECHO_T}man2html" >&6
15025	# Extract the first word of "man2html", so it can be a program name with args.
15026set dummy man2html; ac_word=$2
15027echo "$as_me:15027: checking for $ac_word" >&5
15028echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15029if test "${ac_cv_path_cf_man2html+set}" = set; then
15030  echo $ECHO_N "(cached) $ECHO_C" >&6
15031else
15032  case $cf_man2html in
15033  [\\/]* | ?:[\\/]*)
15034  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
15035  ;;
15036  *)
15037  ac_save_IFS=$IFS; IFS=$ac_path_separator
15038ac_dummy="$PATH"
15039for ac_dir in $ac_dummy; do
15040  IFS=$ac_save_IFS
15041  test -z "$ac_dir" && ac_dir=.
15042  if $as_executable_p "$ac_dir/$ac_word"; then
15043   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
15044   echo "$as_me:15044: found $ac_dir/$ac_word" >&5
15045   break
15046fi
15047done
15048
15049  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
15050  ;;
15051esac
15052fi
15053cf_man2html=$ac_cv_path_cf_man2html
15054
15055if test -n "$cf_man2html"; then
15056  echo "$as_me:15056: result: $cf_man2html" >&5
15057echo "${ECHO_T}$cf_man2html" >&6
15058else
15059  echo "$as_me:15059: result: no" >&5
15060echo "${ECHO_T}no" >&6
15061fi
15062
15063	;;
15064(no|groff|*/groff*)
15065	cf_with_groff=yes
15066	cf_man2html=$GROFF_PATH
15067	echo "$as_me:15067: result: $cf_man2html" >&5
15068echo "${ECHO_T}$cf_man2html" >&6
15069	;;
15070(*)
15071	echo "$as_me:15071: result: $cf_man2html" >&5
15072echo "${ECHO_T}$cf_man2html" >&6
15073	;;
15074esac
15075
15076MAN2HTML_TEMP="man2html.tmp"
15077	cat >$MAN2HTML_TEMP <<CF_EOF
15078#!/bin/sh
15079# Temporary script generated by CF_WITH_MAN2HTML
15080# Convert inputs to html, sending result to standard output.
15081#
15082# Parameters:
15083#  = rootname of file to convert
15084#  = suffix of file to convert, e.g., "1"
15085#  = macros to use, e.g., "man"
15086#
15087ROOT=\$1
15088TYPE=\$2
15089MACS=\$3
15090
15091unset LANG
15092unset LC_ALL
15093unset LC_CTYPE
15094unset LANGUAGE
15095GROFF_NO_SGR=stupid
15096export GROFF_NO_SGR
15097
15098CF_EOF
15099
15100if test "x$cf_with_groff" = xyes
15101then
15102	MAN2HTML_NOTE="$GROFF_NOTE"
15103	MAN2HTML_PATH="$GROFF_PATH"
15104	cat >>$MAN2HTML_TEMP <<CF_EOF
15105/bin/sh -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
15106CF_EOF
15107else
15108	MAN2HTML_NOTE=""
15109
15110if test "x$prefix" != xNONE; then
15111  cf_path_syntax="$prefix"
15112else
15113  cf_path_syntax="$ac_default_prefix"
15114fi
15115
15116case ".$cf_man2html" in
15117(.\$\(*\)*|.\'*\'*)
15118  ;;
15119(..|./*|.\\*)
15120  ;;
15121(.[a-zA-Z]:[\\/]*) # OS/2 EMX
15122  ;;
15123(.\${*prefix}*|.\${*dir}*)
15124  eval cf_man2html="$cf_man2html"
15125  case ".$cf_man2html" in
15126  (.NONE/*)
15127    cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
15128    ;;
15129  esac
15130  ;;
15131(.no|.NONE/*)
15132  cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
15133  ;;
15134(*)
15135  { { echo "$as_me:15135: error: expected a pathname, not \"$cf_man2html\"" >&5
15136echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
15137   { (exit 1); exit 1; }; }
15138  ;;
15139esac
15140
15141	MAN2HTML_PATH="$cf_man2html"
15142	echo "$as_me:15142: checking for $cf_man2html top/bottom margins" >&5
15143echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
15144
15145	# for this example, expect 3 lines of content, the remainder is head/foot
15146	cat >conftest.in <<CF_EOF
15147.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
15148.SH SECTION
15149MARKER
15150CF_EOF
15151
15152	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
15153
15154	cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
15155	cf_man2html_top=`expr $cf_man2html_1st - 2`
15156	cf_man2html_bot=`wc -l conftest.out |sed -e 's/[^0-9]//g'`
15157	cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
15158	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
15159
15160	echo "$as_me:15160: result: $cf_man2html_top_bot" >&5
15161echo "${ECHO_T}$cf_man2html_top_bot" >&6
15162
15163	echo "$as_me:15163: checking for pagesize to use" >&5
15164echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
15165	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
15166	do
15167	cat >>conftest.in <<CF_EOF
15168.nf
151690
151701
151712
151723
151734
151745
151756
151767
151778
151789
15179CF_EOF
15180	done
15181
15182	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
15183	cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
15184	test -z "$cf_man2html_page" && cf_man2html_page=99999
15185	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
15186
15187	rm -rf conftest*
15188	echo "$as_me:15188: result: $cf_man2html_page" >&5
15189echo "${ECHO_T}$cf_man2html_page" >&6
15190
15191	cat >>$MAN2HTML_TEMP <<CF_EOF
15192: \${MAN2HTML_PATH=$MAN2HTML_PATH}
15193MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
15194case \${TYPE} in
15195(ms)
15196	tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
15197	;;
15198(*)
15199	tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
15200	;;
15201esac
15202CF_EOF
15203fi
15204
15205chmod 700 $MAN2HTML_TEMP
15206
15207# If we have already established that there is a full termcap implementation,
15208# suppress the definitions for terminfo that we make have imported from the
15209# imake-file.
15210if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
15211	case "$IMAKE_CFLAGS" in
15212	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
15213
15214	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
15215
15216echo "${as_me:-configure}:15216: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
15217
15218	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
15219	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
15220
15221echo "${as_me:-configure}:15221: testing ...result $IMAKE_CFLAGS ..." 1>&5
15222
15223	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
15224
15225echo "${as_me:-configure}:15225: testing removing terminfo flags from CPPFLAGS ..." 1>&5
15226
15227	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
15228	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
15229
15230echo "${as_me:-configure}:15230: testing ...result $CPPFLAGS ..." 1>&5
15231
15232		;;
15233	esac
15234fi
15235
15236echo "$as_me:15236: checking for default terminal-id" >&5
15237echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
15238
15239# Check whether --with-terminal-id or --without-terminal-id was given.
15240if test "${with_terminal_id+set}" = set; then
15241  withval="$with_terminal_id"
15242  default_termid=$withval
15243else
15244  default_termid=vt420
15245fi;
15246echo "$as_me:15246: result: $default_termid" >&5
15247echo "${ECHO_T}$default_termid" >&6
15248case $default_termid in
15249(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
15250	;;
15251esac
15252
15253cat >>confdefs.h <<EOF
15254#define DFT_DECID "$default_termid"
15255EOF
15256
15257echo "$as_me:15257: checking for default terminal-type" >&5
15258echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
15259
15260# Check whether --with-terminal-type or --without-terminal-type was given.
15261if test "${with_terminal_type+set}" = set; then
15262  withval="$with_terminal_type"
15263  default_TERM=$withval
15264else
15265  default_TERM=xterm
15266fi;
15267echo "$as_me:15267: result: $default_TERM" >&5
15268echo "${ECHO_T}$default_TERM" >&6
15269
15270cat >>confdefs.h <<EOF
15271#define DFT_TERMTYPE "$default_TERM"
15272EOF
15273
15274###############################################################################
15275echo "$as_me:15275: checking if backarrow-key should be BS" >&5
15276echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
15277
15278# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
15279if test "${enable_backarrow_key+set}" = set; then
15280  enableval="$enable_backarrow_key"
15281  test "$enableval" != no && enableval=yes
15282  if test "$enableval" != "yes" ; then
15283    backarrow_is_bs=$enableval
15284  else
15285    backarrow_is_bs=yes
15286  fi
15287else
15288  enableval=yes
15289  backarrow_is_bs=yes
15290
15291fi;
15292
15293echo "$as_me:15293: result: $backarrow_is_bs" >&5
15294echo "${ECHO_T}$backarrow_is_bs" >&6
15295case $backarrow_is_bs in
15296(yes)
15297	backarrow_is_bs=true
15298	;;
15299(no)
15300	backarrow_is_bs=false
15301	;;
15302esac
15303cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
15304
15305cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15306
15307cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
15308backarrow_is_bs=${cf_xbool1}${cf_xbool2}
15309
15310cat >>confdefs.h <<EOF
15311#define DEF_BACKARO_BS $backarrow_is_bs
15312EOF
15313
15314echo "$as_me:15314: checking if backarrow-key should be treated as erase" >&5
15315echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
15316
15317# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
15318if test "${enable_backarrow_is_erase+set}" = set; then
15319  enableval="$enable_backarrow_is_erase"
15320  test "$enableval" != yes && enableval=no
15321  if test "$enableval" != "no" ; then
15322    backarrow_is_erase=$enableval
15323  else
15324    backarrow_is_erase=no
15325  fi
15326else
15327  enableval=no
15328  backarrow_is_erase=no
15329
15330fi;
15331
15332echo "$as_me:15332: result: $backarrow_is_erase" >&5
15333echo "${ECHO_T}$backarrow_is_erase" >&6
15334case $backarrow_is_erase in
15335(yes)
15336	backarrow_is_erase=true
15337	;;
15338(no)
15339	backarrow_is_erase=false
15340	;;
15341esac
15342cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
15343
15344cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15345
15346cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
15347backarrow_is_erase=${cf_xbool1}${cf_xbool2}
15348
15349cat >>confdefs.h <<EOF
15350#define DEF_BACKARO_ERASE $backarrow_is_erase
15351EOF
15352
15353echo "$as_me:15353: checking for default backspace/DEL setting" >&5
15354echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
15355
15356# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
15357if test "${enable_delete_is_del+set}" = set; then
15358  enableval="$enable_delete_is_del"
15359  delete_is_del=$enableval
15360else
15361  delete_is_del=maybe
15362fi;
15363
15364echo "$as_me:15364: result: $delete_is_del" >&5
15365echo "${ECHO_T}$delete_is_del" >&6
15366case $delete_is_del in
15367(yes)
15368	delete_is_del=true
15369	;;
15370(no)
15371	delete_is_del=false
15372	;;
15373esac
15374cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
15375
15376cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15377
15378cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
15379delete_is_del=${cf_xbool1}${cf_xbool2}
15380
15381cat >>confdefs.h <<EOF
15382#define DEFDELETE_DEL $delete_is_del
15383EOF
15384
15385echo "$as_me:15385: checking for default pty initial erase setting" >&5
15386echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
15387
15388# Check whether --enable-pty-erase or --disable-pty-erase was given.
15389if test "${enable_pty_erase+set}" = set; then
15390  enableval="$enable_pty_erase"
15391  initial_erase=$enableval
15392else
15393  initial_erase=False
15394fi;
15395
15396echo "$as_me:15396: result: $initial_erase" >&5
15397echo "${ECHO_T}$initial_erase" >&6
15398case $initial_erase in
15399(yes)
15400	initial_erase=true
15401	;;
15402(no)
15403	initial_erase=false
15404	;;
15405esac
15406cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
15407
15408cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15409
15410cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
15411initial_erase=${cf_xbool1}${cf_xbool2}
15412
15413cat >>confdefs.h <<EOF
15414#define DEF_INITIAL_ERASE $initial_erase
15415EOF
15416
15417echo "$as_me:15417: checking if alt should send ESC" >&5
15418echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
15419
15420# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
15421if test "${enable_alt_sends_esc+set}" = set; then
15422  enableval="$enable_alt_sends_esc"
15423  test "$enableval" != yes && enableval=no
15424  if test "$enableval" != "no" ; then
15425    alt_sends_esc=$enableval
15426  else
15427    alt_sends_esc=no
15428  fi
15429else
15430  enableval=no
15431  alt_sends_esc=no
15432
15433fi;
15434
15435echo "$as_me:15435: result: $alt_sends_esc" >&5
15436echo "${ECHO_T}$alt_sends_esc" >&6
15437case $alt_sends_esc in
15438(yes)
15439	alt_sends_esc=true
15440	;;
15441(no)
15442	alt_sends_esc=false
15443	;;
15444esac
15445cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
15446
15447cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15448
15449cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
15450alt_sends_esc=${cf_xbool1}${cf_xbool2}
15451
15452cat >>confdefs.h <<EOF
15453#define DEF_ALT_SENDS_ESC $alt_sends_esc
15454EOF
15455
15456echo "$as_me:15456: checking if meta should send ESC" >&5
15457echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
15458
15459# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
15460if test "${enable_meta_sends_esc+set}" = set; then
15461  enableval="$enable_meta_sends_esc"
15462  test "$enableval" != yes && enableval=no
15463  if test "$enableval" != "no" ; then
15464    meta_sends_esc=$enableval
15465  else
15466    meta_sends_esc=no
15467  fi
15468else
15469  enableval=no
15470  meta_sends_esc=no
15471
15472fi;
15473
15474echo "$as_me:15474: result: $meta_sends_esc" >&5
15475echo "${ECHO_T}$meta_sends_esc" >&6
15476case $meta_sends_esc in
15477(yes)
15478	meta_sends_esc=true
15479	;;
15480(no)
15481	meta_sends_esc=false
15482	;;
15483esac
15484cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
15485
15486cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15487
15488cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
15489meta_sends_esc=${cf_xbool1}${cf_xbool2}
15490
15491cat >>confdefs.h <<EOF
15492#define DEF_META_SENDS_ESC $meta_sends_esc
15493EOF
15494
15495###############################################################################
15496# Extract the first word of "tic", so it can be a program name with args.
15497set dummy tic; ac_word=$2
15498echo "$as_me:15498: checking for $ac_word" >&5
15499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15500if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
15501  echo $ECHO_N "(cached) $ECHO_C" >&6
15502else
15503  if test -n "$cf_tic_prog"; then
15504  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
15505else
15506  ac_save_IFS=$IFS; IFS=$ac_path_separator
15507ac_dummy="$PATH"
15508for ac_dir in $ac_dummy; do
15509  IFS=$ac_save_IFS
15510  test -z "$ac_dir" && ac_dir=.
15511  $as_executable_p "$ac_dir/$ac_word" || continue
15512ac_cv_prog_cf_tic_prog="yes"
15513echo "$as_me:15513: found $ac_dir/$ac_word" >&5
15514break
15515done
15516
15517  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
15518fi
15519fi
15520cf_tic_prog=$ac_cv_prog_cf_tic_prog
15521if test -n "$cf_tic_prog"; then
15522  echo "$as_me:15522: result: $cf_tic_prog" >&5
15523echo "${ECHO_T}$cf_tic_prog" >&6
15524else
15525  echo "$as_me:15525: result: no" >&5
15526echo "${ECHO_T}no" >&6
15527fi
15528
15529if test "$cf_tic_prog" = yes ; then
15530	echo "$as_me:15530: checking for private terminfo-directory" >&5
15531echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
15532
15533# Check whether --with-own-terminfo or --without-own-terminfo was given.
15534if test "${with_own_terminfo+set}" = set; then
15535  withval="$with_own_terminfo"
15536  TERMINFO_DIR=$withval
15537else
15538  TERMINFO_DIR=${TERMINFO-none}
15539fi;
15540	echo "$as_me:15540: result: $TERMINFO_DIR" >&5
15541echo "${ECHO_T}$TERMINFO_DIR" >&6
15542	if test "$TERMINFO_DIR" = yes ; then
15543		{ echo "$as_me:15543: WARNING: no value given" >&5
15544echo "$as_me: WARNING: no value given" >&2;}
15545	elif test "$TERMINFO_DIR" != none ; then
15546		if test -d $TERMINFO_DIR ; then
15547
15548cat >>confdefs.h <<EOF
15549#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
15550EOF
15551
15552		else
15553			{ echo "$as_me:15553: WARNING: not a directory" >&5
15554echo "$as_me: WARNING: not a directory" >&2;}
15555		fi
15556	elif test "$prefix" != NONE ; then
15557		TERMINFO_DIR='${prefix}/lib/terminfo'
15558	elif test -d /usr/lib/terminfo ; then
15559		TERMINFO_DIR=/usr/lib/terminfo
15560	else
15561		TERMINFO_DIR=
15562	fi
15563	SET_TERMINFO=
15564	if test -n "$TERMINFO_DIR" ; then
15565		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
15566		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
15567	fi
15568	no_ticprog=
15569else
15570	no_ticprog="#"
15571	TERMINFO_DIR=
15572	SET_TERMINFO=
15573fi
15574
15575###############################################################################
15576
15577echo "$as_me:15577: checking if you want active-icons" >&5
15578echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
15579
15580# Check whether --enable-active-icon or --disable-active-icon was given.
15581if test "${enable_active_icon+set}" = set; then
15582  enableval="$enable_active_icon"
15583  test "$enableval" != no && enableval=yes
15584  if test "$enableval" != "yes" ; then
15585    enable_active_icon=no
15586  else
15587    enable_active_icon=yes
15588  fi
15589else
15590  enableval=yes
15591  enable_active_icon=yes
15592
15593fi;
15594echo "$as_me:15594: result: $enable_active_icon" >&5
15595echo "${ECHO_T}$enable_active_icon" >&6
15596if test "$enable_active_icon" = no ; then
15597
15598cat >>confdefs.h <<\EOF
15599#define NO_ACTIVE_ICON 1
15600EOF
15601
15602fi
15603
15604echo "$as_me:15604: checking if you want ANSI color" >&5
15605echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
15606
15607# Check whether --enable-ansi-color or --disable-ansi-color was given.
15608if test "${enable_ansi_color+set}" = set; then
15609  enableval="$enable_ansi_color"
15610  test "$enableval" != no && enableval=yes
15611  if test "$enableval" != "yes" ; then
15612    enable_ansi_color=no
15613  else
15614    enable_ansi_color=yes
15615  fi
15616else
15617  enableval=yes
15618  enable_ansi_color=yes
15619
15620fi;
15621echo "$as_me:15621: result: $enable_ansi_color" >&5
15622echo "${ECHO_T}$enable_ansi_color" >&6
15623test "$enable_ansi_color" = no &&
15624cat >>confdefs.h <<\EOF
15625#define OPT_ISO_COLORS 0
15626EOF
15627
15628if test "$enable_ansi_color" = yes ; then
15629
15630	echo "$as_me:15630: checking if you want 16 colors like aixterm" >&5
15631echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
15632
15633# Check whether --enable-16-color or --disable-16-color was given.
15634if test "${enable_16_color+set}" = set; then
15635  enableval="$enable_16_color"
15636  test "$enableval" != no && enableval=yes
15637  if test "$enableval" != "yes" ; then
15638    enable_16_color=no
15639  else
15640    enable_16_color=yes
15641  fi
15642else
15643  enableval=yes
15644  enable_16_color=yes
15645
15646fi;
15647	echo "$as_me:15647: result: $enable_16_color" >&5
15648echo "${ECHO_T}$enable_16_color" >&6
15649	test "$enable_16_color" = no &&
15650cat >>confdefs.h <<\EOF
15651#define OPT_AIX_COLORS 0
15652EOF
15653
15654	echo "$as_me:15654: checking if you want 256 colors" >&5
15655echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
15656
15657# Check whether --enable-256-color or --disable-256-color was given.
15658if test "${enable_256_color+set}" = set; then
15659  enableval="$enable_256_color"
15660  test "$enableval" != yes && enableval=no
15661  if test "$enableval" != "no" ; then
15662    enable_256_color=yes
15663  else
15664    enable_256_color=no
15665  fi
15666else
15667  enableval=no
15668  enable_256_color=no
15669
15670fi;
15671	echo "$as_me:15671: result: $enable_256_color" >&5
15672echo "${ECHO_T}$enable_256_color" >&6
15673	if test "$enable_256_color" = yes ; then
15674		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
15675		EXTRAHDRS="$EXTRAHDRS 256colres.h"
15676
15677cat >>confdefs.h <<\EOF
15678#define OPT_256_COLORS 1
15679EOF
15680
15681	else
15682	echo "$as_me:15682: checking if you want 88 colors" >&5
15683echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
15684
15685# Check whether --enable-88-color or --disable-88-color was given.
15686if test "${enable_88_color+set}" = set; then
15687  enableval="$enable_88_color"
15688  test "$enableval" != yes && enableval=no
15689  if test "$enableval" != "no" ; then
15690    enable_88_color=yes
15691  else
15692    enable_88_color=no
15693  fi
15694else
15695  enableval=no
15696  enable_88_color=no
15697
15698fi;
15699	echo "$as_me:15699: result: $enable_88_color" >&5
15700echo "${ECHO_T}$enable_88_color" >&6
15701	if test "$enable_88_color" = yes ; then
15702		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
15703		EXTRAHDRS="$EXTRAHDRS 88colres.h"
15704
15705cat >>confdefs.h <<\EOF
15706#define OPT_88_COLORS 1
15707EOF
15708
15709	fi
15710	fi
15711
15712fi
15713
15714echo "$as_me:15714: checking if you want blinking cursor" >&5
15715echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
15716
15717# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
15718if test "${enable_blink_cursor+set}" = set; then
15719  enableval="$enable_blink_cursor"
15720  test "$enableval" != no && enableval=yes
15721  if test "$enableval" != "yes" ; then
15722    enable_blink_curs=no
15723  else
15724    enable_blink_curs=yes
15725  fi
15726else
15727  enableval=yes
15728  enable_blink_curs=yes
15729
15730fi;
15731echo "$as_me:15731: result: $enable_blink_curs" >&5
15732echo "${ECHO_T}$enable_blink_curs" >&6
15733test "$enable_blink_curs" = no &&
15734cat >>confdefs.h <<\EOF
15735#define OPT_BLINK_CURS 0
15736EOF
15737
15738echo "$as_me:15738: checking if you want to ignore Linux's broken palette-strings" >&5
15739echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
15740
15741case $host_os in
15742(linux*)
15743	assume_broken_osc=yes ;;
15744(*)
15745	assume_broken_osc=no ;;
15746esac
15747
15748# Check whether --enable-broken-osc or --disable-broken-osc was given.
15749if test "${enable_broken_osc+set}" = set; then
15750  enableval="$enable_broken_osc"
15751  test "$enableval" != no && enableval=yes
15752  if test "$enableval" != "$assume_broken_osc" ; then
15753    enable_broken_osc=$enableval
15754  else
15755    enable_broken_osc=$enableval
15756  fi
15757else
15758  enableval=$assume_broken_osc
15759  enable_broken_osc=$enableval
15760
15761fi;
15762echo "$as_me:15762: result: $enable_broken_osc" >&5
15763echo "${ECHO_T}$enable_broken_osc" >&6
15764if test "$enable_broken_osc" = yes ; then
15765
15766cat >>confdefs.h <<\EOF
15767#define OPT_BROKEN_OSC 1
15768EOF
15769
15770else
15771
15772cat >>confdefs.h <<\EOF
15773#define OPT_BROKEN_OSC 0
15774EOF
15775
15776fi
15777
15778echo "$as_me:15778: checking if you want to allow broken string-terminators" >&5
15779echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
15780
15781# Check whether --enable-broken-st or --disable-broken-st was given.
15782if test "${enable_broken_st+set}" = set; then
15783  enableval="$enable_broken_st"
15784  test "$enableval" != yes && enableval=no
15785  if test "$enableval" != "no" ; then
15786    enable_broken_st=no
15787  else
15788    enable_broken_st=yes
15789  fi
15790else
15791  enableval=no
15792  enable_broken_st=yes
15793
15794fi;
15795echo "$as_me:15795: result: $enable_broken_st" >&5
15796echo "${ECHO_T}$enable_broken_st" >&6
15797test "$enable_broken_st" = no &&
15798cat >>confdefs.h <<\EOF
15799#define OPT_BROKEN_ST 0
15800EOF
15801
15802echo "$as_me:15802: checking if you want to compile-in icon data" >&5
15803echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
15804
15805# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
15806if test "${enable_builtin_xpms+set}" = set; then
15807  enableval="$enable_builtin_xpms"
15808  test "$enableval" != yes && enableval=no
15809  if test "$enableval" != "no" ; then
15810    enable_builtin_xpms=no
15811  else
15812    enable_builtin_xpms=yes
15813  fi
15814else
15815  enableval=no
15816  enable_builtin_xpms=yes
15817
15818fi;
15819echo "$as_me:15819: result: $enable_builtin_xpms" >&5
15820echo "${ECHO_T}$enable_builtin_xpms" >&6
15821test "$enable_builtin_xpms" = yes &&
15822cat >>confdefs.h <<\EOF
15823#define OPT_BUILTIN_XPMS 1
15824EOF
15825
15826echo "$as_me:15826: checking if you want printable 128-159" >&5
15827echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
15828
15829# Check whether --enable-c1-print or --disable-c1-print was given.
15830if test "${enable_c1_print+set}" = set; then
15831  enableval="$enable_c1_print"
15832  test "$enableval" != no && enableval=yes
15833  if test "$enableval" != "yes" ; then
15834    enable_c1_print=no
15835  else
15836    enable_c1_print=yes
15837  fi
15838else
15839  enableval=yes
15840  enable_c1_print=yes
15841
15842fi;
15843echo "$as_me:15843: result: $enable_c1_print" >&5
15844echo "${ECHO_T}$enable_c1_print" >&6
15845test "$enable_c1_print" = no &&
15846cat >>confdefs.h <<\EOF
15847#define OPT_C1_PRINT 0
15848EOF
15849
15850if test "$enable_ansi_color" = yes ; then
15851
15852	echo "$as_me:15852: checking if you want bold colors mapped like IBM PC" >&5
15853echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
15854
15855# Check whether --enable-bold-color or --disable-bold-color was given.
15856if test "${enable_bold_color+set}" = set; then
15857  enableval="$enable_bold_color"
15858  test "$enableval" != no && enableval=yes
15859  if test "$enableval" != "yes" ; then
15860    enable_pc_color=no
15861  else
15862    enable_pc_color=yes
15863  fi
15864else
15865  enableval=yes
15866  enable_pc_color=yes
15867
15868fi;
15869	echo "$as_me:15869: result: $enable_pc_color" >&5
15870echo "${ECHO_T}$enable_pc_color" >&6
15871	test "$enable_pc_color" = no &&
15872cat >>confdefs.h <<\EOF
15873#define OPT_PC_COLORS 0
15874EOF
15875
15876	echo "$as_me:15876: checking if you want separate color-classes" >&5
15877echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
15878
15879# Check whether --enable-color-class or --disable-color-class was given.
15880if test "${enable_color_class+set}" = set; then
15881  enableval="$enable_color_class"
15882  test "$enableval" != no && enableval=yes
15883  if test "$enableval" != "yes" ; then
15884    enable_color_class=no
15885  else
15886    enable_color_class=yes
15887  fi
15888else
15889  enableval=yes
15890  enable_color_class=yes
15891
15892fi;
15893	echo "$as_me:15893: result: $enable_color_class" >&5
15894echo "${ECHO_T}$enable_color_class" >&6
15895	test "$enable_color_class" = no &&
15896cat >>confdefs.h <<\EOF
15897#define OPT_COLOR_CLASS 0
15898EOF
15899
15900	echo "$as_me:15900: checking if you want color-mode enabled by default" >&5
15901echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
15902
15903# Check whether --enable-color-mode or --disable-color-mode was given.
15904if test "${enable_color_mode+set}" = set; then
15905  enableval="$enable_color_mode"
15906  test "$enableval" != no && enableval=yes
15907  if test "$enableval" != "yes" ; then
15908    default_colormode=no
15909  else
15910    default_colormode=yes
15911  fi
15912else
15913  enableval=yes
15914  default_colormode=yes
15915
15916fi;
15917	echo "$as_me:15917: result: $default_colormode" >&5
15918echo "${ECHO_T}$default_colormode" >&6
15919	test "$default_colormode" = no &&
15920cat >>confdefs.h <<\EOF
15921#define DFT_COLORMODE 0
15922EOF
15923
15924fi
15925
15926echo "$as_me:15926: checking if you want support for color highlighting" >&5
15927echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
15928
15929# Check whether --enable-highlighting or --disable-highlighting was given.
15930if test "${enable_highlighting+set}" = set; then
15931  enableval="$enable_highlighting"
15932  test "$enableval" != no && enableval=yes
15933  if test "$enableval" != "yes" ; then
15934    default_highlight=no
15935  else
15936    default_highlight=yes
15937  fi
15938else
15939  enableval=yes
15940  default_highlight=yes
15941
15942fi;
15943echo "$as_me:15943: result: $default_highlight" >&5
15944echo "${ECHO_T}$default_highlight" >&6
15945test "$default_highlight" = no &&
15946cat >>confdefs.h <<\EOF
15947#define OPT_HIGHLIGHT_COLOR 0
15948EOF
15949
15950echo "$as_me:15950: checking if you want support for doublesize characters" >&5
15951echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
15952
15953# Check whether --enable-doublechars or --disable-doublechars was given.
15954if test "${enable_doublechars+set}" = set; then
15955  enableval="$enable_doublechars"
15956  test "$enableval" != no && enableval=yes
15957  if test "$enableval" != "yes" ; then
15958    enable_doublechars=no
15959  else
15960    enable_doublechars=yes
15961  fi
15962else
15963  enableval=yes
15964  enable_doublechars=yes
15965
15966fi;
15967echo "$as_me:15967: result: $enable_doublechars" >&5
15968echo "${ECHO_T}$enable_doublechars" >&6
15969test "$enable_doublechars" = no &&
15970cat >>confdefs.h <<\EOF
15971#define OPT_DEC_CHRSET 0
15972EOF
15973
15974echo "$as_me:15974: checking if you want fallback-support for box characters" >&5
15975echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
15976
15977# Check whether --enable-boxchars or --disable-boxchars was given.
15978if test "${enable_boxchars+set}" = set; then
15979  enableval="$enable_boxchars"
15980  test "$enableval" != no && enableval=yes
15981  if test "$enableval" != "yes" ; then
15982    enable_boxchars=no
15983  else
15984    enable_boxchars=yes
15985  fi
15986else
15987  enableval=yes
15988  enable_boxchars=yes
15989
15990fi;
15991echo "$as_me:15991: result: $enable_boxchars" >&5
15992echo "${ECHO_T}$enable_boxchars" >&6
15993test "$enable_boxchars" = no &&
15994cat >>confdefs.h <<\EOF
15995#define OPT_BOX_CHARS 0
15996EOF
15997
15998echo "$as_me:15998: checking if you want to allow spawning new xterms" >&5
15999echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
16000
16001# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
16002if test "${enable_exec_xterm+set}" = set; then
16003  enableval="$enable_exec_xterm"
16004  test "$enableval" != yes && enableval=no
16005  if test "$enableval" != "no" ; then
16006    enable_exec_xterm=yes
16007  else
16008    enable_exec_xterm=no
16009  fi
16010else
16011  enableval=no
16012  enable_exec_xterm=no
16013
16014fi;
16015echo "$as_me:16015: result: $enable_exec_xterm" >&5
16016echo "${ECHO_T}$enable_exec_xterm" >&6
16017if test "$enable_exec_xterm" = yes ; then
16018
16019echo "$as_me:16019: checking for proc tree with cwd-support" >&5
16020echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
16021if test "${cf_cv_procfs_cwd+set}" = set; then
16022  echo $ECHO_N "(cached) $ECHO_C" >&6
16023else
16024
16025cf_cv_procfs_cwd=no
16026for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
16027do
16028	if test -d $cf_path && \
16029	   test -d $cf_path/$$ && \
16030	   ( test -d $cf_path/$$/cwd || \
16031	     test -L $cf_path/$$/cwd ); then
16032		cf_cv_procfs_cwd=$cf_path
16033		break
16034	fi
16035done
16036
16037fi
16038echo "$as_me:16038: result: $cf_cv_procfs_cwd" >&5
16039echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
16040
16041	if test "$cf_cv_procfs_cwd" = no ; then
16042		{ echo "$as_me:16042: WARNING: no suitable proc filesystem found" >&5
16043echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
16044	else
16045
16046cat >>confdefs.h <<EOF
16047#define PROCFS_ROOT "$cf_cv_procfs_cwd"
16048EOF
16049
16050cat >>confdefs.h <<\EOF
16051#define OPT_EXEC_XTERM 1
16052EOF
16053
16054	fi
16055fi
16056
16057echo "$as_me:16057: checking if you want to use double-buffering" >&5
16058echo $ECHO_N "checking if you want to use double-buffering... $ECHO_C" >&6
16059
16060# Check whether --enable-double-buffer or --disable-double-buffer was given.
16061if test "${enable_double_buffer+set}" = set; then
16062  enableval="$enable_double_buffer"
16063  test "$enableval" != yes && enableval=no
16064  if test "$enableval" != "no" ; then
16065    enable_double_bfr=yes
16066  else
16067    enable_double_bfr=no
16068  fi
16069else
16070  enableval=no
16071  enable_double_bfr=no
16072
16073fi;
16074echo "$as_me:16074: result: $enable_double_bfr" >&5
16075echo "${ECHO_T}$enable_double_bfr" >&6
16076if test "$enable_double_bfr" = yes ; then
16077	case "x$LIBS" in
16078	(*Xext*)
16079		;;
16080	(*)
16081
16082if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
16083	test -n "$verbose" && echo "	found package Xext" 1>&6
16084
16085echo "${as_me:-configure}:16085: testing found package Xext ..." 1>&5
16086
16087	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
16088	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
16089	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
16090
16091echo "${as_me:-configure}:16091: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
16092
16093	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
16094
16095echo "${as_me:-configure}:16095: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
16096
16097cf_fix_cppflags=no
16098cf_new_cflags=
16099cf_new_cppflags=
16100cf_new_extra_cppflags=
16101
16102for cf_add_cflags in $cf_pkgconfig_incs
16103do
16104case $cf_fix_cppflags in
16105(no)
16106	case $cf_add_cflags in
16107	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16108		case $cf_add_cflags in
16109		(-D*)
16110			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16111
16112			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16113				&& test -z "${cf_tst_cflags}" \
16114				&& cf_fix_cppflags=yes
16115
16116			if test $cf_fix_cppflags = yes ; then
16117				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16118				continue
16119			elif test "${cf_tst_cflags}" = "\"'" ; then
16120				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16121				continue
16122			fi
16123			;;
16124		esac
16125		case "$CPPFLAGS" in
16126		(*$cf_add_cflags)
16127			;;
16128		(*)
16129			case $cf_add_cflags in
16130			(-D*)
16131				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16132
16133CPPFLAGS=`echo "$CPPFLAGS" | \
16134	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16135		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16136
16137				;;
16138			esac
16139			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16140			;;
16141		esac
16142		;;
16143	(*)
16144		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16145		;;
16146	esac
16147	;;
16148(yes)
16149	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16150
16151	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16152
16153	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16154		&& test -z "${cf_tst_cflags}" \
16155		&& cf_fix_cppflags=no
16156	;;
16157esac
16158done
16159
16160if test -n "$cf_new_cflags" ; then
16161
16162	CFLAGS="$CFLAGS $cf_new_cflags"
16163fi
16164
16165if test -n "$cf_new_cppflags" ; then
16166
16167	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16168fi
16169
16170if test -n "$cf_new_extra_cppflags" ; then
16171
16172	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16173fi
16174
16175cf_add_libs="$cf_pkgconfig_libs"
16176# Filter out duplicates - this happens with badly-designed ".pc" files...
16177for cf_add_1lib in $LIBS
16178do
16179	for cf_add_2lib in $cf_add_libs
16180	do
16181		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16182		then
16183			cf_add_1lib=
16184			break
16185		fi
16186	done
16187	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16188done
16189LIBS="$cf_add_libs"
16190
16191	:
16192else
16193	cf_pkgconfig_incs=
16194	cf_pkgconfig_libs=
16195
16196	echo "$as_me:16196: checking for XextCreateExtension in -lXext" >&5
16197echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
16198if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
16199  echo $ECHO_N "(cached) $ECHO_C" >&6
16200else
16201  ac_check_lib_save_LIBS=$LIBS
16202LIBS="-lXext  $LIBS"
16203cat >conftest.$ac_ext <<_ACEOF
16204#line 16204 "configure"
16205#include "confdefs.h"
16206
16207/* Override any gcc2 internal prototype to avoid an error.  */
16208#ifdef __cplusplus
16209extern "C"
16210#endif
16211/* We use char because int might match the return type of a gcc2
16212   builtin and then its argument prototype would still apply.  */
16213char XextCreateExtension ();
16214int
16215main ()
16216{
16217XextCreateExtension ();
16218  ;
16219  return 0;
16220}
16221_ACEOF
16222rm -f conftest.$ac_objext conftest$ac_exeext
16223if { (eval echo "$as_me:16223: \"$ac_link\"") >&5
16224  (eval $ac_link) 2>&5
16225  ac_status=$?
16226  echo "$as_me:16226: \$? = $ac_status" >&5
16227  (exit $ac_status); } &&
16228         { ac_try='test -s conftest$ac_exeext'
16229  { (eval echo "$as_me:16229: \"$ac_try\"") >&5
16230  (eval $ac_try) 2>&5
16231  ac_status=$?
16232  echo "$as_me:16232: \$? = $ac_status" >&5
16233  (exit $ac_status); }; }; then
16234  ac_cv_lib_Xext_XextCreateExtension=yes
16235else
16236  echo "$as_me: failed program was:" >&5
16237cat conftest.$ac_ext >&5
16238ac_cv_lib_Xext_XextCreateExtension=no
16239fi
16240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16241LIBS=$ac_check_lib_save_LIBS
16242fi
16243echo "$as_me:16243: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
16244echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
16245if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
16246
16247cf_add_libs="-lXext"
16248# Filter out duplicates - this happens with badly-designed ".pc" files...
16249for cf_add_1lib in $LIBS
16250do
16251	for cf_add_2lib in $cf_add_libs
16252	do
16253		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16254		then
16255			cf_add_1lib=
16256			break
16257		fi
16258	done
16259	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16260done
16261LIBS="$cf_add_libs"
16262
16263fi
16264
16265fi
16266
16267		;;
16268	esac
16269
16270cat >>confdefs.h <<\EOF
16271#define OPT_DOUBLE_BUFFER 1
16272EOF
16273
16274fi
16275
16276echo "$as_me:16276: checking if you want to use FreeType library" >&5
16277echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
16278
16279# Check whether --enable-freetype or --disable-freetype was given.
16280if test "${enable_freetype+set}" = set; then
16281  enableval="$enable_freetype"
16282  test "$enableval" != no && enableval=yes
16283  if test "$enableval" != "yes" ; then
16284    enable_freetype=no
16285  else
16286    enable_freetype=yes
16287  fi
16288else
16289  enableval=yes
16290  enable_freetype=yes
16291
16292fi;
16293echo "$as_me:16293: result: $enable_freetype" >&5
16294echo "${ECHO_T}$enable_freetype" >&6
16295if test "$enable_freetype" = yes ; then
16296
16297cf_cv_x_freetype_incs=no
16298cf_cv_x_freetype_libs=no
16299cf_extra_freetype_libs=
16300FREETYPE_CONFIG=none
16301FREETYPE_PARAMS=
16302
16303echo "$as_me:16303: checking for FreeType configuration script" >&5
16304echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
16305
16306# Check whether --with-freetype-config or --without-freetype-config was given.
16307if test "${with_freetype_config+set}" = set; then
16308  withval="$with_freetype_config"
16309  cf_cv_x_freetype_cfgs="$withval"
16310else
16311  cf_cv_x_freetype_cfgs=auto
16312fi;
16313test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
16314test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
16315echo "$as_me:16315: result: $cf_cv_x_freetype_cfgs" >&5
16316echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
16317
16318case $cf_cv_x_freetype_cfgs in
16319(none)
16320	echo "$as_me:16320: checking if you specified -D/-I options for FreeType" >&5
16321echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
16322
16323# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
16324if test "${with_freetype_cflags+set}" = set; then
16325  withval="$with_freetype_cflags"
16326  cf_cv_x_freetype_incs="$with_freetype_cflags"
16327else
16328  cf_cv_x_freetype_incs=no
16329fi;
16330	echo "$as_me:16330: result: $cf_cv_x_freetype_incs" >&5
16331echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
16332
16333	echo "$as_me:16333: checking if you specified -L/-l options for FreeType" >&5
16334echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
16335
16336# Check whether --with-freetype-libs or --without-freetype-libs was given.
16337if test "${with_freetype_libs+set}" = set; then
16338  withval="$with_freetype_libs"
16339  cf_cv_x_freetype_libs="$with_freetype_libs"
16340else
16341  cf_cv_x_freetype_libs=no
16342fi;
16343	echo "$as_me:16343: result: $cf_cv_x_freetype_libs" >&5
16344echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
16345	;;
16346(auto)
16347	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
16348		FREETYPE_CONFIG=$PKG_CONFIG
16349		FREETYPE_PARAMS=xft
16350	else
16351		# Extract the first word of "freetype-config", so it can be a program name with args.
16352set dummy freetype-config; ac_word=$2
16353echo "$as_me:16353: checking for $ac_word" >&5
16354echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16355if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
16356  echo $ECHO_N "(cached) $ECHO_C" >&6
16357else
16358  case $FREETYPE_CONFIG in
16359  [\\/]* | ?:[\\/]*)
16360  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
16361  ;;
16362  *)
16363  ac_save_IFS=$IFS; IFS=$ac_path_separator
16364ac_dummy="$PATH"
16365for ac_dir in $ac_dummy; do
16366  IFS=$ac_save_IFS
16367  test -z "$ac_dir" && ac_dir=.
16368  if $as_executable_p "$ac_dir/$ac_word"; then
16369   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
16370   echo "$as_me:16370: found $ac_dir/$ac_word" >&5
16371   break
16372fi
16373done
16374
16375  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
16376  ;;
16377esac
16378fi
16379FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
16380
16381if test -n "$FREETYPE_CONFIG"; then
16382  echo "$as_me:16382: result: $FREETYPE_CONFIG" >&5
16383echo "${ECHO_T}$FREETYPE_CONFIG" >&6
16384else
16385  echo "$as_me:16385: result: no" >&5
16386echo "${ECHO_T}no" >&6
16387fi
16388
16389		if test "$FREETYPE_CONFIG" != none; then
16390			FREETYPE_CONFIG=$FREETYPE_CONFIG
16391			cf_extra_freetype_libs="-lXft"
16392		else
16393			# Extract the first word of "xft-config", so it can be a program name with args.
16394set dummy xft-config; ac_word=$2
16395echo "$as_me:16395: checking for $ac_word" >&5
16396echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16397if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
16398  echo $ECHO_N "(cached) $ECHO_C" >&6
16399else
16400  case $FREETYPE_OLD_CONFIG in
16401  [\\/]* | ?:[\\/]*)
16402  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
16403  ;;
16404  *)
16405  ac_save_IFS=$IFS; IFS=$ac_path_separator
16406ac_dummy="$PATH"
16407for ac_dir in $ac_dummy; do
16408  IFS=$ac_save_IFS
16409  test -z "$ac_dir" && ac_dir=.
16410  if $as_executable_p "$ac_dir/$ac_word"; then
16411   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
16412   echo "$as_me:16412: found $ac_dir/$ac_word" >&5
16413   break
16414fi
16415done
16416
16417  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
16418  ;;
16419esac
16420fi
16421FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
16422
16423if test -n "$FREETYPE_OLD_CONFIG"; then
16424  echo "$as_me:16424: result: $FREETYPE_OLD_CONFIG" >&5
16425echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
16426else
16427  echo "$as_me:16427: result: no" >&5
16428echo "${ECHO_T}no" >&6
16429fi
16430
16431			if test "$FREETYPE_OLD_CONFIG" != none; then
16432				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
16433			fi
16434		fi
16435	fi
16436	;;
16437(pkg*)
16438	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
16439		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
16440		FREETYPE_PARAMS=xft
16441	else
16442		{ echo "$as_me:16442: WARNING: cannot find pkg-config for Xft" >&5
16443echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
16444	fi
16445	;;
16446(*)
16447	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
16448set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
16449echo "$as_me:16449: checking for $ac_word" >&5
16450echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16451if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
16452  echo $ECHO_N "(cached) $ECHO_C" >&6
16453else
16454  case $FREETYPE_XFT_CONFIG in
16455  [\\/]* | ?:[\\/]*)
16456  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
16457  ;;
16458  *)
16459  ac_save_IFS=$IFS; IFS=$ac_path_separator
16460ac_dummy="$PATH"
16461for ac_dir in $ac_dummy; do
16462  IFS=$ac_save_IFS
16463  test -z "$ac_dir" && ac_dir=.
16464  if $as_executable_p "$ac_dir/$ac_word"; then
16465   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
16466   echo "$as_me:16466: found $ac_dir/$ac_word" >&5
16467   break
16468fi
16469done
16470
16471  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
16472  ;;
16473esac
16474fi
16475FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
16476
16477if test -n "$FREETYPE_XFT_CONFIG"; then
16478  echo "$as_me:16478: result: $FREETYPE_XFT_CONFIG" >&5
16479echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
16480else
16481  echo "$as_me:16481: result: no" >&5
16482echo "${ECHO_T}no" >&6
16483fi
16484
16485	if test "$FREETYPE_XFT_CONFIG" != none; then
16486		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
16487	else
16488		{ echo "$as_me:16488: WARNING: cannot find config script for Xft" >&5
16489echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
16490	fi
16491	;;
16492esac
16493
16494if test "$FREETYPE_CONFIG" != none ; then
16495	echo "$as_me:16495: checking for FreeType config" >&5
16496echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
16497	echo "$as_me:16497: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
16498echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
16499
16500	if test "$cf_cv_x_freetype_incs" = no ; then
16501		echo "$as_me:16501: checking for $FREETYPE_CONFIG cflags" >&5
16502echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
16503		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
16504		echo "$as_me:16504: result: $cf_cv_x_freetype_incs" >&5
16505echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
16506	fi
16507
16508	if test "$cf_cv_x_freetype_libs" = no ; then
16509		echo "$as_me:16509: checking for $FREETYPE_CONFIG libs" >&5
16510echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
16511		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
16512		echo "$as_me:16512: result: $cf_cv_x_freetype_libs" >&5
16513echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
16514	fi
16515fi
16516
16517if test "$cf_cv_x_freetype_incs" = no ; then
16518	cf_cv_x_freetype_incs=
16519fi
16520
16521if test "$cf_cv_x_freetype_libs" = no ; then
16522	cf_cv_x_freetype_libs=-lXft
16523fi
16524
16525echo "$as_me:16525: checking if we can link with FreeType libraries" >&5
16526echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
16527
16528cf_save_LIBS="$LIBS"
16529cf_save_INCS="$CPPFLAGS"
16530
16531cf_add_libs="$cf_cv_x_freetype_libs"
16532# Filter out duplicates - this happens with badly-designed ".pc" files...
16533for cf_add_1lib in $LIBS
16534do
16535	for cf_add_2lib in $cf_add_libs
16536	do
16537		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16538		then
16539			cf_add_1lib=
16540			break
16541		fi
16542	done
16543	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16544done
16545LIBS="$cf_add_libs"
16546
16547CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
16548
16549cat >conftest.$ac_ext <<_ACEOF
16550#line 16550 "configure"
16551#include "confdefs.h"
16552
16553#include <X11/Xlib.h>
16554#include <X11/extensions/Xrender.h>
16555#include <X11/Xft/Xft.h>
16556int
16557main ()
16558{
16559
16560	XftPattern  *pat = XftNameParse ("name");
16561  ;
16562  return 0;
16563}
16564_ACEOF
16565rm -f conftest.$ac_objext conftest$ac_exeext
16566if { (eval echo "$as_me:16566: \"$ac_link\"") >&5
16567  (eval $ac_link) 2>&5
16568  ac_status=$?
16569  echo "$as_me:16569: \$? = $ac_status" >&5
16570  (exit $ac_status); } &&
16571         { ac_try='test -s conftest$ac_exeext'
16572  { (eval echo "$as_me:16572: \"$ac_try\"") >&5
16573  (eval $ac_try) 2>&5
16574  ac_status=$?
16575  echo "$as_me:16575: \$? = $ac_status" >&5
16576  (exit $ac_status); }; }; then
16577  cf_cv_found_freetype=yes
16578else
16579  echo "$as_me: failed program was:" >&5
16580cat conftest.$ac_ext >&5
16581cf_cv_found_freetype=no
16582fi
16583rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16584echo "$as_me:16584: result: $cf_cv_found_freetype" >&5
16585echo "${ECHO_T}$cf_cv_found_freetype" >&6
16586
16587LIBS="$cf_save_LIBS"
16588CPPFLAGS="$cf_save_INCS"
16589
16590if test "$cf_cv_found_freetype" = yes ; then
16591
16592cf_add_libs="$cf_cv_x_freetype_libs"
16593# Filter out duplicates - this happens with badly-designed ".pc" files...
16594for cf_add_1lib in $LIBS
16595do
16596	for cf_add_2lib in $cf_add_libs
16597	do
16598		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16599		then
16600			cf_add_1lib=
16601			break
16602		fi
16603	done
16604	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16605done
16606LIBS="$cf_add_libs"
16607
16608cf_fix_cppflags=no
16609cf_new_cflags=
16610cf_new_cppflags=
16611cf_new_extra_cppflags=
16612
16613for cf_add_cflags in $cf_cv_x_freetype_incs
16614do
16615case $cf_fix_cppflags in
16616(no)
16617	case $cf_add_cflags in
16618	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16619		case $cf_add_cflags in
16620		(-D*)
16621			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16622
16623			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16624				&& test -z "${cf_tst_cflags}" \
16625				&& cf_fix_cppflags=yes
16626
16627			if test $cf_fix_cppflags = yes ; then
16628				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16629				continue
16630			elif test "${cf_tst_cflags}" = "\"'" ; then
16631				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16632				continue
16633			fi
16634			;;
16635		esac
16636		case "$CPPFLAGS" in
16637		(*$cf_add_cflags)
16638			;;
16639		(*)
16640			case $cf_add_cflags in
16641			(-D*)
16642				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16643
16644CPPFLAGS=`echo "$CPPFLAGS" | \
16645	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16646		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16647
16648				;;
16649			esac
16650			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16651			;;
16652		esac
16653		;;
16654	(*)
16655		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16656		;;
16657	esac
16658	;;
16659(yes)
16660	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16661
16662	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16663
16664	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16665		&& test -z "${cf_tst_cflags}" \
16666		&& cf_fix_cppflags=no
16667	;;
16668esac
16669done
16670
16671if test -n "$cf_new_cflags" ; then
16672
16673	CFLAGS="$CFLAGS $cf_new_cflags"
16674fi
16675
16676if test -n "$cf_new_cppflags" ; then
16677
16678	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16679fi
16680
16681if test -n "$cf_new_extra_cppflags" ; then
16682
16683	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16684fi
16685
16686cat >>confdefs.h <<\EOF
16687#define XRENDERFONT 1
16688EOF
16689
16690for ac_func in \
16691	XftDrawCharSpec \
16692	XftDrawSetClip \
16693	XftDrawSetClipRectangles \
16694
16695do
16696as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
16697echo "$as_me:16697: checking for $ac_func" >&5
16698echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
16699if eval "test \"\${$as_ac_var+set}\" = set"; then
16700  echo $ECHO_N "(cached) $ECHO_C" >&6
16701else
16702  cat >conftest.$ac_ext <<_ACEOF
16703#line 16703 "configure"
16704#include "confdefs.h"
16705/* System header to define __stub macros and hopefully few prototypes,
16706    which can conflict with char $ac_func (); below.  */
16707#include <assert.h>
16708/* Override any gcc2 internal prototype to avoid an error.  */
16709#ifdef __cplusplus
16710extern "C"
16711#endif
16712/* We use char because int might match the return type of a gcc2
16713   builtin and then its argument prototype would still apply.  */
16714char $ac_func ();
16715char (*f) ();
16716
16717int
16718main ()
16719{
16720/* The GNU C library defines this for functions which it implements
16721    to always fail with ENOSYS.  Some functions are actually named
16722    something starting with __ and the normal name is an alias.  */
16723#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
16724choke me
16725#else
16726f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
16727#endif
16728
16729  ;
16730  return 0;
16731}
16732_ACEOF
16733rm -f conftest.$ac_objext conftest$ac_exeext
16734if { (eval echo "$as_me:16734: \"$ac_link\"") >&5
16735  (eval $ac_link) 2>&5
16736  ac_status=$?
16737  echo "$as_me:16737: \$? = $ac_status" >&5
16738  (exit $ac_status); } &&
16739         { ac_try='test -s conftest$ac_exeext'
16740  { (eval echo "$as_me:16740: \"$ac_try\"") >&5
16741  (eval $ac_try) 2>&5
16742  ac_status=$?
16743  echo "$as_me:16743: \$? = $ac_status" >&5
16744  (exit $ac_status); }; }; then
16745  eval "$as_ac_var=yes"
16746else
16747  echo "$as_me: failed program was:" >&5
16748cat conftest.$ac_ext >&5
16749eval "$as_ac_var=no"
16750fi
16751rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16752fi
16753echo "$as_me:16753: result: `eval echo '${'$as_ac_var'}'`" >&5
16754echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
16755if test `eval echo '${'$as_ac_var'}'` = yes; then
16756  cat >>confdefs.h <<EOF
16757#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
16758EOF
16759
16760fi
16761done
16762
16763else
16764	{ echo "$as_me:16764: WARNING: No libraries found for FreeType" >&5
16765echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
16766	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
16767fi
16768
16769# FIXME: revisit this if needed
16770
16771if test "$cf_cv_found_freetype" = yes ; then
16772echo "$as_me:16772: checking for usable Xft/fontconfig package" >&5
16773echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
16774if test "${cf_cv_xft_compat+set}" = set; then
16775  echo $ECHO_N "(cached) $ECHO_C" >&6
16776else
16777
16778cat >conftest.$ac_ext <<_ACEOF
16779#line 16779 "configure"
16780#include "confdefs.h"
16781
16782#include <X11/Xft/Xft.h>
16783
16784int
16785main ()
16786{
16787
16788	XftPattern *pat;
16789	XftPatternBuild(pat,
16790					XFT_FAMILY, XftTypeString, "mono",
16791					(void *) 0);
16792
16793  ;
16794  return 0;
16795}
16796_ACEOF
16797rm -f conftest.$ac_objext conftest$ac_exeext
16798if { (eval echo "$as_me:16798: \"$ac_link\"") >&5
16799  (eval $ac_link) 2>&5
16800  ac_status=$?
16801  echo "$as_me:16801: \$? = $ac_status" >&5
16802  (exit $ac_status); } &&
16803         { ac_try='test -s conftest$ac_exeext'
16804  { (eval echo "$as_me:16804: \"$ac_try\"") >&5
16805  (eval $ac_try) 2>&5
16806  ac_status=$?
16807  echo "$as_me:16807: \$? = $ac_status" >&5
16808  (exit $ac_status); }; }; then
16809  cf_cv_xft_compat=yes
16810else
16811  echo "$as_me: failed program was:" >&5
16812cat conftest.$ac_ext >&5
16813cf_cv_xft_compat=no
16814fi
16815rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16816
16817fi
16818echo "$as_me:16818: result: $cf_cv_xft_compat" >&5
16819echo "${ECHO_T}$cf_cv_xft_compat" >&6
16820
16821if test "$cf_cv_xft_compat" = no
16822then
16823	# workaround for broken ".pc" files used for Xft.
16824	case "$cf_cv_x_freetype_libs" in
16825	(*-lfontconfig*)
16826		;;
16827	(*)
16828		test -n "$verbose" && echo "	work around broken package" 1>&6
16829
16830echo "${as_me:-configure}:16830: testing work around broken package ..." 1>&5
16831
16832		cf_save_fontconfig="$LIBS"
16833
16834if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists fontconfig; then
16835	test -n "$verbose" && echo "	found package fontconfig" 1>&6
16836
16837echo "${as_me:-configure}:16837: testing found package fontconfig ..." 1>&5
16838
16839	cf_pkgconfig_incs="`$PKG_CONFIG --cflags fontconfig 2>/dev/null`"
16840	cf_pkgconfig_libs="`$PKG_CONFIG --libs   fontconfig 2>/dev/null`"
16841	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
16842
16843echo "${as_me:-configure}:16843: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
16844
16845	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
16846
16847echo "${as_me:-configure}:16847: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
16848
16849cf_fix_cppflags=no
16850cf_new_cflags=
16851cf_new_cppflags=
16852cf_new_extra_cppflags=
16853
16854for cf_add_cflags in $cf_pkgconfig_incs
16855do
16856case $cf_fix_cppflags in
16857(no)
16858	case $cf_add_cflags in
16859	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16860		case $cf_add_cflags in
16861		(-D*)
16862			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16863
16864			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16865				&& test -z "${cf_tst_cflags}" \
16866				&& cf_fix_cppflags=yes
16867
16868			if test $cf_fix_cppflags = yes ; then
16869				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16870				continue
16871			elif test "${cf_tst_cflags}" = "\"'" ; then
16872				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16873				continue
16874			fi
16875			;;
16876		esac
16877		case "$CPPFLAGS" in
16878		(*$cf_add_cflags)
16879			;;
16880		(*)
16881			case $cf_add_cflags in
16882			(-D*)
16883				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16884
16885CPPFLAGS=`echo "$CPPFLAGS" | \
16886	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16887		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16888
16889				;;
16890			esac
16891			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16892			;;
16893		esac
16894		;;
16895	(*)
16896		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16897		;;
16898	esac
16899	;;
16900(yes)
16901	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16902
16903	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16904
16905	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16906		&& test -z "${cf_tst_cflags}" \
16907		&& cf_fix_cppflags=no
16908	;;
16909esac
16910done
16911
16912if test -n "$cf_new_cflags" ; then
16913
16914	CFLAGS="$CFLAGS $cf_new_cflags"
16915fi
16916
16917if test -n "$cf_new_cppflags" ; then
16918
16919	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
16920fi
16921
16922if test -n "$cf_new_extra_cppflags" ; then
16923
16924	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
16925fi
16926
16927cf_add_libs="$cf_pkgconfig_libs"
16928# Filter out duplicates - this happens with badly-designed ".pc" files...
16929for cf_add_1lib in $LIBS
16930do
16931	for cf_add_2lib in $cf_add_libs
16932	do
16933		if test "x$cf_add_1lib" = "x$cf_add_2lib"
16934		then
16935			cf_add_1lib=
16936			break
16937		fi
16938	done
16939	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
16940done
16941LIBS="$cf_add_libs"
16942
16943cf_fix_cppflags=no
16944cf_new_cflags=
16945cf_new_cppflags=
16946cf_new_extra_cppflags=
16947
16948for cf_add_cflags in $cf_pkgconfig_incs
16949do
16950case $cf_fix_cppflags in
16951(no)
16952	case $cf_add_cflags in
16953	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16954		case $cf_add_cflags in
16955		(-D*)
16956			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16957
16958			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16959				&& test -z "${cf_tst_cflags}" \
16960				&& cf_fix_cppflags=yes
16961
16962			if test $cf_fix_cppflags = yes ; then
16963				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16964				continue
16965			elif test "${cf_tst_cflags}" = "\"'" ; then
16966				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16967				continue
16968			fi
16969			;;
16970		esac
16971		case "$CPPFLAGS" in
16972		(*$cf_add_cflags)
16973			;;
16974		(*)
16975			case $cf_add_cflags in
16976			(-D*)
16977				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16978
16979CPPFLAGS=`echo "$CPPFLAGS" | \
16980	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16981		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16982
16983				;;
16984			esac
16985			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
16986			;;
16987		esac
16988		;;
16989	(*)
16990		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
16991		;;
16992	esac
16993	;;
16994(yes)
16995	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
16996
16997	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
16998
16999	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17000		&& test -z "${cf_tst_cflags}" \
17001		&& cf_fix_cppflags=no
17002	;;
17003esac
17004done
17005
17006if test -n "$cf_new_cflags" ; then
17007
17008	CFLAGS="$CFLAGS $cf_new_cflags"
17009fi
17010
17011if test -n "$cf_new_cppflags" ; then
17012
17013	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17014fi
17015
17016if test -n "$cf_new_extra_cppflags" ; then
17017
17018	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17019fi
17020
17021				LIBS="$cf_save_fontconfig"
17022
17023test -n "$verbose" && echo "	...before $LIBS" 1>&6
17024
17025echo "${as_me:-configure}:17025: testing ...before $LIBS ..." 1>&5
17026
17027LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
17028test -n "$verbose" && echo "	...after  $LIBS" 1>&6
17029
17030echo "${as_me:-configure}:17030: testing ...after  $LIBS ..." 1>&5
17031
17032else
17033	cf_pkgconfig_incs=
17034	cf_pkgconfig_libs=
17035
17036test -n "$verbose" && echo "	...before $LIBS" 1>&6
17037
17038echo "${as_me:-configure}:17038: testing ...before $LIBS ..." 1>&5
17039
17040LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
17041test -n "$verbose" && echo "	...after  $LIBS" 1>&6
17042
17043echo "${as_me:-configure}:17043: testing ...after  $LIBS ..." 1>&5
17044
17045fi
17046
17047		;;
17048	esac
17049fi
17050fi
17051
17052else
17053	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
17054fi
17055
17056echo "$as_me:17056: checking if you want support for HP-style function keys" >&5
17057echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
17058
17059# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
17060if test "${enable_hp_fkeys+set}" = set; then
17061  enableval="$enable_hp_fkeys"
17062  test "$enableval" != yes && enableval=no
17063  if test "$enableval" != "no" ; then
17064    enable_hp_fkeys=yes
17065  else
17066    enable_hp_fkeys=no
17067  fi
17068else
17069  enableval=no
17070  enable_hp_fkeys=no
17071
17072fi;
17073echo "$as_me:17073: result: $enable_hp_fkeys" >&5
17074echo "${ECHO_T}$enable_hp_fkeys" >&6
17075if test "$enable_hp_fkeys" = yes ; then
17076
17077cat >>confdefs.h <<\EOF
17078#define OPT_HP_FUNC_KEYS 1
17079EOF
17080
17081fi
17082
17083echo "$as_me:17083: checking if you want support for SCO-style function keys" >&5
17084echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
17085
17086# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
17087if test "${enable_sco_fkeys+set}" = set; then
17088  enableval="$enable_sco_fkeys"
17089  test "$enableval" != yes && enableval=no
17090  if test "$enableval" != "no" ; then
17091    enable_sco_fkeys=yes
17092  else
17093    enable_sco_fkeys=no
17094  fi
17095else
17096  enableval=no
17097  enable_sco_fkeys=no
17098
17099fi;
17100echo "$as_me:17100: result: $enable_sco_fkeys" >&5
17101echo "${ECHO_T}$enable_sco_fkeys" >&6
17102if test "$enable_sco_fkeys" = yes ; then
17103
17104cat >>confdefs.h <<\EOF
17105#define OPT_SCO_FUNC_KEYS 1
17106EOF
17107
17108fi
17109
17110echo "$as_me:17110: checking if you want support for Sun-style function keys" >&5
17111echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
17112
17113# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
17114if test "${enable_sun_fkeys+set}" = set; then
17115  enableval="$enable_sun_fkeys"
17116  test "$enableval" != no && enableval=yes
17117  if test "$enableval" != "yes" ; then
17118    enable_sun_fkeys=no
17119  else
17120    enable_sun_fkeys=yes
17121  fi
17122else
17123  enableval=yes
17124  enable_sun_fkeys=yes
17125
17126fi;
17127echo "$as_me:17127: result: $enable_sun_fkeys" >&5
17128echo "${ECHO_T}$enable_sun_fkeys" >&6
17129if test "$enable_sun_fkeys" = no ; then
17130
17131cat >>confdefs.h <<\EOF
17132#define OPT_SUN_FUNC_KEYS 0
17133EOF
17134
17135fi
17136
17137echo "$as_me:17137: checking if you want saved-lines stored as a FIFO" >&5
17138echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
17139
17140# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
17141if test "${enable_fifo_lines+set}" = set; then
17142  enableval="$enable_fifo_lines"
17143  test "$enableval" != no && enableval=yes
17144  if test "$enableval" != "yes" ; then
17145    enable_fifo_lines=no
17146  else
17147    enable_fifo_lines=yes
17148  fi
17149else
17150  enableval=yes
17151  enable_fifo_lines=yes
17152
17153fi;
17154echo "$as_me:17154: result: $enable_fifo_lines" >&5
17155echo "${ECHO_T}$enable_fifo_lines" >&6
17156if test "$enable_fifo_lines" = yes ; then
17157
17158cat >>confdefs.h <<\EOF
17159#define OPT_FIFO_LINES 1
17160EOF
17161
17162fi
17163
17164echo "$as_me:17164: checking if you want support for internationalization" >&5
17165echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
17166
17167# Check whether --enable-i18n or --disable-i18n was given.
17168if test "${enable_i18n+set}" = set; then
17169  enableval="$enable_i18n"
17170  test "$enableval" != no && enableval=yes
17171  if test "$enableval" != "yes" ; then
17172    enable_i18n=no
17173  else
17174    enable_i18n=yes
17175  fi
17176else
17177  enableval=yes
17178  enable_i18n=yes
17179
17180fi;
17181echo "$as_me:17181: result: $enable_i18n" >&5
17182echo "${ECHO_T}$enable_i18n" >&6
17183if test "$enable_i18n" = no ; then
17184
17185cat >>confdefs.h <<\EOF
17186#define OPT_I18N_SUPPORT 0
17187EOF
17188
17189fi
17190
17191echo "$as_me:17191: checking if you want support for initial-erase setup" >&5
17192echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
17193
17194# Check whether --enable-initial-erase or --disable-initial-erase was given.
17195if test "${enable_initial_erase+set}" = set; then
17196  enableval="$enable_initial_erase"
17197  test "$enableval" != no && enableval=yes
17198  if test "$enableval" != "yes" ; then
17199    enable_ie=no
17200  else
17201    enable_ie=yes
17202  fi
17203else
17204  enableval=yes
17205  enable_ie=yes
17206
17207fi;
17208echo "$as_me:17208: result: $enable_ie" >&5
17209echo "${ECHO_T}$enable_ie" >&6
17210if test "$enable_ie" = no ; then
17211
17212cat >>confdefs.h <<\EOF
17213#define OPT_INITIAL_ERASE 0
17214EOF
17215
17216fi
17217
17218echo "$as_me:17218: checking if you want support for input-method" >&5
17219echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
17220
17221# Check whether --enable-input-method or --disable-input-method was given.
17222if test "${enable_input_method+set}" = set; then
17223  enableval="$enable_input_method"
17224  test "$enableval" != no && enableval=yes
17225  if test "$enableval" != "yes" ; then
17226    enable_ximp=no
17227  else
17228    enable_ximp=yes
17229  fi
17230else
17231  enableval=yes
17232  enable_ximp=yes
17233
17234fi;
17235echo "$as_me:17235: result: $enable_ximp" >&5
17236echo "${ECHO_T}$enable_ximp" >&6
17237
17238echo "$as_me:17238: checking if X libraries support input-method" >&5
17239echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
17240if test "${cf_cv_input_method+set}" = set; then
17241  echo $ECHO_N "(cached) $ECHO_C" >&6
17242else
17243
17244cat >conftest.$ac_ext <<_ACEOF
17245#line 17245 "configure"
17246#include "confdefs.h"
17247
17248#include <X11/IntrinsicP.h>
17249#include <X11/Xatom.h>
17250#include <X11/Xutil.h>
17251#include <X11/Xmu/Atoms.h>
17252#include <X11/Xmu/Converters.h>
17253#include <X11/Xaw/XawImP.h>
17254
17255int
17256main ()
17257{
17258
17259{
17260	XIM xim;
17261	XIMStyles *xim_styles = 0;
17262	XIMStyle input_style;
17263	Widget w = 0;
17264
17265	XSetLocaleModifiers("@im=none");
17266	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
17267	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
17268	XCloseIM(xim);
17269	input_style = (XIMPreeditNothing | XIMStatusNothing);
17270}
17271
17272  ;
17273  return 0;
17274}
17275_ACEOF
17276rm -f conftest.$ac_objext conftest$ac_exeext
17277if { (eval echo "$as_me:17277: \"$ac_link\"") >&5
17278  (eval $ac_link) 2>&5
17279  ac_status=$?
17280  echo "$as_me:17280: \$? = $ac_status" >&5
17281  (exit $ac_status); } &&
17282         { ac_try='test -s conftest$ac_exeext'
17283  { (eval echo "$as_me:17283: \"$ac_try\"") >&5
17284  (eval $ac_try) 2>&5
17285  ac_status=$?
17286  echo "$as_me:17286: \$? = $ac_status" >&5
17287  (exit $ac_status); }; }; then
17288  cf_cv_input_method=yes
17289else
17290  echo "$as_me: failed program was:" >&5
17291cat conftest.$ac_ext >&5
17292cf_cv_input_method=no
17293fi
17294rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17295fi
17296echo "$as_me:17296: result: $cf_cv_input_method" >&5
17297echo "${ECHO_T}$cf_cv_input_method" >&6
17298
17299test "$cf_cv_input_method" = no && enable_ximp=no
17300if test "$enable_ximp" = no ; then
17301
17302cat >>confdefs.h <<\EOF
17303#define OPT_INPUT_METHOD 0
17304EOF
17305
17306fi
17307
17308echo "$as_me:17308: checking if you want support for load-vt-fonts" >&5
17309echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
17310
17311# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
17312if test "${enable_load_vt_fonts+set}" = set; then
17313  enableval="$enable_load_vt_fonts"
17314  test "$enableval" != yes && enableval=no
17315  if test "$enableval" != "no" ; then
17316    enable_load_vt_fonts=yes
17317  else
17318    enable_load_vt_fonts=no
17319  fi
17320else
17321  enableval=no
17322  enable_load_vt_fonts=no
17323
17324fi;
17325echo "$as_me:17325: result: $enable_load_vt_fonts" >&5
17326echo "${ECHO_T}$enable_load_vt_fonts" >&6
17327if test "$enable_load_vt_fonts" = yes ; then
17328
17329cat >>confdefs.h <<\EOF
17330#define OPT_LOAD_VTFONTS 1
17331EOF
17332
17333fi
17334
17335echo "$as_me:17335: checking if you want support for logging" >&5
17336echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
17337
17338# Check whether --enable-logging or --disable-logging was given.
17339if test "${enable_logging+set}" = set; then
17340  enableval="$enable_logging"
17341  test "$enableval" != yes && enableval=no
17342  if test "$enableval" != "no" ; then
17343    enable_logging=yes
17344  else
17345    enable_logging=no
17346  fi
17347else
17348  enableval=no
17349  enable_logging=no
17350
17351fi;
17352echo "$as_me:17352: result: $enable_logging" >&5
17353echo "${ECHO_T}$enable_logging" >&6
17354if test "$enable_logging" = yes ; then
17355
17356cat >>confdefs.h <<\EOF
17357#define ALLOWLOGGING 1
17358EOF
17359
17360	echo "$as_me:17360: checking if you want to allow logging via a pipe" >&5
17361echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
17362
17363# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
17364if test "${enable_logfile_exec+set}" = set; then
17365  enableval="$enable_logfile_exec"
17366  test "$enableval" != yes && enableval=no
17367  if test "$enableval" != "no" ; then
17368    enable_log_exec=yes
17369  else
17370    enable_log_exec=no
17371  fi
17372else
17373  enableval=no
17374  enable_log_exec=no
17375
17376fi;
17377	echo "$as_me:17377: result: $enable_log_exec" >&5
17378echo "${ECHO_T}$enable_log_exec" >&6
17379	if test "$enable_log_exec" = yes ; then
17380
17381cat >>confdefs.h <<\EOF
17382#define ALLOWLOGFILEEXEC 1
17383EOF
17384
17385	fi
17386fi
17387
17388echo "$as_me:17388: checking if you want support for iconify/maximize translations" >&5
17389echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
17390
17391# Check whether --enable-maximize or --disable-maximize was given.
17392if test "${enable_maximize+set}" = set; then
17393  enableval="$enable_maximize"
17394  test "$enableval" != no && enableval=yes
17395  if test "$enableval" != "yes" ; then
17396    enable_maximize=no
17397  else
17398    enable_maximize=yes
17399  fi
17400else
17401  enableval=yes
17402  enable_maximize=yes
17403
17404fi;
17405echo "$as_me:17405: result: $enable_maximize" >&5
17406echo "${ECHO_T}$enable_maximize" >&6
17407test "$enable_maximize" = no &&
17408cat >>confdefs.h <<\EOF
17409#define OPT_MAXIMIZE 0
17410EOF
17411
17412echo "$as_me:17412: checking if you want NumLock to override keyboard tables" >&5
17413echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
17414
17415# Check whether --enable-num-lock or --disable-num-lock was given.
17416if test "${enable_num_lock+set}" = set; then
17417  enableval="$enable_num_lock"
17418  test "$enableval" != no && enableval=yes
17419  if test "$enableval" != "yes" ; then
17420    enable_numlock=no
17421  else
17422    enable_numlock=yes
17423  fi
17424else
17425  enableval=yes
17426  enable_numlock=yes
17427
17428fi;
17429echo "$as_me:17429: result: $enable_numlock" >&5
17430echo "${ECHO_T}$enable_numlock" >&6
17431test "$enable_numlock" = no &&
17432cat >>confdefs.h <<\EOF
17433#define OPT_NUM_LOCK 0
17434EOF
17435
17436echo "$as_me:17436: checking if you want support for get/set of base64 selection data" >&5
17437echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
17438
17439# Check whether --enable-paste64 or --disable-paste64 was given.
17440if test "${enable_paste64+set}" = set; then
17441  enableval="$enable_paste64"
17442  test "$enableval" != no && enableval=yes
17443  if test "$enableval" != "yes" ; then
17444    enable_paste64=no
17445  else
17446    enable_paste64=yes
17447  fi
17448else
17449  enableval=yes
17450  enable_paste64=yes
17451
17452fi;
17453echo "$as_me:17453: result: $enable_paste64" >&5
17454echo "${ECHO_T}$enable_paste64" >&6
17455if test "$enable_paste64" = yes ; then
17456
17457cat >>confdefs.h <<\EOF
17458#define OPT_PASTE64 1
17459EOF
17460
17461else
17462
17463cat >>confdefs.h <<\EOF
17464#define OPT_PASTE64 0
17465EOF
17466
17467fi
17468
17469echo "$as_me:17469: checking if you want support for pty-handshaking" >&5
17470echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
17471
17472# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
17473if test "${enable_pty_handshake+set}" = set; then
17474  enableval="$enable_pty_handshake"
17475  test "$enableval" != no && enableval=yes
17476  if test "$enableval" != "yes" ; then
17477    enable_pty_handshake=no
17478  else
17479    enable_pty_handshake=yes
17480  fi
17481else
17482  enableval=yes
17483  enable_pty_handshake=yes
17484
17485fi;
17486echo "$as_me:17486: result: $enable_pty_handshake" >&5
17487echo "${ECHO_T}$enable_pty_handshake" >&6
17488if test "$enable_pty_handshake" = yes ; then
17489
17490cat >>confdefs.h <<\EOF
17491#define OPT_PTY_HANDSHAKE 1
17492EOF
17493
17494else
17495
17496cat >>confdefs.h <<\EOF
17497#define OPT_PTY_HANDSHAKE 0
17498EOF
17499
17500fi
17501
17502echo "$as_me:17502: checking if you want support for mouse in readline applications" >&5
17503echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
17504
17505# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
17506if test "${enable_readline_mouse+set}" = set; then
17507  enableval="$enable_readline_mouse"
17508  test "$enableval" != yes && enableval=no
17509  if test "$enableval" != "no" ; then
17510    enable_readline_mouse=yes
17511  else
17512    enable_readline_mouse=no
17513  fi
17514else
17515  enableval=no
17516  enable_readline_mouse=no
17517
17518fi;
17519echo "$as_me:17519: result: $enable_readline_mouse" >&5
17520echo "${ECHO_T}$enable_readline_mouse" >&6
17521if test "$enable_readline_mouse" = yes ; then
17522
17523cat >>confdefs.h <<\EOF
17524#define OPT_READLINE 1
17525EOF
17526
17527fi
17528
17529echo "$as_me:17529: checking if you want support for regular-expression selections" >&5
17530echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
17531
17532# Check whether --enable-regex or --disable-regex was given.
17533if test "${enable_regex+set}" = set; then
17534  enableval="$enable_regex"
17535  test "$enableval" != no && enableval=yes
17536  if test "$enableval" != "yes" ; then
17537    enable_regex=no
17538  else
17539    enable_regex=yes
17540  fi
17541else
17542  enableval=yes
17543  enable_regex=yes
17544
17545fi;
17546echo "$as_me:17546: result: $enable_regex" >&5
17547echo "${ECHO_T}$enable_regex" >&6
17548if test "$enable_regex" = yes ; then
17549
17550echo "$as_me:17550: checking if you want to use PCRE for regular-expressions" >&5
17551echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
17552
17553# Check whether --with-pcre or --without-pcre was given.
17554if test "${with_pcre+set}" = set; then
17555  withval="$with_pcre"
17556
17557fi;
17558test -z "$with_pcre" && with_pcre=no
17559echo "$as_me:17559: result: $with_pcre" >&5
17560echo "${ECHO_T}$with_pcre" >&6
17561
17562if test "$with_pcre" != no ; then
17563
17564if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
17565	test -n "$verbose" && echo "	found package libpcre" 1>&6
17566
17567echo "${as_me:-configure}:17567: testing found package libpcre ..." 1>&5
17568
17569	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
17570	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
17571	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
17572
17573echo "${as_me:-configure}:17573: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17574
17575	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
17576
17577echo "${as_me:-configure}:17577: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
17578
17579cf_fix_cppflags=no
17580cf_new_cflags=
17581cf_new_cppflags=
17582cf_new_extra_cppflags=
17583
17584for cf_add_cflags in $cf_pkgconfig_incs
17585do
17586case $cf_fix_cppflags in
17587(no)
17588	case $cf_add_cflags in
17589	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17590		case $cf_add_cflags in
17591		(-D*)
17592			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17593
17594			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17595				&& test -z "${cf_tst_cflags}" \
17596				&& cf_fix_cppflags=yes
17597
17598			if test $cf_fix_cppflags = yes ; then
17599				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17600				continue
17601			elif test "${cf_tst_cflags}" = "\"'" ; then
17602				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17603				continue
17604			fi
17605			;;
17606		esac
17607		case "$CPPFLAGS" in
17608		(*$cf_add_cflags)
17609			;;
17610		(*)
17611			case $cf_add_cflags in
17612			(-D*)
17613				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17614
17615CPPFLAGS=`echo "$CPPFLAGS" | \
17616	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17617		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17618
17619				;;
17620			esac
17621			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
17622			;;
17623		esac
17624		;;
17625	(*)
17626		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
17627		;;
17628	esac
17629	;;
17630(yes)
17631	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
17632
17633	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17634
17635	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17636		&& test -z "${cf_tst_cflags}" \
17637		&& cf_fix_cppflags=no
17638	;;
17639esac
17640done
17641
17642if test -n "$cf_new_cflags" ; then
17643
17644	CFLAGS="$CFLAGS $cf_new_cflags"
17645fi
17646
17647if test -n "$cf_new_cppflags" ; then
17648
17649	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
17650fi
17651
17652if test -n "$cf_new_extra_cppflags" ; then
17653
17654	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
17655fi
17656
17657cf_add_libs="$cf_pkgconfig_libs"
17658# Filter out duplicates - this happens with badly-designed ".pc" files...
17659for cf_add_1lib in $LIBS
17660do
17661	for cf_add_2lib in $cf_add_libs
17662	do
17663		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17664		then
17665			cf_add_1lib=
17666			break
17667		fi
17668	done
17669	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17670done
17671LIBS="$cf_add_libs"
17672
17673	:
17674else
17675	cf_pkgconfig_incs=
17676	cf_pkgconfig_libs=
17677
17678echo "$as_me:17678: checking for pcre_compile in -lpcre" >&5
17679echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
17680if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
17681  echo $ECHO_N "(cached) $ECHO_C" >&6
17682else
17683  ac_check_lib_save_LIBS=$LIBS
17684LIBS="-lpcre  $LIBS"
17685cat >conftest.$ac_ext <<_ACEOF
17686#line 17686 "configure"
17687#include "confdefs.h"
17688
17689/* Override any gcc2 internal prototype to avoid an error.  */
17690#ifdef __cplusplus
17691extern "C"
17692#endif
17693/* We use char because int might match the return type of a gcc2
17694   builtin and then its argument prototype would still apply.  */
17695char pcre_compile ();
17696int
17697main ()
17698{
17699pcre_compile ();
17700  ;
17701  return 0;
17702}
17703_ACEOF
17704rm -f conftest.$ac_objext conftest$ac_exeext
17705if { (eval echo "$as_me:17705: \"$ac_link\"") >&5
17706  (eval $ac_link) 2>&5
17707  ac_status=$?
17708  echo "$as_me:17708: \$? = $ac_status" >&5
17709  (exit $ac_status); } &&
17710         { ac_try='test -s conftest$ac_exeext'
17711  { (eval echo "$as_me:17711: \"$ac_try\"") >&5
17712  (eval $ac_try) 2>&5
17713  ac_status=$?
17714  echo "$as_me:17714: \$? = $ac_status" >&5
17715  (exit $ac_status); }; }; then
17716  ac_cv_lib_pcre_pcre_compile=yes
17717else
17718  echo "$as_me: failed program was:" >&5
17719cat conftest.$ac_ext >&5
17720ac_cv_lib_pcre_pcre_compile=no
17721fi
17722rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17723LIBS=$ac_check_lib_save_LIBS
17724fi
17725echo "$as_me:17725: result: $ac_cv_lib_pcre_pcre_compile" >&5
17726echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
17727if test $ac_cv_lib_pcre_pcre_compile = yes; then
17728  cat >>confdefs.h <<EOF
17729#define HAVE_LIBPCRE 1
17730EOF
17731
17732  LIBS="-lpcre $LIBS"
17733
17734else
17735  { { echo "$as_me:17735: error: Cannot find PCRE library" >&5
17736echo "$as_me: error: Cannot find PCRE library" >&2;}
17737   { (exit 1); exit 1; }; }
17738fi
17739
17740fi
17741
17742cat >>confdefs.h <<\EOF
17743#define HAVE_LIB_PCRE 1
17744EOF
17745
17746		case $LIBS in
17747		(*pcreposix*)
17748			;;
17749		(*)
17750			echo "$as_me:17750: checking for pcreposix_regcomp in -lpcreposix" >&5
17751echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
17752if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
17753  echo $ECHO_N "(cached) $ECHO_C" >&6
17754else
17755  ac_check_lib_save_LIBS=$LIBS
17756LIBS="-lpcreposix  $LIBS"
17757cat >conftest.$ac_ext <<_ACEOF
17758#line 17758 "configure"
17759#include "confdefs.h"
17760
17761/* Override any gcc2 internal prototype to avoid an error.  */
17762#ifdef __cplusplus
17763extern "C"
17764#endif
17765/* We use char because int might match the return type of a gcc2
17766   builtin and then its argument prototype would still apply.  */
17767char pcreposix_regcomp ();
17768int
17769main ()
17770{
17771pcreposix_regcomp ();
17772  ;
17773  return 0;
17774}
17775_ACEOF
17776rm -f conftest.$ac_objext conftest$ac_exeext
17777if { (eval echo "$as_me:17777: \"$ac_link\"") >&5
17778  (eval $ac_link) 2>&5
17779  ac_status=$?
17780  echo "$as_me:17780: \$? = $ac_status" >&5
17781  (exit $ac_status); } &&
17782         { ac_try='test -s conftest$ac_exeext'
17783  { (eval echo "$as_me:17783: \"$ac_try\"") >&5
17784  (eval $ac_try) 2>&5
17785  ac_status=$?
17786  echo "$as_me:17786: \$? = $ac_status" >&5
17787  (exit $ac_status); }; }; then
17788  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
17789else
17790  echo "$as_me: failed program was:" >&5
17791cat conftest.$ac_ext >&5
17792ac_cv_lib_pcreposix_pcreposix_regcomp=no
17793fi
17794rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17795LIBS=$ac_check_lib_save_LIBS
17796fi
17797echo "$as_me:17797: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
17798echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
17799if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
17800
17801cat >>confdefs.h <<\EOF
17802#define HAVE_PCREPOSIX_H 1
17803EOF
17804
17805cf_add_libs="-lpcreposix"
17806# Filter out duplicates - this happens with badly-designed ".pc" files...
17807for cf_add_1lib in $LIBS
17808do
17809	for cf_add_2lib in $cf_add_libs
17810	do
17811		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17812		then
17813			cf_add_1lib=
17814			break
17815		fi
17816	done
17817	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17818done
17819LIBS="$cf_add_libs"
17820
17821else
17822  echo "$as_me:17822: checking for regcomp in -lpcreposix" >&5
17823echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
17824if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
17825  echo $ECHO_N "(cached) $ECHO_C" >&6
17826else
17827  ac_check_lib_save_LIBS=$LIBS
17828LIBS="-lpcreposix  $LIBS"
17829cat >conftest.$ac_ext <<_ACEOF
17830#line 17830 "configure"
17831#include "confdefs.h"
17832
17833/* Override any gcc2 internal prototype to avoid an error.  */
17834#ifdef __cplusplus
17835extern "C"
17836#endif
17837/* We use char because int might match the return type of a gcc2
17838   builtin and then its argument prototype would still apply.  */
17839char regcomp ();
17840int
17841main ()
17842{
17843regcomp ();
17844  ;
17845  return 0;
17846}
17847_ACEOF
17848rm -f conftest.$ac_objext conftest$ac_exeext
17849if { (eval echo "$as_me:17849: \"$ac_link\"") >&5
17850  (eval $ac_link) 2>&5
17851  ac_status=$?
17852  echo "$as_me:17852: \$? = $ac_status" >&5
17853  (exit $ac_status); } &&
17854         { ac_try='test -s conftest$ac_exeext'
17855  { (eval echo "$as_me:17855: \"$ac_try\"") >&5
17856  (eval $ac_try) 2>&5
17857  ac_status=$?
17858  echo "$as_me:17858: \$? = $ac_status" >&5
17859  (exit $ac_status); }; }; then
17860  ac_cv_lib_pcreposix_regcomp=yes
17861else
17862  echo "$as_me: failed program was:" >&5
17863cat conftest.$ac_ext >&5
17864ac_cv_lib_pcreposix_regcomp=no
17865fi
17866rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17867LIBS=$ac_check_lib_save_LIBS
17868fi
17869echo "$as_me:17869: result: $ac_cv_lib_pcreposix_regcomp" >&5
17870echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
17871if test $ac_cv_lib_pcreposix_regcomp = yes; then
17872
17873cat >>confdefs.h <<\EOF
17874#define HAVE_PCREPOSIX_H 1
17875EOF
17876
17877cf_add_libs="-lpcreposix"
17878# Filter out duplicates - this happens with badly-designed ".pc" files...
17879for cf_add_1lib in $LIBS
17880do
17881	for cf_add_2lib in $cf_add_libs
17882	do
17883		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17884		then
17885			cf_add_1lib=
17886			break
17887		fi
17888	done
17889	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17890done
17891LIBS="$cf_add_libs"
17892
17893else
17894  { { echo "$as_me:17894: error: Cannot find PCRE POSIX library" >&5
17895echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
17896   { (exit 1); exit 1; }; }
17897fi
17898
17899fi
17900
17901			;;
17902		esac
17903fi
17904
17905	if test "$with_pcre" = no ; then
17906
17907cf_regex_func=no
17908
17909cf_regex_libs="regex re"
17910case $host_os in
17911(mingw*)
17912	cf_regex_libs="gnurx $cf_regex_libs"
17913	;;
17914esac
17915
17916echo "$as_me:17916: checking for regcomp" >&5
17917echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
17918if test "${ac_cv_func_regcomp+set}" = set; then
17919  echo $ECHO_N "(cached) $ECHO_C" >&6
17920else
17921  cat >conftest.$ac_ext <<_ACEOF
17922#line 17922 "configure"
17923#include "confdefs.h"
17924/* System header to define __stub macros and hopefully few prototypes,
17925    which can conflict with char regcomp (); below.  */
17926#include <assert.h>
17927/* Override any gcc2 internal prototype to avoid an error.  */
17928#ifdef __cplusplus
17929extern "C"
17930#endif
17931/* We use char because int might match the return type of a gcc2
17932   builtin and then its argument prototype would still apply.  */
17933char regcomp ();
17934char (*f) ();
17935
17936int
17937main ()
17938{
17939/* The GNU C library defines this for functions which it implements
17940    to always fail with ENOSYS.  Some functions are actually named
17941    something starting with __ and the normal name is an alias.  */
17942#if defined (__stub_regcomp) || defined (__stub___regcomp)
17943choke me
17944#else
17945f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17946#endif
17947
17948  ;
17949  return 0;
17950}
17951_ACEOF
17952rm -f conftest.$ac_objext conftest$ac_exeext
17953if { (eval echo "$as_me:17953: \"$ac_link\"") >&5
17954  (eval $ac_link) 2>&5
17955  ac_status=$?
17956  echo "$as_me:17956: \$? = $ac_status" >&5
17957  (exit $ac_status); } &&
17958         { ac_try='test -s conftest$ac_exeext'
17959  { (eval echo "$as_me:17959: \"$ac_try\"") >&5
17960  (eval $ac_try) 2>&5
17961  ac_status=$?
17962  echo "$as_me:17962: \$? = $ac_status" >&5
17963  (exit $ac_status); }; }; then
17964  ac_cv_func_regcomp=yes
17965else
17966  echo "$as_me: failed program was:" >&5
17967cat conftest.$ac_ext >&5
17968ac_cv_func_regcomp=no
17969fi
17970rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17971fi
17972echo "$as_me:17972: result: $ac_cv_func_regcomp" >&5
17973echo "${ECHO_T}$ac_cv_func_regcomp" >&6
17974if test $ac_cv_func_regcomp = yes; then
17975  cf_regex_func=regcomp
17976else
17977
17978	for cf_regex_lib in $cf_regex_libs
17979	do
17980		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
17981echo "$as_me:17981: checking for regcomp in -l$cf_regex_lib" >&5
17982echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
17983if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17984  echo $ECHO_N "(cached) $ECHO_C" >&6
17985else
17986  ac_check_lib_save_LIBS=$LIBS
17987LIBS="-l$cf_regex_lib  $LIBS"
17988cat >conftest.$ac_ext <<_ACEOF
17989#line 17989 "configure"
17990#include "confdefs.h"
17991
17992/* Override any gcc2 internal prototype to avoid an error.  */
17993#ifdef __cplusplus
17994extern "C"
17995#endif
17996/* We use char because int might match the return type of a gcc2
17997   builtin and then its argument prototype would still apply.  */
17998char regcomp ();
17999int
18000main ()
18001{
18002regcomp ();
18003  ;
18004  return 0;
18005}
18006_ACEOF
18007rm -f conftest.$ac_objext conftest$ac_exeext
18008if { (eval echo "$as_me:18008: \"$ac_link\"") >&5
18009  (eval $ac_link) 2>&5
18010  ac_status=$?
18011  echo "$as_me:18011: \$? = $ac_status" >&5
18012  (exit $ac_status); } &&
18013         { ac_try='test -s conftest$ac_exeext'
18014  { (eval echo "$as_me:18014: \"$ac_try\"") >&5
18015  (eval $ac_try) 2>&5
18016  ac_status=$?
18017  echo "$as_me:18017: \$? = $ac_status" >&5
18018  (exit $ac_status); }; }; then
18019  eval "$as_ac_Lib=yes"
18020else
18021  echo "$as_me: failed program was:" >&5
18022cat conftest.$ac_ext >&5
18023eval "$as_ac_Lib=no"
18024fi
18025rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18026LIBS=$ac_check_lib_save_LIBS
18027fi
18028echo "$as_me:18028: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18029echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18030if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18031
18032cf_add_libs="-l$cf_regex_lib"
18033# Filter out duplicates - this happens with badly-designed ".pc" files...
18034for cf_add_1lib in $LIBS
18035do
18036	for cf_add_2lib in $cf_add_libs
18037	do
18038		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18039		then
18040			cf_add_1lib=
18041			break
18042		fi
18043	done
18044	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18045done
18046LIBS="$cf_add_libs"
18047
18048				cf_regex_func=regcomp
18049				break
18050fi
18051
18052	done
18053
18054fi
18055
18056if test "$cf_regex_func" = no ; then
18057	echo "$as_me:18057: checking for compile" >&5
18058echo $ECHO_N "checking for compile... $ECHO_C" >&6
18059if test "${ac_cv_func_compile+set}" = set; then
18060  echo $ECHO_N "(cached) $ECHO_C" >&6
18061else
18062  cat >conftest.$ac_ext <<_ACEOF
18063#line 18063 "configure"
18064#include "confdefs.h"
18065/* System header to define __stub macros and hopefully few prototypes,
18066    which can conflict with char compile (); below.  */
18067#include <assert.h>
18068/* Override any gcc2 internal prototype to avoid an error.  */
18069#ifdef __cplusplus
18070extern "C"
18071#endif
18072/* We use char because int might match the return type of a gcc2
18073   builtin and then its argument prototype would still apply.  */
18074char compile ();
18075char (*f) ();
18076
18077int
18078main ()
18079{
18080/* The GNU C library defines this for functions which it implements
18081    to always fail with ENOSYS.  Some functions are actually named
18082    something starting with __ and the normal name is an alias.  */
18083#if defined (__stub_compile) || defined (__stub___compile)
18084choke me
18085#else
18086f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
18087#endif
18088
18089  ;
18090  return 0;
18091}
18092_ACEOF
18093rm -f conftest.$ac_objext conftest$ac_exeext
18094if { (eval echo "$as_me:18094: \"$ac_link\"") >&5
18095  (eval $ac_link) 2>&5
18096  ac_status=$?
18097  echo "$as_me:18097: \$? = $ac_status" >&5
18098  (exit $ac_status); } &&
18099         { ac_try='test -s conftest$ac_exeext'
18100  { (eval echo "$as_me:18100: \"$ac_try\"") >&5
18101  (eval $ac_try) 2>&5
18102  ac_status=$?
18103  echo "$as_me:18103: \$? = $ac_status" >&5
18104  (exit $ac_status); }; }; then
18105  ac_cv_func_compile=yes
18106else
18107  echo "$as_me: failed program was:" >&5
18108cat conftest.$ac_ext >&5
18109ac_cv_func_compile=no
18110fi
18111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18112fi
18113echo "$as_me:18113: result: $ac_cv_func_compile" >&5
18114echo "${ECHO_T}$ac_cv_func_compile" >&6
18115if test $ac_cv_func_compile = yes; then
18116  cf_regex_func=compile
18117else
18118
18119		echo "$as_me:18119: checking for compile in -lgen" >&5
18120echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
18121if test "${ac_cv_lib_gen_compile+set}" = set; then
18122  echo $ECHO_N "(cached) $ECHO_C" >&6
18123else
18124  ac_check_lib_save_LIBS=$LIBS
18125LIBS="-lgen  $LIBS"
18126cat >conftest.$ac_ext <<_ACEOF
18127#line 18127 "configure"
18128#include "confdefs.h"
18129
18130/* Override any gcc2 internal prototype to avoid an error.  */
18131#ifdef __cplusplus
18132extern "C"
18133#endif
18134/* We use char because int might match the return type of a gcc2
18135   builtin and then its argument prototype would still apply.  */
18136char compile ();
18137int
18138main ()
18139{
18140compile ();
18141  ;
18142  return 0;
18143}
18144_ACEOF
18145rm -f conftest.$ac_objext conftest$ac_exeext
18146if { (eval echo "$as_me:18146: \"$ac_link\"") >&5
18147  (eval $ac_link) 2>&5
18148  ac_status=$?
18149  echo "$as_me:18149: \$? = $ac_status" >&5
18150  (exit $ac_status); } &&
18151         { ac_try='test -s conftest$ac_exeext'
18152  { (eval echo "$as_me:18152: \"$ac_try\"") >&5
18153  (eval $ac_try) 2>&5
18154  ac_status=$?
18155  echo "$as_me:18155: \$? = $ac_status" >&5
18156  (exit $ac_status); }; }; then
18157  ac_cv_lib_gen_compile=yes
18158else
18159  echo "$as_me: failed program was:" >&5
18160cat conftest.$ac_ext >&5
18161ac_cv_lib_gen_compile=no
18162fi
18163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18164LIBS=$ac_check_lib_save_LIBS
18165fi
18166echo "$as_me:18166: result: $ac_cv_lib_gen_compile" >&5
18167echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
18168if test $ac_cv_lib_gen_compile = yes; then
18169
18170cf_add_libs="-lgen"
18171# Filter out duplicates - this happens with badly-designed ".pc" files...
18172for cf_add_1lib in $LIBS
18173do
18174	for cf_add_2lib in $cf_add_libs
18175	do
18176		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18177		then
18178			cf_add_1lib=
18179			break
18180		fi
18181	done
18182	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18183done
18184LIBS="$cf_add_libs"
18185
18186				cf_regex_func=compile
18187fi
18188
18189fi
18190
18191fi
18192
18193if test "$cf_regex_func" = no ; then
18194	{ echo "$as_me:18194: WARNING: cannot find regular expression library" >&5
18195echo "$as_me: WARNING: cannot find regular expression library" >&2;}
18196fi
18197
18198echo "$as_me:18198: checking for regular-expression headers" >&5
18199echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
18200if test "${cf_cv_regex_hdrs+set}" = set; then
18201  echo $ECHO_N "(cached) $ECHO_C" >&6
18202else
18203
18204cf_cv_regex_hdrs=no
18205case $cf_regex_func in
18206(compile)
18207	for cf_regex_hdr in regexp.h regexpr.h
18208	do
18209		cat >conftest.$ac_ext <<_ACEOF
18210#line 18210 "configure"
18211#include "confdefs.h"
18212#include <$cf_regex_hdr>
18213int
18214main ()
18215{
18216
18217			char *p = compile("", "", "", 0);
18218			int x = step("", "");
18219
18220  ;
18221  return 0;
18222}
18223_ACEOF
18224rm -f conftest.$ac_objext conftest$ac_exeext
18225if { (eval echo "$as_me:18225: \"$ac_link\"") >&5
18226  (eval $ac_link) 2>&5
18227  ac_status=$?
18228  echo "$as_me:18228: \$? = $ac_status" >&5
18229  (exit $ac_status); } &&
18230         { ac_try='test -s conftest$ac_exeext'
18231  { (eval echo "$as_me:18231: \"$ac_try\"") >&5
18232  (eval $ac_try) 2>&5
18233  ac_status=$?
18234  echo "$as_me:18234: \$? = $ac_status" >&5
18235  (exit $ac_status); }; }; then
18236
18237			cf_cv_regex_hdrs=$cf_regex_hdr
18238			break
18239
18240else
18241  echo "$as_me: failed program was:" >&5
18242cat conftest.$ac_ext >&5
18243fi
18244rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18245	done
18246	;;
18247(*)
18248	for cf_regex_hdr in regex.h
18249	do
18250		cat >conftest.$ac_ext <<_ACEOF
18251#line 18251 "configure"
18252#include "confdefs.h"
18253#include <sys/types.h>
18254#include <$cf_regex_hdr>
18255int
18256main ()
18257{
18258
18259			regex_t *p;
18260			int x = regcomp(p, "", 0);
18261			int y = regexec(p, "", 0, 0, 0);
18262			regfree(p);
18263
18264  ;
18265  return 0;
18266}
18267_ACEOF
18268rm -f conftest.$ac_objext conftest$ac_exeext
18269if { (eval echo "$as_me:18269: \"$ac_link\"") >&5
18270  (eval $ac_link) 2>&5
18271  ac_status=$?
18272  echo "$as_me:18272: \$? = $ac_status" >&5
18273  (exit $ac_status); } &&
18274         { ac_try='test -s conftest$ac_exeext'
18275  { (eval echo "$as_me:18275: \"$ac_try\"") >&5
18276  (eval $ac_try) 2>&5
18277  ac_status=$?
18278  echo "$as_me:18278: \$? = $ac_status" >&5
18279  (exit $ac_status); }; }; then
18280
18281			cf_cv_regex_hdrs=$cf_regex_hdr
18282			break
18283
18284else
18285  echo "$as_me: failed program was:" >&5
18286cat conftest.$ac_ext >&5
18287fi
18288rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18289	done
18290	;;
18291esac
18292
18293fi
18294echo "$as_me:18294: result: $cf_cv_regex_hdrs" >&5
18295echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
18296
18297case $cf_cv_regex_hdrs in
18298    (no)	    { echo "$as_me:18298: WARNING: no regular expression header found" >&5
18299echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
18300    (regex.h)
18301cat >>confdefs.h <<\EOF
18302#define HAVE_REGEX_H_FUNCS 1
18303EOF
18304 ;;
18305    (regexp.h)
18306cat >>confdefs.h <<\EOF
18307#define HAVE_REGEXP_H_FUNCS 1
18308EOF
18309 ;;
18310    (regexpr.h)
18311cat >>confdefs.h <<\EOF
18312#define HAVE_REGEXPR_H_FUNCS 1
18313EOF
18314 ;;
18315esac
18316
18317		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
18318			{ { echo "$as_me:18318: error: Only POSIX or PCRE regular expressions are supported" >&5
18319echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
18320   { (exit 1); exit 1; }; }
18321		fi
18322	fi
18323
18324cat >>confdefs.h <<\EOF
18325#define OPT_SELECT_REGEX 1
18326EOF
18327
18328fi
18329
18330echo "$as_me:18330: checking if you want support for right-scrollbar" >&5
18331echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
18332
18333# Check whether --enable-rightbar or --disable-rightbar was given.
18334if test "${enable_rightbar+set}" = set; then
18335  enableval="$enable_rightbar"
18336  test "$enableval" != no && enableval=yes
18337  if test "$enableval" != "yes" ; then
18338    enable_rightbar=no
18339  else
18340    enable_rightbar=yes
18341  fi
18342else
18343  enableval=yes
18344  enable_rightbar=yes
18345
18346fi;
18347echo "$as_me:18347: result: $enable_rightbar" >&5
18348echo "${ECHO_T}$enable_rightbar" >&6
18349if test "$enable_rightbar" = yes ; then
18350
18351cat >>confdefs.h <<\EOF
18352#define SCROLLBAR_RIGHT 1
18353EOF
18354
18355fi
18356
18357echo "$as_me:18357: checking if you want check for redundant name-change" >&5
18358echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
18359
18360# Check whether --enable-samename or --disable-samename was given.
18361if test "${enable_samename+set}" = set; then
18362  enableval="$enable_samename"
18363  test "$enableval" != no && enableval=yes
18364  if test "$enableval" != "yes" ; then
18365    enable_samename=no
18366  else
18367    enable_samename=yes
18368  fi
18369else
18370  enableval=yes
18371  enable_samename=yes
18372
18373fi;
18374echo "$as_me:18374: result: $enable_samename" >&5
18375echo "${ECHO_T}$enable_samename" >&6
18376test "$enable_samename" = no &&
18377cat >>confdefs.h <<\EOF
18378#define OPT_SAME_NAME 0
18379EOF
18380
18381echo "$as_me:18381: checking if you want support for selection-actions" >&5
18382echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
18383
18384# Check whether --enable-selection-ops or --disable-selection-ops was given.
18385if test "${enable_selection_ops+set}" = set; then
18386  enableval="$enable_selection_ops"
18387  test "$enableval" != no && enableval=yes
18388  if test "$enableval" != "yes" ; then
18389    enable_selection_ops=no
18390  else
18391    enable_selection_ops=yes
18392  fi
18393else
18394  enableval=yes
18395  enable_selection_ops=yes
18396
18397fi;
18398echo "$as_me:18398: result: $enable_selection_ops" >&5
18399echo "${ECHO_T}$enable_selection_ops" >&6
18400test "$enable_selection_ops" = no &&
18401cat >>confdefs.h <<\EOF
18402#define OPT_SELECTION_OPS 0
18403EOF
18404
18405echo "$as_me:18405: checking if you want support for session management" >&5
18406echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
18407
18408# Check whether --enable-session-mgt or --disable-session-mgt was given.
18409if test "${enable_session_mgt+set}" = set; then
18410  enableval="$enable_session_mgt"
18411  test "$enableval" != no && enableval=yes
18412  if test "$enableval" != "yes" ; then
18413    enable_session_mgt=no
18414  else
18415    enable_session_mgt=yes
18416  fi
18417else
18418  enableval=yes
18419  enable_session_mgt=yes
18420
18421fi;
18422echo "$as_me:18422: result: $enable_session_mgt" >&5
18423echo "${ECHO_T}$enable_session_mgt" >&6
18424test "$enable_session_mgt" = no &&
18425cat >>confdefs.h <<\EOF
18426#define OPT_SESSION_MGT 0
18427EOF
18428
18429echo "$as_me:18429: checking if you want to use termcap function-keys" >&5
18430echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
18431
18432# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
18433if test "${enable_tcap_fkeys+set}" = set; then
18434  enableval="$enable_tcap_fkeys"
18435  test "$enableval" != no && enableval=yes
18436  if test "$enableval" != "yes" ; then
18437    enable_tcap_fkeys=no
18438  else
18439    enable_tcap_fkeys=yes
18440  fi
18441else
18442  enableval=yes
18443  enable_tcap_fkeys=yes
18444
18445fi;
18446echo "$as_me:18446: result: $enable_tcap_fkeys" >&5
18447echo "${ECHO_T}$enable_tcap_fkeys" >&6
18448test "$enable_tcap_fkeys" = yes &&
18449cat >>confdefs.h <<\EOF
18450#define OPT_TCAP_FKEYS 1
18451EOF
18452
18453echo "$as_me:18453: checking if you want to use termcap-query/report" >&5
18454echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
18455
18456# Check whether --enable-tcap-query or --disable-tcap-query was given.
18457if test "${enable_tcap_query+set}" = set; then
18458  enableval="$enable_tcap_query"
18459  test "$enableval" != no && enableval=yes
18460  if test "$enableval" != "yes" ; then
18461    enable_tcap_query=no
18462  else
18463    enable_tcap_query=yes
18464  fi
18465else
18466  enableval=yes
18467  enable_tcap_query=yes
18468
18469fi;
18470echo "$as_me:18470: result: $enable_tcap_query" >&5
18471echo "${ECHO_T}$enable_tcap_query" >&6
18472test "$enable_tcap_query" = yes &&
18473cat >>confdefs.h <<\EOF
18474#define OPT_TCAP_QUERY 1
18475EOF
18476
18477echo "$as_me:18477: checking if you want support for tek4014" >&5
18478echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
18479
18480# Check whether --enable-tek4014 or --disable-tek4014 was given.
18481if test "${enable_tek4014+set}" = set; then
18482  enableval="$enable_tek4014"
18483  test "$enableval" != no && enableval=yes
18484  if test "$enableval" != "yes" ; then
18485    enable_tek4014=no
18486  else
18487    enable_tek4014=yes
18488  fi
18489else
18490  enableval=yes
18491  enable_tek4014=yes
18492
18493fi;
18494echo "$as_me:18494: result: $enable_tek4014" >&5
18495echo "${ECHO_T}$enable_tek4014" >&6
18496if test "$enable_tek4014" = no ; then
18497
18498cat >>confdefs.h <<\EOF
18499#define OPT_TEK4014 0
18500EOF
18501
18502else
18503	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
18504	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
18505	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
18506fi
18507
18508echo "$as_me:18508: checking if you want pulldown menus with a toolbar" >&5
18509echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
18510
18511# Check whether --enable-toolbar or --disable-toolbar was given.
18512if test "${enable_toolbar+set}" = set; then
18513  enableval="$enable_toolbar"
18514  test "$enableval" != yes && enableval=no
18515  if test "$enableval" != "no" ; then
18516    enable_toolbar=yes
18517  else
18518    enable_toolbar=no
18519  fi
18520else
18521  enableval=no
18522  enable_toolbar=no
18523
18524fi;
18525echo "$as_me:18525: result: $enable_toolbar" >&5
18526echo "${ECHO_T}$enable_toolbar" >&6
18527if test "$enable_toolbar" = yes ; then
18528
18529cat >>confdefs.h <<\EOF
18530#define OPT_TOOLBAR 1
18531EOF
18532
18533fi
18534
18535echo "$as_me:18535: checking if you want VT52 emulation" >&5
18536echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
18537
18538# Check whether --enable-vt52 or --disable-vt52 was given.
18539if test "${enable_vt52+set}" = set; then
18540  enableval="$enable_vt52"
18541  test "$enableval" != no && enableval=yes
18542  if test "$enableval" != "yes" ; then
18543    enable_vt52=no
18544  else
18545    enable_vt52=yes
18546  fi
18547else
18548  enableval=yes
18549  enable_vt52=yes
18550
18551fi;
18552echo "$as_me:18552: result: $enable_vt52" >&5
18553echo "${ECHO_T}$enable_vt52" >&6
18554test "$enable_vt52" = no &&
18555cat >>confdefs.h <<\EOF
18556#define OPT_VT52_MODE 0
18557EOF
18558
18559echo "$as_me:18559: checking if you want wide-attribute support" >&5
18560echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
18561
18562# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
18563if test "${enable_wide_attrs+set}" = set; then
18564  enableval="$enable_wide_attrs"
18565  test "$enableval" != no && enableval=yes
18566  if test "$enableval" != "yes" ; then
18567    enable_wattr=no
18568  else
18569    enable_wattr=yes
18570  fi
18571else
18572  enableval=yes
18573  enable_wattr=yes
18574
18575fi;
18576echo "$as_me:18576: result: $enable_wattr" >&5
18577echo "${ECHO_T}$enable_wattr" >&6
18578
18579echo "$as_me:18579: checking if you want wide-character support" >&5
18580echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
18581
18582# Check whether --enable-wide-chars or --disable-wide-chars was given.
18583if test "${enable_wide_chars+set}" = set; then
18584  enableval="$enable_wide_chars"
18585  test "$enableval" != no && enableval=yes
18586  if test "$enableval" != "yes" ; then
18587    enable_wchar=no
18588  else
18589    enable_wchar=yes
18590  fi
18591else
18592  enableval=yes
18593  enable_wchar=yes
18594
18595fi;
18596echo "$as_me:18596: result: $enable_wchar" >&5
18597echo "${ECHO_T}$enable_wchar" >&6
18598test "$enable_wattr" = no &&
18599cat >>confdefs.h <<\EOF
18600#define OPT_WIDE_ATTRS 0
18601EOF
18602
18603echo "$as_me:18603: checking if you want only 16-bit character support" >&5
18604echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
18605
18606# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
18607if test "${enable_16bit_chars+set}" = set; then
18608  enableval="$enable_16bit_chars"
18609  test "$enableval" != yes && enableval=no
18610  if test "$enableval" != "no" ; then
18611    enable_16bit_chars=yes
18612  else
18613    enable_16bit_chars=no
18614  fi
18615else
18616  enableval=no
18617  enable_16bit_chars=no
18618
18619fi;
18620echo "$as_me:18620: result: $enable_16bit_chars" >&5
18621echo "${ECHO_T}$enable_16bit_chars" >&6
18622
18623if test "$enable_16bit_chars" = yes ; then
18624
18625cat >>confdefs.h <<\EOF
18626#define OPT_WIDER_ICHAR 0
18627EOF
18628
18629	enable_wchar=yes
18630fi
18631
18632if test "$enable_wchar" = yes ; then
18633
18634echo "$as_me:18634: checking if you want to use mini-luit/Latin9 built-in support" >&5
18635echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
18636
18637# Check whether --enable-mini-luit or --disable-mini-luit was given.
18638if test "${enable_mini_luit+set}" = set; then
18639  enableval="$enable_mini_luit"
18640  test "$enableval" != yes && enableval=no
18641  if test "$enableval" != "no" ; then
18642    enable_mini_luit=yes
18643  else
18644    enable_mini_luit=no
18645  fi
18646else
18647  enableval=no
18648  enable_mini_luit=no
18649
18650fi;
18651echo "$as_me:18651: result: $enable_mini_luit" >&5
18652echo "${ECHO_T}$enable_mini_luit" >&6
18653if test "$enable_mini_luit" = yes ; then
18654
18655cat >>confdefs.h <<\EOF
18656#define OPT_MINI_LUIT 1
18657EOF
18658
18659fi
18660
18661echo "$as_me:18661: checking if you want to use luit" >&5
18662echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
18663
18664# Check whether --enable-luit or --disable-luit was given.
18665if test "${enable_luit+set}" = set; then
18666  enableval="$enable_luit"
18667  test "$enableval" != no && enableval=yes
18668  if test "$enableval" != "yes" ; then
18669    enable_luit=no
18670  else
18671    enable_luit=yes
18672  fi
18673else
18674  enableval=yes
18675  enable_luit=yes
18676
18677fi;
18678echo "$as_me:18678: result: $enable_luit" >&5
18679echo "${ECHO_T}$enable_luit" >&6
18680if test "$enable_luit" = yes ; then
18681
18682cat >>confdefs.h <<\EOF
18683#define OPT_LUIT_PROG 1
18684EOF
18685
18686test -z "$LUIT" && LUIT=xterm-filter
18687for ac_prog in $LUIT xterm-filter bluit luit
18688do
18689  # Extract the first word of "$ac_prog", so it can be a program name with args.
18690set dummy $ac_prog; ac_word=$2
18691echo "$as_me:18691: checking for $ac_word" >&5
18692echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
18693if test "${ac_cv_path_LUIT+set}" = set; then
18694  echo $ECHO_N "(cached) $ECHO_C" >&6
18695else
18696  case $LUIT in
18697  [\\/]* | ?:[\\/]*)
18698  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
18699  ;;
18700  *)
18701  ac_save_IFS=$IFS; IFS=$ac_path_separator
18702ac_dummy="$PATH"
18703for ac_dir in $ac_dummy; do
18704  IFS=$ac_save_IFS
18705  test -z "$ac_dir" && ac_dir=.
18706  if $as_executable_p "$ac_dir/$ac_word"; then
18707   ac_cv_path_LUIT="$ac_dir/$ac_word"
18708   echo "$as_me:18708: found $ac_dir/$ac_word" >&5
18709   break
18710fi
18711done
18712
18713  ;;
18714esac
18715fi
18716LUIT=$ac_cv_path_LUIT
18717
18718if test -n "$LUIT"; then
18719  echo "$as_me:18719: result: $LUIT" >&5
18720echo "${ECHO_T}$LUIT" >&6
18721else
18722  echo "$as_me:18722: result: no" >&5
18723echo "${ECHO_T}no" >&6
18724fi
18725
18726  test -n "$LUIT" && break
18727done
18728test -n "$LUIT" || LUIT="$LUIT"
18729
18730cf_path_prog=""
18731cf_path_args=""
18732IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
18733for cf_temp in $ac_cv_path_LUIT
18734do
18735	if test -z "$cf_path_prog" ; then
18736		if test "$with_full_paths" = yes ; then
18737
18738if test "x$prefix" != xNONE; then
18739  cf_path_syntax="$prefix"
18740else
18741  cf_path_syntax="$ac_default_prefix"
18742fi
18743
18744case ".$cf_temp" in
18745(.\$\(*\)*|.\'*\'*)
18746  ;;
18747(..|./*|.\\*)
18748  ;;
18749(.[a-zA-Z]:[\\/]*) # OS/2 EMX
18750  ;;
18751(.\${*prefix}*|.\${*dir}*)
18752  eval cf_temp="$cf_temp"
18753  case ".$cf_temp" in
18754  (.NONE/*)
18755    cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
18756    ;;
18757  esac
18758  ;;
18759(.no|.NONE/*)
18760  cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
18761  ;;
18762(*)
18763  break
18764  ;;
18765esac
18766
18767			cf_path_prog="$cf_temp"
18768		else
18769			cf_path_prog="`basename $cf_temp`"
18770		fi
18771	elif test -z "$cf_path_args" ; then
18772		cf_path_args="$cf_temp"
18773	else
18774		cf_path_args="$cf_path_args $cf_temp"
18775	fi
18776done
18777IFS="$cf_save_ifs"
18778
18779if test -n "$cf_path_prog" ; then
18780
18781echo "${as_me:-configure}:18781: testing defining path for ${cf_path_prog} ..." 1>&5
18782
18783cat >>confdefs.h <<EOF
18784#define LUIT_PATH "$cf_path_prog"
18785EOF
18786
18787	test -n "$cf_path_args" &&
18788cat >>confdefs.h <<EOF
18789#define LUIT_ARGS "$cf_path_args"
18790EOF
18791
18792fi
18793
18794fi
18795
18796cat >>confdefs.h <<\EOF
18797#define OPT_WIDE_CHARS 1
18798EOF
18799
18800	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
18801	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
18802	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
18803fi
18804
18805echo "$as_me:18805: checking if you want dynamic-abbreviation support" >&5
18806echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
18807
18808# Check whether --enable-dabbrev or --disable-dabbrev was given.
18809if test "${enable_dabbrev+set}" = set; then
18810  enableval="$enable_dabbrev"
18811  test "$enableval" != yes && enableval=no
18812  if test "$enableval" != "no" ; then
18813    enable_dabbrev=yes
18814  else
18815    enable_dabbrev=no
18816  fi
18817else
18818  enableval=no
18819  enable_dabbrev=no
18820
18821fi;
18822echo "$as_me:18822: result: $enable_dabbrev" >&5
18823echo "${ECHO_T}$enable_dabbrev" >&6
18824if test "$enable_dabbrev" = yes ; then
18825
18826cat >>confdefs.h <<\EOF
18827#define OPT_DABBREV 1
18828EOF
18829
18830fi
18831
18832echo "$as_me:18832: checking if you want DECterm Locator support" >&5
18833echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
18834
18835# Check whether --enable-dec-locator or --disable-dec-locator was given.
18836if test "${enable_dec_locator+set}" = set; then
18837  enableval="$enable_dec_locator"
18838  test "$enableval" != yes && enableval=no
18839  if test "$enableval" != "no" ; then
18840    enable_dec_locator=yes
18841  else
18842    enable_dec_locator=no
18843  fi
18844else
18845  enableval=no
18846  enable_dec_locator=no
18847
18848fi;
18849echo "$as_me:18849: result: $enable_dec_locator" >&5
18850echo "${ECHO_T}$enable_dec_locator" >&6
18851if test "$enable_dec_locator" = yes ; then
18852
18853cat >>confdefs.h <<\EOF
18854#define OPT_DEC_LOCATOR 1
18855EOF
18856
18857fi
18858
18859echo "$as_me:18859: checking if you want ReGIS graphics support" >&5
18860echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
18861
18862# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
18863if test "${enable_regis_graphics+set}" = set; then
18864  enableval="$enable_regis_graphics"
18865  test "$enableval" != yes && enableval=no
18866  if test "$enableval" != "no" ; then
18867    enable_regis_graphics=yes
18868  else
18869    enable_regis_graphics=no
18870  fi
18871else
18872  enableval=no
18873  enable_regis_graphics=no
18874
18875fi;
18876echo "$as_me:18876: result: $enable_regis_graphics" >&5
18877echo "${ECHO_T}$enable_regis_graphics" >&6
18878if test "$enable_regis_graphics" = yes ; then
18879
18880cat >>confdefs.h <<\EOF
18881#define OPT_REGIS_GRAPHICS 1
18882EOF
18883
18884	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
18885	EXTRASRCS="$EXTRASRCS graphics_regis.c"
18886	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
18887
18888echo "$as_me:18888: checking if -lm needed for math functions" >&5
18889echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
18890if test "${cf_cv_need_libm+set}" = set; then
18891  echo $ECHO_N "(cached) $ECHO_C" >&6
18892else
18893
18894	cat >conftest.$ac_ext <<_ACEOF
18895#line 18895 "configure"
18896#include "confdefs.h"
18897
18898	#include <stdio.h>
18899	#include <math.h>
18900
18901int
18902main ()
18903{
18904double x = rand(); printf("result = %g\n", sin(x))
18905  ;
18906  return 0;
18907}
18908_ACEOF
18909rm -f conftest.$ac_objext conftest$ac_exeext
18910if { (eval echo "$as_me:18910: \"$ac_link\"") >&5
18911  (eval $ac_link) 2>&5
18912  ac_status=$?
18913  echo "$as_me:18913: \$? = $ac_status" >&5
18914  (exit $ac_status); } &&
18915         { ac_try='test -s conftest$ac_exeext'
18916  { (eval echo "$as_me:18916: \"$ac_try\"") >&5
18917  (eval $ac_try) 2>&5
18918  ac_status=$?
18919  echo "$as_me:18919: \$? = $ac_status" >&5
18920  (exit $ac_status); }; }; then
18921  cf_cv_need_libm=no
18922else
18923  echo "$as_me: failed program was:" >&5
18924cat conftest.$ac_ext >&5
18925cf_cv_need_libm=yes
18926fi
18927rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18928fi
18929echo "$as_me:18929: result: $cf_cv_need_libm" >&5
18930echo "${ECHO_T}$cf_cv_need_libm" >&6
18931if test "$cf_cv_need_libm" = yes
18932then
18933
18934cf_add_libs="-lm"
18935# Filter out duplicates - this happens with badly-designed ".pc" files...
18936for cf_add_1lib in $LIBS
18937do
18938	for cf_add_2lib in $cf_add_libs
18939	do
18940		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18941		then
18942			cf_add_1lib=
18943			break
18944		fi
18945	done
18946	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18947done
18948LIBS="$cf_add_libs"
18949
18950fi
18951
18952fi
18953
18954echo "$as_me:18954: checking if you want sixel graphics support" >&5
18955echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
18956
18957# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
18958if test "${enable_sixel_graphics+set}" = set; then
18959  enableval="$enable_sixel_graphics"
18960  test "$enableval" != yes && enableval=no
18961  if test "$enableval" != "no" ; then
18962    enable_sixel_graphics=yes
18963  else
18964    enable_sixel_graphics=no
18965  fi
18966else
18967  enableval=no
18968  enable_sixel_graphics=no
18969
18970fi;
18971echo "$as_me:18971: result: $enable_sixel_graphics" >&5
18972echo "${ECHO_T}$enable_sixel_graphics" >&6
18973if test "$enable_sixel_graphics" = yes ; then
18974
18975cat >>confdefs.h <<\EOF
18976#define OPT_SIXEL_GRAPHICS 1
18977EOF
18978
18979	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
18980	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
18981	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
18982fi
18983
18984if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
18985
18986cat >>confdefs.h <<\EOF
18987#define OPT_GRAPHICS 1
18988EOF
18989
18990	EXTRAHDRS="$EXTRAHDRS graphics.h"
18991	EXTRASRCS="$EXTRASRCS graphics.c"
18992	EXTRAOBJS="$EXTRAOBJS graphics.o"
18993fi
18994
18995echo "$as_me:18995: checking if you want VT420 rectangle support" >&5
18996echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
18997
18998# Check whether --enable-rectangles or --disable-rectangles was given.
18999if test "${enable_rectangles+set}" = set; then
19000  enableval="$enable_rectangles"
19001  test "$enableval" != no && enableval=yes
19002  if test "$enableval" != "yes" ; then
19003    enable_rectangles=no
19004  else
19005    enable_rectangles=yes
19006  fi
19007else
19008  enableval=yes
19009  enable_rectangles=yes
19010
19011fi;
19012echo "$as_me:19012: result: $enable_rectangles" >&5
19013echo "${ECHO_T}$enable_rectangles" >&6
19014if test "$enable_rectangles" = yes ; then
19015
19016cat >>confdefs.h <<\EOF
19017#define OPT_DEC_RECTOPS 1
19018EOF
19019
19020fi
19021
19022echo "$as_me:19022: checking if you want -ziconbeep option" >&5
19023echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
19024
19025# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
19026if test "${enable_ziconbeep+set}" = set; then
19027  enableval="$enable_ziconbeep"
19028  test "$enableval" != no && enableval=yes
19029  if test "$enableval" != "yes" ; then
19030    enable_ziconbeep=no
19031  else
19032    enable_ziconbeep=yes
19033  fi
19034else
19035  enableval=yes
19036  enable_ziconbeep=yes
19037
19038fi;
19039echo "$as_me:19039: result: $enable_ziconbeep" >&5
19040echo "${ECHO_T}$enable_ziconbeep" >&6
19041test "$enable_ziconbeep" = no &&
19042cat >>confdefs.h <<\EOF
19043#define OPT_ZICONBEEP 0
19044EOF
19045
19046###############################################################################
19047
19048if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xinerama; then
19049	test -n "$verbose" && echo "	found package xinerama" 1>&6
19050
19051echo "${as_me:-configure}:19051: testing found package xinerama ..." 1>&5
19052
19053	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xinerama 2>/dev/null`"
19054	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xinerama 2>/dev/null`"
19055	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
19056
19057echo "${as_me:-configure}:19057: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
19058
19059	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
19060
19061echo "${as_me:-configure}:19061: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
19062
19063cf_fix_cppflags=no
19064cf_new_cflags=
19065cf_new_cppflags=
19066cf_new_extra_cppflags=
19067
19068for cf_add_cflags in $cf_pkgconfig_incs
19069do
19070case $cf_fix_cppflags in
19071(no)
19072	case $cf_add_cflags in
19073	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19074		case $cf_add_cflags in
19075		(-D*)
19076			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19077
19078			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19079				&& test -z "${cf_tst_cflags}" \
19080				&& cf_fix_cppflags=yes
19081
19082			if test $cf_fix_cppflags = yes ; then
19083				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19084				continue
19085			elif test "${cf_tst_cflags}" = "\"'" ; then
19086				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19087				continue
19088			fi
19089			;;
19090		esac
19091		case "$CPPFLAGS" in
19092		(*$cf_add_cflags)
19093			;;
19094		(*)
19095			case $cf_add_cflags in
19096			(-D*)
19097				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19098
19099CPPFLAGS=`echo "$CPPFLAGS" | \
19100	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19101		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19102
19103				;;
19104			esac
19105			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19106			;;
19107		esac
19108		;;
19109	(*)
19110		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19111		;;
19112	esac
19113	;;
19114(yes)
19115	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19116
19117	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19118
19119	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19120		&& test -z "${cf_tst_cflags}" \
19121		&& cf_fix_cppflags=no
19122	;;
19123esac
19124done
19125
19126if test -n "$cf_new_cflags" ; then
19127
19128	CFLAGS="$CFLAGS $cf_new_cflags"
19129fi
19130
19131if test -n "$cf_new_cppflags" ; then
19132
19133	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19134fi
19135
19136if test -n "$cf_new_extra_cppflags" ; then
19137
19138	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19139fi
19140
19141cf_add_libs="$cf_pkgconfig_libs"
19142# Filter out duplicates - this happens with badly-designed ".pc" files...
19143for cf_add_1lib in $LIBS
19144do
19145	for cf_add_2lib in $cf_add_libs
19146	do
19147		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19148		then
19149			cf_add_1lib=
19150			break
19151		fi
19152	done
19153	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19154done
19155LIBS="$cf_add_libs"
19156
19157	cat >>confdefs.h <<\EOF
19158#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
19159EOF
19160
19161else
19162	cf_pkgconfig_incs=
19163	cf_pkgconfig_libs=
19164
19165	echo "$as_me:19165: checking for XineramaQueryScreens in -lXinerama" >&5
19166echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
19167if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
19168  echo $ECHO_N "(cached) $ECHO_C" >&6
19169else
19170  ac_check_lib_save_LIBS=$LIBS
19171LIBS="-lXinerama  $LIBS"
19172cat >conftest.$ac_ext <<_ACEOF
19173#line 19173 "configure"
19174#include "confdefs.h"
19175
19176/* Override any gcc2 internal prototype to avoid an error.  */
19177#ifdef __cplusplus
19178extern "C"
19179#endif
19180/* We use char because int might match the return type of a gcc2
19181   builtin and then its argument prototype would still apply.  */
19182char XineramaQueryScreens ();
19183int
19184main ()
19185{
19186XineramaQueryScreens ();
19187  ;
19188  return 0;
19189}
19190_ACEOF
19191rm -f conftest.$ac_objext conftest$ac_exeext
19192if { (eval echo "$as_me:19192: \"$ac_link\"") >&5
19193  (eval $ac_link) 2>&5
19194  ac_status=$?
19195  echo "$as_me:19195: \$? = $ac_status" >&5
19196  (exit $ac_status); } &&
19197         { ac_try='test -s conftest$ac_exeext'
19198  { (eval echo "$as_me:19198: \"$ac_try\"") >&5
19199  (eval $ac_try) 2>&5
19200  ac_status=$?
19201  echo "$as_me:19201: \$? = $ac_status" >&5
19202  (exit $ac_status); }; }; then
19203  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
19204else
19205  echo "$as_me: failed program was:" >&5
19206cat conftest.$ac_ext >&5
19207ac_cv_lib_Xinerama_XineramaQueryScreens=no
19208fi
19209rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19210LIBS=$ac_check_lib_save_LIBS
19211fi
19212echo "$as_me:19212: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
19213echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
19214if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
19215
19216cf_add_libs="-lXinerama"
19217# Filter out duplicates - this happens with badly-designed ".pc" files...
19218for cf_add_1lib in $LIBS
19219do
19220	for cf_add_2lib in $cf_add_libs
19221	do
19222		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19223		then
19224			cf_add_1lib=
19225			break
19226		fi
19227	done
19228	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19229done
19230LIBS="$cf_add_libs"
19231
19232for ac_header in \
19233			X11/extensions/Xinerama.h \
19234
19235do
19236as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19237echo "$as_me:19237: checking for $ac_header" >&5
19238echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19239if eval "test \"\${$as_ac_Header+set}\" = set"; then
19240  echo $ECHO_N "(cached) $ECHO_C" >&6
19241else
19242  cat >conftest.$ac_ext <<_ACEOF
19243#line 19243 "configure"
19244#include "confdefs.h"
19245#include <$ac_header>
19246_ACEOF
19247if { (eval echo "$as_me:19247: \"$ac_cpp conftest.$ac_ext\"") >&5
19248  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19249  ac_status=$?
19250  egrep -v '^ *\+' conftest.er1 >conftest.err
19251  rm -f conftest.er1
19252  cat conftest.err >&5
19253  echo "$as_me:19253: \$? = $ac_status" >&5
19254  (exit $ac_status); } >/dev/null; then
19255  if test -s conftest.err; then
19256    ac_cpp_err=$ac_c_preproc_warn_flag
19257  else
19258    ac_cpp_err=
19259  fi
19260else
19261  ac_cpp_err=yes
19262fi
19263if test -z "$ac_cpp_err"; then
19264  eval "$as_ac_Header=yes"
19265else
19266  echo "$as_me: failed program was:" >&5
19267  cat conftest.$ac_ext >&5
19268  eval "$as_ac_Header=no"
19269fi
19270rm -f conftest.err conftest.$ac_ext
19271fi
19272echo "$as_me:19272: result: `eval echo '${'$as_ac_Header'}'`" >&5
19273echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19274if test `eval echo '${'$as_ac_Header'}'` = yes; then
19275  cat >>confdefs.h <<EOF
19276#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19277EOF
19278
19279fi
19280done
19281
19282fi
19283
19284fi
19285
19286###############################################################################
19287
19288echo "$as_me:19288: checking if you want debugging traces" >&5
19289echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
19290
19291# Check whether --enable-trace or --disable-trace was given.
19292if test "${enable_trace+set}" = set; then
19293  enableval="$enable_trace"
19294  test "$enableval" != yes && enableval=no
19295  if test "$enableval" != "no" ; then
19296    enable_trace=yes
19297  else
19298    enable_trace=no
19299  fi
19300else
19301  enableval=no
19302  enable_trace=no
19303
19304fi;
19305echo "$as_me:19305: result: $enable_trace" >&5
19306echo "${ECHO_T}$enable_trace" >&6
19307if test "$enable_trace" = yes ; then
19308
19309cat >>confdefs.h <<\EOF
19310#define OPT_TRACE 1
19311EOF
19312
19313	EXTRASRCS="$EXTRASRCS trace.c"
19314	EXTRAOBJS="$EXTRAOBJS trace.o"
19315fi
19316
19317echo "$as_me:19317: checking if you want to use dmalloc for testing" >&5
19318echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
19319
19320# Check whether --with-dmalloc or --without-dmalloc was given.
19321if test "${with_dmalloc+set}" = set; then
19322  withval="$with_dmalloc"
19323
19324cat >>confdefs.h <<EOF
19325#define USE_DMALLOC 1
19326EOF
19327
19328	: ${with_cflags:=-g}
19329	: ${with_no_leaks:=yes}
19330	 with_dmalloc=yes
19331else
19332  with_dmalloc=
19333fi;
19334echo "$as_me:19334: result: ${with_dmalloc:-no}" >&5
19335echo "${ECHO_T}${with_dmalloc:-no}" >&6
19336
19337case .$with_cflags in
19338(.*-g*)
19339	case .$CFLAGS in
19340	(.*-g*)
19341		;;
19342	(*)
19343
19344cf_fix_cppflags=no
19345cf_new_cflags=
19346cf_new_cppflags=
19347cf_new_extra_cppflags=
19348
19349for cf_add_cflags in -g
19350do
19351case $cf_fix_cppflags in
19352(no)
19353	case $cf_add_cflags in
19354	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19355		case $cf_add_cflags in
19356		(-D*)
19357			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19358
19359			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19360				&& test -z "${cf_tst_cflags}" \
19361				&& cf_fix_cppflags=yes
19362
19363			if test $cf_fix_cppflags = yes ; then
19364				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19365				continue
19366			elif test "${cf_tst_cflags}" = "\"'" ; then
19367				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19368				continue
19369			fi
19370			;;
19371		esac
19372		case "$CPPFLAGS" in
19373		(*$cf_add_cflags)
19374			;;
19375		(*)
19376			case $cf_add_cflags in
19377			(-D*)
19378				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19379
19380CPPFLAGS=`echo "$CPPFLAGS" | \
19381	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19382		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19383
19384				;;
19385			esac
19386			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19387			;;
19388		esac
19389		;;
19390	(*)
19391		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19392		;;
19393	esac
19394	;;
19395(yes)
19396	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19397
19398	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19399
19400	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19401		&& test -z "${cf_tst_cflags}" \
19402		&& cf_fix_cppflags=no
19403	;;
19404esac
19405done
19406
19407if test -n "$cf_new_cflags" ; then
19408
19409	CFLAGS="$CFLAGS $cf_new_cflags"
19410fi
19411
19412if test -n "$cf_new_cppflags" ; then
19413
19414	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19415fi
19416
19417if test -n "$cf_new_extra_cppflags" ; then
19418
19419	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19420fi
19421
19422		;;
19423	esac
19424	;;
19425esac
19426
19427if test "$with_dmalloc" = yes ; then
19428	echo "$as_me:19428: checking for dmalloc.h" >&5
19429echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
19430if test "${ac_cv_header_dmalloc_h+set}" = set; then
19431  echo $ECHO_N "(cached) $ECHO_C" >&6
19432else
19433  cat >conftest.$ac_ext <<_ACEOF
19434#line 19434 "configure"
19435#include "confdefs.h"
19436#include <dmalloc.h>
19437_ACEOF
19438if { (eval echo "$as_me:19438: \"$ac_cpp conftest.$ac_ext\"") >&5
19439  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19440  ac_status=$?
19441  egrep -v '^ *\+' conftest.er1 >conftest.err
19442  rm -f conftest.er1
19443  cat conftest.err >&5
19444  echo "$as_me:19444: \$? = $ac_status" >&5
19445  (exit $ac_status); } >/dev/null; then
19446  if test -s conftest.err; then
19447    ac_cpp_err=$ac_c_preproc_warn_flag
19448  else
19449    ac_cpp_err=
19450  fi
19451else
19452  ac_cpp_err=yes
19453fi
19454if test -z "$ac_cpp_err"; then
19455  ac_cv_header_dmalloc_h=yes
19456else
19457  echo "$as_me: failed program was:" >&5
19458  cat conftest.$ac_ext >&5
19459  ac_cv_header_dmalloc_h=no
19460fi
19461rm -f conftest.err conftest.$ac_ext
19462fi
19463echo "$as_me:19463: result: $ac_cv_header_dmalloc_h" >&5
19464echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
19465if test $ac_cv_header_dmalloc_h = yes; then
19466
19467echo "$as_me:19467: checking for dmalloc_debug in -ldmalloc" >&5
19468echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
19469if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
19470  echo $ECHO_N "(cached) $ECHO_C" >&6
19471else
19472  ac_check_lib_save_LIBS=$LIBS
19473LIBS="-ldmalloc  $LIBS"
19474cat >conftest.$ac_ext <<_ACEOF
19475#line 19475 "configure"
19476#include "confdefs.h"
19477
19478/* Override any gcc2 internal prototype to avoid an error.  */
19479#ifdef __cplusplus
19480extern "C"
19481#endif
19482/* We use char because int might match the return type of a gcc2
19483   builtin and then its argument prototype would still apply.  */
19484char dmalloc_debug ();
19485int
19486main ()
19487{
19488dmalloc_debug ();
19489  ;
19490  return 0;
19491}
19492_ACEOF
19493rm -f conftest.$ac_objext conftest$ac_exeext
19494if { (eval echo "$as_me:19494: \"$ac_link\"") >&5
19495  (eval $ac_link) 2>&5
19496  ac_status=$?
19497  echo "$as_me:19497: \$? = $ac_status" >&5
19498  (exit $ac_status); } &&
19499         { ac_try='test -s conftest$ac_exeext'
19500  { (eval echo "$as_me:19500: \"$ac_try\"") >&5
19501  (eval $ac_try) 2>&5
19502  ac_status=$?
19503  echo "$as_me:19503: \$? = $ac_status" >&5
19504  (exit $ac_status); }; }; then
19505  ac_cv_lib_dmalloc_dmalloc_debug=yes
19506else
19507  echo "$as_me: failed program was:" >&5
19508cat conftest.$ac_ext >&5
19509ac_cv_lib_dmalloc_dmalloc_debug=no
19510fi
19511rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19512LIBS=$ac_check_lib_save_LIBS
19513fi
19514echo "$as_me:19514: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
19515echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
19516if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
19517  cat >>confdefs.h <<EOF
19518#define HAVE_LIBDMALLOC 1
19519EOF
19520
19521  LIBS="-ldmalloc $LIBS"
19522
19523fi
19524
19525fi
19526
19527fi
19528
19529echo "$as_me:19529: checking if you want to use dbmalloc for testing" >&5
19530echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
19531
19532# Check whether --with-dbmalloc or --without-dbmalloc was given.
19533if test "${with_dbmalloc+set}" = set; then
19534  withval="$with_dbmalloc"
19535
19536cat >>confdefs.h <<EOF
19537#define USE_DBMALLOC 1
19538EOF
19539
19540	: ${with_cflags:=-g}
19541	: ${with_no_leaks:=yes}
19542	 with_dbmalloc=yes
19543else
19544  with_dbmalloc=
19545fi;
19546echo "$as_me:19546: result: ${with_dbmalloc:-no}" >&5
19547echo "${ECHO_T}${with_dbmalloc:-no}" >&6
19548
19549case .$with_cflags in
19550(.*-g*)
19551	case .$CFLAGS in
19552	(.*-g*)
19553		;;
19554	(*)
19555
19556cf_fix_cppflags=no
19557cf_new_cflags=
19558cf_new_cppflags=
19559cf_new_extra_cppflags=
19560
19561for cf_add_cflags in -g
19562do
19563case $cf_fix_cppflags in
19564(no)
19565	case $cf_add_cflags in
19566	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19567		case $cf_add_cflags in
19568		(-D*)
19569			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19570
19571			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19572				&& test -z "${cf_tst_cflags}" \
19573				&& cf_fix_cppflags=yes
19574
19575			if test $cf_fix_cppflags = yes ; then
19576				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19577				continue
19578			elif test "${cf_tst_cflags}" = "\"'" ; then
19579				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19580				continue
19581			fi
19582			;;
19583		esac
19584		case "$CPPFLAGS" in
19585		(*$cf_add_cflags)
19586			;;
19587		(*)
19588			case $cf_add_cflags in
19589			(-D*)
19590				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19591
19592CPPFLAGS=`echo "$CPPFLAGS" | \
19593	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19594		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19595
19596				;;
19597			esac
19598			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19599			;;
19600		esac
19601		;;
19602	(*)
19603		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19604		;;
19605	esac
19606	;;
19607(yes)
19608	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19609
19610	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19611
19612	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19613		&& test -z "${cf_tst_cflags}" \
19614		&& cf_fix_cppflags=no
19615	;;
19616esac
19617done
19618
19619if test -n "$cf_new_cflags" ; then
19620
19621	CFLAGS="$CFLAGS $cf_new_cflags"
19622fi
19623
19624if test -n "$cf_new_cppflags" ; then
19625
19626	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19627fi
19628
19629if test -n "$cf_new_extra_cppflags" ; then
19630
19631	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19632fi
19633
19634		;;
19635	esac
19636	;;
19637esac
19638
19639if test "$with_dbmalloc" = yes ; then
19640	echo "$as_me:19640: checking for dbmalloc.h" >&5
19641echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
19642if test "${ac_cv_header_dbmalloc_h+set}" = set; then
19643  echo $ECHO_N "(cached) $ECHO_C" >&6
19644else
19645  cat >conftest.$ac_ext <<_ACEOF
19646#line 19646 "configure"
19647#include "confdefs.h"
19648#include <dbmalloc.h>
19649_ACEOF
19650if { (eval echo "$as_me:19650: \"$ac_cpp conftest.$ac_ext\"") >&5
19651  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19652  ac_status=$?
19653  egrep -v '^ *\+' conftest.er1 >conftest.err
19654  rm -f conftest.er1
19655  cat conftest.err >&5
19656  echo "$as_me:19656: \$? = $ac_status" >&5
19657  (exit $ac_status); } >/dev/null; then
19658  if test -s conftest.err; then
19659    ac_cpp_err=$ac_c_preproc_warn_flag
19660  else
19661    ac_cpp_err=
19662  fi
19663else
19664  ac_cpp_err=yes
19665fi
19666if test -z "$ac_cpp_err"; then
19667  ac_cv_header_dbmalloc_h=yes
19668else
19669  echo "$as_me: failed program was:" >&5
19670  cat conftest.$ac_ext >&5
19671  ac_cv_header_dbmalloc_h=no
19672fi
19673rm -f conftest.err conftest.$ac_ext
19674fi
19675echo "$as_me:19675: result: $ac_cv_header_dbmalloc_h" >&5
19676echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
19677if test $ac_cv_header_dbmalloc_h = yes; then
19678
19679echo "$as_me:19679: checking for debug_malloc in -ldbmalloc" >&5
19680echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
19681if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
19682  echo $ECHO_N "(cached) $ECHO_C" >&6
19683else
19684  ac_check_lib_save_LIBS=$LIBS
19685LIBS="-ldbmalloc  $LIBS"
19686cat >conftest.$ac_ext <<_ACEOF
19687#line 19687 "configure"
19688#include "confdefs.h"
19689
19690/* Override any gcc2 internal prototype to avoid an error.  */
19691#ifdef __cplusplus
19692extern "C"
19693#endif
19694/* We use char because int might match the return type of a gcc2
19695   builtin and then its argument prototype would still apply.  */
19696char debug_malloc ();
19697int
19698main ()
19699{
19700debug_malloc ();
19701  ;
19702  return 0;
19703}
19704_ACEOF
19705rm -f conftest.$ac_objext conftest$ac_exeext
19706if { (eval echo "$as_me:19706: \"$ac_link\"") >&5
19707  (eval $ac_link) 2>&5
19708  ac_status=$?
19709  echo "$as_me:19709: \$? = $ac_status" >&5
19710  (exit $ac_status); } &&
19711         { ac_try='test -s conftest$ac_exeext'
19712  { (eval echo "$as_me:19712: \"$ac_try\"") >&5
19713  (eval $ac_try) 2>&5
19714  ac_status=$?
19715  echo "$as_me:19715: \$? = $ac_status" >&5
19716  (exit $ac_status); }; }; then
19717  ac_cv_lib_dbmalloc_debug_malloc=yes
19718else
19719  echo "$as_me: failed program was:" >&5
19720cat conftest.$ac_ext >&5
19721ac_cv_lib_dbmalloc_debug_malloc=no
19722fi
19723rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19724LIBS=$ac_check_lib_save_LIBS
19725fi
19726echo "$as_me:19726: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
19727echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
19728if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
19729  cat >>confdefs.h <<EOF
19730#define HAVE_LIBDBMALLOC 1
19731EOF
19732
19733  LIBS="-ldbmalloc $LIBS"
19734
19735fi
19736
19737fi
19738
19739fi
19740
19741echo "$as_me:19741: checking if you want to use valgrind for testing" >&5
19742echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
19743
19744# Check whether --with-valgrind or --without-valgrind was given.
19745if test "${with_valgrind+set}" = set; then
19746  withval="$with_valgrind"
19747
19748cat >>confdefs.h <<EOF
19749#define USE_VALGRIND 1
19750EOF
19751
19752	: ${with_cflags:=-g}
19753	: ${with_no_leaks:=yes}
19754	 with_valgrind=yes
19755else
19756  with_valgrind=
19757fi;
19758echo "$as_me:19758: result: ${with_valgrind:-no}" >&5
19759echo "${ECHO_T}${with_valgrind:-no}" >&6
19760
19761case .$with_cflags in
19762(.*-g*)
19763	case .$CFLAGS in
19764	(.*-g*)
19765		;;
19766	(*)
19767
19768cf_fix_cppflags=no
19769cf_new_cflags=
19770cf_new_cppflags=
19771cf_new_extra_cppflags=
19772
19773for cf_add_cflags in -g
19774do
19775case $cf_fix_cppflags in
19776(no)
19777	case $cf_add_cflags in
19778	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19779		case $cf_add_cflags in
19780		(-D*)
19781			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19782
19783			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19784				&& test -z "${cf_tst_cflags}" \
19785				&& cf_fix_cppflags=yes
19786
19787			if test $cf_fix_cppflags = yes ; then
19788				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19789				continue
19790			elif test "${cf_tst_cflags}" = "\"'" ; then
19791				cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19792				continue
19793			fi
19794			;;
19795		esac
19796		case "$CPPFLAGS" in
19797		(*$cf_add_cflags)
19798			;;
19799		(*)
19800			case $cf_add_cflags in
19801			(-D*)
19802				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19803
19804CPPFLAGS=`echo "$CPPFLAGS" | \
19805	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19806		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19807
19808				;;
19809			esac
19810			cf_new_cppflags="$cf_new_cppflags $cf_add_cflags"
19811			;;
19812		esac
19813		;;
19814	(*)
19815		cf_new_cflags="$cf_new_cflags $cf_add_cflags"
19816		;;
19817	esac
19818	;;
19819(yes)
19820	cf_new_extra_cppflags="$cf_new_extra_cppflags $cf_add_cflags"
19821
19822	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
19823
19824	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19825		&& test -z "${cf_tst_cflags}" \
19826		&& cf_fix_cppflags=no
19827	;;
19828esac
19829done
19830
19831if test -n "$cf_new_cflags" ; then
19832
19833	CFLAGS="$CFLAGS $cf_new_cflags"
19834fi
19835
19836if test -n "$cf_new_cppflags" ; then
19837
19838	CPPFLAGS="$CPPFLAGS $cf_new_cppflags"
19839fi
19840
19841if test -n "$cf_new_extra_cppflags" ; then
19842
19843	EXTRA_CPPFLAGS="$cf_new_extra_cppflags $EXTRA_CPPFLAGS"
19844fi
19845
19846		;;
19847	esac
19848	;;
19849esac
19850
19851echo "$as_me:19851: checking if you want to perform memory-leak testing" >&5
19852echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
19853
19854# Check whether --enable-leaks or --disable-leaks was given.
19855if test "${enable_leaks+set}" = set; then
19856  enableval="$enable_leaks"
19857  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
19858else
19859  : ${with_no_leaks:=no}
19860fi;
19861echo "$as_me:19861: result: $with_no_leaks" >&5
19862echo "${ECHO_T}$with_no_leaks" >&6
19863
19864if test "$with_no_leaks" = yes ; then
19865
19866cat >>confdefs.h <<\EOF
19867#define NO_LEAKS 1
19868EOF
19869
19870cat >>confdefs.h <<\EOF
19871#define YY_NO_LEAKS 1
19872EOF
19873
19874fi
19875
19876echo "$as_me:19876: checking if you want to see long compiling messages" >&5
19877echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
19878
19879# Check whether --enable-echo or --disable-echo was given.
19880if test "${enable_echo+set}" = set; then
19881  enableval="$enable_echo"
19882  test "$enableval" != no && enableval=yes
19883  if test "$enableval" != "yes" ; then
19884
19885    ECHO_LT='--silent'
19886    ECHO_LD='@echo linking $@;'
19887    RULE_CC='@echo compiling $<'
19888    SHOW_CC='@echo compiling $@'
19889    ECHO_CC='@'
19890
19891  else
19892
19893    ECHO_LT=''
19894    ECHO_LD=''
19895    RULE_CC=''
19896    SHOW_CC=''
19897    ECHO_CC=''
19898
19899  fi
19900else
19901  enableval=yes
19902
19903    ECHO_LT=''
19904    ECHO_LD=''
19905    RULE_CC=''
19906    SHOW_CC=''
19907    ECHO_CC=''
19908
19909fi;
19910echo "$as_me:19910: result: $enableval" >&5
19911echo "${ECHO_T}$enableval" >&6
19912
19913echo "$as_me:19913: checking if you want magic cookie emulation" >&5
19914echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
19915
19916# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
19917if test "${enable_xmc_glitch+set}" = set; then
19918  enableval="$enable_xmc_glitch"
19919  test "$enableval" != yes && enableval=no
19920  if test "$enableval" != "no" ; then
19921    enable_xmc=yes
19922  else
19923    enable_xmc=no
19924  fi
19925else
19926  enableval=no
19927  enable_xmc=no
19928
19929fi;
19930echo "$as_me:19930: result: $enable_xmc" >&5
19931echo "${ECHO_T}$enable_xmc" >&6
19932if test "$enable_xmc" = yes ; then
19933
19934cat >>confdefs.h <<\EOF
19935#define OPT_XMC_GLITCH 1
19936EOF
19937
19938	EXTRASRCS="$EXTRASRCS testxmc.c"
19939	EXTRAOBJS="$EXTRAOBJS testxmc.o"
19940fi
19941
19942for ac_func in tigetstr
19943do
19944as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19945echo "$as_me:19945: checking for $ac_func" >&5
19946echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19947if eval "test \"\${$as_ac_var+set}\" = set"; then
19948  echo $ECHO_N "(cached) $ECHO_C" >&6
19949else
19950  cat >conftest.$ac_ext <<_ACEOF
19951#line 19951 "configure"
19952#include "confdefs.h"
19953/* System header to define __stub macros and hopefully few prototypes,
19954    which can conflict with char $ac_func (); below.  */
19955#include <assert.h>
19956/* Override any gcc2 internal prototype to avoid an error.  */
19957#ifdef __cplusplus
19958extern "C"
19959#endif
19960/* We use char because int might match the return type of a gcc2
19961   builtin and then its argument prototype would still apply.  */
19962char $ac_func ();
19963char (*f) ();
19964
19965int
19966main ()
19967{
19968/* The GNU C library defines this for functions which it implements
19969    to always fail with ENOSYS.  Some functions are actually named
19970    something starting with __ and the normal name is an alias.  */
19971#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19972choke me
19973#else
19974f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19975#endif
19976
19977  ;
19978  return 0;
19979}
19980_ACEOF
19981rm -f conftest.$ac_objext conftest$ac_exeext
19982if { (eval echo "$as_me:19982: \"$ac_link\"") >&5
19983  (eval $ac_link) 2>&5
19984  ac_status=$?
19985  echo "$as_me:19985: \$? = $ac_status" >&5
19986  (exit $ac_status); } &&
19987         { ac_try='test -s conftest$ac_exeext'
19988  { (eval echo "$as_me:19988: \"$ac_try\"") >&5
19989  (eval $ac_try) 2>&5
19990  ac_status=$?
19991  echo "$as_me:19991: \$? = $ac_status" >&5
19992  (exit $ac_status); }; }; then
19993  eval "$as_ac_var=yes"
19994else
19995  echo "$as_me: failed program was:" >&5
19996cat conftest.$ac_ext >&5
19997eval "$as_ac_var=no"
19998fi
19999rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20000fi
20001echo "$as_me:20001: result: `eval echo '${'$as_ac_var'}'`" >&5
20002echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20003if test `eval echo '${'$as_ac_var'}'` = yes; then
20004  cat >>confdefs.h <<EOF
20005#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20006EOF
20007
20008fi
20009done
20010
20011if test -n "$cf_cv_lib_part_tgetent"; then
20012
20013for ac_func in use_extended_names
20014do
20015as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20016echo "$as_me:20016: checking for $ac_func" >&5
20017echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20018if eval "test \"\${$as_ac_var+set}\" = set"; then
20019  echo $ECHO_N "(cached) $ECHO_C" >&6
20020else
20021  cat >conftest.$ac_ext <<_ACEOF
20022#line 20022 "configure"
20023#include "confdefs.h"
20024/* System header to define __stub macros and hopefully few prototypes,
20025    which can conflict with char $ac_func (); below.  */
20026#include <assert.h>
20027/* Override any gcc2 internal prototype to avoid an error.  */
20028#ifdef __cplusplus
20029extern "C"
20030#endif
20031/* We use char because int might match the return type of a gcc2
20032   builtin and then its argument prototype would still apply.  */
20033char $ac_func ();
20034char (*f) ();
20035
20036int
20037main ()
20038{
20039/* The GNU C library defines this for functions which it implements
20040    to always fail with ENOSYS.  Some functions are actually named
20041    something starting with __ and the normal name is an alias.  */
20042#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20043choke me
20044#else
20045f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20046#endif
20047
20048  ;
20049  return 0;
20050}
20051_ACEOF
20052rm -f conftest.$ac_objext conftest$ac_exeext
20053if { (eval echo "$as_me:20053: \"$ac_link\"") >&5
20054  (eval $ac_link) 2>&5
20055  ac_status=$?
20056  echo "$as_me:20056: \$? = $ac_status" >&5
20057  (exit $ac_status); } &&
20058         { ac_try='test -s conftest$ac_exeext'
20059  { (eval echo "$as_me:20059: \"$ac_try\"") >&5
20060  (eval $ac_try) 2>&5
20061  ac_status=$?
20062  echo "$as_me:20062: \$? = $ac_status" >&5
20063  (exit $ac_status); }; }; then
20064  eval "$as_ac_var=yes"
20065else
20066  echo "$as_me: failed program was:" >&5
20067cat conftest.$ac_ext >&5
20068eval "$as_ac_var=no"
20069fi
20070rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20071fi
20072echo "$as_me:20072: result: `eval echo '${'$as_ac_var'}'`" >&5
20073echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20074if test `eval echo '${'$as_ac_var'}'` = yes; then
20075  cat >>confdefs.h <<EOF
20076#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20077EOF
20078
20079fi
20080done
20081
20082fi
20083
20084if test -n "$GCC" ; then
20085echo "$as_me:20085: checking if you want to turn on gcc warnings" >&5
20086echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
20087
20088# Check whether --enable-warnings or --disable-warnings was given.
20089if test "${enable_warnings+set}" = set; then
20090  enableval="$enable_warnings"
20091  test "$enableval" != yes && enableval=no
20092  if test "$enableval" != "no" ; then
20093    with_warnings=yes
20094  else
20095    with_warnings=no
20096  fi
20097else
20098  enableval=no
20099  with_warnings=no
20100
20101fi;
20102echo "$as_me:20102: result: $with_warnings" >&5
20103echo "${ECHO_T}$with_warnings" >&6
20104if test "$with_warnings" = yes
20105then
20106
20107if test "$GCC" = yes
20108then
20109cat > conftest.i <<EOF
20110#ifndef GCC_PRINTF
20111#define GCC_PRINTF 0
20112#endif
20113#ifndef GCC_SCANF
20114#define GCC_SCANF 0
20115#endif
20116#ifndef GCC_NORETURN
20117#define GCC_NORETURN /* nothing */
20118#endif
20119#ifndef GCC_UNUSED
20120#define GCC_UNUSED /* nothing */
20121#endif
20122EOF
20123if test "$GCC" = yes
20124then
20125	{ echo "$as_me:20125: checking for $CC __attribute__ directives..." >&5
20126echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
20127cat > conftest.$ac_ext <<EOF
20128#line 20128 "${as_me:-configure}"
20129#include "confdefs.h"
20130#include "conftest.h"
20131#include "conftest.i"
20132#if	GCC_PRINTF
20133#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
20134#else
20135#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
20136#endif
20137#if	GCC_SCANF
20138#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
20139#else
20140#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
20141#endif
20142extern void wow(char *,...) GCC_SCANFLIKE(1,2);
20143extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
20144extern void foo(void) GCC_NORETURN;
20145int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
20146EOF
20147	cf_printf_attribute=no
20148	cf_scanf_attribute=no
20149	for cf_attribute in scanf printf unused noreturn
20150	do
20151
20152cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
20153
20154		cf_directive="__attribute__(($cf_attribute))"
20155		echo "checking for $CC $cf_directive" 1>&5
20156
20157		case $cf_attribute in
20158		(printf)
20159			cf_printf_attribute=yes
20160			cat >conftest.h <<EOF
20161#define GCC_$cf_ATTRIBUTE 1
20162EOF
20163			;;
20164		(scanf)
20165			cf_scanf_attribute=yes
20166			cat >conftest.h <<EOF
20167#define GCC_$cf_ATTRIBUTE 1
20168EOF
20169			;;
20170		(*)
20171			cat >conftest.h <<EOF
20172#define GCC_$cf_ATTRIBUTE $cf_directive
20173EOF
20174			;;
20175		esac
20176
20177		if { (eval echo "$as_me:20177: \"$ac_compile\"") >&5
20178  (eval $ac_compile) 2>&5
20179  ac_status=$?
20180  echo "$as_me:20180: \$? = $ac_status" >&5
20181  (exit $ac_status); }; then
20182			test -n "$verbose" && echo "$as_me:20182: result: ... $cf_attribute" >&5
20183echo "${ECHO_T}... $cf_attribute" >&6
20184			cat conftest.h >>confdefs.h
20185			case $cf_attribute in
20186			(noreturn)
20187
20188cat >>confdefs.h <<EOF
20189#define GCC_NORETURN $cf_directive
20190EOF
20191
20192				;;
20193			(printf)
20194				cf_value='/* nothing */'
20195				if test "$cf_printf_attribute" != no ; then
20196					cf_value='__attribute__((format(printf,fmt,var)))'
20197
20198cat >>confdefs.h <<\EOF
20199#define GCC_PRINTF 1
20200EOF
20201
20202				fi
20203
20204cat >>confdefs.h <<EOF
20205#define GCC_PRINTFLIKE(fmt,var) $cf_value
20206EOF
20207
20208				;;
20209			(scanf)
20210				cf_value='/* nothing */'
20211				if test "$cf_scanf_attribute" != no ; then
20212					cf_value='__attribute__((format(scanf,fmt,var)))'
20213
20214cat >>confdefs.h <<\EOF
20215#define GCC_SCANF 1
20216EOF
20217
20218				fi
20219
20220cat >>confdefs.h <<EOF
20221#define GCC_SCANFLIKE(fmt,var) $cf_value
20222EOF
20223
20224				;;
20225			(unused)
20226
20227cat >>confdefs.h <<EOF
20228#define GCC_UNUSED $cf_directive
20229EOF
20230
20231				;;
20232			esac
20233		fi
20234	done
20235else
20236	fgrep define conftest.i >>confdefs.h
20237fi
20238rm -rf conftest*
20239fi
20240
20241INTEL_COMPILER=no
20242
20243if test "$GCC" = yes ; then
20244	case $host_os in
20245	(linux*|gnu*)
20246		echo "$as_me:20246: checking if this is really Intel C compiler" >&5
20247echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
20248		cf_save_CFLAGS="$CFLAGS"
20249		CFLAGS="$CFLAGS -no-gcc"
20250		cat >conftest.$ac_ext <<_ACEOF
20251#line 20251 "configure"
20252#include "confdefs.h"
20253
20254int
20255main ()
20256{
20257
20258#ifdef __INTEL_COMPILER
20259#else
20260make an error
20261#endif
20262
20263  ;
20264  return 0;
20265}
20266_ACEOF
20267rm -f conftest.$ac_objext
20268if { (eval echo "$as_me:20268: \"$ac_compile\"") >&5
20269  (eval $ac_compile) 2>&5
20270  ac_status=$?
20271  echo "$as_me:20271: \$? = $ac_status" >&5
20272  (exit $ac_status); } &&
20273         { ac_try='test -s conftest.$ac_objext'
20274  { (eval echo "$as_me:20274: \"$ac_try\"") >&5
20275  (eval $ac_try) 2>&5
20276  ac_status=$?
20277  echo "$as_me:20277: \$? = $ac_status" >&5
20278  (exit $ac_status); }; }; then
20279  INTEL_COMPILER=yes
20280cf_save_CFLAGS="$cf_save_CFLAGS -we147"
20281
20282else
20283  echo "$as_me: failed program was:" >&5
20284cat conftest.$ac_ext >&5
20285fi
20286rm -f conftest.$ac_objext conftest.$ac_ext
20287		CFLAGS="$cf_save_CFLAGS"
20288		echo "$as_me:20288: result: $INTEL_COMPILER" >&5
20289echo "${ECHO_T}$INTEL_COMPILER" >&6
20290		;;
20291	esac
20292fi
20293
20294CLANG_COMPILER=no
20295
20296if test "$GCC" = yes ; then
20297	echo "$as_me:20297: checking if this is really Clang C compiler" >&5
20298echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
20299	cf_save_CFLAGS="$CFLAGS"
20300	CFLAGS="$CFLAGS -Qunused-arguments"
20301	cat >conftest.$ac_ext <<_ACEOF
20302#line 20302 "configure"
20303#include "confdefs.h"
20304
20305int
20306main ()
20307{
20308
20309#ifdef __clang__
20310#else
20311make an error
20312#endif
20313
20314  ;
20315  return 0;
20316}
20317_ACEOF
20318rm -f conftest.$ac_objext
20319if { (eval echo "$as_me:20319: \"$ac_compile\"") >&5
20320  (eval $ac_compile) 2>&5
20321  ac_status=$?
20322  echo "$as_me:20322: \$? = $ac_status" >&5
20323  (exit $ac_status); } &&
20324         { ac_try='test -s conftest.$ac_objext'
20325  { (eval echo "$as_me:20325: \"$ac_try\"") >&5
20326  (eval $ac_try) 2>&5
20327  ac_status=$?
20328  echo "$as_me:20328: \$? = $ac_status" >&5
20329  (exit $ac_status); }; }; then
20330  CLANG_COMPILER=yes
20331cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
20332
20333else
20334  echo "$as_me: failed program was:" >&5
20335cat conftest.$ac_ext >&5
20336fi
20337rm -f conftest.$ac_objext conftest.$ac_ext
20338	CFLAGS="$cf_save_CFLAGS"
20339	echo "$as_me:20339: result: $CLANG_COMPILER" >&5
20340echo "${ECHO_T}$CLANG_COMPILER" >&6
20341fi
20342
20343cat > conftest.$ac_ext <<EOF
20344#line 20344 "${as_me:-configure}"
20345int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
20346EOF
20347
20348if test "$INTEL_COMPILER" = yes
20349then
20350# The "-wdXXX" options suppress warnings:
20351# remark #1419: external declaration in primary source file
20352# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
20353# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
20354# remark #193: zero used for undefined preprocessing identifier
20355# remark #593: variable "curs_sb_left_arrow" was set but never used
20356# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
20357# remark #869: parameter "tw" was never referenced
20358# remark #981: operands are evaluated in unspecified order
20359# warning #279: controlling expression is constant
20360
20361	{ echo "$as_me:20361: checking for $CC warning options..." >&5
20362echo "$as_me: checking for $CC warning options..." >&6;}
20363	cf_save_CFLAGS="$CFLAGS"
20364	EXTRA_CFLAGS="-Wall"
20365	for cf_opt in \
20366		wd1419 \
20367		wd1683 \
20368		wd1684 \
20369		wd193 \
20370		wd593 \
20371		wd279 \
20372		wd810 \
20373		wd869 \
20374		wd981
20375	do
20376		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
20377		if { (eval echo "$as_me:20377: \"$ac_compile\"") >&5
20378  (eval $ac_compile) 2>&5
20379  ac_status=$?
20380  echo "$as_me:20380: \$? = $ac_status" >&5
20381  (exit $ac_status); }; then
20382			test -n "$verbose" && echo "$as_me:20382: result: ... -$cf_opt" >&5
20383echo "${ECHO_T}... -$cf_opt" >&6
20384			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
20385		fi
20386	done
20387	CFLAGS="$cf_save_CFLAGS"
20388
20389elif test "$GCC" = yes
20390then
20391	{ echo "$as_me:20391: checking for $CC warning options..." >&5
20392echo "$as_me: checking for $CC warning options..." >&6;}
20393	cf_save_CFLAGS="$CFLAGS"
20394	EXTRA_CFLAGS=
20395	cf_warn_CONST=""
20396	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
20397	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
20398	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
20399	for cf_opt in W Wall \
20400		Wbad-function-cast \
20401		Wcast-align \
20402		Wcast-qual \
20403		Wdeclaration-after-statement \
20404		Wextra \
20405		Winline \
20406		Wmissing-declarations \
20407		Wmissing-prototypes \
20408		Wnested-externs \
20409		Wpointer-arith \
20410		Wshadow \
20411		Wstrict-prototypes \
20412		Wundef $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
20413	do
20414		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
20415		if { (eval echo "$as_me:20415: \"$ac_compile\"") >&5
20416  (eval $ac_compile) 2>&5
20417  ac_status=$?
20418  echo "$as_me:20418: \$? = $ac_status" >&5
20419  (exit $ac_status); }; then
20420			test -n "$verbose" && echo "$as_me:20420: result: ... -$cf_opt" >&5
20421echo "${ECHO_T}... -$cf_opt" >&6
20422			case $cf_opt in
20423			(Wcast-qual)
20424				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
20425				;;
20426			(Winline)
20427				case $GCC_VERSION in
20428				([34].*)
20429					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
20430
20431echo "${as_me:-configure}:20431: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
20432
20433					continue;;
20434				esac
20435				;;
20436			(Wpointer-arith)
20437				case $GCC_VERSION in
20438				([12].*)
20439					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
20440
20441echo "${as_me:-configure}:20441: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
20442
20443					continue;;
20444				esac
20445				;;
20446			esac
20447			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
20448		fi
20449	done
20450	CFLAGS="$cf_save_CFLAGS"
20451fi
20452rm -rf conftest*
20453
20454fi
20455fi
20456
20457test "$disable_setuid" = yes &&
20458cat >>confdefs.h <<\EOF
20459#define DISABLE_SETUID 1
20460EOF
20461
20462test "$disable_setgid" = yes &&
20463cat >>confdefs.h <<\EOF
20464#define DISABLE_SETGID 1
20465EOF
20466
20467if test $disable_setuid = yes ; then
20468	MAY_SETUID="#"
20469	NOT_SETUID=
20470elif test $disable_setgid = yes ; then
20471	MAY_SETUID="#"
20472	NOT_SETUID=
20473else
20474	MAY_SETUID=
20475	NOT_SETUID="#"
20476fi
20477
20478###	remove from CPPFLAGS the optional features we define in xtermcfg.h
20479###	or other conflicting symbols that may be defined via imake:
20480for cf_def in \
20481	__STDC__ \
20482	ALLOWLOGGING \
20483	ALLOWLOGFILEEXEC \
20484	OPT_LUIT_PROG \
20485	OPT_WIDE_CHARS \
20486	SCROLLBAR_RIGHT \
20487	USE_TTY_GROUP \
20488	USE_UTEMPTER \
20489	XRENDERFONT
20490do
20491	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
20492done
20493
20494echo "$as_me:20494: checking if filesystem supports mixed-case filenames" >&5
20495echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
20496if test "${cf_cv_mixedcase+set}" = set; then
20497  echo $ECHO_N "(cached) $ECHO_C" >&6
20498else
20499
20500if test "$cross_compiling" = yes ; then
20501	case $target_alias in
20502	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
20503		cf_cv_mixedcase=no
20504		;;
20505	(*)
20506		cf_cv_mixedcase=yes
20507		;;
20508	esac
20509else
20510	rm -f conftest CONFTEST
20511	echo test >conftest
20512	if test -f CONFTEST ; then
20513		cf_cv_mixedcase=no
20514	else
20515		cf_cv_mixedcase=yes
20516	fi
20517	rm -f conftest CONFTEST
20518fi
20519
20520fi
20521echo "$as_me:20521: result: $cf_cv_mixedcase" >&5
20522echo "${ECHO_T}$cf_cv_mixedcase" >&6
20523test "$cf_cv_mixedcase" = yes &&
20524cat >>confdefs.h <<\EOF
20525#define MIXEDCASE_FILENAMES 1
20526EOF
20527
20528for ac_prog in exctags ctags
20529do
20530  # Extract the first word of "$ac_prog", so it can be a program name with args.
20531set dummy $ac_prog; ac_word=$2
20532echo "$as_me:20532: checking for $ac_word" >&5
20533echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20534if test "${ac_cv_prog_CTAGS+set}" = set; then
20535  echo $ECHO_N "(cached) $ECHO_C" >&6
20536else
20537  if test -n "$CTAGS"; then
20538  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
20539else
20540  ac_save_IFS=$IFS; IFS=$ac_path_separator
20541ac_dummy="$PATH"
20542for ac_dir in $ac_dummy; do
20543  IFS=$ac_save_IFS
20544  test -z "$ac_dir" && ac_dir=.
20545  $as_executable_p "$ac_dir/$ac_word" || continue
20546ac_cv_prog_CTAGS="$ac_prog"
20547echo "$as_me:20547: found $ac_dir/$ac_word" >&5
20548break
20549done
20550
20551fi
20552fi
20553CTAGS=$ac_cv_prog_CTAGS
20554if test -n "$CTAGS"; then
20555  echo "$as_me:20555: result: $CTAGS" >&5
20556echo "${ECHO_T}$CTAGS" >&6
20557else
20558  echo "$as_me:20558: result: no" >&5
20559echo "${ECHO_T}no" >&6
20560fi
20561
20562  test -n "$CTAGS" && break
20563done
20564
20565for ac_prog in exetags etags
20566do
20567  # Extract the first word of "$ac_prog", so it can be a program name with args.
20568set dummy $ac_prog; ac_word=$2
20569echo "$as_me:20569: checking for $ac_word" >&5
20570echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20571if test "${ac_cv_prog_ETAGS+set}" = set; then
20572  echo $ECHO_N "(cached) $ECHO_C" >&6
20573else
20574  if test -n "$ETAGS"; then
20575  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
20576else
20577  ac_save_IFS=$IFS; IFS=$ac_path_separator
20578ac_dummy="$PATH"
20579for ac_dir in $ac_dummy; do
20580  IFS=$ac_save_IFS
20581  test -z "$ac_dir" && ac_dir=.
20582  $as_executable_p "$ac_dir/$ac_word" || continue
20583ac_cv_prog_ETAGS="$ac_prog"
20584echo "$as_me:20584: found $ac_dir/$ac_word" >&5
20585break
20586done
20587
20588fi
20589fi
20590ETAGS=$ac_cv_prog_ETAGS
20591if test -n "$ETAGS"; then
20592  echo "$as_me:20592: result: $ETAGS" >&5
20593echo "${ECHO_T}$ETAGS" >&6
20594else
20595  echo "$as_me:20595: result: no" >&5
20596echo "${ECHO_T}no" >&6
20597fi
20598
20599  test -n "$ETAGS" && break
20600done
20601
20602# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
20603set dummy ${CTAGS:-ctags}; ac_word=$2
20604echo "$as_me:20604: checking for $ac_word" >&5
20605echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20606if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
20607  echo $ECHO_N "(cached) $ECHO_C" >&6
20608else
20609  if test -n "$MAKE_LOWER_TAGS"; then
20610  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
20611else
20612  ac_save_IFS=$IFS; IFS=$ac_path_separator
20613ac_dummy="$PATH"
20614for ac_dir in $ac_dummy; do
20615  IFS=$ac_save_IFS
20616  test -z "$ac_dir" && ac_dir=.
20617  $as_executable_p "$ac_dir/$ac_word" || continue
20618ac_cv_prog_MAKE_LOWER_TAGS="yes"
20619echo "$as_me:20619: found $ac_dir/$ac_word" >&5
20620break
20621done
20622
20623  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
20624fi
20625fi
20626MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
20627if test -n "$MAKE_LOWER_TAGS"; then
20628  echo "$as_me:20628: result: $MAKE_LOWER_TAGS" >&5
20629echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
20630else
20631  echo "$as_me:20631: result: no" >&5
20632echo "${ECHO_T}no" >&6
20633fi
20634
20635if test "$cf_cv_mixedcase" = yes ; then
20636	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
20637set dummy ${ETAGS:-etags}; ac_word=$2
20638echo "$as_me:20638: checking for $ac_word" >&5
20639echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20640if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
20641  echo $ECHO_N "(cached) $ECHO_C" >&6
20642else
20643  if test -n "$MAKE_UPPER_TAGS"; then
20644  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
20645else
20646  ac_save_IFS=$IFS; IFS=$ac_path_separator
20647ac_dummy="$PATH"
20648for ac_dir in $ac_dummy; do
20649  IFS=$ac_save_IFS
20650  test -z "$ac_dir" && ac_dir=.
20651  $as_executable_p "$ac_dir/$ac_word" || continue
20652ac_cv_prog_MAKE_UPPER_TAGS="yes"
20653echo "$as_me:20653: found $ac_dir/$ac_word" >&5
20654break
20655done
20656
20657  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
20658fi
20659fi
20660MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
20661if test -n "$MAKE_UPPER_TAGS"; then
20662  echo "$as_me:20662: result: $MAKE_UPPER_TAGS" >&5
20663echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
20664else
20665  echo "$as_me:20665: result: no" >&5
20666echo "${ECHO_T}no" >&6
20667fi
20668
20669else
20670	MAKE_UPPER_TAGS=no
20671fi
20672
20673if test "$MAKE_UPPER_TAGS" = yes ; then
20674	MAKE_UPPER_TAGS=
20675else
20676	MAKE_UPPER_TAGS="#"
20677fi
20678
20679if test "$MAKE_LOWER_TAGS" = yes ; then
20680	MAKE_LOWER_TAGS=
20681else
20682	MAKE_LOWER_TAGS="#"
20683fi
20684
20685LD_RPATH_OPT=
20686echo "$as_me:20686: checking for an rpath option" >&5
20687echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
20688case $cf_cv_system_name in
20689(irix*)
20690	if test "$GCC" = yes; then
20691		LD_RPATH_OPT="-Wl,-rpath,"
20692	else
20693		LD_RPATH_OPT="-rpath "
20694	fi
20695	;;
20696(linux*|gnu*|k*bsd*-gnu)
20697	LD_RPATH_OPT="-Wl,-rpath,"
20698	;;
20699(openbsd[2-9].*|mirbsd*)
20700	LD_RPATH_OPT="-Wl,-rpath,"
20701	;;
20702(dragonfly*|freebsd*)
20703	LD_RPATH_OPT="-rpath "
20704	;;
20705(netbsd*)
20706	LD_RPATH_OPT="-Wl,-rpath,"
20707	;;
20708(osf*|mls+*)
20709	LD_RPATH_OPT="-rpath "
20710	;;
20711(solaris2*)
20712	LD_RPATH_OPT="-R"
20713	;;
20714(*)
20715	;;
20716esac
20717echo "$as_me:20717: result: $LD_RPATH_OPT" >&5
20718echo "${ECHO_T}$LD_RPATH_OPT" >&6
20719
20720case "x$LD_RPATH_OPT" in
20721(x-R*)
20722	echo "$as_me:20722: checking if we need a space after rpath option" >&5
20723echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
20724	cf_save_LIBS="$LIBS"
20725
20726cf_add_libs="${LD_RPATH_OPT}$libdir"
20727# Filter out duplicates - this happens with badly-designed ".pc" files...
20728for cf_add_1lib in $LIBS
20729do
20730	for cf_add_2lib in $cf_add_libs
20731	do
20732		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20733		then
20734			cf_add_1lib=
20735			break
20736		fi
20737	done
20738	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20739done
20740LIBS="$cf_add_libs"
20741
20742	cat >conftest.$ac_ext <<_ACEOF
20743#line 20743 "configure"
20744#include "confdefs.h"
20745
20746int
20747main ()
20748{
20749
20750  ;
20751  return 0;
20752}
20753_ACEOF
20754rm -f conftest.$ac_objext conftest$ac_exeext
20755if { (eval echo "$as_me:20755: \"$ac_link\"") >&5
20756  (eval $ac_link) 2>&5
20757  ac_status=$?
20758  echo "$as_me:20758: \$? = $ac_status" >&5
20759  (exit $ac_status); } &&
20760         { ac_try='test -s conftest$ac_exeext'
20761  { (eval echo "$as_me:20761: \"$ac_try\"") >&5
20762  (eval $ac_try) 2>&5
20763  ac_status=$?
20764  echo "$as_me:20764: \$? = $ac_status" >&5
20765  (exit $ac_status); }; }; then
20766  cf_rpath_space=no
20767else
20768  echo "$as_me: failed program was:" >&5
20769cat conftest.$ac_ext >&5
20770cf_rpath_space=yes
20771fi
20772rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20773	LIBS="$cf_save_LIBS"
20774	echo "$as_me:20774: result: $cf_rpath_space" >&5
20775echo "${ECHO_T}$cf_rpath_space" >&6
20776	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
20777	;;
20778esac
20779
20780echo "$as_me:20780: checking if rpath-hack should be disabled" >&5
20781echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
20782
20783# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
20784if test "${enable_rpath_hack+set}" = set; then
20785  enableval="$enable_rpath_hack"
20786  test "$enableval" != no && enableval=yes
20787  if test "$enableval" != "yes" ; then
20788    cf_disable_rpath_hack=yes
20789  else
20790    cf_disable_rpath_hack=no
20791  fi
20792else
20793  enableval=yes
20794  cf_disable_rpath_hack=no
20795
20796fi;
20797echo "$as_me:20797: result: $cf_disable_rpath_hack" >&5
20798echo "${ECHO_T}$cf_disable_rpath_hack" >&6
20799if test "$cf_disable_rpath_hack" = no ; then
20800
20801echo "$as_me:20801: checking for updated LDFLAGS" >&5
20802echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
20803if test -n "$LD_RPATH_OPT" ; then
20804	echo "$as_me:20804: result: maybe" >&5
20805echo "${ECHO_T}maybe" >&6
20806
20807	for ac_prog in ldd
20808do
20809  # Extract the first word of "$ac_prog", so it can be a program name with args.
20810set dummy $ac_prog; ac_word=$2
20811echo "$as_me:20811: checking for $ac_word" >&5
20812echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
20813if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
20814  echo $ECHO_N "(cached) $ECHO_C" >&6
20815else
20816  if test -n "$cf_ldd_prog"; then
20817  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
20818else
20819  ac_save_IFS=$IFS; IFS=$ac_path_separator
20820ac_dummy="$PATH"
20821for ac_dir in $ac_dummy; do
20822  IFS=$ac_save_IFS
20823  test -z "$ac_dir" && ac_dir=.
20824  $as_executable_p "$ac_dir/$ac_word" || continue
20825ac_cv_prog_cf_ldd_prog="$ac_prog"
20826echo "$as_me:20826: found $ac_dir/$ac_word" >&5
20827break
20828done
20829
20830fi
20831fi
20832cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
20833if test -n "$cf_ldd_prog"; then
20834  echo "$as_me:20834: result: $cf_ldd_prog" >&5
20835echo "${ECHO_T}$cf_ldd_prog" >&6
20836else
20837  echo "$as_me:20837: result: no" >&5
20838echo "${ECHO_T}no" >&6
20839fi
20840
20841  test -n "$cf_ldd_prog" && break
20842done
20843test -n "$cf_ldd_prog" || cf_ldd_prog="no"
20844
20845	cf_rpath_list="/usr/lib /lib"
20846	if test "$cf_ldd_prog" != no
20847	then
20848		cf_rpath_oops=
20849
20850cat >conftest.$ac_ext <<_ACEOF
20851#line 20851 "configure"
20852#include "confdefs.h"
20853#include <stdio.h>
20854int
20855main ()
20856{
20857printf("Hello");
20858  ;
20859  return 0;
20860}
20861_ACEOF
20862rm -f conftest.$ac_objext conftest$ac_exeext
20863if { (eval echo "$as_me:20863: \"$ac_link\"") >&5
20864  (eval $ac_link) 2>&5
20865  ac_status=$?
20866  echo "$as_me:20866: \$? = $ac_status" >&5
20867  (exit $ac_status); } &&
20868         { ac_try='test -s conftest$ac_exeext'
20869  { (eval echo "$as_me:20869: \"$ac_try\"") >&5
20870  (eval $ac_try) 2>&5
20871  ac_status=$?
20872  echo "$as_me:20872: \$? = $ac_status" >&5
20873  (exit $ac_status); }; }; then
20874  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
20875		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
20876else
20877  echo "$as_me: failed program was:" >&5
20878cat conftest.$ac_ext >&5
20879fi
20880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20881
20882		# If we passed the link-test, but get a "not found" on a given library,
20883		# this could be due to inept reconfiguration of gcc to make it only
20884		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
20885		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
20886		# /usr/local libraries.
20887		if test -n "$cf_rpath_oops"
20888		then
20889			for cf_rpath_src in $cf_rpath_oops
20890			do
20891				for cf_rpath_dir in \
20892					/usr/local \
20893					/usr/pkg \
20894					/opt/sfw
20895				do
20896					if test -f $cf_rpath_dir/lib/$cf_rpath_src
20897					then
20898						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
20899
20900echo "${as_me:-configure}:20900: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
20901
20902						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
20903						break
20904					fi
20905				done
20906			done
20907		fi
20908	fi
20909
20910	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
20911
20912echo "${as_me:-configure}:20912: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
20913
20914test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
20915
20916echo "${as_me:-configure}:20916: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
20917
20918cf_rpath_dst=
20919for cf_rpath_src in $LDFLAGS
20920do
20921	case $cf_rpath_src in
20922	(-L*)
20923
20924		# check if this refers to a directory which we will ignore
20925		cf_rpath_skip=no
20926		if test -n "$cf_rpath_list"
20927		then
20928			for cf_rpath_item in $cf_rpath_list
20929			do
20930				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20931				then
20932					cf_rpath_skip=yes
20933					break
20934				fi
20935			done
20936		fi
20937
20938		if test "$cf_rpath_skip" = no
20939		then
20940			# transform the option
20941			if test "$LD_RPATH_OPT" = "-R " ; then
20942				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20943			else
20944				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20945			fi
20946
20947			# if we have not already added this, add it now
20948			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
20949			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
20950			then
20951				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
20952
20953echo "${as_me:-configure}:20953: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
20954
20955				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
20956			fi
20957		fi
20958		;;
20959	esac
20960	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
20961done
20962LDFLAGS=$cf_rpath_dst
20963
20964test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
20965
20966echo "${as_me:-configure}:20966: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
20967
20968test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
20969
20970echo "${as_me:-configure}:20970: testing ...checking LIBS $LIBS ..." 1>&5
20971
20972cf_rpath_dst=
20973for cf_rpath_src in $LIBS
20974do
20975	case $cf_rpath_src in
20976	(-L*)
20977
20978		# check if this refers to a directory which we will ignore
20979		cf_rpath_skip=no
20980		if test -n "$cf_rpath_list"
20981		then
20982			for cf_rpath_item in $cf_rpath_list
20983			do
20984				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
20985				then
20986					cf_rpath_skip=yes
20987					break
20988				fi
20989			done
20990		fi
20991
20992		if test "$cf_rpath_skip" = no
20993		then
20994			# transform the option
20995			if test "$LD_RPATH_OPT" = "-R " ; then
20996				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
20997			else
20998				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
20999			fi
21000
21001			# if we have not already added this, add it now
21002			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
21003			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
21004			then
21005				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
21006
21007echo "${as_me:-configure}:21007: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
21008
21009				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
21010			fi
21011		fi
21012		;;
21013	esac
21014	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
21015done
21016LIBS=$cf_rpath_dst
21017
21018test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
21019
21020echo "${as_me:-configure}:21020: testing ...checked LIBS $LIBS ..." 1>&5
21021
21022	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
21023
21024echo "${as_me:-configure}:21024: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
21025
21026else
21027	echo "$as_me:21027: result: no" >&5
21028echo "${ECHO_T}no" >&6
21029fi
21030
21031fi
21032
21033# Force plink.sh to not trim pcre's libraries, which have the same symbol
21034# names as the system regexp.
21035if test "$with_pcre" != no
21036then
21037	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
21038fi
21039
21040###	output xtermcfg.h, etc
21041ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
21042
21043cat >confcache <<\_ACEOF
21044# This file is a shell script that caches the results of configure
21045# tests run on this system so they can be shared between configure
21046# scripts and configure runs, see configure's option --config-cache.
21047# It is not useful on other systems.  If it contains results you don't
21048# want to keep, you may remove or edit it.
21049#
21050# config.status only pays attention to the cache file if you give it
21051# the --recheck option to rerun configure.
21052#
21053# `ac_cv_env_foo' variables (set or unset) will be overriden when
21054# loading this file, other *unset* `ac_cv_foo' will be assigned the
21055# following values.
21056
21057_ACEOF
21058
21059# The following way of writing the cache mishandles newlines in values,
21060# but we know of no workaround that is simple, portable, and efficient.
21061# So, don't put newlines in cache variables' values.
21062# Ultrix sh set writes to stderr and can't be redirected directly,
21063# and sets the high bit in the cache file unless we assign to the vars.
21064{
21065  (set) 2>&1 |
21066    case `(ac_space=' '; set | grep ac_space) 2>&1` in
21067    *ac_space=\ *)
21068      # `set' does not quote correctly, so add quotes (double-quote
21069      # substitution turns \\\\ into \\, and sed turns \\ into \).
21070      sed -n \
21071        "s/'/'\\\\''/g;
21072    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
21073      ;;
21074    *)
21075      # `set' quotes correctly as required by POSIX, so do not add quotes.
21076      sed -n \
21077        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
21078      ;;
21079    esac;
21080} |
21081  sed '
21082     t clear
21083     : clear
21084     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
21085     t end
21086     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
21087     : end' >>confcache
21088if cmp -s $cache_file confcache; then :; else
21089  if test -w $cache_file; then
21090    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
21091    cat confcache >$cache_file
21092  else
21093    echo "not updating unwritable cache $cache_file"
21094  fi
21095fi
21096rm -f confcache
21097
21098test "x$prefix" = xNONE && prefix=$ac_default_prefix
21099# Let make expand exec_prefix.
21100test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
21101
21102# VPATH may cause trouble with some makes, so we remove $(srcdir),
21103# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
21104# trailing colons and then remove the whole line if VPATH becomes empty
21105# (actually we leave an empty line to preserve line numbers).
21106if test "x$srcdir" = x.; then
21107  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
21108s/:*\$(srcdir):*/:/;
21109s/:*\${srcdir}:*/:/;
21110s/:*@srcdir@:*/:/;
21111s/^\([^=]*=[ 	]*\):*/\1/;
21112s/:*$//;
21113s/^[^=]*=[ 	]*$//;
21114}'
21115fi
21116
21117DEFS=-DHAVE_CONFIG_H
21118
21119: ${CONFIG_STATUS=./config.status}
21120ac_clean_files_save=$ac_clean_files
21121ac_clean_files="$ac_clean_files $CONFIG_STATUS"
21122{ echo "$as_me:21122: creating $CONFIG_STATUS" >&5
21123echo "$as_me: creating $CONFIG_STATUS" >&6;}
21124cat >$CONFIG_STATUS <<_ACEOF
21125#! $SHELL
21126# Generated automatically by configure.
21127# Run this file to recreate the current configuration.
21128# Compiler output produced by configure, useful for debugging
21129# configure, is in config.log if it exists.
21130
21131debug=false
21132SHELL=\${CONFIG_SHELL-$SHELL}
21133ac_cs_invocation="\$0 \$@"
21134
21135_ACEOF
21136
21137cat >>$CONFIG_STATUS <<\_ACEOF
21138# Be Bourne compatible
21139if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
21140  emulate sh
21141  NULLCMD=:
21142elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
21143  set -o posix
21144fi
21145
21146# Name of the executable.
21147as_me=`echo "$0" |sed 's,.*[\\/],,'`
21148
21149if expr a : '\(a\)' >/dev/null 2>&1; then
21150  as_expr=expr
21151else
21152  as_expr=false
21153fi
21154
21155rm -f conf$$ conf$$.exe conf$$.file
21156echo >conf$$.file
21157if ln -s conf$$.file conf$$ 2>/dev/null; then
21158  # We could just check for DJGPP; but this test a) works b) is more generic
21159  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
21160  if test -f conf$$.exe; then
21161    # Don't use ln at all; we don't have any links
21162    as_ln_s='cp -p'
21163  else
21164    as_ln_s='ln -s'
21165  fi
21166elif ln conf$$.file conf$$ 2>/dev/null; then
21167  as_ln_s=ln
21168else
21169  as_ln_s='cp -p'
21170fi
21171rm -f conf$$ conf$$.exe conf$$.file
21172
21173as_executable_p="test -f"
21174
21175# Support unset when possible.
21176if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
21177  as_unset=unset
21178else
21179  as_unset=false
21180fi
21181
21182# NLS nuisances.
21183$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
21184$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
21185$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
21186$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
21187$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
21188$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
21189$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
21190$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
21191
21192# IFS
21193# We need space, tab and new line, in precisely that order.
21194as_nl='
21195'
21196IFS=" 	$as_nl"
21197
21198# CDPATH.
21199$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
21200
21201exec 6>&1
21202
21203_ACEOF
21204
21205# Files that config.status was made for.
21206if test -n "$ac_config_files"; then
21207  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
21208fi
21209
21210if test -n "$ac_config_headers"; then
21211  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
21212fi
21213
21214if test -n "$ac_config_links"; then
21215  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
21216fi
21217
21218if test -n "$ac_config_commands"; then
21219  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
21220fi
21221
21222cat >>$CONFIG_STATUS <<\EOF
21223
21224ac_cs_usage="\
21225\`$as_me' instantiates files from templates according to the
21226current configuration.
21227
21228Usage: $0 [OPTIONS] [FILE]...
21229
21230  -h, --help       print this help, then exit
21231  -V, --version    print version number, then exit
21232  -d, --debug      don't remove temporary files
21233      --recheck    update $as_me by reconfiguring in the same conditions
21234  --file=FILE[:TEMPLATE]
21235                   instantiate the configuration file FILE
21236  --header=FILE[:TEMPLATE]
21237                   instantiate the configuration header FILE
21238
21239Configuration files:
21240$config_files
21241
21242Configuration headers:
21243$config_headers
21244
21245Report bugs to <dickey@invisible-island.net>."
21246EOF
21247
21248cat >>$CONFIG_STATUS <<EOF
21249ac_cs_version="\\
21250config.status
21251configured by $0, generated by GNU Autoconf 2.52.20141204,
21252  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
21253
21254Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
21255Free Software Foundation, Inc.
21256This config.status script is free software; the Free Software Foundation
21257gives unlimited permission to copy, distribute and modify it."
21258srcdir=$srcdir
21259INSTALL="$INSTALL"
21260EOF
21261
21262cat >>$CONFIG_STATUS <<\EOF
21263# If no file are specified by the user, then we need to provide default
21264# value.  By we need to know if files were specified by the user.
21265ac_need_defaults=:
21266while test $# != 0
21267do
21268  case $1 in
21269  --*=*)
21270    ac_option=`expr "x$1" : 'x\([^=]*\)='`
21271    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
21272    shift
21273    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
21274    shift
21275    ;;
21276  -*);;
21277  *) # This is not an option, so the user has probably given explicit
21278     # arguments.
21279     ac_need_defaults=false;;
21280  esac
21281
21282  case $1 in
21283  # Handling of the options.
21284EOF
21285cat >>$CONFIG_STATUS <<EOF
21286  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
21287    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
21288    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
21289EOF
21290cat >>$CONFIG_STATUS <<\EOF
21291  --version | --vers* | -V )
21292    echo "$ac_cs_version"; exit 0 ;;
21293  --he | --h)
21294    # Conflict between --help and --header
21295    { { echo "$as_me:21295: error: ambiguous option: $1
21296Try \`$0 --help' for more information." >&5
21297echo "$as_me: error: ambiguous option: $1
21298Try \`$0 --help' for more information." >&2;}
21299   { (exit 1); exit 1; }; };;
21300  --help | --hel | -h )
21301    echo "$ac_cs_usage"; exit 0 ;;
21302  --debug | --d* | -d )
21303    debug=: ;;
21304  --file | --fil | --fi | --f )
21305    shift
21306    CONFIG_FILES="$CONFIG_FILES $1"
21307    ac_need_defaults=false;;
21308  --header | --heade | --head | --hea )
21309    shift
21310    CONFIG_HEADERS="$CONFIG_HEADERS $1"
21311    ac_need_defaults=false;;
21312
21313  # This is an error.
21314  -*) { { echo "$as_me:21314: error: unrecognized option: $1
21315Try \`$0 --help' for more information." >&5
21316echo "$as_me: error: unrecognized option: $1
21317Try \`$0 --help' for more information." >&2;}
21318   { (exit 1); exit 1; }; } ;;
21319
21320  *) ac_config_targets="$ac_config_targets $1" ;;
21321
21322  esac
21323  shift
21324done
21325
21326exec 5>>config.log
21327cat >&5 << _ACEOF
21328
21329## ----------------------- ##
21330## Running config.status.  ##
21331## ----------------------- ##
21332
21333This file was extended by $as_me 2.52.20141204, executed with
21334  CONFIG_FILES    = $CONFIG_FILES
21335  CONFIG_HEADERS  = $CONFIG_HEADERS
21336  CONFIG_LINKS    = $CONFIG_LINKS
21337  CONFIG_COMMANDS = $CONFIG_COMMANDS
21338  > $ac_cs_invocation
21339on `(hostname || uname -n) 2>/dev/null | sed 1q`
21340
21341_ACEOF
21342EOF
21343
21344cat >>$CONFIG_STATUS <<\EOF
21345for ac_config_target in $ac_config_targets
21346do
21347  case "$ac_config_target" in
21348  # Handling of arguments.
21349  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
21350  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
21351  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
21352  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
21353  *) { { echo "$as_me:21353: error: invalid argument: $ac_config_target" >&5
21354echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
21355   { (exit 1); exit 1; }; };;
21356  esac
21357done
21358
21359# If the user did not use the arguments to specify the items to instantiate,
21360# then the envvar interface is used.  Set only those that are not.
21361# We use the long form for the default assignment because of an extremely
21362# bizarre bug on SunOS 4.1.3.
21363if $ac_need_defaults; then
21364  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
21365  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
21366fi
21367
21368# Create a temporary directory, and hook for its removal unless debugging.
21369$debug ||
21370{
21371  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
21372  trap '{ (exit 1); exit 1; }' 1 2 13 15
21373}
21374
21375# Create a (secure) tmp directory for tmp files.
21376: ${TMPDIR=/tmp}
21377{
21378  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
21379  test -n "$tmp" && test -d "$tmp"
21380}  ||
21381{
21382  tmp=$TMPDIR/cs$$-$RANDOM
21383  (umask 077 && mkdir $tmp)
21384} ||
21385{
21386   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
21387   { (exit 1); exit 1; }
21388}
21389
21390EOF
21391
21392cat >>$CONFIG_STATUS <<EOF
21393
21394#
21395# CONFIG_FILES section.
21396#
21397
21398# No need to generate the scripts if there are no CONFIG_FILES.
21399# This happens for instance when ./config.status config.h
21400if test -n "\$CONFIG_FILES"; then
21401  # Protect against being on the right side of a sed subst in config.status.
21402  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
21403   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
21404s,@SHELL@,$SHELL,;t t
21405s,@exec_prefix@,$exec_prefix,;t t
21406s,@prefix@,$prefix,;t t
21407s,@program_transform_name@,$program_transform_name,;t t
21408s,@bindir@,$bindir,;t t
21409s,@sbindir@,$sbindir,;t t
21410s,@libexecdir@,$libexecdir,;t t
21411s,@datarootdir@,$datarootdir,;t t
21412s,@datadir@,$datadir,;t t
21413s,@sysconfdir@,$sysconfdir,;t t
21414s,@sharedstatedir@,$sharedstatedir,;t t
21415s,@localstatedir@,$localstatedir,;t t
21416s,@libdir@,$libdir,;t t
21417s,@includedir@,$includedir,;t t
21418s,@oldincludedir@,$oldincludedir,;t t
21419s,@infodir@,$infodir,;t t
21420s,@mandir@,$mandir,;t t
21421s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
21422s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
21423s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
21424s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
21425s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
21426s,@build_alias@,$build_alias,;t t
21427s,@host_alias@,$host_alias,;t t
21428s,@target_alias@,$target_alias,;t t
21429s,@ECHO_C@,$ECHO_C,;t t
21430s,@ECHO_N@,$ECHO_N,;t t
21431s,@ECHO_T@,$ECHO_T,;t t
21432s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
21433s,@DEFS@,$DEFS,;t t
21434s,@LIBS@,$LIBS,;t t
21435s,@build@,$build,;t t
21436s,@build_cpu@,$build_cpu,;t t
21437s,@build_vendor@,$build_vendor,;t t
21438s,@build_os@,$build_os,;t t
21439s,@host@,$host,;t t
21440s,@host_cpu@,$host_cpu,;t t
21441s,@host_vendor@,$host_vendor,;t t
21442s,@host_os@,$host_os,;t t
21443s,@CC@,$CC,;t t
21444s,@CFLAGS@,$CFLAGS,;t t
21445s,@LDFLAGS@,$LDFLAGS,;t t
21446s,@CPPFLAGS@,$CPPFLAGS,;t t
21447s,@ac_ct_CC@,$ac_ct_CC,;t t
21448s,@EXEEXT@,$EXEEXT,;t t
21449s,@OBJEXT@,$OBJEXT,;t t
21450s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
21451s,@CPP@,$CPP,;t t
21452s,@AWK@,$AWK,;t t
21453s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
21454s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
21455s,@INSTALL_DATA@,$INSTALL_DATA,;t t
21456s,@LN_S@,$LN_S,;t t
21457s,@LINT@,$LINT,;t t
21458s,@APP_CLASS@,$APP_CLASS,;t t
21459s,@APPSDIR@,$APPSDIR,;t t
21460s,@no_appsdir@,$no_appsdir,;t t
21461s,@ICON_NAME@,$ICON_NAME,;t t
21462s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
21463s,@PIXMAPDIR@,$PIXMAPDIR,;t t
21464s,@no_pixmapdir@,$no_pixmapdir,;t t
21465s,@ICONDIR@,$ICONDIR,;t t
21466s,@no_icondir@,$no_icondir,;t t
21467s,@ICON_FORMAT@,$ICON_FORMAT,;t t
21468s,@ICON_THEME@,$ICON_THEME,;t t
21469s,@ICON_LIST@,$ICON_LIST,;t t
21470s,@desktop_utils@,$desktop_utils,;t t
21471s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
21472s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
21473s,@XTERM_PATH@,$XTERM_PATH,;t t
21474s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
21475s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
21476s,@X_CFLAGS@,$X_CFLAGS,;t t
21477s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
21478s,@X_LIBS@,$X_LIBS,;t t
21479s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
21480s,@PKG_CONFIG@,$PKG_CONFIG,;t t
21481s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
21482s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
21483s,@IMAKE@,$IMAKE,;t t
21484s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
21485s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
21486s,@GROFF_PATH@,$GROFF_PATH,;t t
21487s,@GROFF_NOTE@,$GROFF_NOTE,;t t
21488s,@NROFF_NOTE@,$NROFF_NOTE,;t t
21489s,@cf_man2html@,$cf_man2html,;t t
21490s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
21491s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
21492s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
21493s,@default_termid@,$default_termid,;t t
21494s,@default_TERM@,$default_TERM,;t t
21495s,@backarrow_is_bs@,$backarrow_is_bs,;t t
21496s,@backarrow_is_erase@,$backarrow_is_erase,;t t
21497s,@delete_is_del@,$delete_is_del,;t t
21498s,@initial_erase@,$initial_erase,;t t
21499s,@alt_sends_esc@,$alt_sends_esc,;t t
21500s,@meta_sends_esc@,$meta_sends_esc,;t t
21501s,@cf_tic_prog@,$cf_tic_prog,;t t
21502s,@no_ticprog@,$no_ticprog,;t t
21503s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
21504s,@SET_TERMINFO@,$SET_TERMINFO,;t t
21505s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
21506s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
21507s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
21508s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
21509s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
21510s,@LUIT@,$LUIT,;t t
21511s,@ECHO_LT@,$ECHO_LT,;t t
21512s,@ECHO_LD@,$ECHO_LD,;t t
21513s,@RULE_CC@,$RULE_CC,;t t
21514s,@SHOW_CC@,$SHOW_CC,;t t
21515s,@ECHO_CC@,$ECHO_CC,;t t
21516s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
21517s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
21518s,@EXTRAHDRS@,$EXTRAHDRS,;t t
21519s,@EXTRASRCS@,$EXTRASRCS,;t t
21520s,@EXTRAOBJS@,$EXTRAOBJS,;t t
21521s,@MAY_SETUID@,$MAY_SETUID,;t t
21522s,@NOT_SETUID@,$NOT_SETUID,;t t
21523s,@CTAGS@,$CTAGS,;t t
21524s,@ETAGS@,$ETAGS,;t t
21525s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
21526s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
21527s,@cf_ldd_prog@,$cf_ldd_prog,;t t
21528s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
21529CEOF
21530
21531EOF
21532
21533  cat >>$CONFIG_STATUS <<\EOF
21534  # Split the substitutions into bite-sized pieces for seds with
21535  # small command number limits, like on Digital OSF/1 and HP-UX.
21536  ac_max_sed_lines=48
21537  ac_sed_frag=1 # Number of current file.
21538  ac_beg=1 # First line for current file.
21539  ac_end=$ac_max_sed_lines # Line after last line for current file.
21540  ac_more_lines=:
21541  ac_sed_cmds=
21542  while $ac_more_lines; do
21543    if test $ac_beg -gt 1; then
21544      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21545    else
21546      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
21547    fi
21548    if test ! -s $tmp/subs.frag; then
21549      ac_more_lines=false
21550    else
21551      # The purpose of the label and of the branching condition is to
21552      # speed up the sed processing (if there are no `@' at all, there
21553      # is no need to browse any of the substitutions).
21554      # These are the two extra sed commands mentioned above.
21555      (echo ':t
21556  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
21557      if test -z "$ac_sed_cmds"; then
21558  	ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
21559      else
21560  	ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
21561      fi
21562      ac_sed_frag=`expr $ac_sed_frag + 1`
21563      ac_beg=$ac_end
21564      ac_end=`expr $ac_end + $ac_max_sed_lines`
21565    fi
21566  done
21567  if test -z "$ac_sed_cmds"; then
21568    ac_sed_cmds=cat
21569  fi
21570fi # test -n "$CONFIG_FILES"
21571
21572EOF
21573cat >>$CONFIG_STATUS <<\EOF
21574for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
21575  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21576  case $ac_file in
21577  - | *:- | *:-:* ) # input from stdin
21578        cat >$tmp/stdin
21579        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21580        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21581  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21582        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21583  * )   ac_file_in=$ac_file.in ;;
21584  esac
21585
21586  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
21587  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21588         X"$ac_file" : 'X\(//\)[^/]' \| \
21589         X"$ac_file" : 'X\(//\)$' \| \
21590         X"$ac_file" : 'X\(/\)' \| \
21591         .     : '\(.\)' 2>/dev/null ||
21592echo X"$ac_file" |
21593    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21594  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21595  	  /^X\(\/\/\)$/{ s//\1/; q; }
21596  	  /^X\(\/\).*/{ s//\1/; q; }
21597  	  s/.*/./; q'`
21598  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21599    { case "$ac_dir" in
21600  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21601  *)                      as_incr_dir=.;;
21602esac
21603as_dummy="$ac_dir"
21604for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21605  case $as_mkdir_dir in
21606    # Skip DOS drivespec
21607    ?:) as_incr_dir=$as_mkdir_dir ;;
21608    *)
21609      as_incr_dir=$as_incr_dir/$as_mkdir_dir
21610      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21611    ;;
21612  esac
21613done; }
21614
21615    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
21616    # A "../" for each directory in $ac_dir_suffix.
21617    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
21618  else
21619    ac_dir_suffix= ac_dots=
21620  fi
21621
21622  case $srcdir in
21623  .)  ac_srcdir=.
21624      if test -z "$ac_dots"; then
21625         ac_top_srcdir=.
21626      else
21627         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
21628      fi ;;
21629  [\\/]* | ?:[\\/]* )
21630      ac_srcdir=$srcdir$ac_dir_suffix;
21631      ac_top_srcdir=$srcdir ;;
21632  *) # Relative path.
21633    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
21634    ac_top_srcdir=$ac_dots$srcdir ;;
21635  esac
21636
21637  case $INSTALL in
21638  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
21639  *) ac_INSTALL=$ac_dots$INSTALL ;;
21640  esac
21641
21642  if test x"$ac_file" != x-; then
21643    { echo "$as_me:21643: creating $ac_file" >&5
21644echo "$as_me: creating $ac_file" >&6;}
21645    rm -f "$ac_file"
21646  fi
21647  # Let's still pretend it is `configure' which instantiates (i.e., don't
21648  # use $as_me), people would be surprised to read:
21649  #    /* config.h.  Generated automatically by config.status.  */
21650  configure_input="Generated automatically from `echo $ac_file_in |
21651                                                 sed 's,.*/,,'` by configure."
21652
21653  # First look for the input files in the build tree, otherwise in the
21654  # src tree.
21655  ac_file_inputs=`IFS=:
21656    for f in $ac_file_in; do
21657      case $f in
21658      -) echo $tmp/stdin ;;
21659      [\\/$]*)
21660         # Absolute (can't be DOS-style, as IFS=:)
21661         test -f "$f" || { { echo "$as_me:21661: error: cannot find input file: $f" >&5
21662echo "$as_me: error: cannot find input file: $f" >&2;}
21663   { (exit 1); exit 1; }; }
21664         echo $f;;
21665      *) # Relative
21666         if test -f "$f"; then
21667           # Build tree
21668           echo $f
21669         elif test -f "$srcdir/$f"; then
21670           # Source tree
21671           echo $srcdir/$f
21672         else
21673           # /dev/null tree
21674           { { echo "$as_me:21674: error: cannot find input file: $f" >&5
21675echo "$as_me: error: cannot find input file: $f" >&2;}
21676   { (exit 1); exit 1; }; }
21677         fi;;
21678      esac
21679    done` || { (exit 1); exit 1; }
21680EOF
21681cat >>$CONFIG_STATUS <<\EOF
21682  ac_warn_datarootdir=no
21683  if test x"$ac_file" != x-; then
21684    for ac_item in $ac_file_inputs
21685    do
21686      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
21687      if test -n "$ac_seen"; then
21688        ac_used=`grep '@datarootdir@' $ac_item`
21689        if test -z "$ac_used"; then
21690          { echo "$as_me:21690: WARNING: datarootdir was used implicitly but not set:
21691$ac_seen" >&5
21692echo "$as_me: WARNING: datarootdir was used implicitly but not set:
21693$ac_seen" >&2;}
21694          ac_warn_datarootdir=yes
21695        fi
21696      fi
21697      ac_seen=`grep '${datarootdir}' $ac_item`
21698      if test -n "$ac_seen"; then
21699        { echo "$as_me:21699: WARNING: datarootdir was used explicitly but not set:
21700$ac_seen" >&5
21701echo "$as_me: WARNING: datarootdir was used explicitly but not set:
21702$ac_seen" >&2;}
21703        ac_warn_datarootdir=yes
21704      fi
21705    done
21706  fi
21707
21708if test "x$ac_warn_datarootdir" = xyes; then
21709  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
21710fi
21711
21712EOF
21713cat >>$CONFIG_STATUS <<EOF
21714  sed "$ac_vpsub
21715$extrasub
21716EOF
21717cat >>$CONFIG_STATUS <<\EOF
21718:t
21719/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
21720s,@configure_input@,$configure_input,;t t
21721s,@srcdir@,$ac_srcdir,;t t
21722s,@top_srcdir@,$ac_top_srcdir,;t t
21723s,@INSTALL@,$ac_INSTALL,;t t
21724" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
21725  rm -f $tmp/stdin
21726  if test x"$ac_file" != x-; then
21727    cp $tmp/out $ac_file
21728
21729    for ac_name in prefix exec_prefix datarootdir
21730    do
21731        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
21732        if test -n "$ac_seen"; then
21733            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
21734            if test -z "$ac_init"; then
21735              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
21736              { echo "$as_me:21736: WARNING: Variable $ac_name is used but was not set:
21737$ac_seen" >&5
21738echo "$as_me: WARNING: Variable $ac_name is used but was not set:
21739$ac_seen" >&2;}
21740            fi
21741        fi
21742    done
21743    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
21744    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
21745    if test -s $tmp/out; then
21746      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
21747      { echo "$as_me:21747: WARNING: Some variables may not be substituted:
21748$ac_seen" >&5
21749echo "$as_me: WARNING: Some variables may not be substituted:
21750$ac_seen" >&2;}
21751    fi
21752  else
21753    cat $tmp/out
21754  fi
21755  rm -f $tmp/out
21756
21757done
21758EOF
21759cat >>$CONFIG_STATUS <<\EOF
21760
21761#
21762# CONFIG_HEADER section.
21763#
21764
21765# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
21766# NAME is the cpp macro being defined and VALUE is the value it is being given.
21767#
21768# ac_d sets the value in "#define NAME VALUE" lines.
21769ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
21770ac_dB='[ 	].*$,\1#\2'
21771ac_dC=' '
21772ac_dD=',;t'
21773# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
21774ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
21775ac_iB='\([ 	]\),\1#\2define\3'
21776ac_iC=' '
21777ac_iD='\4,;t'
21778# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
21779ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
21780ac_uB='$,\1#\2define\3'
21781ac_uC=' '
21782ac_uD=',;t'
21783
21784for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
21785  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
21786  case $ac_file in
21787  - | *:- | *:-:* ) # input from stdin
21788        cat >$tmp/stdin
21789        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21790        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21791  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
21792        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
21793  * )   ac_file_in=$ac_file.in ;;
21794  esac
21795
21796  test x"$ac_file" != x- && { echo "$as_me:21796: creating $ac_file" >&5
21797echo "$as_me: creating $ac_file" >&6;}
21798
21799  # First look for the input files in the build tree, otherwise in the
21800  # src tree.
21801  ac_file_inputs=`IFS=:
21802    for f in $ac_file_in; do
21803      case $f in
21804      -) echo $tmp/stdin ;;
21805      [\\/$]*)
21806         # Absolute (can't be DOS-style, as IFS=:)
21807         test -f "$f" || { { echo "$as_me:21807: error: cannot find input file: $f" >&5
21808echo "$as_me: error: cannot find input file: $f" >&2;}
21809   { (exit 1); exit 1; }; }
21810         echo $f;;
21811      *) # Relative
21812         if test -f "$f"; then
21813           # Build tree
21814           echo $f
21815         elif test -f "$srcdir/$f"; then
21816           # Source tree
21817           echo $srcdir/$f
21818         else
21819           # /dev/null tree
21820           { { echo "$as_me:21820: error: cannot find input file: $f" >&5
21821echo "$as_me: error: cannot find input file: $f" >&2;}
21822   { (exit 1); exit 1; }; }
21823         fi;;
21824      esac
21825    done` || { (exit 1); exit 1; }
21826  # Remove the trailing spaces.
21827  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
21828
21829EOF
21830
21831# Transform confdefs.h into two sed scripts, `conftest.defines' and
21832# `conftest.undefs', that substitutes the proper values into
21833# config.h.in to produce config.h.  The first handles `#define'
21834# templates, and the second `#undef' templates.
21835# And first: Protect against being on the right side of a sed subst in
21836# config.status.  Protect against being in an unquoted here document
21837# in config.status.
21838rm -f conftest.defines conftest.undefs
21839# Using a here document instead of a string reduces the quoting nightmare.
21840# Putting comments in sed scripts is not portable.
21841#
21842# `end' is used to avoid that the second main sed command (meant for
21843# 0-ary CPP macros) applies to n-ary macro definitions.
21844# See the Autoconf documentation for `clear'.
21845cat >confdef2sed.sed <<\EOF
21846s/[\\&,]/\\&/g
21847s,[\\$`],\\&,g
21848t clear
21849: clear
21850s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
21851t end
21852s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
21853: end
21854EOF
21855# If some macros were called several times there might be several times
21856# the same #defines, which is useless.  Nevertheless, we may not want to
21857# sort them, since we want the *last* AC-DEFINE to be honored.
21858uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
21859sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
21860sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
21861rm -f confdef2sed.sed
21862
21863# This sed command replaces #undef with comments.  This is necessary, for
21864# example, in the case of _POSIX_SOURCE, which is predefined and required
21865# on some systems where configure will not decide to define it.
21866cat >>conftest.undefs <<\EOF
21867s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
21868EOF
21869
21870# Break up conftest.defines because some shells have a limit on the size
21871# of here documents, and old seds have small limits too (100 cmds).
21872echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
21873echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
21874echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
21875echo '  :' >>$CONFIG_STATUS
21876rm -f conftest.tail
21877while grep . conftest.defines >/dev/null
21878do
21879  # Write a limited-size here document to $tmp/defines.sed.
21880  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
21881  # Speed up: don't consider the non `#define' lines.
21882  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
21883  # Work around the forget-to-reset-the-flag bug.
21884  echo 't clr' >>$CONFIG_STATUS
21885  echo ': clr' >>$CONFIG_STATUS
21886  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
21887  echo 'CEOF
21888  sed -f $tmp/defines.sed $tmp/in >$tmp/out
21889  rm -f $tmp/in
21890  mv $tmp/out $tmp/in
21891' >>$CONFIG_STATUS
21892  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
21893  rm -f conftest.defines
21894  mv conftest.tail conftest.defines
21895done
21896rm -f conftest.defines
21897echo '  fi # egrep' >>$CONFIG_STATUS
21898echo >>$CONFIG_STATUS
21899
21900# Break up conftest.undefs because some shells have a limit on the size
21901# of here documents, and old seds have small limits too (100 cmds).
21902echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
21903rm -f conftest.tail
21904while grep . conftest.undefs >/dev/null
21905do
21906  # Write a limited-size here document to $tmp/undefs.sed.
21907  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
21908  # Speed up: don't consider the non `#undef'
21909  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
21910  # Work around the forget-to-reset-the-flag bug.
21911  echo 't clr' >>$CONFIG_STATUS
21912  echo ': clr' >>$CONFIG_STATUS
21913  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
21914  echo 'CEOF
21915  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
21916  rm -f $tmp/in
21917  mv $tmp/out $tmp/in
21918' >>$CONFIG_STATUS
21919  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
21920  rm -f conftest.undefs
21921  mv conftest.tail conftest.undefs
21922done
21923rm -f conftest.undefs
21924
21925cat >>$CONFIG_STATUS <<\EOF
21926  # Let's still pretend it is `configure' which instantiates (i.e., don't
21927  # use $as_me), people would be surprised to read:
21928  #    /* config.h.  Generated automatically by config.status.  */
21929  if test x"$ac_file" = x-; then
21930    echo "/* Generated automatically by configure.  */" >$tmp/config.h
21931  else
21932    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
21933  fi
21934  cat $tmp/in >>$tmp/config.h
21935  rm -f $tmp/in
21936  if test x"$ac_file" != x-; then
21937    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
21938      { echo "$as_me:21938: $ac_file is unchanged" >&5
21939echo "$as_me: $ac_file is unchanged" >&6;}
21940    else
21941      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
21942         X"$ac_file" : 'X\(//\)[^/]' \| \
21943         X"$ac_file" : 'X\(//\)$' \| \
21944         X"$ac_file" : 'X\(/\)' \| \
21945         .     : '\(.\)' 2>/dev/null ||
21946echo X"$ac_file" |
21947    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
21948  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
21949  	  /^X\(\/\/\)$/{ s//\1/; q; }
21950  	  /^X\(\/\).*/{ s//\1/; q; }
21951  	  s/.*/./; q'`
21952      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
21953        { case "$ac_dir" in
21954  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
21955  *)                      as_incr_dir=.;;
21956esac
21957as_dummy="$ac_dir"
21958for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
21959  case $as_mkdir_dir in
21960    # Skip DOS drivespec
21961    ?:) as_incr_dir=$as_mkdir_dir ;;
21962    *)
21963      as_incr_dir=$as_incr_dir/$as_mkdir_dir
21964      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
21965    ;;
21966  esac
21967done; }
21968
21969      fi
21970      rm -f $ac_file
21971      mv $tmp/config.h $ac_file
21972    fi
21973  else
21974    cat $tmp/config.h
21975    rm -f $tmp/config.h
21976  fi
21977done
21978EOF
21979
21980cat >>$CONFIG_STATUS <<\EOF
21981
21982{ (exit 0); exit 0; }
21983EOF
21984chmod +x $CONFIG_STATUS
21985ac_clean_files=$ac_clean_files_save
21986
21987# configure is writing to config.log, and then calls config.status.
21988# config.status does its own redirection, appending to config.log.
21989# Unfortunately, on DOS this fails, as config.log is still kept open
21990# by configure, so config.status won't be able to write to it; its
21991# output is simply discarded.  So we exec the FD to /dev/null,
21992# effectively closing config.log, so it can be properly (re)opened and
21993# appended to by config.status.  When coming back to configure, we
21994# need to make the FD available again.
21995if test "$no_create" != yes; then
21996  ac_cs_success=:
21997  exec 5>/dev/null
21998  $SHELL $CONFIG_STATUS || ac_cs_success=false
21999  exec 5>>config.log
22000  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22001  # would make configure fail if this is the last instruction.
22002  $ac_cs_success || { (exit 1); exit 1; }
22003fi
22004
22005