configure revision 913cc679
1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20170501.
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  --without-xinerama      do not use Xinerama extension for multiscreen support
717  --with-Xaw3d            link with Xaw 3d library
718  --with-Xaw3dxft         link with Xaw 3d xft library
719  --with-neXtaw           link with neXT Athena library
720  --with-XawPlus          link with Athena-Plus library
721  --enable-narrowproto    enable narrow prototypes for X libraries
722  --disable-imake         disable use of imake for definitions
723  --with-man2html=XXX     use XXX rather than groff
724Terminal Configuration:
725  --with-terminal-id=V    set default decTerminalID (default: vt420)
726  --with-terminal-type=T  set default $TERM (default: xterm)
727  --enable-backarrow-key  set default backarrowKey resource (default: true)
728  --enable-backarrow-is-erase set default backarrowKeyIsErase resource (default: false)
729  --enable-delete-is-del  set default deleteIsDEL resource (default: maybe)
730  --enable-pty-erase      set default ptyInitialErase resource (default: maybe)
731  --enable-alt-sends-esc  set default altSendsEscape resource (default: no)
732  --enable-meta-sends-esc set default metaSendsEscape resource (default: no)
733  --with-own-terminfo=P   set default $TERMINFO (default: from environment)
734  --enable-env-terminfo   setenv $TERMINFO if --with-own-terminfo gives value
735Optional Features:
736  --disable-active-icon   disable X11R6.3 active-icon feature
737  --disable-ansi-color    disable ANSI color
738  --disable-16-color      disable 16-color support
739  --enable-256-color      enable 256-color support
740  --enable-88-color       enable 88-color support
741  --disable-blink-cursor  disable support for blinking cursor
742  --enable-broken-osc     allow broken Linux OSC-strings
743  --disable-broken-st     disallow broken string-terminators
744  --enable-builtin-xpms   compile-in icon data
745  --disable-c1-print      disallow -k8 option for printable 128-159
746  --disable-bold-color    disable PC-style mapping of bold colors
747  --disable-color-class   disable separate color class resources
748  --disable-color-mode    disable default colorMode resource
749  --disable-highlighting  disable support for color highlighting
750  --disable-doublechars   disable support for double-size chars
751  --disable-boxchars      disable fallback-support for box chars
752  --enable-exec-xterm     enable "spawn-new-terminal" action
753  --enable-double-buffer  enable double-buffering
754  --disable-freetype      disable freetype library-support
755  --with-freetype-config  configure script to use for FreeType
756  --with-freetype-cflags  -D/-I options for compiling with FreeType
757  --with-freetype-libs    -L/-l options to link FreeType
758  --enable-hp-fkeys       enable support for HP-style function keys
759  --enable-sco-fkeys      enable support for SCO-style function keys
760  --disable-sun-fkeys     disable support for Sun-style function keys
761  --disable-fifo-lines    disable FIFO-storage for saved-lines
762  --disable-i18n          disable internationalization
763  --disable-initial-erase disable setup for stty erase
764  --disable-input-method  disable input-method
765  --enable-load-vt-fonts  enable load-vt-fonts() action
766  --enable-logging        enable logging
767  --enable-logfile-exec   enable exec'd logfile filter
768  --disable-maximize      disable actions for iconify/deiconify/maximize/restore
769  --disable-num-lock      disable NumLock keypad support
770  --disable-paste64       disable get/set base64 selection data
771  --disable-pty-handshake disable pty-handshake support
772  --enable-readline-mouse enable support for mouse in readline applications
773  --disable-regex         disable regular-expression selections
774  --with-pcre             use PCRE for regular-expressions
775  --disable-rightbar      disable right-scrollbar support
776  --disable-samename      disable check for redundant name-change
777  --disable-selection-ops disable selection-action operations
778  --disable-session-mgt   disable support for session management
779  --disable-tcap-fkeys    disable termcap function-keys support
780  --disable-tcap-query    disable compiled-in termcap-query support
781  --disable-tek4014       disable tek4014 emulation
782  --enable-toolbar        compile-in toolbar for pulldown menus
783  --disable-vt52          disable VT52 emulation
784  --disable-wide-attrs    disable wide-attribute support
785  --disable-wide-chars    disable wide-character support
786  --enable-16bit-chars    enable 16-bit character support
787  --enable-mini-luit      enable mini-luit (built-in Latin9 support)
788  --disable-luit          enable luit filter (Unicode translation)
789  --enable-dabbrev        enable dynamic-abbreviation support
790  --enable-dec-locator    enable DECterm Locator support
791  --enable-screen-dumps   enable XHTML and SVG screen dumps
792  --enable-regis-graphics enable ReGIS graphics support
793  --enable-sixel-graphics enable sixel graphics support
794  --disable-rectangles    disable VT420 rectangle support
795  --disable-ziconbeep     disable -ziconbeep option
796Testing/development Options:
797  --enable-trace          test: set to enable debugging traces
798  --with-dmalloc          test: use Gray Watson's dmalloc library
799  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
800  --with-valgrind         test: use valgrind
801  --disable-leaks         test: free permanent memory, analyze leaks
802  --disable-echo          do not display "compiling" commands
803  --enable-xmc-glitch     test: enable xmc magic-cookie emulation
804  --enable-warnings       test: turn on GCC compiler warnings
805  --disable-rpath-hack    don't add rpath options for additional libraries
806
807Some influential environment variables:
808  CC          C compiler command
809  CFLAGS      C compiler flags
810  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
811              nonstandard directory <lib dir>
812  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
813              headers in a nonstandard directory <include dir>
814  CPP         C preprocessor
815
816Use these variables to override the choices made by `configure' or to help
817it to find libraries and programs with nonstandard names/locations.
818
819EOF
820fi
821
822if test "$ac_init_help" = "recursive"; then
823  # If there are subdirs, report their specific --help.
824  ac_popdir=`pwd`
825  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
826    cd $ac_subdir
827    # A "../" for each directory in /$ac_subdir.
828    ac_dots=`echo $ac_subdir |
829             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
830
831    case $srcdir in
832    .) # No --srcdir option.  We are building in place.
833      ac_sub_srcdir=$srcdir ;;
834    [\\/]* | ?:[\\/]* ) # Absolute path.
835      ac_sub_srcdir=$srcdir/$ac_subdir ;;
836    *) # Relative path.
837      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
838    esac
839
840    # Check for guested configure; otherwise get Cygnus style configure.
841    if test -f $ac_sub_srcdir/configure.gnu; then
842      echo
843      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
844    elif test -f $ac_sub_srcdir/configure; then
845      echo
846      $SHELL $ac_sub_srcdir/configure  --help=recursive
847    elif test -f $ac_sub_srcdir/configure.ac ||
848           test -f $ac_sub_srcdir/configure.in; then
849      echo
850      $ac_configure --help
851    else
852      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
853    fi
854    cd $ac_popdir
855  done
856fi
857
858test -n "$ac_init_help" && exit 0
859if $ac_init_version; then
860  cat <<\EOF
861
862Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
863Free Software Foundation, Inc.
864This configure script is free software; the Free Software Foundation
865gives unlimited permission to copy, distribute and modify it.
866EOF
867  exit 0
868fi
869exec 5>config.log
870cat >&5 <<EOF
871This file contains any messages produced by compilers while
872running configure, to aid debugging if configure makes a mistake.
873
874It was created by $as_me, which was
875generated by GNU Autoconf 2.52.20170501.  Invocation command line was
876
877  $ $0 $@
878
879EOF
880{
881cat <<_ASUNAME
882## ---------- ##
883## Platform.  ##
884## ---------- ##
885
886hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
887uname -m = `(uname -m) 2>/dev/null || echo unknown`
888uname -r = `(uname -r) 2>/dev/null || echo unknown`
889uname -s = `(uname -s) 2>/dev/null || echo unknown`
890uname -v = `(uname -v) 2>/dev/null || echo unknown`
891
892/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
893/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
894
895/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
896/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
897/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
898hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
899/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
900/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
901/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
902
903PATH = $PATH
904
905_ASUNAME
906} >&5
907
908cat >&5 <<EOF
909## ------------ ##
910## Core tests.  ##
911## ------------ ##
912
913EOF
914
915# Keep a trace of the command line.
916# Strip out --no-create and --no-recursion so they do not pile up.
917# Also quote any args containing shell meta-characters.
918ac_configure_args=
919ac_sep=
920for ac_arg
921do
922  case $ac_arg in
923  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
924  | --no-cr | --no-c) ;;
925  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
926  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
927  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
928    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
929    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
930    ac_sep=" " ;;
931  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
932     ac_sep=" " ;;
933  esac
934  # Get rid of the leading space.
935done
936
937# When interrupted or exit'd, cleanup temporary files, and complete
938# config.log.  We remove comments because anyway the quotes in there
939# would cause problems or look ugly.
940trap 'exit_status=$?
941  # Save into config.log some information that might help in debugging.
942  echo >&5
943  echo "## ----------------- ##" >&5
944  echo "## Cache variables.  ##" >&5
945  echo "## ----------------- ##" >&5
946  echo >&5
947  # The following way of writing the cache mishandles newlines in values,
948{
949  (set) 2>&1 |
950    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
951    *ac_space=\ *)
952      sed -n \
953        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
954    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
955      ;;
956    *)
957      sed -n \
958        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
959      ;;
960    esac;
961} >&5
962  sed "/^$/d" confdefs.h >conftest.log
963  if test -s conftest.log; then
964    echo >&5
965    echo "## ------------ ##" >&5
966    echo "## confdefs.h.  ##" >&5
967    echo "## ------------ ##" >&5
968    echo >&5
969    cat conftest.log >&5
970  fi
971  (echo; echo) >&5
972  test "$ac_signal" != 0 &&
973    echo "$as_me: caught signal $ac_signal" >&5
974  echo "$as_me: exit $exit_status" >&5
975  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
976    exit $exit_status
977     ' 0
978for ac_signal in 1 2 13 15; do
979  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
980done
981ac_signal=0
982
983# confdefs.h avoids OS command line length limits that DEFS can exceed.
984rm -rf conftest* confdefs.h
985# AIX cpp loses on an empty file, so make sure it contains at least a newline.
986echo >confdefs.h
987
988# Let the site file select an alternate cache file if it wants to.
989# Prefer explicitly selected file to automatically selected ones.
990if test -z "$CONFIG_SITE"; then
991  if test "x$prefix" != xNONE; then
992    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
993  else
994    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
995  fi
996fi
997for ac_site_file in $CONFIG_SITE; do
998  if test -r "$ac_site_file"; then
999    { echo "$as_me:999: loading site script $ac_site_file" >&5
1000echo "$as_me: loading site script $ac_site_file" >&6;}
1001    cat "$ac_site_file" >&5
1002    . "$ac_site_file"
1003  fi
1004done
1005
1006if test -r "$cache_file"; then
1007  # Some versions of bash will fail to source /dev/null (special
1008  # files actually), so we avoid doing that.
1009  if test -f "$cache_file"; then
1010    { echo "$as_me:1010: loading cache $cache_file" >&5
1011echo "$as_me: loading cache $cache_file" >&6;}
1012    case $cache_file in
1013      [\\/]* | ?:[\\/]* ) . $cache_file;;
1014      *)                      . ./$cache_file;;
1015    esac
1016  fi
1017else
1018  { echo "$as_me:1018: creating cache $cache_file" >&5
1019echo "$as_me: creating cache $cache_file" >&6;}
1020  >$cache_file
1021fi
1022
1023# Check that the precious variables saved in the cache have kept the same
1024# value.
1025ac_cache_corrupted=false
1026for ac_var in `(set) 2>&1 |
1027               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1028  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1029  eval ac_new_set=\$ac_env_${ac_var}_set
1030  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1031  eval ac_new_val="\$ac_env_${ac_var}_value"
1032  case $ac_old_set,$ac_new_set in
1033    set,)
1034      { echo "$as_me:1034: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1035echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1036      ac_cache_corrupted=: ;;
1037    ,set)
1038      { echo "$as_me:1038: error: \`$ac_var' was not set in the previous run" >&5
1039echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1040      ac_cache_corrupted=: ;;
1041    ,);;
1042    *)
1043      if test "x$ac_old_val" != "x$ac_new_val"; then
1044        { echo "$as_me:1044: error: \`$ac_var' has changed since the previous run:" >&5
1045echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1046        { echo "$as_me:1046:   former value:  $ac_old_val" >&5
1047echo "$as_me:   former value:  $ac_old_val" >&2;}
1048        { echo "$as_me:1048:   current value: $ac_new_val" >&5
1049echo "$as_me:   current value: $ac_new_val" >&2;}
1050        ac_cache_corrupted=:
1051      fi;;
1052  esac
1053  # Pass precious variables to config.status.  It doesn't matter if
1054  # we pass some twice (in addition to the command line arguments).
1055  if test "$ac_new_set" = set; then
1056    case $ac_new_val in
1057    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1058      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1059      ac_configure_args="$ac_configure_args '$ac_arg'"
1060      ;;
1061    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1062       ;;
1063    esac
1064  fi
1065done
1066if $ac_cache_corrupted; then
1067  { echo "$as_me:1067: error: changes in the environment can compromise the build" >&5
1068echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1069  { { echo "$as_me:1069: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1070echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1071   { (exit 1); exit 1; }; }
1072fi
1073
1074ac_ext=c
1075ac_cpp='$CPP $CPPFLAGS'
1076ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1077ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1078ac_compiler_gnu=$ac_cv_c_compiler_gnu
1079ac_main_return=return
1080
1081case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1082  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1083		   ECHO_T='	' ;;
1084  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1085  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1086esac
1087echo "#! $SHELL" >conftest.sh
1088echo  "exit 0"   >>conftest.sh
1089chmod +x conftest.sh
1090if { (echo "$as_me:1090: PATH=\".;.\"; conftest.sh") >&5
1091  (PATH=".;."; conftest.sh) 2>&5
1092  ac_status=$?
1093  echo "$as_me:1093: \$? = $ac_status" >&5
1094  (exit $ac_status); }; then
1095  ac_path_separator=';'
1096else
1097  ac_path_separator=:
1098fi
1099PATH_SEPARATOR="$ac_path_separator"
1100rm -f conftest.sh
1101
1102ac_config_headers="$ac_config_headers xtermcfg.h:xtermcfg.hin"
1103
1104ac_aux_dir=
1105for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1106  if test -f $ac_dir/install-sh; then
1107    ac_aux_dir=$ac_dir
1108    ac_install_sh="$ac_aux_dir/install-sh -c"
1109    break
1110  elif test -f $ac_dir/install.sh; then
1111    ac_aux_dir=$ac_dir
1112    ac_install_sh="$ac_aux_dir/install.sh -c"
1113    break
1114  elif test -f $ac_dir/shtool; then
1115    ac_aux_dir=$ac_dir
1116    ac_install_sh="$ac_aux_dir/shtool install -c"
1117    break
1118  fi
1119done
1120if test -z "$ac_aux_dir"; then
1121  { { echo "$as_me:1121: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1122echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1123   { (exit 1); exit 1; }; }
1124fi
1125ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1126ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1127ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1128
1129# Make sure we can run config.sub.
1130$ac_config_sub sun4 >/dev/null 2>&1 ||
1131  { { echo "$as_me:1131: error: cannot run $ac_config_sub" >&5
1132echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1133   { (exit 1); exit 1; }; }
1134
1135echo "$as_me:1135: checking build system type" >&5
1136echo $ECHO_N "checking build system type... $ECHO_C" >&6
1137if test "${ac_cv_build+set}" = set; then
1138  echo $ECHO_N "(cached) $ECHO_C" >&6
1139else
1140  ac_cv_build_alias=$build_alias
1141test -z "$ac_cv_build_alias" &&
1142  ac_cv_build_alias=`$ac_config_guess`
1143test -z "$ac_cv_build_alias" &&
1144  { { echo "$as_me:1144: error: cannot guess build type; you must specify one" >&5
1145echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1146   { (exit 1); exit 1; }; }
1147ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1148  { { echo "$as_me:1148: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1149echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1150   { (exit 1); exit 1; }; }
1151
1152fi
1153echo "$as_me:1153: result: $ac_cv_build" >&5
1154echo "${ECHO_T}$ac_cv_build" >&6
1155build=$ac_cv_build
1156build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1157build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1158build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1159
1160if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1161	echo "$as_me:1161: checking host system type" >&5
1162echo $ECHO_N "checking host system type... $ECHO_C" >&6
1163if test "${ac_cv_host+set}" = set; then
1164  echo $ECHO_N "(cached) $ECHO_C" >&6
1165else
1166  ac_cv_host_alias=$host_alias
1167test -z "$ac_cv_host_alias" &&
1168  ac_cv_host_alias=$ac_cv_build_alias
1169ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1170  { { echo "$as_me:1170: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1171echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1172   { (exit 1); exit 1; }; }
1173
1174fi
1175echo "$as_me:1175: result: $ac_cv_host" >&5
1176echo "${ECHO_T}$ac_cv_host" >&6
1177host=$ac_cv_host
1178host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1179host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1180host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1181
1182	system_name="$host_os"
1183else
1184	system_name="`(uname -s -r) 2>/dev/null`"
1185	if test -z "$system_name" ; then
1186		system_name="`(hostname) 2>/dev/null`"
1187	fi
1188fi
1189test -n "$system_name" &&
1190cat >>confdefs.h <<EOF
1191#define SYSTEM_NAME "$system_name"
1192EOF
1193
1194if test "${cf_cv_system_name+set}" = set; then
1195  echo $ECHO_N "(cached) $ECHO_C" >&6
1196else
1197  cf_cv_system_name="$system_name"
1198fi
1199
1200test -z "$system_name" && system_name="$cf_cv_system_name"
1201test -n "$cf_cv_system_name" && echo "$as_me:1201: result: Configuring for $cf_cv_system_name" >&5
1202echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1203
1204if test ".$system_name" != ".$cf_cv_system_name" ; then
1205	echo "$as_me:1205: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1206echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1207	{ { echo "$as_me:1207: error: \"Please remove config.cache and try again.\"" >&5
1208echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1209   { (exit 1); exit 1; }; }
1210fi
1211
1212###	checks for alternative programs
1213
1214case "$host_os" in
1215(openedition)	: ${CFLAGS="-O2 -Wc,dll -Wl,EDIT=NO"}
1216		: ${CPPFLAGS="-D_ALL_SOURCE"}
1217		: ${LIBS="/usr/lib/Xaw.x /usr/lib/SM.x /usr/lib/ICE.x /usr/lib/X11.x"}
1218		: ${CC=c89};;
1219(darwin*)
1220		: ${LDFLAGS}="${LDFLAGS} -Wl,-bind_at_load";;
1221esac
1222
1223ac_ext=c
1224ac_cpp='$CPP $CPPFLAGS'
1225ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1226ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1227ac_compiler_gnu=$ac_cv_c_compiler_gnu
1228ac_main_return=return
1229if test -n "$ac_tool_prefix"; then
1230  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1231set dummy ${ac_tool_prefix}gcc; ac_word=$2
1232echo "$as_me:1232: checking for $ac_word" >&5
1233echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1234if test "${ac_cv_prog_CC+set}" = set; then
1235  echo $ECHO_N "(cached) $ECHO_C" >&6
1236else
1237  if test -n "$CC"; then
1238  ac_cv_prog_CC="$CC" # Let the user override the test.
1239else
1240  ac_save_IFS=$IFS; IFS=$ac_path_separator
1241ac_dummy="$PATH"
1242for ac_dir in $ac_dummy; do
1243  IFS=$ac_save_IFS
1244  test -z "$ac_dir" && ac_dir=.
1245  $as_executable_p "$ac_dir/$ac_word" || continue
1246ac_cv_prog_CC="${ac_tool_prefix}gcc"
1247echo "$as_me:1247: found $ac_dir/$ac_word" >&5
1248break
1249done
1250
1251fi
1252fi
1253CC=$ac_cv_prog_CC
1254if test -n "$CC"; then
1255  echo "$as_me:1255: result: $CC" >&5
1256echo "${ECHO_T}$CC" >&6
1257else
1258  echo "$as_me:1258: result: no" >&5
1259echo "${ECHO_T}no" >&6
1260fi
1261
1262fi
1263if test -z "$ac_cv_prog_CC"; then
1264  ac_ct_CC=$CC
1265  # Extract the first word of "gcc", so it can be a program name with args.
1266set dummy gcc; ac_word=$2
1267echo "$as_me:1267: checking for $ac_word" >&5
1268echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1269if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1270  echo $ECHO_N "(cached) $ECHO_C" >&6
1271else
1272  if test -n "$ac_ct_CC"; then
1273  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1274else
1275  ac_save_IFS=$IFS; IFS=$ac_path_separator
1276ac_dummy="$PATH"
1277for ac_dir in $ac_dummy; do
1278  IFS=$ac_save_IFS
1279  test -z "$ac_dir" && ac_dir=.
1280  $as_executable_p "$ac_dir/$ac_word" || continue
1281ac_cv_prog_ac_ct_CC="gcc"
1282echo "$as_me:1282: found $ac_dir/$ac_word" >&5
1283break
1284done
1285
1286fi
1287fi
1288ac_ct_CC=$ac_cv_prog_ac_ct_CC
1289if test -n "$ac_ct_CC"; then
1290  echo "$as_me:1290: result: $ac_ct_CC" >&5
1291echo "${ECHO_T}$ac_ct_CC" >&6
1292else
1293  echo "$as_me:1293: result: no" >&5
1294echo "${ECHO_T}no" >&6
1295fi
1296
1297  CC=$ac_ct_CC
1298else
1299  CC="$ac_cv_prog_CC"
1300fi
1301
1302if test -z "$CC"; then
1303  if test -n "$ac_tool_prefix"; then
1304  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1305set dummy ${ac_tool_prefix}cc; ac_word=$2
1306echo "$as_me:1306: checking for $ac_word" >&5
1307echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1308if test "${ac_cv_prog_CC+set}" = set; then
1309  echo $ECHO_N "(cached) $ECHO_C" >&6
1310else
1311  if test -n "$CC"; then
1312  ac_cv_prog_CC="$CC" # Let the user override the test.
1313else
1314  ac_save_IFS=$IFS; IFS=$ac_path_separator
1315ac_dummy="$PATH"
1316for ac_dir in $ac_dummy; do
1317  IFS=$ac_save_IFS
1318  test -z "$ac_dir" && ac_dir=.
1319  $as_executable_p "$ac_dir/$ac_word" || continue
1320ac_cv_prog_CC="${ac_tool_prefix}cc"
1321echo "$as_me:1321: found $ac_dir/$ac_word" >&5
1322break
1323done
1324
1325fi
1326fi
1327CC=$ac_cv_prog_CC
1328if test -n "$CC"; then
1329  echo "$as_me:1329: result: $CC" >&5
1330echo "${ECHO_T}$CC" >&6
1331else
1332  echo "$as_me:1332: result: no" >&5
1333echo "${ECHO_T}no" >&6
1334fi
1335
1336fi
1337if test -z "$ac_cv_prog_CC"; then
1338  ac_ct_CC=$CC
1339  # Extract the first word of "cc", so it can be a program name with args.
1340set dummy cc; ac_word=$2
1341echo "$as_me:1341: checking for $ac_word" >&5
1342echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1343if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1344  echo $ECHO_N "(cached) $ECHO_C" >&6
1345else
1346  if test -n "$ac_ct_CC"; then
1347  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1348else
1349  ac_save_IFS=$IFS; IFS=$ac_path_separator
1350ac_dummy="$PATH"
1351for ac_dir in $ac_dummy; do
1352  IFS=$ac_save_IFS
1353  test -z "$ac_dir" && ac_dir=.
1354  $as_executable_p "$ac_dir/$ac_word" || continue
1355ac_cv_prog_ac_ct_CC="cc"
1356echo "$as_me:1356: found $ac_dir/$ac_word" >&5
1357break
1358done
1359
1360fi
1361fi
1362ac_ct_CC=$ac_cv_prog_ac_ct_CC
1363if test -n "$ac_ct_CC"; then
1364  echo "$as_me:1364: result: $ac_ct_CC" >&5
1365echo "${ECHO_T}$ac_ct_CC" >&6
1366else
1367  echo "$as_me:1367: result: no" >&5
1368echo "${ECHO_T}no" >&6
1369fi
1370
1371  CC=$ac_ct_CC
1372else
1373  CC="$ac_cv_prog_CC"
1374fi
1375
1376fi
1377if test -z "$CC"; then
1378  # Extract the first word of "cc", so it can be a program name with args.
1379set dummy cc; ac_word=$2
1380echo "$as_me:1380: checking for $ac_word" >&5
1381echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1382if test "${ac_cv_prog_CC+set}" = set; then
1383  echo $ECHO_N "(cached) $ECHO_C" >&6
1384else
1385  if test -n "$CC"; then
1386  ac_cv_prog_CC="$CC" # Let the user override the test.
1387else
1388  ac_prog_rejected=no
1389  ac_save_IFS=$IFS; IFS=$ac_path_separator
1390ac_dummy="$PATH"
1391for ac_dir in $ac_dummy; do
1392  IFS=$ac_save_IFS
1393  test -z "$ac_dir" && ac_dir=.
1394  $as_executable_p "$ac_dir/$ac_word" || continue
1395if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1396  ac_prog_rejected=yes
1397  continue
1398fi
1399ac_cv_prog_CC="cc"
1400echo "$as_me:1400: found $ac_dir/$ac_word" >&5
1401break
1402done
1403
1404if test $ac_prog_rejected = yes; then
1405  # We found a bogon in the path, so make sure we never use it.
1406  set dummy $ac_cv_prog_CC
1407  shift
1408  if test $# != 0; then
1409    # We chose a different compiler from the bogus one.
1410    # However, it has the same basename, so the bogon will be chosen
1411    # first if we set CC to just the basename; use the full file name.
1412    shift
1413    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1414    shift
1415    ac_cv_prog_CC="$@"
1416  fi
1417fi
1418fi
1419fi
1420CC=$ac_cv_prog_CC
1421if test -n "$CC"; then
1422  echo "$as_me:1422: result: $CC" >&5
1423echo "${ECHO_T}$CC" >&6
1424else
1425  echo "$as_me:1425: result: no" >&5
1426echo "${ECHO_T}no" >&6
1427fi
1428
1429fi
1430if test -z "$CC"; then
1431  if test -n "$ac_tool_prefix"; then
1432  for ac_prog in cl
1433  do
1434    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1435set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1436echo "$as_me:1436: checking for $ac_word" >&5
1437echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1438if test "${ac_cv_prog_CC+set}" = set; then
1439  echo $ECHO_N "(cached) $ECHO_C" >&6
1440else
1441  if test -n "$CC"; then
1442  ac_cv_prog_CC="$CC" # Let the user override the test.
1443else
1444  ac_save_IFS=$IFS; IFS=$ac_path_separator
1445ac_dummy="$PATH"
1446for ac_dir in $ac_dummy; do
1447  IFS=$ac_save_IFS
1448  test -z "$ac_dir" && ac_dir=.
1449  $as_executable_p "$ac_dir/$ac_word" || continue
1450ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1451echo "$as_me:1451: found $ac_dir/$ac_word" >&5
1452break
1453done
1454
1455fi
1456fi
1457CC=$ac_cv_prog_CC
1458if test -n "$CC"; then
1459  echo "$as_me:1459: result: $CC" >&5
1460echo "${ECHO_T}$CC" >&6
1461else
1462  echo "$as_me:1462: result: no" >&5
1463echo "${ECHO_T}no" >&6
1464fi
1465
1466    test -n "$CC" && break
1467  done
1468fi
1469if test -z "$CC"; then
1470  ac_ct_CC=$CC
1471  for ac_prog in cl
1472do
1473  # Extract the first word of "$ac_prog", so it can be a program name with args.
1474set dummy $ac_prog; ac_word=$2
1475echo "$as_me:1475: checking for $ac_word" >&5
1476echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1477if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1478  echo $ECHO_N "(cached) $ECHO_C" >&6
1479else
1480  if test -n "$ac_ct_CC"; then
1481  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1482else
1483  ac_save_IFS=$IFS; IFS=$ac_path_separator
1484ac_dummy="$PATH"
1485for ac_dir in $ac_dummy; do
1486  IFS=$ac_save_IFS
1487  test -z "$ac_dir" && ac_dir=.
1488  $as_executable_p "$ac_dir/$ac_word" || continue
1489ac_cv_prog_ac_ct_CC="$ac_prog"
1490echo "$as_me:1490: found $ac_dir/$ac_word" >&5
1491break
1492done
1493
1494fi
1495fi
1496ac_ct_CC=$ac_cv_prog_ac_ct_CC
1497if test -n "$ac_ct_CC"; then
1498  echo "$as_me:1498: result: $ac_ct_CC" >&5
1499echo "${ECHO_T}$ac_ct_CC" >&6
1500else
1501  echo "$as_me:1501: result: no" >&5
1502echo "${ECHO_T}no" >&6
1503fi
1504
1505  test -n "$ac_ct_CC" && break
1506done
1507
1508  CC=$ac_ct_CC
1509fi
1510
1511fi
1512
1513test -z "$CC" && { { echo "$as_me:1513: error: no acceptable cc found in \$PATH" >&5
1514echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1515   { (exit 1); exit 1; }; }
1516
1517# Provide some information about the compiler.
1518echo "$as_me:1518:" \
1519     "checking for C compiler version" >&5
1520ac_compiler=`set X $ac_compile; echo $2`
1521{ (eval echo "$as_me:1521: \"$ac_compiler --version </dev/null >&5\"") >&5
1522  (eval $ac_compiler --version </dev/null >&5) 2>&5
1523  ac_status=$?
1524  echo "$as_me:1524: \$? = $ac_status" >&5
1525  (exit $ac_status); }
1526{ (eval echo "$as_me:1526: \"$ac_compiler -v </dev/null >&5\"") >&5
1527  (eval $ac_compiler -v </dev/null >&5) 2>&5
1528  ac_status=$?
1529  echo "$as_me:1529: \$? = $ac_status" >&5
1530  (exit $ac_status); }
1531{ (eval echo "$as_me:1531: \"$ac_compiler -V </dev/null >&5\"") >&5
1532  (eval $ac_compiler -V </dev/null >&5) 2>&5
1533  ac_status=$?
1534  echo "$as_me:1534: \$? = $ac_status" >&5
1535  (exit $ac_status); }
1536
1537cat >conftest.$ac_ext <<_ACEOF
1538#line 1538 "configure"
1539#include "confdefs.h"
1540
1541int
1542main (void)
1543{
1544
1545  ;
1546  return 0;
1547}
1548_ACEOF
1549ac_clean_files_save=$ac_clean_files
1550ac_clean_files="$ac_clean_files a.out a.exe"
1551# Try to create an executable without -o first, disregard a.out.
1552# It will help us diagnose broken compilers, and finding out an intuition
1553# of exeext.
1554echo "$as_me:1554: checking for C compiler default output" >&5
1555echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1556ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1557if { (eval echo "$as_me:1557: \"$ac_link_default\"") >&5
1558  (eval $ac_link_default) 2>&5
1559  ac_status=$?
1560  echo "$as_me:1560: \$? = $ac_status" >&5
1561  (exit $ac_status); }; then
1562  # Find the output, starting from the most likely.  This scheme is
1563# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1564# resort.
1565for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1566                ls a.out conftest 2>/dev/null;
1567                ls a.* conftest.* 2>/dev/null`; do
1568  case $ac_file in
1569    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1570    a.out ) # We found the default executable, but exeext='' is most
1571            # certainly right.
1572            break;;
1573    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1574          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1575          export ac_cv_exeext
1576          break;;
1577    * ) break;;
1578  esac
1579done
1580else
1581  echo "$as_me: failed program was:" >&5
1582cat conftest.$ac_ext >&5
1583{ { echo "$as_me:1583: error: C compiler cannot create executables" >&5
1584echo "$as_me: error: C compiler cannot create executables" >&2;}
1585   { (exit 77); exit 77; }; }
1586fi
1587
1588ac_exeext=$ac_cv_exeext
1589echo "$as_me:1589: result: $ac_file" >&5
1590echo "${ECHO_T}$ac_file" >&6
1591
1592# Check the compiler produces executables we can run.  If not, either
1593# the compiler is broken, or we cross compile.
1594echo "$as_me:1594: checking whether the C compiler works" >&5
1595echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1596# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1597# If not cross compiling, check that we can run a simple program.
1598if test "$cross_compiling" != yes; then
1599  if { ac_try='./$ac_file'
1600  { (eval echo "$as_me:1600: \"$ac_try\"") >&5
1601  (eval $ac_try) 2>&5
1602  ac_status=$?
1603  echo "$as_me:1603: \$? = $ac_status" >&5
1604  (exit $ac_status); }; }; then
1605    cross_compiling=no
1606  else
1607    if test "$cross_compiling" = maybe; then
1608	cross_compiling=yes
1609    else
1610	{ { echo "$as_me:1610: error: cannot run C compiled programs.
1611If you meant to cross compile, use \`--host'." >&5
1612echo "$as_me: error: cannot run C compiled programs.
1613If you meant to cross compile, use \`--host'." >&2;}
1614   { (exit 1); exit 1; }; }
1615    fi
1616  fi
1617fi
1618echo "$as_me:1618: result: yes" >&5
1619echo "${ECHO_T}yes" >&6
1620
1621rm -f a.out a.exe conftest$ac_cv_exeext
1622ac_clean_files=$ac_clean_files_save
1623# Check the compiler produces executables we can run.  If not, either
1624# the compiler is broken, or we cross compile.
1625echo "$as_me:1625: checking whether we are cross compiling" >&5
1626echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1627echo "$as_me:1627: result: $cross_compiling" >&5
1628echo "${ECHO_T}$cross_compiling" >&6
1629
1630echo "$as_me:1630: checking for executable suffix" >&5
1631echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1632if { (eval echo "$as_me:1632: \"$ac_link\"") >&5
1633  (eval $ac_link) 2>&5
1634  ac_status=$?
1635  echo "$as_me:1635: \$? = $ac_status" >&5
1636  (exit $ac_status); }; then
1637  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1638# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1639# work properly (i.e., refer to `conftest.exe'), while it won't with
1640# `rm'.
1641for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1642  case $ac_file in
1643    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1644    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1645          export ac_cv_exeext
1646          break;;
1647    * ) break;;
1648  esac
1649done
1650else
1651  { { echo "$as_me:1651: error: cannot compute EXEEXT: cannot compile and link" >&5
1652echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1653   { (exit 1); exit 1; }; }
1654fi
1655
1656rm -f conftest$ac_cv_exeext
1657echo "$as_me:1657: result: $ac_cv_exeext" >&5
1658echo "${ECHO_T}$ac_cv_exeext" >&6
1659
1660rm -f conftest.$ac_ext
1661EXEEXT=$ac_cv_exeext
1662ac_exeext=$EXEEXT
1663echo "$as_me:1663: checking for object suffix" >&5
1664echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1665if test "${ac_cv_objext+set}" = set; then
1666  echo $ECHO_N "(cached) $ECHO_C" >&6
1667else
1668  cat >conftest.$ac_ext <<_ACEOF
1669#line 1669 "configure"
1670#include "confdefs.h"
1671
1672int
1673main (void)
1674{
1675
1676  ;
1677  return 0;
1678}
1679_ACEOF
1680rm -f conftest.o conftest.obj
1681if { (eval echo "$as_me:1681: \"$ac_compile\"") >&5
1682  (eval $ac_compile) 2>&5
1683  ac_status=$?
1684  echo "$as_me:1684: \$? = $ac_status" >&5
1685  (exit $ac_status); }; then
1686  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1687  case $ac_file in
1688    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1689    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1690       break;;
1691  esac
1692done
1693else
1694  echo "$as_me: failed program was:" >&5
1695cat conftest.$ac_ext >&5
1696{ { echo "$as_me:1696: error: cannot compute OBJEXT: cannot compile" >&5
1697echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1698   { (exit 1); exit 1; }; }
1699fi
1700
1701rm -f conftest.$ac_cv_objext conftest.$ac_ext
1702fi
1703echo "$as_me:1703: result: $ac_cv_objext" >&5
1704echo "${ECHO_T}$ac_cv_objext" >&6
1705OBJEXT=$ac_cv_objext
1706ac_objext=$OBJEXT
1707echo "$as_me:1707: checking whether we are using the GNU C compiler" >&5
1708echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1709if test "${ac_cv_c_compiler_gnu+set}" = set; then
1710  echo $ECHO_N "(cached) $ECHO_C" >&6
1711else
1712  cat >conftest.$ac_ext <<_ACEOF
1713#line 1713 "configure"
1714#include "confdefs.h"
1715
1716int
1717main (void)
1718{
1719#ifndef __GNUC__
1720       choke me
1721#endif
1722
1723  ;
1724  return 0;
1725}
1726_ACEOF
1727rm -f conftest.$ac_objext
1728if { (eval echo "$as_me:1728: \"$ac_compile\"") >&5
1729  (eval $ac_compile) 2>&5
1730  ac_status=$?
1731  echo "$as_me:1731: \$? = $ac_status" >&5
1732  (exit $ac_status); } &&
1733         { ac_try='test -s conftest.$ac_objext'
1734  { (eval echo "$as_me:1734: \"$ac_try\"") >&5
1735  (eval $ac_try) 2>&5
1736  ac_status=$?
1737  echo "$as_me:1737: \$? = $ac_status" >&5
1738  (exit $ac_status); }; }; then
1739  ac_compiler_gnu=yes
1740else
1741  echo "$as_me: failed program was:" >&5
1742cat conftest.$ac_ext >&5
1743ac_compiler_gnu=no
1744fi
1745rm -f conftest.$ac_objext conftest.$ac_ext
1746ac_cv_c_compiler_gnu=$ac_compiler_gnu
1747
1748fi
1749echo "$as_me:1749: result: $ac_cv_c_compiler_gnu" >&5
1750echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1751GCC=`test $ac_compiler_gnu = yes && echo yes`
1752ac_test_CFLAGS=${CFLAGS+set}
1753ac_save_CFLAGS=$CFLAGS
1754CFLAGS="-g"
1755echo "$as_me:1755: checking whether $CC accepts -g" >&5
1756echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1757if test "${ac_cv_prog_cc_g+set}" = set; then
1758  echo $ECHO_N "(cached) $ECHO_C" >&6
1759else
1760  cat >conftest.$ac_ext <<_ACEOF
1761#line 1761 "configure"
1762#include "confdefs.h"
1763
1764int
1765main (void)
1766{
1767
1768  ;
1769  return 0;
1770}
1771_ACEOF
1772rm -f conftest.$ac_objext
1773if { (eval echo "$as_me:1773: \"$ac_compile\"") >&5
1774  (eval $ac_compile) 2>&5
1775  ac_status=$?
1776  echo "$as_me:1776: \$? = $ac_status" >&5
1777  (exit $ac_status); } &&
1778         { ac_try='test -s conftest.$ac_objext'
1779  { (eval echo "$as_me:1779: \"$ac_try\"") >&5
1780  (eval $ac_try) 2>&5
1781  ac_status=$?
1782  echo "$as_me:1782: \$? = $ac_status" >&5
1783  (exit $ac_status); }; }; then
1784  ac_cv_prog_cc_g=yes
1785else
1786  echo "$as_me: failed program was:" >&5
1787cat conftest.$ac_ext >&5
1788ac_cv_prog_cc_g=no
1789fi
1790rm -f conftest.$ac_objext conftest.$ac_ext
1791fi
1792echo "$as_me:1792: result: $ac_cv_prog_cc_g" >&5
1793echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1794if test "$ac_test_CFLAGS" = set; then
1795  CFLAGS=$ac_save_CFLAGS
1796elif test $ac_cv_prog_cc_g = yes; then
1797  if test "$GCC" = yes; then
1798    CFLAGS="-g -O2"
1799  else
1800    CFLAGS="-g"
1801  fi
1802else
1803  if test "$GCC" = yes; then
1804    CFLAGS="-O2"
1805  else
1806    CFLAGS=
1807  fi
1808fi
1809# Some people use a C++ compiler to compile C.  Since we use `exit',
1810# in C++ we need to declare it.  In case someone uses the same compiler
1811# for both compiling C and C++ we need to have the C++ compiler decide
1812# the declaration of exit, since it's the most demanding environment.
1813cat >conftest.$ac_ext <<_ACEOF
1814#ifndef __cplusplus
1815  choke me
1816#endif
1817_ACEOF
1818rm -f conftest.$ac_objext
1819if { (eval echo "$as_me:1819: \"$ac_compile\"") >&5
1820  (eval $ac_compile) 2>&5
1821  ac_status=$?
1822  echo "$as_me:1822: \$? = $ac_status" >&5
1823  (exit $ac_status); } &&
1824         { ac_try='test -s conftest.$ac_objext'
1825  { (eval echo "$as_me:1825: \"$ac_try\"") >&5
1826  (eval $ac_try) 2>&5
1827  ac_status=$?
1828  echo "$as_me:1828: \$? = $ac_status" >&5
1829  (exit $ac_status); }; }; then
1830  for ac_declaration in \
1831   ''\
1832   '#include <stdlib.h>' \
1833   'extern "C" void std::exit (int) throw (); using std::exit;' \
1834   'extern "C" void std::exit (int); using std::exit;' \
1835   'extern "C" void exit (int) throw ();' \
1836   'extern "C" void exit (int);' \
1837   'void exit (int);'
1838do
1839  cat >conftest.$ac_ext <<_ACEOF
1840#line 1840 "configure"
1841#include "confdefs.h"
1842#include <stdlib.h>
1843$ac_declaration
1844int
1845main (void)
1846{
1847exit (42);
1848  ;
1849  return 0;
1850}
1851_ACEOF
1852rm -f conftest.$ac_objext
1853if { (eval echo "$as_me:1853: \"$ac_compile\"") >&5
1854  (eval $ac_compile) 2>&5
1855  ac_status=$?
1856  echo "$as_me:1856: \$? = $ac_status" >&5
1857  (exit $ac_status); } &&
1858         { ac_try='test -s conftest.$ac_objext'
1859  { (eval echo "$as_me:1859: \"$ac_try\"") >&5
1860  (eval $ac_try) 2>&5
1861  ac_status=$?
1862  echo "$as_me:1862: \$? = $ac_status" >&5
1863  (exit $ac_status); }; }; then
1864  :
1865else
1866  echo "$as_me: failed program was:" >&5
1867cat conftest.$ac_ext >&5
1868continue
1869fi
1870rm -f conftest.$ac_objext conftest.$ac_ext
1871  cat >conftest.$ac_ext <<_ACEOF
1872#line 1872 "configure"
1873#include "confdefs.h"
1874$ac_declaration
1875int
1876main (void)
1877{
1878exit (42);
1879  ;
1880  return 0;
1881}
1882_ACEOF
1883rm -f conftest.$ac_objext
1884if { (eval echo "$as_me:1884: \"$ac_compile\"") >&5
1885  (eval $ac_compile) 2>&5
1886  ac_status=$?
1887  echo "$as_me:1887: \$? = $ac_status" >&5
1888  (exit $ac_status); } &&
1889         { ac_try='test -s conftest.$ac_objext'
1890  { (eval echo "$as_me:1890: \"$ac_try\"") >&5
1891  (eval $ac_try) 2>&5
1892  ac_status=$?
1893  echo "$as_me:1893: \$? = $ac_status" >&5
1894  (exit $ac_status); }; }; then
1895  break
1896else
1897  echo "$as_me: failed program was:" >&5
1898cat conftest.$ac_ext >&5
1899fi
1900rm -f conftest.$ac_objext conftest.$ac_ext
1901done
1902rm -rf conftest*
1903if test -n "$ac_declaration"; then
1904  echo '#ifdef __cplusplus' >>confdefs.h
1905  echo $ac_declaration      >>confdefs.h
1906  echo '#endif'             >>confdefs.h
1907fi
1908
1909else
1910  echo "$as_me: failed program was:" >&5
1911cat conftest.$ac_ext >&5
1912fi
1913rm -f conftest.$ac_objext conftest.$ac_ext
1914ac_ext=c
1915ac_cpp='$CPP $CPPFLAGS'
1916ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1917ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1918ac_compiler_gnu=$ac_cv_c_compiler_gnu
1919ac_main_return=return
1920
1921GCC_VERSION=none
1922if test "$GCC" = yes ; then
1923	echo "$as_me:1923: checking version of $CC" >&5
1924echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
1925	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.].*//'`"
1926	test -z "$GCC_VERSION" && GCC_VERSION=unknown
1927	echo "$as_me:1927: result: $GCC_VERSION" >&5
1928echo "${ECHO_T}$GCC_VERSION" >&6
1929fi
1930
1931echo "$as_me:1931: checking for $CC option to accept ANSI C" >&5
1932echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
1933if test "${ac_cv_prog_cc_stdc+set}" = set; then
1934  echo $ECHO_N "(cached) $ECHO_C" >&6
1935else
1936  ac_cv_prog_cc_stdc=no
1937ac_save_CC=$CC
1938cat >conftest.$ac_ext <<_ACEOF
1939#line 1939 "configure"
1940#include "confdefs.h"
1941#include <stdarg.h>
1942#include <stdio.h>
1943#include <sys/types.h>
1944#include <sys/stat.h>
1945/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
1946struct buf { int x; };
1947FILE * (*rcsopen) (struct buf *, struct stat *, int);
1948static char *e (p, i)
1949     char **p;
1950     int i;
1951{
1952  return p[i];
1953}
1954static char *f (char * (*g) (char **, int), char **p, ...)
1955{
1956  char *s;
1957  va_list v;
1958  va_start (v,p);
1959  s = g (p, va_arg (v,int));
1960  va_end (v);
1961  return s;
1962}
1963int test (int i, double x);
1964struct s1 {int (*f) (int a);};
1965struct s2 {int (*f) (double a);};
1966int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
1967int argc;
1968char **argv;
1969int
1970main (void)
1971{
1972return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
1973  ;
1974  return 0;
1975}
1976_ACEOF
1977# Don't try gcc -ansi; that turns off useful extensions and
1978# breaks some systems' header files.
1979# AIX			-qlanglvl=ansi
1980# Ultrix and OSF/1	-std1
1981# HP-UX 10.20 and later	-Ae
1982# HP-UX older versions	-Aa -D_HPUX_SOURCE
1983# SVR4			-Xc -D__EXTENSIONS__
1984for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
1985do
1986  CC="$ac_save_CC $ac_arg"
1987  rm -f conftest.$ac_objext
1988if { (eval echo "$as_me:1988: \"$ac_compile\"") >&5
1989  (eval $ac_compile) 2>&5
1990  ac_status=$?
1991  echo "$as_me:1991: \$? = $ac_status" >&5
1992  (exit $ac_status); } &&
1993         { ac_try='test -s conftest.$ac_objext'
1994  { (eval echo "$as_me:1994: \"$ac_try\"") >&5
1995  (eval $ac_try) 2>&5
1996  ac_status=$?
1997  echo "$as_me:1997: \$? = $ac_status" >&5
1998  (exit $ac_status); }; }; then
1999  ac_cv_prog_cc_stdc=$ac_arg
2000break
2001else
2002  echo "$as_me: failed program was:" >&5
2003cat conftest.$ac_ext >&5
2004fi
2005rm -f conftest.$ac_objext
2006done
2007rm -f conftest.$ac_ext conftest.$ac_objext
2008CC=$ac_save_CC
2009
2010fi
2011
2012case "x$ac_cv_prog_cc_stdc" in
2013  x|xno)
2014    echo "$as_me:2014: result: none needed" >&5
2015echo "${ECHO_T}none needed" >&6 ;;
2016  *)
2017    echo "$as_me:2017: result: $ac_cv_prog_cc_stdc" >&5
2018echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2019    CC="$CC $ac_cv_prog_cc_stdc" ;;
2020esac
2021
2022# This should have been defined by AC_PROG_CC
2023: ${CC:=cc}
2024
2025echo "$as_me:2025: checking \$CC variable" >&5
2026echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2027case "$CC" in
2028(*[\ \	]-*)
2029	echo "$as_me:2029: result: broken" >&5
2030echo "${ECHO_T}broken" >&6
2031	{ echo "$as_me:2031: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2032echo "$as_me: WARNING: your environment misuses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2033	# humor him...
2034	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2035	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2036	CC="$cf_prog"
2037	for cf_arg in $cf_flags
2038	do
2039		case "x$cf_arg" in
2040		(x-[IUDfgOW]*)
2041
2042cf_fix_cppflags=no
2043cf_new_cflags=
2044cf_new_cppflags=
2045cf_new_extra_cppflags=
2046
2047for cf_add_cflags in $cf_arg
2048do
2049case $cf_fix_cppflags in
2050(no)
2051	case $cf_add_cflags in
2052	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2053		case $cf_add_cflags in
2054		(-D*)
2055			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2056
2057			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2058				&& test -z "${cf_tst_cflags}" \
2059				&& cf_fix_cppflags=yes
2060
2061			if test $cf_fix_cppflags = yes ; then
2062
2063	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2064	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2065
2066				continue
2067			elif test "${cf_tst_cflags}" = "\"'" ; then
2068
2069	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2070	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2071
2072				continue
2073			fi
2074			;;
2075		esac
2076		case "$CPPFLAGS" in
2077		(*$cf_add_cflags)
2078			;;
2079		(*)
2080			case $cf_add_cflags in
2081			(-D*)
2082				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2083
2084CPPFLAGS=`echo "$CPPFLAGS" | \
2085	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2086		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2087
2088				;;
2089			esac
2090
2091	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2092	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2093
2094			;;
2095		esac
2096		;;
2097	(*)
2098
2099	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2100	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2101
2102		;;
2103	esac
2104	;;
2105(yes)
2106
2107	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2108	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2109
2110	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2111
2112	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2113		&& test -z "${cf_tst_cflags}" \
2114		&& cf_fix_cppflags=no
2115	;;
2116esac
2117done
2118
2119if test -n "$cf_new_cflags" ; then
2120
2121	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2122	CFLAGS="${CFLAGS}$cf_new_cflags"
2123
2124fi
2125
2126if test -n "$cf_new_cppflags" ; then
2127
2128	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2129	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2130
2131fi
2132
2133if test -n "$cf_new_extra_cppflags" ; then
2134
2135	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2136	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2137
2138fi
2139
2140			;;
2141		(*)
2142			CC="$CC $cf_arg"
2143			;;
2144		esac
2145	done
2146	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2147
2148echo "${as_me:-configure}:2148: testing resulting CC: '$CC' ..." 1>&5
2149
2150	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2151
2152echo "${as_me:-configure}:2152: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2153
2154	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2155
2156echo "${as_me:-configure}:2156: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2157
2158	;;
2159(*)
2160	echo "$as_me:2160: result: ok" >&5
2161echo "${ECHO_T}ok" >&6
2162	;;
2163esac
2164
2165ac_ext=c
2166ac_cpp='$CPP $CPPFLAGS'
2167ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2168ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2169ac_compiler_gnu=$ac_cv_c_compiler_gnu
2170ac_main_return=return
2171echo "$as_me:2171: checking how to run the C preprocessor" >&5
2172echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2173# On Suns, sometimes $CPP names a directory.
2174if test -n "$CPP" && test -d "$CPP"; then
2175  CPP=
2176fi
2177if test -z "$CPP"; then
2178  if test "${ac_cv_prog_CPP+set}" = set; then
2179  echo $ECHO_N "(cached) $ECHO_C" >&6
2180else
2181      # Double quotes because CPP needs to be expanded
2182    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2183    do
2184      ac_preproc_ok=false
2185for ac_c_preproc_warn_flag in '' yes
2186do
2187  # Use a header file that comes with gcc, so configuring glibc
2188  # with a fresh cross-compiler works.
2189  # On the NeXT, cc -E runs the code through the compiler's parser,
2190  # not just through cpp. "Syntax error" is here to catch this case.
2191  cat >conftest.$ac_ext <<_ACEOF
2192#line 2192 "configure"
2193#include "confdefs.h"
2194#include <assert.h>
2195                     Syntax error
2196_ACEOF
2197if { (eval echo "$as_me:2197: \"$ac_cpp conftest.$ac_ext\"") >&5
2198  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2199  ac_status=$?
2200  egrep -v '^ *\+' conftest.er1 >conftest.err
2201  rm -f conftest.er1
2202  cat conftest.err >&5
2203  echo "$as_me:2203: \$? = $ac_status" >&5
2204  (exit $ac_status); } >/dev/null; then
2205  if test -s conftest.err; then
2206    ac_cpp_err=$ac_c_preproc_warn_flag
2207  else
2208    ac_cpp_err=
2209  fi
2210else
2211  ac_cpp_err=yes
2212fi
2213if test -z "$ac_cpp_err"; then
2214  :
2215else
2216  echo "$as_me: failed program was:" >&5
2217  cat conftest.$ac_ext >&5
2218  # Broken: fails on valid input.
2219continue
2220fi
2221rm -f conftest.err conftest.$ac_ext
2222
2223  # OK, works on sane cases.  Now check whether non-existent headers
2224  # can be detected and how.
2225  cat >conftest.$ac_ext <<_ACEOF
2226#line 2226 "configure"
2227#include "confdefs.h"
2228#include <ac_nonexistent.h>
2229_ACEOF
2230if { (eval echo "$as_me:2230: \"$ac_cpp conftest.$ac_ext\"") >&5
2231  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2232  ac_status=$?
2233  egrep -v '^ *\+' conftest.er1 >conftest.err
2234  rm -f conftest.er1
2235  cat conftest.err >&5
2236  echo "$as_me:2236: \$? = $ac_status" >&5
2237  (exit $ac_status); } >/dev/null; then
2238  if test -s conftest.err; then
2239    ac_cpp_err=$ac_c_preproc_warn_flag
2240  else
2241    ac_cpp_err=
2242  fi
2243else
2244  ac_cpp_err=yes
2245fi
2246if test -z "$ac_cpp_err"; then
2247  # Broken: success on invalid input.
2248continue
2249else
2250  echo "$as_me: failed program was:" >&5
2251  cat conftest.$ac_ext >&5
2252  # Passes both tests.
2253ac_preproc_ok=:
2254break
2255fi
2256rm -f conftest.err conftest.$ac_ext
2257
2258done
2259# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2260rm -f conftest.err conftest.$ac_ext
2261if $ac_preproc_ok; then
2262  break
2263fi
2264
2265    done
2266    ac_cv_prog_CPP=$CPP
2267
2268fi
2269  CPP=$ac_cv_prog_CPP
2270else
2271  ac_cv_prog_CPP=$CPP
2272fi
2273echo "$as_me:2273: result: $CPP" >&5
2274echo "${ECHO_T}$CPP" >&6
2275ac_preproc_ok=false
2276for ac_c_preproc_warn_flag in '' yes
2277do
2278  # Use a header file that comes with gcc, so configuring glibc
2279  # with a fresh cross-compiler works.
2280  # On the NeXT, cc -E runs the code through the compiler's parser,
2281  # not just through cpp. "Syntax error" is here to catch this case.
2282  cat >conftest.$ac_ext <<_ACEOF
2283#line 2283 "configure"
2284#include "confdefs.h"
2285#include <assert.h>
2286                     Syntax error
2287_ACEOF
2288if { (eval echo "$as_me:2288: \"$ac_cpp conftest.$ac_ext\"") >&5
2289  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2290  ac_status=$?
2291  egrep -v '^ *\+' conftest.er1 >conftest.err
2292  rm -f conftest.er1
2293  cat conftest.err >&5
2294  echo "$as_me:2294: \$? = $ac_status" >&5
2295  (exit $ac_status); } >/dev/null; then
2296  if test -s conftest.err; then
2297    ac_cpp_err=$ac_c_preproc_warn_flag
2298  else
2299    ac_cpp_err=
2300  fi
2301else
2302  ac_cpp_err=yes
2303fi
2304if test -z "$ac_cpp_err"; then
2305  :
2306else
2307  echo "$as_me: failed program was:" >&5
2308  cat conftest.$ac_ext >&5
2309  # Broken: fails on valid input.
2310continue
2311fi
2312rm -f conftest.err conftest.$ac_ext
2313
2314  # OK, works on sane cases.  Now check whether non-existent headers
2315  # can be detected and how.
2316  cat >conftest.$ac_ext <<_ACEOF
2317#line 2317 "configure"
2318#include "confdefs.h"
2319#include <ac_nonexistent.h>
2320_ACEOF
2321if { (eval echo "$as_me:2321: \"$ac_cpp conftest.$ac_ext\"") >&5
2322  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2323  ac_status=$?
2324  egrep -v '^ *\+' conftest.er1 >conftest.err
2325  rm -f conftest.er1
2326  cat conftest.err >&5
2327  echo "$as_me:2327: \$? = $ac_status" >&5
2328  (exit $ac_status); } >/dev/null; then
2329  if test -s conftest.err; then
2330    ac_cpp_err=$ac_c_preproc_warn_flag
2331  else
2332    ac_cpp_err=
2333  fi
2334else
2335  ac_cpp_err=yes
2336fi
2337if test -z "$ac_cpp_err"; then
2338  # Broken: success on invalid input.
2339continue
2340else
2341  echo "$as_me: failed program was:" >&5
2342  cat conftest.$ac_ext >&5
2343  # Passes both tests.
2344ac_preproc_ok=:
2345break
2346fi
2347rm -f conftest.err conftest.$ac_ext
2348
2349done
2350# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2351rm -f conftest.err conftest.$ac_ext
2352if $ac_preproc_ok; then
2353  :
2354else
2355  { { echo "$as_me:2355: error: C preprocessor \"$CPP\" fails sanity check" >&5
2356echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2357   { (exit 1); exit 1; }; }
2358fi
2359
2360ac_ext=c
2361ac_cpp='$CPP $CPPFLAGS'
2362ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2363ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2364ac_compiler_gnu=$ac_cv_c_compiler_gnu
2365ac_main_return=return
2366
2367for ac_prog in mawk gawk nawk awk
2368do
2369  # Extract the first word of "$ac_prog", so it can be a program name with args.
2370set dummy $ac_prog; ac_word=$2
2371echo "$as_me:2371: checking for $ac_word" >&5
2372echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2373if test "${ac_cv_prog_AWK+set}" = set; then
2374  echo $ECHO_N "(cached) $ECHO_C" >&6
2375else
2376  if test -n "$AWK"; then
2377  ac_cv_prog_AWK="$AWK" # Let the user override the test.
2378else
2379  ac_save_IFS=$IFS; IFS=$ac_path_separator
2380ac_dummy="$PATH"
2381for ac_dir in $ac_dummy; do
2382  IFS=$ac_save_IFS
2383  test -z "$ac_dir" && ac_dir=.
2384  $as_executable_p "$ac_dir/$ac_word" || continue
2385ac_cv_prog_AWK="$ac_prog"
2386echo "$as_me:2386: found $ac_dir/$ac_word" >&5
2387break
2388done
2389
2390fi
2391fi
2392AWK=$ac_cv_prog_AWK
2393if test -n "$AWK"; then
2394  echo "$as_me:2394: result: $AWK" >&5
2395echo "${ECHO_T}$AWK" >&6
2396else
2397  echo "$as_me:2397: result: no" >&5
2398echo "${ECHO_T}no" >&6
2399fi
2400
2401  test -n "$AWK" && break
2402done
2403
2404# Find a good install program.  We prefer a C program (faster),
2405# so one script is as good as another.  But avoid the broken or
2406# incompatible versions:
2407# SysV /etc/install, /usr/sbin/install
2408# SunOS /usr/etc/install
2409# IRIX /sbin/install
2410# AIX /bin/install
2411# AmigaOS /C/install, which installs bootblocks on floppy discs
2412# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2413# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2414# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2415# ./install, which can be erroneously created by make from ./install.sh.
2416echo "$as_me:2416: checking for a BSD compatible install" >&5
2417echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2418if test -z "$INSTALL"; then
2419if test "${ac_cv_path_install+set}" = set; then
2420  echo $ECHO_N "(cached) $ECHO_C" >&6
2421else
2422    ac_save_IFS=$IFS; IFS=$ac_path_separator
2423  for ac_dir in $PATH; do
2424    IFS=$ac_save_IFS
2425    # Account for people who put trailing slashes in PATH elements.
2426    case $ac_dir/ in
2427    / | ./ | .// | /cC/* \
2428    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2429    | /usr/ucb/* ) ;;
2430    *)
2431      # OSF1 and SCO ODT 3.0 have their own names for install.
2432      # Don't use installbsd from OSF since it installs stuff as root
2433      # by default.
2434      for ac_prog in ginstall scoinst install; do
2435        if $as_executable_p "$ac_dir/$ac_prog"; then
2436	  if test $ac_prog = install &&
2437            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2438	    # AIX install.  It has an incompatible calling convention.
2439	    :
2440	  elif test $ac_prog = install &&
2441	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2442	    # program-specific install script used by HP pwplus--don't use.
2443	    :
2444	  else
2445	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2446	    break 2
2447	  fi
2448	fi
2449      done
2450      ;;
2451    esac
2452  done
2453
2454fi
2455  if test "${ac_cv_path_install+set}" = set; then
2456    INSTALL=$ac_cv_path_install
2457  else
2458    # As a last resort, use the slow shell script.  We don't cache a
2459    # path for INSTALL within a source directory, because that will
2460    # break other packages using the cache if that directory is
2461    # removed, or if the path is relative.
2462    INSTALL=$ac_install_sh
2463  fi
2464fi
2465echo "$as_me:2465: result: $INSTALL" >&5
2466echo "${ECHO_T}$INSTALL" >&6
2467
2468# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2469# It thinks the first close brace ends the variable substitution.
2470test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2471
2472test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2473
2474test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2475
2476echo "$as_me:2476: checking whether ln -s works" >&5
2477echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2478LN_S=$as_ln_s
2479if test "$LN_S" = "ln -s"; then
2480  echo "$as_me:2480: result: yes" >&5
2481echo "${ECHO_T}yes" >&6
2482else
2483  echo "$as_me:2483: result: no, using $LN_S" >&5
2484echo "${ECHO_T}no, using $LN_S" >&6
2485fi
2486
2487test "$program_prefix" != NONE &&
2488  program_transform_name="s,^,$program_prefix,;$program_transform_name"
2489# Use a double $ so make ignores it.
2490test "$program_suffix" != NONE &&
2491  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
2492# Double any \ or $.  echo might interpret backslashes.
2493# By default was `s,x,x', remove it if useless.
2494cat <<\_ACEOF >conftest.sed
2495s/[\\$]/&&/g;s/;s,x,x,$//
2496_ACEOF
2497program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
2498rm conftest.sed
2499
2500for ac_prog in lint cppcheck splint
2501do
2502  # Extract the first word of "$ac_prog", so it can be a program name with args.
2503set dummy $ac_prog; ac_word=$2
2504echo "$as_me:2504: checking for $ac_word" >&5
2505echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2506if test "${ac_cv_prog_LINT+set}" = set; then
2507  echo $ECHO_N "(cached) $ECHO_C" >&6
2508else
2509  if test -n "$LINT"; then
2510  ac_cv_prog_LINT="$LINT" # Let the user override the test.
2511else
2512  ac_save_IFS=$IFS; IFS=$ac_path_separator
2513ac_dummy="$PATH"
2514for ac_dir in $ac_dummy; do
2515  IFS=$ac_save_IFS
2516  test -z "$ac_dir" && ac_dir=.
2517  $as_executable_p "$ac_dir/$ac_word" || continue
2518ac_cv_prog_LINT="$ac_prog"
2519echo "$as_me:2519: found $ac_dir/$ac_word" >&5
2520break
2521done
2522
2523fi
2524fi
2525LINT=$ac_cv_prog_LINT
2526if test -n "$LINT"; then
2527  echo "$as_me:2527: result: $LINT" >&5
2528echo "${ECHO_T}$LINT" >&6
2529else
2530  echo "$as_me:2530: result: no" >&5
2531echo "${ECHO_T}no" >&6
2532fi
2533
2534  test -n "$LINT" && break
2535done
2536
2537###	checks for compiler characteristics
2538
2539cf_XOPEN_SOURCE=700
2540cf_POSIX_C_SOURCE=199506L
2541cf_xopen_source=
2542
2543case $host_os in
2544(aix[4-7]*)
2545	cf_xopen_source="-D_ALL_SOURCE"
2546	;;
2547(msys)
2548	cf_XOPEN_SOURCE=600
2549	;;
2550(darwin[0-8].*)
2551	cf_xopen_source="-D_APPLE_C_SOURCE"
2552	;;
2553(darwin*)
2554	cf_xopen_source="-D_DARWIN_C_SOURCE"
2555	cf_XOPEN_SOURCE=
2556	;;
2557(freebsd*|dragonfly*)
2558	# 5.x headers associate
2559	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
2560	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
2561	cf_POSIX_C_SOURCE=200112L
2562	cf_XOPEN_SOURCE=600
2563	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
2564	;;
2565(hpux11*)
2566	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
2567	;;
2568(hpux*)
2569	cf_xopen_source="-D_HPUX_SOURCE"
2570	;;
2571(irix[56].*)
2572	cf_xopen_source="-D_SGI_SOURCE"
2573	cf_XOPEN_SOURCE=
2574	;;
2575(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
2576
2577echo "$as_me:2577: checking if we must define _GNU_SOURCE" >&5
2578echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
2579if test "${cf_cv_gnu_source+set}" = set; then
2580  echo $ECHO_N "(cached) $ECHO_C" >&6
2581else
2582
2583cat >conftest.$ac_ext <<_ACEOF
2584#line 2584 "configure"
2585#include "confdefs.h"
2586#include <sys/types.h>
2587int
2588main (void)
2589{
2590
2591#ifndef _XOPEN_SOURCE
2592make an error
2593#endif
2594  ;
2595  return 0;
2596}
2597_ACEOF
2598rm -f conftest.$ac_objext
2599if { (eval echo "$as_me:2599: \"$ac_compile\"") >&5
2600  (eval $ac_compile) 2>&5
2601  ac_status=$?
2602  echo "$as_me:2602: \$? = $ac_status" >&5
2603  (exit $ac_status); } &&
2604         { ac_try='test -s conftest.$ac_objext'
2605  { (eval echo "$as_me:2605: \"$ac_try\"") >&5
2606  (eval $ac_try) 2>&5
2607  ac_status=$?
2608  echo "$as_me:2608: \$? = $ac_status" >&5
2609  (exit $ac_status); }; }; then
2610  cf_cv_gnu_source=no
2611else
2612  echo "$as_me: failed program was:" >&5
2613cat conftest.$ac_ext >&5
2614cf_save="$CPPFLAGS"
2615	 CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2616	 cat >conftest.$ac_ext <<_ACEOF
2617#line 2617 "configure"
2618#include "confdefs.h"
2619#include <sys/types.h>
2620int
2621main (void)
2622{
2623
2624#ifdef _XOPEN_SOURCE
2625make an error
2626#endif
2627  ;
2628  return 0;
2629}
2630_ACEOF
2631rm -f conftest.$ac_objext
2632if { (eval echo "$as_me:2632: \"$ac_compile\"") >&5
2633  (eval $ac_compile) 2>&5
2634  ac_status=$?
2635  echo "$as_me:2635: \$? = $ac_status" >&5
2636  (exit $ac_status); } &&
2637         { ac_try='test -s conftest.$ac_objext'
2638  { (eval echo "$as_me:2638: \"$ac_try\"") >&5
2639  (eval $ac_try) 2>&5
2640  ac_status=$?
2641  echo "$as_me:2641: \$? = $ac_status" >&5
2642  (exit $ac_status); }; }; then
2643  cf_cv_gnu_source=no
2644else
2645  echo "$as_me: failed program was:" >&5
2646cat conftest.$ac_ext >&5
2647cf_cv_gnu_source=yes
2648fi
2649rm -f conftest.$ac_objext conftest.$ac_ext
2650	CPPFLAGS="$cf_save"
2651
2652fi
2653rm -f conftest.$ac_objext conftest.$ac_ext
2654
2655fi
2656echo "$as_me:2656: result: $cf_cv_gnu_source" >&5
2657echo "${ECHO_T}$cf_cv_gnu_source" >&6
2658
2659if test "$cf_cv_gnu_source" = yes
2660then
2661echo "$as_me:2661: checking if we should also define _DEFAULT_SOURCE" >&5
2662echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
2663if test "${cf_cv_default_source+set}" = set; then
2664  echo $ECHO_N "(cached) $ECHO_C" >&6
2665else
2666
2667CPPFLAGS="$CPPFLAGS -D_GNU_SOURCE"
2668	cat >conftest.$ac_ext <<_ACEOF
2669#line 2669 "configure"
2670#include "confdefs.h"
2671#include <sys/types.h>
2672int
2673main (void)
2674{
2675
2676#ifdef _DEFAULT_SOURCE
2677make an error
2678#endif
2679  ;
2680  return 0;
2681}
2682_ACEOF
2683rm -f conftest.$ac_objext
2684if { (eval echo "$as_me:2684: \"$ac_compile\"") >&5
2685  (eval $ac_compile) 2>&5
2686  ac_status=$?
2687  echo "$as_me:2687: \$? = $ac_status" >&5
2688  (exit $ac_status); } &&
2689         { ac_try='test -s conftest.$ac_objext'
2690  { (eval echo "$as_me:2690: \"$ac_try\"") >&5
2691  (eval $ac_try) 2>&5
2692  ac_status=$?
2693  echo "$as_me:2693: \$? = $ac_status" >&5
2694  (exit $ac_status); }; }; then
2695  cf_cv_default_source=no
2696else
2697  echo "$as_me: failed program was:" >&5
2698cat conftest.$ac_ext >&5
2699cf_cv_default_source=yes
2700fi
2701rm -f conftest.$ac_objext conftest.$ac_ext
2702
2703fi
2704echo "$as_me:2704: result: $cf_cv_default_source" >&5
2705echo "${ECHO_T}$cf_cv_default_source" >&6
2706test "$cf_cv_default_source" = yes && CPPFLAGS="$CPPFLAGS -D_DEFAULT_SOURCE"
2707fi
2708
2709	;;
2710(minix*)
2711	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
2712	;;
2713(mirbsd*)
2714	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
2715	cf_XOPEN_SOURCE=
2716
2717cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
2718
2719cf_save_CFLAGS="$CFLAGS"
2720cf_save_CPPFLAGS="$CPPFLAGS"
2721
2722cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
2723	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2724		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2725
2726cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
2727	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
2728		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
2729
2730echo "$as_me:2730: checking if we should define _POSIX_C_SOURCE" >&5
2731echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
2732if test "${cf_cv_posix_c_source+set}" = set; then
2733  echo $ECHO_N "(cached) $ECHO_C" >&6
2734else
2735
2736echo "${as_me:-configure}:2736: testing if the symbol is already defined go no further ..." 1>&5
2737
2738	cat >conftest.$ac_ext <<_ACEOF
2739#line 2739 "configure"
2740#include "confdefs.h"
2741#include <sys/types.h>
2742int
2743main (void)
2744{
2745
2746#ifndef _POSIX_C_SOURCE
2747make an error
2748#endif
2749  ;
2750  return 0;
2751}
2752_ACEOF
2753rm -f conftest.$ac_objext
2754if { (eval echo "$as_me:2754: \"$ac_compile\"") >&5
2755  (eval $ac_compile) 2>&5
2756  ac_status=$?
2757  echo "$as_me:2757: \$? = $ac_status" >&5
2758  (exit $ac_status); } &&
2759         { ac_try='test -s conftest.$ac_objext'
2760  { (eval echo "$as_me:2760: \"$ac_try\"") >&5
2761  (eval $ac_try) 2>&5
2762  ac_status=$?
2763  echo "$as_me:2763: \$? = $ac_status" >&5
2764  (exit $ac_status); }; }; then
2765  cf_cv_posix_c_source=no
2766else
2767  echo "$as_me: failed program was:" >&5
2768cat conftest.$ac_ext >&5
2769cf_want_posix_source=no
2770	 case .$cf_POSIX_C_SOURCE in
2771	 (.[12]??*)
2772		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2773		;;
2774	 (.2)
2775		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
2776		cf_want_posix_source=yes
2777		;;
2778	 (.*)
2779		cf_want_posix_source=yes
2780		;;
2781	 esac
2782	 if test "$cf_want_posix_source" = yes ; then
2783		cat >conftest.$ac_ext <<_ACEOF
2784#line 2784 "configure"
2785#include "confdefs.h"
2786#include <sys/types.h>
2787int
2788main (void)
2789{
2790
2791#ifdef _POSIX_SOURCE
2792make an error
2793#endif
2794  ;
2795  return 0;
2796}
2797_ACEOF
2798rm -f conftest.$ac_objext
2799if { (eval echo "$as_me:2799: \"$ac_compile\"") >&5
2800  (eval $ac_compile) 2>&5
2801  ac_status=$?
2802  echo "$as_me:2802: \$? = $ac_status" >&5
2803  (exit $ac_status); } &&
2804         { ac_try='test -s conftest.$ac_objext'
2805  { (eval echo "$as_me:2805: \"$ac_try\"") >&5
2806  (eval $ac_try) 2>&5
2807  ac_status=$?
2808  echo "$as_me:2808: \$? = $ac_status" >&5
2809  (exit $ac_status); }; }; then
2810  :
2811else
2812  echo "$as_me: failed program was:" >&5
2813cat conftest.$ac_ext >&5
2814cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
2815fi
2816rm -f conftest.$ac_objext conftest.$ac_ext
2817	 fi
2818
2819echo "${as_me:-configure}:2819: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
2820
2821	 CFLAGS="$cf_trim_CFLAGS"
2822	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
2823
2824echo "${as_me:-configure}:2824: testing if the second compile does not leave our definition intact error ..." 1>&5
2825
2826	 cat >conftest.$ac_ext <<_ACEOF
2827#line 2827 "configure"
2828#include "confdefs.h"
2829#include <sys/types.h>
2830int
2831main (void)
2832{
2833
2834#ifndef _POSIX_C_SOURCE
2835make an error
2836#endif
2837  ;
2838  return 0;
2839}
2840_ACEOF
2841rm -f conftest.$ac_objext
2842if { (eval echo "$as_me:2842: \"$ac_compile\"") >&5
2843  (eval $ac_compile) 2>&5
2844  ac_status=$?
2845  echo "$as_me:2845: \$? = $ac_status" >&5
2846  (exit $ac_status); } &&
2847         { ac_try='test -s conftest.$ac_objext'
2848  { (eval echo "$as_me:2848: \"$ac_try\"") >&5
2849  (eval $ac_try) 2>&5
2850  ac_status=$?
2851  echo "$as_me:2851: \$? = $ac_status" >&5
2852  (exit $ac_status); }; }; then
2853  :
2854else
2855  echo "$as_me: failed program was:" >&5
2856cat conftest.$ac_ext >&5
2857cf_cv_posix_c_source=no
2858fi
2859rm -f conftest.$ac_objext conftest.$ac_ext
2860	 CFLAGS="$cf_save_CFLAGS"
2861	 CPPFLAGS="$cf_save_CPPFLAGS"
2862
2863fi
2864rm -f conftest.$ac_objext conftest.$ac_ext
2865
2866fi
2867echo "$as_me:2867: result: $cf_cv_posix_c_source" >&5
2868echo "${ECHO_T}$cf_cv_posix_c_source" >&6
2869
2870if test "$cf_cv_posix_c_source" != no ; then
2871	CFLAGS="$cf_trim_CFLAGS"
2872	CPPFLAGS="$cf_trim_CPPFLAGS"
2873
2874cf_fix_cppflags=no
2875cf_new_cflags=
2876cf_new_cppflags=
2877cf_new_extra_cppflags=
2878
2879for cf_add_cflags in $cf_cv_posix_c_source
2880do
2881case $cf_fix_cppflags in
2882(no)
2883	case $cf_add_cflags in
2884	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2885		case $cf_add_cflags in
2886		(-D*)
2887			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2888
2889			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2890				&& test -z "${cf_tst_cflags}" \
2891				&& cf_fix_cppflags=yes
2892
2893			if test $cf_fix_cppflags = yes ; then
2894
2895	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2896	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2897
2898				continue
2899			elif test "${cf_tst_cflags}" = "\"'" ; then
2900
2901	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2902	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2903
2904				continue
2905			fi
2906			;;
2907		esac
2908		case "$CPPFLAGS" in
2909		(*$cf_add_cflags)
2910			;;
2911		(*)
2912			case $cf_add_cflags in
2913			(-D*)
2914				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2915
2916CPPFLAGS=`echo "$CPPFLAGS" | \
2917	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2918		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2919
2920				;;
2921			esac
2922
2923	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2924	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2925
2926			;;
2927		esac
2928		;;
2929	(*)
2930
2931	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2932	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2933
2934		;;
2935	esac
2936	;;
2937(yes)
2938
2939	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2940	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2941
2942	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2943
2944	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2945		&& test -z "${cf_tst_cflags}" \
2946		&& cf_fix_cppflags=no
2947	;;
2948esac
2949done
2950
2951if test -n "$cf_new_cflags" ; then
2952
2953	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2954	CFLAGS="${CFLAGS}$cf_new_cflags"
2955
2956fi
2957
2958if test -n "$cf_new_cppflags" ; then
2959
2960	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2961	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2962
2963fi
2964
2965if test -n "$cf_new_extra_cppflags" ; then
2966
2967	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2968	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2969
2970fi
2971
2972fi
2973
2974	;;
2975(netbsd*)
2976	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
2977	;;
2978(openbsd[4-9]*)
2979	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
2980	cf_xopen_source="-D_BSD_SOURCE"
2981	cf_XOPEN_SOURCE=600
2982	;;
2983(openbsd*)
2984	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
2985	;;
2986(osf[45]*)
2987	cf_xopen_source="-D_OSF_SOURCE"
2988	;;
2989(nto-qnx*)
2990	cf_xopen_source="-D_QNX_SOURCE"
2991	;;
2992(sco*)
2993	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
2994	;;
2995(solaris2.*)
2996	cf_xopen_source="-D__EXTENSIONS__"
2997	cf_cv_xopen_source=broken
2998	;;
2999(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3000	cf_XOPEN_SOURCE=
3001	cf_POSIX_C_SOURCE=
3002	;;
3003(*)
3004
3005echo "$as_me:3005: checking if we should define _XOPEN_SOURCE" >&5
3006echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3007if test "${cf_cv_xopen_source+set}" = set; then
3008  echo $ECHO_N "(cached) $ECHO_C" >&6
3009else
3010
3011	cat >conftest.$ac_ext <<_ACEOF
3012#line 3012 "configure"
3013#include "confdefs.h"
3014
3015#include <stdlib.h>
3016#include <string.h>
3017#include <sys/types.h>
3018
3019int
3020main (void)
3021{
3022
3023#ifndef _XOPEN_SOURCE
3024make an error
3025#endif
3026  ;
3027  return 0;
3028}
3029_ACEOF
3030rm -f conftest.$ac_objext
3031if { (eval echo "$as_me:3031: \"$ac_compile\"") >&5
3032  (eval $ac_compile) 2>&5
3033  ac_status=$?
3034  echo "$as_me:3034: \$? = $ac_status" >&5
3035  (exit $ac_status); } &&
3036         { ac_try='test -s conftest.$ac_objext'
3037  { (eval echo "$as_me:3037: \"$ac_try\"") >&5
3038  (eval $ac_try) 2>&5
3039  ac_status=$?
3040  echo "$as_me:3040: \$? = $ac_status" >&5
3041  (exit $ac_status); }; }; then
3042  cf_cv_xopen_source=no
3043else
3044  echo "$as_me: failed program was:" >&5
3045cat conftest.$ac_ext >&5
3046cf_save="$CPPFLAGS"
3047	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3048	 cat >conftest.$ac_ext <<_ACEOF
3049#line 3049 "configure"
3050#include "confdefs.h"
3051
3052#include <stdlib.h>
3053#include <string.h>
3054#include <sys/types.h>
3055
3056int
3057main (void)
3058{
3059
3060#ifdef _XOPEN_SOURCE
3061make an error
3062#endif
3063  ;
3064  return 0;
3065}
3066_ACEOF
3067rm -f conftest.$ac_objext
3068if { (eval echo "$as_me:3068: \"$ac_compile\"") >&5
3069  (eval $ac_compile) 2>&5
3070  ac_status=$?
3071  echo "$as_me:3071: \$? = $ac_status" >&5
3072  (exit $ac_status); } &&
3073         { ac_try='test -s conftest.$ac_objext'
3074  { (eval echo "$as_me:3074: \"$ac_try\"") >&5
3075  (eval $ac_try) 2>&5
3076  ac_status=$?
3077  echo "$as_me:3077: \$? = $ac_status" >&5
3078  (exit $ac_status); }; }; then
3079  cf_cv_xopen_source=no
3080else
3081  echo "$as_me: failed program was:" >&5
3082cat conftest.$ac_ext >&5
3083cf_cv_xopen_source=$cf_XOPEN_SOURCE
3084fi
3085rm -f conftest.$ac_objext conftest.$ac_ext
3086	CPPFLAGS="$cf_save"
3087
3088fi
3089rm -f conftest.$ac_objext conftest.$ac_ext
3090
3091fi
3092echo "$as_me:3092: result: $cf_cv_xopen_source" >&5
3093echo "${ECHO_T}$cf_cv_xopen_source" >&6
3094
3095if test "$cf_cv_xopen_source" != no ; then
3096
3097CFLAGS=`echo "$CFLAGS" | \
3098	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3099		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3100
3101CPPFLAGS=`echo "$CPPFLAGS" | \
3102	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3103		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3104
3105	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3106
3107cf_fix_cppflags=no
3108cf_new_cflags=
3109cf_new_cppflags=
3110cf_new_extra_cppflags=
3111
3112for cf_add_cflags in $cf_temp_xopen_source
3113do
3114case $cf_fix_cppflags in
3115(no)
3116	case $cf_add_cflags in
3117	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3118		case $cf_add_cflags in
3119		(-D*)
3120			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3121
3122			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3123				&& test -z "${cf_tst_cflags}" \
3124				&& cf_fix_cppflags=yes
3125
3126			if test $cf_fix_cppflags = yes ; then
3127
3128	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3129	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3130
3131				continue
3132			elif test "${cf_tst_cflags}" = "\"'" ; then
3133
3134	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3135	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3136
3137				continue
3138			fi
3139			;;
3140		esac
3141		case "$CPPFLAGS" in
3142		(*$cf_add_cflags)
3143			;;
3144		(*)
3145			case $cf_add_cflags in
3146			(-D*)
3147				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3148
3149CPPFLAGS=`echo "$CPPFLAGS" | \
3150	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3151		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3152
3153				;;
3154			esac
3155
3156	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3157	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3158
3159			;;
3160		esac
3161		;;
3162	(*)
3163
3164	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3165	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3166
3167		;;
3168	esac
3169	;;
3170(yes)
3171
3172	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3173	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3174
3175	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3176
3177	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3178		&& test -z "${cf_tst_cflags}" \
3179		&& cf_fix_cppflags=no
3180	;;
3181esac
3182done
3183
3184if test -n "$cf_new_cflags" ; then
3185
3186	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3187	CFLAGS="${CFLAGS}$cf_new_cflags"
3188
3189fi
3190
3191if test -n "$cf_new_cppflags" ; then
3192
3193	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3194	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3195
3196fi
3197
3198if test -n "$cf_new_extra_cppflags" ; then
3199
3200	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3201	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3202
3203fi
3204
3205fi
3206
3207cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3208
3209cf_save_CFLAGS="$CFLAGS"
3210cf_save_CPPFLAGS="$CPPFLAGS"
3211
3212cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3213	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3214		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3215
3216cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3217	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3218		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3219
3220echo "$as_me:3220: checking if we should define _POSIX_C_SOURCE" >&5
3221echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3222if test "${cf_cv_posix_c_source+set}" = set; then
3223  echo $ECHO_N "(cached) $ECHO_C" >&6
3224else
3225
3226echo "${as_me:-configure}:3226: testing if the symbol is already defined go no further ..." 1>&5
3227
3228	cat >conftest.$ac_ext <<_ACEOF
3229#line 3229 "configure"
3230#include "confdefs.h"
3231#include <sys/types.h>
3232int
3233main (void)
3234{
3235
3236#ifndef _POSIX_C_SOURCE
3237make an error
3238#endif
3239  ;
3240  return 0;
3241}
3242_ACEOF
3243rm -f conftest.$ac_objext
3244if { (eval echo "$as_me:3244: \"$ac_compile\"") >&5
3245  (eval $ac_compile) 2>&5
3246  ac_status=$?
3247  echo "$as_me:3247: \$? = $ac_status" >&5
3248  (exit $ac_status); } &&
3249         { ac_try='test -s conftest.$ac_objext'
3250  { (eval echo "$as_me:3250: \"$ac_try\"") >&5
3251  (eval $ac_try) 2>&5
3252  ac_status=$?
3253  echo "$as_me:3253: \$? = $ac_status" >&5
3254  (exit $ac_status); }; }; then
3255  cf_cv_posix_c_source=no
3256else
3257  echo "$as_me: failed program was:" >&5
3258cat conftest.$ac_ext >&5
3259cf_want_posix_source=no
3260	 case .$cf_POSIX_C_SOURCE in
3261	 (.[12]??*)
3262		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3263		;;
3264	 (.2)
3265		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3266		cf_want_posix_source=yes
3267		;;
3268	 (.*)
3269		cf_want_posix_source=yes
3270		;;
3271	 esac
3272	 if test "$cf_want_posix_source" = yes ; then
3273		cat >conftest.$ac_ext <<_ACEOF
3274#line 3274 "configure"
3275#include "confdefs.h"
3276#include <sys/types.h>
3277int
3278main (void)
3279{
3280
3281#ifdef _POSIX_SOURCE
3282make an error
3283#endif
3284  ;
3285  return 0;
3286}
3287_ACEOF
3288rm -f conftest.$ac_objext
3289if { (eval echo "$as_me:3289: \"$ac_compile\"") >&5
3290  (eval $ac_compile) 2>&5
3291  ac_status=$?
3292  echo "$as_me:3292: \$? = $ac_status" >&5
3293  (exit $ac_status); } &&
3294         { ac_try='test -s conftest.$ac_objext'
3295  { (eval echo "$as_me:3295: \"$ac_try\"") >&5
3296  (eval $ac_try) 2>&5
3297  ac_status=$?
3298  echo "$as_me:3298: \$? = $ac_status" >&5
3299  (exit $ac_status); }; }; then
3300  :
3301else
3302  echo "$as_me: failed program was:" >&5
3303cat conftest.$ac_ext >&5
3304cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3305fi
3306rm -f conftest.$ac_objext conftest.$ac_ext
3307	 fi
3308
3309echo "${as_me:-configure}:3309: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3310
3311	 CFLAGS="$cf_trim_CFLAGS"
3312	 CPPFLAGS="$cf_trim_CPPFLAGS $cf_cv_posix_c_source"
3313
3314echo "${as_me:-configure}:3314: testing if the second compile does not leave our definition intact error ..." 1>&5
3315
3316	 cat >conftest.$ac_ext <<_ACEOF
3317#line 3317 "configure"
3318#include "confdefs.h"
3319#include <sys/types.h>
3320int
3321main (void)
3322{
3323
3324#ifndef _POSIX_C_SOURCE
3325make an error
3326#endif
3327  ;
3328  return 0;
3329}
3330_ACEOF
3331rm -f conftest.$ac_objext
3332if { (eval echo "$as_me:3332: \"$ac_compile\"") >&5
3333  (eval $ac_compile) 2>&5
3334  ac_status=$?
3335  echo "$as_me:3335: \$? = $ac_status" >&5
3336  (exit $ac_status); } &&
3337         { ac_try='test -s conftest.$ac_objext'
3338  { (eval echo "$as_me:3338: \"$ac_try\"") >&5
3339  (eval $ac_try) 2>&5
3340  ac_status=$?
3341  echo "$as_me:3341: \$? = $ac_status" >&5
3342  (exit $ac_status); }; }; then
3343  :
3344else
3345  echo "$as_me: failed program was:" >&5
3346cat conftest.$ac_ext >&5
3347cf_cv_posix_c_source=no
3348fi
3349rm -f conftest.$ac_objext conftest.$ac_ext
3350	 CFLAGS="$cf_save_CFLAGS"
3351	 CPPFLAGS="$cf_save_CPPFLAGS"
3352
3353fi
3354rm -f conftest.$ac_objext conftest.$ac_ext
3355
3356fi
3357echo "$as_me:3357: result: $cf_cv_posix_c_source" >&5
3358echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3359
3360if test "$cf_cv_posix_c_source" != no ; then
3361	CFLAGS="$cf_trim_CFLAGS"
3362	CPPFLAGS="$cf_trim_CPPFLAGS"
3363
3364cf_fix_cppflags=no
3365cf_new_cflags=
3366cf_new_cppflags=
3367cf_new_extra_cppflags=
3368
3369for cf_add_cflags in $cf_cv_posix_c_source
3370do
3371case $cf_fix_cppflags in
3372(no)
3373	case $cf_add_cflags in
3374	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3375		case $cf_add_cflags in
3376		(-D*)
3377			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3378
3379			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3380				&& test -z "${cf_tst_cflags}" \
3381				&& cf_fix_cppflags=yes
3382
3383			if test $cf_fix_cppflags = yes ; then
3384
3385	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3386	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3387
3388				continue
3389			elif test "${cf_tst_cflags}" = "\"'" ; then
3390
3391	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3392	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3393
3394				continue
3395			fi
3396			;;
3397		esac
3398		case "$CPPFLAGS" in
3399		(*$cf_add_cflags)
3400			;;
3401		(*)
3402			case $cf_add_cflags in
3403			(-D*)
3404				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3405
3406CPPFLAGS=`echo "$CPPFLAGS" | \
3407	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3408		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3409
3410				;;
3411			esac
3412
3413	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3414	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3415
3416			;;
3417		esac
3418		;;
3419	(*)
3420
3421	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3422	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3423
3424		;;
3425	esac
3426	;;
3427(yes)
3428
3429	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3430	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3431
3432	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3433
3434	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3435		&& test -z "${cf_tst_cflags}" \
3436		&& cf_fix_cppflags=no
3437	;;
3438esac
3439done
3440
3441if test -n "$cf_new_cflags" ; then
3442
3443	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3444	CFLAGS="${CFLAGS}$cf_new_cflags"
3445
3446fi
3447
3448if test -n "$cf_new_cppflags" ; then
3449
3450	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3451	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3452
3453fi
3454
3455if test -n "$cf_new_extra_cppflags" ; then
3456
3457	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3458	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3459
3460fi
3461
3462fi
3463
3464	;;
3465esac
3466
3467if test -n "$cf_xopen_source" ; then
3468
3469cf_fix_cppflags=no
3470cf_new_cflags=
3471cf_new_cppflags=
3472cf_new_extra_cppflags=
3473
3474for cf_add_cflags in $cf_xopen_source
3475do
3476case $cf_fix_cppflags in
3477(no)
3478	case $cf_add_cflags in
3479	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3480		case $cf_add_cflags in
3481		(-D*)
3482			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3483
3484			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3485				&& test -z "${cf_tst_cflags}" \
3486				&& cf_fix_cppflags=yes
3487
3488			if test $cf_fix_cppflags = yes ; then
3489
3490	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3491	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3492
3493				continue
3494			elif test "${cf_tst_cflags}" = "\"'" ; then
3495
3496	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3497	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3498
3499				continue
3500			fi
3501			;;
3502		esac
3503		case "$CPPFLAGS" in
3504		(*$cf_add_cflags)
3505			;;
3506		(*)
3507			case $cf_add_cflags in
3508			(-D*)
3509				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3510
3511CPPFLAGS=`echo "$CPPFLAGS" | \
3512	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3513		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3514
3515				;;
3516			esac
3517
3518	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3519	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3520
3521			;;
3522		esac
3523		;;
3524	(*)
3525
3526	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3527	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3528
3529		;;
3530	esac
3531	;;
3532(yes)
3533
3534	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3535	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3536
3537	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3538
3539	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3540		&& test -z "${cf_tst_cflags}" \
3541		&& cf_fix_cppflags=no
3542	;;
3543esac
3544done
3545
3546if test -n "$cf_new_cflags" ; then
3547	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
3548
3549echo "${as_me:-configure}:3549: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
3550
3551	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3552	CFLAGS="${CFLAGS}$cf_new_cflags"
3553
3554fi
3555
3556if test -n "$cf_new_cppflags" ; then
3557	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
3558
3559echo "${as_me:-configure}:3559: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
3560
3561	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3562	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3563
3564fi
3565
3566if test -n "$cf_new_extra_cppflags" ; then
3567	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
3568
3569echo "${as_me:-configure}:3569: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
3570
3571	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3572	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3573
3574fi
3575
3576fi
3577
3578if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
3579	echo "$as_me:3579: checking if _XOPEN_SOURCE really is set" >&5
3580echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
3581	cat >conftest.$ac_ext <<_ACEOF
3582#line 3582 "configure"
3583#include "confdefs.h"
3584#include <stdlib.h>
3585int
3586main (void)
3587{
3588
3589#ifndef _XOPEN_SOURCE
3590make an error
3591#endif
3592  ;
3593  return 0;
3594}
3595_ACEOF
3596rm -f conftest.$ac_objext
3597if { (eval echo "$as_me:3597: \"$ac_compile\"") >&5
3598  (eval $ac_compile) 2>&5
3599  ac_status=$?
3600  echo "$as_me:3600: \$? = $ac_status" >&5
3601  (exit $ac_status); } &&
3602         { ac_try='test -s conftest.$ac_objext'
3603  { (eval echo "$as_me:3603: \"$ac_try\"") >&5
3604  (eval $ac_try) 2>&5
3605  ac_status=$?
3606  echo "$as_me:3606: \$? = $ac_status" >&5
3607  (exit $ac_status); }; }; then
3608  cf_XOPEN_SOURCE_set=yes
3609else
3610  echo "$as_me: failed program was:" >&5
3611cat conftest.$ac_ext >&5
3612cf_XOPEN_SOURCE_set=no
3613fi
3614rm -f conftest.$ac_objext conftest.$ac_ext
3615	echo "$as_me:3615: result: $cf_XOPEN_SOURCE_set" >&5
3616echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
3617	if test $cf_XOPEN_SOURCE_set = yes
3618	then
3619		cat >conftest.$ac_ext <<_ACEOF
3620#line 3620 "configure"
3621#include "confdefs.h"
3622#include <stdlib.h>
3623int
3624main (void)
3625{
3626
3627#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
3628make an error
3629#endif
3630  ;
3631  return 0;
3632}
3633_ACEOF
3634rm -f conftest.$ac_objext
3635if { (eval echo "$as_me:3635: \"$ac_compile\"") >&5
3636  (eval $ac_compile) 2>&5
3637  ac_status=$?
3638  echo "$as_me:3638: \$? = $ac_status" >&5
3639  (exit $ac_status); } &&
3640         { ac_try='test -s conftest.$ac_objext'
3641  { (eval echo "$as_me:3641: \"$ac_try\"") >&5
3642  (eval $ac_try) 2>&5
3643  ac_status=$?
3644  echo "$as_me:3644: \$? = $ac_status" >&5
3645  (exit $ac_status); }; }; then
3646  cf_XOPEN_SOURCE_set_ok=yes
3647else
3648  echo "$as_me: failed program was:" >&5
3649cat conftest.$ac_ext >&5
3650cf_XOPEN_SOURCE_set_ok=no
3651fi
3652rm -f conftest.$ac_objext conftest.$ac_ext
3653		if test $cf_XOPEN_SOURCE_set_ok = no
3654		then
3655			{ echo "$as_me:3655: WARNING: _XOPEN_SOURCE is lower than requested" >&5
3656echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
3657		fi
3658	else
3659
3660echo "$as_me:3660: checking if we should define _XOPEN_SOURCE" >&5
3661echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3662if test "${cf_cv_xopen_source+set}" = set; then
3663  echo $ECHO_N "(cached) $ECHO_C" >&6
3664else
3665
3666	cat >conftest.$ac_ext <<_ACEOF
3667#line 3667 "configure"
3668#include "confdefs.h"
3669
3670#include <stdlib.h>
3671#include <string.h>
3672#include <sys/types.h>
3673
3674int
3675main (void)
3676{
3677
3678#ifndef _XOPEN_SOURCE
3679make an error
3680#endif
3681  ;
3682  return 0;
3683}
3684_ACEOF
3685rm -f conftest.$ac_objext
3686if { (eval echo "$as_me:3686: \"$ac_compile\"") >&5
3687  (eval $ac_compile) 2>&5
3688  ac_status=$?
3689  echo "$as_me:3689: \$? = $ac_status" >&5
3690  (exit $ac_status); } &&
3691         { ac_try='test -s conftest.$ac_objext'
3692  { (eval echo "$as_me:3692: \"$ac_try\"") >&5
3693  (eval $ac_try) 2>&5
3694  ac_status=$?
3695  echo "$as_me:3695: \$? = $ac_status" >&5
3696  (exit $ac_status); }; }; then
3697  cf_cv_xopen_source=no
3698else
3699  echo "$as_me: failed program was:" >&5
3700cat conftest.$ac_ext >&5
3701cf_save="$CPPFLAGS"
3702	 CPPFLAGS="$CPPFLAGS -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3703	 cat >conftest.$ac_ext <<_ACEOF
3704#line 3704 "configure"
3705#include "confdefs.h"
3706
3707#include <stdlib.h>
3708#include <string.h>
3709#include <sys/types.h>
3710
3711int
3712main (void)
3713{
3714
3715#ifdef _XOPEN_SOURCE
3716make an error
3717#endif
3718  ;
3719  return 0;
3720}
3721_ACEOF
3722rm -f conftest.$ac_objext
3723if { (eval echo "$as_me:3723: \"$ac_compile\"") >&5
3724  (eval $ac_compile) 2>&5
3725  ac_status=$?
3726  echo "$as_me:3726: \$? = $ac_status" >&5
3727  (exit $ac_status); } &&
3728         { ac_try='test -s conftest.$ac_objext'
3729  { (eval echo "$as_me:3729: \"$ac_try\"") >&5
3730  (eval $ac_try) 2>&5
3731  ac_status=$?
3732  echo "$as_me:3732: \$? = $ac_status" >&5
3733  (exit $ac_status); }; }; then
3734  cf_cv_xopen_source=no
3735else
3736  echo "$as_me: failed program was:" >&5
3737cat conftest.$ac_ext >&5
3738cf_cv_xopen_source=$cf_XOPEN_SOURCE
3739fi
3740rm -f conftest.$ac_objext conftest.$ac_ext
3741	CPPFLAGS="$cf_save"
3742
3743fi
3744rm -f conftest.$ac_objext conftest.$ac_ext
3745
3746fi
3747echo "$as_me:3747: result: $cf_cv_xopen_source" >&5
3748echo "${ECHO_T}$cf_cv_xopen_source" >&6
3749
3750if test "$cf_cv_xopen_source" != no ; then
3751
3752CFLAGS=`echo "$CFLAGS" | \
3753	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3754		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3755
3756CPPFLAGS=`echo "$CPPFLAGS" | \
3757	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3758		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
3759
3760	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
3761
3762cf_fix_cppflags=no
3763cf_new_cflags=
3764cf_new_cppflags=
3765cf_new_extra_cppflags=
3766
3767for cf_add_cflags in $cf_temp_xopen_source
3768do
3769case $cf_fix_cppflags in
3770(no)
3771	case $cf_add_cflags in
3772	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3773		case $cf_add_cflags in
3774		(-D*)
3775			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3776
3777			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3778				&& test -z "${cf_tst_cflags}" \
3779				&& cf_fix_cppflags=yes
3780
3781			if test $cf_fix_cppflags = yes ; then
3782
3783	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3784	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3785
3786				continue
3787			elif test "${cf_tst_cflags}" = "\"'" ; then
3788
3789	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3790	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3791
3792				continue
3793			fi
3794			;;
3795		esac
3796		case "$CPPFLAGS" in
3797		(*$cf_add_cflags)
3798			;;
3799		(*)
3800			case $cf_add_cflags in
3801			(-D*)
3802				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3803
3804CPPFLAGS=`echo "$CPPFLAGS" | \
3805	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3806		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3807
3808				;;
3809			esac
3810
3811	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3812	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3813
3814			;;
3815		esac
3816		;;
3817	(*)
3818
3819	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3820	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3821
3822		;;
3823	esac
3824	;;
3825(yes)
3826
3827	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3828	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3829
3830	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3831
3832	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3833		&& test -z "${cf_tst_cflags}" \
3834		&& cf_fix_cppflags=no
3835	;;
3836esac
3837done
3838
3839if test -n "$cf_new_cflags" ; then
3840
3841	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3842	CFLAGS="${CFLAGS}$cf_new_cflags"
3843
3844fi
3845
3846if test -n "$cf_new_cppflags" ; then
3847
3848	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3849	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3850
3851fi
3852
3853if test -n "$cf_new_extra_cppflags" ; then
3854
3855	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3856	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3857
3858fi
3859
3860fi
3861
3862	fi
3863fi
3864
3865echo "$as_me:3865: checking if SIGWINCH is defined" >&5
3866echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
3867if test "${cf_cv_define_sigwinch+set}" = set; then
3868  echo $ECHO_N "(cached) $ECHO_C" >&6
3869else
3870
3871	cat >conftest.$ac_ext <<_ACEOF
3872#line 3872 "configure"
3873#include "confdefs.h"
3874
3875#include <sys/types.h>
3876#include <sys/signal.h>
3877
3878int
3879main (void)
3880{
3881int x = SIGWINCH
3882  ;
3883  return 0;
3884}
3885_ACEOF
3886rm -f conftest.$ac_objext
3887if { (eval echo "$as_me:3887: \"$ac_compile\"") >&5
3888  (eval $ac_compile) 2>&5
3889  ac_status=$?
3890  echo "$as_me:3890: \$? = $ac_status" >&5
3891  (exit $ac_status); } &&
3892         { ac_try='test -s conftest.$ac_objext'
3893  { (eval echo "$as_me:3893: \"$ac_try\"") >&5
3894  (eval $ac_try) 2>&5
3895  ac_status=$?
3896  echo "$as_me:3896: \$? = $ac_status" >&5
3897  (exit $ac_status); }; }; then
3898  cf_cv_define_sigwinch=yes
3899else
3900  echo "$as_me: failed program was:" >&5
3901cat conftest.$ac_ext >&5
3902cat >conftest.$ac_ext <<_ACEOF
3903#line 3903 "configure"
3904#include "confdefs.h"
3905
3906#undef _XOPEN_SOURCE
3907#undef _POSIX_SOURCE
3908#undef _POSIX_C_SOURCE
3909#include <sys/types.h>
3910#include <sys/signal.h>
3911
3912int
3913main (void)
3914{
3915int x = SIGWINCH
3916  ;
3917  return 0;
3918}
3919_ACEOF
3920rm -f conftest.$ac_objext
3921if { (eval echo "$as_me:3921: \"$ac_compile\"") >&5
3922  (eval $ac_compile) 2>&5
3923  ac_status=$?
3924  echo "$as_me:3924: \$? = $ac_status" >&5
3925  (exit $ac_status); } &&
3926         { ac_try='test -s conftest.$ac_objext'
3927  { (eval echo "$as_me:3927: \"$ac_try\"") >&5
3928  (eval $ac_try) 2>&5
3929  ac_status=$?
3930  echo "$as_me:3930: \$? = $ac_status" >&5
3931  (exit $ac_status); }; }; then
3932  cf_cv_define_sigwinch=maybe
3933else
3934  echo "$as_me: failed program was:" >&5
3935cat conftest.$ac_ext >&5
3936cf_cv_define_sigwinch=no
3937fi
3938rm -f conftest.$ac_objext conftest.$ac_ext
3939
3940fi
3941rm -f conftest.$ac_objext conftest.$ac_ext
3942
3943fi
3944echo "$as_me:3944: result: $cf_cv_define_sigwinch" >&5
3945echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
3946
3947if test "$cf_cv_define_sigwinch" = maybe ; then
3948echo "$as_me:3948: checking for actual SIGWINCH definition" >&5
3949echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
3950if test "${cf_cv_fixup_sigwinch+set}" = set; then
3951  echo $ECHO_N "(cached) $ECHO_C" >&6
3952else
3953
3954cf_cv_fixup_sigwinch=unknown
3955cf_sigwinch=32
3956while test $cf_sigwinch != 1
3957do
3958	cat >conftest.$ac_ext <<_ACEOF
3959#line 3959 "configure"
3960#include "confdefs.h"
3961
3962#undef _XOPEN_SOURCE
3963#undef _POSIX_SOURCE
3964#undef _POSIX_C_SOURCE
3965#include <sys/types.h>
3966#include <sys/signal.h>
3967
3968int
3969main (void)
3970{
3971
3972#if SIGWINCH != $cf_sigwinch
3973make an error
3974#endif
3975int x = SIGWINCH
3976  ;
3977  return 0;
3978}
3979_ACEOF
3980rm -f conftest.$ac_objext
3981if { (eval echo "$as_me:3981: \"$ac_compile\"") >&5
3982  (eval $ac_compile) 2>&5
3983  ac_status=$?
3984  echo "$as_me:3984: \$? = $ac_status" >&5
3985  (exit $ac_status); } &&
3986         { ac_try='test -s conftest.$ac_objext'
3987  { (eval echo "$as_me:3987: \"$ac_try\"") >&5
3988  (eval $ac_try) 2>&5
3989  ac_status=$?
3990  echo "$as_me:3990: \$? = $ac_status" >&5
3991  (exit $ac_status); }; }; then
3992  cf_cv_fixup_sigwinch=$cf_sigwinch
3993	 break
3994else
3995  echo "$as_me: failed program was:" >&5
3996cat conftest.$ac_ext >&5
3997fi
3998rm -f conftest.$ac_objext conftest.$ac_ext
3999
4000cf_sigwinch=`expr $cf_sigwinch - 1`
4001done
4002
4003fi
4004echo "$as_me:4004: result: $cf_cv_fixup_sigwinch" >&5
4005echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4006
4007	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4008		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4009	fi
4010fi
4011
4012###	checks for header files
4013
4014for ac_header in \
4015ncurses/curses.h \
4016ncurses/term.h \
4017stdlib.h \
4018sys/ptem.h sys/ttydefaults.h \
4019term.h \
4020termios.h \
4021unistd.h \
4022wchar.h \
4023
4024do
4025as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4026echo "$as_me:4026: checking for $ac_header" >&5
4027echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4028if eval "test \"\${$as_ac_Header+set}\" = set"; then
4029  echo $ECHO_N "(cached) $ECHO_C" >&6
4030else
4031  cat >conftest.$ac_ext <<_ACEOF
4032#line 4032 "configure"
4033#include "confdefs.h"
4034#include <$ac_header>
4035_ACEOF
4036if { (eval echo "$as_me:4036: \"$ac_cpp conftest.$ac_ext\"") >&5
4037  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4038  ac_status=$?
4039  egrep -v '^ *\+' conftest.er1 >conftest.err
4040  rm -f conftest.er1
4041  cat conftest.err >&5
4042  echo "$as_me:4042: \$? = $ac_status" >&5
4043  (exit $ac_status); } >/dev/null; then
4044  if test -s conftest.err; then
4045    ac_cpp_err=$ac_c_preproc_warn_flag
4046  else
4047    ac_cpp_err=
4048  fi
4049else
4050  ac_cpp_err=yes
4051fi
4052if test -z "$ac_cpp_err"; then
4053  eval "$as_ac_Header=yes"
4054else
4055  echo "$as_me: failed program was:" >&5
4056  cat conftest.$ac_ext >&5
4057  eval "$as_ac_Header=no"
4058fi
4059rm -f conftest.err conftest.$ac_ext
4060fi
4061echo "$as_me:4061: result: `eval echo '${'$as_ac_Header'}'`" >&5
4062echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4063if test `eval echo '${'$as_ac_Header'}'` = yes; then
4064  cat >>confdefs.h <<EOF
4065#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4066EOF
4067
4068fi
4069done
4070
4071echo "$as_me:4071: checking whether time.h and sys/time.h may both be included" >&5
4072echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
4073if test "${ac_cv_header_time+set}" = set; then
4074  echo $ECHO_N "(cached) $ECHO_C" >&6
4075else
4076  cat >conftest.$ac_ext <<_ACEOF
4077#line 4077 "configure"
4078#include "confdefs.h"
4079#include <sys/types.h>
4080#include <sys/time.h>
4081#include <time.h>
4082
4083int
4084main (void)
4085{
4086if ((struct tm *) 0)
4087return 0;
4088  ;
4089  return 0;
4090}
4091_ACEOF
4092rm -f conftest.$ac_objext
4093if { (eval echo "$as_me:4093: \"$ac_compile\"") >&5
4094  (eval $ac_compile) 2>&5
4095  ac_status=$?
4096  echo "$as_me:4096: \$? = $ac_status" >&5
4097  (exit $ac_status); } &&
4098         { ac_try='test -s conftest.$ac_objext'
4099  { (eval echo "$as_me:4099: \"$ac_try\"") >&5
4100  (eval $ac_try) 2>&5
4101  ac_status=$?
4102  echo "$as_me:4102: \$? = $ac_status" >&5
4103  (exit $ac_status); }; }; then
4104  ac_cv_header_time=yes
4105else
4106  echo "$as_me: failed program was:" >&5
4107cat conftest.$ac_ext >&5
4108ac_cv_header_time=no
4109fi
4110rm -f conftest.$ac_objext conftest.$ac_ext
4111fi
4112echo "$as_me:4112: result: $ac_cv_header_time" >&5
4113echo "${ECHO_T}$ac_cv_header_time" >&6
4114if test $ac_cv_header_time = yes; then
4115
4116cat >>confdefs.h <<\EOF
4117#define TIME_WITH_SYS_TIME 1
4118EOF
4119
4120fi
4121
4122echo "$as_me:4122: checking for nl_langinfo and CODESET" >&5
4123echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
4124if test "${am_cv_langinfo_codeset+set}" = set; then
4125  echo $ECHO_N "(cached) $ECHO_C" >&6
4126else
4127  cat >conftest.$ac_ext <<_ACEOF
4128#line 4128 "configure"
4129#include "confdefs.h"
4130#include <langinfo.h>
4131int
4132main (void)
4133{
4134char* cs = nl_langinfo(CODESET);
4135  ;
4136  return 0;
4137}
4138_ACEOF
4139rm -f conftest.$ac_objext conftest$ac_exeext
4140if { (eval echo "$as_me:4140: \"$ac_link\"") >&5
4141  (eval $ac_link) 2>&5
4142  ac_status=$?
4143  echo "$as_me:4143: \$? = $ac_status" >&5
4144  (exit $ac_status); } &&
4145         { ac_try='test -s conftest$ac_exeext'
4146  { (eval echo "$as_me:4146: \"$ac_try\"") >&5
4147  (eval $ac_try) 2>&5
4148  ac_status=$?
4149  echo "$as_me:4149: \$? = $ac_status" >&5
4150  (exit $ac_status); }; }; then
4151  am_cv_langinfo_codeset=yes
4152else
4153  echo "$as_me: failed program was:" >&5
4154cat conftest.$ac_ext >&5
4155am_cv_langinfo_codeset=no
4156fi
4157rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4158
4159fi
4160echo "$as_me:4160: result: $am_cv_langinfo_codeset" >&5
4161echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
4162	if test $am_cv_langinfo_codeset = yes; then
4163
4164cat >>confdefs.h <<\EOF
4165#define HAVE_LANGINFO_CODESET 1
4166EOF
4167
4168	fi
4169
4170###	checks for typedefs
4171
4172echo "$as_me:4172: checking for signal global datatype" >&5
4173echo $ECHO_N "checking for signal global datatype... $ECHO_C" >&6
4174if test "${cf_cv_sig_atomic_t+set}" = set; then
4175  echo $ECHO_N "(cached) $ECHO_C" >&6
4176else
4177
4178	for cf_type in \
4179		"volatile sig_atomic_t" \
4180		"sig_atomic_t" \
4181		"int"
4182	do
4183	cat >conftest.$ac_ext <<_ACEOF
4184#line 4184 "configure"
4185#include "confdefs.h"
4186
4187#include <sys/types.h>
4188#include <signal.h>
4189#include <stdio.h>
4190
4191extern $cf_type x;
4192$cf_type x;
4193static void handler(int sig)
4194{
4195	x = 5;
4196}
4197int
4198main (void)
4199{
4200signal(SIGINT, handler);
4201		 x = 1
4202  ;
4203  return 0;
4204}
4205_ACEOF
4206rm -f conftest.$ac_objext
4207if { (eval echo "$as_me:4207: \"$ac_compile\"") >&5
4208  (eval $ac_compile) 2>&5
4209  ac_status=$?
4210  echo "$as_me:4210: \$? = $ac_status" >&5
4211  (exit $ac_status); } &&
4212         { ac_try='test -s conftest.$ac_objext'
4213  { (eval echo "$as_me:4213: \"$ac_try\"") >&5
4214  (eval $ac_try) 2>&5
4215  ac_status=$?
4216  echo "$as_me:4216: \$? = $ac_status" >&5
4217  (exit $ac_status); }; }; then
4218  cf_cv_sig_atomic_t=$cf_type
4219else
4220  echo "$as_me: failed program was:" >&5
4221cat conftest.$ac_ext >&5
4222cf_cv_sig_atomic_t=no
4223fi
4224rm -f conftest.$ac_objext conftest.$ac_ext
4225		test "$cf_cv_sig_atomic_t" != no && break
4226	done
4227
4228fi
4229
4230echo "$as_me:4230: result: $cf_cv_sig_atomic_t" >&5
4231echo "${ECHO_T}$cf_cv_sig_atomic_t" >&6
4232test "$cf_cv_sig_atomic_t" != no &&
4233cat >>confdefs.h <<EOF
4234#define SIG_ATOMIC_T $cf_cv_sig_atomic_t
4235EOF
4236
4237echo "$as_me:4237: checking for ANSI C header files" >&5
4238echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
4239if test "${ac_cv_header_stdc+set}" = set; then
4240  echo $ECHO_N "(cached) $ECHO_C" >&6
4241else
4242  cat >conftest.$ac_ext <<_ACEOF
4243#line 4243 "configure"
4244#include "confdefs.h"
4245#include <stdlib.h>
4246#include <stdarg.h>
4247#include <string.h>
4248#include <float.h>
4249
4250_ACEOF
4251if { (eval echo "$as_me:4251: \"$ac_cpp conftest.$ac_ext\"") >&5
4252  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4253  ac_status=$?
4254  egrep -v '^ *\+' conftest.er1 >conftest.err
4255  rm -f conftest.er1
4256  cat conftest.err >&5
4257  echo "$as_me:4257: \$? = $ac_status" >&5
4258  (exit $ac_status); } >/dev/null; then
4259  if test -s conftest.err; then
4260    ac_cpp_err=$ac_c_preproc_warn_flag
4261  else
4262    ac_cpp_err=
4263  fi
4264else
4265  ac_cpp_err=yes
4266fi
4267if test -z "$ac_cpp_err"; then
4268  ac_cv_header_stdc=yes
4269else
4270  echo "$as_me: failed program was:" >&5
4271  cat conftest.$ac_ext >&5
4272  ac_cv_header_stdc=no
4273fi
4274rm -f conftest.err conftest.$ac_ext
4275
4276if test $ac_cv_header_stdc = yes; then
4277  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
4278  cat >conftest.$ac_ext <<_ACEOF
4279#line 4279 "configure"
4280#include "confdefs.h"
4281#include <string.h>
4282
4283_ACEOF
4284if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4285  egrep "memchr" >/dev/null 2>&1; then
4286  :
4287else
4288  ac_cv_header_stdc=no
4289fi
4290rm -rf conftest*
4291
4292fi
4293
4294if test $ac_cv_header_stdc = yes; then
4295  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
4296  cat >conftest.$ac_ext <<_ACEOF
4297#line 4297 "configure"
4298#include "confdefs.h"
4299#include <stdlib.h>
4300
4301_ACEOF
4302if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4303  egrep "free" >/dev/null 2>&1; then
4304  :
4305else
4306  ac_cv_header_stdc=no
4307fi
4308rm -rf conftest*
4309
4310fi
4311
4312if test $ac_cv_header_stdc = yes; then
4313  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
4314  if test "$cross_compiling" = yes; then
4315  :
4316else
4317  cat >conftest.$ac_ext <<_ACEOF
4318#line 4318 "configure"
4319#include "confdefs.h"
4320#include <ctype.h>
4321#if ((' ' & 0x0FF) == 0x020)
4322# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
4323# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
4324#else
4325# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
4326                     || ('j' <= (c) && (c) <= 'r') \
4327                     || ('s' <= (c) && (c) <= 'z'))
4328# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
4329#endif
4330
4331#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
4332int
4333main (void)
4334{
4335  int i;
4336  for (i = 0; i < 256; i++)
4337    if (XOR (islower (i), ISLOWER (i))
4338        || toupper (i) != TOUPPER (i))
4339      $ac_main_return(2);
4340  $ac_main_return (0);
4341}
4342_ACEOF
4343rm -f conftest$ac_exeext
4344if { (eval echo "$as_me:4344: \"$ac_link\"") >&5
4345  (eval $ac_link) 2>&5
4346  ac_status=$?
4347  echo "$as_me:4347: \$? = $ac_status" >&5
4348  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
4349  { (eval echo "$as_me:4349: \"$ac_try\"") >&5
4350  (eval $ac_try) 2>&5
4351  ac_status=$?
4352  echo "$as_me:4352: \$? = $ac_status" >&5
4353  (exit $ac_status); }; }; then
4354  :
4355else
4356  echo "$as_me: program exited with status $ac_status" >&5
4357echo "$as_me: failed program was:" >&5
4358cat conftest.$ac_ext >&5
4359ac_cv_header_stdc=no
4360fi
4361rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
4362fi
4363fi
4364fi
4365echo "$as_me:4365: result: $ac_cv_header_stdc" >&5
4366echo "${ECHO_T}$ac_cv_header_stdc" >&6
4367if test $ac_cv_header_stdc = yes; then
4368
4369cat >>confdefs.h <<\EOF
4370#define STDC_HEADERS 1
4371EOF
4372
4373fi
4374
4375# On IRIX 5.3, sys/types and inttypes.h are conflicting.
4376
4377for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
4378                  inttypes.h stdint.h unistd.h
4379do
4380as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4381echo "$as_me:4381: checking for $ac_header" >&5
4382echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4383if eval "test \"\${$as_ac_Header+set}\" = set"; then
4384  echo $ECHO_N "(cached) $ECHO_C" >&6
4385else
4386  cat >conftest.$ac_ext <<_ACEOF
4387#line 4387 "configure"
4388#include "confdefs.h"
4389$ac_includes_default
4390#include <$ac_header>
4391_ACEOF
4392rm -f conftest.$ac_objext
4393if { (eval echo "$as_me:4393: \"$ac_compile\"") >&5
4394  (eval $ac_compile) 2>&5
4395  ac_status=$?
4396  echo "$as_me:4396: \$? = $ac_status" >&5
4397  (exit $ac_status); } &&
4398         { ac_try='test -s conftest.$ac_objext'
4399  { (eval echo "$as_me:4399: \"$ac_try\"") >&5
4400  (eval $ac_try) 2>&5
4401  ac_status=$?
4402  echo "$as_me:4402: \$? = $ac_status" >&5
4403  (exit $ac_status); }; }; then
4404  eval "$as_ac_Header=yes"
4405else
4406  echo "$as_me: failed program was:" >&5
4407cat conftest.$ac_ext >&5
4408eval "$as_ac_Header=no"
4409fi
4410rm -f conftest.$ac_objext conftest.$ac_ext
4411fi
4412echo "$as_me:4412: result: `eval echo '${'$as_ac_Header'}'`" >&5
4413echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4414if test `eval echo '${'$as_ac_Header'}'` = yes; then
4415  cat >>confdefs.h <<EOF
4416#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4417EOF
4418
4419fi
4420done
4421
4422echo "$as_me:4422: checking for time_t" >&5
4423echo $ECHO_N "checking for time_t... $ECHO_C" >&6
4424if test "${ac_cv_type_time_t+set}" = set; then
4425  echo $ECHO_N "(cached) $ECHO_C" >&6
4426else
4427  cat >conftest.$ac_ext <<_ACEOF
4428#line 4428 "configure"
4429#include "confdefs.h"
4430$ac_includes_default
4431int
4432main (void)
4433{
4434if ((time_t *) 0)
4435  return 0;
4436if (sizeof (time_t))
4437  return 0;
4438  ;
4439  return 0;
4440}
4441_ACEOF
4442rm -f conftest.$ac_objext
4443if { (eval echo "$as_me:4443: \"$ac_compile\"") >&5
4444  (eval $ac_compile) 2>&5
4445  ac_status=$?
4446  echo "$as_me:4446: \$? = $ac_status" >&5
4447  (exit $ac_status); } &&
4448         { ac_try='test -s conftest.$ac_objext'
4449  { (eval echo "$as_me:4449: \"$ac_try\"") >&5
4450  (eval $ac_try) 2>&5
4451  ac_status=$?
4452  echo "$as_me:4452: \$? = $ac_status" >&5
4453  (exit $ac_status); }; }; then
4454  ac_cv_type_time_t=yes
4455else
4456  echo "$as_me: failed program was:" >&5
4457cat conftest.$ac_ext >&5
4458ac_cv_type_time_t=no
4459fi
4460rm -f conftest.$ac_objext conftest.$ac_ext
4461fi
4462echo "$as_me:4462: result: $ac_cv_type_time_t" >&5
4463echo "${ECHO_T}$ac_cv_type_time_t" >&6
4464if test $ac_cv_type_time_t = yes; then
4465  :
4466else
4467
4468cat >>confdefs.h <<EOF
4469#define time_t long
4470EOF
4471
4472fi
4473
4474echo "$as_me:4474: checking for cc_t in <termios.h> or <termio.h>" >&5
4475echo $ECHO_N "checking for cc_t in <termios.h> or <termio.h>... $ECHO_C" >&6
4476if test "${cf_cv_type_cc_t+set}" = set; then
4477  echo $ECHO_N "(cached) $ECHO_C" >&6
4478else
4479
4480	cat >conftest.$ac_ext <<_ACEOF
4481#line 4481 "configure"
4482#include "confdefs.h"
4483
4484#include <sys/types.h>
4485#if defined(HAVE_TERMIOS_H)
4486#include <termios.h>
4487#else
4488#include <termio.h>
4489#include <sys/ioctl.h>
4490#endif
4491
4492int
4493main (void)
4494{
4495cc_t x
4496  ;
4497  return 0;
4498}
4499_ACEOF
4500rm -f conftest.$ac_objext
4501if { (eval echo "$as_me:4501: \"$ac_compile\"") >&5
4502  (eval $ac_compile) 2>&5
4503  ac_status=$?
4504  echo "$as_me:4504: \$? = $ac_status" >&5
4505  (exit $ac_status); } &&
4506         { ac_try='test -s conftest.$ac_objext'
4507  { (eval echo "$as_me:4507: \"$ac_try\"") >&5
4508  (eval $ac_try) 2>&5
4509  ac_status=$?
4510  echo "$as_me:4510: \$? = $ac_status" >&5
4511  (exit $ac_status); }; }; then
4512  cf_cv_type_cc_t=yes
4513else
4514  echo "$as_me: failed program was:" >&5
4515cat conftest.$ac_ext >&5
4516cf_cv_type_cc_t=no
4517fi
4518rm -f conftest.$ac_objext conftest.$ac_ext
4519
4520fi
4521
4522echo "$as_me:4522: result: $cf_cv_type_cc_t" >&5
4523echo "${ECHO_T}$cf_cv_type_cc_t" >&6
4524test $cf_cv_type_cc_t = no &&
4525cat >>confdefs.h <<\EOF
4526#define cc_t unsigned char
4527EOF
4528
4529echo "$as_me:4529: checking for mode_t" >&5
4530echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
4531if test "${ac_cv_type_mode_t+set}" = set; then
4532  echo $ECHO_N "(cached) $ECHO_C" >&6
4533else
4534  cat >conftest.$ac_ext <<_ACEOF
4535#line 4535 "configure"
4536#include "confdefs.h"
4537$ac_includes_default
4538int
4539main (void)
4540{
4541if ((mode_t *) 0)
4542  return 0;
4543if (sizeof (mode_t))
4544  return 0;
4545  ;
4546  return 0;
4547}
4548_ACEOF
4549rm -f conftest.$ac_objext
4550if { (eval echo "$as_me:4550: \"$ac_compile\"") >&5
4551  (eval $ac_compile) 2>&5
4552  ac_status=$?
4553  echo "$as_me:4553: \$? = $ac_status" >&5
4554  (exit $ac_status); } &&
4555         { ac_try='test -s conftest.$ac_objext'
4556  { (eval echo "$as_me:4556: \"$ac_try\"") >&5
4557  (eval $ac_try) 2>&5
4558  ac_status=$?
4559  echo "$as_me:4559: \$? = $ac_status" >&5
4560  (exit $ac_status); }; }; then
4561  ac_cv_type_mode_t=yes
4562else
4563  echo "$as_me: failed program was:" >&5
4564cat conftest.$ac_ext >&5
4565ac_cv_type_mode_t=no
4566fi
4567rm -f conftest.$ac_objext conftest.$ac_ext
4568fi
4569echo "$as_me:4569: result: $ac_cv_type_mode_t" >&5
4570echo "${ECHO_T}$ac_cv_type_mode_t" >&6
4571if test $ac_cv_type_mode_t = yes; then
4572  :
4573else
4574
4575cat >>confdefs.h <<EOF
4576#define mode_t int
4577EOF
4578
4579fi
4580
4581echo "$as_me:4581: checking for pid_t" >&5
4582echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
4583if test "${ac_cv_type_pid_t+set}" = set; then
4584  echo $ECHO_N "(cached) $ECHO_C" >&6
4585else
4586  cat >conftest.$ac_ext <<_ACEOF
4587#line 4587 "configure"
4588#include "confdefs.h"
4589$ac_includes_default
4590int
4591main (void)
4592{
4593if ((pid_t *) 0)
4594  return 0;
4595if (sizeof (pid_t))
4596  return 0;
4597  ;
4598  return 0;
4599}
4600_ACEOF
4601rm -f conftest.$ac_objext
4602if { (eval echo "$as_me:4602: \"$ac_compile\"") >&5
4603  (eval $ac_compile) 2>&5
4604  ac_status=$?
4605  echo "$as_me:4605: \$? = $ac_status" >&5
4606  (exit $ac_status); } &&
4607         { ac_try='test -s conftest.$ac_objext'
4608  { (eval echo "$as_me:4608: \"$ac_try\"") >&5
4609  (eval $ac_try) 2>&5
4610  ac_status=$?
4611  echo "$as_me:4611: \$? = $ac_status" >&5
4612  (exit $ac_status); }; }; then
4613  ac_cv_type_pid_t=yes
4614else
4615  echo "$as_me: failed program was:" >&5
4616cat conftest.$ac_ext >&5
4617ac_cv_type_pid_t=no
4618fi
4619rm -f conftest.$ac_objext conftest.$ac_ext
4620fi
4621echo "$as_me:4621: result: $ac_cv_type_pid_t" >&5
4622echo "${ECHO_T}$ac_cv_type_pid_t" >&6
4623if test $ac_cv_type_pid_t = yes; then
4624  :
4625else
4626
4627cat >>confdefs.h <<EOF
4628#define pid_t int
4629EOF
4630
4631fi
4632
4633echo "$as_me:4633: checking for uid_t in sys/types.h" >&5
4634echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
4635if test "${ac_cv_type_uid_t+set}" = set; then
4636  echo $ECHO_N "(cached) $ECHO_C" >&6
4637else
4638  cat >conftest.$ac_ext <<_ACEOF
4639#line 4639 "configure"
4640#include "confdefs.h"
4641#include <sys/types.h>
4642
4643_ACEOF
4644if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
4645  egrep "uid_t" >/dev/null 2>&1; then
4646  ac_cv_type_uid_t=yes
4647else
4648  ac_cv_type_uid_t=no
4649fi
4650rm -rf conftest*
4651
4652fi
4653echo "$as_me:4653: result: $ac_cv_type_uid_t" >&5
4654echo "${ECHO_T}$ac_cv_type_uid_t" >&6
4655if test $ac_cv_type_uid_t = no; then
4656
4657cat >>confdefs.h <<\EOF
4658#define uid_t int
4659EOF
4660
4661cat >>confdefs.h <<\EOF
4662#define gid_t int
4663EOF
4664
4665fi
4666
4667echo "$as_me:4667: checking for off_t" >&5
4668echo $ECHO_N "checking for off_t... $ECHO_C" >&6
4669if test "${ac_cv_type_off_t+set}" = set; then
4670  echo $ECHO_N "(cached) $ECHO_C" >&6
4671else
4672  cat >conftest.$ac_ext <<_ACEOF
4673#line 4673 "configure"
4674#include "confdefs.h"
4675$ac_includes_default
4676int
4677main (void)
4678{
4679if ((off_t *) 0)
4680  return 0;
4681if (sizeof (off_t))
4682  return 0;
4683  ;
4684  return 0;
4685}
4686_ACEOF
4687rm -f conftest.$ac_objext
4688if { (eval echo "$as_me:4688: \"$ac_compile\"") >&5
4689  (eval $ac_compile) 2>&5
4690  ac_status=$?
4691  echo "$as_me:4691: \$? = $ac_status" >&5
4692  (exit $ac_status); } &&
4693         { ac_try='test -s conftest.$ac_objext'
4694  { (eval echo "$as_me:4694: \"$ac_try\"") >&5
4695  (eval $ac_try) 2>&5
4696  ac_status=$?
4697  echo "$as_me:4697: \$? = $ac_status" >&5
4698  (exit $ac_status); }; }; then
4699  ac_cv_type_off_t=yes
4700else
4701  echo "$as_me: failed program was:" >&5
4702cat conftest.$ac_ext >&5
4703ac_cv_type_off_t=no
4704fi
4705rm -f conftest.$ac_objext conftest.$ac_ext
4706fi
4707echo "$as_me:4707: result: $ac_cv_type_off_t" >&5
4708echo "${ECHO_T}$ac_cv_type_off_t" >&6
4709if test $ac_cv_type_off_t = yes; then
4710  :
4711else
4712
4713cat >>confdefs.h <<EOF
4714#define off_t long
4715EOF
4716
4717fi
4718
4719###	checks for library functions
4720
4721for ac_func in \
4722	gethostname \
4723	getlogin \
4724	initgroups \
4725	mkdtemp \
4726	putenv \
4727	unsetenv \
4728	sched_yield \
4729	setpgid \
4730	strftime \
4731	tcgetattr \
4732	waitpid \
4733	wcswidth \
4734	wcwidth
4735do
4736as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
4737echo "$as_me:4737: checking for $ac_func" >&5
4738echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
4739if eval "test \"\${$as_ac_var+set}\" = set"; then
4740  echo $ECHO_N "(cached) $ECHO_C" >&6
4741else
4742  cat >conftest.$ac_ext <<_ACEOF
4743#line 4743 "configure"
4744#include "confdefs.h"
4745/* System header to define __stub macros and hopefully few prototypes,
4746    which can conflict with char $ac_func (); below.  */
4747#include <assert.h>
4748/* Override any gcc2 internal prototype to avoid an error.  */
4749#ifdef __cplusplus
4750extern "C"
4751#endif
4752/* We use char because int might match the return type of a gcc2
4753   builtin and then its argument prototype would still apply.  */
4754char $ac_func ();
4755char (*f) ();
4756
4757int
4758main (void)
4759{
4760/* The GNU C library defines this for functions which it implements
4761    to always fail with ENOSYS.  Some functions are actually named
4762    something starting with __ and the normal name is an alias.  */
4763#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
4764choke me
4765#else
4766f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
4767#endif
4768
4769  ;
4770  return 0;
4771}
4772_ACEOF
4773rm -f conftest.$ac_objext conftest$ac_exeext
4774if { (eval echo "$as_me:4774: \"$ac_link\"") >&5
4775  (eval $ac_link) 2>&5
4776  ac_status=$?
4777  echo "$as_me:4777: \$? = $ac_status" >&5
4778  (exit $ac_status); } &&
4779         { ac_try='test -s conftest$ac_exeext'
4780  { (eval echo "$as_me:4780: \"$ac_try\"") >&5
4781  (eval $ac_try) 2>&5
4782  ac_status=$?
4783  echo "$as_me:4783: \$? = $ac_status" >&5
4784  (exit $ac_status); }; }; then
4785  eval "$as_ac_var=yes"
4786else
4787  echo "$as_me: failed program was:" >&5
4788cat conftest.$ac_ext >&5
4789eval "$as_ac_var=no"
4790fi
4791rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
4792fi
4793echo "$as_me:4793: result: `eval echo '${'$as_ac_var'}'`" >&5
4794echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
4795if test `eval echo '${'$as_ac_var'}'` = yes; then
4796  cat >>confdefs.h <<EOF
4797#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
4798EOF
4799
4800fi
4801done
4802
4803for ac_header in lastlog.h paths.h
4804do
4805as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
4806echo "$as_me:4806: checking for $ac_header" >&5
4807echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
4808if eval "test \"\${$as_ac_Header+set}\" = set"; then
4809  echo $ECHO_N "(cached) $ECHO_C" >&6
4810else
4811  cat >conftest.$ac_ext <<_ACEOF
4812#line 4812 "configure"
4813#include "confdefs.h"
4814#include <$ac_header>
4815_ACEOF
4816if { (eval echo "$as_me:4816: \"$ac_cpp conftest.$ac_ext\"") >&5
4817  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
4818  ac_status=$?
4819  egrep -v '^ *\+' conftest.er1 >conftest.err
4820  rm -f conftest.er1
4821  cat conftest.err >&5
4822  echo "$as_me:4822: \$? = $ac_status" >&5
4823  (exit $ac_status); } >/dev/null; then
4824  if test -s conftest.err; then
4825    ac_cpp_err=$ac_c_preproc_warn_flag
4826  else
4827    ac_cpp_err=
4828  fi
4829else
4830  ac_cpp_err=yes
4831fi
4832if test -z "$ac_cpp_err"; then
4833  eval "$as_ac_Header=yes"
4834else
4835  echo "$as_me: failed program was:" >&5
4836  cat conftest.$ac_ext >&5
4837  eval "$as_ac_Header=no"
4838fi
4839rm -f conftest.err conftest.$ac_ext
4840fi
4841echo "$as_me:4841: result: `eval echo '${'$as_ac_Header'}'`" >&5
4842echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
4843if test `eval echo '${'$as_ac_Header'}'` = yes; then
4844  cat >>confdefs.h <<EOF
4845#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
4846EOF
4847
4848fi
4849done
4850
4851echo "$as_me:4851: checking for lastlog path" >&5
4852echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
4853if test "${cf_cv_path_lastlog+set}" = set; then
4854  echo $ECHO_N "(cached) $ECHO_C" >&6
4855else
4856
4857cat >conftest.$ac_ext <<_ACEOF
4858#line 4858 "configure"
4859#include "confdefs.h"
4860
4861#include <sys/types.h>
4862#ifdef HAVE_LASTLOG_H
4863#include <lastlog.h>
4864#else
4865#ifdef HAVE_PATHS_H
4866#include <paths.h>
4867#endif
4868#endif
4869int
4870main (void)
4871{
4872char *path = _PATH_LASTLOG
4873  ;
4874  return 0;
4875}
4876_ACEOF
4877rm -f conftest.$ac_objext
4878if { (eval echo "$as_me:4878: \"$ac_compile\"") >&5
4879  (eval $ac_compile) 2>&5
4880  ac_status=$?
4881  echo "$as_me:4881: \$? = $ac_status" >&5
4882  (exit $ac_status); } &&
4883         { ac_try='test -s conftest.$ac_objext'
4884  { (eval echo "$as_me:4884: \"$ac_try\"") >&5
4885  (eval $ac_try) 2>&5
4886  ac_status=$?
4887  echo "$as_me:4887: \$? = $ac_status" >&5
4888  (exit $ac_status); }; }; then
4889  cf_cv_path_lastlog="_PATH_LASTLOG"
4890else
4891  echo "$as_me: failed program was:" >&5
4892cat conftest.$ac_ext >&5
4893if test -f /usr/adm/lastlog ; then
4894	 	cf_cv_path_lastlog=/usr/adm/lastlog
4895	else
4896		cf_cv_path_lastlog=no
4897	fi
4898fi
4899rm -f conftest.$ac_objext conftest.$ac_ext
4900
4901fi
4902echo "$as_me:4902: result: $cf_cv_path_lastlog" >&5
4903echo "${ECHO_T}$cf_cv_path_lastlog" >&6
4904test $cf_cv_path_lastlog != no &&
4905cat >>confdefs.h <<\EOF
4906#define USE_LASTLOG 1
4907EOF
4908
4909echo "$as_me:4909: checking for utmp implementation" >&5
4910echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
4911if test "${cf_cv_have_utmp+set}" = set; then
4912  echo $ECHO_N "(cached) $ECHO_C" >&6
4913else
4914
4915	cf_cv_have_utmp=no
4916for cf_header in utmpx utmp ; do
4917cf_utmp_includes="
4918#include <sys/types.h>
4919#include <${cf_header}.h>
4920#define getutent getutxent
4921#ifdef USE_LASTLOG
4922#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
4923#endif
4924"
4925	cat >conftest.$ac_ext <<_ACEOF
4926#line 4926 "configure"
4927#include "confdefs.h"
4928$cf_utmp_includes
4929int
4930main (void)
4931{
4932struct $cf_header x;
4933	 char *name = x.ut_name; /* utmp.h and compatible definitions */
4934
4935  ;
4936  return 0;
4937}
4938_ACEOF
4939rm -f conftest.$ac_objext
4940if { (eval echo "$as_me:4940: \"$ac_compile\"") >&5
4941  (eval $ac_compile) 2>&5
4942  ac_status=$?
4943  echo "$as_me:4943: \$? = $ac_status" >&5
4944  (exit $ac_status); } &&
4945         { ac_try='test -s conftest.$ac_objext'
4946  { (eval echo "$as_me:4946: \"$ac_try\"") >&5
4947  (eval $ac_try) 2>&5
4948  ac_status=$?
4949  echo "$as_me:4949: \$? = $ac_status" >&5
4950  (exit $ac_status); }; }; then
4951  cf_cv_have_utmp=$cf_header
4952	 break
4953else
4954  echo "$as_me: failed program was:" >&5
4955cat conftest.$ac_ext >&5
4956
4957	cat >conftest.$ac_ext <<_ACEOF
4958#line 4958 "configure"
4959#include "confdefs.h"
4960$cf_utmp_includes
4961int
4962main (void)
4963{
4964struct $cf_header x;
4965	 char *name = x.ut_user; /* utmpx.h must declare this */
4966
4967  ;
4968  return 0;
4969}
4970_ACEOF
4971rm -f conftest.$ac_objext
4972if { (eval echo "$as_me:4972: \"$ac_compile\"") >&5
4973  (eval $ac_compile) 2>&5
4974  ac_status=$?
4975  echo "$as_me:4975: \$? = $ac_status" >&5
4976  (exit $ac_status); } &&
4977         { ac_try='test -s conftest.$ac_objext'
4978  { (eval echo "$as_me:4978: \"$ac_try\"") >&5
4979  (eval $ac_try) 2>&5
4980  ac_status=$?
4981  echo "$as_me:4981: \$? = $ac_status" >&5
4982  (exit $ac_status); }; }; then
4983  cf_cv_have_utmp=$cf_header
4984	 break
4985
4986else
4987  echo "$as_me: failed program was:" >&5
4988cat conftest.$ac_ext >&5
4989fi
4990rm -f conftest.$ac_objext conftest.$ac_ext
4991fi
4992rm -f conftest.$ac_objext conftest.$ac_ext
4993done
4994
4995fi
4996echo "$as_me:4996: result: $cf_cv_have_utmp" >&5
4997echo "${ECHO_T}$cf_cv_have_utmp" >&6
4998
4999if test $cf_cv_have_utmp != no ; then
5000
5001cat >>confdefs.h <<\EOF
5002#define HAVE_UTMP 1
5003EOF
5004
5005	test $cf_cv_have_utmp = utmpx &&
5006cat >>confdefs.h <<\EOF
5007#define UTMPX_FOR_UTMP 1
5008EOF
5009
5010if test $cf_cv_have_utmp != no ; then
5011echo "$as_me:5011: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
5012echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
5013if test "${cf_cv_have_utmp_ut_host+set}" = set; then
5014  echo $ECHO_N "(cached) $ECHO_C" >&6
5015else
5016
5017	cat >conftest.$ac_ext <<_ACEOF
5018#line 5018 "configure"
5019#include "confdefs.h"
5020
5021#include <sys/types.h>
5022#include <${cf_cv_have_utmp}.h>
5023int
5024main (void)
5025{
5026struct $cf_cv_have_utmp x; char *y = &x.ut_host[0]
5027  ;
5028  return 0;
5029}
5030_ACEOF
5031rm -f conftest.$ac_objext
5032if { (eval echo "$as_me:5032: \"$ac_compile\"") >&5
5033  (eval $ac_compile) 2>&5
5034  ac_status=$?
5035  echo "$as_me:5035: \$? = $ac_status" >&5
5036  (exit $ac_status); } &&
5037         { ac_try='test -s conftest.$ac_objext'
5038  { (eval echo "$as_me:5038: \"$ac_try\"") >&5
5039  (eval $ac_try) 2>&5
5040  ac_status=$?
5041  echo "$as_me:5041: \$? = $ac_status" >&5
5042  (exit $ac_status); }; }; then
5043  cf_cv_have_utmp_ut_host=yes
5044else
5045  echo "$as_me: failed program was:" >&5
5046cat conftest.$ac_ext >&5
5047cf_cv_have_utmp_ut_host=no
5048fi
5049rm -f conftest.$ac_objext conftest.$ac_ext
5050
5051fi
5052
5053echo "$as_me:5053: result: $cf_cv_have_utmp_ut_host" >&5
5054echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
5055test $cf_cv_have_utmp_ut_host != no &&
5056cat >>confdefs.h <<\EOF
5057#define HAVE_UTMP_UT_HOST 1
5058EOF
5059
5060fi
5061
5062if test $cf_cv_have_utmp != no ; then
5063echo "$as_me:5063: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
5064echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
5065if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
5066  echo $ECHO_N "(cached) $ECHO_C" >&6
5067else
5068
5069	cat >conftest.$ac_ext <<_ACEOF
5070#line 5070 "configure"
5071#include "confdefs.h"
5072
5073#include <sys/types.h>
5074#include <${cf_cv_have_utmp}.h>
5075int
5076main (void)
5077{
5078struct $cf_cv_have_utmp x; int y = x.ut_syslen
5079  ;
5080  return 0;
5081}
5082_ACEOF
5083rm -f conftest.$ac_objext
5084if { (eval echo "$as_me:5084: \"$ac_compile\"") >&5
5085  (eval $ac_compile) 2>&5
5086  ac_status=$?
5087  echo "$as_me:5087: \$? = $ac_status" >&5
5088  (exit $ac_status); } &&
5089         { ac_try='test -s conftest.$ac_objext'
5090  { (eval echo "$as_me:5090: \"$ac_try\"") >&5
5091  (eval $ac_try) 2>&5
5092  ac_status=$?
5093  echo "$as_me:5093: \$? = $ac_status" >&5
5094  (exit $ac_status); }; }; then
5095  cf_cv_have_utmp_ut_syslen=yes
5096else
5097  echo "$as_me: failed program was:" >&5
5098cat conftest.$ac_ext >&5
5099cf_cv_have_utmp_ut_syslen=no
5100fi
5101rm -f conftest.$ac_objext conftest.$ac_ext
5102
5103fi
5104
5105echo "$as_me:5105: result: $cf_cv_have_utmp_ut_syslen" >&5
5106echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
5107test $cf_cv_have_utmp_ut_syslen != no &&
5108cat >>confdefs.h <<\EOF
5109#define HAVE_UTMP_UT_SYSLEN 1
5110EOF
5111
5112fi
5113
5114if test $cf_cv_have_utmp != no ; then
5115echo "$as_me:5115: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
5116echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
5117if test "${cf_cv_have_utmp_ut_name+set}" = set; then
5118  echo $ECHO_N "(cached) $ECHO_C" >&6
5119else
5120
5121	cf_cv_have_utmp_ut_name=no
5122cf_utmp_includes="
5123#include <sys/types.h>
5124#include <${cf_cv_have_utmp}.h>
5125#define getutent getutxent
5126#ifdef USE_LASTLOG
5127#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
5128#endif
5129"
5130for cf_header in ut_name ut_user ; do
5131	cat >conftest.$ac_ext <<_ACEOF
5132#line 5132 "configure"
5133#include "confdefs.h"
5134$cf_utmp_includes
5135int
5136main (void)
5137{
5138struct $cf_cv_have_utmp x;
5139	 char *name = x.$cf_header;
5140
5141  ;
5142  return 0;
5143}
5144_ACEOF
5145rm -f conftest.$ac_objext
5146if { (eval echo "$as_me:5146: \"$ac_compile\"") >&5
5147  (eval $ac_compile) 2>&5
5148  ac_status=$?
5149  echo "$as_me:5149: \$? = $ac_status" >&5
5150  (exit $ac_status); } &&
5151         { ac_try='test -s conftest.$ac_objext'
5152  { (eval echo "$as_me:5152: \"$ac_try\"") >&5
5153  (eval $ac_try) 2>&5
5154  ac_status=$?
5155  echo "$as_me:5155: \$? = $ac_status" >&5
5156  (exit $ac_status); }; }; then
5157  cf_cv_have_utmp_ut_name=$cf_header
5158	 break
5159else
5160  echo "$as_me: failed program was:" >&5
5161cat conftest.$ac_ext >&5
5162fi
5163rm -f conftest.$ac_objext conftest.$ac_ext
5164done
5165
5166fi
5167echo "$as_me:5167: result: $cf_cv_have_utmp_ut_name" >&5
5168echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
5169
5170case $cf_cv_have_utmp_ut_name in
5171(no)
5172	{ { echo "$as_me:5172: error: Cannot find declaration for ut.ut_name" >&5
5173echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
5174   { (exit 1); exit 1; }; }
5175	;;
5176(ut_user)
5177
5178cat >>confdefs.h <<\EOF
5179#define ut_name ut_user
5180EOF
5181
5182	;;
5183esac
5184fi
5185
5186if test $cf_cv_have_utmp != no ; then
5187echo "$as_me:5187: checking for exit-status in $cf_cv_have_utmp" >&5
5188echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
5189if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
5190  echo $ECHO_N "(cached) $ECHO_C" >&6
5191else
5192
5193for cf_result in \
5194	ut_exit.__e_exit \
5195	ut_exit.e_exit \
5196	ut_exit.ut_e_exit \
5197	ut_exit.ut_exit
5198do
5199cat >conftest.$ac_ext <<_ACEOF
5200#line 5200 "configure"
5201#include "confdefs.h"
5202
5203#include <sys/types.h>
5204#include <${cf_cv_have_utmp}.h>
5205int
5206main (void)
5207{
5208struct $cf_cv_have_utmp x; long y = x.$cf_result = 0
5209  ;
5210  return 0;
5211}
5212_ACEOF
5213rm -f conftest.$ac_objext
5214if { (eval echo "$as_me:5214: \"$ac_compile\"") >&5
5215  (eval $ac_compile) 2>&5
5216  ac_status=$?
5217  echo "$as_me:5217: \$? = $ac_status" >&5
5218  (exit $ac_status); } &&
5219         { ac_try='test -s conftest.$ac_objext'
5220  { (eval echo "$as_me:5220: \"$ac_try\"") >&5
5221  (eval $ac_try) 2>&5
5222  ac_status=$?
5223  echo "$as_me:5223: \$? = $ac_status" >&5
5224  (exit $ac_status); }; }; then
5225  cf_cv_have_utmp_ut_xstatus=$cf_result
5226	 break
5227else
5228  echo "$as_me: failed program was:" >&5
5229cat conftest.$ac_ext >&5
5230cf_cv_have_utmp_ut_xstatus=no
5231fi
5232rm -f conftest.$ac_objext conftest.$ac_ext
5233done
5234
5235fi
5236echo "$as_me:5236: result: $cf_cv_have_utmp_ut_xstatus" >&5
5237echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
5238if test $cf_cv_have_utmp_ut_xstatus != no ; then
5239
5240cat >>confdefs.h <<\EOF
5241#define HAVE_UTMP_UT_XSTATUS 1
5242EOF
5243
5244cat >>confdefs.h <<EOF
5245#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
5246EOF
5247
5248fi
5249fi
5250
5251if test $cf_cv_have_utmp != no ; then
5252echo "$as_me:5252: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
5253echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
5254if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
5255  echo $ECHO_N "(cached) $ECHO_C" >&6
5256else
5257
5258	cat >conftest.$ac_ext <<_ACEOF
5259#line 5259 "configure"
5260#include "confdefs.h"
5261
5262#include <sys/types.h>
5263#include <${cf_cv_have_utmp}.h>
5264int
5265main (void)
5266{
5267struct $cf_cv_have_utmp x; long y = x.ut_xtime = 0
5268  ;
5269  return 0;
5270}
5271_ACEOF
5272rm -f conftest.$ac_objext
5273if { (eval echo "$as_me:5273: \"$ac_compile\"") >&5
5274  (eval $ac_compile) 2>&5
5275  ac_status=$?
5276  echo "$as_me:5276: \$? = $ac_status" >&5
5277  (exit $ac_status); } &&
5278         { ac_try='test -s conftest.$ac_objext'
5279  { (eval echo "$as_me:5279: \"$ac_try\"") >&5
5280  (eval $ac_try) 2>&5
5281  ac_status=$?
5282  echo "$as_me:5282: \$? = $ac_status" >&5
5283  (exit $ac_status); }; }; then
5284  cf_cv_have_utmp_ut_xtime=yes
5285else
5286  echo "$as_me: failed program was:" >&5
5287cat conftest.$ac_ext >&5
5288cat >conftest.$ac_ext <<_ACEOF
5289#line 5289 "configure"
5290#include "confdefs.h"
5291
5292#include <sys/types.h>
5293#include <${cf_cv_have_utmp}.h>
5294int
5295main (void)
5296{
5297struct $cf_cv_have_utmp x; long y = x.ut_tv.tv_sec
5298  ;
5299  return 0;
5300}
5301_ACEOF
5302rm -f conftest.$ac_objext
5303if { (eval echo "$as_me:5303: \"$ac_compile\"") >&5
5304  (eval $ac_compile) 2>&5
5305  ac_status=$?
5306  echo "$as_me:5306: \$? = $ac_status" >&5
5307  (exit $ac_status); } &&
5308         { ac_try='test -s conftest.$ac_objext'
5309  { (eval echo "$as_me:5309: \"$ac_try\"") >&5
5310  (eval $ac_try) 2>&5
5311  ac_status=$?
5312  echo "$as_me:5312: \$? = $ac_status" >&5
5313  (exit $ac_status); }; }; then
5314  cf_cv_have_utmp_ut_xtime=define
5315else
5316  echo "$as_me: failed program was:" >&5
5317cat conftest.$ac_ext >&5
5318cf_cv_have_utmp_ut_xtime=no
5319fi
5320rm -f conftest.$ac_objext conftest.$ac_ext
5321
5322fi
5323rm -f conftest.$ac_objext conftest.$ac_ext
5324
5325fi
5326echo "$as_me:5326: result: $cf_cv_have_utmp_ut_xtime" >&5
5327echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
5328if test $cf_cv_have_utmp_ut_xtime != no ; then
5329
5330cat >>confdefs.h <<\EOF
5331#define HAVE_UTMP_UT_XTIME 1
5332EOF
5333
5334	if test $cf_cv_have_utmp_ut_xtime = define ; then
5335
5336cat >>confdefs.h <<\EOF
5337#define ut_xtime ut_tv.tv_sec
5338EOF
5339
5340	fi
5341fi
5342fi
5343
5344if test $cf_cv_have_utmp != no ; then
5345echo "$as_me:5345: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
5346echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
5347if test "${cf_cv_have_utmp_ut_session+set}" = set; then
5348  echo $ECHO_N "(cached) $ECHO_C" >&6
5349else
5350
5351	cat >conftest.$ac_ext <<_ACEOF
5352#line 5352 "configure"
5353#include "confdefs.h"
5354
5355#include <sys/types.h>
5356#include <${cf_cv_have_utmp}.h>
5357int
5358main (void)
5359{
5360struct $cf_cv_have_utmp x; long y = x.ut_session
5361  ;
5362  return 0;
5363}
5364_ACEOF
5365rm -f conftest.$ac_objext
5366if { (eval echo "$as_me:5366: \"$ac_compile\"") >&5
5367  (eval $ac_compile) 2>&5
5368  ac_status=$?
5369  echo "$as_me:5369: \$? = $ac_status" >&5
5370  (exit $ac_status); } &&
5371         { ac_try='test -s conftest.$ac_objext'
5372  { (eval echo "$as_me:5372: \"$ac_try\"") >&5
5373  (eval $ac_try) 2>&5
5374  ac_status=$?
5375  echo "$as_me:5375: \$? = $ac_status" >&5
5376  (exit $ac_status); }; }; then
5377  cf_cv_have_utmp_ut_session=yes
5378else
5379  echo "$as_me: failed program was:" >&5
5380cat conftest.$ac_ext >&5
5381cf_cv_have_utmp_ut_session=no
5382fi
5383rm -f conftest.$ac_objext conftest.$ac_ext
5384
5385fi
5386echo "$as_me:5386: result: $cf_cv_have_utmp_ut_session" >&5
5387echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
5388if test $cf_cv_have_utmp_ut_session != no ; then
5389
5390cat >>confdefs.h <<\EOF
5391#define HAVE_UTMP_UT_SESSION 1
5392EOF
5393
5394fi
5395fi
5396
5397echo "$as_me:5397: checking if $cf_cv_have_utmp is SYSV flavor" >&5
5398echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
5399if test "${cf_cv_sysv_utmp+set}" = set; then
5400  echo $ECHO_N "(cached) $ECHO_C" >&6
5401else
5402
5403test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
5404cat >conftest.$ac_ext <<_ACEOF
5405#line 5405 "configure"
5406#include "confdefs.h"
5407
5408#include <sys/types.h>
5409#include <${cf_cv_have_utmp}.h>
5410int
5411main (void)
5412{
5413
5414struct $cf_cv_have_utmp x;
5415	set${cf_prefix}ent ();
5416	get${cf_prefix}id(&x);
5417	put${cf_prefix}line(&x);
5418	end${cf_prefix}ent();
5419  ;
5420  return 0;
5421}
5422_ACEOF
5423rm -f conftest.$ac_objext conftest$ac_exeext
5424if { (eval echo "$as_me:5424: \"$ac_link\"") >&5
5425  (eval $ac_link) 2>&5
5426  ac_status=$?
5427  echo "$as_me:5427: \$? = $ac_status" >&5
5428  (exit $ac_status); } &&
5429         { ac_try='test -s conftest$ac_exeext'
5430  { (eval echo "$as_me:5430: \"$ac_try\"") >&5
5431  (eval $ac_try) 2>&5
5432  ac_status=$?
5433  echo "$as_me:5433: \$? = $ac_status" >&5
5434  (exit $ac_status); }; }; then
5435  cf_cv_sysv_utmp=yes
5436else
5437  echo "$as_me: failed program was:" >&5
5438cat conftest.$ac_ext >&5
5439cf_cv_sysv_utmp=no
5440fi
5441rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5442
5443fi
5444echo "$as_me:5444: result: $cf_cv_sysv_utmp" >&5
5445echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
5446test $cf_cv_sysv_utmp = yes &&
5447cat >>confdefs.h <<\EOF
5448#define USE_SYSV_UTMP 1
5449EOF
5450
5451fi
5452
5453for ac_header in lastlog.h
5454do
5455as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5456echo "$as_me:5456: checking for $ac_header" >&5
5457echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5458if eval "test \"\${$as_ac_Header+set}\" = set"; then
5459  echo $ECHO_N "(cached) $ECHO_C" >&6
5460else
5461  cat >conftest.$ac_ext <<_ACEOF
5462#line 5462 "configure"
5463#include "confdefs.h"
5464#include <$ac_header>
5465_ACEOF
5466if { (eval echo "$as_me:5466: \"$ac_cpp conftest.$ac_ext\"") >&5
5467  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5468  ac_status=$?
5469  egrep -v '^ *\+' conftest.er1 >conftest.err
5470  rm -f conftest.er1
5471  cat conftest.err >&5
5472  echo "$as_me:5472: \$? = $ac_status" >&5
5473  (exit $ac_status); } >/dev/null; then
5474  if test -s conftest.err; then
5475    ac_cpp_err=$ac_c_preproc_warn_flag
5476  else
5477    ac_cpp_err=
5478  fi
5479else
5480  ac_cpp_err=yes
5481fi
5482if test -z "$ac_cpp_err"; then
5483  eval "$as_ac_Header=yes"
5484else
5485  echo "$as_me: failed program was:" >&5
5486  cat conftest.$ac_ext >&5
5487  eval "$as_ac_Header=no"
5488fi
5489rm -f conftest.err conftest.$ac_ext
5490fi
5491echo "$as_me:5491: result: `eval echo '${'$as_ac_Header'}'`" >&5
5492echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5493if test `eval echo '${'$as_ac_Header'}'` = yes; then
5494  cat >>confdefs.h <<EOF
5495#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5496EOF
5497
5498fi
5499done
5500
5501echo "$as_me:5501: checking for struct lastlog" >&5
5502echo $ECHO_N "checking for struct lastlog... $ECHO_C" >&6
5503if test "${cf_cv_struct_lastlog+set}" = set; then
5504  echo $ECHO_N "(cached) $ECHO_C" >&6
5505else
5506
5507if test "$cross_compiling" = yes; then
5508
5509cf_cv_struct_lastlog=unknown
5510else
5511  cat >conftest.$ac_ext <<_ACEOF
5512#line 5512 "configure"
5513#include "confdefs.h"
5514
5515#include <sys/types.h>
5516#include <time.h>
5517#include <lastlog.h>
5518
5519int main()
5520{
5521	struct lastlog data;
5522	return (sizeof(data.ll_time) != sizeof(time_t));
5523}
5524_ACEOF
5525rm -f conftest$ac_exeext
5526if { (eval echo "$as_me:5526: \"$ac_link\"") >&5
5527  (eval $ac_link) 2>&5
5528  ac_status=$?
5529  echo "$as_me:5529: \$? = $ac_status" >&5
5530  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5531  { (eval echo "$as_me:5531: \"$ac_try\"") >&5
5532  (eval $ac_try) 2>&5
5533  ac_status=$?
5534  echo "$as_me:5534: \$? = $ac_status" >&5
5535  (exit $ac_status); }; }; then
5536
5537cf_cv_struct_lastlog=yes
5538else
5539  echo "$as_me: program exited with status $ac_status" >&5
5540echo "$as_me: failed program was:" >&5
5541cat conftest.$ac_ext >&5
5542
5543cf_cv_struct_lastlog=no
5544fi
5545rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5546fi
5547fi
5548echo "$as_me:5548: result: $cf_cv_struct_lastlog" >&5
5549echo "${ECHO_T}$cf_cv_struct_lastlog" >&6
5550
5551test $cf_cv_struct_lastlog != no &&
5552cat >>confdefs.h <<\EOF
5553#define USE_STRUCT_LASTLOG 1
5554EOF
5555
5556for ac_header in \
5557sys/param.h \
5558
5559do
5560as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5561echo "$as_me:5561: checking for $ac_header" >&5
5562echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5563if eval "test \"\${$as_ac_Header+set}\" = set"; then
5564  echo $ECHO_N "(cached) $ECHO_C" >&6
5565else
5566  cat >conftest.$ac_ext <<_ACEOF
5567#line 5567 "configure"
5568#include "confdefs.h"
5569#include <$ac_header>
5570_ACEOF
5571if { (eval echo "$as_me:5571: \"$ac_cpp conftest.$ac_ext\"") >&5
5572  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5573  ac_status=$?
5574  egrep -v '^ *\+' conftest.er1 >conftest.err
5575  rm -f conftest.er1
5576  cat conftest.err >&5
5577  echo "$as_me:5577: \$? = $ac_status" >&5
5578  (exit $ac_status); } >/dev/null; then
5579  if test -s conftest.err; then
5580    ac_cpp_err=$ac_c_preproc_warn_flag
5581  else
5582    ac_cpp_err=
5583  fi
5584else
5585  ac_cpp_err=yes
5586fi
5587if test -z "$ac_cpp_err"; then
5588  eval "$as_ac_Header=yes"
5589else
5590  echo "$as_me: failed program was:" >&5
5591  cat conftest.$ac_ext >&5
5592  eval "$as_ac_Header=no"
5593fi
5594rm -f conftest.err conftest.$ac_ext
5595fi
5596echo "$as_me:5596: result: `eval echo '${'$as_ac_Header'}'`" >&5
5597echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5598if test `eval echo '${'$as_ac_Header'}'` = yes; then
5599  cat >>confdefs.h <<EOF
5600#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5601EOF
5602
5603fi
5604done
5605
5606echo "$as_me:5606: checking if POSIX saved-ids are supported" >&5
5607echo $ECHO_N "checking if POSIX saved-ids are supported... $ECHO_C" >&6
5608if test "${cf_cv_posix_saved_ids+set}" = set; then
5609  echo $ECHO_N "(cached) $ECHO_C" >&6
5610else
5611
5612cat >conftest.$ac_ext <<_ACEOF
5613#line 5613 "configure"
5614#include "confdefs.h"
5615
5616#include <unistd.h>
5617#ifdef HAVE_SYS_PARAM_H
5618#include <sys/param.h>		/* this may define "BSD" */
5619#endif
5620
5621int
5622main (void)
5623{
5624
5625#if defined(_POSIX_SAVED_IDS) && (_POSIX_SAVED_IDS > 0)
5626	void *p = (void *) seteuid;
5627	int x = seteuid(geteuid());
5628#elif defined(BSD) && (BSD >= 199103)
5629/* The BSD's may implement the runtime check - and it fails.
5630 * However, saved-ids work almost like POSIX (close enough for most uses).
5631 */
5632#else
5633make an error
5634#endif
5635
5636  ;
5637  return 0;
5638}
5639_ACEOF
5640rm -f conftest.$ac_objext conftest$ac_exeext
5641if { (eval echo "$as_me:5641: \"$ac_link\"") >&5
5642  (eval $ac_link) 2>&5
5643  ac_status=$?
5644  echo "$as_me:5644: \$? = $ac_status" >&5
5645  (exit $ac_status); } &&
5646         { ac_try='test -s conftest$ac_exeext'
5647  { (eval echo "$as_me:5647: \"$ac_try\"") >&5
5648  (eval $ac_try) 2>&5
5649  ac_status=$?
5650  echo "$as_me:5650: \$? = $ac_status" >&5
5651  (exit $ac_status); }; }; then
5652  cf_cv_posix_saved_ids=yes
5653
5654else
5655  echo "$as_me: failed program was:" >&5
5656cat conftest.$ac_ext >&5
5657
5658if test "$cross_compiling" = yes; then
5659  cf_cv_posix_saved_ids=unknown
5660else
5661  cat >conftest.$ac_ext <<_ACEOF
5662#line 5662 "configure"
5663#include "confdefs.h"
5664
5665#ifdef HAVE_STDLIB_H
5666#include <stdlib.h>
5667#endif
5668#include <unistd.h>
5669int main()
5670{
5671	void *p = (void *) seteuid;
5672	long code = sysconf(_SC_SAVED_IDS);
5673	${cf_cv_main_return:-return}  ((code > 0) ? 0 : 1);
5674}
5675_ACEOF
5676rm -f conftest$ac_exeext
5677if { (eval echo "$as_me:5677: \"$ac_link\"") >&5
5678  (eval $ac_link) 2>&5
5679  ac_status=$?
5680  echo "$as_me:5680: \$? = $ac_status" >&5
5681  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5682  { (eval echo "$as_me:5682: \"$ac_try\"") >&5
5683  (eval $ac_try) 2>&5
5684  ac_status=$?
5685  echo "$as_me:5685: \$? = $ac_status" >&5
5686  (exit $ac_status); }; }; then
5687  cf_cv_posix_saved_ids=yes
5688else
5689  echo "$as_me: program exited with status $ac_status" >&5
5690echo "$as_me: failed program was:" >&5
5691cat conftest.$ac_ext >&5
5692cf_cv_posix_saved_ids=no
5693fi
5694rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5695fi
5696
5697fi
5698rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5699
5700fi
5701echo "$as_me:5701: result: $cf_cv_posix_saved_ids" >&5
5702echo "${ECHO_T}$cf_cv_posix_saved_ids" >&6
5703
5704test "$cf_cv_posix_saved_ids" = yes &&
5705cat >>confdefs.h <<\EOF
5706#define HAVE_POSIX_SAVED_IDS 1
5707EOF
5708
5709# compute a reasonable value for $TERM to give tgetent(), since we may be
5710# running in 'screen', which sets $TERMCAP to a specific entry that is not
5711# necessarily in /etc/termcap - unsetenv is not portable, so we cannot simply
5712# discard $TERMCAP.
5713cf_TERMVAR=vt100
5714if test -n "$TERMCAP"
5715then
5716	cf_TERMCAP=`echo "$TERMCAP" | tr '\n' ' ' | sed -e 's/^..|//' -e 's/|.*//'`
5717	case "$cf_TERMCAP" in
5718	(screen*.*)
5719		;;
5720	(*)
5721		cf_TERMVAR="$cf_TERMCAP"
5722		;;
5723	esac
5724fi
5725test -z "$cf_TERMVAR" && cf_TERMVAR=vt100
5726
5727echo "$as_me:5727: checking if we want full tgetent function" >&5
5728echo $ECHO_N "checking if we want full tgetent function... $ECHO_C" >&6
5729
5730# Check whether --enable-full-tgetent or --disable-full-tgetent was given.
5731if test "${enable_full_tgetent+set}" = set; then
5732  enableval="$enable_full_tgetent"
5733  test "$enableval" != no && enableval=yes
5734	if test "$enableval" != "yes" ; then
5735    cf_full_tgetent=no
5736	else
5737		cf_full_tgetent=yes
5738	fi
5739else
5740  enableval=yes
5741	cf_full_tgetent=yes
5742
5743fi;
5744echo "$as_me:5744: result: $cf_full_tgetent" >&5
5745echo "${ECHO_T}$cf_full_tgetent" >&6
5746
5747if test "$cf_full_tgetent" = yes ; then
5748	cf_test_message="full tgetent"
5749else
5750	cf_test_message="tgetent"
5751fi
5752
5753echo "$as_me:5753: checking for $cf_test_message function" >&5
5754echo $ECHO_N "checking for $cf_test_message function... $ECHO_C" >&6
5755if test "${cf_cv_lib_tgetent+set}" = set; then
5756  echo $ECHO_N "(cached) $ECHO_C" >&6
5757else
5758
5759cf_save_LIBS="$LIBS"
5760cf_cv_lib_tgetent=no
5761if test "$cf_full_tgetent" = yes ; then
5762	cf_TERMLIB="otermcap termcap termlib ncurses curses"
5763	cf_TERMTST="buffer[0] == 0"
5764else
5765	cf_TERMLIB="termlib ncurses curses"
5766	cf_TERMTST="0"
5767fi
5768for cf_termlib in '' $cf_TERMLIB ; do
5769	LIBS="$cf_save_LIBS"
5770	test -n "$cf_termlib" && {
5771cf_add_libs="-l$cf_termlib"
5772# Filter out duplicates - this happens with badly-designed ".pc" files...
5773for cf_add_1lib in $LIBS
5774do
5775	for cf_add_2lib in $cf_add_libs
5776	do
5777		if test "x$cf_add_1lib" = "x$cf_add_2lib"
5778		then
5779			cf_add_1lib=
5780			break
5781		fi
5782	done
5783	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5784done
5785LIBS="$cf_add_libs"
5786 }
5787	if test "$cross_compiling" = yes; then
5788  echo "cross-compiling, cannot verify if a termcap/tgetent is present in $cf_termlib" 1>&5
5789else
5790  cat >conftest.$ac_ext <<_ACEOF
5791#line 5791 "configure"
5792#include "confdefs.h"
5793
5794/* terminfo implementations ignore the buffer argument, making it useless for
5795 * the xterm application, which uses this information to make a new TERMCAP
5796 * environment variable.
5797 */
5798int main()
5799{
5800	char buffer[1024];
5801	buffer[0] = 0;
5802	tgetent(buffer, "$cf_TERMVAR");
5803	${cf_cv_main_return:-return} ($cf_TERMTST); }
5804_ACEOF
5805rm -f conftest$ac_exeext
5806if { (eval echo "$as_me:5806: \"$ac_link\"") >&5
5807  (eval $ac_link) 2>&5
5808  ac_status=$?
5809  echo "$as_me:5809: \$? = $ac_status" >&5
5810  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
5811  { (eval echo "$as_me:5811: \"$ac_try\"") >&5
5812  (eval $ac_try) 2>&5
5813  ac_status=$?
5814  echo "$as_me:5814: \$? = $ac_status" >&5
5815  (exit $ac_status); }; }; then
5816  echo "yes, there is a termcap/tgetent in $cf_termlib" 1>&5
5817	 if test -n "$cf_termlib" ; then
5818	 	cf_cv_lib_tgetent="-l$cf_termlib"
5819	 else
5820	 	cf_cv_lib_tgetent=yes
5821	 fi
5822	 break
5823else
5824  echo "$as_me: program exited with status $ac_status" >&5
5825echo "$as_me: failed program was:" >&5
5826cat conftest.$ac_ext >&5
5827echo "no, there is no termcap/tgetent in $cf_termlib" 1>&5
5828fi
5829rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
5830fi
5831done
5832LIBS="$cf_save_LIBS"
5833
5834fi
5835echo "$as_me:5835: result: $cf_cv_lib_tgetent" >&5
5836echo "${ECHO_T}$cf_cv_lib_tgetent" >&6
5837
5838# If we found a working tgetent(), set LIBS and check for termcap.h.
5839# (LIBS cannot be set inside AC_CACHE_CHECK; the commands there should
5840# not have side effects other than setting the cache variable, because
5841# they are not executed when a cached value exists.)
5842if test "x$cf_cv_lib_tgetent" != xno ; then
5843	test "x$cf_cv_lib_tgetent" != xyes && {
5844cf_add_libs="$cf_cv_lib_tgetent"
5845# Filter out duplicates - this happens with badly-designed ".pc" files...
5846for cf_add_1lib in $LIBS
5847do
5848	for cf_add_2lib in $cf_add_libs
5849	do
5850		if test "x$cf_add_1lib" = "x$cf_add_2lib"
5851		then
5852			cf_add_1lib=
5853			break
5854		fi
5855	done
5856	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
5857done
5858LIBS="$cf_add_libs"
5859 }
5860
5861cat >>confdefs.h <<\EOF
5862#define USE_TERMCAP 1
5863EOF
5864
5865	if test "$cf_full_tgetent" = no ; then
5866		cat >conftest.$ac_ext <<_ACEOF
5867#line 5867 "configure"
5868#include "confdefs.h"
5869
5870#include <termcap.h>
5871int
5872main (void)
5873{
5874
5875#ifdef NCURSES_VERSION
5876make an error
5877#endif
5878  ;
5879  return 0;
5880}
5881_ACEOF
5882rm -f conftest.$ac_objext
5883if { (eval echo "$as_me:5883: \"$ac_compile\"") >&5
5884  (eval $ac_compile) 2>&5
5885  ac_status=$?
5886  echo "$as_me:5886: \$? = $ac_status" >&5
5887  (exit $ac_status); } &&
5888         { ac_try='test -s conftest.$ac_objext'
5889  { (eval echo "$as_me:5889: \"$ac_try\"") >&5
5890  (eval $ac_try) 2>&5
5891  ac_status=$?
5892  echo "$as_me:5892: \$? = $ac_status" >&5
5893  (exit $ac_status); }; }; then
5894  cat >>confdefs.h <<\EOF
5895#define HAVE_TERMCAP_H 1
5896EOF
5897
5898else
5899  echo "$as_me: failed program was:" >&5
5900cat conftest.$ac_ext >&5
5901fi
5902rm -f conftest.$ac_objext conftest.$ac_ext
5903	else
5904
5905for ac_header in termcap.h
5906do
5907as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
5908echo "$as_me:5908: checking for $ac_header" >&5
5909echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
5910if eval "test \"\${$as_ac_Header+set}\" = set"; then
5911  echo $ECHO_N "(cached) $ECHO_C" >&6
5912else
5913  cat >conftest.$ac_ext <<_ACEOF
5914#line 5914 "configure"
5915#include "confdefs.h"
5916#include <$ac_header>
5917_ACEOF
5918if { (eval echo "$as_me:5918: \"$ac_cpp conftest.$ac_ext\"") >&5
5919  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
5920  ac_status=$?
5921  egrep -v '^ *\+' conftest.er1 >conftest.err
5922  rm -f conftest.er1
5923  cat conftest.err >&5
5924  echo "$as_me:5924: \$? = $ac_status" >&5
5925  (exit $ac_status); } >/dev/null; then
5926  if test -s conftest.err; then
5927    ac_cpp_err=$ac_c_preproc_warn_flag
5928  else
5929    ac_cpp_err=
5930  fi
5931else
5932  ac_cpp_err=yes
5933fi
5934if test -z "$ac_cpp_err"; then
5935  eval "$as_ac_Header=yes"
5936else
5937  echo "$as_me: failed program was:" >&5
5938  cat conftest.$ac_ext >&5
5939  eval "$as_ac_Header=no"
5940fi
5941rm -f conftest.err conftest.$ac_ext
5942fi
5943echo "$as_me:5943: result: `eval echo '${'$as_ac_Header'}'`" >&5
5944echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
5945if test `eval echo '${'$as_ac_Header'}'` = yes; then
5946  cat >>confdefs.h <<EOF
5947#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
5948EOF
5949
5950fi
5951done
5952
5953	fi
5954else
5955        # If we didn't find a tgetent() that supports the buffer
5956        # argument, look again to see whether we can find even
5957        # a crippled one.  A crippled tgetent() is still useful to
5958        # validate values for the TERM environment variable given to
5959        # child processes.
5960	echo "$as_me:5960: checking for partial tgetent function" >&5
5961echo $ECHO_N "checking for partial tgetent function... $ECHO_C" >&6
5962if test "${cf_cv_lib_part_tgetent+set}" = set; then
5963  echo $ECHO_N "(cached) $ECHO_C" >&6
5964else
5965
5966	cf_cv_lib_part_tgetent=no
5967	for cf_termlib in $cf_TERMLIB ; do
5968		LIBS="$cf_save_LIBS -l$cf_termlib"
5969		cat >conftest.$ac_ext <<_ACEOF
5970#line 5970 "configure"
5971#include "confdefs.h"
5972
5973int
5974main (void)
5975{
5976tgetent(0, "$cf_TERMVAR")
5977  ;
5978  return 0;
5979}
5980_ACEOF
5981rm -f conftest.$ac_objext conftest$ac_exeext
5982if { (eval echo "$as_me:5982: \"$ac_link\"") >&5
5983  (eval $ac_link) 2>&5
5984  ac_status=$?
5985  echo "$as_me:5985: \$? = $ac_status" >&5
5986  (exit $ac_status); } &&
5987         { ac_try='test -s conftest$ac_exeext'
5988  { (eval echo "$as_me:5988: \"$ac_try\"") >&5
5989  (eval $ac_try) 2>&5
5990  ac_status=$?
5991  echo "$as_me:5991: \$? = $ac_status" >&5
5992  (exit $ac_status); }; }; then
5993  echo "there is a terminfo/tgetent in $cf_termlib" 1>&5
5994			 cf_cv_lib_part_tgetent="-l$cf_termlib"
5995			 break
5996else
5997  echo "$as_me: failed program was:" >&5
5998cat conftest.$ac_ext >&5
5999fi
6000rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
6001	done
6002	LIBS="$cf_save_LIBS"
6003
6004fi
6005echo "$as_me:6005: result: $cf_cv_lib_part_tgetent" >&5
6006echo "${ECHO_T}$cf_cv_lib_part_tgetent" >&6
6007
6008	if test "$cf_cv_lib_part_tgetent" != no ; then
6009
6010cf_add_libs="$cf_cv_lib_part_tgetent"
6011# Filter out duplicates - this happens with badly-designed ".pc" files...
6012for cf_add_1lib in $LIBS
6013do
6014	for cf_add_2lib in $cf_add_libs
6015	do
6016		if test "x$cf_add_1lib" = "x$cf_add_2lib"
6017		then
6018			cf_add_1lib=
6019			break
6020		fi
6021	done
6022	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
6023done
6024LIBS="$cf_add_libs"
6025
6026for ac_header in termcap.h
6027do
6028as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6029echo "$as_me:6029: checking for $ac_header" >&5
6030echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6031if eval "test \"\${$as_ac_Header+set}\" = set"; then
6032  echo $ECHO_N "(cached) $ECHO_C" >&6
6033else
6034  cat >conftest.$ac_ext <<_ACEOF
6035#line 6035 "configure"
6036#include "confdefs.h"
6037#include <$ac_header>
6038_ACEOF
6039if { (eval echo "$as_me:6039: \"$ac_cpp conftest.$ac_ext\"") >&5
6040  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
6041  ac_status=$?
6042  egrep -v '^ *\+' conftest.er1 >conftest.err
6043  rm -f conftest.er1
6044  cat conftest.err >&5
6045  echo "$as_me:6045: \$? = $ac_status" >&5
6046  (exit $ac_status); } >/dev/null; then
6047  if test -s conftest.err; then
6048    ac_cpp_err=$ac_c_preproc_warn_flag
6049  else
6050    ac_cpp_err=
6051  fi
6052else
6053  ac_cpp_err=yes
6054fi
6055if test -z "$ac_cpp_err"; then
6056  eval "$as_ac_Header=yes"
6057else
6058  echo "$as_me: failed program was:" >&5
6059  cat conftest.$ac_ext >&5
6060  eval "$as_ac_Header=no"
6061fi
6062rm -f conftest.err conftest.$ac_ext
6063fi
6064echo "$as_me:6064: result: `eval echo '${'$as_ac_Header'}'`" >&5
6065echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
6066if test `eval echo '${'$as_ac_Header'}'` = yes; then
6067  cat >>confdefs.h <<EOF
6068#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6069EOF
6070
6071fi
6072done
6073
6074                # If this is linking against ncurses, we'll trigger the
6075                # ifdef in resize.c that turns the termcap stuff back off.
6076
6077cat >>confdefs.h <<\EOF
6078#define USE_TERMINFO 1
6079EOF
6080
6081	fi
6082fi
6083
6084echo "$as_me:6084: checking for X applications class" >&5
6085echo $ECHO_N "checking for X applications class... $ECHO_C" >&6
6086
6087# Check whether --with-app-class or --without-app-class was given.
6088if test "${with_app_class+set}" = set; then
6089  withval="$with_app_class"
6090  APP_CLASS=$withval
6091else
6092  APP_CLASS=XTerm
6093fi;
6094
6095case x$APP_CLASS in
6096(*[/@,%]*)
6097	{ echo "$as_me:6097: WARNING: X applications class cannot contain punctuation" >&5
6098echo "$as_me: WARNING: X applications class cannot contain punctuation" >&2;}
6099	APP_CLASS=XTerm
6100	;;
6101(x[A-Z]*)
6102	;;
6103(*)
6104	{ echo "$as_me:6104: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&5
6105echo "$as_me: WARNING: X applications class must start with capital, ignoring $APP_CLASS" >&2;}
6106	APP_CLASS=XTerm
6107	;;
6108esac
6109
6110echo "$as_me:6110: result: $APP_CLASS" >&5
6111echo "${ECHO_T}$APP_CLASS" >&6
6112
6113echo "$as_me:6113: checking for directory to install resource files" >&5
6114echo $ECHO_N "checking for directory to install resource files... $ECHO_C" >&6
6115
6116# Check whether --with-app-defaults or --without-app-defaults was given.
6117if test "${with_app_defaults+set}" = set; then
6118  withval="$with_app_defaults"
6119  APPSDIR=$withval
6120else
6121  APPSDIR='${exec_prefix}/lib/X11/app-defaults'
6122fi;
6123
6124if test "x$APPSDIR" = xauto
6125then
6126	APPSDIR='${exec_prefix}/lib/X11/app-defaults'
6127	for cf_path in \
6128		/opt/local/share/X11/app-defaults \
6129		/opt/X11/share/X11/app-defaults \
6130		/usr/share/X11/app-defaults \
6131		/usr/X11/share/X11/app-defaults \
6132		/usr/X11/lib/X11/app-defaults \
6133		/usr/lib/X11/app-defaults \
6134		/etc/X11/app-defaults \
6135		/usr/pkg/lib/X11/app-defaults \
6136		/usr/X11R7/lib/X11/app-defaults \
6137		/usr/X11R6/lib/X11/app-defaults \
6138		/usr/X11R5/lib/X11/app-defaults \
6139		/usr/X11R4/lib/X11/app-defaults \
6140		/usr/local/lib/X11/app-defaults \
6141		/usr/local/share/X11/app-defaults \
6142		/usr/lib64/X11/app-defaults
6143	do
6144		if test -d "$cf_path" ; then
6145			APPSDIR="$cf_path"
6146			break
6147		fi
6148	done
6149else
6150	cf_path=$APPSDIR
6151
6152if test "x$prefix" != xNONE; then
6153	cf_path_syntax="$prefix"
6154else
6155	cf_path_syntax="$ac_default_prefix"
6156fi
6157
6158case ".$cf_path" in
6159(.\$\(*\)*|.\'*\'*)
6160	;;
6161(..|./*|.\\*)
6162	;;
6163(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6164	;;
6165(.\${*prefix}*|.\${*dir}*)
6166	eval cf_path="$cf_path"
6167	case ".$cf_path" in
6168	(.NONE/*)
6169		cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6170		;;
6171	esac
6172	;;
6173(.no|.NONE/*)
6174	cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6175	;;
6176(*)
6177	{ { echo "$as_me:6177: error: expected a pathname, not \"$cf_path\"" >&5
6178echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6179   { (exit 1); exit 1; }; }
6180	;;
6181esac
6182
6183fi
6184
6185echo "$as_me:6185: result: $APPSDIR" >&5
6186echo "${ECHO_T}$APPSDIR" >&6
6187
6188no_appsdir=
6189if test "$APPSDIR" = no
6190then
6191	no_appsdir="#"
6192else
6193	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(APPSDIR)"
6194fi
6195
6196echo "$as_me:6196: checking for the icon name" >&5
6197echo $ECHO_N "checking for the icon name... $ECHO_C" >&6
6198
6199# Check whether --with-icon-name or --without-icon-name was given.
6200if test "${with_icon_name+set}" = set; then
6201  withval="$with_icon_name"
6202  ICON_NAME="$withval"
6203else
6204  ICON_NAME=xterm-color
6205fi;
6206case "x$ICON_NAME" in
6207(xyes|xno|x)
6208	ICON_NAME=xterm-color
6209	;;
6210esac
6211
6212echo "$as_me:6212: result: $ICON_NAME" >&5
6213echo "${ECHO_T}$ICON_NAME" >&6
6214
6215echo "$as_me:6215: checking for icon symlink to use" >&5
6216echo $ECHO_N "checking for icon symlink to use... $ECHO_C" >&6
6217
6218# Check whether --with-icon-symlink or --without-icon-symlink was given.
6219if test "${with_icon_symlink+set}" = set; then
6220  withval="$with_icon_symlink"
6221  ICON_SYMLINK="$withval"
6222else
6223  ICON_SYMLINK=NONE
6224fi;
6225case "x$ICON_SYMLINK" in
6226(xyes)
6227	ICON_SYMLINK=xterm
6228	;;
6229(xno|x)
6230	ICON_SYMLINK=NONE
6231	;;
6232esac
6233
6234echo "$as_me:6234: result: $ICON_SYMLINK" >&5
6235echo "${ECHO_T}$ICON_SYMLINK" >&6
6236
6237echo "$as_me:6237: checking for directory to install pixmaps" >&5
6238echo $ECHO_N "checking for directory to install pixmaps... $ECHO_C" >&6
6239
6240# Check whether --with-pixmapdir or --without-pixmapdir was given.
6241if test "${with_pixmapdir+set}" = set; then
6242  withval="$with_pixmapdir"
6243  PIXMAPDIR=$withval
6244else
6245  test -z "$PIXMAPDIR" && PIXMAPDIR='${datadir}/pixmaps'
6246fi;
6247
6248if test "x$PIXMAPDIR" = xauto
6249then
6250	PIXMAPDIR='${datadir}/pixmaps'
6251	for cf_path in \
6252		/usr/share/pixmaps \
6253		/usr/X11R6/share/pixmaps
6254	do
6255		if test -d "$cf_path" ; then
6256			PIXMAPDIR="$cf_path"
6257			break
6258		fi
6259	done
6260else
6261	cf_path=$PIXMAPDIR
6262
6263if test "x$prefix" != xNONE; then
6264	cf_path_syntax="$prefix"
6265else
6266	cf_path_syntax="$ac_default_prefix"
6267fi
6268
6269case ".$cf_path" in
6270(.\$\(*\)*|.\'*\'*)
6271	;;
6272(..|./*|.\\*)
6273	;;
6274(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6275	;;
6276(.\${*prefix}*|.\${*dir}*)
6277	eval cf_path="$cf_path"
6278	case ".$cf_path" in
6279	(.NONE/*)
6280		cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6281		;;
6282	esac
6283	;;
6284(.no|.NONE/*)
6285	cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6286	;;
6287(*)
6288	{ { echo "$as_me:6288: error: expected a pathname, not \"$cf_path\"" >&5
6289echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6290   { (exit 1); exit 1; }; }
6291	;;
6292esac
6293
6294fi
6295echo "$as_me:6295: result: $PIXMAPDIR" >&5
6296echo "${ECHO_T}$PIXMAPDIR" >&6
6297
6298no_pixmapdir=
6299if test "$PIXMAPDIR" = no
6300then
6301	no_pixmapdir="#"
6302else
6303	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(PIXMAPDIR)"
6304fi
6305
6306echo "$as_me:6306: checking for directory to install icons" >&5
6307echo $ECHO_N "checking for directory to install icons... $ECHO_C" >&6
6308
6309# Check whether --with-icondir or --without-icondir was given.
6310if test "${with_icondir+set}" = set; then
6311  withval="$with_icondir"
6312  ICONDIR=$withval
6313else
6314  test -z "$ICONDIR" && ICONDIR=no
6315fi;
6316
6317if test "x$ICONDIR" = xauto
6318then
6319	ICONDIR='${datadir}/icons'
6320	for cf_path in \
6321		/usr/share/icons \
6322		/usr/X11R6/share/icons
6323	do
6324		if test -d "$cf_path" ; then
6325			ICONDIR="$cf_path"
6326			break
6327		fi
6328	done
6329else
6330	cf_path=$ICONDIR
6331
6332if test "x$prefix" != xNONE; then
6333	cf_path_syntax="$prefix"
6334else
6335	cf_path_syntax="$ac_default_prefix"
6336fi
6337
6338case ".$cf_path" in
6339(.\$\(*\)*|.\'*\'*)
6340	;;
6341(..|./*|.\\*)
6342	;;
6343(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6344	;;
6345(.\${*prefix}*|.\${*dir}*)
6346	eval cf_path="$cf_path"
6347	case ".$cf_path" in
6348	(.NONE/*)
6349		cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6350		;;
6351	esac
6352	;;
6353(.no|.NONE/*)
6354	cf_path=`echo $cf_path | sed -e s%NONE%$cf_path_syntax%`
6355	;;
6356(*)
6357	{ { echo "$as_me:6357: error: expected a pathname, not \"$cf_path\"" >&5
6358echo "$as_me: error: expected a pathname, not \"$cf_path\"" >&2;}
6359   { (exit 1); exit 1; }; }
6360	;;
6361esac
6362
6363fi
6364echo "$as_me:6364: result: $ICONDIR" >&5
6365echo "${ECHO_T}$ICONDIR" >&6
6366
6367no_icondir=
6368if test "$ICONDIR" = no
6369then
6370	no_icondir="#"
6371else
6372	EXTRA_INSTALL_DIRS="$EXTRA_INSTALL_DIRS \$(ICONDIR)"
6373fi
6374
6375echo "$as_me:6375: checking if icon theme should be used" >&5
6376echo $ECHO_N "checking if icon theme should be used... $ECHO_C" >&6
6377
6378# Check whether --with-icon-theme or --without-icon-theme was given.
6379if test "${with_icon_theme+set}" = set; then
6380  withval="$with_icon_theme"
6381  ICON_THEME=$withval
6382else
6383  ICON_THEME=no
6384fi;
6385
6386case "x$ICON_THEME" in
6387(xno)
6388	;;
6389(x|xyes)
6390	ICON_THEME=hicolor
6391	;;
6392esac
6393echo "$as_me:6393: result: $ICON_THEME" >&5
6394echo "${ECHO_T}$ICON_THEME" >&6
6395
6396if test "x$ICON_THEME" = xno
6397then
6398	if test "x$ICONDIR" != xno
6399	then
6400		test -n "$verbose" && echo "	ignoring icondir without theme" 1>&6
6401
6402echo "${as_me:-configure}:6402: testing ignoring icondir without theme ..." 1>&5
6403
6404		no_icondir="#"
6405	fi
6406else
6407	if test "x$ICONDIR" = xno
6408	then
6409		{ { echo "$as_me:6409: error: icondir must be set for icon theme" >&5
6410echo "$as_me: error: icondir must be set for icon theme" >&2;}
6411   { (exit 1); exit 1; }; }
6412	fi
6413fi
6414
6415: ${ICON_FORMAT:=".svg .png .xpm"}
6416
6417# ICON_NAME=
6418ICON_LIST=
6419
6420if test "x$ICON_THEME" != xno
6421then
6422	cf_icon_list="icons/$ICON_NAME icons/${ICON_NAME}_48x48"
6423else
6424	cf_icon_list="icons/${ICON_NAME}_48x48"
6425fi
6426
6427echo "$as_me:6427: checking for icon(s) to install" >&5
6428echo $ECHO_N "checking for icon(s) to install... $ECHO_C" >&6
6429for cf_name in $cf_icon_list
6430do
6431	test -n "$verbose" && echo "	using $ICON_FORMAT" 1>&6
6432
6433echo "${as_me:-configure}:6433: testing using $ICON_FORMAT ..." 1>&5
6434
6435	for cf_suffix in $ICON_FORMAT
6436	do
6437		cf_icon="${cf_name}${cf_suffix}"
6438		cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6439		if test ! -f "${cf_left}"
6440		then
6441			if test "x$srcdir" != "x."
6442			then
6443				cf_icon="${srcdir}/${cf_left}"
6444				cf_left=`echo "$cf_icon" | sed -e 's/:.*//'`
6445				if test ! -f "${cf_left}"
6446				then
6447					continue
6448				fi
6449			else
6450				continue
6451			fi
6452		fi
6453		if test "x$ICON_THEME" != xno
6454		then
6455			cf_base=`basename $cf_left`
6456			cf_trim=`echo "$cf_base" | sed -e 's/_[0-9][0-9]x[0-9][0-9]\././'`
6457			case "x${cf_base}" in
6458			(*:*)
6459				cf_next=$cf_base
6460				# user-defined mapping
6461				;;
6462			(*.png)
6463				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'`
6464				if test -z "$cf_size"
6465				then
6466					{ echo "$as_me:6466: WARNING: cannot determine size of $cf_left" >&5
6467echo "$as_me: WARNING: cannot determine size of $cf_left" >&2;}
6468					continue
6469				fi
6470				cf_next="$cf_size/apps/$cf_trim"
6471				;;
6472			(*.svg)
6473				cf_next="scalable/apps/$cf_trim"
6474				;;
6475			(*.xpm)
6476				test -n "$verbose" && echo "	ignored XPM file in icon theme" 1>&6
6477
6478echo "${as_me:-configure}:6478: testing ignored XPM file in icon theme ..." 1>&5
6479
6480				continue
6481				;;
6482			(*_[0-9][0-9]*x[0-9][0-9]*.*)
6483				cf_size=`echo "$cf_left"|sed -e 's/^.*_\([0-9][0-9]*x[0-9][0-9]*\)\..*$/\1/'`
6484				cf_left=`echo "$cf_left"|sed -e 's/^\(.*\)_\([0-9][0-9]*x[0-9][0-9]*\)\(\..*\)$/\1\3/'`
6485				cf_next="$cf_size/apps/$cf_base"
6486				;;
6487			esac
6488			test -n "$verbose" && echo "	adding $cf_next" 1>&6
6489
6490echo "${as_me:-configure}:6490: testing adding $cf_next ..." 1>&5
6491
6492			cf_icon="${cf_icon}:${cf_next}"
6493		fi
6494		test -n "$ICON_LIST" && ICON_LIST="$ICON_LIST "
6495		ICON_LIST="$ICON_LIST${cf_icon}"
6496		if test -z "$ICON_NAME"
6497		then
6498			ICON_NAME=`basename $cf_icon | sed -e 's/[.:].*//'`
6499		fi
6500	done
6501done
6502
6503if test -n "$verbose"
6504then
6505	echo "$as_me:6505: checking result" >&5
6506echo $ECHO_N "checking result... $ECHO_C" >&6
6507fi
6508echo "$as_me:6508: result: $ICON_LIST" >&5
6509echo "${ECHO_T}$ICON_LIST" >&6
6510
6511if test -z "$ICON_LIST"
6512then
6513	{ { echo "$as_me:6513: error: no icons found" >&5
6514echo "$as_me: error: no icons found" >&2;}
6515   { (exit 1); exit 1; }; }
6516fi
6517
6518echo "$as_me:6518: checking for icon name" >&5
6519echo $ECHO_N "checking for icon name... $ECHO_C" >&6
6520echo "$as_me:6520: result: $ICON_NAME" >&5
6521echo "${ECHO_T}$ICON_NAME" >&6
6522
6523# Comment-out the install-desktop rule if the desktop-utils are not found.
6524echo "$as_me:6524: checking if you want to install desktop files" >&5
6525echo $ECHO_N "checking if you want to install desktop files... $ECHO_C" >&6
6526
6527# Check whether --enable-desktop or --disable-desktop was given.
6528if test "${enable_desktop+set}" = set; then
6529  enableval="$enable_desktop"
6530  test "$enableval" != no && enableval=yes
6531	if test "$enableval" != "yes" ; then
6532    enable_desktop=$enableval
6533	else
6534		enable_desktop=$enableval
6535	fi
6536else
6537  enableval=yes
6538	enable_desktop=$enableval
6539
6540fi;
6541echo "$as_me:6541: result: $enable_desktop" >&5
6542echo "${ECHO_T}$enable_desktop" >&6
6543
6544desktop_utils=
6545if test "$enable_desktop" = yes ; then
6546# Extract the first word of "desktop-file-install", so it can be a program name with args.
6547set dummy desktop-file-install; ac_word=$2
6548echo "$as_me:6548: checking for $ac_word" >&5
6549echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6550if test "${ac_cv_prog_desktop_utils+set}" = set; then
6551  echo $ECHO_N "(cached) $ECHO_C" >&6
6552else
6553  if test -n "$desktop_utils"; then
6554  ac_cv_prog_desktop_utils="$desktop_utils" # Let the user override the test.
6555else
6556  ac_save_IFS=$IFS; IFS=$ac_path_separator
6557ac_dummy="$PATH"
6558for ac_dir in $ac_dummy; do
6559  IFS=$ac_save_IFS
6560  test -z "$ac_dir" && ac_dir=.
6561  $as_executable_p "$ac_dir/$ac_word" || continue
6562ac_cv_prog_desktop_utils="yes"
6563echo "$as_me:6563: found $ac_dir/$ac_word" >&5
6564break
6565done
6566
6567  test -z "$ac_cv_prog_desktop_utils" && ac_cv_prog_desktop_utils="no"
6568fi
6569fi
6570desktop_utils=$ac_cv_prog_desktop_utils
6571if test -n "$desktop_utils"; then
6572  echo "$as_me:6572: result: $desktop_utils" >&5
6573echo "${ECHO_T}$desktop_utils" >&6
6574else
6575  echo "$as_me:6575: result: no" >&5
6576echo "${ECHO_T}no" >&6
6577fi
6578
6579fi
6580
6581test "$desktop_utils" = yes && desktop_utils= || desktop_utils="#"
6582
6583if test -z "$desktop_utils"
6584then
6585	echo "$as_me:6585: checking for requested desktop-category" >&5
6586echo $ECHO_N "checking for requested desktop-category... $ECHO_C" >&6
6587
6588# Check whether --with-desktop-category or --without-desktop-category was given.
6589if test "${with_desktop_category+set}" = set; then
6590  withval="$with_desktop_category"
6591  cf_desktop_want=$withval
6592else
6593  cf_desktop_want=auto
6594fi;
6595	echo "$as_me:6595: result: $cf_desktop_want" >&5
6596echo "${ECHO_T}$cf_desktop_want" >&6
6597
6598	if test "$cf_desktop_want" = auto
6599	then
6600		rm -rf conftest*
6601		cf_desktop_also=
6602		for cf_desktop_dir in  \
6603			/usr/share/app-install \
6604			/usr/share/applications
6605		do
6606			if test -d $cf_desktop_dir
6607			then
6608				find $cf_desktop_dir -name '*.desktop' | \
6609				while true
6610				do
6611					read cf_desktop_path
6612					test -z "$cf_desktop_path" && break
6613					cf_desktop_name=`basename $cf_desktop_path .desktop`
6614					case $cf_desktop_name in
6615					(xterm|*-xterm|*rxvt*|*konsole|*[Tt]erminal)
6616						test -n "$verbose" && echo "	inspect $cf_desktop_path" 1>&6
6617
6618echo "${as_me:-configure}:6618: testing inspect $cf_desktop_path ..." 1>&5
6619
6620						egrep '^Categories=' $cf_desktop_path | \
6621							tr ';' '\n' | \
6622							sed -e 's%^.*=%%' -e '/^$/d' >>conftest.1
6623						;;
6624					esac
6625				done
6626			fi
6627		done
6628		if test -s conftest.1
6629		then
6630			cf_desktop_last=
6631			sort conftest.1 | \
6632			while true
6633			do
6634				read cf_desktop_this
6635				test -z "$cf_desktop_this" && break
6636				case $cf_desktop_this in
6637				(Qt*|GTK*|KDE*|GNOME*|*XFCE*|*Xfce*)
6638					;;
6639				(System|TerminalEmulator|*)
6640					test "x$cf_desktop_last" != "x$cf_desktop_this" && echo $cf_desktop_this >>conftest.2
6641					;;
6642				esac
6643				cf_desktop_last=$cf_desktop_this
6644			done
6645			cf_desktop_want=`cat conftest.2 | tr '\n' ';'`
6646		fi
6647		if test -n "$cf_desktop_want"
6648		then
6649			if test "$cf_desktop_want" = auto
6650			then
6651				cf_desktop_want=
6652			else
6653				# do a sanity check on the semicolon-separated list, ignore on failure
6654				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/[^;]//g'`
6655				test -z "$cf_desktop_test" && cf_desktop_want=
6656				cf_desktop_test=`echo "$cf_desktop_want" | sed -e 's/^.*;$/./g'`
6657				test -z "$cf_desktop_test" && cf_desktop_want=
6658			fi
6659		fi
6660		if test -z "$cf_desktop_want"
6661		then
6662			cf_desktop_want="`echo "System|TerminalEmulator|*" | sed -e 's/\*//g' -e 's/|/;/g' -e 's/;*$/;/g'`"
6663			test -n "$verbose" && echo "	no usable value found for desktop category" 1>&6
6664
6665echo "${as_me:-configure}:6665: testing no usable value found for desktop category ..." 1>&5
6666
6667		fi
6668	fi
6669	DESKTOP_CATEGORY=`echo "$cf_desktop_want" | sed -e 's/[ ,]/;/g'`
6670	test -n "$verbose" && echo "	will use Categories=$DESKTOP_CATEGORY" 1>&6
6671
6672echo "${as_me:-configure}:6672: testing will use Categories=$DESKTOP_CATEGORY ..." 1>&5
6673
6674fi
6675
6676echo "$as_me:6676: checking for install-permissions reference" >&5
6677echo $ECHO_N "checking for install-permissions reference... $ECHO_C" >&6
6678
6679# Check whether --with-reference or --without-reference was given.
6680if test "${with_reference+set}" = set; then
6681  withval="$with_reference"
6682  with_reference=$withval
6683else
6684  with_reference=xterm
6685fi;
6686echo "$as_me:6686: result: $with_reference" >&5
6687echo "${ECHO_T}$with_reference" >&6
6688
6689with_full_paths=yes
6690
6691	echo "$as_me:6691: checking for PATH separator" >&5
6692echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
6693	case $cf_cv_system_name in
6694	(os2*)	PATH_SEPARATOR=';'  ;;
6695	(*)	${PATH_SEPARATOR:=':'}  ;;
6696	esac
6697
6698	echo "$as_me:6698: result: $PATH_SEPARATOR" >&5
6699echo "${ECHO_T}$PATH_SEPARATOR" >&6
6700
6701test -z "$XTERM_PATH" && XTERM_PATH=$with_reference
6702for ac_prog in $XTERM_PATH $with_reference
6703do
6704  # Extract the first word of "$ac_prog", so it can be a program name with args.
6705set dummy $ac_prog; ac_word=$2
6706echo "$as_me:6706: checking for $ac_word" >&5
6707echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6708if test "${ac_cv_path_XTERM_PATH+set}" = set; then
6709  echo $ECHO_N "(cached) $ECHO_C" >&6
6710else
6711  case $XTERM_PATH in
6712  [\\/]* | ?:[\\/]*)
6713  ac_cv_path_XTERM_PATH="$XTERM_PATH" # Let the user override the test with a path.
6714  ;;
6715  *)
6716  ac_save_IFS=$IFS; IFS=$ac_path_separator
6717ac_dummy="$PATH"
6718for ac_dir in $ac_dummy; do
6719  IFS=$ac_save_IFS
6720  test -z "$ac_dir" && ac_dir=.
6721  if $as_executable_p "$ac_dir/$ac_word"; then
6722   ac_cv_path_XTERM_PATH="$ac_dir/$ac_word"
6723   echo "$as_me:6723: found $ac_dir/$ac_word" >&5
6724   break
6725fi
6726done
6727
6728  ;;
6729esac
6730fi
6731XTERM_PATH=$ac_cv_path_XTERM_PATH
6732
6733if test -n "$XTERM_PATH"; then
6734  echo "$as_me:6734: result: $XTERM_PATH" >&5
6735echo "${ECHO_T}$XTERM_PATH" >&6
6736else
6737  echo "$as_me:6737: result: no" >&5
6738echo "${ECHO_T}no" >&6
6739fi
6740
6741  test -n "$XTERM_PATH" && break
6742done
6743test -n "$XTERM_PATH" || XTERM_PATH="$XTERM_PATH"
6744
6745cf_path_prog=""
6746cf_path_args=""
6747IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
6748for cf_temp in $ac_cv_path_XTERM_PATH
6749do
6750	if test -z "$cf_path_prog" ; then
6751		if test "$with_full_paths" = yes ; then
6752
6753if test "x$prefix" != xNONE; then
6754	cf_path_syntax="$prefix"
6755else
6756	cf_path_syntax="$ac_default_prefix"
6757fi
6758
6759case ".$cf_temp" in
6760(.\$\(*\)*|.\'*\'*)
6761	;;
6762(..|./*|.\\*)
6763	;;
6764(.[a-zA-Z]:[\\/]*) # OS/2 EMX
6765	;;
6766(.\${*prefix}*|.\${*dir}*)
6767	eval cf_temp="$cf_temp"
6768	case ".$cf_temp" in
6769	(.NONE/*)
6770		cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6771		;;
6772	esac
6773	;;
6774(.no|.NONE/*)
6775	cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
6776	;;
6777(*)
6778	break
6779	;;
6780esac
6781
6782			cf_path_prog="$cf_temp"
6783		else
6784			cf_path_prog="`basename $cf_temp`"
6785		fi
6786	elif test -z "$cf_path_args" ; then
6787		cf_path_args="$cf_temp"
6788	else
6789		cf_path_args="$cf_path_args $cf_temp"
6790	fi
6791done
6792IFS="$cf_save_ifs"
6793
6794if test -n "$cf_path_prog" ; then
6795
6796echo "${as_me:-configure}:6796: testing defining path for ${cf_path_prog} ..." 1>&5
6797
6798cat >>confdefs.h <<EOF
6799#define XTERM_PATH_PATH "$cf_path_prog"
6800EOF
6801
6802	test -n "$cf_path_args" &&
6803cat >>confdefs.h <<EOF
6804#define XTERM_PATH_ARGS "$cf_path_args"
6805EOF
6806
6807fi
6808
6809# If any of --program-prefix, --program-suffix or --program-transform-name is
6810# given, accept an option tell the makefile to create a symbolic link, e.g.,
6811# to "xterm" on install.
6812XTERM_SYMLINK=NONE
6813
6814if test "$program_transform_name" != "'s,,,'" ; then
6815cf_name=`echo "$program_transform_name" | sed -e 's,\\$\\$,$,g'`
6816cf_name=`echo xterm |sed -e "$cf_name"`
6817echo "$as_me:6817: checking for symbolic link to create to $cf_name" >&5
6818echo $ECHO_N "checking for symbolic link to create to $cf_name... $ECHO_C" >&6
6819
6820# Check whether --with-xterm-symlink or --without-xterm-symlink was given.
6821if test "${with_xterm_symlink+set}" = set; then
6822  withval="$with_xterm_symlink"
6823  with_symlink=$withval
6824else
6825  with_symlink=xterm
6826fi;
6827echo "$as_me:6827: result: $with_symlink" >&5
6828echo "${ECHO_T}$with_symlink" >&6
6829test "$with_symlink" = yes && with_symlink=xterm
6830test -n "$with_symlink" && \
6831	test "$with_symlink" != no && \
6832	test "$with_symlink" != $cf_name && \
6833	XTERM_SYMLINK="$with_symlink"
6834fi
6835
6836echo "$as_me:6836: checking if you want to disable openpty" >&5
6837echo $ECHO_N "checking if you want to disable openpty... $ECHO_C" >&6
6838
6839# Check whether --enable-openpty or --disable-openpty was given.
6840if test "${enable_openpty+set}" = set; then
6841  enableval="$enable_openpty"
6842  test "$enableval" != no && enableval=yes
6843	if test "$enableval" != "yes" ; then
6844    disable_openpty=yes
6845	else
6846		disable_openpty=no
6847	fi
6848else
6849  enableval=yes
6850	disable_openpty=no
6851
6852fi;
6853echo "$as_me:6853: result: $disable_openpty" >&5
6854echo "${ECHO_T}$disable_openpty" >&6
6855
6856echo "$as_me:6856: checking if you want to disable setuid" >&5
6857echo $ECHO_N "checking if you want to disable setuid... $ECHO_C" >&6
6858
6859# Check whether --enable-setuid or --disable-setuid was given.
6860if test "${enable_setuid+set}" = set; then
6861  enableval="$enable_setuid"
6862  test "$enableval" != no && enableval=yes
6863	if test "$enableval" != "yes" ; then
6864    disable_setuid=yes
6865	else
6866		disable_setuid=no
6867	fi
6868else
6869  enableval=yes
6870	disable_setuid=no
6871
6872fi;
6873echo "$as_me:6873: result: $disable_setuid" >&5
6874echo "${ECHO_T}$disable_setuid" >&6
6875
6876echo "$as_me:6876: checking if you want to disable setgid" >&5
6877echo $ECHO_N "checking if you want to disable setgid... $ECHO_C" >&6
6878
6879# Check whether --enable-setgid or --disable-setgid was given.
6880if test "${enable_setgid+set}" = set; then
6881  enableval="$enable_setgid"
6882  test "$enableval" != no && enableval=yes
6883	if test "$enableval" != "yes" ; then
6884    disable_setgid=yes
6885	else
6886		disable_setgid=no
6887	fi
6888else
6889  enableval=yes
6890	disable_setgid=no
6891
6892fi;
6893echo "$as_me:6893: result: $disable_setgid" >&5
6894echo "${ECHO_T}$disable_setgid" >&6
6895
6896echo "$as_me:6896: checking if you want to run xterm setuid to a given user" >&5
6897echo $ECHO_N "checking if you want to run xterm setuid to a given user... $ECHO_C" >&6
6898
6899# Check whether --with-setuid or --without-setuid was given.
6900if test "${with_setuid+set}" = set; then
6901  withval="$with_setuid"
6902  use_given_setuid=$withval
6903else
6904  use_given_setuid=no
6905fi;
6906echo "$as_me:6906: result: $use_given_setuid" >&5
6907echo "${ECHO_T}$use_given_setuid" >&6
6908
6909if test "$use_given_setuid" != no ; then
6910	if test "$use_given_setuid" = yes ; then
6911		cf_cv_given_setuid=root
6912	else
6913		cf_cv_given_setuid=$use_given_setuid
6914	fi
6915	# inherit SINSTALL_OPTS from environment to allow packager to customize it.
6916	SINSTALL_OPTS="$SINSTALL_OPTS u+s -u $cf_cv_given_setuid"
6917fi
6918
6919echo "$as_me:6919: checking if you want to run xterm setgid to match utmp/utmpx file" >&5
6920echo $ECHO_N "checking if you want to run xterm setgid to match utmp/utmpx file... $ECHO_C" >&6
6921
6922# Check whether --with-utmp-setgid or --without-utmp-setgid was given.
6923if test "${with_utmp_setgid+set}" = set; then
6924  withval="$with_utmp_setgid"
6925  use_utmp_setgid=$withval
6926else
6927  use_utmp_setgid=no
6928fi;
6929echo "$as_me:6929: result: $use_utmp_setgid" >&5
6930echo "${ECHO_T}$use_utmp_setgid" >&6
6931
6932if test "$use_utmp_setgid" != no ; then
6933	if test "$use_utmp_setgid" = yes ; then
6934
6935if test $cf_cv_have_utmp != no ; then
6936echo "$as_me:6936: checking for utmp/utmpx group" >&5
6937echo $ECHO_N "checking for utmp/utmpx group... $ECHO_C" >&6
6938if test "${cf_cv_utmp_group+set}" = set; then
6939  echo $ECHO_N "(cached) $ECHO_C" >&6
6940else
6941
6942for cf_utmp_path in /var/adm /var/run
6943do
6944	for cf_utmp_file in utmpx utmp
6945	do
6946		if test -f $cf_utmp_path/$cf_utmp_file
6947		then
6948			cf_cv_utmp_group=root
6949
6950			cf_option="-l -L"
6951
6952			# Expect listing to have fields like this:
6953			#-r--r--r--   1 user      group       34293 Jul 18 16:29 pathname
6954			ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6955			read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6956			if test -z "$cf_rest" ; then
6957				cf_option="$cf_option -g"
6958				ls $cf_option $cf_utmp_path/$cf_utmp_file >conftest
6959				read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest
6960			fi
6961			rm -f conftest
6962
6963			# If we have a pathname, and the date fields look right, assume we've
6964			# captured the group as well.
6965			if test -n "$cf_rest" ; then
6966				cf_test=`echo "${cf_date2}${cf_date3}" | sed -e 's/[0-9:]//g'`
6967				if test -z "$cf_test" ; then
6968					cf_cv_utmp_group=$cf_grp;
6969				fi
6970			fi
6971			break
6972		fi
6973	done
6974	test -n "$cf_cv_utmp_group" && break
6975done
6976
6977fi
6978echo "$as_me:6978: result: $cf_cv_utmp_group" >&5
6979echo "${ECHO_T}$cf_cv_utmp_group" >&6
6980else
6981	{ { echo "$as_me:6981: error: cannot find utmp group" >&5
6982echo "$as_me: error: cannot find utmp group" >&2;}
6983   { (exit 1); exit 1; }; }
6984fi
6985
6986	else
6987		cf_cv_utmp_group=$use_utmp_setgid
6988	fi
6989	if test "$cf_cv_posix_saved_ids" != yes ; then
6990		{ { echo "$as_me:6990: error: Your system does not support POSIX saved-ids" >&5
6991echo "$as_me: error: Your system does not support POSIX saved-ids" >&2;}
6992   { (exit 1); exit 1; }; }
6993	fi
6994
6995cat >>confdefs.h <<\EOF
6996#define USE_UTMP_SETGID 1
6997EOF
6998
6999	SINSTALL_OPTS="$SINSTALL_OPTS g+s -g $cf_cv_utmp_group"
7000fi
7001
7002echo "$as_me:7002: checking if you want to link with utempter" >&5
7003echo $ECHO_N "checking if you want to link with utempter... $ECHO_C" >&6
7004
7005# Check whether --with-utempter or --without-utempter was given.
7006if test "${with_utempter+set}" = set; then
7007  withval="$with_utempter"
7008  use_utempter=$withval
7009else
7010  use_utempter=no
7011fi;
7012echo "$as_me:7012: result: $use_utempter" >&5
7013echo "${ECHO_T}$use_utempter" >&6
7014
7015if test "$use_utempter" = yes ; then
7016
7017echo "$as_me:7017: checking if we can link with utempter library" >&5
7018echo $ECHO_N "checking if we can link with utempter library... $ECHO_C" >&6
7019if test "${cf_cv_have_utempter+set}" = set; then
7020  echo $ECHO_N "(cached) $ECHO_C" >&6
7021else
7022
7023cf_save_LIBS="$LIBS"
7024
7025cf_add_libs="-lutempter"
7026# Filter out duplicates - this happens with badly-designed ".pc" files...
7027for cf_add_1lib in $LIBS
7028do
7029	for cf_add_2lib in $cf_add_libs
7030	do
7031		if test "x$cf_add_1lib" = "x$cf_add_2lib"
7032		then
7033			cf_add_1lib=
7034			break
7035		fi
7036	done
7037	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7038done
7039LIBS="$cf_add_libs"
7040
7041cat >conftest.$ac_ext <<_ACEOF
7042#line 7042 "configure"
7043#include "confdefs.h"
7044
7045#include <utempter.h>
7046
7047int
7048main (void)
7049{
7050
7051	addToUtmp("/dev/tty", 0, 1);
7052	removeFromUtmp();
7053
7054  ;
7055  return 0;
7056}
7057_ACEOF
7058rm -f conftest.$ac_objext conftest$ac_exeext
7059if { (eval echo "$as_me:7059: \"$ac_link\"") >&5
7060  (eval $ac_link) 2>&5
7061  ac_status=$?
7062  echo "$as_me:7062: \$? = $ac_status" >&5
7063  (exit $ac_status); } &&
7064         { ac_try='test -s conftest$ac_exeext'
7065  { (eval echo "$as_me:7065: \"$ac_try\"") >&5
7066  (eval $ac_try) 2>&5
7067  ac_status=$?
7068  echo "$as_me:7068: \$? = $ac_status" >&5
7069  (exit $ac_status); }; }; then
7070
7071	cf_cv_have_utempter=yes
7072else
7073  echo "$as_me: failed program was:" >&5
7074cat conftest.$ac_ext >&5
7075
7076	cf_cv_have_utempter=no
7077fi
7078rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7079LIBS="$cf_save_LIBS"
7080
7081fi
7082echo "$as_me:7082: result: $cf_cv_have_utempter" >&5
7083echo "${ECHO_T}$cf_cv_have_utempter" >&6
7084if test "$cf_cv_have_utempter" = yes ; then
7085
7086cat >>confdefs.h <<\EOF
7087#define USE_UTEMPTER 1
7088EOF
7089
7090cf_add_libs="-lutempter"
7091# Filter out duplicates - this happens with badly-designed ".pc" files...
7092for cf_add_1lib in $LIBS
7093do
7094	for cf_add_2lib in $cf_add_libs
7095	do
7096		if test "x$cf_add_1lib" = "x$cf_add_2lib"
7097		then
7098			cf_add_1lib=
7099			break
7100		fi
7101	done
7102	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
7103done
7104LIBS="$cf_add_libs"
7105
7106fi
7107
7108	test "$cf_cv_have_utempter" != yes && use_utempter=no
7109else
7110	use_utempter=no
7111fi
7112
7113# Some configurations permit (or require) either setuid or setgid mode.
7114# Let the user decide.
7115if test "$use_utempter" = yes ; then
7116	if test "${enable_setuid+set}" != set ; then
7117		disable_setuid=yes
7118		test -n "$verbose" && echo "	No --disable-setuid option given, force to yes" 1>&6
7119
7120echo "${as_me:-configure}:7120: testing No --disable-setuid option given, force to yes ..." 1>&5
7121
7122	fi
7123fi
7124
7125###	checks for external data
7126
7127echo "$as_me:7127: checking if external errno is declared" >&5
7128echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
7129if test "${cf_cv_dcl_errno+set}" = set; then
7130  echo $ECHO_N "(cached) $ECHO_C" >&6
7131else
7132
7133	cat >conftest.$ac_ext <<_ACEOF
7134#line 7134 "configure"
7135#include "confdefs.h"
7136
7137#ifdef HAVE_STDLIB_H
7138#include <stdlib.h>
7139#endif
7140#include <stdio.h>
7141#include <sys/types.h>
7142#include <errno.h>
7143int
7144main (void)
7145{
7146int x = (int) errno
7147  ;
7148  return 0;
7149}
7150_ACEOF
7151rm -f conftest.$ac_objext
7152if { (eval echo "$as_me:7152: \"$ac_compile\"") >&5
7153  (eval $ac_compile) 2>&5
7154  ac_status=$?
7155  echo "$as_me:7155: \$? = $ac_status" >&5
7156  (exit $ac_status); } &&
7157         { ac_try='test -s conftest.$ac_objext'
7158  { (eval echo "$as_me:7158: \"$ac_try\"") >&5
7159  (eval $ac_try) 2>&5
7160  ac_status=$?
7161  echo "$as_me:7161: \$? = $ac_status" >&5
7162  (exit $ac_status); }; }; then
7163  cf_cv_dcl_errno=yes
7164else
7165  echo "$as_me: failed program was:" >&5
7166cat conftest.$ac_ext >&5
7167cf_cv_dcl_errno=no
7168fi
7169rm -f conftest.$ac_objext conftest.$ac_ext
7170
7171fi
7172echo "$as_me:7172: result: $cf_cv_dcl_errno" >&5
7173echo "${ECHO_T}$cf_cv_dcl_errno" >&6
7174
7175if test "$cf_cv_dcl_errno" = no ; then
7176
7177cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7178
7179	cat >>confdefs.h <<EOF
7180#define $cf_result 1
7181EOF
7182
7183fi
7184
7185# It's possible (for near-UNIX clones) that the data doesn't exist
7186
7187echo "$as_me:7187: checking if external errno exists" >&5
7188echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
7189if test "${cf_cv_have_errno+set}" = set; then
7190  echo $ECHO_N "(cached) $ECHO_C" >&6
7191else
7192
7193	cat >conftest.$ac_ext <<_ACEOF
7194#line 7194 "configure"
7195#include "confdefs.h"
7196
7197#undef errno
7198extern int errno;
7199
7200int
7201main (void)
7202{
7203errno = 2
7204  ;
7205  return 0;
7206}
7207_ACEOF
7208rm -f conftest.$ac_objext conftest$ac_exeext
7209if { (eval echo "$as_me:7209: \"$ac_link\"") >&5
7210  (eval $ac_link) 2>&5
7211  ac_status=$?
7212  echo "$as_me:7212: \$? = $ac_status" >&5
7213  (exit $ac_status); } &&
7214         { ac_try='test -s conftest$ac_exeext'
7215  { (eval echo "$as_me:7215: \"$ac_try\"") >&5
7216  (eval $ac_try) 2>&5
7217  ac_status=$?
7218  echo "$as_me:7218: \$? = $ac_status" >&5
7219  (exit $ac_status); }; }; then
7220  cf_cv_have_errno=yes
7221else
7222  echo "$as_me: failed program was:" >&5
7223cat conftest.$ac_ext >&5
7224cf_cv_have_errno=no
7225fi
7226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7227
7228fi
7229echo "$as_me:7229: result: $cf_cv_have_errno" >&5
7230echo "${ECHO_T}$cf_cv_have_errno" >&6
7231
7232if test "$cf_cv_have_errno" = yes ; then
7233
7234cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7235
7236	cat >>confdefs.h <<EOF
7237#define $cf_result 1
7238EOF
7239
7240fi
7241
7242echo "$as_me:7242: checking for explicit tty group name" >&5
7243echo $ECHO_N "checking for explicit tty group name... $ECHO_C" >&6
7244
7245# Check whether --with-tty-group or --without-tty-group was given.
7246if test "${with_tty_group+set}" = set; then
7247  withval="$with_tty_group"
7248  cf_tty_group=$withval
7249else
7250  cf_tty_group=auto...
7251fi;
7252test -z "$cf_tty_group"    && cf_tty_group=auto...
7253test "$cf_tty_group" = yes && cf_tty_group=auto...
7254echo "$as_me:7254: result: $cf_tty_group" >&5
7255echo "${ECHO_T}$cf_tty_group" >&6
7256
7257if test "$cf_tty_group" = "auto..." ; then
7258echo "$as_me:7258: checking for tty group name" >&5
7259echo $ECHO_N "checking for tty group name... $ECHO_C" >&6
7260if test "${cf_cv_tty_group_name+set}" = set; then
7261  echo $ECHO_N "(cached) $ECHO_C" >&6
7262else
7263
7264# If we are configuring as root, it is hard to get a clue about the tty group.
7265# But we'll guess based on how our connection is set up - assuming it is done
7266# properly.
7267
7268cf_uid=`id | sed -e 's/^^=*=//' -e 's/(.*$//'`
7269# )vi
7270if test "$cf_uid" != 0 ; then
7271cf_cv_tty_group_name=
7272cf_tty_name=`tty`
7273test "$cf_tty_name" = "not a tty" && cf_tty_name=/dev/tty
7274test -z "$cf_tty_name" && cf_tty_name=/dev/tty
7275if test -c "$cf_tty_name"
7276then
7277	cf_option="-l -L"
7278
7279	# Expect listing to have fields like this:
7280	#-rwxrwxrwx   1 user      group       34293 Jul 18 16:29 pathname
7281	ls $cf_option $cf_tty_name >conftest.out
7282	read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7283	if test -z "$cf_rest" ; then
7284		cf_option="$cf_option -g"
7285		ls $cf_option $cf_tty_name >conftest.out
7286		read cf_mode cf_links cf_usr cf_grp cf_size cf_date1 cf_date2 cf_date3 cf_rest <conftest.out
7287	fi
7288	rm -f conftest.out
7289	cf_cv_tty_group_name=$cf_grp
7290fi
7291fi
7292
7293# If we cannot deduce the tty group, fall back on hardcoded cases
7294
7295if test -z "$cf_cv_tty_group_name"
7296then
7297case $host_os in
7298(osf*)
7299	cf_cv_tty_group_name="terminal"
7300	;;
7301(*)
7302	cf_cv_tty_group_name="unknown"
7303	if ( egrep '^tty:' /etc/group 2>/dev/null 1>/dev/null ) then
7304		cf_cv_tty_group_name="tty"
7305	fi
7306	;;
7307esac
7308fi
7309
7310fi
7311echo "$as_me:7311: result: $cf_cv_tty_group_name" >&5
7312echo "${ECHO_T}$cf_cv_tty_group_name" >&6
7313cf_tty_group="$cf_cv_tty_group_name"
7314else
7315	# if configure option, always do this
7316
7317cat >>confdefs.h <<\EOF
7318#define USE_TTY_GROUP 1
7319EOF
7320
7321fi
7322
7323cat >>confdefs.h <<EOF
7324#define TTY_GROUP_NAME "$cf_tty_group"
7325EOF
7326
7327# This is only a double-check that the group-name we obtained above really
7328# does apply to the device.  We cannot perform this test if we are in batch
7329# mode, or if we are cross-compiling.
7330
7331echo "$as_me:7331: checking if we may use the $cf_tty_group group" >&5
7332echo $ECHO_N "checking if we may use the $cf_tty_group group... $ECHO_C" >&6
7333if test "${cf_cv_tty_group+set}" = set; then
7334  echo $ECHO_N "(cached) $ECHO_C" >&6
7335else
7336
7337cf_tty_name=`tty`
7338if test "$cf_tty_name" != "not a tty"
7339then
7340if test "$cross_compiling" = yes; then
7341  cf_cv_tty_group=unknown
7342else
7343  cat >conftest.$ac_ext <<_ACEOF
7344#line 7344 "configure"
7345#include "confdefs.h"
7346
7347#include <unistd.h>
7348#include <sys/types.h>
7349#include <sys/stat.h>
7350#include <grp.h>
7351int main()
7352{
7353	struct stat sb;
7354	struct group *ttygrp = getgrnam(TTY_GROUP_NAME);
7355	char *name = ttyname(0);
7356
7357	endgrent();
7358	if (ttygrp != 0
7359	 && name != 0
7360	 && stat(name, &sb) == 0
7361	 && sb.st_gid != getgid()
7362	 && sb.st_gid == ttygrp->gr_gid) {
7363		${cf_cv_main_return:-return} (0);
7364	}
7365	${cf_cv_main_return:-return} (1);
7366}
7367
7368_ACEOF
7369rm -f conftest$ac_exeext
7370if { (eval echo "$as_me:7370: \"$ac_link\"") >&5
7371  (eval $ac_link) 2>&5
7372  ac_status=$?
7373  echo "$as_me:7373: \$? = $ac_status" >&5
7374  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
7375  { (eval echo "$as_me:7375: \"$ac_try\"") >&5
7376  (eval $ac_try) 2>&5
7377  ac_status=$?
7378  echo "$as_me:7378: \$? = $ac_status" >&5
7379  (exit $ac_status); }; }; then
7380  cf_cv_tty_group=yes
7381else
7382  echo "$as_me: program exited with status $ac_status" >&5
7383echo "$as_me: failed program was:" >&5
7384cat conftest.$ac_ext >&5
7385cf_cv_tty_group=no
7386fi
7387rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
7388fi
7389elif test "$cross_compiling" = yes; then
7390	cf_cv_tty_group=unknown
7391else
7392	cf_cv_tty_group=yes
7393fi
7394
7395fi
7396echo "$as_me:7396: result: $cf_cv_tty_group" >&5
7397echo "${ECHO_T}$cf_cv_tty_group" >&6
7398
7399if test $cf_cv_tty_group = no ; then
7400	{ echo "$as_me:7400: WARNING: Cannot use $cf_tty_group group" >&5
7401echo "$as_me: WARNING: Cannot use $cf_tty_group group" >&2;}
7402else
7403	cat >>confdefs.h <<\EOF
7404#define USE_TTY_GROUP 1
7405EOF
7406
7407fi
7408
7409###	checks for system services and user specified options
7410
7411echo "$as_me:7411: checking for sys/wait.h that is POSIX.1 compatible" >&5
7412echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
7413if test "${ac_cv_header_sys_wait_h+set}" = set; then
7414  echo $ECHO_N "(cached) $ECHO_C" >&6
7415else
7416  cat >conftest.$ac_ext <<_ACEOF
7417#line 7417 "configure"
7418#include "confdefs.h"
7419#include <sys/types.h>
7420#include <sys/wait.h>
7421#ifndef WEXITSTATUS
7422# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
7423#endif
7424#ifndef WIFEXITED
7425# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
7426#endif
7427
7428int
7429main (void)
7430{
7431  int s;
7432  wait (&s);
7433  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
7434  ;
7435  return 0;
7436}
7437_ACEOF
7438rm -f conftest.$ac_objext
7439if { (eval echo "$as_me:7439: \"$ac_compile\"") >&5
7440  (eval $ac_compile) 2>&5
7441  ac_status=$?
7442  echo "$as_me:7442: \$? = $ac_status" >&5
7443  (exit $ac_status); } &&
7444         { ac_try='test -s conftest.$ac_objext'
7445  { (eval echo "$as_me:7445: \"$ac_try\"") >&5
7446  (eval $ac_try) 2>&5
7447  ac_status=$?
7448  echo "$as_me:7448: \$? = $ac_status" >&5
7449  (exit $ac_status); }; }; then
7450  ac_cv_header_sys_wait_h=yes
7451else
7452  echo "$as_me: failed program was:" >&5
7453cat conftest.$ac_ext >&5
7454ac_cv_header_sys_wait_h=no
7455fi
7456rm -f conftest.$ac_objext conftest.$ac_ext
7457fi
7458echo "$as_me:7458: result: $ac_cv_header_sys_wait_h" >&5
7459echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
7460if test $ac_cv_header_sys_wait_h = yes; then
7461
7462cat >>confdefs.h <<\EOF
7463#define HAVE_SYS_WAIT_H 1
7464EOF
7465
7466fi
7467
7468echo "$as_me:7468: checking for POSIX wait functions" >&5
7469echo $ECHO_N "checking for POSIX wait functions... $ECHO_C" >&6
7470if test "${cf_cv_posix_wait+set}" = set; then
7471  echo $ECHO_N "(cached) $ECHO_C" >&6
7472else
7473
7474cat >conftest.$ac_ext <<_ACEOF
7475#line 7475 "configure"
7476#include "confdefs.h"
7477
7478#include <stdlib.h>
7479#include <stdio.h>
7480#include <sys/types.h>
7481#ifdef HAVE_SYS_WAIT_H
7482#include <sys/wait.h>
7483#endif
7484
7485int
7486main (void)
7487{
7488
7489	int stat_loc;
7490	pid_t pid = waitpid(-1, &stat_loc, WNOHANG|WUNTRACED);
7491	pid_t pid2 = wait(&stat_loc);
7492
7493  ;
7494  return 0;
7495}
7496_ACEOF
7497rm -f conftest.$ac_objext conftest$ac_exeext
7498if { (eval echo "$as_me:7498: \"$ac_link\"") >&5
7499  (eval $ac_link) 2>&5
7500  ac_status=$?
7501  echo "$as_me:7501: \$? = $ac_status" >&5
7502  (exit $ac_status); } &&
7503         { ac_try='test -s conftest$ac_exeext'
7504  { (eval echo "$as_me:7504: \"$ac_try\"") >&5
7505  (eval $ac_try) 2>&5
7506  ac_status=$?
7507  echo "$as_me:7507: \$? = $ac_status" >&5
7508  (exit $ac_status); }; }; then
7509  cf_cv_posix_wait=yes
7510else
7511  echo "$as_me: failed program was:" >&5
7512cat conftest.$ac_ext >&5
7513cf_cv_posix_wait=no
7514fi
7515rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7516
7517fi
7518echo "$as_me:7518: result: $cf_cv_posix_wait" >&5
7519echo "${ECHO_T}$cf_cv_posix_wait" >&6
7520test "$cf_cv_posix_wait" = yes &&
7521cat >>confdefs.h <<\EOF
7522#define USE_POSIX_WAIT 1
7523EOF
7524
7525echo "$as_me:7525: checking if external sys_nerr is declared" >&5
7526echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
7527if test "${cf_cv_dcl_sys_nerr+set}" = set; then
7528  echo $ECHO_N "(cached) $ECHO_C" >&6
7529else
7530
7531	cat >conftest.$ac_ext <<_ACEOF
7532#line 7532 "configure"
7533#include "confdefs.h"
7534
7535#ifdef HAVE_STDLIB_H
7536#include <stdlib.h>
7537#endif
7538#include <stdio.h>
7539#include <sys/types.h>
7540#include <errno.h>
7541int
7542main (void)
7543{
7544int x = (int) sys_nerr
7545  ;
7546  return 0;
7547}
7548_ACEOF
7549rm -f conftest.$ac_objext
7550if { (eval echo "$as_me:7550: \"$ac_compile\"") >&5
7551  (eval $ac_compile) 2>&5
7552  ac_status=$?
7553  echo "$as_me:7553: \$? = $ac_status" >&5
7554  (exit $ac_status); } &&
7555         { ac_try='test -s conftest.$ac_objext'
7556  { (eval echo "$as_me:7556: \"$ac_try\"") >&5
7557  (eval $ac_try) 2>&5
7558  ac_status=$?
7559  echo "$as_me:7559: \$? = $ac_status" >&5
7560  (exit $ac_status); }; }; then
7561  cf_cv_dcl_sys_nerr=yes
7562else
7563  echo "$as_me: failed program was:" >&5
7564cat conftest.$ac_ext >&5
7565cf_cv_dcl_sys_nerr=no
7566fi
7567rm -f conftest.$ac_objext conftest.$ac_ext
7568
7569fi
7570echo "$as_me:7570: result: $cf_cv_dcl_sys_nerr" >&5
7571echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
7572
7573if test "$cf_cv_dcl_sys_nerr" = no ; then
7574
7575cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7576
7577	cat >>confdefs.h <<EOF
7578#define $cf_result 1
7579EOF
7580
7581fi
7582
7583# It's possible (for near-UNIX clones) that the data doesn't exist
7584
7585echo "$as_me:7585: checking if external sys_nerr exists" >&5
7586echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
7587if test "${cf_cv_have_sys_nerr+set}" = set; then
7588  echo $ECHO_N "(cached) $ECHO_C" >&6
7589else
7590
7591	cat >conftest.$ac_ext <<_ACEOF
7592#line 7592 "configure"
7593#include "confdefs.h"
7594
7595#undef sys_nerr
7596extern int sys_nerr;
7597
7598int
7599main (void)
7600{
7601sys_nerr = 2
7602  ;
7603  return 0;
7604}
7605_ACEOF
7606rm -f conftest.$ac_objext conftest$ac_exeext
7607if { (eval echo "$as_me:7607: \"$ac_link\"") >&5
7608  (eval $ac_link) 2>&5
7609  ac_status=$?
7610  echo "$as_me:7610: \$? = $ac_status" >&5
7611  (exit $ac_status); } &&
7612         { ac_try='test -s conftest$ac_exeext'
7613  { (eval echo "$as_me:7613: \"$ac_try\"") >&5
7614  (eval $ac_try) 2>&5
7615  ac_status=$?
7616  echo "$as_me:7616: \$? = $ac_status" >&5
7617  (exit $ac_status); }; }; then
7618  cf_cv_have_sys_nerr=yes
7619else
7620  echo "$as_me: failed program was:" >&5
7621cat conftest.$ac_ext >&5
7622cf_cv_have_sys_nerr=no
7623fi
7624rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7625
7626fi
7627echo "$as_me:7627: result: $cf_cv_have_sys_nerr" >&5
7628echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
7629
7630if test "$cf_cv_have_sys_nerr" = yes ; then
7631
7632cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7633
7634	cat >>confdefs.h <<EOF
7635#define $cf_result 1
7636EOF
7637
7638fi
7639
7640echo "$as_me:7640: checking if external sys_errlist is declared" >&5
7641echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
7642if test "${cf_cv_dcl_sys_errlist+set}" = set; then
7643  echo $ECHO_N "(cached) $ECHO_C" >&6
7644else
7645
7646	cat >conftest.$ac_ext <<_ACEOF
7647#line 7647 "configure"
7648#include "confdefs.h"
7649
7650#ifdef HAVE_STDLIB_H
7651#include <stdlib.h>
7652#endif
7653#include <stdio.h>
7654#include <sys/types.h>
7655#include <errno.h>
7656int
7657main (void)
7658{
7659int x = (int) sys_errlist
7660  ;
7661  return 0;
7662}
7663_ACEOF
7664rm -f conftest.$ac_objext
7665if { (eval echo "$as_me:7665: \"$ac_compile\"") >&5
7666  (eval $ac_compile) 2>&5
7667  ac_status=$?
7668  echo "$as_me:7668: \$? = $ac_status" >&5
7669  (exit $ac_status); } &&
7670         { ac_try='test -s conftest.$ac_objext'
7671  { (eval echo "$as_me:7671: \"$ac_try\"") >&5
7672  (eval $ac_try) 2>&5
7673  ac_status=$?
7674  echo "$as_me:7674: \$? = $ac_status" >&5
7675  (exit $ac_status); }; }; then
7676  cf_cv_dcl_sys_errlist=yes
7677else
7678  echo "$as_me: failed program was:" >&5
7679cat conftest.$ac_ext >&5
7680cf_cv_dcl_sys_errlist=no
7681fi
7682rm -f conftest.$ac_objext conftest.$ac_ext
7683
7684fi
7685echo "$as_me:7685: result: $cf_cv_dcl_sys_errlist" >&5
7686echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
7687
7688if test "$cf_cv_dcl_sys_errlist" = no ; then
7689
7690cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7691
7692	cat >>confdefs.h <<EOF
7693#define $cf_result 1
7694EOF
7695
7696fi
7697
7698# It's possible (for near-UNIX clones) that the data doesn't exist
7699
7700echo "$as_me:7700: checking if external sys_errlist exists" >&5
7701echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
7702if test "${cf_cv_have_sys_errlist+set}" = set; then
7703  echo $ECHO_N "(cached) $ECHO_C" >&6
7704else
7705
7706	cat >conftest.$ac_ext <<_ACEOF
7707#line 7707 "configure"
7708#include "confdefs.h"
7709
7710#undef sys_errlist
7711extern int sys_errlist;
7712
7713int
7714main (void)
7715{
7716sys_errlist = 2
7717  ;
7718  return 0;
7719}
7720_ACEOF
7721rm -f conftest.$ac_objext conftest$ac_exeext
7722if { (eval echo "$as_me:7722: \"$ac_link\"") >&5
7723  (eval $ac_link) 2>&5
7724  ac_status=$?
7725  echo "$as_me:7725: \$? = $ac_status" >&5
7726  (exit $ac_status); } &&
7727         { ac_try='test -s conftest$ac_exeext'
7728  { (eval echo "$as_me:7728: \"$ac_try\"") >&5
7729  (eval $ac_try) 2>&5
7730  ac_status=$?
7731  echo "$as_me:7731: \$? = $ac_status" >&5
7732  (exit $ac_status); }; }; then
7733  cf_cv_have_sys_errlist=yes
7734else
7735  echo "$as_me: failed program was:" >&5
7736cat conftest.$ac_ext >&5
7737cf_cv_have_sys_errlist=no
7738fi
7739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7740
7741fi
7742echo "$as_me:7742: result: $cf_cv_have_sys_errlist" >&5
7743echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
7744
7745if test "$cf_cv_have_sys_errlist" = yes ; then
7746
7747cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
7748
7749	cat >>confdefs.h <<EOF
7750#define $cf_result 1
7751EOF
7752
7753fi
7754
7755for ac_header in \
7756termios.h \
7757stdlib.h \
7758X11/Intrinsic.h \
7759
7760do
7761as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
7762echo "$as_me:7762: checking for $ac_header" >&5
7763echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
7764if eval "test \"\${$as_ac_Header+set}\" = set"; then
7765  echo $ECHO_N "(cached) $ECHO_C" >&6
7766else
7767  cat >conftest.$ac_ext <<_ACEOF
7768#line 7768 "configure"
7769#include "confdefs.h"
7770#include <$ac_header>
7771_ACEOF
7772if { (eval echo "$as_me:7772: \"$ac_cpp conftest.$ac_ext\"") >&5
7773  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7774  ac_status=$?
7775  egrep -v '^ *\+' conftest.er1 >conftest.err
7776  rm -f conftest.er1
7777  cat conftest.err >&5
7778  echo "$as_me:7778: \$? = $ac_status" >&5
7779  (exit $ac_status); } >/dev/null; then
7780  if test -s conftest.err; then
7781    ac_cpp_err=$ac_c_preproc_warn_flag
7782  else
7783    ac_cpp_err=
7784  fi
7785else
7786  ac_cpp_err=yes
7787fi
7788if test -z "$ac_cpp_err"; then
7789  eval "$as_ac_Header=yes"
7790else
7791  echo "$as_me: failed program was:" >&5
7792  cat conftest.$ac_ext >&5
7793  eval "$as_ac_Header=no"
7794fi
7795rm -f conftest.err conftest.$ac_ext
7796fi
7797echo "$as_me:7797: result: `eval echo '${'$as_ac_Header'}'`" >&5
7798echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
7799if test `eval echo '${'$as_ac_Header'}'` = yes; then
7800  cat >>confdefs.h <<EOF
7801#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
7802EOF
7803
7804fi
7805done
7806
7807echo "$as_me:7807: checking if we should define SYSV" >&5
7808echo $ECHO_N "checking if we should define SYSV... $ECHO_C" >&6
7809if test "${cf_cv_sysv+set}" = set; then
7810  echo $ECHO_N "(cached) $ECHO_C" >&6
7811else
7812
7813cat >conftest.$ac_ext <<_ACEOF
7814#line 7814 "configure"
7815#include "confdefs.h"
7816
7817#undef  SYSV
7818#define SYSV 1			/* get Xos.h to declare sys_errlist[] */
7819#ifdef HAVE_STDLIB_H
7820#include <stdlib.h>		/* look for wchar_t */
7821#endif
7822#ifdef HAVE_X11_INTRINSIC_H
7823#include <X11/Intrinsic.h>	/* Intrinsic.h has other traps... */
7824#endif
7825#ifdef HAVE_TERMIOS_H		/* needed for HPUX 10.20 */
7826#include <termios.h>
7827#define STRUCT_TERMIOS struct termios
7828#else
7829#define STRUCT_TERMIOS struct termio
7830#endif
7831#include <curses.h>
7832#include <term.h>		/* eliminate most BSD hacks */
7833#include <errno.h>		/* declare sys_errlist on older systems */
7834#include <sys/termio.h>		/* eliminate most of the remaining ones */
7835
7836int
7837main (void)
7838{
7839
7840static STRUCT_TERMIOS d_tio;
7841	d_tio.c_cc[VINTR] = 0;
7842	d_tio.c_cc[VQUIT] = 0;
7843	d_tio.c_cc[VERASE] = 0;
7844	d_tio.c_cc[VKILL] = 0;
7845	d_tio.c_cc[VEOF] = 0;
7846	d_tio.c_cc[VEOL] = 0;
7847	d_tio.c_cc[VMIN] = 0;
7848	d_tio.c_cc[VTIME] = 0;
7849#if defined(HAVE_SYS_ERRLIST) && !defined(DECL_SYS_ERRLIST)
7850sys_errlist[0] = "";		/* Cygwin mis-declares this */
7851#endif
7852
7853  ;
7854  return 0;
7855}
7856_ACEOF
7857rm -f conftest.$ac_objext
7858if { (eval echo "$as_me:7858: \"$ac_compile\"") >&5
7859  (eval $ac_compile) 2>&5
7860  ac_status=$?
7861  echo "$as_me:7861: \$? = $ac_status" >&5
7862  (exit $ac_status); } &&
7863         { ac_try='test -s conftest.$ac_objext'
7864  { (eval echo "$as_me:7864: \"$ac_try\"") >&5
7865  (eval $ac_try) 2>&5
7866  ac_status=$?
7867  echo "$as_me:7867: \$? = $ac_status" >&5
7868  (exit $ac_status); }; }; then
7869  cf_cv_sysv=yes
7870else
7871  echo "$as_me: failed program was:" >&5
7872cat conftest.$ac_ext >&5
7873cf_cv_sysv=no
7874fi
7875rm -f conftest.$ac_objext conftest.$ac_ext
7876
7877fi
7878echo "$as_me:7878: result: $cf_cv_sysv" >&5
7879echo "${ECHO_T}$cf_cv_sysv" >&6
7880test "$cf_cv_sysv" = yes &&
7881cat >>confdefs.h <<\EOF
7882#define SYSV 1
7883EOF
7884
7885echo "$as_me:7885: checking for elf_begin in -lelf" >&5
7886echo $ECHO_N "checking for elf_begin in -lelf... $ECHO_C" >&6
7887if test "${ac_cv_lib_elf_elf_begin+set}" = set; then
7888  echo $ECHO_N "(cached) $ECHO_C" >&6
7889else
7890  ac_check_lib_save_LIBS=$LIBS
7891LIBS="-lelf  $LIBS"
7892cat >conftest.$ac_ext <<_ACEOF
7893#line 7893 "configure"
7894#include "confdefs.h"
7895
7896/* Override any gcc2 internal prototype to avoid an error.  */
7897#ifdef __cplusplus
7898extern "C"
7899#endif
7900/* We use char because int might match the return type of a gcc2
7901   builtin and then its argument prototype would still apply.  */
7902char elf_begin ();
7903int
7904main (void)
7905{
7906elf_begin ();
7907  ;
7908  return 0;
7909}
7910_ACEOF
7911rm -f conftest.$ac_objext conftest$ac_exeext
7912if { (eval echo "$as_me:7912: \"$ac_link\"") >&5
7913  (eval $ac_link) 2>&5
7914  ac_status=$?
7915  echo "$as_me:7915: \$? = $ac_status" >&5
7916  (exit $ac_status); } &&
7917         { ac_try='test -s conftest$ac_exeext'
7918  { (eval echo "$as_me:7918: \"$ac_try\"") >&5
7919  (eval $ac_try) 2>&5
7920  ac_status=$?
7921  echo "$as_me:7921: \$? = $ac_status" >&5
7922  (exit $ac_status); }; }; then
7923  ac_cv_lib_elf_elf_begin=yes
7924else
7925  echo "$as_me: failed program was:" >&5
7926cat conftest.$ac_ext >&5
7927ac_cv_lib_elf_elf_begin=no
7928fi
7929rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7930LIBS=$ac_check_lib_save_LIBS
7931fi
7932echo "$as_me:7932: result: $ac_cv_lib_elf_elf_begin" >&5
7933echo "${ECHO_T}$ac_cv_lib_elf_elf_begin" >&6
7934if test $ac_cv_lib_elf_elf_begin = yes; then
7935
7936echo "$as_me:7936: checking if this is an SVR4 system" >&5
7937echo $ECHO_N "checking if this is an SVR4 system... $ECHO_C" >&6
7938if test "${cf_cv_svr4+set}" = set; then
7939  echo $ECHO_N "(cached) $ECHO_C" >&6
7940else
7941
7942cat >conftest.$ac_ext <<_ACEOF
7943#line 7943 "configure"
7944#include "confdefs.h"
7945
7946#if defined(__CYGWIN__)
7947make an error
7948#endif
7949#include <elf.h>
7950#include <sys/termio.h>
7951
7952int
7953main (void)
7954{
7955
7956static struct termio d_tio;
7957	d_tio.c_cc[VINTR] = 0;
7958	d_tio.c_cc[VQUIT] = 0;
7959	d_tio.c_cc[VERASE] = 0;
7960	d_tio.c_cc[VKILL] = 0;
7961	d_tio.c_cc[VEOF] = 0;
7962	d_tio.c_cc[VEOL] = 0;
7963	d_tio.c_cc[VMIN] = 0;
7964	d_tio.c_cc[VTIME] = 0;
7965	d_tio.c_cc[VLNEXT] = 0;
7966
7967  ;
7968  return 0;
7969}
7970_ACEOF
7971rm -f conftest.$ac_objext
7972if { (eval echo "$as_me:7972: \"$ac_compile\"") >&5
7973  (eval $ac_compile) 2>&5
7974  ac_status=$?
7975  echo "$as_me:7975: \$? = $ac_status" >&5
7976  (exit $ac_status); } &&
7977         { ac_try='test -s conftest.$ac_objext'
7978  { (eval echo "$as_me:7978: \"$ac_try\"") >&5
7979  (eval $ac_try) 2>&5
7980  ac_status=$?
7981  echo "$as_me:7981: \$? = $ac_status" >&5
7982  (exit $ac_status); }; }; then
7983  cf_cv_svr4=yes
7984else
7985  echo "$as_me: failed program was:" >&5
7986cat conftest.$ac_ext >&5
7987cf_cv_svr4=no
7988fi
7989rm -f conftest.$ac_objext conftest.$ac_ext
7990
7991fi
7992echo "$as_me:7992: result: $cf_cv_svr4" >&5
7993echo "${ECHO_T}$cf_cv_svr4" >&6
7994
7995fi
7996
7997test "$cf_cv_svr4" = yes &&
7998cat >>confdefs.h <<\EOF
7999#define SVR4 1
8000EOF
8001
8002echo "$as_me:8002: checking for X" >&5
8003echo $ECHO_N "checking for X... $ECHO_C" >&6
8004
8005# Check whether --with-x or --without-x was given.
8006if test "${with_x+set}" = set; then
8007  withval="$with_x"
8008
8009fi;
8010# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
8011if test "x$with_x" = xno; then
8012  # The user explicitly disabled X.
8013  have_x=disabled
8014else
8015  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
8016    # Both variables are already set.
8017    have_x=yes
8018  else
8019    if test "${ac_cv_have_x+set}" = set; then
8020  echo $ECHO_N "(cached) $ECHO_C" >&6
8021else
8022  # One or both of the vars are not set, and there is no cached value.
8023ac_x_includes=no ac_x_libraries=no
8024rm -fr conftest.dir
8025if mkdir conftest.dir; then
8026  cd conftest.dir
8027  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
8028  cat >Imakefile <<'EOF'
8029acfindx:
8030	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
8031EOF
8032  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
8033    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
8034    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
8035    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
8036    for ac_extension in a so sl dylib dll; do
8037      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
8038         test -f $ac_im_libdir/libX11.$ac_extension; then
8039        ac_im_usrlibdir=$ac_im_libdir; break
8040      fi
8041    done
8042    # Screen out bogus values from the imake configuration.  They are
8043    # bogus both because they are the default anyway, and because
8044    # using them would break gcc on systems where it needs fixed includes.
8045    case $ac_im_incroot in
8046	/usr/include) ;;
8047	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
8048    esac
8049    case $ac_im_usrlibdir in
8050	/usr/lib | /lib) ;;
8051	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
8052    esac
8053  fi
8054  cd ..
8055  rm -fr conftest.dir
8056fi
8057
8058# Standard set of common directories for X headers.
8059# Check X11 before X11Rn because it is often a symlink to the current release.
8060ac_x_header_dirs='
8061/usr/X11/include
8062/usr/X11R6/include
8063/usr/X11R5/include
8064/usr/X11R4/include
8065
8066/usr/include/X11
8067/usr/include/X11R6
8068/usr/include/X11R5
8069/usr/include/X11R4
8070
8071/usr/local/X11/include
8072/usr/local/X11R6/include
8073/usr/local/X11R5/include
8074/usr/local/X11R4/include
8075
8076/usr/local/include/X11
8077/usr/local/include/X11R6
8078/usr/local/include/X11R5
8079/usr/local/include/X11R4
8080
8081/usr/X386/include
8082/usr/x386/include
8083/usr/XFree86/include/X11
8084
8085/usr/include
8086/usr/local/include
8087/usr/unsupported/include
8088/usr/athena/include
8089/usr/local/x11r5/include
8090/usr/lpp/Xamples/include
8091
8092/usr/openwin/include
8093/usr/openwin/share/include'
8094
8095if test "$ac_x_includes" = no; then
8096  # Guess where to find include files, by looking for Intrinsic.h.
8097  # First, try using that file with no special directory specified.
8098  cat >conftest.$ac_ext <<_ACEOF
8099#line 8099 "configure"
8100#include "confdefs.h"
8101#include <X11/Intrinsic.h>
8102_ACEOF
8103if { (eval echo "$as_me:8103: \"$ac_cpp conftest.$ac_ext\"") >&5
8104  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
8105  ac_status=$?
8106  egrep -v '^ *\+' conftest.er1 >conftest.err
8107  rm -f conftest.er1
8108  cat conftest.err >&5
8109  echo "$as_me:8109: \$? = $ac_status" >&5
8110  (exit $ac_status); } >/dev/null; then
8111  if test -s conftest.err; then
8112    ac_cpp_err=$ac_c_preproc_warn_flag
8113  else
8114    ac_cpp_err=
8115  fi
8116else
8117  ac_cpp_err=yes
8118fi
8119if test -z "$ac_cpp_err"; then
8120  # We can compile using X headers with no special include directory.
8121ac_x_includes=
8122else
8123  echo "$as_me: failed program was:" >&5
8124  cat conftest.$ac_ext >&5
8125  for ac_dir in $ac_x_header_dirs; do
8126  if test -r "$ac_dir/X11/Intrinsic.h"; then
8127    ac_x_includes=$ac_dir
8128    break
8129  fi
8130done
8131fi
8132rm -f conftest.err conftest.$ac_ext
8133fi # $ac_x_includes = no
8134
8135if test "$ac_x_libraries" = no; then
8136  # Check for the libraries.
8137  # See if we find them without any special options.
8138  # Don't add to $LIBS permanently.
8139  ac_save_LIBS=$LIBS
8140  LIBS="-lXt $LIBS"
8141  cat >conftest.$ac_ext <<_ACEOF
8142#line 8142 "configure"
8143#include "confdefs.h"
8144#include <X11/Intrinsic.h>
8145int
8146main (void)
8147{
8148XtMalloc (0)
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  LIBS=$ac_save_LIBS
8166# We can link X programs with no special library path.
8167ac_x_libraries=
8168else
8169  echo "$as_me: failed program was:" >&5
8170cat conftest.$ac_ext >&5
8171LIBS=$ac_save_LIBS
8172for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
8173do
8174  # Don't even attempt the hair of trying to link an X program!
8175  for ac_extension in a so sl dylib dll; do
8176    if test -r $ac_dir/libXt.$ac_extension; then
8177      ac_x_libraries=$ac_dir
8178      break 2
8179    fi
8180  done
8181done
8182fi
8183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8184fi # $ac_x_libraries = no
8185
8186if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
8187  # Didn't find X anywhere.  Cache the known absence of X.
8188  ac_cv_have_x="have_x=no"
8189else
8190  # Record where we found X for the cache.
8191  ac_cv_have_x="have_x=yes \
8192	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
8193fi
8194fi
8195
8196  fi
8197  eval "$ac_cv_have_x"
8198fi # $with_x != no
8199
8200if test "$have_x" != yes; then
8201  echo "$as_me:8201: result: $have_x" >&5
8202echo "${ECHO_T}$have_x" >&6
8203  no_x=yes
8204else
8205  # If each of the values was on the command line, it overrides each guess.
8206  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
8207  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
8208  # Update the cache value to reflect the command line values.
8209  ac_cv_have_x="have_x=yes \
8210		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
8211  echo "$as_me:8211: result: libraries $x_libraries, headers $x_includes" >&5
8212echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
8213fi
8214
8215if test "$no_x" = yes; then
8216  # Not all programs may use this symbol, but it does not hurt to define it.
8217
8218cat >>confdefs.h <<\EOF
8219#define X_DISPLAY_MISSING 1
8220EOF
8221
8222  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
8223else
8224  if test -n "$x_includes"; then
8225    X_CFLAGS="$X_CFLAGS -I$x_includes"
8226  fi
8227
8228  # It would also be nice to do this for all -L options, not just this one.
8229  if test -n "$x_libraries"; then
8230    X_LIBS="$X_LIBS -L$x_libraries"
8231    # For Solaris; some versions of Sun CC require a space after -R and
8232    # others require no space.  Words are not sufficient . . . .
8233    case `(uname -sr) 2>/dev/null` in
8234    "SunOS 5"*)
8235      echo "$as_me:8235: checking whether -R must be followed by a space" >&5
8236echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
8237      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
8238      cat >conftest.$ac_ext <<_ACEOF
8239#line 8239 "configure"
8240#include "confdefs.h"
8241
8242int
8243main (void)
8244{
8245
8246  ;
8247  return 0;
8248}
8249_ACEOF
8250rm -f conftest.$ac_objext conftest$ac_exeext
8251if { (eval echo "$as_me:8251: \"$ac_link\"") >&5
8252  (eval $ac_link) 2>&5
8253  ac_status=$?
8254  echo "$as_me:8254: \$? = $ac_status" >&5
8255  (exit $ac_status); } &&
8256         { ac_try='test -s conftest$ac_exeext'
8257  { (eval echo "$as_me:8257: \"$ac_try\"") >&5
8258  (eval $ac_try) 2>&5
8259  ac_status=$?
8260  echo "$as_me:8260: \$? = $ac_status" >&5
8261  (exit $ac_status); }; }; then
8262  ac_R_nospace=yes
8263else
8264  echo "$as_me: failed program was:" >&5
8265cat conftest.$ac_ext >&5
8266ac_R_nospace=no
8267fi
8268rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8269      if test $ac_R_nospace = yes; then
8270	echo "$as_me:8270: result: no" >&5
8271echo "${ECHO_T}no" >&6
8272	X_LIBS="$X_LIBS -R$x_libraries"
8273      else
8274	LIBS="$ac_xsave_LIBS -R $x_libraries"
8275	cat >conftest.$ac_ext <<_ACEOF
8276#line 8276 "configure"
8277#include "confdefs.h"
8278
8279int
8280main (void)
8281{
8282
8283  ;
8284  return 0;
8285}
8286_ACEOF
8287rm -f conftest.$ac_objext conftest$ac_exeext
8288if { (eval echo "$as_me:8288: \"$ac_link\"") >&5
8289  (eval $ac_link) 2>&5
8290  ac_status=$?
8291  echo "$as_me:8291: \$? = $ac_status" >&5
8292  (exit $ac_status); } &&
8293         { ac_try='test -s conftest$ac_exeext'
8294  { (eval echo "$as_me:8294: \"$ac_try\"") >&5
8295  (eval $ac_try) 2>&5
8296  ac_status=$?
8297  echo "$as_me:8297: \$? = $ac_status" >&5
8298  (exit $ac_status); }; }; then
8299  ac_R_space=yes
8300else
8301  echo "$as_me: failed program was:" >&5
8302cat conftest.$ac_ext >&5
8303ac_R_space=no
8304fi
8305rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8306	if test $ac_R_space = yes; then
8307	  echo "$as_me:8307: result: yes" >&5
8308echo "${ECHO_T}yes" >&6
8309	  X_LIBS="$X_LIBS -R $x_libraries"
8310	else
8311	  echo "$as_me:8311: result: neither works" >&5
8312echo "${ECHO_T}neither works" >&6
8313	fi
8314      fi
8315      LIBS=$ac_xsave_LIBS
8316    esac
8317  fi
8318
8319  # Check for system-dependent libraries X programs must link with.
8320  # Do this before checking for the system-independent R6 libraries
8321  # (-lICE), since we may need -lsocket or whatever for X linking.
8322
8323  if test "$ISC" = yes; then
8324    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
8325  else
8326    # Martyn Johnson says this is needed for Ultrix, if the X
8327    # libraries were built with DECnet support.  And Karl Berry says
8328    # the Alpha needs dnet_stub (dnet does not exist).
8329    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
8330    cat >conftest.$ac_ext <<_ACEOF
8331#line 8331 "configure"
8332#include "confdefs.h"
8333
8334/* Override any gcc2 internal prototype to avoid an error.  */
8335#ifdef __cplusplus
8336extern "C"
8337#endif
8338/* We use char because int might match the return type of a gcc2
8339   builtin and then its argument prototype would still apply.  */
8340char XOpenDisplay ();
8341int
8342main (void)
8343{
8344XOpenDisplay ();
8345  ;
8346  return 0;
8347}
8348_ACEOF
8349rm -f conftest.$ac_objext conftest$ac_exeext
8350if { (eval echo "$as_me:8350: \"$ac_link\"") >&5
8351  (eval $ac_link) 2>&5
8352  ac_status=$?
8353  echo "$as_me:8353: \$? = $ac_status" >&5
8354  (exit $ac_status); } &&
8355         { ac_try='test -s conftest$ac_exeext'
8356  { (eval echo "$as_me:8356: \"$ac_try\"") >&5
8357  (eval $ac_try) 2>&5
8358  ac_status=$?
8359  echo "$as_me:8359: \$? = $ac_status" >&5
8360  (exit $ac_status); }; }; then
8361  :
8362else
8363  echo "$as_me: failed program was:" >&5
8364cat conftest.$ac_ext >&5
8365echo "$as_me:8365: checking for dnet_ntoa in -ldnet" >&5
8366echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
8367if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
8368  echo $ECHO_N "(cached) $ECHO_C" >&6
8369else
8370  ac_check_lib_save_LIBS=$LIBS
8371LIBS="-ldnet  $LIBS"
8372cat >conftest.$ac_ext <<_ACEOF
8373#line 8373 "configure"
8374#include "confdefs.h"
8375
8376/* Override any gcc2 internal prototype to avoid an error.  */
8377#ifdef __cplusplus
8378extern "C"
8379#endif
8380/* We use char because int might match the return type of a gcc2
8381   builtin and then its argument prototype would still apply.  */
8382char dnet_ntoa ();
8383int
8384main (void)
8385{
8386dnet_ntoa ();
8387  ;
8388  return 0;
8389}
8390_ACEOF
8391rm -f conftest.$ac_objext conftest$ac_exeext
8392if { (eval echo "$as_me:8392: \"$ac_link\"") >&5
8393  (eval $ac_link) 2>&5
8394  ac_status=$?
8395  echo "$as_me:8395: \$? = $ac_status" >&5
8396  (exit $ac_status); } &&
8397         { ac_try='test -s conftest$ac_exeext'
8398  { (eval echo "$as_me:8398: \"$ac_try\"") >&5
8399  (eval $ac_try) 2>&5
8400  ac_status=$?
8401  echo "$as_me:8401: \$? = $ac_status" >&5
8402  (exit $ac_status); }; }; then
8403  ac_cv_lib_dnet_dnet_ntoa=yes
8404else
8405  echo "$as_me: failed program was:" >&5
8406cat conftest.$ac_ext >&5
8407ac_cv_lib_dnet_dnet_ntoa=no
8408fi
8409rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8410LIBS=$ac_check_lib_save_LIBS
8411fi
8412echo "$as_me:8412: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
8413echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
8414if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
8415  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
8416fi
8417
8418    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
8419      echo "$as_me:8419: checking for dnet_ntoa in -ldnet_stub" >&5
8420echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
8421if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
8422  echo $ECHO_N "(cached) $ECHO_C" >&6
8423else
8424  ac_check_lib_save_LIBS=$LIBS
8425LIBS="-ldnet_stub  $LIBS"
8426cat >conftest.$ac_ext <<_ACEOF
8427#line 8427 "configure"
8428#include "confdefs.h"
8429
8430/* Override any gcc2 internal prototype to avoid an error.  */
8431#ifdef __cplusplus
8432extern "C"
8433#endif
8434/* We use char because int might match the return type of a gcc2
8435   builtin and then its argument prototype would still apply.  */
8436char dnet_ntoa ();
8437int
8438main (void)
8439{
8440dnet_ntoa ();
8441  ;
8442  return 0;
8443}
8444_ACEOF
8445rm -f conftest.$ac_objext conftest$ac_exeext
8446if { (eval echo "$as_me:8446: \"$ac_link\"") >&5
8447  (eval $ac_link) 2>&5
8448  ac_status=$?
8449  echo "$as_me:8449: \$? = $ac_status" >&5
8450  (exit $ac_status); } &&
8451         { ac_try='test -s conftest$ac_exeext'
8452  { (eval echo "$as_me:8452: \"$ac_try\"") >&5
8453  (eval $ac_try) 2>&5
8454  ac_status=$?
8455  echo "$as_me:8455: \$? = $ac_status" >&5
8456  (exit $ac_status); }; }; then
8457  ac_cv_lib_dnet_stub_dnet_ntoa=yes
8458else
8459  echo "$as_me: failed program was:" >&5
8460cat conftest.$ac_ext >&5
8461ac_cv_lib_dnet_stub_dnet_ntoa=no
8462fi
8463rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8464LIBS=$ac_check_lib_save_LIBS
8465fi
8466echo "$as_me:8466: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
8467echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
8468if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
8469  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
8470fi
8471
8472    fi
8473fi
8474rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8475    LIBS="$ac_xsave_LIBS"
8476
8477    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
8478    # to get the SysV transport functions.
8479    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
8480    # needs -lnsl.
8481    # The nsl library prevents programs from opening the X display
8482    # on Irix 5.2, according to T.E. Dickey.
8483    # The functions gethostbyname, getservbyname, and inet_addr are
8484    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
8485    echo "$as_me:8485: checking for gethostbyname" >&5
8486echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
8487if test "${ac_cv_func_gethostbyname+set}" = set; then
8488  echo $ECHO_N "(cached) $ECHO_C" >&6
8489else
8490  cat >conftest.$ac_ext <<_ACEOF
8491#line 8491 "configure"
8492#include "confdefs.h"
8493/* System header to define __stub macros and hopefully few prototypes,
8494    which can conflict with char gethostbyname (); below.  */
8495#include <assert.h>
8496/* Override any gcc2 internal prototype to avoid an error.  */
8497#ifdef __cplusplus
8498extern "C"
8499#endif
8500/* We use char because int might match the return type of a gcc2
8501   builtin and then its argument prototype would still apply.  */
8502char gethostbyname ();
8503char (*f) ();
8504
8505int
8506main (void)
8507{
8508/* The GNU C library defines this for functions which it implements
8509    to always fail with ENOSYS.  Some functions are actually named
8510    something starting with __ and the normal name is an alias.  */
8511#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
8512choke me
8513#else
8514f = gethostbyname; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8515#endif
8516
8517  ;
8518  return 0;
8519}
8520_ACEOF
8521rm -f conftest.$ac_objext conftest$ac_exeext
8522if { (eval echo "$as_me:8522: \"$ac_link\"") >&5
8523  (eval $ac_link) 2>&5
8524  ac_status=$?
8525  echo "$as_me:8525: \$? = $ac_status" >&5
8526  (exit $ac_status); } &&
8527         { ac_try='test -s conftest$ac_exeext'
8528  { (eval echo "$as_me:8528: \"$ac_try\"") >&5
8529  (eval $ac_try) 2>&5
8530  ac_status=$?
8531  echo "$as_me:8531: \$? = $ac_status" >&5
8532  (exit $ac_status); }; }; then
8533  ac_cv_func_gethostbyname=yes
8534else
8535  echo "$as_me: failed program was:" >&5
8536cat conftest.$ac_ext >&5
8537ac_cv_func_gethostbyname=no
8538fi
8539rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8540fi
8541echo "$as_me:8541: result: $ac_cv_func_gethostbyname" >&5
8542echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
8543
8544    if test $ac_cv_func_gethostbyname = no; then
8545      echo "$as_me:8545: checking for gethostbyname in -lnsl" >&5
8546echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
8547if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
8548  echo $ECHO_N "(cached) $ECHO_C" >&6
8549else
8550  ac_check_lib_save_LIBS=$LIBS
8551LIBS="-lnsl  $LIBS"
8552cat >conftest.$ac_ext <<_ACEOF
8553#line 8553 "configure"
8554#include "confdefs.h"
8555
8556/* Override any gcc2 internal prototype to avoid an error.  */
8557#ifdef __cplusplus
8558extern "C"
8559#endif
8560/* We use char because int might match the return type of a gcc2
8561   builtin and then its argument prototype would still apply.  */
8562char gethostbyname ();
8563int
8564main (void)
8565{
8566gethostbyname ();
8567  ;
8568  return 0;
8569}
8570_ACEOF
8571rm -f conftest.$ac_objext conftest$ac_exeext
8572if { (eval echo "$as_me:8572: \"$ac_link\"") >&5
8573  (eval $ac_link) 2>&5
8574  ac_status=$?
8575  echo "$as_me:8575: \$? = $ac_status" >&5
8576  (exit $ac_status); } &&
8577         { ac_try='test -s conftest$ac_exeext'
8578  { (eval echo "$as_me:8578: \"$ac_try\"") >&5
8579  (eval $ac_try) 2>&5
8580  ac_status=$?
8581  echo "$as_me:8581: \$? = $ac_status" >&5
8582  (exit $ac_status); }; }; then
8583  ac_cv_lib_nsl_gethostbyname=yes
8584else
8585  echo "$as_me: failed program was:" >&5
8586cat conftest.$ac_ext >&5
8587ac_cv_lib_nsl_gethostbyname=no
8588fi
8589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8590LIBS=$ac_check_lib_save_LIBS
8591fi
8592echo "$as_me:8592: result: $ac_cv_lib_nsl_gethostbyname" >&5
8593echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
8594if test $ac_cv_lib_nsl_gethostbyname = yes; then
8595  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
8596fi
8597
8598      if test $ac_cv_lib_nsl_gethostbyname = no; then
8599        echo "$as_me:8599: checking for gethostbyname in -lbsd" >&5
8600echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
8601if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
8602  echo $ECHO_N "(cached) $ECHO_C" >&6
8603else
8604  ac_check_lib_save_LIBS=$LIBS
8605LIBS="-lbsd  $LIBS"
8606cat >conftest.$ac_ext <<_ACEOF
8607#line 8607 "configure"
8608#include "confdefs.h"
8609
8610/* Override any gcc2 internal prototype to avoid an error.  */
8611#ifdef __cplusplus
8612extern "C"
8613#endif
8614/* We use char because int might match the return type of a gcc2
8615   builtin and then its argument prototype would still apply.  */
8616char gethostbyname ();
8617int
8618main (void)
8619{
8620gethostbyname ();
8621  ;
8622  return 0;
8623}
8624_ACEOF
8625rm -f conftest.$ac_objext conftest$ac_exeext
8626if { (eval echo "$as_me:8626: \"$ac_link\"") >&5
8627  (eval $ac_link) 2>&5
8628  ac_status=$?
8629  echo "$as_me:8629: \$? = $ac_status" >&5
8630  (exit $ac_status); } &&
8631         { ac_try='test -s conftest$ac_exeext'
8632  { (eval echo "$as_me:8632: \"$ac_try\"") >&5
8633  (eval $ac_try) 2>&5
8634  ac_status=$?
8635  echo "$as_me:8635: \$? = $ac_status" >&5
8636  (exit $ac_status); }; }; then
8637  ac_cv_lib_bsd_gethostbyname=yes
8638else
8639  echo "$as_me: failed program was:" >&5
8640cat conftest.$ac_ext >&5
8641ac_cv_lib_bsd_gethostbyname=no
8642fi
8643rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8644LIBS=$ac_check_lib_save_LIBS
8645fi
8646echo "$as_me:8646: result: $ac_cv_lib_bsd_gethostbyname" >&5
8647echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
8648if test $ac_cv_lib_bsd_gethostbyname = yes; then
8649  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
8650fi
8651
8652      fi
8653    fi
8654
8655    # lieder@skyler.mavd.honeywell.com says without -lsocket,
8656    # socket/setsockopt and other routines are undefined under SCO ODT
8657    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
8658    # on later versions), says Simon Leinen: it contains gethostby*
8659    # variants that don't use the nameserver (or something).  -lsocket
8660    # must be given before -lnsl if both are needed.  We assume that
8661    # if connect needs -lnsl, so does gethostbyname.
8662    echo "$as_me:8662: checking for connect" >&5
8663echo $ECHO_N "checking for connect... $ECHO_C" >&6
8664if test "${ac_cv_func_connect+set}" = set; then
8665  echo $ECHO_N "(cached) $ECHO_C" >&6
8666else
8667  cat >conftest.$ac_ext <<_ACEOF
8668#line 8668 "configure"
8669#include "confdefs.h"
8670/* System header to define __stub macros and hopefully few prototypes,
8671    which can conflict with char connect (); below.  */
8672#include <assert.h>
8673/* Override any gcc2 internal prototype to avoid an error.  */
8674#ifdef __cplusplus
8675extern "C"
8676#endif
8677/* We use char because int might match the return type of a gcc2
8678   builtin and then its argument prototype would still apply.  */
8679char connect ();
8680char (*f) ();
8681
8682int
8683main (void)
8684{
8685/* The GNU C library defines this for functions which it implements
8686    to always fail with ENOSYS.  Some functions are actually named
8687    something starting with __ and the normal name is an alias.  */
8688#if defined (__stub_connect) || defined (__stub___connect)
8689choke me
8690#else
8691f = connect; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8692#endif
8693
8694  ;
8695  return 0;
8696}
8697_ACEOF
8698rm -f conftest.$ac_objext conftest$ac_exeext
8699if { (eval echo "$as_me:8699: \"$ac_link\"") >&5
8700  (eval $ac_link) 2>&5
8701  ac_status=$?
8702  echo "$as_me:8702: \$? = $ac_status" >&5
8703  (exit $ac_status); } &&
8704         { ac_try='test -s conftest$ac_exeext'
8705  { (eval echo "$as_me:8705: \"$ac_try\"") >&5
8706  (eval $ac_try) 2>&5
8707  ac_status=$?
8708  echo "$as_me:8708: \$? = $ac_status" >&5
8709  (exit $ac_status); }; }; then
8710  ac_cv_func_connect=yes
8711else
8712  echo "$as_me: failed program was:" >&5
8713cat conftest.$ac_ext >&5
8714ac_cv_func_connect=no
8715fi
8716rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8717fi
8718echo "$as_me:8718: result: $ac_cv_func_connect" >&5
8719echo "${ECHO_T}$ac_cv_func_connect" >&6
8720
8721    if test $ac_cv_func_connect = no; then
8722      echo "$as_me:8722: checking for connect in -lsocket" >&5
8723echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
8724if test "${ac_cv_lib_socket_connect+set}" = set; then
8725  echo $ECHO_N "(cached) $ECHO_C" >&6
8726else
8727  ac_check_lib_save_LIBS=$LIBS
8728LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
8729cat >conftest.$ac_ext <<_ACEOF
8730#line 8730 "configure"
8731#include "confdefs.h"
8732
8733/* Override any gcc2 internal prototype to avoid an error.  */
8734#ifdef __cplusplus
8735extern "C"
8736#endif
8737/* We use char because int might match the return type of a gcc2
8738   builtin and then its argument prototype would still apply.  */
8739char connect ();
8740int
8741main (void)
8742{
8743connect ();
8744  ;
8745  return 0;
8746}
8747_ACEOF
8748rm -f conftest.$ac_objext conftest$ac_exeext
8749if { (eval echo "$as_me:8749: \"$ac_link\"") >&5
8750  (eval $ac_link) 2>&5
8751  ac_status=$?
8752  echo "$as_me:8752: \$? = $ac_status" >&5
8753  (exit $ac_status); } &&
8754         { ac_try='test -s conftest$ac_exeext'
8755  { (eval echo "$as_me:8755: \"$ac_try\"") >&5
8756  (eval $ac_try) 2>&5
8757  ac_status=$?
8758  echo "$as_me:8758: \$? = $ac_status" >&5
8759  (exit $ac_status); }; }; then
8760  ac_cv_lib_socket_connect=yes
8761else
8762  echo "$as_me: failed program was:" >&5
8763cat conftest.$ac_ext >&5
8764ac_cv_lib_socket_connect=no
8765fi
8766rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8767LIBS=$ac_check_lib_save_LIBS
8768fi
8769echo "$as_me:8769: result: $ac_cv_lib_socket_connect" >&5
8770echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
8771if test $ac_cv_lib_socket_connect = yes; then
8772  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
8773fi
8774
8775    fi
8776
8777    # Guillermo Gomez says -lposix is necessary on A/UX.
8778    echo "$as_me:8778: checking for remove" >&5
8779echo $ECHO_N "checking for remove... $ECHO_C" >&6
8780if test "${ac_cv_func_remove+set}" = set; then
8781  echo $ECHO_N "(cached) $ECHO_C" >&6
8782else
8783  cat >conftest.$ac_ext <<_ACEOF
8784#line 8784 "configure"
8785#include "confdefs.h"
8786/* System header to define __stub macros and hopefully few prototypes,
8787    which can conflict with char remove (); below.  */
8788#include <assert.h>
8789/* Override any gcc2 internal prototype to avoid an error.  */
8790#ifdef __cplusplus
8791extern "C"
8792#endif
8793/* We use char because int might match the return type of a gcc2
8794   builtin and then its argument prototype would still apply.  */
8795char remove ();
8796char (*f) ();
8797
8798int
8799main (void)
8800{
8801/* The GNU C library defines this for functions which it implements
8802    to always fail with ENOSYS.  Some functions are actually named
8803    something starting with __ and the normal name is an alias.  */
8804#if defined (__stub_remove) || defined (__stub___remove)
8805choke me
8806#else
8807f = remove; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8808#endif
8809
8810  ;
8811  return 0;
8812}
8813_ACEOF
8814rm -f conftest.$ac_objext conftest$ac_exeext
8815if { (eval echo "$as_me:8815: \"$ac_link\"") >&5
8816  (eval $ac_link) 2>&5
8817  ac_status=$?
8818  echo "$as_me:8818: \$? = $ac_status" >&5
8819  (exit $ac_status); } &&
8820         { ac_try='test -s conftest$ac_exeext'
8821  { (eval echo "$as_me:8821: \"$ac_try\"") >&5
8822  (eval $ac_try) 2>&5
8823  ac_status=$?
8824  echo "$as_me:8824: \$? = $ac_status" >&5
8825  (exit $ac_status); }; }; then
8826  ac_cv_func_remove=yes
8827else
8828  echo "$as_me: failed program was:" >&5
8829cat conftest.$ac_ext >&5
8830ac_cv_func_remove=no
8831fi
8832rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8833fi
8834echo "$as_me:8834: result: $ac_cv_func_remove" >&5
8835echo "${ECHO_T}$ac_cv_func_remove" >&6
8836
8837    if test $ac_cv_func_remove = no; then
8838      echo "$as_me:8838: checking for remove in -lposix" >&5
8839echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
8840if test "${ac_cv_lib_posix_remove+set}" = set; then
8841  echo $ECHO_N "(cached) $ECHO_C" >&6
8842else
8843  ac_check_lib_save_LIBS=$LIBS
8844LIBS="-lposix  $LIBS"
8845cat >conftest.$ac_ext <<_ACEOF
8846#line 8846 "configure"
8847#include "confdefs.h"
8848
8849/* Override any gcc2 internal prototype to avoid an error.  */
8850#ifdef __cplusplus
8851extern "C"
8852#endif
8853/* We use char because int might match the return type of a gcc2
8854   builtin and then its argument prototype would still apply.  */
8855char remove ();
8856int
8857main (void)
8858{
8859remove ();
8860  ;
8861  return 0;
8862}
8863_ACEOF
8864rm -f conftest.$ac_objext conftest$ac_exeext
8865if { (eval echo "$as_me:8865: \"$ac_link\"") >&5
8866  (eval $ac_link) 2>&5
8867  ac_status=$?
8868  echo "$as_me:8868: \$? = $ac_status" >&5
8869  (exit $ac_status); } &&
8870         { ac_try='test -s conftest$ac_exeext'
8871  { (eval echo "$as_me:8871: \"$ac_try\"") >&5
8872  (eval $ac_try) 2>&5
8873  ac_status=$?
8874  echo "$as_me:8874: \$? = $ac_status" >&5
8875  (exit $ac_status); }; }; then
8876  ac_cv_lib_posix_remove=yes
8877else
8878  echo "$as_me: failed program was:" >&5
8879cat conftest.$ac_ext >&5
8880ac_cv_lib_posix_remove=no
8881fi
8882rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8883LIBS=$ac_check_lib_save_LIBS
8884fi
8885echo "$as_me:8885: result: $ac_cv_lib_posix_remove" >&5
8886echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
8887if test $ac_cv_lib_posix_remove = yes; then
8888  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
8889fi
8890
8891    fi
8892
8893    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
8894    echo "$as_me:8894: checking for shmat" >&5
8895echo $ECHO_N "checking for shmat... $ECHO_C" >&6
8896if test "${ac_cv_func_shmat+set}" = set; then
8897  echo $ECHO_N "(cached) $ECHO_C" >&6
8898else
8899  cat >conftest.$ac_ext <<_ACEOF
8900#line 8900 "configure"
8901#include "confdefs.h"
8902/* System header to define __stub macros and hopefully few prototypes,
8903    which can conflict with char shmat (); below.  */
8904#include <assert.h>
8905/* Override any gcc2 internal prototype to avoid an error.  */
8906#ifdef __cplusplus
8907extern "C"
8908#endif
8909/* We use char because int might match the return type of a gcc2
8910   builtin and then its argument prototype would still apply.  */
8911char shmat ();
8912char (*f) ();
8913
8914int
8915main (void)
8916{
8917/* The GNU C library defines this for functions which it implements
8918    to always fail with ENOSYS.  Some functions are actually named
8919    something starting with __ and the normal name is an alias.  */
8920#if defined (__stub_shmat) || defined (__stub___shmat)
8921choke me
8922#else
8923f = shmat; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
8924#endif
8925
8926  ;
8927  return 0;
8928}
8929_ACEOF
8930rm -f conftest.$ac_objext conftest$ac_exeext
8931if { (eval echo "$as_me:8931: \"$ac_link\"") >&5
8932  (eval $ac_link) 2>&5
8933  ac_status=$?
8934  echo "$as_me:8934: \$? = $ac_status" >&5
8935  (exit $ac_status); } &&
8936         { ac_try='test -s conftest$ac_exeext'
8937  { (eval echo "$as_me:8937: \"$ac_try\"") >&5
8938  (eval $ac_try) 2>&5
8939  ac_status=$?
8940  echo "$as_me:8940: \$? = $ac_status" >&5
8941  (exit $ac_status); }; }; then
8942  ac_cv_func_shmat=yes
8943else
8944  echo "$as_me: failed program was:" >&5
8945cat conftest.$ac_ext >&5
8946ac_cv_func_shmat=no
8947fi
8948rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8949fi
8950echo "$as_me:8950: result: $ac_cv_func_shmat" >&5
8951echo "${ECHO_T}$ac_cv_func_shmat" >&6
8952
8953    if test $ac_cv_func_shmat = no; then
8954      echo "$as_me:8954: checking for shmat in -lipc" >&5
8955echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
8956if test "${ac_cv_lib_ipc_shmat+set}" = set; then
8957  echo $ECHO_N "(cached) $ECHO_C" >&6
8958else
8959  ac_check_lib_save_LIBS=$LIBS
8960LIBS="-lipc  $LIBS"
8961cat >conftest.$ac_ext <<_ACEOF
8962#line 8962 "configure"
8963#include "confdefs.h"
8964
8965/* Override any gcc2 internal prototype to avoid an error.  */
8966#ifdef __cplusplus
8967extern "C"
8968#endif
8969/* We use char because int might match the return type of a gcc2
8970   builtin and then its argument prototype would still apply.  */
8971char shmat ();
8972int
8973main (void)
8974{
8975shmat ();
8976  ;
8977  return 0;
8978}
8979_ACEOF
8980rm -f conftest.$ac_objext conftest$ac_exeext
8981if { (eval echo "$as_me:8981: \"$ac_link\"") >&5
8982  (eval $ac_link) 2>&5
8983  ac_status=$?
8984  echo "$as_me:8984: \$? = $ac_status" >&5
8985  (exit $ac_status); } &&
8986         { ac_try='test -s conftest$ac_exeext'
8987  { (eval echo "$as_me:8987: \"$ac_try\"") >&5
8988  (eval $ac_try) 2>&5
8989  ac_status=$?
8990  echo "$as_me:8990: \$? = $ac_status" >&5
8991  (exit $ac_status); }; }; then
8992  ac_cv_lib_ipc_shmat=yes
8993else
8994  echo "$as_me: failed program was:" >&5
8995cat conftest.$ac_ext >&5
8996ac_cv_lib_ipc_shmat=no
8997fi
8998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8999LIBS=$ac_check_lib_save_LIBS
9000fi
9001echo "$as_me:9001: result: $ac_cv_lib_ipc_shmat" >&5
9002echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
9003if test $ac_cv_lib_ipc_shmat = yes; then
9004  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
9005fi
9006
9007    fi
9008  fi
9009
9010  # Check for libraries that X11R6 Xt/Xaw programs need.
9011  ac_save_LDFLAGS=$LDFLAGS
9012  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
9013  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
9014  # check for ICE first), but we must link in the order -lSM -lICE or
9015  # we get undefined symbols.  So assume we have SM if we have ICE.
9016  # These have to be linked with before -lX11, unlike the other
9017  # libraries we check for below, so use a different variable.
9018  # John Interrante, Karl Berry
9019  echo "$as_me:9019: checking for IceConnectionNumber in -lICE" >&5
9020echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
9021if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
9022  echo $ECHO_N "(cached) $ECHO_C" >&6
9023else
9024  ac_check_lib_save_LIBS=$LIBS
9025LIBS="-lICE $X_EXTRA_LIBS $LIBS"
9026cat >conftest.$ac_ext <<_ACEOF
9027#line 9027 "configure"
9028#include "confdefs.h"
9029
9030/* Override any gcc2 internal prototype to avoid an error.  */
9031#ifdef __cplusplus
9032extern "C"
9033#endif
9034/* We use char because int might match the return type of a gcc2
9035   builtin and then its argument prototype would still apply.  */
9036char IceConnectionNumber ();
9037int
9038main (void)
9039{
9040IceConnectionNumber ();
9041  ;
9042  return 0;
9043}
9044_ACEOF
9045rm -f conftest.$ac_objext conftest$ac_exeext
9046if { (eval echo "$as_me:9046: \"$ac_link\"") >&5
9047  (eval $ac_link) 2>&5
9048  ac_status=$?
9049  echo "$as_me:9049: \$? = $ac_status" >&5
9050  (exit $ac_status); } &&
9051         { ac_try='test -s conftest$ac_exeext'
9052  { (eval echo "$as_me:9052: \"$ac_try\"") >&5
9053  (eval $ac_try) 2>&5
9054  ac_status=$?
9055  echo "$as_me:9055: \$? = $ac_status" >&5
9056  (exit $ac_status); }; }; then
9057  ac_cv_lib_ICE_IceConnectionNumber=yes
9058else
9059  echo "$as_me: failed program was:" >&5
9060cat conftest.$ac_ext >&5
9061ac_cv_lib_ICE_IceConnectionNumber=no
9062fi
9063rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9064LIBS=$ac_check_lib_save_LIBS
9065fi
9066echo "$as_me:9066: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
9067echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
9068if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
9069  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
9070fi
9071
9072  LDFLAGS=$ac_save_LDFLAGS
9073
9074fi
9075
9076echo "$as_me:9076: checking if you want to use pkg-config" >&5
9077echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
9078
9079# Check whether --with-pkg-config or --without-pkg-config was given.
9080if test "${with_pkg_config+set}" = set; then
9081  withval="$with_pkg_config"
9082  cf_pkg_config=$withval
9083else
9084  cf_pkg_config=yes
9085fi;
9086echo "$as_me:9086: result: $cf_pkg_config" >&5
9087echo "${ECHO_T}$cf_pkg_config" >&6
9088
9089case $cf_pkg_config in
9090(no)
9091	PKG_CONFIG=none
9092	;;
9093(yes)
9094
9095if test -n "$ac_tool_prefix"; then
9096  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
9097set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
9098echo "$as_me:9098: checking for $ac_word" >&5
9099echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9100if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
9101  echo $ECHO_N "(cached) $ECHO_C" >&6
9102else
9103  case $PKG_CONFIG in
9104  [\\/]* | ?:[\\/]*)
9105  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
9106  ;;
9107  *)
9108  ac_save_IFS=$IFS; IFS=$ac_path_separator
9109ac_dummy="$PATH"
9110for ac_dir in $ac_dummy; do
9111  IFS=$ac_save_IFS
9112  test -z "$ac_dir" && ac_dir=.
9113  if $as_executable_p "$ac_dir/$ac_word"; then
9114   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
9115   echo "$as_me:9115: found $ac_dir/$ac_word" >&5
9116   break
9117fi
9118done
9119
9120  ;;
9121esac
9122fi
9123PKG_CONFIG=$ac_cv_path_PKG_CONFIG
9124
9125if test -n "$PKG_CONFIG"; then
9126  echo "$as_me:9126: result: $PKG_CONFIG" >&5
9127echo "${ECHO_T}$PKG_CONFIG" >&6
9128else
9129  echo "$as_me:9129: result: no" >&5
9130echo "${ECHO_T}no" >&6
9131fi
9132
9133fi
9134if test -z "$ac_cv_path_PKG_CONFIG"; then
9135  ac_pt_PKG_CONFIG=$PKG_CONFIG
9136  # Extract the first word of "pkg-config", so it can be a program name with args.
9137set dummy pkg-config; ac_word=$2
9138echo "$as_me:9138: checking for $ac_word" >&5
9139echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
9140if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
9141  echo $ECHO_N "(cached) $ECHO_C" >&6
9142else
9143  case $ac_pt_PKG_CONFIG in
9144  [\\/]* | ?:[\\/]*)
9145  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
9146  ;;
9147  *)
9148  ac_save_IFS=$IFS; IFS=$ac_path_separator
9149ac_dummy="$PATH"
9150for ac_dir in $ac_dummy; do
9151  IFS=$ac_save_IFS
9152  test -z "$ac_dir" && ac_dir=.
9153  if $as_executable_p "$ac_dir/$ac_word"; then
9154   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
9155   echo "$as_me:9155: found $ac_dir/$ac_word" >&5
9156   break
9157fi
9158done
9159
9160  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
9161  ;;
9162esac
9163fi
9164ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
9165
9166if test -n "$ac_pt_PKG_CONFIG"; then
9167  echo "$as_me:9167: result: $ac_pt_PKG_CONFIG" >&5
9168echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
9169else
9170  echo "$as_me:9170: result: no" >&5
9171echo "${ECHO_T}no" >&6
9172fi
9173
9174  PKG_CONFIG=$ac_pt_PKG_CONFIG
9175else
9176  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
9177fi
9178
9179	;;
9180(*)
9181	PKG_CONFIG=$withval
9182	;;
9183esac
9184
9185test -z "$PKG_CONFIG" && PKG_CONFIG=none
9186if test "$PKG_CONFIG" != none ; then
9187
9188if test "x$prefix" != xNONE; then
9189	cf_path_syntax="$prefix"
9190else
9191	cf_path_syntax="$ac_default_prefix"
9192fi
9193
9194case ".$PKG_CONFIG" in
9195(.\$\(*\)*|.\'*\'*)
9196	;;
9197(..|./*|.\\*)
9198	;;
9199(.[a-zA-Z]:[\\/]*) # OS/2 EMX
9200	;;
9201(.\${*prefix}*|.\${*dir}*)
9202	eval PKG_CONFIG="$PKG_CONFIG"
9203	case ".$PKG_CONFIG" in
9204	(.NONE/*)
9205		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9206		;;
9207	esac
9208	;;
9209(.no|.NONE/*)
9210	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
9211	;;
9212(*)
9213	{ { echo "$as_me:9213: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
9214echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
9215   { (exit 1); exit 1; }; }
9216	;;
9217esac
9218
9219elif test "x$cf_pkg_config" != xno ; then
9220	{ echo "$as_me:9220: WARNING: pkg-config is not installed" >&5
9221echo "$as_me: WARNING: pkg-config is not installed" >&2;}
9222fi
9223
9224# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
9225# in some cases has installed dummy files in the former, other cases replaced
9226# it with a link to the new location).  This complicates the configure script.
9227# Check for that pitfall, and recover using pkg-config
9228#
9229# If none of these are set, the configuration is almost certainly broken.
9230if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
9231then
9232
9233if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9234	test -n "$verbose" && echo "	found package x11" 1>&6
9235
9236echo "${as_me:-configure}:9236: testing found package x11 ..." 1>&5
9237
9238	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
9239	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
9240	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
9241
9242echo "${as_me:-configure}:9242: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9243
9244	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
9245
9246echo "${as_me:-configure}:9246: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
9247
9248cf_fix_cppflags=no
9249cf_new_cflags=
9250cf_new_cppflags=
9251cf_new_extra_cppflags=
9252
9253for cf_add_cflags in $cf_pkgconfig_incs
9254do
9255case $cf_fix_cppflags in
9256(no)
9257	case $cf_add_cflags in
9258	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9259		case $cf_add_cflags in
9260		(-D*)
9261			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9262
9263			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9264				&& test -z "${cf_tst_cflags}" \
9265				&& cf_fix_cppflags=yes
9266
9267			if test $cf_fix_cppflags = yes ; then
9268
9269	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9270	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9271
9272				continue
9273			elif test "${cf_tst_cflags}" = "\"'" ; then
9274
9275	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9276	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9277
9278				continue
9279			fi
9280			;;
9281		esac
9282		case "$CPPFLAGS" in
9283		(*$cf_add_cflags)
9284			;;
9285		(*)
9286			case $cf_add_cflags in
9287			(-D*)
9288				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9289
9290CPPFLAGS=`echo "$CPPFLAGS" | \
9291	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9292		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9293
9294				;;
9295			esac
9296
9297	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9298	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9299
9300			;;
9301		esac
9302		;;
9303	(*)
9304
9305	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9306	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9307
9308		;;
9309	esac
9310	;;
9311(yes)
9312
9313	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9314	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9315
9316	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9317
9318	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9319		&& test -z "${cf_tst_cflags}" \
9320		&& cf_fix_cppflags=no
9321	;;
9322esac
9323done
9324
9325if test -n "$cf_new_cflags" ; then
9326
9327	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9328	CFLAGS="${CFLAGS}$cf_new_cflags"
9329
9330fi
9331
9332if test -n "$cf_new_cppflags" ; then
9333
9334	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9335	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9336
9337fi
9338
9339if test -n "$cf_new_extra_cppflags" ; then
9340
9341	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9342	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9343
9344fi
9345
9346cf_add_libs="$cf_pkgconfig_libs"
9347# Filter out duplicates - this happens with badly-designed ".pc" files...
9348for cf_add_1lib in $LIBS
9349do
9350	for cf_add_2lib in $cf_add_libs
9351	do
9352		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9353		then
9354			cf_add_1lib=
9355			break
9356		fi
9357	done
9358	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9359done
9360LIBS="$cf_add_libs"
9361
9362	:
9363else
9364	cf_pkgconfig_incs=
9365	cf_pkgconfig_libs=
9366	{ echo "$as_me:9366: WARNING: unable to find X11 library" >&5
9367echo "$as_me: WARNING: unable to find X11 library" >&2;}
9368fi
9369
9370if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
9371	test -n "$verbose" && echo "	found package ice" 1>&6
9372
9373echo "${as_me:-configure}:9373: testing found package ice ..." 1>&5
9374
9375	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
9376	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
9377	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
9378
9379echo "${as_me:-configure}:9379: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9380
9381	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
9382
9383echo "${as_me:-configure}:9383: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
9384
9385cf_fix_cppflags=no
9386cf_new_cflags=
9387cf_new_cppflags=
9388cf_new_extra_cppflags=
9389
9390for cf_add_cflags in $cf_pkgconfig_incs
9391do
9392case $cf_fix_cppflags in
9393(no)
9394	case $cf_add_cflags in
9395	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9396		case $cf_add_cflags in
9397		(-D*)
9398			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9399
9400			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9401				&& test -z "${cf_tst_cflags}" \
9402				&& cf_fix_cppflags=yes
9403
9404			if test $cf_fix_cppflags = yes ; then
9405
9406	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9407	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9408
9409				continue
9410			elif test "${cf_tst_cflags}" = "\"'" ; then
9411
9412	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9413	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9414
9415				continue
9416			fi
9417			;;
9418		esac
9419		case "$CPPFLAGS" in
9420		(*$cf_add_cflags)
9421			;;
9422		(*)
9423			case $cf_add_cflags in
9424			(-D*)
9425				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9426
9427CPPFLAGS=`echo "$CPPFLAGS" | \
9428	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9429		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9430
9431				;;
9432			esac
9433
9434	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9435	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9436
9437			;;
9438		esac
9439		;;
9440	(*)
9441
9442	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9443	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9444
9445		;;
9446	esac
9447	;;
9448(yes)
9449
9450	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9451	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9452
9453	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9454
9455	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9456		&& test -z "${cf_tst_cflags}" \
9457		&& cf_fix_cppflags=no
9458	;;
9459esac
9460done
9461
9462if test -n "$cf_new_cflags" ; then
9463
9464	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9465	CFLAGS="${CFLAGS}$cf_new_cflags"
9466
9467fi
9468
9469if test -n "$cf_new_cppflags" ; then
9470
9471	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9472	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9473
9474fi
9475
9476if test -n "$cf_new_extra_cppflags" ; then
9477
9478	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9479	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9480
9481fi
9482
9483cf_add_libs="$cf_pkgconfig_libs"
9484# Filter out duplicates - this happens with badly-designed ".pc" files...
9485for cf_add_1lib in $LIBS
9486do
9487	for cf_add_2lib in $cf_add_libs
9488	do
9489		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9490		then
9491			cf_add_1lib=
9492			break
9493		fi
9494	done
9495	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9496done
9497LIBS="$cf_add_libs"
9498
9499	:
9500else
9501	cf_pkgconfig_incs=
9502	cf_pkgconfig_libs=
9503	{ echo "$as_me:9503: WARNING: unable to find ICE library" >&5
9504echo "$as_me: WARNING: unable to find ICE library" >&2;}
9505fi
9506
9507if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
9508	test -n "$verbose" && echo "	found package sm" 1>&6
9509
9510echo "${as_me:-configure}:9510: testing found package sm ..." 1>&5
9511
9512	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
9513	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
9514	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
9515
9516echo "${as_me:-configure}:9516: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9517
9518	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
9519
9520echo "${as_me:-configure}:9520: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
9521
9522cf_fix_cppflags=no
9523cf_new_cflags=
9524cf_new_cppflags=
9525cf_new_extra_cppflags=
9526
9527for cf_add_cflags in $cf_pkgconfig_incs
9528do
9529case $cf_fix_cppflags in
9530(no)
9531	case $cf_add_cflags in
9532	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9533		case $cf_add_cflags in
9534		(-D*)
9535			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9536
9537			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9538				&& test -z "${cf_tst_cflags}" \
9539				&& cf_fix_cppflags=yes
9540
9541			if test $cf_fix_cppflags = yes ; then
9542
9543	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9544	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9545
9546				continue
9547			elif test "${cf_tst_cflags}" = "\"'" ; then
9548
9549	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9550	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9551
9552				continue
9553			fi
9554			;;
9555		esac
9556		case "$CPPFLAGS" in
9557		(*$cf_add_cflags)
9558			;;
9559		(*)
9560			case $cf_add_cflags in
9561			(-D*)
9562				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9563
9564CPPFLAGS=`echo "$CPPFLAGS" | \
9565	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9566		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9567
9568				;;
9569			esac
9570
9571	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9572	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9573
9574			;;
9575		esac
9576		;;
9577	(*)
9578
9579	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9580	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9581
9582		;;
9583	esac
9584	;;
9585(yes)
9586
9587	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9588	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9589
9590	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9591
9592	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9593		&& test -z "${cf_tst_cflags}" \
9594		&& cf_fix_cppflags=no
9595	;;
9596esac
9597done
9598
9599if test -n "$cf_new_cflags" ; then
9600
9601	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9602	CFLAGS="${CFLAGS}$cf_new_cflags"
9603
9604fi
9605
9606if test -n "$cf_new_cppflags" ; then
9607
9608	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9609	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9610
9611fi
9612
9613if test -n "$cf_new_extra_cppflags" ; then
9614
9615	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9616	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9617
9618fi
9619
9620cf_add_libs="$cf_pkgconfig_libs"
9621# Filter out duplicates - this happens with badly-designed ".pc" files...
9622for cf_add_1lib in $LIBS
9623do
9624	for cf_add_2lib in $cf_add_libs
9625	do
9626		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9627		then
9628			cf_add_1lib=
9629			break
9630		fi
9631	done
9632	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9633done
9634LIBS="$cf_add_libs"
9635
9636	:
9637else
9638	cf_pkgconfig_incs=
9639	cf_pkgconfig_libs=
9640	{ echo "$as_me:9640: WARNING: unable to find SM library" >&5
9641echo "$as_me: WARNING: unable to find SM library" >&2;}
9642fi
9643
9644if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
9645	test -n "$verbose" && echo "	found package xt" 1>&6
9646
9647echo "${as_me:-configure}:9647: testing found package xt ..." 1>&5
9648
9649	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
9650	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
9651	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
9652
9653echo "${as_me:-configure}:9653: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9654
9655	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
9656
9657echo "${as_me:-configure}:9657: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
9658
9659cf_fix_cppflags=no
9660cf_new_cflags=
9661cf_new_cppflags=
9662cf_new_extra_cppflags=
9663
9664for cf_add_cflags in $cf_pkgconfig_incs
9665do
9666case $cf_fix_cppflags in
9667(no)
9668	case $cf_add_cflags in
9669	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9670		case $cf_add_cflags in
9671		(-D*)
9672			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9673
9674			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9675				&& test -z "${cf_tst_cflags}" \
9676				&& cf_fix_cppflags=yes
9677
9678			if test $cf_fix_cppflags = yes ; then
9679
9680	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9681	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9682
9683				continue
9684			elif test "${cf_tst_cflags}" = "\"'" ; then
9685
9686	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9687	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9688
9689				continue
9690			fi
9691			;;
9692		esac
9693		case "$CPPFLAGS" in
9694		(*$cf_add_cflags)
9695			;;
9696		(*)
9697			case $cf_add_cflags in
9698			(-D*)
9699				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9700
9701CPPFLAGS=`echo "$CPPFLAGS" | \
9702	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9703		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9704
9705				;;
9706			esac
9707
9708	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9709	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9710
9711			;;
9712		esac
9713		;;
9714	(*)
9715
9716	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9717	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9718
9719		;;
9720	esac
9721	;;
9722(yes)
9723
9724	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9725	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9726
9727	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9728
9729	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9730		&& test -z "${cf_tst_cflags}" \
9731		&& cf_fix_cppflags=no
9732	;;
9733esac
9734done
9735
9736if test -n "$cf_new_cflags" ; then
9737
9738	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9739	CFLAGS="${CFLAGS}$cf_new_cflags"
9740
9741fi
9742
9743if test -n "$cf_new_cppflags" ; then
9744
9745	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9746	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9747
9748fi
9749
9750if test -n "$cf_new_extra_cppflags" ; then
9751
9752	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9753	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9754
9755fi
9756
9757cf_add_libs="$cf_pkgconfig_libs"
9758# Filter out duplicates - this happens with badly-designed ".pc" files...
9759for cf_add_1lib in $LIBS
9760do
9761	for cf_add_2lib in $cf_add_libs
9762	do
9763		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9764		then
9765			cf_add_1lib=
9766			break
9767		fi
9768	done
9769	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9770done
9771LIBS="$cf_add_libs"
9772
9773	:
9774else
9775	cf_pkgconfig_incs=
9776	cf_pkgconfig_libs=
9777	{ echo "$as_me:9777: WARNING: unable to find Xt library" >&5
9778echo "$as_me: WARNING: unable to find Xt library" >&2;}
9779fi
9780
9781fi
9782
9783cf_have_X_LIBS=no
9784
9785if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
9786	test -n "$verbose" && echo "	found package xt" 1>&6
9787
9788echo "${as_me:-configure}:9788: testing found package xt ..." 1>&5
9789
9790	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
9791	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
9792	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
9793
9794echo "${as_me:-configure}:9794: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9795
9796	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
9797
9798echo "${as_me:-configure}:9798: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
9799
9800cf_fix_cppflags=no
9801cf_new_cflags=
9802cf_new_cppflags=
9803cf_new_extra_cppflags=
9804
9805for cf_add_cflags in $cf_pkgconfig_incs
9806do
9807case $cf_fix_cppflags in
9808(no)
9809	case $cf_add_cflags in
9810	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
9811		case $cf_add_cflags in
9812		(-D*)
9813			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
9814
9815			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9816				&& test -z "${cf_tst_cflags}" \
9817				&& cf_fix_cppflags=yes
9818
9819			if test $cf_fix_cppflags = yes ; then
9820
9821	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9822	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9823
9824				continue
9825			elif test "${cf_tst_cflags}" = "\"'" ; then
9826
9827	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9828	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9829
9830				continue
9831			fi
9832			;;
9833		esac
9834		case "$CPPFLAGS" in
9835		(*$cf_add_cflags)
9836			;;
9837		(*)
9838			case $cf_add_cflags in
9839			(-D*)
9840				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
9841
9842CPPFLAGS=`echo "$CPPFLAGS" | \
9843	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
9844		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
9845
9846				;;
9847			esac
9848
9849	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
9850	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
9851
9852			;;
9853		esac
9854		;;
9855	(*)
9856
9857	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
9858	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
9859
9860		;;
9861	esac
9862	;;
9863(yes)
9864
9865	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
9866	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
9867
9868	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
9869
9870	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
9871		&& test -z "${cf_tst_cflags}" \
9872		&& cf_fix_cppflags=no
9873	;;
9874esac
9875done
9876
9877if test -n "$cf_new_cflags" ; then
9878
9879	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
9880	CFLAGS="${CFLAGS}$cf_new_cflags"
9881
9882fi
9883
9884if test -n "$cf_new_cppflags" ; then
9885
9886	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9887	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
9888
9889fi
9890
9891if test -n "$cf_new_extra_cppflags" ; then
9892
9893	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
9894	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
9895
9896fi
9897
9898cf_add_libs="$cf_pkgconfig_libs"
9899# Filter out duplicates - this happens with badly-designed ".pc" files...
9900for cf_add_1lib in $LIBS
9901do
9902	for cf_add_2lib in $cf_add_libs
9903	do
9904		if test "x$cf_add_1lib" = "x$cf_add_2lib"
9905		then
9906			cf_add_1lib=
9907			break
9908		fi
9909	done
9910	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
9911done
9912LIBS="$cf_add_libs"
9913
9914	case "x$LIBS" in
9915	(*-lX11*)
9916		;;
9917	(*)
9918# we have an "xt" package, but it may omit Xt's dependency on X11
9919echo "$as_me:9919: checking for usable X dependency" >&5
9920echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
9921if test "${cf_cv_xt_x11_compat+set}" = set; then
9922  echo $ECHO_N "(cached) $ECHO_C" >&6
9923else
9924
9925cat >conftest.$ac_ext <<_ACEOF
9926#line 9926 "configure"
9927#include "confdefs.h"
9928
9929#include <X11/Xlib.h>
9930
9931int
9932main (void)
9933{
9934
9935	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
9936	int rc2 = XClearWindow((Display*) 0, (Window) 0);
9937	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
9938	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
9939
9940  ;
9941  return 0;
9942}
9943_ACEOF
9944rm -f conftest.$ac_objext conftest$ac_exeext
9945if { (eval echo "$as_me:9945: \"$ac_link\"") >&5
9946  (eval $ac_link) 2>&5
9947  ac_status=$?
9948  echo "$as_me:9948: \$? = $ac_status" >&5
9949  (exit $ac_status); } &&
9950         { ac_try='test -s conftest$ac_exeext'
9951  { (eval echo "$as_me:9951: \"$ac_try\"") >&5
9952  (eval $ac_try) 2>&5
9953  ac_status=$?
9954  echo "$as_me:9954: \$? = $ac_status" >&5
9955  (exit $ac_status); }; }; then
9956  cf_cv_xt_x11_compat=yes
9957else
9958  echo "$as_me: failed program was:" >&5
9959cat conftest.$ac_ext >&5
9960cf_cv_xt_x11_compat=no
9961fi
9962rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9963fi
9964echo "$as_me:9964: result: $cf_cv_xt_x11_compat" >&5
9965echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
9966		if test "$cf_cv_xt_x11_compat" = no
9967		then
9968			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
9969
9970echo "${as_me:-configure}:9970: testing work around broken X11 dependency ..." 1>&5
9971
9972			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
9973
9974if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
9975	test -n "$verbose" && echo "	found package x11" 1>&6
9976
9977echo "${as_me:-configure}:9977: testing found package x11 ..." 1>&5
9978
9979	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
9980	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
9981	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
9982
9983echo "${as_me:-configure}:9983: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
9984
9985	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
9986
9987echo "${as_me:-configure}:9987: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
9988
9989cf_fix_cppflags=no
9990cf_new_cflags=
9991cf_new_cppflags=
9992cf_new_extra_cppflags=
9993
9994for cf_add_cflags in $cf_pkgconfig_incs
9995do
9996case $cf_fix_cppflags in
9997(no)
9998	case $cf_add_cflags in
9999	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10000		case $cf_add_cflags in
10001		(-D*)
10002			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10003
10004			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10005				&& test -z "${cf_tst_cflags}" \
10006				&& cf_fix_cppflags=yes
10007
10008			if test $cf_fix_cppflags = yes ; then
10009
10010	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10011	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10012
10013				continue
10014			elif test "${cf_tst_cflags}" = "\"'" ; then
10015
10016	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10017	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10018
10019				continue
10020			fi
10021			;;
10022		esac
10023		case "$CPPFLAGS" in
10024		(*$cf_add_cflags)
10025			;;
10026		(*)
10027			case $cf_add_cflags in
10028			(-D*)
10029				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10030
10031CPPFLAGS=`echo "$CPPFLAGS" | \
10032	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10033		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10034
10035				;;
10036			esac
10037
10038	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10039	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10040
10041			;;
10042		esac
10043		;;
10044	(*)
10045
10046	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10047	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10048
10049		;;
10050	esac
10051	;;
10052(yes)
10053
10054	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10055	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10056
10057	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10058
10059	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10060		&& test -z "${cf_tst_cflags}" \
10061		&& cf_fix_cppflags=no
10062	;;
10063esac
10064done
10065
10066if test -n "$cf_new_cflags" ; then
10067
10068	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10069	CFLAGS="${CFLAGS}$cf_new_cflags"
10070
10071fi
10072
10073if test -n "$cf_new_cppflags" ; then
10074
10075	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10076	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10077
10078fi
10079
10080if test -n "$cf_new_extra_cppflags" ; then
10081
10082	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10083	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10084
10085fi
10086
10087cf_add_libs="$cf_pkgconfig_libs"
10088# Filter out duplicates - this happens with badly-designed ".pc" files...
10089for cf_add_1lib in $LIBS
10090do
10091	for cf_add_2lib in $cf_add_libs
10092	do
10093		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10094		then
10095			cf_add_1lib=
10096			break
10097		fi
10098	done
10099	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10100done
10101LIBS="$cf_add_libs"
10102
10103	:
10104else
10105	cf_pkgconfig_incs=
10106	cf_pkgconfig_libs=
10107
10108test -n "$verbose" && echo "	...before $LIBS" 1>&6
10109
10110echo "${as_me:-configure}:10110: testing ...before $LIBS ..." 1>&5
10111
10112LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
10113test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10114
10115echo "${as_me:-configure}:10115: testing ...after  $LIBS ..." 1>&5
10116
10117fi
10118
10119		fi
10120		;;
10121	esac
10122
10123echo "$as_me:10123: checking for usable X Toolkit package" >&5
10124echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
10125if test "${cf_cv_xt_ice_compat+set}" = set; then
10126  echo $ECHO_N "(cached) $ECHO_C" >&6
10127else
10128
10129cat >conftest.$ac_ext <<_ACEOF
10130#line 10130 "configure"
10131#include "confdefs.h"
10132
10133#include <X11/Shell.h>
10134
10135int
10136main (void)
10137{
10138int num = IceConnectionNumber(0)
10139
10140  ;
10141  return 0;
10142}
10143_ACEOF
10144rm -f conftest.$ac_objext conftest$ac_exeext
10145if { (eval echo "$as_me:10145: \"$ac_link\"") >&5
10146  (eval $ac_link) 2>&5
10147  ac_status=$?
10148  echo "$as_me:10148: \$? = $ac_status" >&5
10149  (exit $ac_status); } &&
10150         { ac_try='test -s conftest$ac_exeext'
10151  { (eval echo "$as_me:10151: \"$ac_try\"") >&5
10152  (eval $ac_try) 2>&5
10153  ac_status=$?
10154  echo "$as_me:10154: \$? = $ac_status" >&5
10155  (exit $ac_status); }; }; then
10156  cf_cv_xt_ice_compat=yes
10157else
10158  echo "$as_me: failed program was:" >&5
10159cat conftest.$ac_ext >&5
10160cf_cv_xt_ice_compat=no
10161fi
10162rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10163fi
10164echo "$as_me:10164: result: $cf_cv_xt_ice_compat" >&5
10165echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
10166
10167	if test "$cf_cv_xt_ice_compat" = no
10168	then
10169		# workaround for broken ".pc" files used for X Toolkit.
10170		case "x$X_PRE_LIBS" in
10171		(*-lICE*)
10172			case "x$LIBS" in
10173			(*-lICE*)
10174				;;
10175			(*)
10176				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
10177
10178echo "${as_me:-configure}:10178: testing work around broken ICE dependency ..." 1>&5
10179
10180if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
10181	test -n "$verbose" && echo "	found package ice" 1>&6
10182
10183echo "${as_me:-configure}:10183: testing found package ice ..." 1>&5
10184
10185	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
10186	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
10187	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
10188
10189echo "${as_me:-configure}:10189: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10190
10191	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
10192
10193echo "${as_me:-configure}:10193: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
10194
10195cf_fix_cppflags=no
10196cf_new_cflags=
10197cf_new_cppflags=
10198cf_new_extra_cppflags=
10199
10200for cf_add_cflags in $cf_pkgconfig_incs
10201do
10202case $cf_fix_cppflags in
10203(no)
10204	case $cf_add_cflags in
10205	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10206		case $cf_add_cflags in
10207		(-D*)
10208			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10209
10210			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10211				&& test -z "${cf_tst_cflags}" \
10212				&& cf_fix_cppflags=yes
10213
10214			if test $cf_fix_cppflags = yes ; then
10215
10216	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10217	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10218
10219				continue
10220			elif test "${cf_tst_cflags}" = "\"'" ; then
10221
10222	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10223	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10224
10225				continue
10226			fi
10227			;;
10228		esac
10229		case "$CPPFLAGS" in
10230		(*$cf_add_cflags)
10231			;;
10232		(*)
10233			case $cf_add_cflags in
10234			(-D*)
10235				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10236
10237CPPFLAGS=`echo "$CPPFLAGS" | \
10238	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10239		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10240
10241				;;
10242			esac
10243
10244	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10245	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10246
10247			;;
10248		esac
10249		;;
10250	(*)
10251
10252	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10253	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10254
10255		;;
10256	esac
10257	;;
10258(yes)
10259
10260	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10261	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10262
10263	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10264
10265	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10266		&& test -z "${cf_tst_cflags}" \
10267		&& cf_fix_cppflags=no
10268	;;
10269esac
10270done
10271
10272if test -n "$cf_new_cflags" ; then
10273
10274	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10275	CFLAGS="${CFLAGS}$cf_new_cflags"
10276
10277fi
10278
10279if test -n "$cf_new_cppflags" ; then
10280
10281	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10282	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10283
10284fi
10285
10286if test -n "$cf_new_extra_cppflags" ; then
10287
10288	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10289	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10290
10291fi
10292
10293cf_add_libs="$cf_pkgconfig_libs"
10294# Filter out duplicates - this happens with badly-designed ".pc" files...
10295for cf_add_1lib in $LIBS
10296do
10297	for cf_add_2lib in $cf_add_libs
10298	do
10299		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10300		then
10301			cf_add_1lib=
10302			break
10303		fi
10304	done
10305	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10306done
10307LIBS="$cf_add_libs"
10308
10309if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
10310	test -n "$verbose" && echo "	found package sm" 1>&6
10311
10312echo "${as_me:-configure}:10312: testing found package sm ..." 1>&5
10313
10314	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
10315	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
10316	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
10317
10318echo "${as_me:-configure}:10318: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
10319
10320	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
10321
10322echo "${as_me:-configure}:10322: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
10323
10324cf_fix_cppflags=no
10325cf_new_cflags=
10326cf_new_cppflags=
10327cf_new_extra_cppflags=
10328
10329for cf_add_cflags in $cf_pkgconfig_incs
10330do
10331case $cf_fix_cppflags in
10332(no)
10333	case $cf_add_cflags in
10334	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10335		case $cf_add_cflags in
10336		(-D*)
10337			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10338
10339			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10340				&& test -z "${cf_tst_cflags}" \
10341				&& cf_fix_cppflags=yes
10342
10343			if test $cf_fix_cppflags = yes ; then
10344
10345	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10346	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10347
10348				continue
10349			elif test "${cf_tst_cflags}" = "\"'" ; then
10350
10351	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10352	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10353
10354				continue
10355			fi
10356			;;
10357		esac
10358		case "$CPPFLAGS" in
10359		(*$cf_add_cflags)
10360			;;
10361		(*)
10362			case $cf_add_cflags in
10363			(-D*)
10364				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10365
10366CPPFLAGS=`echo "$CPPFLAGS" | \
10367	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10368		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10369
10370				;;
10371			esac
10372
10373	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10374	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10375
10376			;;
10377		esac
10378		;;
10379	(*)
10380
10381	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10382	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10383
10384		;;
10385	esac
10386	;;
10387(yes)
10388
10389	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10390	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10391
10392	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10393
10394	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10395		&& test -z "${cf_tst_cflags}" \
10396		&& cf_fix_cppflags=no
10397	;;
10398esac
10399done
10400
10401if test -n "$cf_new_cflags" ; then
10402
10403	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10404	CFLAGS="${CFLAGS}$cf_new_cflags"
10405
10406fi
10407
10408if test -n "$cf_new_cppflags" ; then
10409
10410	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10411	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10412
10413fi
10414
10415if test -n "$cf_new_extra_cppflags" ; then
10416
10417	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10418	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10419
10420fi
10421
10422cf_add_libs="$cf_pkgconfig_libs"
10423# Filter out duplicates - this happens with badly-designed ".pc" files...
10424for cf_add_1lib in $LIBS
10425do
10426	for cf_add_2lib in $cf_add_libs
10427	do
10428		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10429		then
10430			cf_add_1lib=
10431			break
10432		fi
10433	done
10434	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10435done
10436LIBS="$cf_add_libs"
10437
10438	:
10439else
10440	cf_pkgconfig_incs=
10441	cf_pkgconfig_libs=
10442	:
10443fi
10444
10445else
10446	cf_pkgconfig_incs=
10447	cf_pkgconfig_libs=
10448
10449test -n "$verbose" && echo "	...before $LIBS" 1>&6
10450
10451echo "${as_me:-configure}:10451: testing ...before $LIBS ..." 1>&5
10452
10453LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
10454test -n "$verbose" && echo "	...after  $LIBS" 1>&6
10455
10456echo "${as_me:-configure}:10456: testing ...after  $LIBS ..." 1>&5
10457
10458fi
10459
10460				;;
10461			esac
10462			;;
10463		esac
10464	fi
10465
10466	cf_have_X_LIBS=yes
10467
10468else
10469	cf_pkgconfig_incs=
10470	cf_pkgconfig_libs=
10471
10472	LDFLAGS="$X_LIBS $LDFLAGS"
10473
10474test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
10475
10476echo "${as_me:-configure}:10476: testing checking additions to CFLAGS ..." 1>&5
10477
10478cf_check_cflags="$CFLAGS"
10479cf_check_cppflags="$CPPFLAGS"
10480
10481cf_fix_cppflags=no
10482cf_new_cflags=
10483cf_new_cppflags=
10484cf_new_extra_cppflags=
10485
10486for cf_add_cflags in $X_CFLAGS
10487do
10488case $cf_fix_cppflags in
10489(no)
10490	case $cf_add_cflags in
10491	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10492		case $cf_add_cflags in
10493		(-D*)
10494			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10495
10496			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10497				&& test -z "${cf_tst_cflags}" \
10498				&& cf_fix_cppflags=yes
10499
10500			if test $cf_fix_cppflags = yes ; then
10501
10502	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10503	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10504
10505				continue
10506			elif test "${cf_tst_cflags}" = "\"'" ; then
10507
10508	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10509	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10510
10511				continue
10512			fi
10513			;;
10514		esac
10515		case "$CPPFLAGS" in
10516		(*$cf_add_cflags)
10517			;;
10518		(*)
10519			case $cf_add_cflags in
10520			(-D*)
10521				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10522
10523CPPFLAGS=`echo "$CPPFLAGS" | \
10524	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10525		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10526
10527				;;
10528			esac
10529
10530	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10531	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10532
10533			;;
10534		esac
10535		;;
10536	(*)
10537
10538	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10539	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10540
10541		;;
10542	esac
10543	;;
10544(yes)
10545
10546	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10547	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10548
10549	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
10550
10551	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10552		&& test -z "${cf_tst_cflags}" \
10553		&& cf_fix_cppflags=no
10554	;;
10555esac
10556done
10557
10558if test -n "$cf_new_cflags" ; then
10559	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
10560
10561echo "${as_me:-configure}:10561: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
10562
10563	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10564	CFLAGS="${CFLAGS}$cf_new_cflags"
10565
10566fi
10567
10568if test -n "$cf_new_cppflags" ; then
10569	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
10570
10571echo "${as_me:-configure}:10571: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
10572
10573	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10574	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10575
10576fi
10577
10578if test -n "$cf_new_extra_cppflags" ; then
10579	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
10580
10581echo "${as_me:-configure}:10581: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
10582
10583	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10584	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10585
10586fi
10587
10588if test "x$cf_check_cflags" != "x$CFLAGS" ; then
10589cat >conftest.$ac_ext <<_ACEOF
10590#line 10590 "configure"
10591#include "confdefs.h"
10592#include <stdio.h>
10593int
10594main (void)
10595{
10596printf("Hello world");
10597  ;
10598  return 0;
10599}
10600_ACEOF
10601rm -f conftest.$ac_objext conftest$ac_exeext
10602if { (eval echo "$as_me:10602: \"$ac_link\"") >&5
10603  (eval $ac_link) 2>&5
10604  ac_status=$?
10605  echo "$as_me:10605: \$? = $ac_status" >&5
10606  (exit $ac_status); } &&
10607         { ac_try='test -s conftest$ac_exeext'
10608  { (eval echo "$as_me:10608: \"$ac_try\"") >&5
10609  (eval $ac_try) 2>&5
10610  ac_status=$?
10611  echo "$as_me:10611: \$? = $ac_status" >&5
10612  (exit $ac_status); }; }; then
10613  :
10614else
10615  echo "$as_me: failed program was:" >&5
10616cat conftest.$ac_ext >&5
10617test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
10618
10619echo "${as_me:-configure}:10619: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
10620
10621	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
10622		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
10623
10624echo "${as_me:-configure}:10624: testing but keeping change to \$CPPFLAGS ..." 1>&5
10625
10626	 fi
10627	 CFLAGS="$cf_check_flags"
10628fi
10629rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10630fi
10631
10632	echo "$as_me:10632: checking for XOpenDisplay" >&5
10633echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
10634if test "${ac_cv_func_XOpenDisplay+set}" = set; then
10635  echo $ECHO_N "(cached) $ECHO_C" >&6
10636else
10637  cat >conftest.$ac_ext <<_ACEOF
10638#line 10638 "configure"
10639#include "confdefs.h"
10640/* System header to define __stub macros and hopefully few prototypes,
10641    which can conflict with char XOpenDisplay (); below.  */
10642#include <assert.h>
10643/* Override any gcc2 internal prototype to avoid an error.  */
10644#ifdef __cplusplus
10645extern "C"
10646#endif
10647/* We use char because int might match the return type of a gcc2
10648   builtin and then its argument prototype would still apply.  */
10649char XOpenDisplay ();
10650char (*f) ();
10651
10652int
10653main (void)
10654{
10655/* The GNU C library defines this for functions which it implements
10656    to always fail with ENOSYS.  Some functions are actually named
10657    something starting with __ and the normal name is an alias.  */
10658#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
10659choke me
10660#else
10661f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10662#endif
10663
10664  ;
10665  return 0;
10666}
10667_ACEOF
10668rm -f conftest.$ac_objext conftest$ac_exeext
10669if { (eval echo "$as_me:10669: \"$ac_link\"") >&5
10670  (eval $ac_link) 2>&5
10671  ac_status=$?
10672  echo "$as_me:10672: \$? = $ac_status" >&5
10673  (exit $ac_status); } &&
10674         { ac_try='test -s conftest$ac_exeext'
10675  { (eval echo "$as_me:10675: \"$ac_try\"") >&5
10676  (eval $ac_try) 2>&5
10677  ac_status=$?
10678  echo "$as_me:10678: \$? = $ac_status" >&5
10679  (exit $ac_status); }; }; then
10680  ac_cv_func_XOpenDisplay=yes
10681else
10682  echo "$as_me: failed program was:" >&5
10683cat conftest.$ac_ext >&5
10684ac_cv_func_XOpenDisplay=no
10685fi
10686rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10687fi
10688echo "$as_me:10688: result: $ac_cv_func_XOpenDisplay" >&5
10689echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
10690if test $ac_cv_func_XOpenDisplay = yes; then
10691  :
10692else
10693
10694	echo "$as_me:10694: checking for XOpenDisplay in -lX11" >&5
10695echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
10696if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
10697  echo $ECHO_N "(cached) $ECHO_C" >&6
10698else
10699  ac_check_lib_save_LIBS=$LIBS
10700LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10701cat >conftest.$ac_ext <<_ACEOF
10702#line 10702 "configure"
10703#include "confdefs.h"
10704
10705/* Override any gcc2 internal prototype to avoid an error.  */
10706#ifdef __cplusplus
10707extern "C"
10708#endif
10709/* We use char because int might match the return type of a gcc2
10710   builtin and then its argument prototype would still apply.  */
10711char XOpenDisplay ();
10712int
10713main (void)
10714{
10715XOpenDisplay ();
10716  ;
10717  return 0;
10718}
10719_ACEOF
10720rm -f conftest.$ac_objext conftest$ac_exeext
10721if { (eval echo "$as_me:10721: \"$ac_link\"") >&5
10722  (eval $ac_link) 2>&5
10723  ac_status=$?
10724  echo "$as_me:10724: \$? = $ac_status" >&5
10725  (exit $ac_status); } &&
10726         { ac_try='test -s conftest$ac_exeext'
10727  { (eval echo "$as_me:10727: \"$ac_try\"") >&5
10728  (eval $ac_try) 2>&5
10729  ac_status=$?
10730  echo "$as_me:10730: \$? = $ac_status" >&5
10731  (exit $ac_status); }; }; then
10732  ac_cv_lib_X11_XOpenDisplay=yes
10733else
10734  echo "$as_me: failed program was:" >&5
10735cat conftest.$ac_ext >&5
10736ac_cv_lib_X11_XOpenDisplay=no
10737fi
10738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10739LIBS=$ac_check_lib_save_LIBS
10740fi
10741echo "$as_me:10741: result: $ac_cv_lib_X11_XOpenDisplay" >&5
10742echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
10743if test $ac_cv_lib_X11_XOpenDisplay = yes; then
10744
10745cf_add_libs="-lX11"
10746# Filter out duplicates - this happens with badly-designed ".pc" files...
10747for cf_add_1lib in $LIBS
10748do
10749	for cf_add_2lib in $cf_add_libs
10750	do
10751		if test "x$cf_add_1lib" = "x$cf_add_2lib"
10752		then
10753			cf_add_1lib=
10754			break
10755		fi
10756	done
10757	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
10758done
10759LIBS="$cf_add_libs"
10760
10761fi
10762
10763fi
10764
10765	echo "$as_me:10765: checking for XtAppInitialize" >&5
10766echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
10767if test "${ac_cv_func_XtAppInitialize+set}" = set; then
10768  echo $ECHO_N "(cached) $ECHO_C" >&6
10769else
10770  cat >conftest.$ac_ext <<_ACEOF
10771#line 10771 "configure"
10772#include "confdefs.h"
10773/* System header to define __stub macros and hopefully few prototypes,
10774    which can conflict with char XtAppInitialize (); below.  */
10775#include <assert.h>
10776/* Override any gcc2 internal prototype to avoid an error.  */
10777#ifdef __cplusplus
10778extern "C"
10779#endif
10780/* We use char because int might match the return type of a gcc2
10781   builtin and then its argument prototype would still apply.  */
10782char XtAppInitialize ();
10783char (*f) ();
10784
10785int
10786main (void)
10787{
10788/* The GNU C library defines this for functions which it implements
10789    to always fail with ENOSYS.  Some functions are actually named
10790    something starting with __ and the normal name is an alias.  */
10791#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
10792choke me
10793#else
10794f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
10795#endif
10796
10797  ;
10798  return 0;
10799}
10800_ACEOF
10801rm -f conftest.$ac_objext conftest$ac_exeext
10802if { (eval echo "$as_me:10802: \"$ac_link\"") >&5
10803  (eval $ac_link) 2>&5
10804  ac_status=$?
10805  echo "$as_me:10805: \$? = $ac_status" >&5
10806  (exit $ac_status); } &&
10807         { ac_try='test -s conftest$ac_exeext'
10808  { (eval echo "$as_me:10808: \"$ac_try\"") >&5
10809  (eval $ac_try) 2>&5
10810  ac_status=$?
10811  echo "$as_me:10811: \$? = $ac_status" >&5
10812  (exit $ac_status); }; }; then
10813  ac_cv_func_XtAppInitialize=yes
10814else
10815  echo "$as_me: failed program was:" >&5
10816cat conftest.$ac_ext >&5
10817ac_cv_func_XtAppInitialize=no
10818fi
10819rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10820fi
10821echo "$as_me:10821: result: $ac_cv_func_XtAppInitialize" >&5
10822echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
10823if test $ac_cv_func_XtAppInitialize = yes; then
10824  :
10825else
10826
10827	echo "$as_me:10827: checking for XtAppInitialize in -lXt" >&5
10828echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
10829if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
10830  echo $ECHO_N "(cached) $ECHO_C" >&6
10831else
10832  ac_check_lib_save_LIBS=$LIBS
10833LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
10834cat >conftest.$ac_ext <<_ACEOF
10835#line 10835 "configure"
10836#include "confdefs.h"
10837
10838/* Override any gcc2 internal prototype to avoid an error.  */
10839#ifdef __cplusplus
10840extern "C"
10841#endif
10842/* We use char because int might match the return type of a gcc2
10843   builtin and then its argument prototype would still apply.  */
10844char XtAppInitialize ();
10845int
10846main (void)
10847{
10848XtAppInitialize ();
10849  ;
10850  return 0;
10851}
10852_ACEOF
10853rm -f conftest.$ac_objext conftest$ac_exeext
10854if { (eval echo "$as_me:10854: \"$ac_link\"") >&5
10855  (eval $ac_link) 2>&5
10856  ac_status=$?
10857  echo "$as_me:10857: \$? = $ac_status" >&5
10858  (exit $ac_status); } &&
10859         { ac_try='test -s conftest$ac_exeext'
10860  { (eval echo "$as_me:10860: \"$ac_try\"") >&5
10861  (eval $ac_try) 2>&5
10862  ac_status=$?
10863  echo "$as_me:10863: \$? = $ac_status" >&5
10864  (exit $ac_status); }; }; then
10865  ac_cv_lib_Xt_XtAppInitialize=yes
10866else
10867  echo "$as_me: failed program was:" >&5
10868cat conftest.$ac_ext >&5
10869ac_cv_lib_Xt_XtAppInitialize=no
10870fi
10871rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10872LIBS=$ac_check_lib_save_LIBS
10873fi
10874echo "$as_me:10874: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
10875echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
10876if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
10877
10878cat >>confdefs.h <<\EOF
10879#define HAVE_LIBXT 1
10880EOF
10881
10882		 cf_have_X_LIBS=Xt
10883		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
10884fi
10885
10886fi
10887
10888fi
10889
10890if test $cf_have_X_LIBS = no ; then
10891	{ echo "$as_me:10891: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10892test program.  You will have to check and add the proper libraries by hand
10893to makefile." >&5
10894echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
10895test program.  You will have to check and add the proper libraries by hand
10896to makefile." >&2;}
10897fi
10898
10899for ac_header in \
10900	X11/DECkeysym.h \
10901	X11/Sunkeysym.h \
10902	X11/XF86keysym.h \
10903	X11/XKBlib.h \
10904	X11/Xpoll.h \
10905	X11/extensions/XKB.h \
10906
10907do
10908as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
10909echo "$as_me:10909: checking for $ac_header" >&5
10910echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
10911if eval "test \"\${$as_ac_Header+set}\" = set"; then
10912  echo $ECHO_N "(cached) $ECHO_C" >&6
10913else
10914  cat >conftest.$ac_ext <<_ACEOF
10915#line 10915 "configure"
10916#include "confdefs.h"
10917#include <$ac_header>
10918_ACEOF
10919if { (eval echo "$as_me:10919: \"$ac_cpp conftest.$ac_ext\"") >&5
10920  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10921  ac_status=$?
10922  egrep -v '^ *\+' conftest.er1 >conftest.err
10923  rm -f conftest.er1
10924  cat conftest.err >&5
10925  echo "$as_me:10925: \$? = $ac_status" >&5
10926  (exit $ac_status); } >/dev/null; then
10927  if test -s conftest.err; then
10928    ac_cpp_err=$ac_c_preproc_warn_flag
10929  else
10930    ac_cpp_err=
10931  fi
10932else
10933  ac_cpp_err=yes
10934fi
10935if test -z "$ac_cpp_err"; then
10936  eval "$as_ac_Header=yes"
10937else
10938  echo "$as_me: failed program was:" >&5
10939  cat conftest.$ac_ext >&5
10940  eval "$as_ac_Header=no"
10941fi
10942rm -f conftest.err conftest.$ac_ext
10943fi
10944echo "$as_me:10944: result: `eval echo '${'$as_ac_Header'}'`" >&5
10945echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
10946if test `eval echo '${'$as_ac_Header'}'` = yes; then
10947  cat >>confdefs.h <<EOF
10948#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
10949EOF
10950
10951fi
10952done
10953
10954ICON_SUFFIX=.xbm
10955
10956cf_save_cppflags="${CPPFLAGS}"
10957cf_save_ldflags="${LDFLAGS}"
10958
10959echo "$as_me:10959: checking if you want to use the Xpm library for colored icon" >&5
10960echo $ECHO_N "checking if you want to use the Xpm library for colored icon... $ECHO_C" >&6
10961
10962# Check whether --with-xpm or --without-xpm was given.
10963if test "${with_xpm+set}" = set; then
10964  withval="$with_xpm"
10965  cf_Xpm_library="$withval"
10966else
10967  cf_Xpm_library=yes
10968fi;
10969echo "$as_me:10969: result: $cf_Xpm_library" >&5
10970echo "${ECHO_T}$cf_Xpm_library" >&6
10971
10972if test "$cf_Xpm_library" != no ; then
10973    if test "$cf_Xpm_library" != yes ; then
10974	CPPFLAGS="$CPPFLAGS -I$withval/include"
10975	LDFLAGS="$LDFLAGS -L$withval/lib"
10976    fi
10977    echo "$as_me:10977: checking for X11/xpm.h" >&5
10978echo $ECHO_N "checking for X11/xpm.h... $ECHO_C" >&6
10979if test "${ac_cv_header_X11_xpm_h+set}" = set; then
10980  echo $ECHO_N "(cached) $ECHO_C" >&6
10981else
10982  cat >conftest.$ac_ext <<_ACEOF
10983#line 10983 "configure"
10984#include "confdefs.h"
10985#include <X11/xpm.h>
10986_ACEOF
10987if { (eval echo "$as_me:10987: \"$ac_cpp conftest.$ac_ext\"") >&5
10988  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
10989  ac_status=$?
10990  egrep -v '^ *\+' conftest.er1 >conftest.err
10991  rm -f conftest.er1
10992  cat conftest.err >&5
10993  echo "$as_me:10993: \$? = $ac_status" >&5
10994  (exit $ac_status); } >/dev/null; then
10995  if test -s conftest.err; then
10996    ac_cpp_err=$ac_c_preproc_warn_flag
10997  else
10998    ac_cpp_err=
10999  fi
11000else
11001  ac_cpp_err=yes
11002fi
11003if test -z "$ac_cpp_err"; then
11004  ac_cv_header_X11_xpm_h=yes
11005else
11006  echo "$as_me: failed program was:" >&5
11007  cat conftest.$ac_ext >&5
11008  ac_cv_header_X11_xpm_h=no
11009fi
11010rm -f conftest.err conftest.$ac_ext
11011fi
11012echo "$as_me:11012: result: $ac_cv_header_X11_xpm_h" >&5
11013echo "${ECHO_T}$ac_cv_header_X11_xpm_h" >&6
11014if test $ac_cv_header_X11_xpm_h = yes; then
11015
11016	echo "$as_me:11016: checking for XpmCreatePixmapFromData in -lXpm" >&5
11017echo $ECHO_N "checking for XpmCreatePixmapFromData in -lXpm... $ECHO_C" >&6
11018if test "${ac_cv_lib_Xpm_XpmCreatePixmapFromData+set}" = set; then
11019  echo $ECHO_N "(cached) $ECHO_C" >&6
11020else
11021  ac_check_lib_save_LIBS=$LIBS
11022LIBS="-lXpm -lX11 $X_LIBS $LIBS"
11023cat >conftest.$ac_ext <<_ACEOF
11024#line 11024 "configure"
11025#include "confdefs.h"
11026
11027/* Override any gcc2 internal prototype to avoid an error.  */
11028#ifdef __cplusplus
11029extern "C"
11030#endif
11031/* We use char because int might match the return type of a gcc2
11032   builtin and then its argument prototype would still apply.  */
11033char XpmCreatePixmapFromData ();
11034int
11035main (void)
11036{
11037XpmCreatePixmapFromData ();
11038  ;
11039  return 0;
11040}
11041_ACEOF
11042rm -f conftest.$ac_objext conftest$ac_exeext
11043if { (eval echo "$as_me:11043: \"$ac_link\"") >&5
11044  (eval $ac_link) 2>&5
11045  ac_status=$?
11046  echo "$as_me:11046: \$? = $ac_status" >&5
11047  (exit $ac_status); } &&
11048         { ac_try='test -s conftest$ac_exeext'
11049  { (eval echo "$as_me:11049: \"$ac_try\"") >&5
11050  (eval $ac_try) 2>&5
11051  ac_status=$?
11052  echo "$as_me:11052: \$? = $ac_status" >&5
11053  (exit $ac_status); }; }; then
11054  ac_cv_lib_Xpm_XpmCreatePixmapFromData=yes
11055else
11056  echo "$as_me: failed program was:" >&5
11057cat conftest.$ac_ext >&5
11058ac_cv_lib_Xpm_XpmCreatePixmapFromData=no
11059fi
11060rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11061LIBS=$ac_check_lib_save_LIBS
11062fi
11063echo "$as_me:11063: result: $ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&5
11064echo "${ECHO_T}$ac_cv_lib_Xpm_XpmCreatePixmapFromData" >&6
11065if test $ac_cv_lib_Xpm_XpmCreatePixmapFromData = yes; then
11066
11067cat >>confdefs.h <<\EOF
11068#define HAVE_LIBXPM 1
11069EOF
11070
11071	    ICON_SUFFIX=.xpm
11072	    LIBS="-lXpm $LIBS"
11073else
11074  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
11075fi
11076
11077else
11078  CPPFLAGS="${cf_save_cppflags}" LDFLAGS="${cf_save_ldflags}"
11079fi
11080
11081fi
11082
11083echo "$as_me:11083: checking if you want to use the Xinerama extension" >&5
11084echo $ECHO_N "checking if you want to use the Xinerama extension... $ECHO_C" >&6
11085
11086# Check whether --with-xinerama or --without-xinerama was given.
11087if test "${with_xinerama+set}" = set; then
11088  withval="$with_xinerama"
11089  cf_with_xinerama="$withval"
11090else
11091  cf_with_xinerama=yes
11092fi;
11093echo "$as_me:11093: result: $cf_with_xinerama" >&5
11094echo "${ECHO_T}$cf_with_xinerama" >&6
11095if test "$cf_with_xinerama" = yes; then
11096
11097if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xinerama; then
11098	test -n "$verbose" && echo "	found package xinerama" 1>&6
11099
11100echo "${as_me:-configure}:11100: testing found package xinerama ..." 1>&5
11101
11102	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xinerama 2>/dev/null`"
11103	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xinerama 2>/dev/null`"
11104	test -n "$verbose" && echo "	package xinerama CFLAGS: $cf_pkgconfig_incs" 1>&6
11105
11106echo "${as_me:-configure}:11106: testing package xinerama CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11107
11108	test -n "$verbose" && echo "	package xinerama LIBS: $cf_pkgconfig_libs" 1>&6
11109
11110echo "${as_me:-configure}:11110: testing package xinerama LIBS: $cf_pkgconfig_libs ..." 1>&5
11111
11112cf_fix_cppflags=no
11113cf_new_cflags=
11114cf_new_cppflags=
11115cf_new_extra_cppflags=
11116
11117for cf_add_cflags in $cf_pkgconfig_incs
11118do
11119case $cf_fix_cppflags in
11120(no)
11121	case $cf_add_cflags in
11122	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11123		case $cf_add_cflags in
11124		(-D*)
11125			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11126
11127			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11128				&& test -z "${cf_tst_cflags}" \
11129				&& cf_fix_cppflags=yes
11130
11131			if test $cf_fix_cppflags = yes ; then
11132
11133	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11134	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11135
11136				continue
11137			elif test "${cf_tst_cflags}" = "\"'" ; then
11138
11139	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11140	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11141
11142				continue
11143			fi
11144			;;
11145		esac
11146		case "$CPPFLAGS" in
11147		(*$cf_add_cflags)
11148			;;
11149		(*)
11150			case $cf_add_cflags in
11151			(-D*)
11152				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11153
11154CPPFLAGS=`echo "$CPPFLAGS" | \
11155	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11156		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11157
11158				;;
11159			esac
11160
11161	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11162	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11163
11164			;;
11165		esac
11166		;;
11167	(*)
11168
11169	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11170	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11171
11172		;;
11173	esac
11174	;;
11175(yes)
11176
11177	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11178	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11179
11180	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11181
11182	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11183		&& test -z "${cf_tst_cflags}" \
11184		&& cf_fix_cppflags=no
11185	;;
11186esac
11187done
11188
11189if test -n "$cf_new_cflags" ; then
11190
11191	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11192	CFLAGS="${CFLAGS}$cf_new_cflags"
11193
11194fi
11195
11196if test -n "$cf_new_cppflags" ; then
11197
11198	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11199	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11200
11201fi
11202
11203if test -n "$cf_new_extra_cppflags" ; then
11204
11205	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11206	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11207
11208fi
11209
11210cf_add_libs="$cf_pkgconfig_libs"
11211# Filter out duplicates - this happens with badly-designed ".pc" files...
11212for cf_add_1lib in $LIBS
11213do
11214	for cf_add_2lib in $cf_add_libs
11215	do
11216		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11217		then
11218			cf_add_1lib=
11219			break
11220		fi
11221	done
11222	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11223done
11224LIBS="$cf_add_libs"
11225
11226	cat >>confdefs.h <<\EOF
11227#define HAVE_X11_EXTENSIONS_XINERAMA_H 1
11228EOF
11229
11230else
11231	cf_pkgconfig_incs=
11232	cf_pkgconfig_libs=
11233
11234	echo "$as_me:11234: checking for XineramaQueryScreens in -lXinerama" >&5
11235echo $ECHO_N "checking for XineramaQueryScreens in -lXinerama... $ECHO_C" >&6
11236if test "${ac_cv_lib_Xinerama_XineramaQueryScreens+set}" = set; then
11237  echo $ECHO_N "(cached) $ECHO_C" >&6
11238else
11239  ac_check_lib_save_LIBS=$LIBS
11240LIBS="-lXinerama  $LIBS"
11241cat >conftest.$ac_ext <<_ACEOF
11242#line 11242 "configure"
11243#include "confdefs.h"
11244
11245/* Override any gcc2 internal prototype to avoid an error.  */
11246#ifdef __cplusplus
11247extern "C"
11248#endif
11249/* We use char because int might match the return type of a gcc2
11250   builtin and then its argument prototype would still apply.  */
11251char XineramaQueryScreens ();
11252int
11253main (void)
11254{
11255XineramaQueryScreens ();
11256  ;
11257  return 0;
11258}
11259_ACEOF
11260rm -f conftest.$ac_objext conftest$ac_exeext
11261if { (eval echo "$as_me:11261: \"$ac_link\"") >&5
11262  (eval $ac_link) 2>&5
11263  ac_status=$?
11264  echo "$as_me:11264: \$? = $ac_status" >&5
11265  (exit $ac_status); } &&
11266         { ac_try='test -s conftest$ac_exeext'
11267  { (eval echo "$as_me:11267: \"$ac_try\"") >&5
11268  (eval $ac_try) 2>&5
11269  ac_status=$?
11270  echo "$as_me:11270: \$? = $ac_status" >&5
11271  (exit $ac_status); }; }; then
11272  ac_cv_lib_Xinerama_XineramaQueryScreens=yes
11273else
11274  echo "$as_me: failed program was:" >&5
11275cat conftest.$ac_ext >&5
11276ac_cv_lib_Xinerama_XineramaQueryScreens=no
11277fi
11278rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11279LIBS=$ac_check_lib_save_LIBS
11280fi
11281echo "$as_me:11281: result: $ac_cv_lib_Xinerama_XineramaQueryScreens" >&5
11282echo "${ECHO_T}$ac_cv_lib_Xinerama_XineramaQueryScreens" >&6
11283if test $ac_cv_lib_Xinerama_XineramaQueryScreens = yes; then
11284
11285cf_add_libs="-lXinerama"
11286# Filter out duplicates - this happens with badly-designed ".pc" files...
11287for cf_add_1lib in $LIBS
11288do
11289	for cf_add_2lib in $cf_add_libs
11290	do
11291		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11292		then
11293			cf_add_1lib=
11294			break
11295		fi
11296	done
11297	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11298done
11299LIBS="$cf_add_libs"
11300
11301for ac_header in \
11302			X11/extensions/Xinerama.h \
11303
11304do
11305as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11306echo "$as_me:11306: checking for $ac_header" >&5
11307echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11308if eval "test \"\${$as_ac_Header+set}\" = set"; then
11309  echo $ECHO_N "(cached) $ECHO_C" >&6
11310else
11311  cat >conftest.$ac_ext <<_ACEOF
11312#line 11312 "configure"
11313#include "confdefs.h"
11314#include <$ac_header>
11315_ACEOF
11316if { (eval echo "$as_me:11316: \"$ac_cpp conftest.$ac_ext\"") >&5
11317  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11318  ac_status=$?
11319  egrep -v '^ *\+' conftest.er1 >conftest.err
11320  rm -f conftest.er1
11321  cat conftest.err >&5
11322  echo "$as_me:11322: \$? = $ac_status" >&5
11323  (exit $ac_status); } >/dev/null; then
11324  if test -s conftest.err; then
11325    ac_cpp_err=$ac_c_preproc_warn_flag
11326  else
11327    ac_cpp_err=
11328  fi
11329else
11330  ac_cpp_err=yes
11331fi
11332if test -z "$ac_cpp_err"; then
11333  eval "$as_ac_Header=yes"
11334else
11335  echo "$as_me: failed program was:" >&5
11336  cat conftest.$ac_ext >&5
11337  eval "$as_ac_Header=no"
11338fi
11339rm -f conftest.err conftest.$ac_ext
11340fi
11341echo "$as_me:11341: result: `eval echo '${'$as_ac_Header'}'`" >&5
11342echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11343if test `eval echo '${'$as_ac_Header'}'` = yes; then
11344  cat >>confdefs.h <<EOF
11345#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11346EOF
11347
11348fi
11349done
11350
11351fi
11352
11353fi
11354
11355fi
11356
11357cf_x_athena=${cf_x_athena:-Xaw}
11358
11359echo "$as_me:11359: checking if you want to link with Xaw 3d library" >&5
11360echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
11361withval=
11362
11363# Check whether --with-Xaw3d or --without-Xaw3d was given.
11364if test "${with_Xaw3d+set}" = set; then
11365  withval="$with_Xaw3d"
11366
11367fi;
11368if test "$withval" = yes ; then
11369	cf_x_athena=Xaw3d
11370	echo "$as_me:11370: result: yes" >&5
11371echo "${ECHO_T}yes" >&6
11372else
11373	echo "$as_me:11373: result: no" >&5
11374echo "${ECHO_T}no" >&6
11375fi
11376
11377echo "$as_me:11377: checking if you want to link with Xaw 3d xft library" >&5
11378echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
11379withval=
11380
11381# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
11382if test "${with_Xaw3dxft+set}" = set; then
11383  withval="$with_Xaw3dxft"
11384
11385fi;
11386if test "$withval" = yes ; then
11387	cf_x_athena=Xaw3dxft
11388	echo "$as_me:11388: result: yes" >&5
11389echo "${ECHO_T}yes" >&6
11390else
11391	echo "$as_me:11391: result: no" >&5
11392echo "${ECHO_T}no" >&6
11393fi
11394
11395echo "$as_me:11395: checking if you want to link with neXT Athena library" >&5
11396echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
11397withval=
11398
11399# Check whether --with-neXtaw or --without-neXtaw was given.
11400if test "${with_neXtaw+set}" = set; then
11401  withval="$with_neXtaw"
11402
11403fi;
11404if test "$withval" = yes ; then
11405	cf_x_athena=neXtaw
11406	echo "$as_me:11406: result: yes" >&5
11407echo "${ECHO_T}yes" >&6
11408else
11409	echo "$as_me:11409: result: no" >&5
11410echo "${ECHO_T}no" >&6
11411fi
11412
11413echo "$as_me:11413: checking if you want to link with Athena-Plus library" >&5
11414echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
11415withval=
11416
11417# Check whether --with-XawPlus or --without-XawPlus was given.
11418if test "${with_XawPlus+set}" = set; then
11419  withval="$with_XawPlus"
11420
11421fi;
11422if test "$withval" = yes ; then
11423	cf_x_athena=XawPlus
11424	echo "$as_me:11424: result: yes" >&5
11425echo "${ECHO_T}yes" >&6
11426else
11427	echo "$as_me:11427: result: no" >&5
11428echo "${ECHO_T}no" >&6
11429fi
11430
11431cf_x_athena_lib=""
11432
11433if test "$PKG_CONFIG" != none ; then
11434	cf_athena_list=
11435	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
11436	for cf_athena_pkg in \
11437		$cf_athena_list \
11438		${cf_x_athena} \
11439		${cf_x_athena}-devel \
11440		lib${cf_x_athena} \
11441		lib${cf_x_athena}-devel
11442	do
11443
11444if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
11445	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
11446
11447echo "${as_me:-configure}:11447: testing found package $cf_athena_pkg ..." 1>&5
11448
11449	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
11450	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
11451	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
11452
11453echo "${as_me:-configure}:11453: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11454
11455	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
11456
11457echo "${as_me:-configure}:11457: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
11458
11459cf_fix_cppflags=no
11460cf_new_cflags=
11461cf_new_cppflags=
11462cf_new_extra_cppflags=
11463
11464for cf_add_cflags in $cf_pkgconfig_incs
11465do
11466case $cf_fix_cppflags in
11467(no)
11468	case $cf_add_cflags in
11469	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11470		case $cf_add_cflags in
11471		(-D*)
11472			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11473
11474			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11475				&& test -z "${cf_tst_cflags}" \
11476				&& cf_fix_cppflags=yes
11477
11478			if test $cf_fix_cppflags = yes ; then
11479
11480	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11481	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11482
11483				continue
11484			elif test "${cf_tst_cflags}" = "\"'" ; then
11485
11486	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11487	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11488
11489				continue
11490			fi
11491			;;
11492		esac
11493		case "$CPPFLAGS" in
11494		(*$cf_add_cflags)
11495			;;
11496		(*)
11497			case $cf_add_cflags in
11498			(-D*)
11499				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11500
11501CPPFLAGS=`echo "$CPPFLAGS" | \
11502	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11503		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11504
11505				;;
11506			esac
11507
11508	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11509	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11510
11511			;;
11512		esac
11513		;;
11514	(*)
11515
11516	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11517	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11518
11519		;;
11520	esac
11521	;;
11522(yes)
11523
11524	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
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	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11539	CFLAGS="${CFLAGS}$cf_new_cflags"
11540
11541fi
11542
11543if test -n "$cf_new_cppflags" ; then
11544
11545	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11546	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11547
11548fi
11549
11550if test -n "$cf_new_extra_cppflags" ; then
11551
11552	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11553	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11554
11555fi
11556
11557cf_add_libs="$cf_pkgconfig_libs"
11558# Filter out duplicates - this happens with badly-designed ".pc" files...
11559for cf_add_1lib in $LIBS
11560do
11561	for cf_add_2lib in $cf_add_libs
11562	do
11563		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11564		then
11565			cf_add_1lib=
11566			break
11567		fi
11568	done
11569	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11570done
11571LIBS="$cf_add_libs"
11572
11573			cf_x_athena_lib="$cf_pkgconfig_libs"
11574
11575cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11576
11577			cat >>confdefs.h <<EOF
11578#define $cf_x_athena_LIBS 1
11579EOF
11580
11581	for cf_trim_lib in Xmu Xt X11
11582	do
11583		case "$LIBS" in
11584		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11585			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11586			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
11587
11588echo "${as_me:-configure}:11588: testing ..trimmed $LIBS ..." 1>&5
11589
11590			;;
11591		esac
11592	done
11593
11594echo "$as_me:11594: checking for usable $cf_x_athena/Xmu package" >&5
11595echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
11596if test "${cf_cv_xaw_compat+set}" = set; then
11597  echo $ECHO_N "(cached) $ECHO_C" >&6
11598else
11599
11600cat >conftest.$ac_ext <<_ACEOF
11601#line 11601 "configure"
11602#include "confdefs.h"
11603
11604#include <X11/Xmu/CharSet.h>
11605
11606int
11607main (void)
11608{
11609
11610int check = XmuCompareISOLatin1("big", "small")
11611
11612  ;
11613  return 0;
11614}
11615_ACEOF
11616rm -f conftest.$ac_objext conftest$ac_exeext
11617if { (eval echo "$as_me:11617: \"$ac_link\"") >&5
11618  (eval $ac_link) 2>&5
11619  ac_status=$?
11620  echo "$as_me:11620: \$? = $ac_status" >&5
11621  (exit $ac_status); } &&
11622         { ac_try='test -s conftest$ac_exeext'
11623  { (eval echo "$as_me:11623: \"$ac_try\"") >&5
11624  (eval $ac_try) 2>&5
11625  ac_status=$?
11626  echo "$as_me:11626: \$? = $ac_status" >&5
11627  (exit $ac_status); }; }; then
11628  cf_cv_xaw_compat=yes
11629else
11630  echo "$as_me: failed program was:" >&5
11631cat conftest.$ac_ext >&5
11632cf_cv_xaw_compat=no
11633fi
11634rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11635fi
11636echo "$as_me:11636: result: $cf_cv_xaw_compat" >&5
11637echo "${ECHO_T}$cf_cv_xaw_compat" >&6
11638
11639			if test "$cf_cv_xaw_compat" = no
11640			then
11641				# workaround for broken ".pc" files...
11642				case "$cf_x_athena_lib" in
11643				(*-lXmu*)
11644					;;
11645				(*)
11646					test -n "$verbose" && echo "	work around broken package" 1>&6
11647
11648echo "${as_me:-configure}:11648: testing work around broken package ..." 1>&5
11649
11650					cf_save_xmu="$LIBS"
11651					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
11652
11653if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
11654	test -n "$verbose" && echo "	found package xmu" 1>&6
11655
11656echo "${as_me:-configure}:11656: testing found package xmu ..." 1>&5
11657
11658	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
11659	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
11660	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
11661
11662echo "${as_me:-configure}:11662: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11663
11664	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
11665
11666echo "${as_me:-configure}:11666: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
11667
11668cf_fix_cppflags=no
11669cf_new_cflags=
11670cf_new_cppflags=
11671cf_new_extra_cppflags=
11672
11673for cf_add_cflags in $cf_pkgconfig_incs
11674do
11675case $cf_fix_cppflags in
11676(no)
11677	case $cf_add_cflags in
11678	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11679		case $cf_add_cflags in
11680		(-D*)
11681			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11682
11683			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11684				&& test -z "${cf_tst_cflags}" \
11685				&& cf_fix_cppflags=yes
11686
11687			if test $cf_fix_cppflags = yes ; then
11688
11689	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11690	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11691
11692				continue
11693			elif test "${cf_tst_cflags}" = "\"'" ; then
11694
11695	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11696	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11697
11698				continue
11699			fi
11700			;;
11701		esac
11702		case "$CPPFLAGS" in
11703		(*$cf_add_cflags)
11704			;;
11705		(*)
11706			case $cf_add_cflags in
11707			(-D*)
11708				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11709
11710CPPFLAGS=`echo "$CPPFLAGS" | \
11711	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11712		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11713
11714				;;
11715			esac
11716
11717	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11718	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11719
11720			;;
11721		esac
11722		;;
11723	(*)
11724
11725	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11726	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11727
11728		;;
11729	esac
11730	;;
11731(yes)
11732
11733	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11734	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11735
11736	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11737
11738	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11739		&& test -z "${cf_tst_cflags}" \
11740		&& cf_fix_cppflags=no
11741	;;
11742esac
11743done
11744
11745if test -n "$cf_new_cflags" ; then
11746
11747	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11748	CFLAGS="${CFLAGS}$cf_new_cflags"
11749
11750fi
11751
11752if test -n "$cf_new_cppflags" ; then
11753
11754	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11755	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11756
11757fi
11758
11759if test -n "$cf_new_extra_cppflags" ; then
11760
11761	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11762	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11763
11764fi
11765
11766cf_add_libs="$cf_pkgconfig_libs"
11767# Filter out duplicates - this happens with badly-designed ".pc" files...
11768for cf_add_1lib in $LIBS
11769do
11770	for cf_add_2lib in $cf_add_libs
11771	do
11772		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11773		then
11774			cf_add_1lib=
11775			break
11776		fi
11777	done
11778	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11779done
11780LIBS="$cf_add_libs"
11781
11782							LIBS="$cf_save_xmu"
11783
11784test -n "$verbose" && echo "	...before $LIBS" 1>&6
11785
11786echo "${as_me:-configure}:11786: testing ...before $LIBS ..." 1>&5
11787
11788LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
11789test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11790
11791echo "${as_me:-configure}:11791: testing ...after  $LIBS ..." 1>&5
11792
11793else
11794	cf_pkgconfig_incs=
11795	cf_pkgconfig_libs=
11796
11797test -n "$verbose" && echo "	...before $LIBS" 1>&6
11798
11799echo "${as_me:-configure}:11799: testing ...before $LIBS ..." 1>&5
11800
11801LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
11802test -n "$verbose" && echo "	...after  $LIBS" 1>&6
11803
11804echo "${as_me:-configure}:11804: testing ...after  $LIBS ..." 1>&5
11805
11806fi
11807
11808	for cf_trim_lib in Xmu Xt X11
11809	do
11810		case "$LIBS" in
11811		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
11812			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
11813			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
11814
11815echo "${as_me:-configure}:11815: testing ..trimmed $LIBS ..." 1>&5
11816
11817			;;
11818		esac
11819	done
11820
11821					;;
11822				esac
11823			fi
11824
11825			break
11826else
11827	cf_pkgconfig_incs=
11828	cf_pkgconfig_libs=
11829	:
11830fi
11831
11832	done
11833fi
11834
11835if test -z "$cf_x_athena_lib" ; then
11836
11837if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
11838	test -n "$verbose" && echo "	found package Xext" 1>&6
11839
11840echo "${as_me:-configure}:11840: testing found package Xext ..." 1>&5
11841
11842	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
11843	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
11844	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
11845
11846echo "${as_me:-configure}:11846: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
11847
11848	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
11849
11850echo "${as_me:-configure}:11850: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
11851
11852cf_fix_cppflags=no
11853cf_new_cflags=
11854cf_new_cppflags=
11855cf_new_extra_cppflags=
11856
11857for cf_add_cflags in $cf_pkgconfig_incs
11858do
11859case $cf_fix_cppflags in
11860(no)
11861	case $cf_add_cflags in
11862	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11863		case $cf_add_cflags in
11864		(-D*)
11865			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11866
11867			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11868				&& test -z "${cf_tst_cflags}" \
11869				&& cf_fix_cppflags=yes
11870
11871			if test $cf_fix_cppflags = yes ; then
11872
11873	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11874	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11875
11876				continue
11877			elif test "${cf_tst_cflags}" = "\"'" ; then
11878
11879	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11880	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11881
11882				continue
11883			fi
11884			;;
11885		esac
11886		case "$CPPFLAGS" in
11887		(*$cf_add_cflags)
11888			;;
11889		(*)
11890			case $cf_add_cflags in
11891			(-D*)
11892				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11893
11894CPPFLAGS=`echo "$CPPFLAGS" | \
11895	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11896		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11897
11898				;;
11899			esac
11900
11901	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11902	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11903
11904			;;
11905		esac
11906		;;
11907	(*)
11908
11909	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11910	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11911
11912		;;
11913	esac
11914	;;
11915(yes)
11916
11917	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11918	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11919
11920	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11921
11922	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11923		&& test -z "${cf_tst_cflags}" \
11924		&& cf_fix_cppflags=no
11925	;;
11926esac
11927done
11928
11929if test -n "$cf_new_cflags" ; then
11930
11931	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11932	CFLAGS="${CFLAGS}$cf_new_cflags"
11933
11934fi
11935
11936if test -n "$cf_new_cppflags" ; then
11937
11938	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11939	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11940
11941fi
11942
11943if test -n "$cf_new_extra_cppflags" ; then
11944
11945	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11946	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11947
11948fi
11949
11950cf_add_libs="$cf_pkgconfig_libs"
11951# Filter out duplicates - this happens with badly-designed ".pc" files...
11952for cf_add_1lib in $LIBS
11953do
11954	for cf_add_2lib in $cf_add_libs
11955	do
11956		if test "x$cf_add_1lib" = "x$cf_add_2lib"
11957		then
11958			cf_add_1lib=
11959			break
11960		fi
11961	done
11962	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
11963done
11964LIBS="$cf_add_libs"
11965
11966	:
11967else
11968	cf_pkgconfig_incs=
11969	cf_pkgconfig_libs=
11970
11971	echo "$as_me:11971: checking for XextCreateExtension in -lXext" >&5
11972echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
11973if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
11974  echo $ECHO_N "(cached) $ECHO_C" >&6
11975else
11976  ac_check_lib_save_LIBS=$LIBS
11977LIBS="-lXext  $LIBS"
11978cat >conftest.$ac_ext <<_ACEOF
11979#line 11979 "configure"
11980#include "confdefs.h"
11981
11982/* Override any gcc2 internal prototype to avoid an error.  */
11983#ifdef __cplusplus
11984extern "C"
11985#endif
11986/* We use char because int might match the return type of a gcc2
11987   builtin and then its argument prototype would still apply.  */
11988char XextCreateExtension ();
11989int
11990main (void)
11991{
11992XextCreateExtension ();
11993  ;
11994  return 0;
11995}
11996_ACEOF
11997rm -f conftest.$ac_objext conftest$ac_exeext
11998if { (eval echo "$as_me:11998: \"$ac_link\"") >&5
11999  (eval $ac_link) 2>&5
12000  ac_status=$?
12001  echo "$as_me:12001: \$? = $ac_status" >&5
12002  (exit $ac_status); } &&
12003         { ac_try='test -s conftest$ac_exeext'
12004  { (eval echo "$as_me:12004: \"$ac_try\"") >&5
12005  (eval $ac_try) 2>&5
12006  ac_status=$?
12007  echo "$as_me:12007: \$? = $ac_status" >&5
12008  (exit $ac_status); }; }; then
12009  ac_cv_lib_Xext_XextCreateExtension=yes
12010else
12011  echo "$as_me: failed program was:" >&5
12012cat conftest.$ac_ext >&5
12013ac_cv_lib_Xext_XextCreateExtension=no
12014fi
12015rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12016LIBS=$ac_check_lib_save_LIBS
12017fi
12018echo "$as_me:12018: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
12019echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
12020if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
12021
12022cf_add_libs="-lXext"
12023# Filter out duplicates - this happens with badly-designed ".pc" files...
12024for cf_add_1lib in $LIBS
12025do
12026	for cf_add_2lib in $cf_add_libs
12027	do
12028		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12029		then
12030			cf_add_1lib=
12031			break
12032		fi
12033	done
12034	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12035done
12036LIBS="$cf_add_libs"
12037
12038fi
12039
12040fi
12041
12042# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new), and (and
12043# in some cases has installed dummy files in the former, other cases replaced
12044# it with a link to the new location).  This complicates the configure script.
12045# Check for that pitfall, and recover using pkg-config
12046#
12047# If none of these are set, the configuration is almost certainly broken.
12048if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
12049then
12050
12051if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12052	test -n "$verbose" && echo "	found package x11" 1>&6
12053
12054echo "${as_me:-configure}:12054: testing found package x11 ..." 1>&5
12055
12056	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12057	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
12058	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12059
12060echo "${as_me:-configure}:12060: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12061
12062	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12063
12064echo "${as_me:-configure}:12064: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12065
12066cf_fix_cppflags=no
12067cf_new_cflags=
12068cf_new_cppflags=
12069cf_new_extra_cppflags=
12070
12071for cf_add_cflags in $cf_pkgconfig_incs
12072do
12073case $cf_fix_cppflags in
12074(no)
12075	case $cf_add_cflags in
12076	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12077		case $cf_add_cflags in
12078		(-D*)
12079			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12080
12081			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12082				&& test -z "${cf_tst_cflags}" \
12083				&& cf_fix_cppflags=yes
12084
12085			if test $cf_fix_cppflags = yes ; then
12086
12087	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12088	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12089
12090				continue
12091			elif test "${cf_tst_cflags}" = "\"'" ; then
12092
12093	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12094	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12095
12096				continue
12097			fi
12098			;;
12099		esac
12100		case "$CPPFLAGS" in
12101		(*$cf_add_cflags)
12102			;;
12103		(*)
12104			case $cf_add_cflags in
12105			(-D*)
12106				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12107
12108CPPFLAGS=`echo "$CPPFLAGS" | \
12109	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12110		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12111
12112				;;
12113			esac
12114
12115	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12116	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12117
12118			;;
12119		esac
12120		;;
12121	(*)
12122
12123	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12124	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12125
12126		;;
12127	esac
12128	;;
12129(yes)
12130
12131	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12132	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12133
12134	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12135
12136	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12137		&& test -z "${cf_tst_cflags}" \
12138		&& cf_fix_cppflags=no
12139	;;
12140esac
12141done
12142
12143if test -n "$cf_new_cflags" ; then
12144
12145	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12146	CFLAGS="${CFLAGS}$cf_new_cflags"
12147
12148fi
12149
12150if test -n "$cf_new_cppflags" ; then
12151
12152	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12153	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12154
12155fi
12156
12157if test -n "$cf_new_extra_cppflags" ; then
12158
12159	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12160	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12161
12162fi
12163
12164cf_add_libs="$cf_pkgconfig_libs"
12165# Filter out duplicates - this happens with badly-designed ".pc" files...
12166for cf_add_1lib in $LIBS
12167do
12168	for cf_add_2lib in $cf_add_libs
12169	do
12170		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12171		then
12172			cf_add_1lib=
12173			break
12174		fi
12175	done
12176	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12177done
12178LIBS="$cf_add_libs"
12179
12180	:
12181else
12182	cf_pkgconfig_incs=
12183	cf_pkgconfig_libs=
12184	{ echo "$as_me:12184: WARNING: unable to find X11 library" >&5
12185echo "$as_me: WARNING: unable to find X11 library" >&2;}
12186fi
12187
12188if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12189	test -n "$verbose" && echo "	found package ice" 1>&6
12190
12191echo "${as_me:-configure}:12191: testing found package ice ..." 1>&5
12192
12193	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
12194	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
12195	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
12196
12197echo "${as_me:-configure}:12197: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12198
12199	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
12200
12201echo "${as_me:-configure}:12201: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
12202
12203cf_fix_cppflags=no
12204cf_new_cflags=
12205cf_new_cppflags=
12206cf_new_extra_cppflags=
12207
12208for cf_add_cflags in $cf_pkgconfig_incs
12209do
12210case $cf_fix_cppflags in
12211(no)
12212	case $cf_add_cflags in
12213	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12214		case $cf_add_cflags in
12215		(-D*)
12216			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12217
12218			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12219				&& test -z "${cf_tst_cflags}" \
12220				&& cf_fix_cppflags=yes
12221
12222			if test $cf_fix_cppflags = yes ; then
12223
12224	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12225	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12226
12227				continue
12228			elif test "${cf_tst_cflags}" = "\"'" ; then
12229
12230	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12231	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12232
12233				continue
12234			fi
12235			;;
12236		esac
12237		case "$CPPFLAGS" in
12238		(*$cf_add_cflags)
12239			;;
12240		(*)
12241			case $cf_add_cflags in
12242			(-D*)
12243				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12244
12245CPPFLAGS=`echo "$CPPFLAGS" | \
12246	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12247		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12248
12249				;;
12250			esac
12251
12252	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12253	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12254
12255			;;
12256		esac
12257		;;
12258	(*)
12259
12260	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12261	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12262
12263		;;
12264	esac
12265	;;
12266(yes)
12267
12268	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12269	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12270
12271	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12272
12273	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12274		&& test -z "${cf_tst_cflags}" \
12275		&& cf_fix_cppflags=no
12276	;;
12277esac
12278done
12279
12280if test -n "$cf_new_cflags" ; then
12281
12282	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12283	CFLAGS="${CFLAGS}$cf_new_cflags"
12284
12285fi
12286
12287if test -n "$cf_new_cppflags" ; then
12288
12289	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12290	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12291
12292fi
12293
12294if test -n "$cf_new_extra_cppflags" ; then
12295
12296	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12297	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12298
12299fi
12300
12301cf_add_libs="$cf_pkgconfig_libs"
12302# Filter out duplicates - this happens with badly-designed ".pc" files...
12303for cf_add_1lib in $LIBS
12304do
12305	for cf_add_2lib in $cf_add_libs
12306	do
12307		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12308		then
12309			cf_add_1lib=
12310			break
12311		fi
12312	done
12313	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12314done
12315LIBS="$cf_add_libs"
12316
12317	:
12318else
12319	cf_pkgconfig_incs=
12320	cf_pkgconfig_libs=
12321	{ echo "$as_me:12321: WARNING: unable to find ICE library" >&5
12322echo "$as_me: WARNING: unable to find ICE library" >&2;}
12323fi
12324
12325if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
12326	test -n "$verbose" && echo "	found package sm" 1>&6
12327
12328echo "${as_me:-configure}:12328: testing found package sm ..." 1>&5
12329
12330	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
12331	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
12332	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
12333
12334echo "${as_me:-configure}:12334: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12335
12336	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
12337
12338echo "${as_me:-configure}:12338: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
12339
12340cf_fix_cppflags=no
12341cf_new_cflags=
12342cf_new_cppflags=
12343cf_new_extra_cppflags=
12344
12345for cf_add_cflags in $cf_pkgconfig_incs
12346do
12347case $cf_fix_cppflags in
12348(no)
12349	case $cf_add_cflags in
12350	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12351		case $cf_add_cflags in
12352		(-D*)
12353			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12354
12355			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12356				&& test -z "${cf_tst_cflags}" \
12357				&& cf_fix_cppflags=yes
12358
12359			if test $cf_fix_cppflags = yes ; then
12360
12361	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12362	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12363
12364				continue
12365			elif test "${cf_tst_cflags}" = "\"'" ; then
12366
12367	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12368	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12369
12370				continue
12371			fi
12372			;;
12373		esac
12374		case "$CPPFLAGS" in
12375		(*$cf_add_cflags)
12376			;;
12377		(*)
12378			case $cf_add_cflags in
12379			(-D*)
12380				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12381
12382CPPFLAGS=`echo "$CPPFLAGS" | \
12383	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12384		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12385
12386				;;
12387			esac
12388
12389	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12390	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12391
12392			;;
12393		esac
12394		;;
12395	(*)
12396
12397	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12398	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12399
12400		;;
12401	esac
12402	;;
12403(yes)
12404
12405	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12406	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12407
12408	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12409
12410	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12411		&& test -z "${cf_tst_cflags}" \
12412		&& cf_fix_cppflags=no
12413	;;
12414esac
12415done
12416
12417if test -n "$cf_new_cflags" ; then
12418
12419	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12420	CFLAGS="${CFLAGS}$cf_new_cflags"
12421
12422fi
12423
12424if test -n "$cf_new_cppflags" ; then
12425
12426	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12427	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12428
12429fi
12430
12431if test -n "$cf_new_extra_cppflags" ; then
12432
12433	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12434	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12435
12436fi
12437
12438cf_add_libs="$cf_pkgconfig_libs"
12439# Filter out duplicates - this happens with badly-designed ".pc" files...
12440for cf_add_1lib in $LIBS
12441do
12442	for cf_add_2lib in $cf_add_libs
12443	do
12444		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12445		then
12446			cf_add_1lib=
12447			break
12448		fi
12449	done
12450	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12451done
12452LIBS="$cf_add_libs"
12453
12454	:
12455else
12456	cf_pkgconfig_incs=
12457	cf_pkgconfig_libs=
12458	{ echo "$as_me:12458: WARNING: unable to find SM library" >&5
12459echo "$as_me: WARNING: unable to find SM library" >&2;}
12460fi
12461
12462if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12463	test -n "$verbose" && echo "	found package xt" 1>&6
12464
12465echo "${as_me:-configure}:12465: testing found package xt ..." 1>&5
12466
12467	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12468	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
12469	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12470
12471echo "${as_me:-configure}:12471: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12472
12473	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
12474
12475echo "${as_me:-configure}:12475: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12476
12477cf_fix_cppflags=no
12478cf_new_cflags=
12479cf_new_cppflags=
12480cf_new_extra_cppflags=
12481
12482for cf_add_cflags in $cf_pkgconfig_incs
12483do
12484case $cf_fix_cppflags in
12485(no)
12486	case $cf_add_cflags in
12487	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12488		case $cf_add_cflags in
12489		(-D*)
12490			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12491
12492			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12493				&& test -z "${cf_tst_cflags}" \
12494				&& cf_fix_cppflags=yes
12495
12496			if test $cf_fix_cppflags = yes ; then
12497
12498	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12499	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12500
12501				continue
12502			elif test "${cf_tst_cflags}" = "\"'" ; then
12503
12504	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12505	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12506
12507				continue
12508			fi
12509			;;
12510		esac
12511		case "$CPPFLAGS" in
12512		(*$cf_add_cflags)
12513			;;
12514		(*)
12515			case $cf_add_cflags in
12516			(-D*)
12517				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12518
12519CPPFLAGS=`echo "$CPPFLAGS" | \
12520	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12521		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12522
12523				;;
12524			esac
12525
12526	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12527	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12528
12529			;;
12530		esac
12531		;;
12532	(*)
12533
12534	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12535	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12536
12537		;;
12538	esac
12539	;;
12540(yes)
12541
12542	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12543	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12544
12545	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12546
12547	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12548		&& test -z "${cf_tst_cflags}" \
12549		&& cf_fix_cppflags=no
12550	;;
12551esac
12552done
12553
12554if test -n "$cf_new_cflags" ; then
12555
12556	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12557	CFLAGS="${CFLAGS}$cf_new_cflags"
12558
12559fi
12560
12561if test -n "$cf_new_cppflags" ; then
12562
12563	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12564	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12565
12566fi
12567
12568if test -n "$cf_new_extra_cppflags" ; then
12569
12570	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12571	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12572
12573fi
12574
12575cf_add_libs="$cf_pkgconfig_libs"
12576# Filter out duplicates - this happens with badly-designed ".pc" files...
12577for cf_add_1lib in $LIBS
12578do
12579	for cf_add_2lib in $cf_add_libs
12580	do
12581		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12582		then
12583			cf_add_1lib=
12584			break
12585		fi
12586	done
12587	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12588done
12589LIBS="$cf_add_libs"
12590
12591	:
12592else
12593	cf_pkgconfig_incs=
12594	cf_pkgconfig_libs=
12595	{ echo "$as_me:12595: WARNING: unable to find Xt library" >&5
12596echo "$as_me: WARNING: unable to find Xt library" >&2;}
12597fi
12598
12599fi
12600
12601cf_have_X_LIBS=no
12602
12603if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
12604	test -n "$verbose" && echo "	found package xt" 1>&6
12605
12606echo "${as_me:-configure}:12606: testing found package xt ..." 1>&5
12607
12608	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
12609	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
12610	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
12611
12612echo "${as_me:-configure}:12612: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12613
12614	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
12615
12616echo "${as_me:-configure}:12616: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
12617
12618cf_fix_cppflags=no
12619cf_new_cflags=
12620cf_new_cppflags=
12621cf_new_extra_cppflags=
12622
12623for cf_add_cflags in $cf_pkgconfig_incs
12624do
12625case $cf_fix_cppflags in
12626(no)
12627	case $cf_add_cflags in
12628	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12629		case $cf_add_cflags in
12630		(-D*)
12631			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12632
12633			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12634				&& test -z "${cf_tst_cflags}" \
12635				&& cf_fix_cppflags=yes
12636
12637			if test $cf_fix_cppflags = yes ; then
12638
12639	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12640	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12641
12642				continue
12643			elif test "${cf_tst_cflags}" = "\"'" ; then
12644
12645	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12646	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12647
12648				continue
12649			fi
12650			;;
12651		esac
12652		case "$CPPFLAGS" in
12653		(*$cf_add_cflags)
12654			;;
12655		(*)
12656			case $cf_add_cflags in
12657			(-D*)
12658				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12659
12660CPPFLAGS=`echo "$CPPFLAGS" | \
12661	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12662		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12663
12664				;;
12665			esac
12666
12667	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12668	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12669
12670			;;
12671		esac
12672		;;
12673	(*)
12674
12675	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12676	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12677
12678		;;
12679	esac
12680	;;
12681(yes)
12682
12683	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12684	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12685
12686	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12687
12688	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12689		&& test -z "${cf_tst_cflags}" \
12690		&& cf_fix_cppflags=no
12691	;;
12692esac
12693done
12694
12695if test -n "$cf_new_cflags" ; then
12696
12697	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12698	CFLAGS="${CFLAGS}$cf_new_cflags"
12699
12700fi
12701
12702if test -n "$cf_new_cppflags" ; then
12703
12704	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12705	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12706
12707fi
12708
12709if test -n "$cf_new_extra_cppflags" ; then
12710
12711	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12712	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12713
12714fi
12715
12716cf_add_libs="$cf_pkgconfig_libs"
12717# Filter out duplicates - this happens with badly-designed ".pc" files...
12718for cf_add_1lib in $LIBS
12719do
12720	for cf_add_2lib in $cf_add_libs
12721	do
12722		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12723		then
12724			cf_add_1lib=
12725			break
12726		fi
12727	done
12728	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12729done
12730LIBS="$cf_add_libs"
12731
12732	case "x$LIBS" in
12733	(*-lX11*)
12734		;;
12735	(*)
12736# we have an "xt" package, but it may omit Xt's dependency on X11
12737echo "$as_me:12737: checking for usable X dependency" >&5
12738echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
12739if test "${cf_cv_xt_x11_compat+set}" = set; then
12740  echo $ECHO_N "(cached) $ECHO_C" >&6
12741else
12742
12743cat >conftest.$ac_ext <<_ACEOF
12744#line 12744 "configure"
12745#include "confdefs.h"
12746
12747#include <X11/Xlib.h>
12748
12749int
12750main (void)
12751{
12752
12753	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
12754	int rc2 = XClearWindow((Display*) 0, (Window) 0);
12755	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
12756	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
12757
12758  ;
12759  return 0;
12760}
12761_ACEOF
12762rm -f conftest.$ac_objext conftest$ac_exeext
12763if { (eval echo "$as_me:12763: \"$ac_link\"") >&5
12764  (eval $ac_link) 2>&5
12765  ac_status=$?
12766  echo "$as_me:12766: \$? = $ac_status" >&5
12767  (exit $ac_status); } &&
12768         { ac_try='test -s conftest$ac_exeext'
12769  { (eval echo "$as_me:12769: \"$ac_try\"") >&5
12770  (eval $ac_try) 2>&5
12771  ac_status=$?
12772  echo "$as_me:12772: \$? = $ac_status" >&5
12773  (exit $ac_status); }; }; then
12774  cf_cv_xt_x11_compat=yes
12775else
12776  echo "$as_me: failed program was:" >&5
12777cat conftest.$ac_ext >&5
12778cf_cv_xt_x11_compat=no
12779fi
12780rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12781fi
12782echo "$as_me:12782: result: $cf_cv_xt_x11_compat" >&5
12783echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
12784		if test "$cf_cv_xt_x11_compat" = no
12785		then
12786			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
12787
12788echo "${as_me:-configure}:12788: testing work around broken X11 dependency ..." 1>&5
12789
12790			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
12791
12792if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
12793	test -n "$verbose" && echo "	found package x11" 1>&6
12794
12795echo "${as_me:-configure}:12795: testing found package x11 ..." 1>&5
12796
12797	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
12798	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
12799	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
12800
12801echo "${as_me:-configure}:12801: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
12802
12803	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
12804
12805echo "${as_me:-configure}:12805: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
12806
12807cf_fix_cppflags=no
12808cf_new_cflags=
12809cf_new_cppflags=
12810cf_new_extra_cppflags=
12811
12812for cf_add_cflags in $cf_pkgconfig_incs
12813do
12814case $cf_fix_cppflags in
12815(no)
12816	case $cf_add_cflags in
12817	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12818		case $cf_add_cflags in
12819		(-D*)
12820			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12821
12822			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12823				&& test -z "${cf_tst_cflags}" \
12824				&& cf_fix_cppflags=yes
12825
12826			if test $cf_fix_cppflags = yes ; then
12827
12828	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12829	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12830
12831				continue
12832			elif test "${cf_tst_cflags}" = "\"'" ; then
12833
12834	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12835	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12836
12837				continue
12838			fi
12839			;;
12840		esac
12841		case "$CPPFLAGS" in
12842		(*$cf_add_cflags)
12843			;;
12844		(*)
12845			case $cf_add_cflags in
12846			(-D*)
12847				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12848
12849CPPFLAGS=`echo "$CPPFLAGS" | \
12850	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12851		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12852
12853				;;
12854			esac
12855
12856	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12857	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12858
12859			;;
12860		esac
12861		;;
12862	(*)
12863
12864	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12865	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12866
12867		;;
12868	esac
12869	;;
12870(yes)
12871
12872	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12873	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12874
12875	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12876
12877	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12878		&& test -z "${cf_tst_cflags}" \
12879		&& cf_fix_cppflags=no
12880	;;
12881esac
12882done
12883
12884if test -n "$cf_new_cflags" ; then
12885
12886	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12887	CFLAGS="${CFLAGS}$cf_new_cflags"
12888
12889fi
12890
12891if test -n "$cf_new_cppflags" ; then
12892
12893	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12894	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12895
12896fi
12897
12898if test -n "$cf_new_extra_cppflags" ; then
12899
12900	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12901	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12902
12903fi
12904
12905cf_add_libs="$cf_pkgconfig_libs"
12906# Filter out duplicates - this happens with badly-designed ".pc" files...
12907for cf_add_1lib in $LIBS
12908do
12909	for cf_add_2lib in $cf_add_libs
12910	do
12911		if test "x$cf_add_1lib" = "x$cf_add_2lib"
12912		then
12913			cf_add_1lib=
12914			break
12915		fi
12916	done
12917	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
12918done
12919LIBS="$cf_add_libs"
12920
12921	:
12922else
12923	cf_pkgconfig_incs=
12924	cf_pkgconfig_libs=
12925
12926test -n "$verbose" && echo "	...before $LIBS" 1>&6
12927
12928echo "${as_me:-configure}:12928: testing ...before $LIBS ..." 1>&5
12929
12930LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
12931test -n "$verbose" && echo "	...after  $LIBS" 1>&6
12932
12933echo "${as_me:-configure}:12933: testing ...after  $LIBS ..." 1>&5
12934
12935fi
12936
12937		fi
12938		;;
12939	esac
12940
12941echo "$as_me:12941: checking for usable X Toolkit package" >&5
12942echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
12943if test "${cf_cv_xt_ice_compat+set}" = set; then
12944  echo $ECHO_N "(cached) $ECHO_C" >&6
12945else
12946
12947cat >conftest.$ac_ext <<_ACEOF
12948#line 12948 "configure"
12949#include "confdefs.h"
12950
12951#include <X11/Shell.h>
12952
12953int
12954main (void)
12955{
12956int num = IceConnectionNumber(0)
12957
12958  ;
12959  return 0;
12960}
12961_ACEOF
12962rm -f conftest.$ac_objext conftest$ac_exeext
12963if { (eval echo "$as_me:12963: \"$ac_link\"") >&5
12964  (eval $ac_link) 2>&5
12965  ac_status=$?
12966  echo "$as_me:12966: \$? = $ac_status" >&5
12967  (exit $ac_status); } &&
12968         { ac_try='test -s conftest$ac_exeext'
12969  { (eval echo "$as_me:12969: \"$ac_try\"") >&5
12970  (eval $ac_try) 2>&5
12971  ac_status=$?
12972  echo "$as_me:12972: \$? = $ac_status" >&5
12973  (exit $ac_status); }; }; then
12974  cf_cv_xt_ice_compat=yes
12975else
12976  echo "$as_me: failed program was:" >&5
12977cat conftest.$ac_ext >&5
12978cf_cv_xt_ice_compat=no
12979fi
12980rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12981fi
12982echo "$as_me:12982: result: $cf_cv_xt_ice_compat" >&5
12983echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
12984
12985	if test "$cf_cv_xt_ice_compat" = no
12986	then
12987		# workaround for broken ".pc" files used for X Toolkit.
12988		case "x$X_PRE_LIBS" in
12989		(*-lICE*)
12990			case "x$LIBS" in
12991			(*-lICE*)
12992				;;
12993			(*)
12994				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
12995
12996echo "${as_me:-configure}:12996: testing work around broken ICE dependency ..." 1>&5
12997
12998if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
12999	test -n "$verbose" && echo "	found package ice" 1>&6
13000
13001echo "${as_me:-configure}:13001: testing found package ice ..." 1>&5
13002
13003	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
13004	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
13005	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
13006
13007echo "${as_me:-configure}:13007: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13008
13009	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
13010
13011echo "${as_me:-configure}:13011: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
13012
13013cf_fix_cppflags=no
13014cf_new_cflags=
13015cf_new_cppflags=
13016cf_new_extra_cppflags=
13017
13018for cf_add_cflags in $cf_pkgconfig_incs
13019do
13020case $cf_fix_cppflags in
13021(no)
13022	case $cf_add_cflags in
13023	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13024		case $cf_add_cflags in
13025		(-D*)
13026			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13027
13028			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13029				&& test -z "${cf_tst_cflags}" \
13030				&& cf_fix_cppflags=yes
13031
13032			if test $cf_fix_cppflags = yes ; then
13033
13034	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13035	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13036
13037				continue
13038			elif test "${cf_tst_cflags}" = "\"'" ; then
13039
13040	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13041	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13042
13043				continue
13044			fi
13045			;;
13046		esac
13047		case "$CPPFLAGS" in
13048		(*$cf_add_cflags)
13049			;;
13050		(*)
13051			case $cf_add_cflags in
13052			(-D*)
13053				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13054
13055CPPFLAGS=`echo "$CPPFLAGS" | \
13056	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13057		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13058
13059				;;
13060			esac
13061
13062	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13063	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13064
13065			;;
13066		esac
13067		;;
13068	(*)
13069
13070	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13071	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13072
13073		;;
13074	esac
13075	;;
13076(yes)
13077
13078	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13079	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13080
13081	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13082
13083	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13084		&& test -z "${cf_tst_cflags}" \
13085		&& cf_fix_cppflags=no
13086	;;
13087esac
13088done
13089
13090if test -n "$cf_new_cflags" ; then
13091
13092	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13093	CFLAGS="${CFLAGS}$cf_new_cflags"
13094
13095fi
13096
13097if test -n "$cf_new_cppflags" ; then
13098
13099	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13100	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13101
13102fi
13103
13104if test -n "$cf_new_extra_cppflags" ; then
13105
13106	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13107	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13108
13109fi
13110
13111cf_add_libs="$cf_pkgconfig_libs"
13112# Filter out duplicates - this happens with badly-designed ".pc" files...
13113for cf_add_1lib in $LIBS
13114do
13115	for cf_add_2lib in $cf_add_libs
13116	do
13117		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13118		then
13119			cf_add_1lib=
13120			break
13121		fi
13122	done
13123	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13124done
13125LIBS="$cf_add_libs"
13126
13127if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
13128	test -n "$verbose" && echo "	found package sm" 1>&6
13129
13130echo "${as_me:-configure}:13130: testing found package sm ..." 1>&5
13131
13132	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
13133	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
13134	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
13135
13136echo "${as_me:-configure}:13136: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
13137
13138	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
13139
13140echo "${as_me:-configure}:13140: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
13141
13142cf_fix_cppflags=no
13143cf_new_cflags=
13144cf_new_cppflags=
13145cf_new_extra_cppflags=
13146
13147for cf_add_cflags in $cf_pkgconfig_incs
13148do
13149case $cf_fix_cppflags in
13150(no)
13151	case $cf_add_cflags in
13152	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13153		case $cf_add_cflags in
13154		(-D*)
13155			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13156
13157			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13158				&& test -z "${cf_tst_cflags}" \
13159				&& cf_fix_cppflags=yes
13160
13161			if test $cf_fix_cppflags = yes ; then
13162
13163	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13164	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13165
13166				continue
13167			elif test "${cf_tst_cflags}" = "\"'" ; then
13168
13169	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13170	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13171
13172				continue
13173			fi
13174			;;
13175		esac
13176		case "$CPPFLAGS" in
13177		(*$cf_add_cflags)
13178			;;
13179		(*)
13180			case $cf_add_cflags in
13181			(-D*)
13182				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13183
13184CPPFLAGS=`echo "$CPPFLAGS" | \
13185	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13186		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13187
13188				;;
13189			esac
13190
13191	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13192	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13193
13194			;;
13195		esac
13196		;;
13197	(*)
13198
13199	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13200	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13201
13202		;;
13203	esac
13204	;;
13205(yes)
13206
13207	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13208	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13209
13210	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13211
13212	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13213		&& test -z "${cf_tst_cflags}" \
13214		&& cf_fix_cppflags=no
13215	;;
13216esac
13217done
13218
13219if test -n "$cf_new_cflags" ; then
13220
13221	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13222	CFLAGS="${CFLAGS}$cf_new_cflags"
13223
13224fi
13225
13226if test -n "$cf_new_cppflags" ; then
13227
13228	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13229	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13230
13231fi
13232
13233if test -n "$cf_new_extra_cppflags" ; then
13234
13235	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13236	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13237
13238fi
13239
13240cf_add_libs="$cf_pkgconfig_libs"
13241# Filter out duplicates - this happens with badly-designed ".pc" files...
13242for cf_add_1lib in $LIBS
13243do
13244	for cf_add_2lib in $cf_add_libs
13245	do
13246		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13247		then
13248			cf_add_1lib=
13249			break
13250		fi
13251	done
13252	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13253done
13254LIBS="$cf_add_libs"
13255
13256	:
13257else
13258	cf_pkgconfig_incs=
13259	cf_pkgconfig_libs=
13260	:
13261fi
13262
13263else
13264	cf_pkgconfig_incs=
13265	cf_pkgconfig_libs=
13266
13267test -n "$verbose" && echo "	...before $LIBS" 1>&6
13268
13269echo "${as_me:-configure}:13269: testing ...before $LIBS ..." 1>&5
13270
13271LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
13272test -n "$verbose" && echo "	...after  $LIBS" 1>&6
13273
13274echo "${as_me:-configure}:13274: testing ...after  $LIBS ..." 1>&5
13275
13276fi
13277
13278				;;
13279			esac
13280			;;
13281		esac
13282	fi
13283
13284	cf_have_X_LIBS=yes
13285
13286else
13287	cf_pkgconfig_incs=
13288	cf_pkgconfig_libs=
13289
13290	LDFLAGS="$X_LIBS $LDFLAGS"
13291
13292test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
13293
13294echo "${as_me:-configure}:13294: testing checking additions to CFLAGS ..." 1>&5
13295
13296cf_check_cflags="$CFLAGS"
13297cf_check_cppflags="$CPPFLAGS"
13298
13299cf_fix_cppflags=no
13300cf_new_cflags=
13301cf_new_cppflags=
13302cf_new_extra_cppflags=
13303
13304for cf_add_cflags in $X_CFLAGS
13305do
13306case $cf_fix_cppflags in
13307(no)
13308	case $cf_add_cflags in
13309	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13310		case $cf_add_cflags in
13311		(-D*)
13312			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13313
13314			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13315				&& test -z "${cf_tst_cflags}" \
13316				&& cf_fix_cppflags=yes
13317
13318			if test $cf_fix_cppflags = yes ; then
13319
13320	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13321	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13322
13323				continue
13324			elif test "${cf_tst_cflags}" = "\"'" ; then
13325
13326	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13327	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13328
13329				continue
13330			fi
13331			;;
13332		esac
13333		case "$CPPFLAGS" in
13334		(*$cf_add_cflags)
13335			;;
13336		(*)
13337			case $cf_add_cflags in
13338			(-D*)
13339				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13340
13341CPPFLAGS=`echo "$CPPFLAGS" | \
13342	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13343		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13344
13345				;;
13346			esac
13347
13348	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13349	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13350
13351			;;
13352		esac
13353		;;
13354	(*)
13355
13356	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13357	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13358
13359		;;
13360	esac
13361	;;
13362(yes)
13363
13364	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13365	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13366
13367	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
13368
13369	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13370		&& test -z "${cf_tst_cflags}" \
13371		&& cf_fix_cppflags=no
13372	;;
13373esac
13374done
13375
13376if test -n "$cf_new_cflags" ; then
13377	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
13378
13379echo "${as_me:-configure}:13379: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13380
13381	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13382	CFLAGS="${CFLAGS}$cf_new_cflags"
13383
13384fi
13385
13386if test -n "$cf_new_cppflags" ; then
13387	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13388
13389echo "${as_me:-configure}:13389: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13390
13391	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13392	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13393
13394fi
13395
13396if test -n "$cf_new_extra_cppflags" ; then
13397	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13398
13399echo "${as_me:-configure}:13399: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13400
13401	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13402	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13403
13404fi
13405
13406if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13407cat >conftest.$ac_ext <<_ACEOF
13408#line 13408 "configure"
13409#include "confdefs.h"
13410#include <stdio.h>
13411int
13412main (void)
13413{
13414printf("Hello world");
13415  ;
13416  return 0;
13417}
13418_ACEOF
13419rm -f conftest.$ac_objext conftest$ac_exeext
13420if { (eval echo "$as_me:13420: \"$ac_link\"") >&5
13421  (eval $ac_link) 2>&5
13422  ac_status=$?
13423  echo "$as_me:13423: \$? = $ac_status" >&5
13424  (exit $ac_status); } &&
13425         { ac_try='test -s conftest$ac_exeext'
13426  { (eval echo "$as_me:13426: \"$ac_try\"") >&5
13427  (eval $ac_try) 2>&5
13428  ac_status=$?
13429  echo "$as_me:13429: \$? = $ac_status" >&5
13430  (exit $ac_status); }; }; then
13431  :
13432else
13433  echo "$as_me: failed program was:" >&5
13434cat conftest.$ac_ext >&5
13435test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
13436
13437echo "${as_me:-configure}:13437: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
13438
13439	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13440		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
13441
13442echo "${as_me:-configure}:13442: testing but keeping change to \$CPPFLAGS ..." 1>&5
13443
13444	 fi
13445	 CFLAGS="$cf_check_flags"
13446fi
13447rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13448fi
13449
13450	echo "$as_me:13450: checking for XOpenDisplay" >&5
13451echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
13452if test "${ac_cv_func_XOpenDisplay+set}" = set; then
13453  echo $ECHO_N "(cached) $ECHO_C" >&6
13454else
13455  cat >conftest.$ac_ext <<_ACEOF
13456#line 13456 "configure"
13457#include "confdefs.h"
13458/* System header to define __stub macros and hopefully few prototypes,
13459    which can conflict with char XOpenDisplay (); below.  */
13460#include <assert.h>
13461/* Override any gcc2 internal prototype to avoid an error.  */
13462#ifdef __cplusplus
13463extern "C"
13464#endif
13465/* We use char because int might match the return type of a gcc2
13466   builtin and then its argument prototype would still apply.  */
13467char XOpenDisplay ();
13468char (*f) ();
13469
13470int
13471main (void)
13472{
13473/* The GNU C library defines this for functions which it implements
13474    to always fail with ENOSYS.  Some functions are actually named
13475    something starting with __ and the normal name is an alias.  */
13476#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
13477choke me
13478#else
13479f = XOpenDisplay; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13480#endif
13481
13482  ;
13483  return 0;
13484}
13485_ACEOF
13486rm -f conftest.$ac_objext conftest$ac_exeext
13487if { (eval echo "$as_me:13487: \"$ac_link\"") >&5
13488  (eval $ac_link) 2>&5
13489  ac_status=$?
13490  echo "$as_me:13490: \$? = $ac_status" >&5
13491  (exit $ac_status); } &&
13492         { ac_try='test -s conftest$ac_exeext'
13493  { (eval echo "$as_me:13493: \"$ac_try\"") >&5
13494  (eval $ac_try) 2>&5
13495  ac_status=$?
13496  echo "$as_me:13496: \$? = $ac_status" >&5
13497  (exit $ac_status); }; }; then
13498  ac_cv_func_XOpenDisplay=yes
13499else
13500  echo "$as_me: failed program was:" >&5
13501cat conftest.$ac_ext >&5
13502ac_cv_func_XOpenDisplay=no
13503fi
13504rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13505fi
13506echo "$as_me:13506: result: $ac_cv_func_XOpenDisplay" >&5
13507echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
13508if test $ac_cv_func_XOpenDisplay = yes; then
13509  :
13510else
13511
13512	echo "$as_me:13512: checking for XOpenDisplay in -lX11" >&5
13513echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
13514if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
13515  echo $ECHO_N "(cached) $ECHO_C" >&6
13516else
13517  ac_check_lib_save_LIBS=$LIBS
13518LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13519cat >conftest.$ac_ext <<_ACEOF
13520#line 13520 "configure"
13521#include "confdefs.h"
13522
13523/* Override any gcc2 internal prototype to avoid an error.  */
13524#ifdef __cplusplus
13525extern "C"
13526#endif
13527/* We use char because int might match the return type of a gcc2
13528   builtin and then its argument prototype would still apply.  */
13529char XOpenDisplay ();
13530int
13531main (void)
13532{
13533XOpenDisplay ();
13534  ;
13535  return 0;
13536}
13537_ACEOF
13538rm -f conftest.$ac_objext conftest$ac_exeext
13539if { (eval echo "$as_me:13539: \"$ac_link\"") >&5
13540  (eval $ac_link) 2>&5
13541  ac_status=$?
13542  echo "$as_me:13542: \$? = $ac_status" >&5
13543  (exit $ac_status); } &&
13544         { ac_try='test -s conftest$ac_exeext'
13545  { (eval echo "$as_me:13545: \"$ac_try\"") >&5
13546  (eval $ac_try) 2>&5
13547  ac_status=$?
13548  echo "$as_me:13548: \$? = $ac_status" >&5
13549  (exit $ac_status); }; }; then
13550  ac_cv_lib_X11_XOpenDisplay=yes
13551else
13552  echo "$as_me: failed program was:" >&5
13553cat conftest.$ac_ext >&5
13554ac_cv_lib_X11_XOpenDisplay=no
13555fi
13556rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13557LIBS=$ac_check_lib_save_LIBS
13558fi
13559echo "$as_me:13559: result: $ac_cv_lib_X11_XOpenDisplay" >&5
13560echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
13561if test $ac_cv_lib_X11_XOpenDisplay = yes; then
13562
13563cf_add_libs="-lX11"
13564# Filter out duplicates - this happens with badly-designed ".pc" files...
13565for cf_add_1lib in $LIBS
13566do
13567	for cf_add_2lib in $cf_add_libs
13568	do
13569		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13570		then
13571			cf_add_1lib=
13572			break
13573		fi
13574	done
13575	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13576done
13577LIBS="$cf_add_libs"
13578
13579fi
13580
13581fi
13582
13583	echo "$as_me:13583: checking for XtAppInitialize" >&5
13584echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
13585if test "${ac_cv_func_XtAppInitialize+set}" = set; then
13586  echo $ECHO_N "(cached) $ECHO_C" >&6
13587else
13588  cat >conftest.$ac_ext <<_ACEOF
13589#line 13589 "configure"
13590#include "confdefs.h"
13591/* System header to define __stub macros and hopefully few prototypes,
13592    which can conflict with char XtAppInitialize (); below.  */
13593#include <assert.h>
13594/* Override any gcc2 internal prototype to avoid an error.  */
13595#ifdef __cplusplus
13596extern "C"
13597#endif
13598/* We use char because int might match the return type of a gcc2
13599   builtin and then its argument prototype would still apply.  */
13600char XtAppInitialize ();
13601char (*f) ();
13602
13603int
13604main (void)
13605{
13606/* The GNU C library defines this for functions which it implements
13607    to always fail with ENOSYS.  Some functions are actually named
13608    something starting with __ and the normal name is an alias.  */
13609#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
13610choke me
13611#else
13612f = XtAppInitialize; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
13613#endif
13614
13615  ;
13616  return 0;
13617}
13618_ACEOF
13619rm -f conftest.$ac_objext conftest$ac_exeext
13620if { (eval echo "$as_me:13620: \"$ac_link\"") >&5
13621  (eval $ac_link) 2>&5
13622  ac_status=$?
13623  echo "$as_me:13623: \$? = $ac_status" >&5
13624  (exit $ac_status); } &&
13625         { ac_try='test -s conftest$ac_exeext'
13626  { (eval echo "$as_me:13626: \"$ac_try\"") >&5
13627  (eval $ac_try) 2>&5
13628  ac_status=$?
13629  echo "$as_me:13629: \$? = $ac_status" >&5
13630  (exit $ac_status); }; }; then
13631  ac_cv_func_XtAppInitialize=yes
13632else
13633  echo "$as_me: failed program was:" >&5
13634cat conftest.$ac_ext >&5
13635ac_cv_func_XtAppInitialize=no
13636fi
13637rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13638fi
13639echo "$as_me:13639: result: $ac_cv_func_XtAppInitialize" >&5
13640echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
13641if test $ac_cv_func_XtAppInitialize = yes; then
13642  :
13643else
13644
13645	echo "$as_me:13645: checking for XtAppInitialize in -lXt" >&5
13646echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
13647if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
13648  echo $ECHO_N "(cached) $ECHO_C" >&6
13649else
13650  ac_check_lib_save_LIBS=$LIBS
13651LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
13652cat >conftest.$ac_ext <<_ACEOF
13653#line 13653 "configure"
13654#include "confdefs.h"
13655
13656/* Override any gcc2 internal prototype to avoid an error.  */
13657#ifdef __cplusplus
13658extern "C"
13659#endif
13660/* We use char because int might match the return type of a gcc2
13661   builtin and then its argument prototype would still apply.  */
13662char XtAppInitialize ();
13663int
13664main (void)
13665{
13666XtAppInitialize ();
13667  ;
13668  return 0;
13669}
13670_ACEOF
13671rm -f conftest.$ac_objext conftest$ac_exeext
13672if { (eval echo "$as_me:13672: \"$ac_link\"") >&5
13673  (eval $ac_link) 2>&5
13674  ac_status=$?
13675  echo "$as_me:13675: \$? = $ac_status" >&5
13676  (exit $ac_status); } &&
13677         { ac_try='test -s conftest$ac_exeext'
13678  { (eval echo "$as_me:13678: \"$ac_try\"") >&5
13679  (eval $ac_try) 2>&5
13680  ac_status=$?
13681  echo "$as_me:13681: \$? = $ac_status" >&5
13682  (exit $ac_status); }; }; then
13683  ac_cv_lib_Xt_XtAppInitialize=yes
13684else
13685  echo "$as_me: failed program was:" >&5
13686cat conftest.$ac_ext >&5
13687ac_cv_lib_Xt_XtAppInitialize=no
13688fi
13689rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13690LIBS=$ac_check_lib_save_LIBS
13691fi
13692echo "$as_me:13692: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
13693echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
13694if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
13695
13696cat >>confdefs.h <<\EOF
13697#define HAVE_LIBXT 1
13698EOF
13699
13700		 cf_have_X_LIBS=Xt
13701		 LIBS="-lXt $X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
13702fi
13703
13704fi
13705
13706fi
13707
13708if test $cf_have_X_LIBS = no ; then
13709	{ echo "$as_me:13709: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13710test program.  You will have to check and add the proper libraries by hand
13711to makefile." >&5
13712echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
13713test program.  You will have to check and add the proper libraries by hand
13714to makefile." >&2;}
13715fi
13716
13717cf_x_athena_root=$cf_x_athena
13718cf_x_athena_inc=""
13719
13720for cf_path in default \
13721	/usr/contrib/X11R6 \
13722	/usr/contrib/X11R5 \
13723	/usr/lib/X11R5 \
13724	/usr/local
13725do
13726	if test -z "$cf_x_athena_inc" ; then
13727		cf_save="$CPPFLAGS"
13728		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
13729		if test $cf_path != default ; then
13730			CPPFLAGS="$cf_save -I$cf_path/include"
13731			echo "$as_me:13731: checking for $cf_test in $cf_path" >&5
13732echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
13733		else
13734			echo "$as_me:13734: checking for $cf_test" >&5
13735echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
13736		fi
13737		cat >conftest.$ac_ext <<_ACEOF
13738#line 13738 "configure"
13739#include "confdefs.h"
13740
13741#include <X11/Intrinsic.h>
13742#include <$cf_test>
13743int
13744main (void)
13745{
13746
13747  ;
13748  return 0;
13749}
13750_ACEOF
13751rm -f conftest.$ac_objext
13752if { (eval echo "$as_me:13752: \"$ac_compile\"") >&5
13753  (eval $ac_compile) 2>&5
13754  ac_status=$?
13755  echo "$as_me:13755: \$? = $ac_status" >&5
13756  (exit $ac_status); } &&
13757         { ac_try='test -s conftest.$ac_objext'
13758  { (eval echo "$as_me:13758: \"$ac_try\"") >&5
13759  (eval $ac_try) 2>&5
13760  ac_status=$?
13761  echo "$as_me:13761: \$? = $ac_status" >&5
13762  (exit $ac_status); }; }; then
13763  cf_result=yes
13764else
13765  echo "$as_me: failed program was:" >&5
13766cat conftest.$ac_ext >&5
13767cf_result=no
13768fi
13769rm -f conftest.$ac_objext conftest.$ac_ext
13770		echo "$as_me:13770: result: $cf_result" >&5
13771echo "${ECHO_T}$cf_result" >&6
13772		if test "$cf_result" = yes ; then
13773			cf_x_athena_inc=$cf_path
13774			break
13775		else
13776			CPPFLAGS="$cf_save"
13777		fi
13778	fi
13779done
13780
13781if test -z "$cf_x_athena_inc" ; then
13782	{ echo "$as_me:13782: WARNING: Unable to successfully find Athena header files with test program" >&5
13783echo "$as_me: WARNING: Unable to successfully find Athena header files with test program" >&2;}
13784elif test "$cf_x_athena_inc" != default ; then
13785	CPPFLAGS="$CPPFLAGS -I$cf_x_athena_inc"
13786fi
13787
13788cf_x_athena_root=$cf_x_athena
13789cf_x_athena_lib=""
13790
13791for cf_path in default \
13792	/usr/contrib/X11R6 \
13793	/usr/contrib/X11R5 \
13794	/usr/lib/X11R5 \
13795	/usr/local
13796do
13797	for cf_lib in \
13798		${cf_x_athena_root} \
13799		${cf_x_athena_root}7 \
13800		${cf_x_athena_root}6
13801	do
13802	for cf_libs in \
13803		"-l$cf_lib -lXmu" \
13804		"-l$cf_lib -lXpm -lXmu" \
13805		"-l${cf_lib}_s -lXmu_s"
13806	do
13807		if test -z "$cf_x_athena_lib" ; then
13808			cf_save="$LIBS"
13809			cf_test=XawSimpleMenuAddGlobalActions
13810			if test $cf_path != default ; then
13811
13812cf_add_libs="-L$cf_path/lib $cf_libs"
13813# Filter out duplicates - this happens with badly-designed ".pc" files...
13814for cf_add_1lib in $LIBS
13815do
13816	for cf_add_2lib in $cf_add_libs
13817	do
13818		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13819		then
13820			cf_add_1lib=
13821			break
13822		fi
13823	done
13824	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13825done
13826LIBS="$cf_add_libs"
13827
13828				echo "$as_me:13828: checking for $cf_libs in $cf_path" >&5
13829echo $ECHO_N "checking for $cf_libs in $cf_path... $ECHO_C" >&6
13830			else
13831
13832cf_add_libs="$cf_libs"
13833# Filter out duplicates - this happens with badly-designed ".pc" files...
13834for cf_add_1lib in $LIBS
13835do
13836	for cf_add_2lib in $cf_add_libs
13837	do
13838		if test "x$cf_add_1lib" = "x$cf_add_2lib"
13839		then
13840			cf_add_1lib=
13841			break
13842		fi
13843	done
13844	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
13845done
13846LIBS="$cf_add_libs"
13847
13848				echo "$as_me:13848: checking for $cf_test in $cf_libs" >&5
13849echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
13850			fi
13851			cat >conftest.$ac_ext <<_ACEOF
13852#line 13852 "configure"
13853#include "confdefs.h"
13854
13855#include <X11/Intrinsic.h>
13856#include <X11/$cf_x_athena_root/SimpleMenu.h>
13857
13858int
13859main (void)
13860{
13861
13862$cf_test((XtAppContext) 0)
13863  ;
13864  return 0;
13865}
13866_ACEOF
13867rm -f conftest.$ac_objext conftest$ac_exeext
13868if { (eval echo "$as_me:13868: \"$ac_link\"") >&5
13869  (eval $ac_link) 2>&5
13870  ac_status=$?
13871  echo "$as_me:13871: \$? = $ac_status" >&5
13872  (exit $ac_status); } &&
13873         { ac_try='test -s conftest$ac_exeext'
13874  { (eval echo "$as_me:13874: \"$ac_try\"") >&5
13875  (eval $ac_try) 2>&5
13876  ac_status=$?
13877  echo "$as_me:13877: \$? = $ac_status" >&5
13878  (exit $ac_status); }; }; then
13879  cf_result=yes
13880else
13881  echo "$as_me: failed program was:" >&5
13882cat conftest.$ac_ext >&5
13883cf_result=no
13884fi
13885rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13886			echo "$as_me:13886: result: $cf_result" >&5
13887echo "${ECHO_T}$cf_result" >&6
13888			if test "$cf_result" = yes ; then
13889				cf_x_athena_lib="$cf_libs"
13890				break
13891			fi
13892			LIBS="$cf_save"
13893		fi
13894	done # cf_libs
13895		test -n "$cf_x_athena_lib" && break
13896	done # cf_lib
13897done
13898
13899if test -z "$cf_x_athena_lib" ; then
13900	{ { echo "$as_me:13900: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
13901echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
13902   { (exit 1); exit 1; }; }
13903fi
13904
13905cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13906
13907cat >>confdefs.h <<EOF
13908#define $cf_x_athena_LIBS 1
13909EOF
13910
13911fi
13912
13913for ac_header in X11/Xpoll.h
13914do
13915as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
13916echo "$as_me:13916: checking for $ac_header" >&5
13917echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
13918if eval "test \"\${$as_ac_Header+set}\" = set"; then
13919  echo $ECHO_N "(cached) $ECHO_C" >&6
13920else
13921  cat >conftest.$ac_ext <<_ACEOF
13922#line 13922 "configure"
13923#include "confdefs.h"
13924#include <$ac_header>
13925_ACEOF
13926if { (eval echo "$as_me:13926: \"$ac_cpp conftest.$ac_ext\"") >&5
13927  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13928  ac_status=$?
13929  egrep -v '^ *\+' conftest.er1 >conftest.err
13930  rm -f conftest.er1
13931  cat conftest.err >&5
13932  echo "$as_me:13932: \$? = $ac_status" >&5
13933  (exit $ac_status); } >/dev/null; then
13934  if test -s conftest.err; then
13935    ac_cpp_err=$ac_c_preproc_warn_flag
13936  else
13937    ac_cpp_err=
13938  fi
13939else
13940  ac_cpp_err=yes
13941fi
13942if test -z "$ac_cpp_err"; then
13943  eval "$as_ac_Header=yes"
13944else
13945  echo "$as_me: failed program was:" >&5
13946  cat conftest.$ac_ext >&5
13947  eval "$as_ac_Header=no"
13948fi
13949rm -f conftest.err conftest.$ac_ext
13950fi
13951echo "$as_me:13951: result: `eval echo '${'$as_ac_Header'}'`" >&5
13952echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
13953if test `eval echo '${'$as_ac_Header'}'` = yes; then
13954  cat >>confdefs.h <<EOF
13955#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
13956EOF
13957
13958fi
13959done
13960
13961echo "$as_me:13961: checking for declaration of fd_set" >&5
13962echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
13963if test "${cf_cv_type_fd_set+set}" = set; then
13964  echo $ECHO_N "(cached) $ECHO_C" >&6
13965else
13966
13967echo "${as_me:-configure}:13967: testing sys/types alone ..." 1>&5
13968
13969cat >conftest.$ac_ext <<_ACEOF
13970#line 13970 "configure"
13971#include "confdefs.h"
13972
13973#include <sys/types.h>
13974int
13975main (void)
13976{
13977fd_set x
13978  ;
13979  return 0;
13980}
13981_ACEOF
13982rm -f conftest.$ac_objext
13983if { (eval echo "$as_me:13983: \"$ac_compile\"") >&5
13984  (eval $ac_compile) 2>&5
13985  ac_status=$?
13986  echo "$as_me:13986: \$? = $ac_status" >&5
13987  (exit $ac_status); } &&
13988         { ac_try='test -s conftest.$ac_objext'
13989  { (eval echo "$as_me:13989: \"$ac_try\"") >&5
13990  (eval $ac_try) 2>&5
13991  ac_status=$?
13992  echo "$as_me:13992: \$? = $ac_status" >&5
13993  (exit $ac_status); }; }; then
13994  cf_cv_type_fd_set=sys/types.h
13995else
13996  echo "$as_me: failed program was:" >&5
13997cat conftest.$ac_ext >&5
13998
13999echo "${as_me:-configure}:13999: testing X11/Xpoll.h ..." 1>&5
14000
14001cat >conftest.$ac_ext <<_ACEOF
14002#line 14002 "configure"
14003#include "confdefs.h"
14004
14005#ifdef HAVE_X11_XPOLL_H
14006#include <X11/Xpoll.h>
14007#endif
14008int
14009main (void)
14010{
14011fd_set x
14012  ;
14013  return 0;
14014}
14015_ACEOF
14016rm -f conftest.$ac_objext
14017if { (eval echo "$as_me:14017: \"$ac_compile\"") >&5
14018  (eval $ac_compile) 2>&5
14019  ac_status=$?
14020  echo "$as_me:14020: \$? = $ac_status" >&5
14021  (exit $ac_status); } &&
14022         { ac_try='test -s conftest.$ac_objext'
14023  { (eval echo "$as_me:14023: \"$ac_try\"") >&5
14024  (eval $ac_try) 2>&5
14025  ac_status=$?
14026  echo "$as_me:14026: \$? = $ac_status" >&5
14027  (exit $ac_status); }; }; then
14028  cf_cv_type_fd_set=X11/Xpoll.h
14029else
14030  echo "$as_me: failed program was:" >&5
14031cat conftest.$ac_ext >&5
14032
14033echo "${as_me:-configure}:14033: testing sys/select.h ..." 1>&5
14034
14035cat >conftest.$ac_ext <<_ACEOF
14036#line 14036 "configure"
14037#include "confdefs.h"
14038
14039#include <sys/types.h>
14040#include <sys/select.h>
14041int
14042main (void)
14043{
14044fd_set x
14045  ;
14046  return 0;
14047}
14048_ACEOF
14049rm -f conftest.$ac_objext
14050if { (eval echo "$as_me:14050: \"$ac_compile\"") >&5
14051  (eval $ac_compile) 2>&5
14052  ac_status=$?
14053  echo "$as_me:14053: \$? = $ac_status" >&5
14054  (exit $ac_status); } &&
14055         { ac_try='test -s conftest.$ac_objext'
14056  { (eval echo "$as_me:14056: \"$ac_try\"") >&5
14057  (eval $ac_try) 2>&5
14058  ac_status=$?
14059  echo "$as_me:14059: \$? = $ac_status" >&5
14060  (exit $ac_status); }; }; then
14061  cf_cv_type_fd_set=sys/select.h
14062else
14063  echo "$as_me: failed program was:" >&5
14064cat conftest.$ac_ext >&5
14065cf_cv_type_fd_set=unknown
14066fi
14067rm -f conftest.$ac_objext conftest.$ac_ext
14068fi
14069rm -f conftest.$ac_objext conftest.$ac_ext
14070fi
14071rm -f conftest.$ac_objext conftest.$ac_ext
14072fi
14073echo "$as_me:14073: result: $cf_cv_type_fd_set" >&5
14074echo "${ECHO_T}$cf_cv_type_fd_set" >&6
14075if test $cf_cv_type_fd_set = sys/select.h ; then
14076
14077cat >>confdefs.h <<\EOF
14078#define USE_SYS_SELECT_H 1
14079EOF
14080
14081fi
14082
14083echo "$as_me:14083: checking for declaration of fd_mask" >&5
14084echo $ECHO_N "checking for declaration of fd_mask... $ECHO_C" >&6
14085if test "${cf_cv_type_fd_mask+set}" = set; then
14086  echo $ECHO_N "(cached) $ECHO_C" >&6
14087else
14088
14089    if test x$cf_cv_type_fd_set = xX11/Xpoll.h ; then
14090        cat >conftest.$ac_ext <<_ACEOF
14091#line 14091 "configure"
14092#include "confdefs.h"
14093
14094#include <X11/Xpoll.h>
14095int
14096main (void)
14097{
14098fd_mask x
14099  ;
14100  return 0;
14101}
14102_ACEOF
14103rm -f conftest.$ac_objext
14104if { (eval echo "$as_me:14104: \"$ac_compile\"") >&5
14105  (eval $ac_compile) 2>&5
14106  ac_status=$?
14107  echo "$as_me:14107: \$? = $ac_status" >&5
14108  (exit $ac_status); } &&
14109         { ac_try='test -s conftest.$ac_objext'
14110  { (eval echo "$as_me:14110: \"$ac_try\"") >&5
14111  (eval $ac_try) 2>&5
14112  ac_status=$?
14113  echo "$as_me:14113: \$? = $ac_status" >&5
14114  (exit $ac_status); }; }; then
14115  :
14116else
14117  echo "$as_me: failed program was:" >&5
14118cat conftest.$ac_ext >&5
14119
14120echo "${as_me:-configure}:14120: testing if we must define CSRG_BASED ..." 1>&5
14121
14122# Xosdefs.h on Mac OS X may not define this (but it should).
14123            cat >conftest.$ac_ext <<_ACEOF
14124#line 14124 "configure"
14125#include "confdefs.h"
14126
14127#define CSRG_BASED
14128#include <X11/Xpoll.h>
14129int
14130main (void)
14131{
14132fd_mask x
14133  ;
14134  return 0;
14135}
14136_ACEOF
14137rm -f conftest.$ac_objext
14138if { (eval echo "$as_me:14138: \"$ac_compile\"") >&5
14139  (eval $ac_compile) 2>&5
14140  ac_status=$?
14141  echo "$as_me:14141: \$? = $ac_status" >&5
14142  (exit $ac_status); } &&
14143         { ac_try='test -s conftest.$ac_objext'
14144  { (eval echo "$as_me:14144: \"$ac_try\"") >&5
14145  (eval $ac_try) 2>&5
14146  ac_status=$?
14147  echo "$as_me:14147: \$? = $ac_status" >&5
14148  (exit $ac_status); }; }; then
14149  cf_cv_type_fd_mask=CSRG_BASED
14150else
14151  echo "$as_me: failed program was:" >&5
14152cat conftest.$ac_ext >&5
14153fi
14154rm -f conftest.$ac_objext conftest.$ac_ext
14155fi
14156rm -f conftest.$ac_objext conftest.$ac_ext
14157    else
14158        cf_cv_type_fd_mask=$cf_cv_type_fd_set
14159    fi
14160
14161fi
14162echo "$as_me:14162: result: $cf_cv_type_fd_mask" >&5
14163echo "${ECHO_T}$cf_cv_type_fd_mask" >&6
14164if test x$cf_cv_type_fd_mask = xCSRG_BASED ; then
14165
14166cat >>confdefs.h <<\EOF
14167#define CSRG_BASED 1
14168EOF
14169
14170fi
14171
14172echo "$as_me:14172: checking for IRIX 6.5 baud-rate redefinitions" >&5
14173echo $ECHO_N "checking for IRIX 6.5 baud-rate redefinitions... $ECHO_C" >&6
14174if test "${cf_cv_termio_c_ispeed+set}" = set; then
14175  echo $ECHO_N "(cached) $ECHO_C" >&6
14176else
14177
14178cat >conftest.$ac_ext <<_ACEOF
14179#line 14179 "configure"
14180#include "confdefs.h"
14181
14182#include <sys/types.h>
14183#include <sys/termio.h>
14184int
14185main (void)
14186{
14187
14188struct termio foo;
14189foo.c_ispeed = B38400;
14190foo.c_ospeed = B9600;
14191
14192  ;
14193  return 0;
14194}
14195_ACEOF
14196rm -f conftest.$ac_objext
14197if { (eval echo "$as_me:14197: \"$ac_compile\"") >&5
14198  (eval $ac_compile) 2>&5
14199  ac_status=$?
14200  echo "$as_me:14200: \$? = $ac_status" >&5
14201  (exit $ac_status); } &&
14202         { ac_try='test -s conftest.$ac_objext'
14203  { (eval echo "$as_me:14203: \"$ac_try\"") >&5
14204  (eval $ac_try) 2>&5
14205  ac_status=$?
14206  echo "$as_me:14206: \$? = $ac_status" >&5
14207  (exit $ac_status); }; }; then
14208  cf_cv_termio_c_ispeed=yes
14209
14210else
14211  echo "$as_me: failed program was:" >&5
14212cat conftest.$ac_ext >&5
14213cf_cv_termio_c_ispeed=no
14214fi
14215rm -f conftest.$ac_objext conftest.$ac_ext
14216
14217fi
14218echo "$as_me:14218: result: $cf_cv_termio_c_ispeed" >&5
14219echo "${ECHO_T}$cf_cv_termio_c_ispeed" >&6
14220test "$cf_cv_termio_c_ispeed" = yes &&
14221cat >>confdefs.h <<\EOF
14222#define HAVE_TERMIO_C_ISPEED 1
14223EOF
14224
14225# If we notice Xcursor, there is a workaround needed.
14226echo "$as_me:14226: checking for XcursorGetTheme in -lXcursor" >&5
14227echo $ECHO_N "checking for XcursorGetTheme in -lXcursor... $ECHO_C" >&6
14228if test "${ac_cv_lib_Xcursor_XcursorGetTheme+set}" = set; then
14229  echo $ECHO_N "(cached) $ECHO_C" >&6
14230else
14231  ac_check_lib_save_LIBS=$LIBS
14232LIBS="-lXcursor  $LIBS"
14233cat >conftest.$ac_ext <<_ACEOF
14234#line 14234 "configure"
14235#include "confdefs.h"
14236
14237/* Override any gcc2 internal prototype to avoid an error.  */
14238#ifdef __cplusplus
14239extern "C"
14240#endif
14241/* We use char because int might match the return type of a gcc2
14242   builtin and then its argument prototype would still apply.  */
14243char XcursorGetTheme ();
14244int
14245main (void)
14246{
14247XcursorGetTheme ();
14248  ;
14249  return 0;
14250}
14251_ACEOF
14252rm -f conftest.$ac_objext conftest$ac_exeext
14253if { (eval echo "$as_me:14253: \"$ac_link\"") >&5
14254  (eval $ac_link) 2>&5
14255  ac_status=$?
14256  echo "$as_me:14256: \$? = $ac_status" >&5
14257  (exit $ac_status); } &&
14258         { ac_try='test -s conftest$ac_exeext'
14259  { (eval echo "$as_me:14259: \"$ac_try\"") >&5
14260  (eval $ac_try) 2>&5
14261  ac_status=$?
14262  echo "$as_me:14262: \$? = $ac_status" >&5
14263  (exit $ac_status); }; }; then
14264  ac_cv_lib_Xcursor_XcursorGetTheme=yes
14265else
14266  echo "$as_me: failed program was:" >&5
14267cat conftest.$ac_ext >&5
14268ac_cv_lib_Xcursor_XcursorGetTheme=no
14269fi
14270rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14271LIBS=$ac_check_lib_save_LIBS
14272fi
14273echo "$as_me:14273: result: $ac_cv_lib_Xcursor_XcursorGetTheme" >&5
14274echo "${ECHO_T}$ac_cv_lib_Xcursor_XcursorGetTheme" >&6
14275if test $ac_cv_lib_Xcursor_XcursorGetTheme = yes; then
14276  cat >>confdefs.h <<\EOF
14277#define HAVE_LIB_XCURSOR 1
14278EOF
14279
14280fi
14281
14282LIBS="$LIBS $X_EXTRA_LIBS"
14283
14284for ac_header in \
14285stropts.h \
14286
14287do
14288as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14289echo "$as_me:14289: checking for $ac_header" >&5
14290echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14291if eval "test \"\${$as_ac_Header+set}\" = set"; then
14292  echo $ECHO_N "(cached) $ECHO_C" >&6
14293else
14294  cat >conftest.$ac_ext <<_ACEOF
14295#line 14295 "configure"
14296#include "confdefs.h"
14297#include <$ac_header>
14298_ACEOF
14299if { (eval echo "$as_me:14299: \"$ac_cpp conftest.$ac_ext\"") >&5
14300  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14301  ac_status=$?
14302  egrep -v '^ *\+' conftest.er1 >conftest.err
14303  rm -f conftest.er1
14304  cat conftest.err >&5
14305  echo "$as_me:14305: \$? = $ac_status" >&5
14306  (exit $ac_status); } >/dev/null; then
14307  if test -s conftest.err; then
14308    ac_cpp_err=$ac_c_preproc_warn_flag
14309  else
14310    ac_cpp_err=
14311  fi
14312else
14313  ac_cpp_err=yes
14314fi
14315if test -z "$ac_cpp_err"; then
14316  eval "$as_ac_Header=yes"
14317else
14318  echo "$as_me: failed program was:" >&5
14319  cat conftest.$ac_ext >&5
14320  eval "$as_ac_Header=no"
14321fi
14322rm -f conftest.err conftest.$ac_ext
14323fi
14324echo "$as_me:14324: result: `eval echo '${'$as_ac_Header'}'`" >&5
14325echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14326if test `eval echo '${'$as_ac_Header'}'` = yes; then
14327  cat >>confdefs.h <<EOF
14328#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14329EOF
14330
14331fi
14332done
14333
14334cf_func_grantpt="grantpt ptsname"
14335case $host_os in
14336(darwin[0-9].*)
14337	;;
14338(*)
14339	cf_func_grantpt="$cf_func_grantpt posix_openpt"
14340	;;
14341esac
14342
14343for ac_func in $cf_func_grantpt
14344do
14345as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14346echo "$as_me:14346: checking for $ac_func" >&5
14347echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14348if eval "test \"\${$as_ac_var+set}\" = set"; then
14349  echo $ECHO_N "(cached) $ECHO_C" >&6
14350else
14351  cat >conftest.$ac_ext <<_ACEOF
14352#line 14352 "configure"
14353#include "confdefs.h"
14354/* System header to define __stub macros and hopefully few prototypes,
14355    which can conflict with char $ac_func (); below.  */
14356#include <assert.h>
14357/* Override any gcc2 internal prototype to avoid an error.  */
14358#ifdef __cplusplus
14359extern "C"
14360#endif
14361/* We use char because int might match the return type of a gcc2
14362   builtin and then its argument prototype would still apply.  */
14363char $ac_func ();
14364char (*f) ();
14365
14366int
14367main (void)
14368{
14369/* The GNU C library defines this for functions which it implements
14370    to always fail with ENOSYS.  Some functions are actually named
14371    something starting with __ and the normal name is an alias.  */
14372#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14373choke me
14374#else
14375f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
14376#endif
14377
14378  ;
14379  return 0;
14380}
14381_ACEOF
14382rm -f conftest.$ac_objext conftest$ac_exeext
14383if { (eval echo "$as_me:14383: \"$ac_link\"") >&5
14384  (eval $ac_link) 2>&5
14385  ac_status=$?
14386  echo "$as_me:14386: \$? = $ac_status" >&5
14387  (exit $ac_status); } &&
14388         { ac_try='test -s conftest$ac_exeext'
14389  { (eval echo "$as_me:14389: \"$ac_try\"") >&5
14390  (eval $ac_try) 2>&5
14391  ac_status=$?
14392  echo "$as_me:14392: \$? = $ac_status" >&5
14393  (exit $ac_status); }; }; then
14394  eval "$as_ac_var=yes"
14395else
14396  echo "$as_me: failed program was:" >&5
14397cat conftest.$ac_ext >&5
14398eval "$as_ac_var=no"
14399fi
14400rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14401fi
14402echo "$as_me:14402: result: `eval echo '${'$as_ac_var'}'`" >&5
14403echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
14404if test `eval echo '${'$as_ac_var'}'` = yes; then
14405  cat >>confdefs.h <<EOF
14406#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
14407EOF
14408
14409fi
14410done
14411
14412cf_grantpt_opts=
14413if test "x$ac_cv_func_grantpt" = "xyes" ; then
14414	echo "$as_me:14414: checking if grantpt really works" >&5
14415echo $ECHO_N "checking if grantpt really works... $ECHO_C" >&6
14416	cat >conftest.$ac_ext <<_ACEOF
14417#line 14417 "configure"
14418#include "confdefs.h"
14419
14420#include <stdlib.h>
14421#include <termios.h>
14422#include <unistd.h>
14423#include <signal.h>
14424#include <fcntl.h>
14425#include <errno.h>
14426
14427#ifndef HAVE_POSIX_OPENPT
14428#undef posix_openpt
14429#define posix_openpt(mode) open("/dev/ptmx", mode)
14430#endif
14431
14432#ifdef HAVE_STROPTS_H
14433#include <stropts.h>
14434#endif
14435
14436static void failed(int code)
14437{
14438	perror("conftest");
14439	exit(code);
14440}
14441
14442static void my_timeout(int sig)
14443{
14444	exit(99);
14445}
14446
14447int
14448main (void)
14449{
14450
14451	int code = 0;
14452	int rc;
14453	int pty;
14454	int tty;
14455	char *slave;
14456	struct termios tio;
14457
14458	signal(SIGALRM, my_timeout);
14459
14460	if (alarm(2) == 9)
14461		failed(9);
14462	else if ((pty = posix_openpt(O_RDWR)) < 0)
14463		failed(1);
14464	else if ((rc = grantpt(pty)) < 0)
14465		failed(2);
14466	else if ((rc = unlockpt(pty)) < 0)
14467		failed(3);
14468	else if ((slave = ptsname(pty)) == 0)
14469		failed(4);
14470#if (CONFTEST == 3) || defined(CONFTEST_isatty)
14471	else if (!isatty(pty))
14472		failed(4);
14473#endif
14474#if CONFTEST >= 4
14475    else if ((rc = tcgetattr(pty, &tio)) < 0)
14476		failed(20);
14477    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
14478		failed(21);
14479#endif
14480	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
14481	 * Linux does treat it that way.
14482	 */
14483	else if ((tty = open(slave, O_RDWR)) < 0)
14484		failed(5);
14485#ifdef CONFTEST
14486#ifdef I_PUSH
14487#if (CONFTEST == 0) || defined(CONFTEST_ptem)
14488    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
14489		failed(10);
14490#endif
14491#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
14492    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
14493		failed(11);
14494#endif
14495#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
14496    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
14497		failed(12);
14498#endif
14499#endif /* I_PUSH */
14500#if CONFTEST >= 5
14501    else if ((rc = tcgetattr(tty, &tio)) < 0)
14502		failed(30);
14503    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
14504		failed(31);
14505#endif
14506#endif /* CONFTEST */
14507
14508	${cf_cv_main_return:-return}(code);
14509
14510  ;
14511  return 0;
14512}
14513_ACEOF
14514rm -f conftest.$ac_objext conftest$ac_exeext
14515if { (eval echo "$as_me:14515: \"$ac_link\"") >&5
14516  (eval $ac_link) 2>&5
14517  ac_status=$?
14518  echo "$as_me:14518: \$? = $ac_status" >&5
14519  (exit $ac_status); } &&
14520         { ac_try='test -s conftest$ac_exeext'
14521  { (eval echo "$as_me:14521: \"$ac_try\"") >&5
14522  (eval $ac_try) 2>&5
14523  ac_status=$?
14524  echo "$as_me:14524: \$? = $ac_status" >&5
14525  (exit $ac_status); }; }; then
14526
14527	if test "$cross_compiling" = yes; then
14528  ac_cv_func_grantpt=maybe
14529else
14530  cat >conftest.$ac_ext <<_ACEOF
14531#line 14531 "configure"
14532#include "confdefs.h"
14533
14534#include <stdlib.h>
14535#include <termios.h>
14536#include <unistd.h>
14537#include <signal.h>
14538#include <fcntl.h>
14539#include <errno.h>
14540
14541#ifndef HAVE_POSIX_OPENPT
14542#undef posix_openpt
14543#define posix_openpt(mode) open("/dev/ptmx", mode)
14544#endif
14545
14546#ifdef HAVE_STROPTS_H
14547#include <stropts.h>
14548#endif
14549
14550static void failed(int code)
14551{
14552	perror("conftest");
14553	exit(code);
14554}
14555
14556static void my_timeout(int sig)
14557{
14558	exit(99);
14559}
14560
14561int main(void)
14562{
14563
14564	int code = 0;
14565	int rc;
14566	int pty;
14567	int tty;
14568	char *slave;
14569	struct termios tio;
14570
14571	signal(SIGALRM, my_timeout);
14572
14573	if (alarm(2) == 9)
14574		failed(9);
14575	else if ((pty = posix_openpt(O_RDWR)) < 0)
14576		failed(1);
14577	else if ((rc = grantpt(pty)) < 0)
14578		failed(2);
14579	else if ((rc = unlockpt(pty)) < 0)
14580		failed(3);
14581	else if ((slave = ptsname(pty)) == 0)
14582		failed(4);
14583#if (CONFTEST == 3) || defined(CONFTEST_isatty)
14584	else if (!isatty(pty))
14585		failed(4);
14586#endif
14587#if CONFTEST >= 4
14588    else if ((rc = tcgetattr(pty, &tio)) < 0)
14589		failed(20);
14590    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
14591		failed(21);
14592#endif
14593	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
14594	 * Linux does treat it that way.
14595	 */
14596	else if ((tty = open(slave, O_RDWR)) < 0)
14597		failed(5);
14598#ifdef CONFTEST
14599#ifdef I_PUSH
14600#if (CONFTEST == 0) || defined(CONFTEST_ptem)
14601    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
14602		failed(10);
14603#endif
14604#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
14605    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
14606		failed(11);
14607#endif
14608#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
14609    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
14610		failed(12);
14611#endif
14612#endif /* I_PUSH */
14613#if CONFTEST >= 5
14614    else if ((rc = tcgetattr(tty, &tio)) < 0)
14615		failed(30);
14616    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
14617		failed(31);
14618#endif
14619#endif /* CONFTEST */
14620
14621	${cf_cv_main_return:-return}(code);
14622
14623}
14624
14625_ACEOF
14626rm -f conftest$ac_exeext
14627if { (eval echo "$as_me:14627: \"$ac_link\"") >&5
14628  (eval $ac_link) 2>&5
14629  ac_status=$?
14630  echo "$as_me:14630: \$? = $ac_status" >&5
14631  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14632  { (eval echo "$as_me:14632: \"$ac_try\"") >&5
14633  (eval $ac_try) 2>&5
14634  ac_status=$?
14635  echo "$as_me:14635: \$? = $ac_status" >&5
14636  (exit $ac_status); }; }; then
14637  :
14638else
14639  echo "$as_me: program exited with status $ac_status" >&5
14640echo "$as_me: failed program was:" >&5
14641cat conftest.$ac_ext >&5
14642ac_cv_func_grantpt=no
14643
14644fi
14645rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14646fi
14647
14648else
14649  echo "$as_me: failed program was:" >&5
14650cat conftest.$ac_ext >&5
14651ac_cv_func_grantpt=no
14652fi
14653rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14654	echo "$as_me:14654: result: $ac_cv_func_grantpt" >&5
14655echo "${ECHO_T}$ac_cv_func_grantpt" >&6
14656
14657	if test "x$ac_cv_func_grantpt" != "xno" ; then
14658
14659		if test "x$ac_cv_func_grantpt" = "xyes" ; then
14660			echo "$as_me:14660: checking for pty features" >&5
14661echo $ECHO_N "checking for pty features... $ECHO_C" >&6
14662			if test "x$ac_cv_header_stropts_h" = xyes
14663			then
14664				cf_pty_this=0
14665			else
14666				cf_pty_this=3
14667			fi
14668
14669			cf_pty_defines=
14670			while test $cf_pty_this != 6
14671			do
14672
14673				cf_pty_feature=
14674				cf_pty_next=`expr $cf_pty_this + 1`
14675
14676echo "${as_me:-configure}:14676: testing pty feature test $cf_pty_next:5 ..." 1>&5
14677
14678				if test "$cross_compiling" = yes; then
14679  { { echo "$as_me:14679: error: cannot run test program while cross compiling" >&5
14680echo "$as_me: error: cannot run test program while cross compiling" >&2;}
14681   { (exit 1); exit 1; }; }
14682else
14683  cat >conftest.$ac_ext <<_ACEOF
14684#line 14684 "configure"
14685#include "confdefs.h"
14686#define CONFTEST $cf_pty_this
14687$cf_pty_defines
14688
14689#include <stdlib.h>
14690#include <termios.h>
14691#include <unistd.h>
14692#include <signal.h>
14693#include <fcntl.h>
14694#include <errno.h>
14695
14696#ifndef HAVE_POSIX_OPENPT
14697#undef posix_openpt
14698#define posix_openpt(mode) open("/dev/ptmx", mode)
14699#endif
14700
14701#ifdef HAVE_STROPTS_H
14702#include <stropts.h>
14703#endif
14704
14705static void failed(int code)
14706{
14707	perror("conftest");
14708	exit(code);
14709}
14710
14711static void my_timeout(int sig)
14712{
14713	exit(99);
14714}
14715
14716int main(void)
14717{
14718
14719	int code = 0;
14720	int rc;
14721	int pty;
14722	int tty;
14723	char *slave;
14724	struct termios tio;
14725
14726	signal(SIGALRM, my_timeout);
14727
14728	if (alarm(2) == 9)
14729		failed(9);
14730	else if ((pty = posix_openpt(O_RDWR)) < 0)
14731		failed(1);
14732	else if ((rc = grantpt(pty)) < 0)
14733		failed(2);
14734	else if ((rc = unlockpt(pty)) < 0)
14735		failed(3);
14736	else if ((slave = ptsname(pty)) == 0)
14737		failed(4);
14738#if (CONFTEST == 3) || defined(CONFTEST_isatty)
14739	else if (!isatty(pty))
14740		failed(4);
14741#endif
14742#if CONFTEST >= 4
14743    else if ((rc = tcgetattr(pty, &tio)) < 0)
14744		failed(20);
14745    else if ((rc = tcsetattr(pty, TCSAFLUSH, &tio)) < 0)
14746		failed(21);
14747#endif
14748	/* BSD posix_openpt does not treat pty as a terminal until slave is opened.
14749	 * Linux does treat it that way.
14750	 */
14751	else if ((tty = open(slave, O_RDWR)) < 0)
14752		failed(5);
14753#ifdef CONFTEST
14754#ifdef I_PUSH
14755#if (CONFTEST == 0) || defined(CONFTEST_ptem)
14756    else if ((rc = ioctl(tty, I_PUSH, "ptem")) < 0)
14757		failed(10);
14758#endif
14759#if (CONFTEST == 1) || defined(CONFTEST_ldterm)
14760    else if ((rc = ioctl(tty, I_PUSH, "ldterm")) < 0)
14761		failed(11);
14762#endif
14763#if (CONFTEST == 2) || defined(CONFTEST_ttcompat)
14764    else if ((rc = ioctl(tty, I_PUSH, "ttcompat")) < 0)
14765		failed(12);
14766#endif
14767#endif /* I_PUSH */
14768#if CONFTEST >= 5
14769    else if ((rc = tcgetattr(tty, &tio)) < 0)
14770		failed(30);
14771    else if ((rc = tcsetattr(tty, TCSAFLUSH, &tio)) < 0)
14772		failed(31);
14773#endif
14774#endif /* CONFTEST */
14775
14776	${cf_cv_main_return:-return}(code);
14777
14778}
14779
14780_ACEOF
14781rm -f conftest$ac_exeext
14782if { (eval echo "$as_me:14782: \"$ac_link\"") >&5
14783  (eval $ac_link) 2>&5
14784  ac_status=$?
14785  echo "$as_me:14785: \$? = $ac_status" >&5
14786  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14787  { (eval echo "$as_me:14787: \"$ac_try\"") >&5
14788  (eval $ac_try) 2>&5
14789  ac_status=$?
14790  echo "$as_me:14790: \$? = $ac_status" >&5
14791  (exit $ac_status); }; }; then
14792
14793				case $cf_pty_next in
14794				(1) # - streams
14795					cf_pty_feature=ptem
14796					;;
14797				(2) # - streams
14798					cf_pty_feature=ldterm
14799					;;
14800				(3) # - streams
14801					cf_pty_feature=ttcompat
14802					;;
14803				(4)
14804					cf_pty_feature=pty_isatty
14805					;;
14806				(5)
14807					cf_pty_feature=pty_tcsetattr
14808					;;
14809				(6)
14810					cf_pty_feature=tty_tcsetattr
14811					;;
14812				esac
14813
14814else
14815  echo "$as_me: program exited with status $ac_status" >&5
14816echo "$as_me: failed program was:" >&5
14817cat conftest.$ac_ext >&5
14818
14819				case $cf_pty_next in
14820				(1|2|3)
14821
14822echo "${as_me:-configure}:14822: testing skipping remaining streams features $cf_pty_this..2 ..." 1>&5
14823
14824					cf_pty_next=3
14825					;;
14826				esac
14827
14828fi
14829rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14830fi
14831				if test -n "$cf_pty_feature"
14832				then
14833					cf_pty_defines="$cf_pty_defines
14834#define CONFTEST_$cf_pty_feature 1
14835"
14836					cf_grantpt_opts="$cf_grantpt_opts $cf_pty_feature"
14837				fi
14838
14839				cf_pty_this=$cf_pty_next
14840			done
14841			echo "$as_me:14841: result: $cf_grantpt_opts" >&5
14842echo "${ECHO_T}$cf_grantpt_opts" >&6
14843			cf_grantpt_opts=`echo "$cf_grantpt_opts" | sed -e 's/ isatty//'`
14844		fi
14845	fi
14846fi
14847
14848if test "x$disable_openpty" != "xyes" || test -z "$cf_grantpt_opts" ; then
14849	echo "$as_me:14849: checking for openpty in -lutil" >&5
14850echo $ECHO_N "checking for openpty in -lutil... $ECHO_C" >&6
14851if test "${ac_cv_lib_util_openpty+set}" = set; then
14852  echo $ECHO_N "(cached) $ECHO_C" >&6
14853else
14854  ac_check_lib_save_LIBS=$LIBS
14855LIBS="-lutil  $LIBS"
14856cat >conftest.$ac_ext <<_ACEOF
14857#line 14857 "configure"
14858#include "confdefs.h"
14859
14860/* Override any gcc2 internal prototype to avoid an error.  */
14861#ifdef __cplusplus
14862extern "C"
14863#endif
14864/* We use char because int might match the return type of a gcc2
14865   builtin and then its argument prototype would still apply.  */
14866char openpty ();
14867int
14868main (void)
14869{
14870openpty ();
14871  ;
14872  return 0;
14873}
14874_ACEOF
14875rm -f conftest.$ac_objext conftest$ac_exeext
14876if { (eval echo "$as_me:14876: \"$ac_link\"") >&5
14877  (eval $ac_link) 2>&5
14878  ac_status=$?
14879  echo "$as_me:14879: \$? = $ac_status" >&5
14880  (exit $ac_status); } &&
14881         { ac_try='test -s conftest$ac_exeext'
14882  { (eval echo "$as_me:14882: \"$ac_try\"") >&5
14883  (eval $ac_try) 2>&5
14884  ac_status=$?
14885  echo "$as_me:14885: \$? = $ac_status" >&5
14886  (exit $ac_status); }; }; then
14887  ac_cv_lib_util_openpty=yes
14888else
14889  echo "$as_me: failed program was:" >&5
14890cat conftest.$ac_ext >&5
14891ac_cv_lib_util_openpty=no
14892fi
14893rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14894LIBS=$ac_check_lib_save_LIBS
14895fi
14896echo "$as_me:14896: result: $ac_cv_lib_util_openpty" >&5
14897echo "${ECHO_T}$ac_cv_lib_util_openpty" >&6
14898if test $ac_cv_lib_util_openpty = yes; then
14899  cf_have_openpty=yes
14900else
14901  cf_have_openpty=no
14902fi
14903
14904	if test "$cf_have_openpty" = yes ; then
14905		ac_cv_func_grantpt=no
14906		LIBS="-lutil $LIBS"
14907
14908cat >>confdefs.h <<\EOF
14909#define HAVE_OPENPTY 1
14910EOF
14911
14912for ac_header in \
14913			util.h \
14914			libutil.h \
14915			pty.h \
14916
14917do
14918as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14919echo "$as_me:14919: checking for $ac_header" >&5
14920echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14921if eval "test \"\${$as_ac_Header+set}\" = set"; then
14922  echo $ECHO_N "(cached) $ECHO_C" >&6
14923else
14924  cat >conftest.$ac_ext <<_ACEOF
14925#line 14925 "configure"
14926#include "confdefs.h"
14927#include <$ac_header>
14928_ACEOF
14929if { (eval echo "$as_me:14929: \"$ac_cpp conftest.$ac_ext\"") >&5
14930  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14931  ac_status=$?
14932  egrep -v '^ *\+' conftest.er1 >conftest.err
14933  rm -f conftest.er1
14934  cat conftest.err >&5
14935  echo "$as_me:14935: \$? = $ac_status" >&5
14936  (exit $ac_status); } >/dev/null; then
14937  if test -s conftest.err; then
14938    ac_cpp_err=$ac_c_preproc_warn_flag
14939  else
14940    ac_cpp_err=
14941  fi
14942else
14943  ac_cpp_err=yes
14944fi
14945if test -z "$ac_cpp_err"; then
14946  eval "$as_ac_Header=yes"
14947else
14948  echo "$as_me: failed program was:" >&5
14949  cat conftest.$ac_ext >&5
14950  eval "$as_ac_Header=no"
14951fi
14952rm -f conftest.err conftest.$ac_ext
14953fi
14954echo "$as_me:14954: result: `eval echo '${'$as_ac_Header'}'`" >&5
14955echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14956if test `eval echo '${'$as_ac_Header'}'` = yes; then
14957  cat >>confdefs.h <<EOF
14958#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14959EOF
14960
14961fi
14962done
14963
14964	fi
14965fi
14966
14967if test "x$ac_cv_func_grantpt" != xno
14968then
14969	test -n "$verbose" && echo "	will rely upon grantpt" 1>&6
14970
14971echo "${as_me:-configure}:14971: testing will rely upon grantpt ..." 1>&5
14972
14973cat >>confdefs.h <<\EOF
14974#define HAVE_WORKING_GRANTPT 1
14975EOF
14976
14977	for cf_feature in $cf_grantpt_opts
14978	do
14979		cf_feature=`echo "$cf_feature" | sed -e 's/ //g'`
14980
14981cf_FEATURE=`echo "$cf_feature" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14982
14983		cat >>confdefs.h <<EOF
14984#define HAVE_GRANTPT_$cf_FEATURE 1
14985EOF
14986
14987	done
14988elif test "x$cf_have_openpty" = xno
14989then
14990	test -n "$verbose" && echo "	will rely upon BSD-pseudoterminals" 1>&6
14991
14992echo "${as_me:-configure}:14992: testing will rely upon BSD-pseudoterminals ..." 1>&5
14993
14994else
14995	test -n "$verbose" && echo "	will rely upon openpty" 1>&6
14996
14997echo "${as_me:-configure}:14997: testing will rely upon openpty ..." 1>&5
14998
14999fi
15000
15001echo "$as_me:15001: checking if we can use XkbQueryExtension" >&5
15002echo $ECHO_N "checking if we can use XkbQueryExtension... $ECHO_C" >&6
15003if test "${cf_cv_xkb_query_extension+set}" = set; then
15004  echo $ECHO_N "(cached) $ECHO_C" >&6
15005else
15006
15007cat >conftest.$ac_ext <<_ACEOF
15008#line 15008 "configure"
15009#include "confdefs.h"
15010
15011#include <X11/Xlib.h>
15012#include <X11/extensions/XKB.h>
15013#include <X11/XKBlib.h>
15014
15015int
15016main (void)
15017{
15018
15019	int xkbmajor = XkbMajorVersion;
15020	int xkbminor = XkbMinorVersion;
15021	int xkbopcode, xkbevent, xkberror;
15022
15023	if (XkbLibraryVersion(&xkbmajor, &xkbminor)
15024	    && XkbQueryExtension((Display *)0,
15025				 &xkbopcode,
15026				 &xkbevent,
15027				 &xkberror,
15028				 &xkbmajor,
15029				 &xkbminor))
15030		 return 0;
15031
15032  ;
15033  return 0;
15034}
15035_ACEOF
15036rm -f conftest.$ac_objext
15037if { (eval echo "$as_me:15037: \"$ac_compile\"") >&5
15038  (eval $ac_compile) 2>&5
15039  ac_status=$?
15040  echo "$as_me:15040: \$? = $ac_status" >&5
15041  (exit $ac_status); } &&
15042         { ac_try='test -s conftest.$ac_objext'
15043  { (eval echo "$as_me:15043: \"$ac_try\"") >&5
15044  (eval $ac_try) 2>&5
15045  ac_status=$?
15046  echo "$as_me:15046: \$? = $ac_status" >&5
15047  (exit $ac_status); }; }; then
15048
15049cf_cv_xkb_query_extension=yes
15050
15051else
15052  echo "$as_me: failed program was:" >&5
15053cat conftest.$ac_ext >&5
15054
15055cf_cv_xkb_query_extension=no
15056
15057fi
15058rm -f conftest.$ac_objext conftest.$ac_ext
15059
15060fi
15061echo "$as_me:15061: result: $cf_cv_xkb_query_extension" >&5
15062echo "${ECHO_T}$cf_cv_xkb_query_extension" >&6
15063
15064if test $cf_cv_xkb_query_extension = yes
15065then
15066
15067for ac_func in XkbQueryExtension
15068do
15069as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15070echo "$as_me:15070: checking for $ac_func" >&5
15071echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15072if eval "test \"\${$as_ac_var+set}\" = set"; then
15073  echo $ECHO_N "(cached) $ECHO_C" >&6
15074else
15075  cat >conftest.$ac_ext <<_ACEOF
15076#line 15076 "configure"
15077#include "confdefs.h"
15078/* System header to define __stub macros and hopefully few prototypes,
15079    which can conflict with char $ac_func (); below.  */
15080#include <assert.h>
15081/* Override any gcc2 internal prototype to avoid an error.  */
15082#ifdef __cplusplus
15083extern "C"
15084#endif
15085/* We use char because int might match the return type of a gcc2
15086   builtin and then its argument prototype would still apply.  */
15087char $ac_func ();
15088char (*f) ();
15089
15090int
15091main (void)
15092{
15093/* The GNU C library defines this for functions which it implements
15094    to always fail with ENOSYS.  Some functions are actually named
15095    something starting with __ and the normal name is an alias.  */
15096#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15097choke me
15098#else
15099f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15100#endif
15101
15102  ;
15103  return 0;
15104}
15105_ACEOF
15106rm -f conftest.$ac_objext conftest$ac_exeext
15107if { (eval echo "$as_me:15107: \"$ac_link\"") >&5
15108  (eval $ac_link) 2>&5
15109  ac_status=$?
15110  echo "$as_me:15110: \$? = $ac_status" >&5
15111  (exit $ac_status); } &&
15112         { ac_try='test -s conftest$ac_exeext'
15113  { (eval echo "$as_me:15113: \"$ac_try\"") >&5
15114  (eval $ac_try) 2>&5
15115  ac_status=$?
15116  echo "$as_me:15116: \$? = $ac_status" >&5
15117  (exit $ac_status); }; }; then
15118  eval "$as_ac_var=yes"
15119else
15120  echo "$as_me: failed program was:" >&5
15121cat conftest.$ac_ext >&5
15122eval "$as_ac_var=no"
15123fi
15124rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15125fi
15126echo "$as_me:15126: result: `eval echo '${'$as_ac_var'}'`" >&5
15127echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15128if test `eval echo '${'$as_ac_var'}'` = yes; then
15129  cat >>confdefs.h <<EOF
15130#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15131EOF
15132
15133fi
15134done
15135
15136fi
15137
15138echo "$as_me:15138: checking if we can use XkbKeycodeToKeysym" >&5
15139echo $ECHO_N "checking if we can use XkbKeycodeToKeysym... $ECHO_C" >&6
15140if test "${cf_cv_xkb_keycode_to_keysym+set}" = set; then
15141  echo $ECHO_N "(cached) $ECHO_C" >&6
15142else
15143
15144cat >conftest.$ac_ext <<_ACEOF
15145#line 15145 "configure"
15146#include "confdefs.h"
15147
15148#include <X11/Xlib.h>
15149#include <X11/XKBlib.h>
15150
15151int
15152main (void)
15153{
15154
15155    KeySym keysym = XkbKeycodeToKeysym((Display *)0, 0, 0, 0);
15156
15157  ;
15158  return 0;
15159}
15160_ACEOF
15161rm -f conftest.$ac_objext
15162if { (eval echo "$as_me:15162: \"$ac_compile\"") >&5
15163  (eval $ac_compile) 2>&5
15164  ac_status=$?
15165  echo "$as_me:15165: \$? = $ac_status" >&5
15166  (exit $ac_status); } &&
15167         { ac_try='test -s conftest.$ac_objext'
15168  { (eval echo "$as_me:15168: \"$ac_try\"") >&5
15169  (eval $ac_try) 2>&5
15170  ac_status=$?
15171  echo "$as_me:15171: \$? = $ac_status" >&5
15172  (exit $ac_status); }; }; then
15173
15174cf_cv_xkb_keycode_to_keysym=yes
15175
15176else
15177  echo "$as_me: failed program was:" >&5
15178cat conftest.$ac_ext >&5
15179
15180cf_cv_xkb_keycode_to_keysym=no
15181
15182fi
15183rm -f conftest.$ac_objext conftest.$ac_ext
15184
15185fi
15186echo "$as_me:15186: result: $cf_cv_xkb_keycode_to_keysym" >&5
15187echo "${ECHO_T}$cf_cv_xkb_keycode_to_keysym" >&6
15188
15189if test $cf_cv_xkb_keycode_to_keysym = yes
15190then
15191
15192for ac_func in XkbKeycodeToKeysym
15193do
15194as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15195echo "$as_me:15195: checking for $ac_func" >&5
15196echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15197if eval "test \"\${$as_ac_var+set}\" = set"; then
15198  echo $ECHO_N "(cached) $ECHO_C" >&6
15199else
15200  cat >conftest.$ac_ext <<_ACEOF
15201#line 15201 "configure"
15202#include "confdefs.h"
15203/* System header to define __stub macros and hopefully few prototypes,
15204    which can conflict with char $ac_func (); below.  */
15205#include <assert.h>
15206/* Override any gcc2 internal prototype to avoid an error.  */
15207#ifdef __cplusplus
15208extern "C"
15209#endif
15210/* We use char because int might match the return type of a gcc2
15211   builtin and then its argument prototype would still apply.  */
15212char $ac_func ();
15213char (*f) ();
15214
15215int
15216main (void)
15217{
15218/* The GNU C library defines this for functions which it implements
15219    to always fail with ENOSYS.  Some functions are actually named
15220    something starting with __ and the normal name is an alias.  */
15221#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15222choke me
15223#else
15224f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15225#endif
15226
15227  ;
15228  return 0;
15229}
15230_ACEOF
15231rm -f conftest.$ac_objext conftest$ac_exeext
15232if { (eval echo "$as_me:15232: \"$ac_link\"") >&5
15233  (eval $ac_link) 2>&5
15234  ac_status=$?
15235  echo "$as_me:15235: \$? = $ac_status" >&5
15236  (exit $ac_status); } &&
15237         { ac_try='test -s conftest$ac_exeext'
15238  { (eval echo "$as_me:15238: \"$ac_try\"") >&5
15239  (eval $ac_try) 2>&5
15240  ac_status=$?
15241  echo "$as_me:15241: \$? = $ac_status" >&5
15242  (exit $ac_status); }; }; then
15243  eval "$as_ac_var=yes"
15244else
15245  echo "$as_me: failed program was:" >&5
15246cat conftest.$ac_ext >&5
15247eval "$as_ac_var=no"
15248fi
15249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15250fi
15251echo "$as_me:15251: result: `eval echo '${'$as_ac_var'}'`" >&5
15252echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15253if test `eval echo '${'$as_ac_var'}'` = yes; then
15254  cat >>confdefs.h <<EOF
15255#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15256EOF
15257
15258fi
15259done
15260
15261fi
15262
15263echo "$as_me:15263: checking for XKB Bell extension" >&5
15264echo $ECHO_N "checking for XKB Bell extension... $ECHO_C" >&6
15265if test "${cf_cv_xkb_bell_ext+set}" = set; then
15266  echo $ECHO_N "(cached) $ECHO_C" >&6
15267else
15268
15269cat >conftest.$ac_ext <<_ACEOF
15270#line 15270 "configure"
15271#include "confdefs.h"
15272
15273#include <X11/Intrinsic.h>
15274#include <X11/XKBlib.h>		/* has the prototype */
15275#include <X11/extensions/XKBbells.h>	/* has the XkbBI_xxx definitions */
15276
15277int
15278main (void)
15279{
15280
15281	int x = (XkbBI_Info |XkbBI_MinorError |XkbBI_MajorError |XkbBI_TerminalBell |XkbBI_MarginBell);
15282	Atom y;
15283	XkbBell((Display *)0, (Widget)0, 0, y);
15284
15285  ;
15286  return 0;
15287}
15288_ACEOF
15289rm -f conftest.$ac_objext conftest$ac_exeext
15290if { (eval echo "$as_me:15290: \"$ac_link\"") >&5
15291  (eval $ac_link) 2>&5
15292  ac_status=$?
15293  echo "$as_me:15293: \$? = $ac_status" >&5
15294  (exit $ac_status); } &&
15295         { ac_try='test -s conftest$ac_exeext'
15296  { (eval echo "$as_me:15296: \"$ac_try\"") >&5
15297  (eval $ac_try) 2>&5
15298  ac_status=$?
15299  echo "$as_me:15299: \$? = $ac_status" >&5
15300  (exit $ac_status); }; }; then
15301  cf_cv_xkb_bell_ext=yes
15302else
15303  echo "$as_me: failed program was:" >&5
15304cat conftest.$ac_ext >&5
15305cf_cv_xkb_bell_ext=no
15306fi
15307rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15308
15309fi
15310echo "$as_me:15310: result: $cf_cv_xkb_bell_ext" >&5
15311echo "${ECHO_T}$cf_cv_xkb_bell_ext" >&6
15312test "$cf_cv_xkb_bell_ext" = yes &&
15313cat >>confdefs.h <<\EOF
15314#define HAVE_XKB_BELL_EXT 1
15315EOF
15316
15317for ac_func in Xutf8LookupString
15318do
15319as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15320echo "$as_me:15320: checking for $ac_func" >&5
15321echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15322if eval "test \"\${$as_ac_var+set}\" = set"; then
15323  echo $ECHO_N "(cached) $ECHO_C" >&6
15324else
15325  cat >conftest.$ac_ext <<_ACEOF
15326#line 15326 "configure"
15327#include "confdefs.h"
15328/* System header to define __stub macros and hopefully few prototypes,
15329    which can conflict with char $ac_func (); below.  */
15330#include <assert.h>
15331/* Override any gcc2 internal prototype to avoid an error.  */
15332#ifdef __cplusplus
15333extern "C"
15334#endif
15335/* We use char because int might match the return type of a gcc2
15336   builtin and then its argument prototype would still apply.  */
15337char $ac_func ();
15338char (*f) ();
15339
15340int
15341main (void)
15342{
15343/* The GNU C library defines this for functions which it implements
15344    to always fail with ENOSYS.  Some functions are actually named
15345    something starting with __ and the normal name is an alias.  */
15346#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15347choke me
15348#else
15349f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
15350#endif
15351
15352  ;
15353  return 0;
15354}
15355_ACEOF
15356rm -f conftest.$ac_objext conftest$ac_exeext
15357if { (eval echo "$as_me:15357: \"$ac_link\"") >&5
15358  (eval $ac_link) 2>&5
15359  ac_status=$?
15360  echo "$as_me:15360: \$? = $ac_status" >&5
15361  (exit $ac_status); } &&
15362         { ac_try='test -s conftest$ac_exeext'
15363  { (eval echo "$as_me:15363: \"$ac_try\"") >&5
15364  (eval $ac_try) 2>&5
15365  ac_status=$?
15366  echo "$as_me:15366: \$? = $ac_status" >&5
15367  (exit $ac_status); }; }; then
15368  eval "$as_ac_var=yes"
15369else
15370  echo "$as_me: failed program was:" >&5
15371cat conftest.$ac_ext >&5
15372eval "$as_ac_var=no"
15373fi
15374rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15375fi
15376echo "$as_me:15376: result: `eval echo '${'$as_ac_var'}'`" >&5
15377echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
15378if test `eval echo '${'$as_ac_var'}'` = yes; then
15379  cat >>confdefs.h <<EOF
15380#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15381EOF
15382
15383else
15384
15385	EXTRAHDRS="$EXTRAHDRS xutf8.h"
15386	EXTRASRCS="$EXTRASRCS xutf8.c"
15387	EXTRAOBJS="$EXTRAOBJS xutf8.o"
15388
15389fi
15390done
15391
15392echo "$as_me:15392: checking if you want narrow prototypes for X libraries" >&5
15393echo $ECHO_N "checking if you want narrow prototypes for X libraries... $ECHO_C" >&6
15394
15395case `$ac_config_guess` in
15396(*freebsd*|*gnu*|*irix5*|*irix6*|*linux-gnu*|*netbsd*|*openbsd*|*qnx*|*sco*|*sgi*)
15397	cf_default_narrowproto=yes
15398	;;
15399(*)
15400	cf_default_narrowproto=no
15401	;;
15402esac
15403
15404# Check whether --enable-narrowproto or --disable-narrowproto was given.
15405if test "${enable_narrowproto+set}" = set; then
15406  enableval="$enable_narrowproto"
15407  test "$enableval" != no && enableval=yes
15408	if test "$enableval" != "$cf_default_narrowproto" ; then
15409    enable_narrowproto=$enableval
15410	else
15411		enable_narrowproto=$cf_default_narrowproto
15412	fi
15413else
15414  enableval=$cf_default_narrowproto
15415	enable_narrowproto=$cf_default_narrowproto
15416
15417fi;
15418echo "$as_me:15418: result: $enable_narrowproto" >&5
15419echo "${ECHO_T}$enable_narrowproto" >&6
15420
15421echo "$as_me:15421: checking if we should use imake to help" >&5
15422echo $ECHO_N "checking if we should use imake to help... $ECHO_C" >&6
15423
15424# Check whether --enable-imake or --disable-imake was given.
15425if test "${enable_imake+set}" = set; then
15426  enableval="$enable_imake"
15427  test "$enableval" != no && enableval=yes
15428	if test "$enableval" != "yes" ; then
15429    enable_imake=no
15430	else
15431		enable_imake=yes
15432	fi
15433else
15434  enableval=yes
15435	enable_imake=yes
15436
15437fi;
15438echo "$as_me:15438: result: $enable_imake" >&5
15439echo "${ECHO_T}$enable_imake" >&6
15440
15441if test "$enable_imake" = yes ; then
15442
15443for ac_prog in xmkmf imake
15444do
15445  # Extract the first word of "$ac_prog", so it can be a program name with args.
15446set dummy $ac_prog; ac_word=$2
15447echo "$as_me:15447: checking for $ac_word" >&5
15448echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15449if test "${ac_cv_path_IMAKE+set}" = set; then
15450  echo $ECHO_N "(cached) $ECHO_C" >&6
15451else
15452  case $IMAKE in
15453  [\\/]* | ?:[\\/]*)
15454  ac_cv_path_IMAKE="$IMAKE" # Let the user override the test with a path.
15455  ;;
15456  *)
15457  ac_save_IFS=$IFS; IFS=$ac_path_separator
15458ac_dummy="$PATH"
15459for ac_dir in $ac_dummy; do
15460  IFS=$ac_save_IFS
15461  test -z "$ac_dir" && ac_dir=.
15462  if $as_executable_p "$ac_dir/$ac_word"; then
15463   ac_cv_path_IMAKE="$ac_dir/$ac_word"
15464   echo "$as_me:15464: found $ac_dir/$ac_word" >&5
15465   break
15466fi
15467done
15468
15469  ;;
15470esac
15471fi
15472IMAKE=$ac_cv_path_IMAKE
15473
15474if test -n "$IMAKE"; then
15475  echo "$as_me:15475: result: $IMAKE" >&5
15476echo "${ECHO_T}$IMAKE" >&6
15477else
15478  echo "$as_me:15478: result: no" >&5
15479echo "${ECHO_T}no" >&6
15480fi
15481
15482  test -n "$IMAKE" && break
15483done
15484
15485if test -n "$IMAKE" ; then
15486
15487case $IMAKE in
15488(*/imake)
15489	cf_imake_opts="-DUseInstalled=YES"
15490	;;
15491(*/util/xmkmf)
15492	# A single parameter tells xmkmf where the config-files are:
15493	cf_imake_opts="`echo $IMAKE|sed -e s,/config/util/xmkmf,,`"
15494	;;
15495(*)
15496	cf_imake_opts=
15497	;;
15498esac
15499
15500# If it's installed properly, imake (or its wrapper, xmkmf) will point to the
15501# config directory.
15502if mkdir conftestdir; then
15503	CDPATH=; export CDPATH
15504	cf_makefile=`cd $srcdir;pwd`/Imakefile
15505	cd conftestdir
15506
15507	cat >fix_cflags.sed <<'CF_EOF'
15508s/\\//g
15509s/[ 	][ 	]*/ /g
15510s/"//g
15511:pack
15512s/\(=[^ ][^ ]*\) \([^-]\)/\1	\2/g
15513t pack
15514s/\(-D[a-zA-Z0-9_][a-zA-Z0-9_]*\)=\([^\'0-9 ][^ ]*\)/\1='\\"\2\\"'/g
15515s/^IMAKE[ ]/IMAKE_CFLAGS="/
15516s/	/ /g
15517s/$/"/
15518CF_EOF
15519
15520	cat >fix_lflags.sed <<'CF_EOF'
15521s/^IMAKE[ 	]*/IMAKE_LOADFLAGS="/
15522s/$/"/
15523CF_EOF
15524
15525	echo >./Imakefile
15526	test -f $cf_makefile && cat $cf_makefile >>./Imakefile
15527
15528	cat >> ./Imakefile <<'CF_EOF'
15529findstddefs:
15530	@echo IMAKE ${ALLDEFINES} $(MAIN_DEFINES) $(VENDORMANDEFS)       | sed -f fix_cflags.sed
15531	@echo IMAKE ${EXTRA_LOAD_FLAGS} | sed -f fix_lflags.sed
15532CF_EOF
15533
15534	if ( $IMAKE $cf_imake_opts 1>/dev/null 2>&5 && test -f Makefile)
15535	then
15536		test -n "$verbose" && echo "	Using $IMAKE $cf_imake_opts" 1>&6
15537
15538echo "${as_me:-configure}:15538: testing Using $IMAKE $cf_imake_opts ..." 1>&5
15539
15540	else
15541		# sometimes imake doesn't have the config path compiled in.  Find it.
15542		cf_config=
15543		for cf_libpath in $X_LIBS $LIBS ; do
15544			case $cf_libpath in
15545			(-L*)
15546				cf_libpath=`echo .$cf_libpath | sed -e 's/^...//'`
15547				cf_libpath=$cf_libpath/X11/config
15548				if test -d $cf_libpath ; then
15549					cf_config=$cf_libpath
15550					break
15551				fi
15552				;;
15553			esac
15554		done
15555		if test -z "$cf_config" ; then
15556			{ echo "$as_me:15556: WARNING: Could not find imake config-directory" >&5
15557echo "$as_me: WARNING: Could not find imake config-directory" >&2;}
15558		else
15559			cf_imake_opts="$cf_imake_opts -I$cf_config"
15560			if ( $IMAKE -v $cf_imake_opts 2>&5)
15561			then
15562				test -n "$verbose" && echo "	Using $IMAKE $cf_config" 1>&6
15563
15564echo "${as_me:-configure}:15564: testing Using $IMAKE $cf_config ..." 1>&5
15565
15566			else
15567				{ echo "$as_me:15567: WARNING: Cannot run $IMAKE" >&5
15568echo "$as_me: WARNING: Cannot run $IMAKE" >&2;}
15569			fi
15570		fi
15571	fi
15572
15573	# GNU make sometimes prints "make[1]: Entering...", which
15574	# would confuse us.
15575	eval `make findstddefs 2>/dev/null | grep -v make`
15576
15577	cd ..
15578	rm -rf conftestdir
15579
15580	# We use ${ALLDEFINES} rather than ${STD_DEFINES} because the former
15581	# declares XTFUNCPROTO there.  However, some vendors (e.g., SGI) have
15582	# modified it to support site.cf, adding a kludge for the /usr/include
15583	# directory.  Try to filter that out, otherwise gcc won't find its
15584	# headers.
15585	if test -n "$GCC" ; then
15586	    if test -n "$IMAKE_CFLAGS" ; then
15587		cf_nostdinc=""
15588		cf_std_incl=""
15589		cf_cpp_opts=""
15590		for cf_opt in $IMAKE_CFLAGS
15591		do
15592		    case "$cf_opt" in
15593		    (-nostdinc)
15594			cf_nostdinc="$cf_opt"
15595			;;
15596		    (-I/usr/include)
15597			cf_std_incl="$cf_opt"
15598			;;
15599		    (*)
15600			cf_cpp_opts="$cf_cpp_opts $cf_opt"
15601			;;
15602		    esac
15603		done
15604		if test -z "$cf_nostdinc" ; then
15605		    IMAKE_CFLAGS="$cf_cpp_opts $cf_std_incl"
15606		elif test -z "$cf_std_incl" ; then
15607		    IMAKE_CFLAGS="$cf_cpp_opts $cf_nostdinc"
15608		else
15609		    test -n "$verbose" && echo "	suppressed \"$cf_nostdinc\" and \"$cf_std_incl\"" 1>&6
15610
15611echo "${as_me:-configure}:15611: testing suppressed \"$cf_nostdinc\" and \"$cf_std_incl\" ..." 1>&5
15612
15613		    IMAKE_CFLAGS="$cf_cpp_opts"
15614		fi
15615	    fi
15616	fi
15617fi
15618
15619# Some imake configurations define PROJECTROOT with an empty value.  Remove
15620# the empty definition.
15621case $IMAKE_CFLAGS in
15622(*-DPROJECTROOT=/*)
15623	;;
15624(*)
15625	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" |sed -e "s,-DPROJECTROOT=[ 	], ,"`
15626	;;
15627esac
15628
15629fi
15630
15631test -n "$verbose" && echo "	IMAKE_CFLAGS $IMAKE_CFLAGS" 1>&6
15632
15633echo "${as_me:-configure}:15633: testing IMAKE_CFLAGS $IMAKE_CFLAGS ..." 1>&5
15634
15635test -n "$verbose" && echo "	IMAKE_LOADFLAGS $IMAKE_LOADFLAGS" 1>&6
15636
15637echo "${as_me:-configure}:15637: testing IMAKE_LOADFLAGS $IMAKE_LOADFLAGS ..." 1>&5
15638
15639fi
15640
15641if test -n "$IMAKE" && test -n "$IMAKE_CFLAGS" ; then
15642
15643cf_fix_cppflags=no
15644cf_new_cflags=
15645cf_new_cppflags=
15646cf_new_extra_cppflags=
15647
15648for cf_add_cflags in $IMAKE_CFLAGS
15649do
15650case $cf_fix_cppflags in
15651(no)
15652	case $cf_add_cflags in
15653	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15654		case $cf_add_cflags in
15655		(-D*)
15656			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15657
15658			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15659				&& test -z "${cf_tst_cflags}" \
15660				&& cf_fix_cppflags=yes
15661
15662			if test $cf_fix_cppflags = yes ; then
15663
15664	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15665	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15666
15667				continue
15668			elif test "${cf_tst_cflags}" = "\"'" ; then
15669
15670	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15671	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15672
15673				continue
15674			fi
15675			;;
15676		esac
15677		case "$CPPFLAGS" in
15678		(*$cf_add_cflags)
15679			;;
15680		(*)
15681			case $cf_add_cflags in
15682			(-D*)
15683				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15684
15685CPPFLAGS=`echo "$CPPFLAGS" | \
15686	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15687		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15688
15689				;;
15690			esac
15691
15692	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15693	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15694
15695			;;
15696		esac
15697		;;
15698	(*)
15699
15700	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15701	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15702
15703		;;
15704	esac
15705	;;
15706(yes)
15707
15708	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15709	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15710
15711	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15712
15713	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15714		&& test -z "${cf_tst_cflags}" \
15715		&& cf_fix_cppflags=no
15716	;;
15717esac
15718done
15719
15720if test -n "$cf_new_cflags" ; then
15721
15722	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15723	CFLAGS="${CFLAGS}$cf_new_cflags"
15724
15725fi
15726
15727if test -n "$cf_new_cppflags" ; then
15728
15729	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15730	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15731
15732fi
15733
15734if test -n "$cf_new_extra_cppflags" ; then
15735
15736	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15737	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15738
15739fi
15740
15741else
15742	IMAKE_CFLAGS=
15743	IMAKE_LOADFLAGS=
15744	test -n "$verbose" && echo "	make fallback definitions" 1>&6
15745
15746echo "${as_me:-configure}:15746: testing make fallback definitions ..." 1>&5
15747
15748	# We prefer config.guess' values when we can get them, to avoid
15749	# inconsistent results with uname (AIX for instance).  However,
15750	# config.guess is not always consistent either.
15751	case $host_os in
15752	(*[0-9].[0-9]*)
15753		UNAME_RELEASE="$host_os"
15754		;;
15755	(*)
15756		UNAME_RELEASE=`(uname -r) 2>/dev/null` || UNAME_RELEASE=unknown
15757		;;
15758	esac
15759
15760	case .$UNAME_RELEASE in
15761	(*[0-9].[0-9]*)
15762		OSMAJORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/\..*//'`
15763		OSMINORVERSION=`echo "$UNAME_RELEASE" |sed -e 's/^[^0-9]*//' -e 's/^[^.]*\.//' -e 's/\..*//' -e 's/[^0-9].*//' `
15764		test -z "$OSMAJORVERSION" && OSMAJORVERSION=1
15765		test -z "$OSMINORVERSION" && OSMINORVERSION=0
15766		IMAKE_CFLAGS="-DOSMAJORVERSION=$OSMAJORVERSION -DOSMINORVERSION=$OSMINORVERSION $IMAKE_CFLAGS"
15767		;;
15768	esac
15769
15770	# FUNCPROTO is standard with X11R6, but XFree86 drops it, leaving some
15771	# fallback/fragments for NeedPrototypes, etc.
15772	IMAKE_CFLAGS="-DFUNCPROTO=15 $IMAKE_CFLAGS"
15773
15774	# If this is not set properly, Xaw's scrollbars will not work
15775	if test "$enable_narrowproto" = yes ; then
15776		IMAKE_CFLAGS="-DNARROWPROTO=1 $IMAKE_CFLAGS"
15777	fi
15778
15779	# Other special definitions:
15780	case $host_os in
15781	(aix*)
15782		# imake on AIX 5.1 defines AIXV3.  really.
15783		IMAKE_CFLAGS="-DAIXV3 -DAIXV4 $IMAKE_CFLAGS"
15784		;;
15785	(irix[56].*)
15786		# these are needed to make SIGWINCH work in xterm
15787		IMAKE_CFLAGS="-DSYSV -DSVR4 $IMAKE_CFLAGS"
15788		;;
15789	esac
15790
15791cf_fix_cppflags=no
15792cf_new_cflags=
15793cf_new_cppflags=
15794cf_new_extra_cppflags=
15795
15796for cf_add_cflags in $IMAKE_CFLAGS
15797do
15798case $cf_fix_cppflags in
15799(no)
15800	case $cf_add_cflags in
15801	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
15802		case $cf_add_cflags in
15803		(-D*)
15804			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
15805
15806			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15807				&& test -z "${cf_tst_cflags}" \
15808				&& cf_fix_cppflags=yes
15809
15810			if test $cf_fix_cppflags = yes ; then
15811
15812	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15813	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15814
15815				continue
15816			elif test "${cf_tst_cflags}" = "\"'" ; then
15817
15818	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15819	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15820
15821				continue
15822			fi
15823			;;
15824		esac
15825		case "$CPPFLAGS" in
15826		(*$cf_add_cflags)
15827			;;
15828		(*)
15829			case $cf_add_cflags in
15830			(-D*)
15831				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
15832
15833CPPFLAGS=`echo "$CPPFLAGS" | \
15834	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
15835		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
15836
15837				;;
15838			esac
15839
15840	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
15841	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
15842
15843			;;
15844		esac
15845		;;
15846	(*)
15847
15848	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
15849	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
15850
15851		;;
15852	esac
15853	;;
15854(yes)
15855
15856	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
15857	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
15858
15859	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
15860
15861	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
15862		&& test -z "${cf_tst_cflags}" \
15863		&& cf_fix_cppflags=no
15864	;;
15865esac
15866done
15867
15868if test -n "$cf_new_cflags" ; then
15869
15870	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
15871	CFLAGS="${CFLAGS}$cf_new_cflags"
15872
15873fi
15874
15875if test -n "$cf_new_cppflags" ; then
15876
15877	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15878	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
15879
15880fi
15881
15882if test -n "$cf_new_extra_cppflags" ; then
15883
15884	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
15885	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
15886
15887fi
15888
15889fi
15890
15891# Extract the first word of "groff", so it can be a program name with args.
15892set dummy groff; ac_word=$2
15893echo "$as_me:15893: checking for $ac_word" >&5
15894echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15895if test "${ac_cv_path_GROFF_PATH+set}" = set; then
15896  echo $ECHO_N "(cached) $ECHO_C" >&6
15897else
15898  case $GROFF_PATH in
15899  [\\/]* | ?:[\\/]*)
15900  ac_cv_path_GROFF_PATH="$GROFF_PATH" # Let the user override the test with a path.
15901  ;;
15902  *)
15903  ac_save_IFS=$IFS; IFS=$ac_path_separator
15904ac_dummy="$PATH"
15905for ac_dir in $ac_dummy; do
15906  IFS=$ac_save_IFS
15907  test -z "$ac_dir" && ac_dir=.
15908  if $as_executable_p "$ac_dir/$ac_word"; then
15909   ac_cv_path_GROFF_PATH="$ac_dir/$ac_word"
15910   echo "$as_me:15910: found $ac_dir/$ac_word" >&5
15911   break
15912fi
15913done
15914
15915  test -z "$ac_cv_path_GROFF_PATH" && ac_cv_path_GROFF_PATH="no"
15916  ;;
15917esac
15918fi
15919GROFF_PATH=$ac_cv_path_GROFF_PATH
15920
15921if test -n "$GROFF_PATH"; then
15922  echo "$as_me:15922: result: $GROFF_PATH" >&5
15923echo "${ECHO_T}$GROFF_PATH" >&6
15924else
15925  echo "$as_me:15925: result: no" >&5
15926echo "${ECHO_T}no" >&6
15927fi
15928
15929# Extract the first word of "nroff", so it can be a program name with args.
15930set dummy nroff; ac_word=$2
15931echo "$as_me:15931: checking for $ac_word" >&5
15932echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15933if test "${ac_cv_path_NROFF_PATH+set}" = set; then
15934  echo $ECHO_N "(cached) $ECHO_C" >&6
15935else
15936  case $NROFF_PATH in
15937  [\\/]* | ?:[\\/]*)
15938  ac_cv_path_NROFF_PATH="$NROFF_PATH" # Let the user override the test with a path.
15939  ;;
15940  *)
15941  ac_save_IFS=$IFS; IFS=$ac_path_separator
15942ac_dummy="$PATH"
15943for ac_dir in $ac_dummy; do
15944  IFS=$ac_save_IFS
15945  test -z "$ac_dir" && ac_dir=.
15946  if $as_executable_p "$ac_dir/$ac_word"; then
15947   ac_cv_path_NROFF_PATH="$ac_dir/$ac_word"
15948   echo "$as_me:15948: found $ac_dir/$ac_word" >&5
15949   break
15950fi
15951done
15952
15953  test -z "$ac_cv_path_NROFF_PATH" && ac_cv_path_NROFF_PATH="no"
15954  ;;
15955esac
15956fi
15957NROFF_PATH=$ac_cv_path_NROFF_PATH
15958
15959if test -n "$NROFF_PATH"; then
15960  echo "$as_me:15960: result: $NROFF_PATH" >&5
15961echo "${ECHO_T}$NROFF_PATH" >&6
15962else
15963  echo "$as_me:15963: result: no" >&5
15964echo "${ECHO_T}no" >&6
15965fi
15966
15967if test "x$GROFF_PATH" = xno
15968then
15969	NROFF_NOTE=
15970	GROFF_NOTE="#"
15971else
15972	NROFF_NOTE="#"
15973	GROFF_NOTE=
15974fi
15975
15976echo "$as_me:15976: checking for program to convert manpage to html" >&5
15977echo $ECHO_N "checking for program to convert manpage to html... $ECHO_C" >&6
15978
15979# Check whether --with-man2html or --without-man2html was given.
15980if test "${with_man2html+set}" = set; then
15981  withval="$with_man2html"
15982  cf_man2html=$withval
15983else
15984  cf_man2html=$GROFF_PATH
15985fi;
15986
15987cf_with_groff=no
15988
15989case $cf_man2html in
15990(yes)
15991	echo "$as_me:15991: result: man2html" >&5
15992echo "${ECHO_T}man2html" >&6
15993	# Extract the first word of "man2html", so it can be a program name with args.
15994set dummy man2html; ac_word=$2
15995echo "$as_me:15995: checking for $ac_word" >&5
15996echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
15997if test "${ac_cv_path_cf_man2html+set}" = set; then
15998  echo $ECHO_N "(cached) $ECHO_C" >&6
15999else
16000  case $cf_man2html in
16001  [\\/]* | ?:[\\/]*)
16002  ac_cv_path_cf_man2html="$cf_man2html" # Let the user override the test with a path.
16003  ;;
16004  *)
16005  ac_save_IFS=$IFS; IFS=$ac_path_separator
16006ac_dummy="$PATH"
16007for ac_dir in $ac_dummy; do
16008  IFS=$ac_save_IFS
16009  test -z "$ac_dir" && ac_dir=.
16010  if $as_executable_p "$ac_dir/$ac_word"; then
16011   ac_cv_path_cf_man2html="$ac_dir/$ac_word"
16012   echo "$as_me:16012: found $ac_dir/$ac_word" >&5
16013   break
16014fi
16015done
16016
16017  test -z "$ac_cv_path_cf_man2html" && ac_cv_path_cf_man2html="no"
16018  ;;
16019esac
16020fi
16021cf_man2html=$ac_cv_path_cf_man2html
16022
16023if test -n "$cf_man2html"; then
16024  echo "$as_me:16024: result: $cf_man2html" >&5
16025echo "${ECHO_T}$cf_man2html" >&6
16026else
16027  echo "$as_me:16027: result: no" >&5
16028echo "${ECHO_T}no" >&6
16029fi
16030
16031	;;
16032(no|groff|*/groff*)
16033	cf_with_groff=yes
16034	cf_man2html=$GROFF_PATH
16035	echo "$as_me:16035: result: $cf_man2html" >&5
16036echo "${ECHO_T}$cf_man2html" >&6
16037	;;
16038(*)
16039	echo "$as_me:16039: result: $cf_man2html" >&5
16040echo "${ECHO_T}$cf_man2html" >&6
16041	;;
16042esac
16043
16044MAN2HTML_TEMP="man2html.tmp"
16045	cat >$MAN2HTML_TEMP <<CF_EOF
16046#!$SHELL
16047# Temporary script generated by CF_WITH_MAN2HTML
16048# Convert inputs to html, sending result to standard output.
16049#
16050# Parameters:
16051# \${1} = rootname of file to convert
16052# \${2} = suffix of file to convert, e.g., "1"
16053# \${3} = macros to use, e.g., "man"
16054#
16055ROOT=\$1
16056TYPE=\$2
16057MACS=\$3
16058
16059unset LANG
16060unset LC_ALL
16061unset LC_CTYPE
16062unset LANGUAGE
16063GROFF_NO_SGR=stupid
16064export GROFF_NO_SGR
16065
16066CF_EOF
16067
16068if test "x$cf_with_groff" = xyes
16069then
16070	MAN2HTML_NOTE="$GROFF_NOTE"
16071	MAN2HTML_PATH="$GROFF_PATH"
16072	cat >>$MAN2HTML_TEMP <<CF_EOF
16073$SHELL -c "tbl \${ROOT}.\${TYPE} | $GROFF_PATH -P -o0 -I\${ROOT}_ -Thtml -\${MACS}"
16074CF_EOF
16075else
16076	MAN2HTML_NOTE=""
16077
16078if test "x$prefix" != xNONE; then
16079	cf_path_syntax="$prefix"
16080else
16081	cf_path_syntax="$ac_default_prefix"
16082fi
16083
16084case ".$cf_man2html" in
16085(.\$\(*\)*|.\'*\'*)
16086	;;
16087(..|./*|.\\*)
16088	;;
16089(.[a-zA-Z]:[\\/]*) # OS/2 EMX
16090	;;
16091(.\${*prefix}*|.\${*dir}*)
16092	eval cf_man2html="$cf_man2html"
16093	case ".$cf_man2html" in
16094	(.NONE/*)
16095		cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
16096		;;
16097	esac
16098	;;
16099(.no|.NONE/*)
16100	cf_man2html=`echo $cf_man2html | sed -e s%NONE%$cf_path_syntax%`
16101	;;
16102(*)
16103	{ { echo "$as_me:16103: error: expected a pathname, not \"$cf_man2html\"" >&5
16104echo "$as_me: error: expected a pathname, not \"$cf_man2html\"" >&2;}
16105   { (exit 1); exit 1; }; }
16106	;;
16107esac
16108
16109	MAN2HTML_PATH="$cf_man2html"
16110	echo "$as_me:16110: checking for $cf_man2html top/bottom margins" >&5
16111echo $ECHO_N "checking for $cf_man2html top/bottom margins... $ECHO_C" >&6
16112
16113	# for this example, expect 3 lines of content, the remainder is head/foot
16114	cat >conftest.in <<CF_EOF
16115.TH HEAD1 HEAD2 HEAD3 HEAD4 HEAD5
16116.SH SECTION
16117MARKER
16118CF_EOF
16119
16120	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
16121
16122	cf_man2html_1st=`fgrep -n MARKER conftest.out |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
16123	cf_man2html_top=`expr $cf_man2html_1st - 2`
16124	cf_man2html_bot=`wc -l conftest.out |sed -e 's/[^0-9]//g'`
16125	cf_man2html_bot=`expr $cf_man2html_bot - 2 - $cf_man2html_top`
16126	cf_man2html_top_bot="-topm=$cf_man2html_top -botm=$cf_man2html_bot"
16127
16128	echo "$as_me:16128: result: $cf_man2html_top_bot" >&5
16129echo "${ECHO_T}$cf_man2html_top_bot" >&6
16130
16131	echo "$as_me:16131: checking for pagesize to use" >&5
16132echo $ECHO_N "checking for pagesize to use... $ECHO_C" >&6
16133	for cf_block in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
16134	do
16135	cat >>conftest.in <<CF_EOF
16136.nf
161370
161381
161392
161403
161414
161425
161436
161447
161458
161469
16147CF_EOF
16148	done
16149
16150	LC_ALL=C LC_CTYPE=C LANG=C LANGUAGE=C nroff -man conftest.in >conftest.out
16151	cf_man2html_page=`fgrep -n HEAD1 conftest.out |tail -n 1 |sed -e 's/^[^0-9]*://' -e 's/:.*//'`
16152	test -z "$cf_man2html_page" && cf_man2html_page=99999
16153	test "$cf_man2html_page" -gt 100 && cf_man2html_page=99999
16154
16155	rm -rf conftest*
16156	echo "$as_me:16156: result: $cf_man2html_page" >&5
16157echo "${ECHO_T}$cf_man2html_page" >&6
16158
16159	cat >>$MAN2HTML_TEMP <<CF_EOF
16160: \${MAN2HTML_PATH=$MAN2HTML_PATH}
16161MAN2HTML_OPTS="\$MAN2HTML_OPTS -index -title="\$ROOT\(\$TYPE\)" -compress -pgsize $cf_man2html_page"
16162case \${TYPE} in
16163(ms)
16164	tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH -topm=0 -botm=0 \$MAN2HTML_OPTS
16165	;;
16166(*)
16167	tbl \${ROOT}.\${TYPE} | nroff -\${MACS} | \$MAN2HTML_PATH $cf_man2html_top_bot \$MAN2HTML_OPTS
16168	;;
16169esac
16170CF_EOF
16171fi
16172
16173chmod 700 $MAN2HTML_TEMP
16174
16175# If we have already established that there is a full termcap implementation,
16176# suppress the definitions for terminfo that we make have imported from the
16177# imake-file.
16178if test "x$cf_cv_lib_tgetent" != xno || test "x$cf_cv_lib_part_tgetent" != xno ; then
16179	case "$IMAKE_CFLAGS" in
16180	(*-DUSE_TERMINFO\ -DHAVE_TIGETSTR*)
16181
16182	test -n "$verbose" && echo "	removing terminfo flags from IMAKE_CFLAGS" 1>&6
16183
16184echo "${as_me:-configure}:16184: testing removing terminfo flags from IMAKE_CFLAGS ..." 1>&5
16185
16186	IMAKE_CFLAGS=`echo "$IMAKE_CFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
16187	test -n "$verbose" && echo "	...result $IMAKE_CFLAGS" 1>&6
16188
16189echo "${as_me:-configure}:16189: testing ...result $IMAKE_CFLAGS ..." 1>&5
16190
16191	test -n "$verbose" && echo "	removing terminfo flags from CPPFLAGS" 1>&6
16192
16193echo "${as_me:-configure}:16193: testing removing terminfo flags from CPPFLAGS ..." 1>&5
16194
16195	CPPFLAGS=`echo "$CPPFLAGS" | sed -e 's/-DUSE_TERMINFO[ 	]*-DHAVE_TIGETSTR[ 	]*//'`
16196	test -n "$verbose" && echo "	...result $CPPFLAGS" 1>&6
16197
16198echo "${as_me:-configure}:16198: testing ...result $CPPFLAGS ..." 1>&5
16199
16200		;;
16201	esac
16202fi
16203
16204echo "$as_me:16204: checking for default terminal-id" >&5
16205echo $ECHO_N "checking for default terminal-id... $ECHO_C" >&6
16206
16207# Check whether --with-terminal-id or --without-terminal-id was given.
16208if test "${with_terminal_id+set}" = set; then
16209  withval="$with_terminal_id"
16210  default_termid=$withval
16211else
16212  default_termid=vt420
16213fi;
16214echo "$as_me:16214: result: $default_termid" >&5
16215echo "${ECHO_T}$default_termid" >&6
16216case $default_termid in
16217(vt*)	default_termid=`echo $default_termid | sed -e 's/^..//'`
16218	;;
16219esac
16220
16221cat >>confdefs.h <<EOF
16222#define DFT_DECID "$default_termid"
16223EOF
16224
16225echo "$as_me:16225: checking for default terminal-type" >&5
16226echo $ECHO_N "checking for default terminal-type... $ECHO_C" >&6
16227
16228# Check whether --with-terminal-type or --without-terminal-type was given.
16229if test "${with_terminal_type+set}" = set; then
16230  withval="$with_terminal_type"
16231  default_TERM=$withval
16232else
16233  default_TERM=xterm
16234fi;
16235echo "$as_me:16235: result: $default_TERM" >&5
16236echo "${ECHO_T}$default_TERM" >&6
16237
16238cat >>confdefs.h <<EOF
16239#define DFT_TERMTYPE "$default_TERM"
16240EOF
16241
16242###############################################################################
16243echo "$as_me:16243: checking if backarrow-key should be BS" >&5
16244echo $ECHO_N "checking if backarrow-key should be BS... $ECHO_C" >&6
16245
16246# Check whether --enable-backarrow-key or --disable-backarrow-key was given.
16247if test "${enable_backarrow_key+set}" = set; then
16248  enableval="$enable_backarrow_key"
16249  test "$enableval" != no && enableval=yes
16250	if test "$enableval" != "yes" ; then
16251    backarrow_is_bs=$enableval
16252	else
16253		backarrow_is_bs=yes
16254	fi
16255else
16256  enableval=yes
16257	backarrow_is_bs=yes
16258
16259fi;
16260
16261echo "$as_me:16261: result: $backarrow_is_bs" >&5
16262echo "${ECHO_T}$backarrow_is_bs" >&6
16263case $backarrow_is_bs in
16264(yes)
16265	backarrow_is_bs=true
16266	;;
16267(no)
16268	backarrow_is_bs=false
16269	;;
16270esac
16271cf_xbool1=`echo "$backarrow_is_bs"|sed -e 's/^\(.\).*/\1/'`
16272
16273cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16274
16275cf_xbool2=`echo "$backarrow_is_bs"|sed -e 's/^.//'`
16276backarrow_is_bs=${cf_xbool1}${cf_xbool2}
16277
16278cat >>confdefs.h <<EOF
16279#define DEF_BACKARO_BS $backarrow_is_bs
16280EOF
16281
16282echo "$as_me:16282: checking if backarrow-key should be treated as erase" >&5
16283echo $ECHO_N "checking if backarrow-key should be treated as erase... $ECHO_C" >&6
16284
16285# Check whether --enable-backarrow-is-erase or --disable-backarrow-is-erase was given.
16286if test "${enable_backarrow_is_erase+set}" = set; then
16287  enableval="$enable_backarrow_is_erase"
16288  test "$enableval" != yes && enableval=no
16289	if test "$enableval" != "no" ; then
16290    backarrow_is_erase=$enableval
16291	else
16292		backarrow_is_erase=no
16293	fi
16294else
16295  enableval=no
16296	backarrow_is_erase=no
16297
16298fi;
16299
16300echo "$as_me:16300: result: $backarrow_is_erase" >&5
16301echo "${ECHO_T}$backarrow_is_erase" >&6
16302case $backarrow_is_erase in
16303(yes)
16304	backarrow_is_erase=true
16305	;;
16306(no)
16307	backarrow_is_erase=false
16308	;;
16309esac
16310cf_xbool1=`echo "$backarrow_is_erase"|sed -e 's/^\(.\).*/\1/'`
16311
16312cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16313
16314cf_xbool2=`echo "$backarrow_is_erase"|sed -e 's/^.//'`
16315backarrow_is_erase=${cf_xbool1}${cf_xbool2}
16316
16317cat >>confdefs.h <<EOF
16318#define DEF_BACKARO_ERASE $backarrow_is_erase
16319EOF
16320
16321echo "$as_me:16321: checking for default backspace/DEL setting" >&5
16322echo $ECHO_N "checking for default backspace/DEL setting... $ECHO_C" >&6
16323
16324# Check whether --enable-delete-is-del or --disable-delete-is-del was given.
16325if test "${enable_delete_is_del+set}" = set; then
16326  enableval="$enable_delete_is_del"
16327  delete_is_del=$enableval
16328else
16329  delete_is_del=maybe
16330fi;
16331
16332echo "$as_me:16332: result: $delete_is_del" >&5
16333echo "${ECHO_T}$delete_is_del" >&6
16334case $delete_is_del in
16335(yes)
16336	delete_is_del=true
16337	;;
16338(no)
16339	delete_is_del=false
16340	;;
16341esac
16342cf_xbool1=`echo "$delete_is_del"|sed -e 's/^\(.\).*/\1/'`
16343
16344cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16345
16346cf_xbool2=`echo "$delete_is_del"|sed -e 's/^.//'`
16347delete_is_del=${cf_xbool1}${cf_xbool2}
16348
16349cat >>confdefs.h <<EOF
16350#define DEFDELETE_DEL $delete_is_del
16351EOF
16352
16353echo "$as_me:16353: checking for default pty initial erase setting" >&5
16354echo $ECHO_N "checking for default pty initial erase setting... $ECHO_C" >&6
16355
16356# Check whether --enable-pty-erase or --disable-pty-erase was given.
16357if test "${enable_pty_erase+set}" = set; then
16358  enableval="$enable_pty_erase"
16359  initial_erase=$enableval
16360else
16361  initial_erase=False
16362fi;
16363
16364echo "$as_me:16364: result: $initial_erase" >&5
16365echo "${ECHO_T}$initial_erase" >&6
16366case $initial_erase in
16367(yes)
16368	initial_erase=true
16369	;;
16370(no)
16371	initial_erase=false
16372	;;
16373esac
16374cf_xbool1=`echo "$initial_erase"|sed -e 's/^\(.\).*/\1/'`
16375
16376cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16377
16378cf_xbool2=`echo "$initial_erase"|sed -e 's/^.//'`
16379initial_erase=${cf_xbool1}${cf_xbool2}
16380
16381cat >>confdefs.h <<EOF
16382#define DEF_INITIAL_ERASE $initial_erase
16383EOF
16384
16385echo "$as_me:16385: checking if alt should send ESC" >&5
16386echo $ECHO_N "checking if alt should send ESC... $ECHO_C" >&6
16387
16388# Check whether --enable-alt-sends-esc or --disable-alt-sends-esc was given.
16389if test "${enable_alt_sends_esc+set}" = set; then
16390  enableval="$enable_alt_sends_esc"
16391  test "$enableval" != yes && enableval=no
16392	if test "$enableval" != "no" ; then
16393    alt_sends_esc=$enableval
16394	else
16395		alt_sends_esc=no
16396	fi
16397else
16398  enableval=no
16399	alt_sends_esc=no
16400
16401fi;
16402
16403echo "$as_me:16403: result: $alt_sends_esc" >&5
16404echo "${ECHO_T}$alt_sends_esc" >&6
16405case $alt_sends_esc in
16406(yes)
16407	alt_sends_esc=true
16408	;;
16409(no)
16410	alt_sends_esc=false
16411	;;
16412esac
16413cf_xbool1=`echo "$alt_sends_esc"|sed -e 's/^\(.\).*/\1/'`
16414
16415cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16416
16417cf_xbool2=`echo "$alt_sends_esc"|sed -e 's/^.//'`
16418alt_sends_esc=${cf_xbool1}${cf_xbool2}
16419
16420cat >>confdefs.h <<EOF
16421#define DEF_ALT_SENDS_ESC $alt_sends_esc
16422EOF
16423
16424echo "$as_me:16424: checking if meta should send ESC" >&5
16425echo $ECHO_N "checking if meta should send ESC... $ECHO_C" >&6
16426
16427# Check whether --enable-meta-sends-esc or --disable-meta-sends-esc was given.
16428if test "${enable_meta_sends_esc+set}" = set; then
16429  enableval="$enable_meta_sends_esc"
16430  test "$enableval" != yes && enableval=no
16431	if test "$enableval" != "no" ; then
16432    meta_sends_esc=$enableval
16433	else
16434		meta_sends_esc=no
16435	fi
16436else
16437  enableval=no
16438	meta_sends_esc=no
16439
16440fi;
16441
16442echo "$as_me:16442: result: $meta_sends_esc" >&5
16443echo "${ECHO_T}$meta_sends_esc" >&6
16444case $meta_sends_esc in
16445(yes)
16446	meta_sends_esc=true
16447	;;
16448(no)
16449	meta_sends_esc=false
16450	;;
16451esac
16452cf_xbool1=`echo "$meta_sends_esc"|sed -e 's/^\(.\).*/\1/'`
16453
16454cf_xbool1=`echo "$cf_xbool1" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16455
16456cf_xbool2=`echo "$meta_sends_esc"|sed -e 's/^.//'`
16457meta_sends_esc=${cf_xbool1}${cf_xbool2}
16458
16459cat >>confdefs.h <<EOF
16460#define DEF_META_SENDS_ESC $meta_sends_esc
16461EOF
16462
16463###############################################################################
16464# Extract the first word of "tic", so it can be a program name with args.
16465set dummy tic; ac_word=$2
16466echo "$as_me:16466: checking for $ac_word" >&5
16467echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16468if test "${ac_cv_prog_cf_tic_prog+set}" = set; then
16469  echo $ECHO_N "(cached) $ECHO_C" >&6
16470else
16471  if test -n "$cf_tic_prog"; then
16472  ac_cv_prog_cf_tic_prog="$cf_tic_prog" # Let the user override the test.
16473else
16474  ac_save_IFS=$IFS; IFS=$ac_path_separator
16475ac_dummy="$PATH"
16476for ac_dir in $ac_dummy; do
16477  IFS=$ac_save_IFS
16478  test -z "$ac_dir" && ac_dir=.
16479  $as_executable_p "$ac_dir/$ac_word" || continue
16480ac_cv_prog_cf_tic_prog="yes"
16481echo "$as_me:16481: found $ac_dir/$ac_word" >&5
16482break
16483done
16484
16485  test -z "$ac_cv_prog_cf_tic_prog" && ac_cv_prog_cf_tic_prog="no"
16486fi
16487fi
16488cf_tic_prog=$ac_cv_prog_cf_tic_prog
16489if test -n "$cf_tic_prog"; then
16490  echo "$as_me:16490: result: $cf_tic_prog" >&5
16491echo "${ECHO_T}$cf_tic_prog" >&6
16492else
16493  echo "$as_me:16493: result: no" >&5
16494echo "${ECHO_T}no" >&6
16495fi
16496
16497if test "$cf_tic_prog" = yes ; then
16498	echo "$as_me:16498: checking for private terminfo-directory" >&5
16499echo $ECHO_N "checking for private terminfo-directory... $ECHO_C" >&6
16500
16501# Check whether --with-own-terminfo or --without-own-terminfo was given.
16502if test "${with_own_terminfo+set}" = set; then
16503  withval="$with_own_terminfo"
16504  TERMINFO_DIR=$withval
16505else
16506  TERMINFO_DIR=${TERMINFO-none}
16507fi;
16508	echo "$as_me:16508: result: $TERMINFO_DIR" >&5
16509echo "${ECHO_T}$TERMINFO_DIR" >&6
16510	if test "$TERMINFO_DIR" = yes ; then
16511		{ echo "$as_me:16511: WARNING: no value given" >&5
16512echo "$as_me: WARNING: no value given" >&2;}
16513	elif test "$TERMINFO_DIR" != none ; then
16514		if test -d $TERMINFO_DIR ; then
16515
16516cat >>confdefs.h <<EOF
16517#define OWN_TERMINFO_DIR "$TERMINFO_DIR"
16518EOF
16519
16520			echo "$as_me:16520: checking if \$TERMINFO should also be set" >&5
16521echo $ECHO_N "checking if \$TERMINFO should also be set... $ECHO_C" >&6
16522
16523# Check whether --enable-env-terminfo or --disable-env-terminfo was given.
16524if test "${enable_env_terminfo+set}" = set; then
16525  enableval="$enable_env_terminfo"
16526  cf_env_terminfo=yes
16527else
16528  cf_env_terminfo=no
16529fi;
16530			echo "$as_me:16530: result: $cf_env_terminfo" >&5
16531echo "${ECHO_T}$cf_env_terminfo" >&6
16532			test $cf_env_terminfo = yes &&
16533
16534cat >>confdefs.h <<\EOF
16535#define OWN_TERMINFO_ENV 1
16536EOF
16537
16538		else
16539			{ echo "$as_me:16539: WARNING: not a directory" >&5
16540echo "$as_me: WARNING: not a directory" >&2;}
16541		fi
16542	elif test "$prefix" != NONE ; then
16543		TERMINFO_DIR='${prefix}/lib/terminfo'
16544	elif test -d /usr/lib/terminfo ; then
16545		TERMINFO_DIR=/usr/lib/terminfo
16546	else
16547		TERMINFO_DIR=
16548	fi
16549	SET_TERMINFO=
16550	if test -n "$TERMINFO_DIR" ; then
16551		TERMINFO_DIR='$(DESTDIR)'$TERMINFO_DIR
16552		SET_TERMINFO='TERMINFO=$(TERMINFO_DIR)'
16553	fi
16554	no_ticprog=
16555else
16556	no_ticprog="#"
16557	TERMINFO_DIR=
16558	SET_TERMINFO=
16559fi
16560
16561###############################################################################
16562
16563echo "$as_me:16563: checking if you want active-icons" >&5
16564echo $ECHO_N "checking if you want active-icons... $ECHO_C" >&6
16565
16566# Check whether --enable-active-icon or --disable-active-icon was given.
16567if test "${enable_active_icon+set}" = set; then
16568  enableval="$enable_active_icon"
16569  test "$enableval" != no && enableval=yes
16570	if test "$enableval" != "yes" ; then
16571    enable_active_icon=no
16572	else
16573		enable_active_icon=yes
16574	fi
16575else
16576  enableval=yes
16577	enable_active_icon=yes
16578
16579fi;
16580echo "$as_me:16580: result: $enable_active_icon" >&5
16581echo "${ECHO_T}$enable_active_icon" >&6
16582if test "$enable_active_icon" = no ; then
16583
16584cat >>confdefs.h <<\EOF
16585#define NO_ACTIVE_ICON 1
16586EOF
16587
16588fi
16589
16590echo "$as_me:16590: checking if you want ANSI color" >&5
16591echo $ECHO_N "checking if you want ANSI color... $ECHO_C" >&6
16592
16593# Check whether --enable-ansi-color or --disable-ansi-color was given.
16594if test "${enable_ansi_color+set}" = set; then
16595  enableval="$enable_ansi_color"
16596  test "$enableval" != no && enableval=yes
16597	if test "$enableval" != "yes" ; then
16598    enable_ansi_color=no
16599	else
16600		enable_ansi_color=yes
16601	fi
16602else
16603  enableval=yes
16604	enable_ansi_color=yes
16605
16606fi;
16607echo "$as_me:16607: result: $enable_ansi_color" >&5
16608echo "${ECHO_T}$enable_ansi_color" >&6
16609test "$enable_ansi_color" = no &&
16610cat >>confdefs.h <<\EOF
16611#define OPT_ISO_COLORS 0
16612EOF
16613
16614if test "$enable_ansi_color" = yes ; then
16615
16616	echo "$as_me:16616: checking if you want 16 colors like aixterm" >&5
16617echo $ECHO_N "checking if you want 16 colors like aixterm... $ECHO_C" >&6
16618
16619# Check whether --enable-16-color or --disable-16-color was given.
16620if test "${enable_16_color+set}" = set; then
16621  enableval="$enable_16_color"
16622  test "$enableval" != no && enableval=yes
16623	if test "$enableval" != "yes" ; then
16624    enable_16_color=no
16625	else
16626		enable_16_color=yes
16627	fi
16628else
16629  enableval=yes
16630	enable_16_color=yes
16631
16632fi;
16633	echo "$as_me:16633: result: $enable_16_color" >&5
16634echo "${ECHO_T}$enable_16_color" >&6
16635	test "$enable_16_color" = no &&
16636cat >>confdefs.h <<\EOF
16637#define OPT_AIX_COLORS 0
16638EOF
16639
16640	echo "$as_me:16640: checking if you want 256 colors" >&5
16641echo $ECHO_N "checking if you want 256 colors... $ECHO_C" >&6
16642
16643# Check whether --enable-256-color or --disable-256-color was given.
16644if test "${enable_256_color+set}" = set; then
16645  enableval="$enable_256_color"
16646  test "$enableval" != yes && enableval=no
16647	if test "$enableval" != "no" ; then
16648    enable_256_color=yes
16649	else
16650		enable_256_color=no
16651	fi
16652else
16653  enableval=no
16654	enable_256_color=no
16655
16656fi;
16657	echo "$as_me:16657: result: $enable_256_color" >&5
16658echo "${ECHO_T}$enable_256_color" >&6
16659	if test "$enable_256_color" = yes ; then
16660		CHARPROC_DEPS="$CHARPROC_DEPS 256colres.h"
16661		EXTRAHDRS="$EXTRAHDRS 256colres.h"
16662
16663cat >>confdefs.h <<\EOF
16664#define OPT_256_COLORS 1
16665EOF
16666
16667	else
16668	echo "$as_me:16668: checking if you want 88 colors" >&5
16669echo $ECHO_N "checking if you want 88 colors... $ECHO_C" >&6
16670
16671# Check whether --enable-88-color or --disable-88-color was given.
16672if test "${enable_88_color+set}" = set; then
16673  enableval="$enable_88_color"
16674  test "$enableval" != yes && enableval=no
16675	if test "$enableval" != "no" ; then
16676    enable_88_color=yes
16677	else
16678		enable_88_color=no
16679	fi
16680else
16681  enableval=no
16682	enable_88_color=no
16683
16684fi;
16685	echo "$as_me:16685: result: $enable_88_color" >&5
16686echo "${ECHO_T}$enable_88_color" >&6
16687	if test "$enable_88_color" = yes ; then
16688		CHARPROC_DEPS="$CHARPROC_DEPS 88colres.h"
16689		EXTRAHDRS="$EXTRAHDRS 88colres.h"
16690
16691cat >>confdefs.h <<\EOF
16692#define OPT_88_COLORS 1
16693EOF
16694
16695	fi
16696	fi
16697
16698fi
16699
16700echo "$as_me:16700: checking if you want blinking cursor" >&5
16701echo $ECHO_N "checking if you want blinking cursor... $ECHO_C" >&6
16702
16703# Check whether --enable-blink-cursor or --disable-blink-cursor was given.
16704if test "${enable_blink_cursor+set}" = set; then
16705  enableval="$enable_blink_cursor"
16706  test "$enableval" != no && enableval=yes
16707	if test "$enableval" != "yes" ; then
16708    enable_blink_curs=no
16709	else
16710		enable_blink_curs=yes
16711	fi
16712else
16713  enableval=yes
16714	enable_blink_curs=yes
16715
16716fi;
16717echo "$as_me:16717: result: $enable_blink_curs" >&5
16718echo "${ECHO_T}$enable_blink_curs" >&6
16719test "$enable_blink_curs" = no &&
16720cat >>confdefs.h <<\EOF
16721#define OPT_BLINK_CURS 0
16722EOF
16723
16724echo "$as_me:16724: checking if you want to ignore Linux's broken palette-strings" >&5
16725echo $ECHO_N "checking if you want to ignore Linux's broken palette-strings... $ECHO_C" >&6
16726
16727case $host_os in
16728(linux*)
16729	assume_broken_osc=yes ;;
16730(*)
16731	assume_broken_osc=no ;;
16732esac
16733
16734# Check whether --enable-broken-osc or --disable-broken-osc was given.
16735if test "${enable_broken_osc+set}" = set; then
16736  enableval="$enable_broken_osc"
16737  test "$enableval" != no && enableval=yes
16738	if test "$enableval" != "$assume_broken_osc" ; then
16739    enable_broken_osc=$enableval
16740	else
16741		enable_broken_osc=$enableval
16742	fi
16743else
16744  enableval=$assume_broken_osc
16745	enable_broken_osc=$enableval
16746
16747fi;
16748echo "$as_me:16748: result: $enable_broken_osc" >&5
16749echo "${ECHO_T}$enable_broken_osc" >&6
16750if test "$enable_broken_osc" = yes ; then
16751
16752cat >>confdefs.h <<\EOF
16753#define OPT_BROKEN_OSC 1
16754EOF
16755
16756else
16757
16758cat >>confdefs.h <<\EOF
16759#define OPT_BROKEN_OSC 0
16760EOF
16761
16762fi
16763
16764echo "$as_me:16764: checking if you want to allow broken string-terminators" >&5
16765echo $ECHO_N "checking if you want to allow broken string-terminators... $ECHO_C" >&6
16766
16767# Check whether --enable-broken-st or --disable-broken-st was given.
16768if test "${enable_broken_st+set}" = set; then
16769  enableval="$enable_broken_st"
16770  test "$enableval" != yes && enableval=no
16771	if test "$enableval" != "no" ; then
16772    enable_broken_st=no
16773	else
16774		enable_broken_st=yes
16775	fi
16776else
16777  enableval=no
16778	enable_broken_st=yes
16779
16780fi;
16781echo "$as_me:16781: result: $enable_broken_st" >&5
16782echo "${ECHO_T}$enable_broken_st" >&6
16783test "$enable_broken_st" = no &&
16784cat >>confdefs.h <<\EOF
16785#define OPT_BROKEN_ST 0
16786EOF
16787
16788echo "$as_me:16788: checking if you want to compile-in icon data" >&5
16789echo $ECHO_N "checking if you want to compile-in icon data... $ECHO_C" >&6
16790
16791# Check whether --enable-builtin-xpms or --disable-builtin-xpms was given.
16792if test "${enable_builtin_xpms+set}" = set; then
16793  enableval="$enable_builtin_xpms"
16794  test "$enableval" != yes && enableval=no
16795	if test "$enableval" != "no" ; then
16796    enable_builtin_xpms=yes
16797	else
16798		enable_builtin_xpms=no
16799	fi
16800else
16801  enableval=no
16802	enable_builtin_xpms=no
16803
16804fi;
16805echo "$as_me:16805: result: $enable_builtin_xpms" >&5
16806echo "${ECHO_T}$enable_builtin_xpms" >&6
16807test "$enable_builtin_xpms" = yes &&
16808cat >>confdefs.h <<\EOF
16809#define OPT_BUILTIN_XPMS 1
16810EOF
16811
16812echo "$as_me:16812: checking if you want printable 128-159" >&5
16813echo $ECHO_N "checking if you want printable 128-159... $ECHO_C" >&6
16814
16815# Check whether --enable-c1-print or --disable-c1-print was given.
16816if test "${enable_c1_print+set}" = set; then
16817  enableval="$enable_c1_print"
16818  test "$enableval" != no && enableval=yes
16819	if test "$enableval" != "yes" ; then
16820    enable_c1_print=no
16821	else
16822		enable_c1_print=yes
16823	fi
16824else
16825  enableval=yes
16826	enable_c1_print=yes
16827
16828fi;
16829echo "$as_me:16829: result: $enable_c1_print" >&5
16830echo "${ECHO_T}$enable_c1_print" >&6
16831test "$enable_c1_print" = no &&
16832cat >>confdefs.h <<\EOF
16833#define OPT_C1_PRINT 0
16834EOF
16835
16836if test "$enable_ansi_color" = yes ; then
16837
16838	echo "$as_me:16838: checking if you want bold colors mapped like IBM PC" >&5
16839echo $ECHO_N "checking if you want bold colors mapped like IBM PC... $ECHO_C" >&6
16840
16841# Check whether --enable-bold-color or --disable-bold-color was given.
16842if test "${enable_bold_color+set}" = set; then
16843  enableval="$enable_bold_color"
16844  test "$enableval" != no && enableval=yes
16845	if test "$enableval" != "yes" ; then
16846    enable_pc_color=no
16847	else
16848		enable_pc_color=yes
16849	fi
16850else
16851  enableval=yes
16852	enable_pc_color=yes
16853
16854fi;
16855	echo "$as_me:16855: result: $enable_pc_color" >&5
16856echo "${ECHO_T}$enable_pc_color" >&6
16857	test "$enable_pc_color" = no &&
16858cat >>confdefs.h <<\EOF
16859#define OPT_PC_COLORS 0
16860EOF
16861
16862	echo "$as_me:16862: checking if you want separate color-classes" >&5
16863echo $ECHO_N "checking if you want separate color-classes... $ECHO_C" >&6
16864
16865# Check whether --enable-color-class or --disable-color-class was given.
16866if test "${enable_color_class+set}" = set; then
16867  enableval="$enable_color_class"
16868  test "$enableval" != no && enableval=yes
16869	if test "$enableval" != "yes" ; then
16870    enable_color_class=no
16871	else
16872		enable_color_class=yes
16873	fi
16874else
16875  enableval=yes
16876	enable_color_class=yes
16877
16878fi;
16879	echo "$as_me:16879: result: $enable_color_class" >&5
16880echo "${ECHO_T}$enable_color_class" >&6
16881	test "$enable_color_class" = no &&
16882cat >>confdefs.h <<\EOF
16883#define OPT_COLOR_CLASS 0
16884EOF
16885
16886	echo "$as_me:16886: checking if you want color-mode enabled by default" >&5
16887echo $ECHO_N "checking if you want color-mode enabled by default... $ECHO_C" >&6
16888
16889# Check whether --enable-color-mode or --disable-color-mode was given.
16890if test "${enable_color_mode+set}" = set; then
16891  enableval="$enable_color_mode"
16892  test "$enableval" != no && enableval=yes
16893	if test "$enableval" != "yes" ; then
16894    default_colormode=no
16895	else
16896		default_colormode=yes
16897	fi
16898else
16899  enableval=yes
16900	default_colormode=yes
16901
16902fi;
16903	echo "$as_me:16903: result: $default_colormode" >&5
16904echo "${ECHO_T}$default_colormode" >&6
16905	test "$default_colormode" = no &&
16906cat >>confdefs.h <<\EOF
16907#define DFT_COLORMODE 0
16908EOF
16909
16910fi
16911
16912echo "$as_me:16912: checking if you want support for color highlighting" >&5
16913echo $ECHO_N "checking if you want support for color highlighting... $ECHO_C" >&6
16914
16915# Check whether --enable-highlighting or --disable-highlighting was given.
16916if test "${enable_highlighting+set}" = set; then
16917  enableval="$enable_highlighting"
16918  test "$enableval" != no && enableval=yes
16919	if test "$enableval" != "yes" ; then
16920    default_highlight=no
16921	else
16922		default_highlight=yes
16923	fi
16924else
16925  enableval=yes
16926	default_highlight=yes
16927
16928fi;
16929echo "$as_me:16929: result: $default_highlight" >&5
16930echo "${ECHO_T}$default_highlight" >&6
16931test "$default_highlight" = no &&
16932cat >>confdefs.h <<\EOF
16933#define OPT_HIGHLIGHT_COLOR 0
16934EOF
16935
16936echo "$as_me:16936: checking if you want support for doublesize characters" >&5
16937echo $ECHO_N "checking if you want support for doublesize characters... $ECHO_C" >&6
16938
16939# Check whether --enable-doublechars or --disable-doublechars was given.
16940if test "${enable_doublechars+set}" = set; then
16941  enableval="$enable_doublechars"
16942  test "$enableval" != no && enableval=yes
16943	if test "$enableval" != "yes" ; then
16944    enable_doublechars=no
16945	else
16946		enable_doublechars=yes
16947	fi
16948else
16949  enableval=yes
16950	enable_doublechars=yes
16951
16952fi;
16953echo "$as_me:16953: result: $enable_doublechars" >&5
16954echo "${ECHO_T}$enable_doublechars" >&6
16955test "$enable_doublechars" = no &&
16956cat >>confdefs.h <<\EOF
16957#define OPT_DEC_CHRSET 0
16958EOF
16959
16960echo "$as_me:16960: checking if you want fallback-support for box characters" >&5
16961echo $ECHO_N "checking if you want fallback-support for box characters... $ECHO_C" >&6
16962
16963# Check whether --enable-boxchars or --disable-boxchars was given.
16964if test "${enable_boxchars+set}" = set; then
16965  enableval="$enable_boxchars"
16966  test "$enableval" != no && enableval=yes
16967	if test "$enableval" != "yes" ; then
16968    enable_boxchars=no
16969	else
16970		enable_boxchars=yes
16971	fi
16972else
16973  enableval=yes
16974	enable_boxchars=yes
16975
16976fi;
16977echo "$as_me:16977: result: $enable_boxchars" >&5
16978echo "${ECHO_T}$enable_boxchars" >&6
16979test "$enable_boxchars" = no &&
16980cat >>confdefs.h <<\EOF
16981#define OPT_BOX_CHARS 0
16982EOF
16983
16984echo "$as_me:16984: checking if you want to allow spawning new xterms" >&5
16985echo $ECHO_N "checking if you want to allow spawning new xterms... $ECHO_C" >&6
16986
16987# Check whether --enable-exec-xterm or --disable-exec-xterm was given.
16988if test "${enable_exec_xterm+set}" = set; then
16989  enableval="$enable_exec_xterm"
16990  test "$enableval" != yes && enableval=no
16991	if test "$enableval" != "no" ; then
16992    enable_exec_xterm=yes
16993	else
16994		enable_exec_xterm=no
16995	fi
16996else
16997  enableval=no
16998	enable_exec_xterm=no
16999
17000fi;
17001echo "$as_me:17001: result: $enable_exec_xterm" >&5
17002echo "${ECHO_T}$enable_exec_xterm" >&6
17003if test "$enable_exec_xterm" = yes ; then
17004
17005echo "$as_me:17005: checking for proc tree with cwd-support" >&5
17006echo $ECHO_N "checking for proc tree with cwd-support... $ECHO_C" >&6
17007if test "${cf_cv_procfs_cwd+set}" = set; then
17008  echo $ECHO_N "(cached) $ECHO_C" >&6
17009else
17010
17011cf_cv_procfs_cwd=no
17012for cf_path in /proc /compat/linux/proc /usr/compat/linux/proc
17013do
17014	if test -d $cf_path && \
17015	   test -d $cf_path/$$ && \
17016	   ( test -d $cf_path/$$/cwd || \
17017	     test -L $cf_path/$$/cwd ); then
17018		cf_cv_procfs_cwd=$cf_path
17019		break
17020	fi
17021done
17022
17023fi
17024echo "$as_me:17024: result: $cf_cv_procfs_cwd" >&5
17025echo "${ECHO_T}$cf_cv_procfs_cwd" >&6
17026
17027	if test "$cf_cv_procfs_cwd" = no ; then
17028		{ echo "$as_me:17028: WARNING: no suitable proc filesystem found" >&5
17029echo "$as_me: WARNING: no suitable proc filesystem found" >&2;}
17030	else
17031
17032cat >>confdefs.h <<EOF
17033#define PROCFS_ROOT "$cf_cv_procfs_cwd"
17034EOF
17035
17036cat >>confdefs.h <<\EOF
17037#define OPT_EXEC_XTERM 1
17038EOF
17039
17040	fi
17041fi
17042
17043echo "$as_me:17043: checking if you want to use double-buffering" >&5
17044echo $ECHO_N "checking if you want to use double-buffering... $ECHO_C" >&6
17045
17046# Check whether --enable-double-buffer or --disable-double-buffer was given.
17047if test "${enable_double_buffer+set}" = set; then
17048  enableval="$enable_double_buffer"
17049  test "$enableval" != yes && enableval=no
17050	if test "$enableval" != "no" ; then
17051    enable_double_bfr=yes
17052	else
17053		enable_double_bfr=no
17054	fi
17055else
17056  enableval=no
17057	enable_double_bfr=no
17058
17059fi;
17060echo "$as_me:17060: result: $enable_double_bfr" >&5
17061echo "${ECHO_T}$enable_double_bfr" >&6
17062if test "$enable_double_bfr" = yes ; then
17063	case "x$LIBS" in
17064	(*Xext*)
17065		;;
17066	(*)
17067
17068if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
17069	test -n "$verbose" && echo "	found package Xext" 1>&6
17070
17071echo "${as_me:-configure}:17071: testing found package Xext ..." 1>&5
17072
17073	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
17074	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
17075	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
17076
17077echo "${as_me:-configure}:17077: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17078
17079	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
17080
17081echo "${as_me:-configure}:17081: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
17082
17083cf_fix_cppflags=no
17084cf_new_cflags=
17085cf_new_cppflags=
17086cf_new_extra_cppflags=
17087
17088for cf_add_cflags in $cf_pkgconfig_incs
17089do
17090case $cf_fix_cppflags in
17091(no)
17092	case $cf_add_cflags in
17093	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17094		case $cf_add_cflags in
17095		(-D*)
17096			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17097
17098			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17099				&& test -z "${cf_tst_cflags}" \
17100				&& cf_fix_cppflags=yes
17101
17102			if test $cf_fix_cppflags = yes ; then
17103
17104	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17105	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17106
17107				continue
17108			elif test "${cf_tst_cflags}" = "\"'" ; then
17109
17110	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17111	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17112
17113				continue
17114			fi
17115			;;
17116		esac
17117		case "$CPPFLAGS" in
17118		(*$cf_add_cflags)
17119			;;
17120		(*)
17121			case $cf_add_cflags in
17122			(-D*)
17123				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17124
17125CPPFLAGS=`echo "$CPPFLAGS" | \
17126	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17127		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17128
17129				;;
17130			esac
17131
17132	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17133	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17134
17135			;;
17136		esac
17137		;;
17138	(*)
17139
17140	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17141	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17142
17143		;;
17144	esac
17145	;;
17146(yes)
17147
17148	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17149	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17150
17151	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17152
17153	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17154		&& test -z "${cf_tst_cflags}" \
17155		&& cf_fix_cppflags=no
17156	;;
17157esac
17158done
17159
17160if test -n "$cf_new_cflags" ; then
17161
17162	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17163	CFLAGS="${CFLAGS}$cf_new_cflags"
17164
17165fi
17166
17167if test -n "$cf_new_cppflags" ; then
17168
17169	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17170	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17171
17172fi
17173
17174if test -n "$cf_new_extra_cppflags" ; then
17175
17176	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17177	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17178
17179fi
17180
17181cf_add_libs="$cf_pkgconfig_libs"
17182# Filter out duplicates - this happens with badly-designed ".pc" files...
17183for cf_add_1lib in $LIBS
17184do
17185	for cf_add_2lib in $cf_add_libs
17186	do
17187		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17188		then
17189			cf_add_1lib=
17190			break
17191		fi
17192	done
17193	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17194done
17195LIBS="$cf_add_libs"
17196
17197	:
17198else
17199	cf_pkgconfig_incs=
17200	cf_pkgconfig_libs=
17201
17202	echo "$as_me:17202: checking for XextCreateExtension in -lXext" >&5
17203echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
17204if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
17205  echo $ECHO_N "(cached) $ECHO_C" >&6
17206else
17207  ac_check_lib_save_LIBS=$LIBS
17208LIBS="-lXext  $LIBS"
17209cat >conftest.$ac_ext <<_ACEOF
17210#line 17210 "configure"
17211#include "confdefs.h"
17212
17213/* Override any gcc2 internal prototype to avoid an error.  */
17214#ifdef __cplusplus
17215extern "C"
17216#endif
17217/* We use char because int might match the return type of a gcc2
17218   builtin and then its argument prototype would still apply.  */
17219char XextCreateExtension ();
17220int
17221main (void)
17222{
17223XextCreateExtension ();
17224  ;
17225  return 0;
17226}
17227_ACEOF
17228rm -f conftest.$ac_objext conftest$ac_exeext
17229if { (eval echo "$as_me:17229: \"$ac_link\"") >&5
17230  (eval $ac_link) 2>&5
17231  ac_status=$?
17232  echo "$as_me:17232: \$? = $ac_status" >&5
17233  (exit $ac_status); } &&
17234         { ac_try='test -s conftest$ac_exeext'
17235  { (eval echo "$as_me:17235: \"$ac_try\"") >&5
17236  (eval $ac_try) 2>&5
17237  ac_status=$?
17238  echo "$as_me:17238: \$? = $ac_status" >&5
17239  (exit $ac_status); }; }; then
17240  ac_cv_lib_Xext_XextCreateExtension=yes
17241else
17242  echo "$as_me: failed program was:" >&5
17243cat conftest.$ac_ext >&5
17244ac_cv_lib_Xext_XextCreateExtension=no
17245fi
17246rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17247LIBS=$ac_check_lib_save_LIBS
17248fi
17249echo "$as_me:17249: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
17250echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
17251if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
17252
17253cf_add_libs="-lXext"
17254# Filter out duplicates - this happens with badly-designed ".pc" files...
17255for cf_add_1lib in $LIBS
17256do
17257	for cf_add_2lib in $cf_add_libs
17258	do
17259		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17260		then
17261			cf_add_1lib=
17262			break
17263		fi
17264	done
17265	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17266done
17267LIBS="$cf_add_libs"
17268
17269fi
17270
17271fi
17272
17273		;;
17274	esac
17275
17276cat >>confdefs.h <<\EOF
17277#define OPT_DOUBLE_BUFFER 1
17278EOF
17279
17280fi
17281
17282echo "$as_me:17282: checking if you want to use FreeType library" >&5
17283echo $ECHO_N "checking if you want to use FreeType library... $ECHO_C" >&6
17284
17285# Check whether --enable-freetype or --disable-freetype was given.
17286if test "${enable_freetype+set}" = set; then
17287  enableval="$enable_freetype"
17288  test "$enableval" != no && enableval=yes
17289	if test "$enableval" != "yes" ; then
17290    enable_freetype=no
17291	else
17292		enable_freetype=yes
17293	fi
17294else
17295  enableval=yes
17296	enable_freetype=yes
17297
17298fi;
17299echo "$as_me:17299: result: $enable_freetype" >&5
17300echo "${ECHO_T}$enable_freetype" >&6
17301if test "$enable_freetype" = yes ; then
17302
17303cf_cv_x_freetype_incs=no
17304cf_cv_x_freetype_libs=no
17305cf_extra_freetype_libs=
17306FREETYPE_CONFIG=none
17307FREETYPE_PARAMS=
17308
17309echo "$as_me:17309: checking for FreeType configuration script" >&5
17310echo $ECHO_N "checking for FreeType configuration script... $ECHO_C" >&6
17311
17312# Check whether --with-freetype-config or --without-freetype-config was given.
17313if test "${with_freetype_config+set}" = set; then
17314  withval="$with_freetype_config"
17315  cf_cv_x_freetype_cfgs="$withval"
17316else
17317  cf_cv_x_freetype_cfgs=auto
17318fi;
17319test -z $cf_cv_x_freetype_cfgs && cf_cv_x_freetype_cfgs=auto
17320test $cf_cv_x_freetype_cfgs = no && cf_cv_x_freetype_cfgs=none
17321echo "$as_me:17321: result: $cf_cv_x_freetype_cfgs" >&5
17322echo "${ECHO_T}$cf_cv_x_freetype_cfgs" >&6
17323
17324case $cf_cv_x_freetype_cfgs in
17325(none)
17326	echo "$as_me:17326: checking if you specified -D/-I options for FreeType" >&5
17327echo $ECHO_N "checking if you specified -D/-I options for FreeType... $ECHO_C" >&6
17328
17329# Check whether --with-freetype-cflags or --without-freetype-cflags was given.
17330if test "${with_freetype_cflags+set}" = set; then
17331  withval="$with_freetype_cflags"
17332  cf_cv_x_freetype_incs="$with_freetype_cflags"
17333else
17334  cf_cv_x_freetype_incs=no
17335fi;
17336	echo "$as_me:17336: result: $cf_cv_x_freetype_incs" >&5
17337echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
17338
17339	echo "$as_me:17339: checking if you specified -L/-l options for FreeType" >&5
17340echo $ECHO_N "checking if you specified -L/-l options for FreeType... $ECHO_C" >&6
17341
17342# Check whether --with-freetype-libs or --without-freetype-libs was given.
17343if test "${with_freetype_libs+set}" = set; then
17344  withval="$with_freetype_libs"
17345  cf_cv_x_freetype_libs="$with_freetype_libs"
17346else
17347  cf_cv_x_freetype_libs=no
17348fi;
17349	echo "$as_me:17349: result: $cf_cv_x_freetype_libs" >&5
17350echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
17351	;;
17352(auto)
17353	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
17354		FREETYPE_CONFIG=$PKG_CONFIG
17355		FREETYPE_PARAMS=xft
17356	else
17357		# Extract the first word of "freetype-config", so it can be a program name with args.
17358set dummy freetype-config; ac_word=$2
17359echo "$as_me:17359: checking for $ac_word" >&5
17360echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17361if test "${ac_cv_path_FREETYPE_CONFIG+set}" = set; then
17362  echo $ECHO_N "(cached) $ECHO_C" >&6
17363else
17364  case $FREETYPE_CONFIG in
17365  [\\/]* | ?:[\\/]*)
17366  ac_cv_path_FREETYPE_CONFIG="$FREETYPE_CONFIG" # Let the user override the test with a path.
17367  ;;
17368  *)
17369  ac_save_IFS=$IFS; IFS=$ac_path_separator
17370ac_dummy="$PATH"
17371for ac_dir in $ac_dummy; do
17372  IFS=$ac_save_IFS
17373  test -z "$ac_dir" && ac_dir=.
17374  if $as_executable_p "$ac_dir/$ac_word"; then
17375   ac_cv_path_FREETYPE_CONFIG="$ac_dir/$ac_word"
17376   echo "$as_me:17376: found $ac_dir/$ac_word" >&5
17377   break
17378fi
17379done
17380
17381  test -z "$ac_cv_path_FREETYPE_CONFIG" && ac_cv_path_FREETYPE_CONFIG="none"
17382  ;;
17383esac
17384fi
17385FREETYPE_CONFIG=$ac_cv_path_FREETYPE_CONFIG
17386
17387if test -n "$FREETYPE_CONFIG"; then
17388  echo "$as_me:17388: result: $FREETYPE_CONFIG" >&5
17389echo "${ECHO_T}$FREETYPE_CONFIG" >&6
17390else
17391  echo "$as_me:17391: result: no" >&5
17392echo "${ECHO_T}no" >&6
17393fi
17394
17395		if test "$FREETYPE_CONFIG" != none; then
17396			FREETYPE_CONFIG=$FREETYPE_CONFIG
17397			cf_extra_freetype_libs="-lXft"
17398		else
17399			# Extract the first word of "xft-config", so it can be a program name with args.
17400set dummy xft-config; ac_word=$2
17401echo "$as_me:17401: checking for $ac_word" >&5
17402echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17403if test "${ac_cv_path_FREETYPE_OLD_CONFIG+set}" = set; then
17404  echo $ECHO_N "(cached) $ECHO_C" >&6
17405else
17406  case $FREETYPE_OLD_CONFIG in
17407  [\\/]* | ?:[\\/]*)
17408  ac_cv_path_FREETYPE_OLD_CONFIG="$FREETYPE_OLD_CONFIG" # Let the user override the test with a path.
17409  ;;
17410  *)
17411  ac_save_IFS=$IFS; IFS=$ac_path_separator
17412ac_dummy="$PATH"
17413for ac_dir in $ac_dummy; do
17414  IFS=$ac_save_IFS
17415  test -z "$ac_dir" && ac_dir=.
17416  if $as_executable_p "$ac_dir/$ac_word"; then
17417   ac_cv_path_FREETYPE_OLD_CONFIG="$ac_dir/$ac_word"
17418   echo "$as_me:17418: found $ac_dir/$ac_word" >&5
17419   break
17420fi
17421done
17422
17423  test -z "$ac_cv_path_FREETYPE_OLD_CONFIG" && ac_cv_path_FREETYPE_OLD_CONFIG="none"
17424  ;;
17425esac
17426fi
17427FREETYPE_OLD_CONFIG=$ac_cv_path_FREETYPE_OLD_CONFIG
17428
17429if test -n "$FREETYPE_OLD_CONFIG"; then
17430  echo "$as_me:17430: result: $FREETYPE_OLD_CONFIG" >&5
17431echo "${ECHO_T}$FREETYPE_OLD_CONFIG" >&6
17432else
17433  echo "$as_me:17433: result: no" >&5
17434echo "${ECHO_T}no" >&6
17435fi
17436
17437			if test "$FREETYPE_OLD_CONFIG" != none; then
17438				FREETYPE_CONFIG=$FREETYPE_OLD_CONFIG
17439			fi
17440		fi
17441	fi
17442	;;
17443(pkg*)
17444	if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xft; then
17445		FREETYPE_CONFIG=$cf_cv_x_freetype_cfgs
17446		FREETYPE_PARAMS=xft
17447	else
17448		{ echo "$as_me:17448: WARNING: cannot find pkg-config for Xft" >&5
17449echo "$as_me: WARNING: cannot find pkg-config for Xft" >&2;}
17450	fi
17451	;;
17452(*)
17453	# Extract the first word of "$cf_cv_x_freetype_cfgs", so it can be a program name with args.
17454set dummy $cf_cv_x_freetype_cfgs; ac_word=$2
17455echo "$as_me:17455: checking for $ac_word" >&5
17456echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
17457if test "${ac_cv_path_FREETYPE_XFT_CONFIG+set}" = set; then
17458  echo $ECHO_N "(cached) $ECHO_C" >&6
17459else
17460  case $FREETYPE_XFT_CONFIG in
17461  [\\/]* | ?:[\\/]*)
17462  ac_cv_path_FREETYPE_XFT_CONFIG="$FREETYPE_XFT_CONFIG" # Let the user override the test with a path.
17463  ;;
17464  *)
17465  ac_save_IFS=$IFS; IFS=$ac_path_separator
17466ac_dummy="$PATH"
17467for ac_dir in $ac_dummy; do
17468  IFS=$ac_save_IFS
17469  test -z "$ac_dir" && ac_dir=.
17470  if $as_executable_p "$ac_dir/$ac_word"; then
17471   ac_cv_path_FREETYPE_XFT_CONFIG="$ac_dir/$ac_word"
17472   echo "$as_me:17472: found $ac_dir/$ac_word" >&5
17473   break
17474fi
17475done
17476
17477  test -z "$ac_cv_path_FREETYPE_XFT_CONFIG" && ac_cv_path_FREETYPE_XFT_CONFIG="none"
17478  ;;
17479esac
17480fi
17481FREETYPE_XFT_CONFIG=$ac_cv_path_FREETYPE_XFT_CONFIG
17482
17483if test -n "$FREETYPE_XFT_CONFIG"; then
17484  echo "$as_me:17484: result: $FREETYPE_XFT_CONFIG" >&5
17485echo "${ECHO_T}$FREETYPE_XFT_CONFIG" >&6
17486else
17487  echo "$as_me:17487: result: no" >&5
17488echo "${ECHO_T}no" >&6
17489fi
17490
17491	if test "$FREETYPE_XFT_CONFIG" != none; then
17492		FREETYPE_CONFIG=$FREETYPE_XFT_CONFIG
17493	else
17494		{ echo "$as_me:17494: WARNING: cannot find config script for Xft" >&5
17495echo "$as_me: WARNING: cannot find config script for Xft" >&2;}
17496	fi
17497	;;
17498esac
17499
17500if test "$FREETYPE_CONFIG" != none ; then
17501	echo "$as_me:17501: checking for FreeType config" >&5
17502echo $ECHO_N "checking for FreeType config... $ECHO_C" >&6
17503	echo "$as_me:17503: result: $FREETYPE_CONFIG $FREETYPE_PARAMS" >&5
17504echo "${ECHO_T}$FREETYPE_CONFIG $FREETYPE_PARAMS" >&6
17505
17506	if test "$cf_cv_x_freetype_incs" = no ; then
17507		echo "$as_me:17507: checking for $FREETYPE_CONFIG cflags" >&5
17508echo $ECHO_N "checking for $FREETYPE_CONFIG cflags... $ECHO_C" >&6
17509		cf_cv_x_freetype_incs="`$FREETYPE_CONFIG $FREETYPE_PARAMS --cflags 2>/dev/null`"
17510		echo "$as_me:17510: result: $cf_cv_x_freetype_incs" >&5
17511echo "${ECHO_T}$cf_cv_x_freetype_incs" >&6
17512	fi
17513
17514	if test "$cf_cv_x_freetype_libs" = no ; then
17515		echo "$as_me:17515: checking for $FREETYPE_CONFIG libs" >&5
17516echo $ECHO_N "checking for $FREETYPE_CONFIG libs... $ECHO_C" >&6
17517		cf_cv_x_freetype_libs="$cf_extra_freetype_libs `$FREETYPE_CONFIG $FREETYPE_PARAMS --libs 2>/dev/null`"
17518		echo "$as_me:17518: result: $cf_cv_x_freetype_libs" >&5
17519echo "${ECHO_T}$cf_cv_x_freetype_libs" >&6
17520	fi
17521fi
17522
17523if test "$cf_cv_x_freetype_incs" = no ; then
17524	cf_cv_x_freetype_incs=
17525fi
17526
17527if test "$cf_cv_x_freetype_libs" = no ; then
17528	cf_cv_x_freetype_libs=-lXft
17529fi
17530
17531echo "$as_me:17531: checking if we can link with FreeType libraries" >&5
17532echo $ECHO_N "checking if we can link with FreeType libraries... $ECHO_C" >&6
17533
17534cf_save_LIBS="$LIBS"
17535cf_save_INCS="$CPPFLAGS"
17536
17537cf_add_libs="$cf_cv_x_freetype_libs"
17538# Filter out duplicates - this happens with badly-designed ".pc" files...
17539for cf_add_1lib in $LIBS
17540do
17541	for cf_add_2lib in $cf_add_libs
17542	do
17543		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17544		then
17545			cf_add_1lib=
17546			break
17547		fi
17548	done
17549	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17550done
17551LIBS="$cf_add_libs"
17552
17553CPPFLAGS="$CPPFLAGS $cf_cv_x_freetype_incs"
17554
17555cat >conftest.$ac_ext <<_ACEOF
17556#line 17556 "configure"
17557#include "confdefs.h"
17558
17559#include <X11/Xlib.h>
17560#include <X11/extensions/Xrender.h>
17561#include <X11/Xft/Xft.h>
17562int
17563main (void)
17564{
17565
17566	XftPattern  *pat = XftNameParse ("name");
17567  ;
17568  return 0;
17569}
17570_ACEOF
17571rm -f conftest.$ac_objext conftest$ac_exeext
17572if { (eval echo "$as_me:17572: \"$ac_link\"") >&5
17573  (eval $ac_link) 2>&5
17574  ac_status=$?
17575  echo "$as_me:17575: \$? = $ac_status" >&5
17576  (exit $ac_status); } &&
17577         { ac_try='test -s conftest$ac_exeext'
17578  { (eval echo "$as_me:17578: \"$ac_try\"") >&5
17579  (eval $ac_try) 2>&5
17580  ac_status=$?
17581  echo "$as_me:17581: \$? = $ac_status" >&5
17582  (exit $ac_status); }; }; then
17583  cf_cv_found_freetype=yes
17584else
17585  echo "$as_me: failed program was:" >&5
17586cat conftest.$ac_ext >&5
17587cf_cv_found_freetype=no
17588fi
17589rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17590echo "$as_me:17590: result: $cf_cv_found_freetype" >&5
17591echo "${ECHO_T}$cf_cv_found_freetype" >&6
17592
17593LIBS="$cf_save_LIBS"
17594CPPFLAGS="$cf_save_INCS"
17595
17596if test "$cf_cv_found_freetype" = yes ; then
17597
17598cf_add_libs="$cf_cv_x_freetype_libs"
17599# Filter out duplicates - this happens with badly-designed ".pc" files...
17600for cf_add_1lib in $LIBS
17601do
17602	for cf_add_2lib in $cf_add_libs
17603	do
17604		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17605		then
17606			cf_add_1lib=
17607			break
17608		fi
17609	done
17610	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17611done
17612LIBS="$cf_add_libs"
17613
17614cf_fix_cppflags=no
17615cf_new_cflags=
17616cf_new_cppflags=
17617cf_new_extra_cppflags=
17618
17619for cf_add_cflags in $cf_cv_x_freetype_incs
17620do
17621case $cf_fix_cppflags in
17622(no)
17623	case $cf_add_cflags in
17624	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17625		case $cf_add_cflags in
17626		(-D*)
17627			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17628
17629			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17630				&& test -z "${cf_tst_cflags}" \
17631				&& cf_fix_cppflags=yes
17632
17633			if test $cf_fix_cppflags = yes ; then
17634
17635	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17636	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17637
17638				continue
17639			elif test "${cf_tst_cflags}" = "\"'" ; then
17640
17641	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17642	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17643
17644				continue
17645			fi
17646			;;
17647		esac
17648		case "$CPPFLAGS" in
17649		(*$cf_add_cflags)
17650			;;
17651		(*)
17652			case $cf_add_cflags in
17653			(-D*)
17654				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17655
17656CPPFLAGS=`echo "$CPPFLAGS" | \
17657	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17658		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17659
17660				;;
17661			esac
17662
17663	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17664	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17665
17666			;;
17667		esac
17668		;;
17669	(*)
17670
17671	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17672	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17673
17674		;;
17675	esac
17676	;;
17677(yes)
17678
17679	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17680	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17681
17682	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17683
17684	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17685		&& test -z "${cf_tst_cflags}" \
17686		&& cf_fix_cppflags=no
17687	;;
17688esac
17689done
17690
17691if test -n "$cf_new_cflags" ; then
17692
17693	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17694	CFLAGS="${CFLAGS}$cf_new_cflags"
17695
17696fi
17697
17698if test -n "$cf_new_cppflags" ; then
17699
17700	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17701	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17702
17703fi
17704
17705if test -n "$cf_new_extra_cppflags" ; then
17706
17707	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17708	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17709
17710fi
17711
17712cat >>confdefs.h <<\EOF
17713#define XRENDERFONT 1
17714EOF
17715
17716for ac_func in \
17717	XftDrawCharSpec \
17718	XftDrawSetClip \
17719	XftDrawSetClipRectangles \
17720
17721do
17722as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
17723echo "$as_me:17723: checking for $ac_func" >&5
17724echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
17725if eval "test \"\${$as_ac_var+set}\" = set"; then
17726  echo $ECHO_N "(cached) $ECHO_C" >&6
17727else
17728  cat >conftest.$ac_ext <<_ACEOF
17729#line 17729 "configure"
17730#include "confdefs.h"
17731/* System header to define __stub macros and hopefully few prototypes,
17732    which can conflict with char $ac_func (); below.  */
17733#include <assert.h>
17734/* Override any gcc2 internal prototype to avoid an error.  */
17735#ifdef __cplusplus
17736extern "C"
17737#endif
17738/* We use char because int might match the return type of a gcc2
17739   builtin and then its argument prototype would still apply.  */
17740char $ac_func ();
17741char (*f) ();
17742
17743int
17744main (void)
17745{
17746/* The GNU C library defines this for functions which it implements
17747    to always fail with ENOSYS.  Some functions are actually named
17748    something starting with __ and the normal name is an alias.  */
17749#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
17750choke me
17751#else
17752f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
17753#endif
17754
17755  ;
17756  return 0;
17757}
17758_ACEOF
17759rm -f conftest.$ac_objext conftest$ac_exeext
17760if { (eval echo "$as_me:17760: \"$ac_link\"") >&5
17761  (eval $ac_link) 2>&5
17762  ac_status=$?
17763  echo "$as_me:17763: \$? = $ac_status" >&5
17764  (exit $ac_status); } &&
17765         { ac_try='test -s conftest$ac_exeext'
17766  { (eval echo "$as_me:17766: \"$ac_try\"") >&5
17767  (eval $ac_try) 2>&5
17768  ac_status=$?
17769  echo "$as_me:17769: \$? = $ac_status" >&5
17770  (exit $ac_status); }; }; then
17771  eval "$as_ac_var=yes"
17772else
17773  echo "$as_me: failed program was:" >&5
17774cat conftest.$ac_ext >&5
17775eval "$as_ac_var=no"
17776fi
17777rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17778fi
17779echo "$as_me:17779: result: `eval echo '${'$as_ac_var'}'`" >&5
17780echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
17781if test `eval echo '${'$as_ac_var'}'` = yes; then
17782  cat >>confdefs.h <<EOF
17783#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
17784EOF
17785
17786fi
17787done
17788
17789else
17790	{ echo "$as_me:17790: WARNING: No libraries found for FreeType" >&5
17791echo "$as_me: WARNING: No libraries found for FreeType" >&2;}
17792	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
17793fi
17794
17795# FIXME: revisit this if needed
17796
17797if test "$cf_cv_found_freetype" = yes ; then
17798echo "$as_me:17798: checking for usable Xft/fontconfig package" >&5
17799echo $ECHO_N "checking for usable Xft/fontconfig package... $ECHO_C" >&6
17800if test "${cf_cv_xft_compat+set}" = set; then
17801  echo $ECHO_N "(cached) $ECHO_C" >&6
17802else
17803
17804cat >conftest.$ac_ext <<_ACEOF
17805#line 17805 "configure"
17806#include "confdefs.h"
17807
17808#include <X11/Xft/Xft.h>
17809
17810int
17811main (void)
17812{
17813
17814	XftPattern *pat;
17815	XftPatternBuild(pat,
17816					XFT_FAMILY, XftTypeString, "mono",
17817					(void *) 0);
17818
17819  ;
17820  return 0;
17821}
17822_ACEOF
17823rm -f conftest.$ac_objext conftest$ac_exeext
17824if { (eval echo "$as_me:17824: \"$ac_link\"") >&5
17825  (eval $ac_link) 2>&5
17826  ac_status=$?
17827  echo "$as_me:17827: \$? = $ac_status" >&5
17828  (exit $ac_status); } &&
17829         { ac_try='test -s conftest$ac_exeext'
17830  { (eval echo "$as_me:17830: \"$ac_try\"") >&5
17831  (eval $ac_try) 2>&5
17832  ac_status=$?
17833  echo "$as_me:17833: \$? = $ac_status" >&5
17834  (exit $ac_status); }; }; then
17835  cf_cv_xft_compat=yes
17836else
17837  echo "$as_me: failed program was:" >&5
17838cat conftest.$ac_ext >&5
17839cf_cv_xft_compat=no
17840fi
17841rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17842
17843fi
17844echo "$as_me:17844: result: $cf_cv_xft_compat" >&5
17845echo "${ECHO_T}$cf_cv_xft_compat" >&6
17846
17847if test "$cf_cv_xft_compat" = no
17848then
17849	# workaround for broken ".pc" files used for Xft.
17850	case "$cf_cv_x_freetype_libs" in
17851	(*-lfontconfig*)
17852		;;
17853	(*)
17854		test -n "$verbose" && echo "	work around broken package" 1>&6
17855
17856echo "${as_me:-configure}:17856: testing work around broken package ..." 1>&5
17857
17858		cf_save_fontconfig="$LIBS"
17859
17860if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists fontconfig; then
17861	test -n "$verbose" && echo "	found package fontconfig" 1>&6
17862
17863echo "${as_me:-configure}:17863: testing found package fontconfig ..." 1>&5
17864
17865	cf_pkgconfig_incs="`$PKG_CONFIG --cflags fontconfig 2>/dev/null`"
17866	cf_pkgconfig_libs="`$PKG_CONFIG --libs   fontconfig 2>/dev/null`"
17867	test -n "$verbose" && echo "	package fontconfig CFLAGS: $cf_pkgconfig_incs" 1>&6
17868
17869echo "${as_me:-configure}:17869: testing package fontconfig CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17870
17871	test -n "$verbose" && echo "	package fontconfig LIBS: $cf_pkgconfig_libs" 1>&6
17872
17873echo "${as_me:-configure}:17873: testing package fontconfig LIBS: $cf_pkgconfig_libs ..." 1>&5
17874
17875cf_fix_cppflags=no
17876cf_new_cflags=
17877cf_new_cppflags=
17878cf_new_extra_cppflags=
17879
17880for cf_add_cflags in $cf_pkgconfig_incs
17881do
17882case $cf_fix_cppflags in
17883(no)
17884	case $cf_add_cflags in
17885	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17886		case $cf_add_cflags in
17887		(-D*)
17888			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17889
17890			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17891				&& test -z "${cf_tst_cflags}" \
17892				&& cf_fix_cppflags=yes
17893
17894			if test $cf_fix_cppflags = yes ; then
17895
17896	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17897	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17898
17899				continue
17900			elif test "${cf_tst_cflags}" = "\"'" ; then
17901
17902	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17903	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17904
17905				continue
17906			fi
17907			;;
17908		esac
17909		case "$CPPFLAGS" in
17910		(*$cf_add_cflags)
17911			;;
17912		(*)
17913			case $cf_add_cflags in
17914			(-D*)
17915				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17916
17917CPPFLAGS=`echo "$CPPFLAGS" | \
17918	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17919		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17920
17921				;;
17922			esac
17923
17924	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17925	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17926
17927			;;
17928		esac
17929		;;
17930	(*)
17931
17932	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17933	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17934
17935		;;
17936	esac
17937	;;
17938(yes)
17939
17940	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17941	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17942
17943	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17944
17945	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17946		&& test -z "${cf_tst_cflags}" \
17947		&& cf_fix_cppflags=no
17948	;;
17949esac
17950done
17951
17952if test -n "$cf_new_cflags" ; then
17953
17954	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17955	CFLAGS="${CFLAGS}$cf_new_cflags"
17956
17957fi
17958
17959if test -n "$cf_new_cppflags" ; then
17960
17961	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17962	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17963
17964fi
17965
17966if test -n "$cf_new_extra_cppflags" ; then
17967
17968	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17969	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17970
17971fi
17972
17973cf_add_libs="$cf_pkgconfig_libs"
17974# Filter out duplicates - this happens with badly-designed ".pc" files...
17975for cf_add_1lib in $LIBS
17976do
17977	for cf_add_2lib in $cf_add_libs
17978	do
17979		if test "x$cf_add_1lib" = "x$cf_add_2lib"
17980		then
17981			cf_add_1lib=
17982			break
17983		fi
17984	done
17985	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
17986done
17987LIBS="$cf_add_libs"
17988
17989cf_fix_cppflags=no
17990cf_new_cflags=
17991cf_new_cppflags=
17992cf_new_extra_cppflags=
17993
17994for cf_add_cflags in $cf_pkgconfig_incs
17995do
17996case $cf_fix_cppflags in
17997(no)
17998	case $cf_add_cflags in
17999	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18000		case $cf_add_cflags in
18001		(-D*)
18002			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18003
18004			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18005				&& test -z "${cf_tst_cflags}" \
18006				&& cf_fix_cppflags=yes
18007
18008			if test $cf_fix_cppflags = yes ; then
18009
18010	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18011	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18012
18013				continue
18014			elif test "${cf_tst_cflags}" = "\"'" ; then
18015
18016	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18017	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18018
18019				continue
18020			fi
18021			;;
18022		esac
18023		case "$CPPFLAGS" in
18024		(*$cf_add_cflags)
18025			;;
18026		(*)
18027			case $cf_add_cflags in
18028			(-D*)
18029				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18030
18031CPPFLAGS=`echo "$CPPFLAGS" | \
18032	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18033		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18034
18035				;;
18036			esac
18037
18038	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18039	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18040
18041			;;
18042		esac
18043		;;
18044	(*)
18045
18046	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18047	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18048
18049		;;
18050	esac
18051	;;
18052(yes)
18053
18054	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18055	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18056
18057	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18058
18059	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18060		&& test -z "${cf_tst_cflags}" \
18061		&& cf_fix_cppflags=no
18062	;;
18063esac
18064done
18065
18066if test -n "$cf_new_cflags" ; then
18067
18068	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18069	CFLAGS="${CFLAGS}$cf_new_cflags"
18070
18071fi
18072
18073if test -n "$cf_new_cppflags" ; then
18074
18075	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18076	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18077
18078fi
18079
18080if test -n "$cf_new_extra_cppflags" ; then
18081
18082	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18083	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18084
18085fi
18086
18087				LIBS="$cf_save_fontconfig"
18088
18089test -n "$verbose" && echo "	...before $LIBS" 1>&6
18090
18091echo "${as_me:-configure}:18091: testing ...before $LIBS ..." 1>&5
18092
18093LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft $cf_pkgconfig_libs %" -e 's%  % %g'`
18094test -n "$verbose" && echo "	...after  $LIBS" 1>&6
18095
18096echo "${as_me:-configure}:18096: testing ...after  $LIBS ..." 1>&5
18097
18098else
18099	cf_pkgconfig_incs=
18100	cf_pkgconfig_libs=
18101
18102test -n "$verbose" && echo "	...before $LIBS" 1>&6
18103
18104echo "${as_me:-configure}:18104: testing ...before $LIBS ..." 1>&5
18105
18106LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXft %-lXft -lfontconfig %" -e 's%  % %g'`
18107test -n "$verbose" && echo "	...after  $LIBS" 1>&6
18108
18109echo "${as_me:-configure}:18109: testing ...after  $LIBS ..." 1>&5
18110
18111fi
18112
18113		;;
18114	esac
18115fi
18116fi
18117
18118else
18119	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-DXRENDERFONT//`
18120fi
18121
18122echo "$as_me:18122: checking if you want support for HP-style function keys" >&5
18123echo $ECHO_N "checking if you want support for HP-style function keys... $ECHO_C" >&6
18124
18125# Check whether --enable-hp-fkeys or --disable-hp-fkeys was given.
18126if test "${enable_hp_fkeys+set}" = set; then
18127  enableval="$enable_hp_fkeys"
18128  test "$enableval" != yes && enableval=no
18129	if test "$enableval" != "no" ; then
18130    enable_hp_fkeys=yes
18131	else
18132		enable_hp_fkeys=no
18133	fi
18134else
18135  enableval=no
18136	enable_hp_fkeys=no
18137
18138fi;
18139echo "$as_me:18139: result: $enable_hp_fkeys" >&5
18140echo "${ECHO_T}$enable_hp_fkeys" >&6
18141if test "$enable_hp_fkeys" = yes ; then
18142
18143cat >>confdefs.h <<\EOF
18144#define OPT_HP_FUNC_KEYS 1
18145EOF
18146
18147fi
18148
18149echo "$as_me:18149: checking if you want support for SCO-style function keys" >&5
18150echo $ECHO_N "checking if you want support for SCO-style function keys... $ECHO_C" >&6
18151
18152# Check whether --enable-sco-fkeys or --disable-sco-fkeys was given.
18153if test "${enable_sco_fkeys+set}" = set; then
18154  enableval="$enable_sco_fkeys"
18155  test "$enableval" != yes && enableval=no
18156	if test "$enableval" != "no" ; then
18157    enable_sco_fkeys=yes
18158	else
18159		enable_sco_fkeys=no
18160	fi
18161else
18162  enableval=no
18163	enable_sco_fkeys=no
18164
18165fi;
18166echo "$as_me:18166: result: $enable_sco_fkeys" >&5
18167echo "${ECHO_T}$enable_sco_fkeys" >&6
18168if test "$enable_sco_fkeys" = yes ; then
18169
18170cat >>confdefs.h <<\EOF
18171#define OPT_SCO_FUNC_KEYS 1
18172EOF
18173
18174fi
18175
18176echo "$as_me:18176: checking if you want support for Sun-style function keys" >&5
18177echo $ECHO_N "checking if you want support for Sun-style function keys... $ECHO_C" >&6
18178
18179# Check whether --enable-sun-fkeys or --disable-sun-fkeys was given.
18180if test "${enable_sun_fkeys+set}" = set; then
18181  enableval="$enable_sun_fkeys"
18182  test "$enableval" != no && enableval=yes
18183	if test "$enableval" != "yes" ; then
18184    enable_sun_fkeys=no
18185	else
18186		enable_sun_fkeys=yes
18187	fi
18188else
18189  enableval=yes
18190	enable_sun_fkeys=yes
18191
18192fi;
18193echo "$as_me:18193: result: $enable_sun_fkeys" >&5
18194echo "${ECHO_T}$enable_sun_fkeys" >&6
18195if test "$enable_sun_fkeys" = no ; then
18196
18197cat >>confdefs.h <<\EOF
18198#define OPT_SUN_FUNC_KEYS 0
18199EOF
18200
18201fi
18202
18203echo "$as_me:18203: checking if you want saved-lines stored as a FIFO" >&5
18204echo $ECHO_N "checking if you want saved-lines stored as a FIFO... $ECHO_C" >&6
18205
18206# Check whether --enable-fifo-lines or --disable-fifo-lines was given.
18207if test "${enable_fifo_lines+set}" = set; then
18208  enableval="$enable_fifo_lines"
18209  test "$enableval" != no && enableval=yes
18210	if test "$enableval" != "yes" ; then
18211    enable_fifo_lines=no
18212	else
18213		enable_fifo_lines=yes
18214	fi
18215else
18216  enableval=yes
18217	enable_fifo_lines=yes
18218
18219fi;
18220echo "$as_me:18220: result: $enable_fifo_lines" >&5
18221echo "${ECHO_T}$enable_fifo_lines" >&6
18222if test "$enable_fifo_lines" = yes ; then
18223
18224cat >>confdefs.h <<\EOF
18225#define OPT_FIFO_LINES 1
18226EOF
18227
18228fi
18229
18230echo "$as_me:18230: checking if you want support for internationalization" >&5
18231echo $ECHO_N "checking if you want support for internationalization... $ECHO_C" >&6
18232
18233# Check whether --enable-i18n or --disable-i18n was given.
18234if test "${enable_i18n+set}" = set; then
18235  enableval="$enable_i18n"
18236  test "$enableval" != no && enableval=yes
18237	if test "$enableval" != "yes" ; then
18238    enable_i18n=no
18239	else
18240		enable_i18n=yes
18241	fi
18242else
18243  enableval=yes
18244	enable_i18n=yes
18245
18246fi;
18247echo "$as_me:18247: result: $enable_i18n" >&5
18248echo "${ECHO_T}$enable_i18n" >&6
18249if test "$enable_i18n" = no ; then
18250
18251cat >>confdefs.h <<\EOF
18252#define OPT_I18N_SUPPORT 0
18253EOF
18254
18255fi
18256
18257echo "$as_me:18257: checking if you want support for initial-erase setup" >&5
18258echo $ECHO_N "checking if you want support for initial-erase setup... $ECHO_C" >&6
18259
18260# Check whether --enable-initial-erase or --disable-initial-erase was given.
18261if test "${enable_initial_erase+set}" = set; then
18262  enableval="$enable_initial_erase"
18263  test "$enableval" != no && enableval=yes
18264	if test "$enableval" != "yes" ; then
18265    enable_ie=no
18266	else
18267		enable_ie=yes
18268	fi
18269else
18270  enableval=yes
18271	enable_ie=yes
18272
18273fi;
18274echo "$as_me:18274: result: $enable_ie" >&5
18275echo "${ECHO_T}$enable_ie" >&6
18276if test "$enable_ie" = no ; then
18277
18278cat >>confdefs.h <<\EOF
18279#define OPT_INITIAL_ERASE 0
18280EOF
18281
18282fi
18283
18284echo "$as_me:18284: checking if you want support for input-method" >&5
18285echo $ECHO_N "checking if you want support for input-method... $ECHO_C" >&6
18286
18287# Check whether --enable-input-method or --disable-input-method was given.
18288if test "${enable_input_method+set}" = set; then
18289  enableval="$enable_input_method"
18290  test "$enableval" != no && enableval=yes
18291	if test "$enableval" != "yes" ; then
18292    enable_ximp=no
18293	else
18294		enable_ximp=yes
18295	fi
18296else
18297  enableval=yes
18298	enable_ximp=yes
18299
18300fi;
18301echo "$as_me:18301: result: $enable_ximp" >&5
18302echo "${ECHO_T}$enable_ximp" >&6
18303
18304echo "$as_me:18304: checking if X libraries support input-method" >&5
18305echo $ECHO_N "checking if X libraries support input-method... $ECHO_C" >&6
18306if test "${cf_cv_input_method+set}" = set; then
18307  echo $ECHO_N "(cached) $ECHO_C" >&6
18308else
18309
18310cat >conftest.$ac_ext <<_ACEOF
18311#line 18311 "configure"
18312#include "confdefs.h"
18313
18314#include <X11/IntrinsicP.h>
18315#include <X11/Xatom.h>
18316#include <X11/Xutil.h>
18317#include <X11/Xmu/Atoms.h>
18318#include <X11/Xmu/Converters.h>
18319#include <X11/Xaw/XawImP.h>
18320
18321int
18322main (void)
18323{
18324
18325{
18326	XIM xim;
18327	XIMStyles *xim_styles = 0;
18328	XIMStyle input_style;
18329	Widget w = 0;
18330
18331	XSetLocaleModifiers("@im=none");
18332	xim = XOpenIM(XtDisplay(w), NULL, NULL, NULL);
18333	XGetIMValues(xim, XNQueryInputStyle, &xim_styles, NULL);
18334	XCloseIM(xim);
18335	input_style = (XIMPreeditNothing | XIMStatusNothing);
18336}
18337
18338  ;
18339  return 0;
18340}
18341_ACEOF
18342rm -f conftest.$ac_objext conftest$ac_exeext
18343if { (eval echo "$as_me:18343: \"$ac_link\"") >&5
18344  (eval $ac_link) 2>&5
18345  ac_status=$?
18346  echo "$as_me:18346: \$? = $ac_status" >&5
18347  (exit $ac_status); } &&
18348         { ac_try='test -s conftest$ac_exeext'
18349  { (eval echo "$as_me:18349: \"$ac_try\"") >&5
18350  (eval $ac_try) 2>&5
18351  ac_status=$?
18352  echo "$as_me:18352: \$? = $ac_status" >&5
18353  (exit $ac_status); }; }; then
18354  cf_cv_input_method=yes
18355else
18356  echo "$as_me: failed program was:" >&5
18357cat conftest.$ac_ext >&5
18358cf_cv_input_method=no
18359fi
18360rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18361fi
18362echo "$as_me:18362: result: $cf_cv_input_method" >&5
18363echo "${ECHO_T}$cf_cv_input_method" >&6
18364
18365test "$cf_cv_input_method" = no && enable_ximp=no
18366if test "$enable_ximp" = no ; then
18367
18368cat >>confdefs.h <<\EOF
18369#define OPT_INPUT_METHOD 0
18370EOF
18371
18372fi
18373
18374echo "$as_me:18374: checking if you want support for load-vt-fonts" >&5
18375echo $ECHO_N "checking if you want support for load-vt-fonts... $ECHO_C" >&6
18376
18377# Check whether --enable-load-vt-fonts or --disable-load-vt-fonts was given.
18378if test "${enable_load_vt_fonts+set}" = set; then
18379  enableval="$enable_load_vt_fonts"
18380  test "$enableval" != yes && enableval=no
18381	if test "$enableval" != "no" ; then
18382    enable_load_vt_fonts=yes
18383	else
18384		enable_load_vt_fonts=no
18385	fi
18386else
18387  enableval=no
18388	enable_load_vt_fonts=no
18389
18390fi;
18391echo "$as_me:18391: result: $enable_load_vt_fonts" >&5
18392echo "${ECHO_T}$enable_load_vt_fonts" >&6
18393if test "$enable_load_vt_fonts" = yes ; then
18394
18395cat >>confdefs.h <<\EOF
18396#define OPT_LOAD_VTFONTS 1
18397EOF
18398
18399fi
18400
18401echo "$as_me:18401: checking if you want support for logging" >&5
18402echo $ECHO_N "checking if you want support for logging... $ECHO_C" >&6
18403
18404# Check whether --enable-logging or --disable-logging was given.
18405if test "${enable_logging+set}" = set; then
18406  enableval="$enable_logging"
18407  test "$enableval" != yes && enableval=no
18408	if test "$enableval" != "no" ; then
18409    enable_logging=yes
18410	else
18411		enable_logging=no
18412	fi
18413else
18414  enableval=no
18415	enable_logging=no
18416
18417fi;
18418echo "$as_me:18418: result: $enable_logging" >&5
18419echo "${ECHO_T}$enable_logging" >&6
18420if test "$enable_logging" = yes ; then
18421
18422cat >>confdefs.h <<\EOF
18423#define ALLOWLOGGING 1
18424EOF
18425
18426	echo "$as_me:18426: checking if you want to allow logging via a pipe" >&5
18427echo $ECHO_N "checking if you want to allow logging via a pipe... $ECHO_C" >&6
18428
18429# Check whether --enable-logfile-exec or --disable-logfile-exec was given.
18430if test "${enable_logfile_exec+set}" = set; then
18431  enableval="$enable_logfile_exec"
18432  test "$enableval" != yes && enableval=no
18433	if test "$enableval" != "no" ; then
18434    enable_log_exec=yes
18435	else
18436		enable_log_exec=no
18437	fi
18438else
18439  enableval=no
18440	enable_log_exec=no
18441
18442fi;
18443	echo "$as_me:18443: result: $enable_log_exec" >&5
18444echo "${ECHO_T}$enable_log_exec" >&6
18445	if test "$enable_log_exec" = yes ; then
18446
18447cat >>confdefs.h <<\EOF
18448#define ALLOWLOGFILEEXEC 1
18449EOF
18450
18451	fi
18452fi
18453
18454echo "$as_me:18454: checking if you want support for iconify/maximize translations" >&5
18455echo $ECHO_N "checking if you want support for iconify/maximize translations... $ECHO_C" >&6
18456
18457# Check whether --enable-maximize or --disable-maximize was given.
18458if test "${enable_maximize+set}" = set; then
18459  enableval="$enable_maximize"
18460  test "$enableval" != no && enableval=yes
18461	if test "$enableval" != "yes" ; then
18462    enable_maximize=no
18463	else
18464		enable_maximize=yes
18465	fi
18466else
18467  enableval=yes
18468	enable_maximize=yes
18469
18470fi;
18471echo "$as_me:18471: result: $enable_maximize" >&5
18472echo "${ECHO_T}$enable_maximize" >&6
18473test "$enable_maximize" = no &&
18474cat >>confdefs.h <<\EOF
18475#define OPT_MAXIMIZE 0
18476EOF
18477
18478echo "$as_me:18478: checking if you want NumLock to override keyboard tables" >&5
18479echo $ECHO_N "checking if you want NumLock to override keyboard tables... $ECHO_C" >&6
18480
18481# Check whether --enable-num-lock or --disable-num-lock was given.
18482if test "${enable_num_lock+set}" = set; then
18483  enableval="$enable_num_lock"
18484  test "$enableval" != no && enableval=yes
18485	if test "$enableval" != "yes" ; then
18486    enable_numlock=no
18487	else
18488		enable_numlock=yes
18489	fi
18490else
18491  enableval=yes
18492	enable_numlock=yes
18493
18494fi;
18495echo "$as_me:18495: result: $enable_numlock" >&5
18496echo "${ECHO_T}$enable_numlock" >&6
18497test "$enable_numlock" = no &&
18498cat >>confdefs.h <<\EOF
18499#define OPT_NUM_LOCK 0
18500EOF
18501
18502echo "$as_me:18502: checking if you want support for get/set of base64 selection data" >&5
18503echo $ECHO_N "checking if you want support for get/set of base64 selection data... $ECHO_C" >&6
18504
18505# Check whether --enable-paste64 or --disable-paste64 was given.
18506if test "${enable_paste64+set}" = set; then
18507  enableval="$enable_paste64"
18508  test "$enableval" != no && enableval=yes
18509	if test "$enableval" != "yes" ; then
18510    enable_paste64=no
18511	else
18512		enable_paste64=yes
18513	fi
18514else
18515  enableval=yes
18516	enable_paste64=yes
18517
18518fi;
18519echo "$as_me:18519: result: $enable_paste64" >&5
18520echo "${ECHO_T}$enable_paste64" >&6
18521if test "$enable_paste64" = yes ; then
18522
18523cat >>confdefs.h <<\EOF
18524#define OPT_PASTE64 1
18525EOF
18526
18527else
18528
18529cat >>confdefs.h <<\EOF
18530#define OPT_PASTE64 0
18531EOF
18532
18533fi
18534
18535echo "$as_me:18535: checking if you want support for pty-handshaking" >&5
18536echo $ECHO_N "checking if you want support for pty-handshaking... $ECHO_C" >&6
18537
18538# Check whether --enable-pty-handshake or --disable-pty-handshake was given.
18539if test "${enable_pty_handshake+set}" = set; then
18540  enableval="$enable_pty_handshake"
18541  test "$enableval" != no && enableval=yes
18542	if test "$enableval" != "yes" ; then
18543    enable_pty_handshake=no
18544	else
18545		enable_pty_handshake=yes
18546	fi
18547else
18548  enableval=yes
18549	enable_pty_handshake=yes
18550
18551fi;
18552echo "$as_me:18552: result: $enable_pty_handshake" >&5
18553echo "${ECHO_T}$enable_pty_handshake" >&6
18554if test "$enable_pty_handshake" = yes ; then
18555
18556cat >>confdefs.h <<\EOF
18557#define OPT_PTY_HANDSHAKE 1
18558EOF
18559
18560else
18561
18562cat >>confdefs.h <<\EOF
18563#define OPT_PTY_HANDSHAKE 0
18564EOF
18565
18566fi
18567
18568echo "$as_me:18568: checking if you want support for mouse in readline applications" >&5
18569echo $ECHO_N "checking if you want support for mouse in readline applications... $ECHO_C" >&6
18570
18571# Check whether --enable-readline-mouse or --disable-readline-mouse was given.
18572if test "${enable_readline_mouse+set}" = set; then
18573  enableval="$enable_readline_mouse"
18574  test "$enableval" != yes && enableval=no
18575	if test "$enableval" != "no" ; then
18576    enable_readline_mouse=yes
18577	else
18578		enable_readline_mouse=no
18579	fi
18580else
18581  enableval=no
18582	enable_readline_mouse=no
18583
18584fi;
18585echo "$as_me:18585: result: $enable_readline_mouse" >&5
18586echo "${ECHO_T}$enable_readline_mouse" >&6
18587if test "$enable_readline_mouse" = yes ; then
18588
18589cat >>confdefs.h <<\EOF
18590#define OPT_READLINE 1
18591EOF
18592
18593fi
18594
18595echo "$as_me:18595: checking if you want support for regular-expression selections" >&5
18596echo $ECHO_N "checking if you want support for regular-expression selections... $ECHO_C" >&6
18597
18598# Check whether --enable-regex or --disable-regex was given.
18599if test "${enable_regex+set}" = set; then
18600  enableval="$enable_regex"
18601  test "$enableval" != no && enableval=yes
18602	if test "$enableval" != "yes" ; then
18603    enable_regex=no
18604	else
18605		enable_regex=yes
18606	fi
18607else
18608  enableval=yes
18609	enable_regex=yes
18610
18611fi;
18612echo "$as_me:18612: result: $enable_regex" >&5
18613echo "${ECHO_T}$enable_regex" >&6
18614if test "$enable_regex" = yes ; then
18615
18616echo "$as_me:18616: checking if you want to use PCRE for regular-expressions" >&5
18617echo $ECHO_N "checking if you want to use PCRE for regular-expressions... $ECHO_C" >&6
18618
18619# Check whether --with-pcre or --without-pcre was given.
18620if test "${with_pcre+set}" = set; then
18621  withval="$with_pcre"
18622
18623fi;
18624test -z "$with_pcre" && with_pcre=no
18625echo "$as_me:18625: result: $with_pcre" >&5
18626echo "${ECHO_T}$with_pcre" >&6
18627
18628if test "$with_pcre" != no ; then
18629
18630if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
18631	test -n "$verbose" && echo "	found package libpcre" 1>&6
18632
18633echo "${as_me:-configure}:18633: testing found package libpcre ..." 1>&5
18634
18635	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
18636	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
18637	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
18638
18639echo "${as_me:-configure}:18639: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18640
18641	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
18642
18643echo "${as_me:-configure}:18643: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
18644
18645cf_fix_cppflags=no
18646cf_new_cflags=
18647cf_new_cppflags=
18648cf_new_extra_cppflags=
18649
18650for cf_add_cflags in $cf_pkgconfig_incs
18651do
18652case $cf_fix_cppflags in
18653(no)
18654	case $cf_add_cflags in
18655	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18656		case $cf_add_cflags in
18657		(-D*)
18658			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18659
18660			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18661				&& test -z "${cf_tst_cflags}" \
18662				&& cf_fix_cppflags=yes
18663
18664			if test $cf_fix_cppflags = yes ; then
18665
18666	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18667	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18668
18669				continue
18670			elif test "${cf_tst_cflags}" = "\"'" ; then
18671
18672	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18673	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18674
18675				continue
18676			fi
18677			;;
18678		esac
18679		case "$CPPFLAGS" in
18680		(*$cf_add_cflags)
18681			;;
18682		(*)
18683			case $cf_add_cflags in
18684			(-D*)
18685				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18686
18687CPPFLAGS=`echo "$CPPFLAGS" | \
18688	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18689		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18690
18691				;;
18692			esac
18693
18694	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18695	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18696
18697			;;
18698		esac
18699		;;
18700	(*)
18701
18702	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18703	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18704
18705		;;
18706	esac
18707	;;
18708(yes)
18709
18710	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18711	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18712
18713	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18714
18715	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18716		&& test -z "${cf_tst_cflags}" \
18717		&& cf_fix_cppflags=no
18718	;;
18719esac
18720done
18721
18722if test -n "$cf_new_cflags" ; then
18723
18724	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18725	CFLAGS="${CFLAGS}$cf_new_cflags"
18726
18727fi
18728
18729if test -n "$cf_new_cppflags" ; then
18730
18731	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18732	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18733
18734fi
18735
18736if test -n "$cf_new_extra_cppflags" ; then
18737
18738	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18739	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18740
18741fi
18742
18743cf_add_libs="$cf_pkgconfig_libs"
18744# Filter out duplicates - this happens with badly-designed ".pc" files...
18745for cf_add_1lib in $LIBS
18746do
18747	for cf_add_2lib in $cf_add_libs
18748	do
18749		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18750		then
18751			cf_add_1lib=
18752			break
18753		fi
18754	done
18755	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18756done
18757LIBS="$cf_add_libs"
18758
18759	:
18760else
18761	cf_pkgconfig_incs=
18762	cf_pkgconfig_libs=
18763
18764echo "$as_me:18764: checking for pcre_compile in -lpcre" >&5
18765echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
18766if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
18767  echo $ECHO_N "(cached) $ECHO_C" >&6
18768else
18769  ac_check_lib_save_LIBS=$LIBS
18770LIBS="-lpcre  $LIBS"
18771cat >conftest.$ac_ext <<_ACEOF
18772#line 18772 "configure"
18773#include "confdefs.h"
18774
18775/* Override any gcc2 internal prototype to avoid an error.  */
18776#ifdef __cplusplus
18777extern "C"
18778#endif
18779/* We use char because int might match the return type of a gcc2
18780   builtin and then its argument prototype would still apply.  */
18781char pcre_compile ();
18782int
18783main (void)
18784{
18785pcre_compile ();
18786  ;
18787  return 0;
18788}
18789_ACEOF
18790rm -f conftest.$ac_objext conftest$ac_exeext
18791if { (eval echo "$as_me:18791: \"$ac_link\"") >&5
18792  (eval $ac_link) 2>&5
18793  ac_status=$?
18794  echo "$as_me:18794: \$? = $ac_status" >&5
18795  (exit $ac_status); } &&
18796         { ac_try='test -s conftest$ac_exeext'
18797  { (eval echo "$as_me:18797: \"$ac_try\"") >&5
18798  (eval $ac_try) 2>&5
18799  ac_status=$?
18800  echo "$as_me:18800: \$? = $ac_status" >&5
18801  (exit $ac_status); }; }; then
18802  ac_cv_lib_pcre_pcre_compile=yes
18803else
18804  echo "$as_me: failed program was:" >&5
18805cat conftest.$ac_ext >&5
18806ac_cv_lib_pcre_pcre_compile=no
18807fi
18808rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18809LIBS=$ac_check_lib_save_LIBS
18810fi
18811echo "$as_me:18811: result: $ac_cv_lib_pcre_pcre_compile" >&5
18812echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
18813if test $ac_cv_lib_pcre_pcre_compile = yes; then
18814  cat >>confdefs.h <<EOF
18815#define HAVE_LIBPCRE 1
18816EOF
18817
18818  LIBS="-lpcre $LIBS"
18819
18820else
18821  { { echo "$as_me:18821: error: Cannot find PCRE library" >&5
18822echo "$as_me: error: Cannot find PCRE library" >&2;}
18823   { (exit 1); exit 1; }; }
18824fi
18825
18826fi
18827
18828cat >>confdefs.h <<\EOF
18829#define HAVE_LIB_PCRE 1
18830EOF
18831
18832		case $LIBS in
18833		(*pcreposix*)
18834			;;
18835		(*)
18836			echo "$as_me:18836: checking for pcreposix_regcomp in -lpcreposix" >&5
18837echo $ECHO_N "checking for pcreposix_regcomp in -lpcreposix... $ECHO_C" >&6
18838if test "${ac_cv_lib_pcreposix_pcreposix_regcomp+set}" = set; then
18839  echo $ECHO_N "(cached) $ECHO_C" >&6
18840else
18841  ac_check_lib_save_LIBS=$LIBS
18842LIBS="-lpcreposix  $LIBS"
18843cat >conftest.$ac_ext <<_ACEOF
18844#line 18844 "configure"
18845#include "confdefs.h"
18846
18847/* Override any gcc2 internal prototype to avoid an error.  */
18848#ifdef __cplusplus
18849extern "C"
18850#endif
18851/* We use char because int might match the return type of a gcc2
18852   builtin and then its argument prototype would still apply.  */
18853char pcreposix_regcomp ();
18854int
18855main (void)
18856{
18857pcreposix_regcomp ();
18858  ;
18859  return 0;
18860}
18861_ACEOF
18862rm -f conftest.$ac_objext conftest$ac_exeext
18863if { (eval echo "$as_me:18863: \"$ac_link\"") >&5
18864  (eval $ac_link) 2>&5
18865  ac_status=$?
18866  echo "$as_me:18866: \$? = $ac_status" >&5
18867  (exit $ac_status); } &&
18868         { ac_try='test -s conftest$ac_exeext'
18869  { (eval echo "$as_me:18869: \"$ac_try\"") >&5
18870  (eval $ac_try) 2>&5
18871  ac_status=$?
18872  echo "$as_me:18872: \$? = $ac_status" >&5
18873  (exit $ac_status); }; }; then
18874  ac_cv_lib_pcreposix_pcreposix_regcomp=yes
18875else
18876  echo "$as_me: failed program was:" >&5
18877cat conftest.$ac_ext >&5
18878ac_cv_lib_pcreposix_pcreposix_regcomp=no
18879fi
18880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18881LIBS=$ac_check_lib_save_LIBS
18882fi
18883echo "$as_me:18883: result: $ac_cv_lib_pcreposix_pcreposix_regcomp" >&5
18884echo "${ECHO_T}$ac_cv_lib_pcreposix_pcreposix_regcomp" >&6
18885if test $ac_cv_lib_pcreposix_pcreposix_regcomp = yes; then
18886
18887cat >>confdefs.h <<\EOF
18888#define HAVE_PCREPOSIX_H 1
18889EOF
18890
18891cf_add_libs="-lpcreposix"
18892# Filter out duplicates - this happens with badly-designed ".pc" files...
18893for cf_add_1lib in $LIBS
18894do
18895	for cf_add_2lib in $cf_add_libs
18896	do
18897		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18898		then
18899			cf_add_1lib=
18900			break
18901		fi
18902	done
18903	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18904done
18905LIBS="$cf_add_libs"
18906
18907else
18908  echo "$as_me:18908: checking for regcomp in -lpcreposix" >&5
18909echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
18910if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
18911  echo $ECHO_N "(cached) $ECHO_C" >&6
18912else
18913  ac_check_lib_save_LIBS=$LIBS
18914LIBS="-lpcreposix  $LIBS"
18915cat >conftest.$ac_ext <<_ACEOF
18916#line 18916 "configure"
18917#include "confdefs.h"
18918
18919/* Override any gcc2 internal prototype to avoid an error.  */
18920#ifdef __cplusplus
18921extern "C"
18922#endif
18923/* We use char because int might match the return type of a gcc2
18924   builtin and then its argument prototype would still apply.  */
18925char regcomp ();
18926int
18927main (void)
18928{
18929regcomp ();
18930  ;
18931  return 0;
18932}
18933_ACEOF
18934rm -f conftest.$ac_objext conftest$ac_exeext
18935if { (eval echo "$as_me:18935: \"$ac_link\"") >&5
18936  (eval $ac_link) 2>&5
18937  ac_status=$?
18938  echo "$as_me:18938: \$? = $ac_status" >&5
18939  (exit $ac_status); } &&
18940         { ac_try='test -s conftest$ac_exeext'
18941  { (eval echo "$as_me:18941: \"$ac_try\"") >&5
18942  (eval $ac_try) 2>&5
18943  ac_status=$?
18944  echo "$as_me:18944: \$? = $ac_status" >&5
18945  (exit $ac_status); }; }; then
18946  ac_cv_lib_pcreposix_regcomp=yes
18947else
18948  echo "$as_me: failed program was:" >&5
18949cat conftest.$ac_ext >&5
18950ac_cv_lib_pcreposix_regcomp=no
18951fi
18952rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18953LIBS=$ac_check_lib_save_LIBS
18954fi
18955echo "$as_me:18955: result: $ac_cv_lib_pcreposix_regcomp" >&5
18956echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
18957if test $ac_cv_lib_pcreposix_regcomp = yes; then
18958
18959cat >>confdefs.h <<\EOF
18960#define HAVE_PCREPOSIX_H 1
18961EOF
18962
18963cf_add_libs="-lpcreposix"
18964# Filter out duplicates - this happens with badly-designed ".pc" files...
18965for cf_add_1lib in $LIBS
18966do
18967	for cf_add_2lib in $cf_add_libs
18968	do
18969		if test "x$cf_add_1lib" = "x$cf_add_2lib"
18970		then
18971			cf_add_1lib=
18972			break
18973		fi
18974	done
18975	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
18976done
18977LIBS="$cf_add_libs"
18978
18979else
18980  { { echo "$as_me:18980: error: Cannot find PCRE POSIX library" >&5
18981echo "$as_me: error: Cannot find PCRE POSIX library" >&2;}
18982   { (exit 1); exit 1; }; }
18983fi
18984
18985fi
18986
18987			;;
18988		esac
18989fi
18990
18991	if test "$with_pcre" = no ; then
18992
18993cf_regex_func=no
18994
18995cf_regex_libs="regex re"
18996case $host_os in
18997(mingw*)
18998	cf_regex_libs="gnurx $cf_regex_libs"
18999	;;
19000esac
19001
19002echo "$as_me:19002: checking for regcomp" >&5
19003echo $ECHO_N "checking for regcomp... $ECHO_C" >&6
19004if test "${ac_cv_func_regcomp+set}" = set; then
19005  echo $ECHO_N "(cached) $ECHO_C" >&6
19006else
19007  cat >conftest.$ac_ext <<_ACEOF
19008#line 19008 "configure"
19009#include "confdefs.h"
19010/* System header to define __stub macros and hopefully few prototypes,
19011    which can conflict with char regcomp (); below.  */
19012#include <assert.h>
19013/* Override any gcc2 internal prototype to avoid an error.  */
19014#ifdef __cplusplus
19015extern "C"
19016#endif
19017/* We use char because int might match the return type of a gcc2
19018   builtin and then its argument prototype would still apply.  */
19019char regcomp ();
19020char (*f) ();
19021
19022int
19023main (void)
19024{
19025/* The GNU C library defines this for functions which it implements
19026    to always fail with ENOSYS.  Some functions are actually named
19027    something starting with __ and the normal name is an alias.  */
19028#if defined (__stub_regcomp) || defined (__stub___regcomp)
19029choke me
19030#else
19031f = regcomp; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19032#endif
19033
19034  ;
19035  return 0;
19036}
19037_ACEOF
19038rm -f conftest.$ac_objext conftest$ac_exeext
19039if { (eval echo "$as_me:19039: \"$ac_link\"") >&5
19040  (eval $ac_link) 2>&5
19041  ac_status=$?
19042  echo "$as_me:19042: \$? = $ac_status" >&5
19043  (exit $ac_status); } &&
19044         { ac_try='test -s conftest$ac_exeext'
19045  { (eval echo "$as_me:19045: \"$ac_try\"") >&5
19046  (eval $ac_try) 2>&5
19047  ac_status=$?
19048  echo "$as_me:19048: \$? = $ac_status" >&5
19049  (exit $ac_status); }; }; then
19050  ac_cv_func_regcomp=yes
19051else
19052  echo "$as_me: failed program was:" >&5
19053cat conftest.$ac_ext >&5
19054ac_cv_func_regcomp=no
19055fi
19056rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19057fi
19058echo "$as_me:19058: result: $ac_cv_func_regcomp" >&5
19059echo "${ECHO_T}$ac_cv_func_regcomp" >&6
19060if test $ac_cv_func_regcomp = yes; then
19061  cf_regex_func=regcomp
19062else
19063
19064	for cf_regex_lib in $cf_regex_libs
19065	do
19066		as_ac_Lib=`echo "ac_cv_lib_$cf_regex_lib''_regcomp" | $as_tr_sh`
19067echo "$as_me:19067: checking for regcomp in -l$cf_regex_lib" >&5
19068echo $ECHO_N "checking for regcomp in -l$cf_regex_lib... $ECHO_C" >&6
19069if eval "test \"\${$as_ac_Lib+set}\" = set"; then
19070  echo $ECHO_N "(cached) $ECHO_C" >&6
19071else
19072  ac_check_lib_save_LIBS=$LIBS
19073LIBS="-l$cf_regex_lib  $LIBS"
19074cat >conftest.$ac_ext <<_ACEOF
19075#line 19075 "configure"
19076#include "confdefs.h"
19077
19078/* Override any gcc2 internal prototype to avoid an error.  */
19079#ifdef __cplusplus
19080extern "C"
19081#endif
19082/* We use char because int might match the return type of a gcc2
19083   builtin and then its argument prototype would still apply.  */
19084char regcomp ();
19085int
19086main (void)
19087{
19088regcomp ();
19089  ;
19090  return 0;
19091}
19092_ACEOF
19093rm -f conftest.$ac_objext conftest$ac_exeext
19094if { (eval echo "$as_me:19094: \"$ac_link\"") >&5
19095  (eval $ac_link) 2>&5
19096  ac_status=$?
19097  echo "$as_me:19097: \$? = $ac_status" >&5
19098  (exit $ac_status); } &&
19099         { ac_try='test -s conftest$ac_exeext'
19100  { (eval echo "$as_me:19100: \"$ac_try\"") >&5
19101  (eval $ac_try) 2>&5
19102  ac_status=$?
19103  echo "$as_me:19103: \$? = $ac_status" >&5
19104  (exit $ac_status); }; }; then
19105  eval "$as_ac_Lib=yes"
19106else
19107  echo "$as_me: failed program was:" >&5
19108cat conftest.$ac_ext >&5
19109eval "$as_ac_Lib=no"
19110fi
19111rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19112LIBS=$ac_check_lib_save_LIBS
19113fi
19114echo "$as_me:19114: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19115echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19116if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19117
19118cf_add_libs="-l$cf_regex_lib"
19119# Filter out duplicates - this happens with badly-designed ".pc" files...
19120for cf_add_1lib in $LIBS
19121do
19122	for cf_add_2lib in $cf_add_libs
19123	do
19124		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19125		then
19126			cf_add_1lib=
19127			break
19128		fi
19129	done
19130	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19131done
19132LIBS="$cf_add_libs"
19133
19134				cf_regex_func=regcomp
19135				break
19136fi
19137
19138	done
19139
19140fi
19141
19142if test "$cf_regex_func" = no ; then
19143	echo "$as_me:19143: checking for compile" >&5
19144echo $ECHO_N "checking for compile... $ECHO_C" >&6
19145if test "${ac_cv_func_compile+set}" = set; then
19146  echo $ECHO_N "(cached) $ECHO_C" >&6
19147else
19148  cat >conftest.$ac_ext <<_ACEOF
19149#line 19149 "configure"
19150#include "confdefs.h"
19151/* System header to define __stub macros and hopefully few prototypes,
19152    which can conflict with char compile (); below.  */
19153#include <assert.h>
19154/* Override any gcc2 internal prototype to avoid an error.  */
19155#ifdef __cplusplus
19156extern "C"
19157#endif
19158/* We use char because int might match the return type of a gcc2
19159   builtin and then its argument prototype would still apply.  */
19160char compile ();
19161char (*f) ();
19162
19163int
19164main (void)
19165{
19166/* The GNU C library defines this for functions which it implements
19167    to always fail with ENOSYS.  Some functions are actually named
19168    something starting with __ and the normal name is an alias.  */
19169#if defined (__stub_compile) || defined (__stub___compile)
19170choke me
19171#else
19172f = compile; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
19173#endif
19174
19175  ;
19176  return 0;
19177}
19178_ACEOF
19179rm -f conftest.$ac_objext conftest$ac_exeext
19180if { (eval echo "$as_me:19180: \"$ac_link\"") >&5
19181  (eval $ac_link) 2>&5
19182  ac_status=$?
19183  echo "$as_me:19183: \$? = $ac_status" >&5
19184  (exit $ac_status); } &&
19185         { ac_try='test -s conftest$ac_exeext'
19186  { (eval echo "$as_me:19186: \"$ac_try\"") >&5
19187  (eval $ac_try) 2>&5
19188  ac_status=$?
19189  echo "$as_me:19189: \$? = $ac_status" >&5
19190  (exit $ac_status); }; }; then
19191  ac_cv_func_compile=yes
19192else
19193  echo "$as_me: failed program was:" >&5
19194cat conftest.$ac_ext >&5
19195ac_cv_func_compile=no
19196fi
19197rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19198fi
19199echo "$as_me:19199: result: $ac_cv_func_compile" >&5
19200echo "${ECHO_T}$ac_cv_func_compile" >&6
19201if test $ac_cv_func_compile = yes; then
19202  cf_regex_func=compile
19203else
19204
19205		echo "$as_me:19205: checking for compile in -lgen" >&5
19206echo $ECHO_N "checking for compile in -lgen... $ECHO_C" >&6
19207if test "${ac_cv_lib_gen_compile+set}" = set; then
19208  echo $ECHO_N "(cached) $ECHO_C" >&6
19209else
19210  ac_check_lib_save_LIBS=$LIBS
19211LIBS="-lgen  $LIBS"
19212cat >conftest.$ac_ext <<_ACEOF
19213#line 19213 "configure"
19214#include "confdefs.h"
19215
19216/* Override any gcc2 internal prototype to avoid an error.  */
19217#ifdef __cplusplus
19218extern "C"
19219#endif
19220/* We use char because int might match the return type of a gcc2
19221   builtin and then its argument prototype would still apply.  */
19222char compile ();
19223int
19224main (void)
19225{
19226compile ();
19227  ;
19228  return 0;
19229}
19230_ACEOF
19231rm -f conftest.$ac_objext conftest$ac_exeext
19232if { (eval echo "$as_me:19232: \"$ac_link\"") >&5
19233  (eval $ac_link) 2>&5
19234  ac_status=$?
19235  echo "$as_me:19235: \$? = $ac_status" >&5
19236  (exit $ac_status); } &&
19237         { ac_try='test -s conftest$ac_exeext'
19238  { (eval echo "$as_me:19238: \"$ac_try\"") >&5
19239  (eval $ac_try) 2>&5
19240  ac_status=$?
19241  echo "$as_me:19241: \$? = $ac_status" >&5
19242  (exit $ac_status); }; }; then
19243  ac_cv_lib_gen_compile=yes
19244else
19245  echo "$as_me: failed program was:" >&5
19246cat conftest.$ac_ext >&5
19247ac_cv_lib_gen_compile=no
19248fi
19249rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19250LIBS=$ac_check_lib_save_LIBS
19251fi
19252echo "$as_me:19252: result: $ac_cv_lib_gen_compile" >&5
19253echo "${ECHO_T}$ac_cv_lib_gen_compile" >&6
19254if test $ac_cv_lib_gen_compile = yes; then
19255
19256cf_add_libs="-lgen"
19257# Filter out duplicates - this happens with badly-designed ".pc" files...
19258for cf_add_1lib in $LIBS
19259do
19260	for cf_add_2lib in $cf_add_libs
19261	do
19262		if test "x$cf_add_1lib" = "x$cf_add_2lib"
19263		then
19264			cf_add_1lib=
19265			break
19266		fi
19267	done
19268	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
19269done
19270LIBS="$cf_add_libs"
19271
19272				cf_regex_func=compile
19273fi
19274
19275fi
19276
19277fi
19278
19279if test "$cf_regex_func" = no ; then
19280	{ echo "$as_me:19280: WARNING: cannot find regular expression library" >&5
19281echo "$as_me: WARNING: cannot find regular expression library" >&2;}
19282fi
19283
19284echo "$as_me:19284: checking for regular-expression headers" >&5
19285echo $ECHO_N "checking for regular-expression headers... $ECHO_C" >&6
19286if test "${cf_cv_regex_hdrs+set}" = set; then
19287  echo $ECHO_N "(cached) $ECHO_C" >&6
19288else
19289
19290cf_cv_regex_hdrs=no
19291case $cf_regex_func in
19292(compile)
19293	for cf_regex_hdr in regexp.h regexpr.h
19294	do
19295		cat >conftest.$ac_ext <<_ACEOF
19296#line 19296 "configure"
19297#include "confdefs.h"
19298#include <$cf_regex_hdr>
19299int
19300main (void)
19301{
19302
19303			char *p = compile("", "", "", 0);
19304			int x = step("", "");
19305
19306  ;
19307  return 0;
19308}
19309_ACEOF
19310rm -f conftest.$ac_objext conftest$ac_exeext
19311if { (eval echo "$as_me:19311: \"$ac_link\"") >&5
19312  (eval $ac_link) 2>&5
19313  ac_status=$?
19314  echo "$as_me:19314: \$? = $ac_status" >&5
19315  (exit $ac_status); } &&
19316         { ac_try='test -s conftest$ac_exeext'
19317  { (eval echo "$as_me:19317: \"$ac_try\"") >&5
19318  (eval $ac_try) 2>&5
19319  ac_status=$?
19320  echo "$as_me:19320: \$? = $ac_status" >&5
19321  (exit $ac_status); }; }; then
19322
19323			cf_cv_regex_hdrs=$cf_regex_hdr
19324			break
19325
19326else
19327  echo "$as_me: failed program was:" >&5
19328cat conftest.$ac_ext >&5
19329fi
19330rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19331	done
19332	;;
19333(*)
19334	for cf_regex_hdr in regex.h
19335	do
19336		cat >conftest.$ac_ext <<_ACEOF
19337#line 19337 "configure"
19338#include "confdefs.h"
19339#include <sys/types.h>
19340#include <$cf_regex_hdr>
19341int
19342main (void)
19343{
19344
19345			regex_t *p;
19346			int x = regcomp(p, "", 0);
19347			int y = regexec(p, "", 0, 0, 0);
19348			regfree(p);
19349
19350  ;
19351  return 0;
19352}
19353_ACEOF
19354rm -f conftest.$ac_objext conftest$ac_exeext
19355if { (eval echo "$as_me:19355: \"$ac_link\"") >&5
19356  (eval $ac_link) 2>&5
19357  ac_status=$?
19358  echo "$as_me:19358: \$? = $ac_status" >&5
19359  (exit $ac_status); } &&
19360         { ac_try='test -s conftest$ac_exeext'
19361  { (eval echo "$as_me:19361: \"$ac_try\"") >&5
19362  (eval $ac_try) 2>&5
19363  ac_status=$?
19364  echo "$as_me:19364: \$? = $ac_status" >&5
19365  (exit $ac_status); }; }; then
19366
19367			cf_cv_regex_hdrs=$cf_regex_hdr
19368			break
19369
19370else
19371  echo "$as_me: failed program was:" >&5
19372cat conftest.$ac_ext >&5
19373fi
19374rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19375	done
19376	;;
19377esac
19378
19379fi
19380echo "$as_me:19380: result: $cf_cv_regex_hdrs" >&5
19381echo "${ECHO_T}$cf_cv_regex_hdrs" >&6
19382
19383case $cf_cv_regex_hdrs in
19384	(no)		{ echo "$as_me:19384: WARNING: no regular expression header found" >&5
19385echo "$as_me: WARNING: no regular expression header found" >&2;} ;;
19386	(regex.h)
19387cat >>confdefs.h <<\EOF
19388#define HAVE_REGEX_H_FUNCS 1
19389EOF
19390 ;;
19391	(regexp.h)
19392cat >>confdefs.h <<\EOF
19393#define HAVE_REGEXP_H_FUNCS 1
19394EOF
19395 ;;
19396	(regexpr.h)
19397cat >>confdefs.h <<\EOF
19398#define HAVE_REGEXPR_H_FUNCS 1
19399EOF
19400 ;;
19401esac
19402
19403		if test "X$cf_cv_regex_hdrs" != "Xregex.h" ; then
19404			{ { echo "$as_me:19404: error: Only POSIX or PCRE regular expressions are supported" >&5
19405echo "$as_me: error: Only POSIX or PCRE regular expressions are supported" >&2;}
19406   { (exit 1); exit 1; }; }
19407		fi
19408	fi
19409
19410cat >>confdefs.h <<\EOF
19411#define OPT_SELECT_REGEX 1
19412EOF
19413
19414fi
19415
19416echo "$as_me:19416: checking if you want support for right-scrollbar" >&5
19417echo $ECHO_N "checking if you want support for right-scrollbar... $ECHO_C" >&6
19418
19419# Check whether --enable-rightbar or --disable-rightbar was given.
19420if test "${enable_rightbar+set}" = set; then
19421  enableval="$enable_rightbar"
19422  test "$enableval" != no && enableval=yes
19423	if test "$enableval" != "yes" ; then
19424    enable_rightbar=no
19425	else
19426		enable_rightbar=yes
19427	fi
19428else
19429  enableval=yes
19430	enable_rightbar=yes
19431
19432fi;
19433echo "$as_me:19433: result: $enable_rightbar" >&5
19434echo "${ECHO_T}$enable_rightbar" >&6
19435if test "$enable_rightbar" = yes ; then
19436
19437cat >>confdefs.h <<\EOF
19438#define SCROLLBAR_RIGHT 1
19439EOF
19440
19441fi
19442
19443echo "$as_me:19443: checking if you want check for redundant name-change" >&5
19444echo $ECHO_N "checking if you want check for redundant name-change... $ECHO_C" >&6
19445
19446# Check whether --enable-samename or --disable-samename was given.
19447if test "${enable_samename+set}" = set; then
19448  enableval="$enable_samename"
19449  test "$enableval" != no && enableval=yes
19450	if test "$enableval" != "yes" ; then
19451    enable_samename=no
19452	else
19453		enable_samename=yes
19454	fi
19455else
19456  enableval=yes
19457	enable_samename=yes
19458
19459fi;
19460echo "$as_me:19460: result: $enable_samename" >&5
19461echo "${ECHO_T}$enable_samename" >&6
19462test "$enable_samename" = no &&
19463cat >>confdefs.h <<\EOF
19464#define OPT_SAME_NAME 0
19465EOF
19466
19467echo "$as_me:19467: checking if you want support for selection-actions" >&5
19468echo $ECHO_N "checking if you want support for selection-actions... $ECHO_C" >&6
19469
19470# Check whether --enable-selection-ops or --disable-selection-ops was given.
19471if test "${enable_selection_ops+set}" = set; then
19472  enableval="$enable_selection_ops"
19473  test "$enableval" != no && enableval=yes
19474	if test "$enableval" != "yes" ; then
19475    enable_selection_ops=no
19476	else
19477		enable_selection_ops=yes
19478	fi
19479else
19480  enableval=yes
19481	enable_selection_ops=yes
19482
19483fi;
19484echo "$as_me:19484: result: $enable_selection_ops" >&5
19485echo "${ECHO_T}$enable_selection_ops" >&6
19486test "$enable_selection_ops" = no &&
19487cat >>confdefs.h <<\EOF
19488#define OPT_SELECTION_OPS 0
19489EOF
19490
19491echo "$as_me:19491: checking if you want support for session management" >&5
19492echo $ECHO_N "checking if you want support for session management... $ECHO_C" >&6
19493
19494# Check whether --enable-session-mgt or --disable-session-mgt was given.
19495if test "${enable_session_mgt+set}" = set; then
19496  enableval="$enable_session_mgt"
19497  test "$enableval" != no && enableval=yes
19498	if test "$enableval" != "yes" ; then
19499    enable_session_mgt=no
19500	else
19501		enable_session_mgt=yes
19502	fi
19503else
19504  enableval=yes
19505	enable_session_mgt=yes
19506
19507fi;
19508echo "$as_me:19508: result: $enable_session_mgt" >&5
19509echo "${ECHO_T}$enable_session_mgt" >&6
19510test "$enable_session_mgt" = no &&
19511cat >>confdefs.h <<\EOF
19512#define OPT_SESSION_MGT 0
19513EOF
19514
19515echo "$as_me:19515: checking if you want to use termcap function-keys" >&5
19516echo $ECHO_N "checking if you want to use termcap function-keys... $ECHO_C" >&6
19517
19518# Check whether --enable-tcap-fkeys or --disable-tcap-fkeys was given.
19519if test "${enable_tcap_fkeys+set}" = set; then
19520  enableval="$enable_tcap_fkeys"
19521  test "$enableval" != no && enableval=yes
19522	if test "$enableval" != "yes" ; then
19523    enable_tcap_fkeys=no
19524	else
19525		enable_tcap_fkeys=yes
19526	fi
19527else
19528  enableval=yes
19529	enable_tcap_fkeys=yes
19530
19531fi;
19532echo "$as_me:19532: result: $enable_tcap_fkeys" >&5
19533echo "${ECHO_T}$enable_tcap_fkeys" >&6
19534test "$enable_tcap_fkeys" = yes &&
19535cat >>confdefs.h <<\EOF
19536#define OPT_TCAP_FKEYS 1
19537EOF
19538
19539echo "$as_me:19539: checking if you want to use termcap-query/report" >&5
19540echo $ECHO_N "checking if you want to use termcap-query/report... $ECHO_C" >&6
19541
19542# Check whether --enable-tcap-query or --disable-tcap-query was given.
19543if test "${enable_tcap_query+set}" = set; then
19544  enableval="$enable_tcap_query"
19545  test "$enableval" != no && enableval=yes
19546	if test "$enableval" != "yes" ; then
19547    enable_tcap_query=no
19548	else
19549		enable_tcap_query=yes
19550	fi
19551else
19552  enableval=yes
19553	enable_tcap_query=yes
19554
19555fi;
19556echo "$as_me:19556: result: $enable_tcap_query" >&5
19557echo "${ECHO_T}$enable_tcap_query" >&6
19558test "$enable_tcap_query" = yes &&
19559cat >>confdefs.h <<\EOF
19560#define OPT_TCAP_QUERY 1
19561EOF
19562
19563echo "$as_me:19563: checking if you want support for tek4014" >&5
19564echo $ECHO_N "checking if you want support for tek4014... $ECHO_C" >&6
19565
19566# Check whether --enable-tek4014 or --disable-tek4014 was given.
19567if test "${enable_tek4014+set}" = set; then
19568  enableval="$enable_tek4014"
19569  test "$enableval" != no && enableval=yes
19570	if test "$enableval" != "yes" ; then
19571    enable_tek4014=no
19572	else
19573		enable_tek4014=yes
19574	fi
19575else
19576  enableval=yes
19577	enable_tek4014=yes
19578
19579fi;
19580echo "$as_me:19580: result: $enable_tek4014" >&5
19581echo "${ECHO_T}$enable_tek4014" >&6
19582if test "$enable_tek4014" = no ; then
19583
19584cat >>confdefs.h <<\EOF
19585#define OPT_TEK4014 0
19586EOF
19587
19588else
19589	EXTRAHDRS="$EXTRAHDRS Tekparse.h"
19590	EXTRASRCS="$EXTRASRCS TekPrsTbl.c Tekproc.c"
19591	EXTRAOBJS="$EXTRAOBJS TekPrsTbl.o Tekproc.o"
19592fi
19593
19594echo "$as_me:19594: checking if you want pulldown menus with a toolbar" >&5
19595echo $ECHO_N "checking if you want pulldown menus with a toolbar... $ECHO_C" >&6
19596
19597# Check whether --enable-toolbar or --disable-toolbar was given.
19598if test "${enable_toolbar+set}" = set; then
19599  enableval="$enable_toolbar"
19600  test "$enableval" != yes && enableval=no
19601	if test "$enableval" != "no" ; then
19602    enable_toolbar=yes
19603	else
19604		enable_toolbar=no
19605	fi
19606else
19607  enableval=no
19608	enable_toolbar=no
19609
19610fi;
19611echo "$as_me:19611: result: $enable_toolbar" >&5
19612echo "${ECHO_T}$enable_toolbar" >&6
19613if test "$enable_toolbar" = yes ; then
19614
19615cat >>confdefs.h <<\EOF
19616#define OPT_TOOLBAR 1
19617EOF
19618
19619fi
19620
19621echo "$as_me:19621: checking if you want VT52 emulation" >&5
19622echo $ECHO_N "checking if you want VT52 emulation... $ECHO_C" >&6
19623
19624# Check whether --enable-vt52 or --disable-vt52 was given.
19625if test "${enable_vt52+set}" = set; then
19626  enableval="$enable_vt52"
19627  test "$enableval" != no && enableval=yes
19628	if test "$enableval" != "yes" ; then
19629    enable_vt52=no
19630	else
19631		enable_vt52=yes
19632	fi
19633else
19634  enableval=yes
19635	enable_vt52=yes
19636
19637fi;
19638echo "$as_me:19638: result: $enable_vt52" >&5
19639echo "${ECHO_T}$enable_vt52" >&6
19640test "$enable_vt52" = no &&
19641cat >>confdefs.h <<\EOF
19642#define OPT_VT52_MODE 0
19643EOF
19644
19645echo "$as_me:19645: checking if you want wide-attribute support" >&5
19646echo $ECHO_N "checking if you want wide-attribute support... $ECHO_C" >&6
19647
19648# Check whether --enable-wide-attrs or --disable-wide-attrs was given.
19649if test "${enable_wide_attrs+set}" = set; then
19650  enableval="$enable_wide_attrs"
19651  test "$enableval" != no && enableval=yes
19652	if test "$enableval" != "yes" ; then
19653    enable_wattr=no
19654	else
19655		enable_wattr=yes
19656	fi
19657else
19658  enableval=yes
19659	enable_wattr=yes
19660
19661fi;
19662echo "$as_me:19662: result: $enable_wattr" >&5
19663echo "${ECHO_T}$enable_wattr" >&6
19664
19665echo "$as_me:19665: checking if you want wide-character support" >&5
19666echo $ECHO_N "checking if you want wide-character support... $ECHO_C" >&6
19667
19668# Check whether --enable-wide-chars or --disable-wide-chars was given.
19669if test "${enable_wide_chars+set}" = set; then
19670  enableval="$enable_wide_chars"
19671  test "$enableval" != no && enableval=yes
19672	if test "$enableval" != "yes" ; then
19673    enable_wchar=no
19674	else
19675		enable_wchar=yes
19676	fi
19677else
19678  enableval=yes
19679	enable_wchar=yes
19680
19681fi;
19682echo "$as_me:19682: result: $enable_wchar" >&5
19683echo "${ECHO_T}$enable_wchar" >&6
19684test "$enable_wattr" = no &&
19685cat >>confdefs.h <<\EOF
19686#define OPT_WIDE_ATTRS 0
19687EOF
19688
19689echo "$as_me:19689: checking if you want only 16-bit character support" >&5
19690echo $ECHO_N "checking if you want only 16-bit character support... $ECHO_C" >&6
19691
19692# Check whether --enable-16bit-chars or --disable-16bit-chars was given.
19693if test "${enable_16bit_chars+set}" = set; then
19694  enableval="$enable_16bit_chars"
19695  test "$enableval" != yes && enableval=no
19696	if test "$enableval" != "no" ; then
19697    enable_16bit_chars=yes
19698	else
19699		enable_16bit_chars=no
19700	fi
19701else
19702  enableval=no
19703	enable_16bit_chars=no
19704
19705fi;
19706echo "$as_me:19706: result: $enable_16bit_chars" >&5
19707echo "${ECHO_T}$enable_16bit_chars" >&6
19708
19709if test "$enable_16bit_chars" = yes ; then
19710
19711cat >>confdefs.h <<\EOF
19712#define OPT_WIDER_ICHAR 0
19713EOF
19714
19715	enable_wchar=yes
19716fi
19717
19718if test "$enable_wchar" = yes ; then
19719
19720echo "$as_me:19720: checking if you want to use mini-luit/Latin9 built-in support" >&5
19721echo $ECHO_N "checking if you want to use mini-luit/Latin9 built-in support... $ECHO_C" >&6
19722
19723# Check whether --enable-mini-luit or --disable-mini-luit was given.
19724if test "${enable_mini_luit+set}" = set; then
19725  enableval="$enable_mini_luit"
19726  test "$enableval" != yes && enableval=no
19727	if test "$enableval" != "no" ; then
19728    enable_mini_luit=yes
19729	else
19730		enable_mini_luit=no
19731	fi
19732else
19733  enableval=no
19734	enable_mini_luit=no
19735
19736fi;
19737echo "$as_me:19737: result: $enable_mini_luit" >&5
19738echo "${ECHO_T}$enable_mini_luit" >&6
19739if test "$enable_mini_luit" = yes ; then
19740
19741cat >>confdefs.h <<\EOF
19742#define OPT_MINI_LUIT 1
19743EOF
19744
19745fi
19746
19747echo "$as_me:19747: checking if you want to use luit" >&5
19748echo $ECHO_N "checking if you want to use luit... $ECHO_C" >&6
19749
19750# Check whether --enable-luit or --disable-luit was given.
19751if test "${enable_luit+set}" = set; then
19752  enableval="$enable_luit"
19753  test "$enableval" != no && enableval=yes
19754	if test "$enableval" != "yes" ; then
19755    enable_luit=no
19756	else
19757		enable_luit=yes
19758	fi
19759else
19760  enableval=yes
19761	enable_luit=yes
19762
19763fi;
19764echo "$as_me:19764: result: $enable_luit" >&5
19765echo "${ECHO_T}$enable_luit" >&6
19766if test "$enable_luit" = yes ; then
19767
19768cat >>confdefs.h <<\EOF
19769#define OPT_LUIT_PROG 1
19770EOF
19771
19772test -z "$LUIT" && LUIT=xterm-filter
19773for ac_prog in $LUIT xterm-filter bluit luit
19774do
19775  # Extract the first word of "$ac_prog", so it can be a program name with args.
19776set dummy $ac_prog; ac_word=$2
19777echo "$as_me:19777: checking for $ac_word" >&5
19778echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
19779if test "${ac_cv_path_LUIT+set}" = set; then
19780  echo $ECHO_N "(cached) $ECHO_C" >&6
19781else
19782  case $LUIT in
19783  [\\/]* | ?:[\\/]*)
19784  ac_cv_path_LUIT="$LUIT" # Let the user override the test with a path.
19785  ;;
19786  *)
19787  ac_save_IFS=$IFS; IFS=$ac_path_separator
19788ac_dummy="$PATH"
19789for ac_dir in $ac_dummy; do
19790  IFS=$ac_save_IFS
19791  test -z "$ac_dir" && ac_dir=.
19792  if $as_executable_p "$ac_dir/$ac_word"; then
19793   ac_cv_path_LUIT="$ac_dir/$ac_word"
19794   echo "$as_me:19794: found $ac_dir/$ac_word" >&5
19795   break
19796fi
19797done
19798
19799  ;;
19800esac
19801fi
19802LUIT=$ac_cv_path_LUIT
19803
19804if test -n "$LUIT"; then
19805  echo "$as_me:19805: result: $LUIT" >&5
19806echo "${ECHO_T}$LUIT" >&6
19807else
19808  echo "$as_me:19808: result: no" >&5
19809echo "${ECHO_T}no" >&6
19810fi
19811
19812  test -n "$LUIT" && break
19813done
19814test -n "$LUIT" || LUIT="$LUIT"
19815
19816cf_path_prog=""
19817cf_path_args=""
19818IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
19819for cf_temp in $ac_cv_path_LUIT
19820do
19821	if test -z "$cf_path_prog" ; then
19822		if test "$with_full_paths" = yes ; then
19823
19824if test "x$prefix" != xNONE; then
19825	cf_path_syntax="$prefix"
19826else
19827	cf_path_syntax="$ac_default_prefix"
19828fi
19829
19830case ".$cf_temp" in
19831(.\$\(*\)*|.\'*\'*)
19832	;;
19833(..|./*|.\\*)
19834	;;
19835(.[a-zA-Z]:[\\/]*) # OS/2 EMX
19836	;;
19837(.\${*prefix}*|.\${*dir}*)
19838	eval cf_temp="$cf_temp"
19839	case ".$cf_temp" in
19840	(.NONE/*)
19841		cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
19842		;;
19843	esac
19844	;;
19845(.no|.NONE/*)
19846	cf_temp=`echo $cf_temp | sed -e s%NONE%$cf_path_syntax%`
19847	;;
19848(*)
19849	break
19850	;;
19851esac
19852
19853			cf_path_prog="$cf_temp"
19854		else
19855			cf_path_prog="`basename $cf_temp`"
19856		fi
19857	elif test -z "$cf_path_args" ; then
19858		cf_path_args="$cf_temp"
19859	else
19860		cf_path_args="$cf_path_args $cf_temp"
19861	fi
19862done
19863IFS="$cf_save_ifs"
19864
19865if test -n "$cf_path_prog" ; then
19866
19867echo "${as_me:-configure}:19867: testing defining path for ${cf_path_prog} ..." 1>&5
19868
19869cat >>confdefs.h <<EOF
19870#define LUIT_PATH "$cf_path_prog"
19871EOF
19872
19873	test -n "$cf_path_args" &&
19874cat >>confdefs.h <<EOF
19875#define LUIT_ARGS "$cf_path_args"
19876EOF
19877
19878fi
19879
19880fi
19881
19882cat >>confdefs.h <<\EOF
19883#define OPT_WIDE_CHARS 1
19884EOF
19885
19886	EXTRAHDRS="$EXTRAHDRS charclass.h precompose.h wcwidth.h"
19887	EXTRASRCS="$EXTRASRCS charclass.c precompose.c wcwidth.c"
19888	EXTRAOBJS="$EXTRAOBJS charclass.o precompose.o wcwidth.o"
19889fi
19890
19891echo "$as_me:19891: checking if you want dynamic-abbreviation support" >&5
19892echo $ECHO_N "checking if you want dynamic-abbreviation support... $ECHO_C" >&6
19893
19894# Check whether --enable-dabbrev or --disable-dabbrev was given.
19895if test "${enable_dabbrev+set}" = set; then
19896  enableval="$enable_dabbrev"
19897  test "$enableval" != yes && enableval=no
19898	if test "$enableval" != "no" ; then
19899    enable_dabbrev=yes
19900	else
19901		enable_dabbrev=no
19902	fi
19903else
19904  enableval=no
19905	enable_dabbrev=no
19906
19907fi;
19908echo "$as_me:19908: result: $enable_dabbrev" >&5
19909echo "${ECHO_T}$enable_dabbrev" >&6
19910if test "$enable_dabbrev" = yes ; then
19911
19912cat >>confdefs.h <<\EOF
19913#define OPT_DABBREV 1
19914EOF
19915
19916fi
19917
19918echo "$as_me:19918: checking if you want DECterm Locator support" >&5
19919echo $ECHO_N "checking if you want DECterm Locator support... $ECHO_C" >&6
19920
19921# Check whether --enable-dec-locator or --disable-dec-locator was given.
19922if test "${enable_dec_locator+set}" = set; then
19923  enableval="$enable_dec_locator"
19924  test "$enableval" != yes && enableval=no
19925	if test "$enableval" != "no" ; then
19926    enable_dec_locator=yes
19927	else
19928		enable_dec_locator=no
19929	fi
19930else
19931  enableval=no
19932	enable_dec_locator=no
19933
19934fi;
19935echo "$as_me:19935: result: $enable_dec_locator" >&5
19936echo "${ECHO_T}$enable_dec_locator" >&6
19937if test "$enable_dec_locator" = yes ; then
19938
19939cat >>confdefs.h <<\EOF
19940#define OPT_DEC_LOCATOR 1
19941EOF
19942
19943fi
19944
19945echo "$as_me:19945: checking if you want XHTML and SVG screen dump support" >&5
19946echo $ECHO_N "checking if you want XHTML and SVG screen dump support... $ECHO_C" >&6
19947
19948# Check whether --enable-screen-dumps or --disable-screen-dumps was given.
19949if test "${enable_screen_dumps+set}" = set; then
19950  enableval="$enable_screen_dumps"
19951  test "$enableval" != yes && enableval=no
19952	if test "$enableval" != "no" ; then
19953    enable_screen_dumps=yes
19954	else
19955		enable_screen_dumps=no
19956	fi
19957else
19958  enableval=no
19959	enable_screen_dumps=no
19960
19961fi;
19962echo "$as_me:19962: result: $enable_screen_dumps" >&5
19963echo "${ECHO_T}$enable_screen_dumps" >&6
19964if test "$enable_screen_dumps" = yes ; then
19965
19966cat >>confdefs.h <<\EOF
19967#define OPT_SCREEN_DUMPS 1
19968EOF
19969
19970	EXTRASRCS="$EXTRASRCS html.c svg.c"
19971	EXTRAOBJS="$EXTRAOBJS html.o svg.o"
19972fi
19973
19974echo "$as_me:19974: checking if you want ReGIS graphics support" >&5
19975echo $ECHO_N "checking if you want ReGIS graphics support... $ECHO_C" >&6
19976
19977# Check whether --enable-regis-graphics or --disable-regis-graphics was given.
19978if test "${enable_regis_graphics+set}" = set; then
19979  enableval="$enable_regis_graphics"
19980  test "$enableval" != yes && enableval=no
19981	if test "$enableval" != "no" ; then
19982    enable_regis_graphics=yes
19983	else
19984		enable_regis_graphics=no
19985	fi
19986else
19987  enableval=no
19988	enable_regis_graphics=no
19989
19990fi;
19991echo "$as_me:19991: result: $enable_regis_graphics" >&5
19992echo "${ECHO_T}$enable_regis_graphics" >&6
19993if test "$enable_regis_graphics" = yes ; then
19994
19995cat >>confdefs.h <<\EOF
19996#define OPT_REGIS_GRAPHICS 1
19997EOF
19998
19999	EXTRAHDRS="$EXTRAHDRS graphics_regis.h"
20000	EXTRASRCS="$EXTRASRCS graphics_regis.c"
20001	EXTRAOBJS="$EXTRAOBJS graphics_regis.o"
20002
20003echo "$as_me:20003: checking if -lm needed for math functions" >&5
20004echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
20005if test "${cf_cv_need_libm+set}" = set; then
20006  echo $ECHO_N "(cached) $ECHO_C" >&6
20007else
20008
20009	cat >conftest.$ac_ext <<_ACEOF
20010#line 20010 "configure"
20011#include "confdefs.h"
20012
20013	#include <stdio.h>
20014	#include <stdlib.h>
20015	#include <math.h>
20016
20017int
20018main (void)
20019{
20020double x = rand(); printf("result = %g\n", sin(x))
20021  ;
20022  return 0;
20023}
20024_ACEOF
20025rm -f conftest.$ac_objext conftest$ac_exeext
20026if { (eval echo "$as_me:20026: \"$ac_link\"") >&5
20027  (eval $ac_link) 2>&5
20028  ac_status=$?
20029  echo "$as_me:20029: \$? = $ac_status" >&5
20030  (exit $ac_status); } &&
20031         { ac_try='test -s conftest$ac_exeext'
20032  { (eval echo "$as_me:20032: \"$ac_try\"") >&5
20033  (eval $ac_try) 2>&5
20034  ac_status=$?
20035  echo "$as_me:20035: \$? = $ac_status" >&5
20036  (exit $ac_status); }; }; then
20037  cf_cv_need_libm=no
20038else
20039  echo "$as_me: failed program was:" >&5
20040cat conftest.$ac_ext >&5
20041cf_cv_need_libm=yes
20042fi
20043rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20044fi
20045echo "$as_me:20045: result: $cf_cv_need_libm" >&5
20046echo "${ECHO_T}$cf_cv_need_libm" >&6
20047if test "$cf_cv_need_libm" = yes
20048then
20049
20050cf_add_libs="-lm"
20051# Filter out duplicates - this happens with badly-designed ".pc" files...
20052for cf_add_1lib in $LIBS
20053do
20054	for cf_add_2lib in $cf_add_libs
20055	do
20056		if test "x$cf_add_1lib" = "x$cf_add_2lib"
20057		then
20058			cf_add_1lib=
20059			break
20060		fi
20061	done
20062	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
20063done
20064LIBS="$cf_add_libs"
20065
20066fi
20067
20068fi
20069
20070echo "$as_me:20070: checking if you want sixel graphics support" >&5
20071echo $ECHO_N "checking if you want sixel graphics support... $ECHO_C" >&6
20072
20073# Check whether --enable-sixel-graphics or --disable-sixel-graphics was given.
20074if test "${enable_sixel_graphics+set}" = set; then
20075  enableval="$enable_sixel_graphics"
20076  test "$enableval" != yes && enableval=no
20077	if test "$enableval" != "no" ; then
20078    enable_sixel_graphics=yes
20079	else
20080		enable_sixel_graphics=no
20081	fi
20082else
20083  enableval=no
20084	enable_sixel_graphics=no
20085
20086fi;
20087echo "$as_me:20087: result: $enable_sixel_graphics" >&5
20088echo "${ECHO_T}$enable_sixel_graphics" >&6
20089if test "$enable_sixel_graphics" = yes ; then
20090
20091cat >>confdefs.h <<\EOF
20092#define OPT_SIXEL_GRAPHICS 1
20093EOF
20094
20095	EXTRAHDRS="$EXTRAHDRS graphics_sixel.h"
20096	EXTRASRCS="$EXTRASRCS graphics_sixel.c"
20097	EXTRAOBJS="$EXTRAOBJS graphics_sixel.o"
20098fi
20099
20100if test "$enable_regis_graphics" = yes || test "$enable_sixel_graphics" = yes ; then
20101
20102cat >>confdefs.h <<\EOF
20103#define OPT_GRAPHICS 1
20104EOF
20105
20106	EXTRAHDRS="$EXTRAHDRS graphics.h"
20107	EXTRASRCS="$EXTRASRCS graphics.c"
20108	EXTRAOBJS="$EXTRAOBJS graphics.o"
20109fi
20110
20111echo "$as_me:20111: checking if you want VT420 rectangle support" >&5
20112echo $ECHO_N "checking if you want VT420 rectangle support... $ECHO_C" >&6
20113
20114# Check whether --enable-rectangles or --disable-rectangles was given.
20115if test "${enable_rectangles+set}" = set; then
20116  enableval="$enable_rectangles"
20117  test "$enableval" != no && enableval=yes
20118	if test "$enableval" != "yes" ; then
20119    enable_rectangles=no
20120	else
20121		enable_rectangles=yes
20122	fi
20123else
20124  enableval=yes
20125	enable_rectangles=yes
20126
20127fi;
20128echo "$as_me:20128: result: $enable_rectangles" >&5
20129echo "${ECHO_T}$enable_rectangles" >&6
20130if test "$enable_rectangles" = yes ; then
20131
20132cat >>confdefs.h <<\EOF
20133#define OPT_DEC_RECTOPS 1
20134EOF
20135
20136fi
20137
20138echo "$as_me:20138: checking if you want -ziconbeep option" >&5
20139echo $ECHO_N "checking if you want -ziconbeep option... $ECHO_C" >&6
20140
20141# Check whether --enable-ziconbeep or --disable-ziconbeep was given.
20142if test "${enable_ziconbeep+set}" = set; then
20143  enableval="$enable_ziconbeep"
20144  test "$enableval" != no && enableval=yes
20145	if test "$enableval" != "yes" ; then
20146    enable_ziconbeep=no
20147	else
20148		enable_ziconbeep=yes
20149	fi
20150else
20151  enableval=yes
20152	enable_ziconbeep=yes
20153
20154fi;
20155echo "$as_me:20155: result: $enable_ziconbeep" >&5
20156echo "${ECHO_T}$enable_ziconbeep" >&6
20157test "$enable_ziconbeep" = no &&
20158cat >>confdefs.h <<\EOF
20159#define OPT_ZICONBEEP 0
20160EOF
20161
20162###############################################################################
20163
20164echo "$as_me:20164: checking if you want debugging traces" >&5
20165echo $ECHO_N "checking if you want debugging traces... $ECHO_C" >&6
20166
20167# Check whether --enable-trace or --disable-trace was given.
20168if test "${enable_trace+set}" = set; then
20169  enableval="$enable_trace"
20170  test "$enableval" != yes && enableval=no
20171	if test "$enableval" != "no" ; then
20172    enable_trace=yes
20173	else
20174		enable_trace=no
20175	fi
20176else
20177  enableval=no
20178	enable_trace=no
20179
20180fi;
20181echo "$as_me:20181: result: $enable_trace" >&5
20182echo "${ECHO_T}$enable_trace" >&6
20183if test "$enable_trace" = yes ; then
20184
20185cat >>confdefs.h <<\EOF
20186#define OPT_TRACE 1
20187EOF
20188
20189	EXTRASRCS="$EXTRASRCS trace.c"
20190	EXTRAOBJS="$EXTRAOBJS trace.o"
20191fi
20192
20193echo "$as_me:20193: checking if you want to use dmalloc for testing" >&5
20194echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
20195
20196# Check whether --with-dmalloc or --without-dmalloc was given.
20197if test "${with_dmalloc+set}" = set; then
20198  withval="$with_dmalloc"
20199
20200cat >>confdefs.h <<EOF
20201#define USE_DMALLOC 1
20202EOF
20203
20204	: ${with_cflags:=-g}
20205	: ${with_no_leaks:=yes}
20206	 with_dmalloc=yes
20207else
20208  with_dmalloc=
20209fi;
20210echo "$as_me:20210: result: ${with_dmalloc:-no}" >&5
20211echo "${ECHO_T}${with_dmalloc:-no}" >&6
20212
20213case .$with_cflags in
20214(.*-g*)
20215	case .$CFLAGS in
20216	(.*-g*)
20217		;;
20218	(*)
20219
20220cf_fix_cppflags=no
20221cf_new_cflags=
20222cf_new_cppflags=
20223cf_new_extra_cppflags=
20224
20225for cf_add_cflags in -g
20226do
20227case $cf_fix_cppflags in
20228(no)
20229	case $cf_add_cflags in
20230	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20231		case $cf_add_cflags in
20232		(-D*)
20233			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20234
20235			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20236				&& test -z "${cf_tst_cflags}" \
20237				&& cf_fix_cppflags=yes
20238
20239			if test $cf_fix_cppflags = yes ; then
20240
20241	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20242	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20243
20244				continue
20245			elif test "${cf_tst_cflags}" = "\"'" ; then
20246
20247	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20248	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20249
20250				continue
20251			fi
20252			;;
20253		esac
20254		case "$CPPFLAGS" in
20255		(*$cf_add_cflags)
20256			;;
20257		(*)
20258			case $cf_add_cflags in
20259			(-D*)
20260				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20261
20262CPPFLAGS=`echo "$CPPFLAGS" | \
20263	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20264		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20265
20266				;;
20267			esac
20268
20269	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20270	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20271
20272			;;
20273		esac
20274		;;
20275	(*)
20276
20277	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20278	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20279
20280		;;
20281	esac
20282	;;
20283(yes)
20284
20285	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20286	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20287
20288	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20289
20290	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20291		&& test -z "${cf_tst_cflags}" \
20292		&& cf_fix_cppflags=no
20293	;;
20294esac
20295done
20296
20297if test -n "$cf_new_cflags" ; then
20298
20299	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20300	CFLAGS="${CFLAGS}$cf_new_cflags"
20301
20302fi
20303
20304if test -n "$cf_new_cppflags" ; then
20305
20306	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20307	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20308
20309fi
20310
20311if test -n "$cf_new_extra_cppflags" ; then
20312
20313	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20314	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20315
20316fi
20317
20318		;;
20319	esac
20320	;;
20321esac
20322
20323if test "$with_dmalloc" = yes ; then
20324	echo "$as_me:20324: checking for dmalloc.h" >&5
20325echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
20326if test "${ac_cv_header_dmalloc_h+set}" = set; then
20327  echo $ECHO_N "(cached) $ECHO_C" >&6
20328else
20329  cat >conftest.$ac_ext <<_ACEOF
20330#line 20330 "configure"
20331#include "confdefs.h"
20332#include <dmalloc.h>
20333_ACEOF
20334if { (eval echo "$as_me:20334: \"$ac_cpp conftest.$ac_ext\"") >&5
20335  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20336  ac_status=$?
20337  egrep -v '^ *\+' conftest.er1 >conftest.err
20338  rm -f conftest.er1
20339  cat conftest.err >&5
20340  echo "$as_me:20340: \$? = $ac_status" >&5
20341  (exit $ac_status); } >/dev/null; then
20342  if test -s conftest.err; then
20343    ac_cpp_err=$ac_c_preproc_warn_flag
20344  else
20345    ac_cpp_err=
20346  fi
20347else
20348  ac_cpp_err=yes
20349fi
20350if test -z "$ac_cpp_err"; then
20351  ac_cv_header_dmalloc_h=yes
20352else
20353  echo "$as_me: failed program was:" >&5
20354  cat conftest.$ac_ext >&5
20355  ac_cv_header_dmalloc_h=no
20356fi
20357rm -f conftest.err conftest.$ac_ext
20358fi
20359echo "$as_me:20359: result: $ac_cv_header_dmalloc_h" >&5
20360echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
20361if test $ac_cv_header_dmalloc_h = yes; then
20362
20363echo "$as_me:20363: checking for dmalloc_debug in -ldmalloc" >&5
20364echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
20365if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
20366  echo $ECHO_N "(cached) $ECHO_C" >&6
20367else
20368  ac_check_lib_save_LIBS=$LIBS
20369LIBS="-ldmalloc  $LIBS"
20370cat >conftest.$ac_ext <<_ACEOF
20371#line 20371 "configure"
20372#include "confdefs.h"
20373
20374/* Override any gcc2 internal prototype to avoid an error.  */
20375#ifdef __cplusplus
20376extern "C"
20377#endif
20378/* We use char because int might match the return type of a gcc2
20379   builtin and then its argument prototype would still apply.  */
20380char dmalloc_debug ();
20381int
20382main (void)
20383{
20384dmalloc_debug ();
20385  ;
20386  return 0;
20387}
20388_ACEOF
20389rm -f conftest.$ac_objext conftest$ac_exeext
20390if { (eval echo "$as_me:20390: \"$ac_link\"") >&5
20391  (eval $ac_link) 2>&5
20392  ac_status=$?
20393  echo "$as_me:20393: \$? = $ac_status" >&5
20394  (exit $ac_status); } &&
20395         { ac_try='test -s conftest$ac_exeext'
20396  { (eval echo "$as_me:20396: \"$ac_try\"") >&5
20397  (eval $ac_try) 2>&5
20398  ac_status=$?
20399  echo "$as_me:20399: \$? = $ac_status" >&5
20400  (exit $ac_status); }; }; then
20401  ac_cv_lib_dmalloc_dmalloc_debug=yes
20402else
20403  echo "$as_me: failed program was:" >&5
20404cat conftest.$ac_ext >&5
20405ac_cv_lib_dmalloc_dmalloc_debug=no
20406fi
20407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20408LIBS=$ac_check_lib_save_LIBS
20409fi
20410echo "$as_me:20410: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
20411echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
20412if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
20413  cat >>confdefs.h <<EOF
20414#define HAVE_LIBDMALLOC 1
20415EOF
20416
20417  LIBS="-ldmalloc $LIBS"
20418
20419fi
20420
20421fi
20422
20423fi
20424
20425echo "$as_me:20425: checking if you want to use dbmalloc for testing" >&5
20426echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
20427
20428# Check whether --with-dbmalloc or --without-dbmalloc was given.
20429if test "${with_dbmalloc+set}" = set; then
20430  withval="$with_dbmalloc"
20431
20432cat >>confdefs.h <<EOF
20433#define USE_DBMALLOC 1
20434EOF
20435
20436	: ${with_cflags:=-g}
20437	: ${with_no_leaks:=yes}
20438	 with_dbmalloc=yes
20439else
20440  with_dbmalloc=
20441fi;
20442echo "$as_me:20442: result: ${with_dbmalloc:-no}" >&5
20443echo "${ECHO_T}${with_dbmalloc:-no}" >&6
20444
20445case .$with_cflags in
20446(.*-g*)
20447	case .$CFLAGS in
20448	(.*-g*)
20449		;;
20450	(*)
20451
20452cf_fix_cppflags=no
20453cf_new_cflags=
20454cf_new_cppflags=
20455cf_new_extra_cppflags=
20456
20457for cf_add_cflags in -g
20458do
20459case $cf_fix_cppflags in
20460(no)
20461	case $cf_add_cflags in
20462	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20463		case $cf_add_cflags in
20464		(-D*)
20465			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20466
20467			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20468				&& test -z "${cf_tst_cflags}" \
20469				&& cf_fix_cppflags=yes
20470
20471			if test $cf_fix_cppflags = yes ; then
20472
20473	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20474	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20475
20476				continue
20477			elif test "${cf_tst_cflags}" = "\"'" ; then
20478
20479	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20480	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20481
20482				continue
20483			fi
20484			;;
20485		esac
20486		case "$CPPFLAGS" in
20487		(*$cf_add_cflags)
20488			;;
20489		(*)
20490			case $cf_add_cflags in
20491			(-D*)
20492				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20493
20494CPPFLAGS=`echo "$CPPFLAGS" | \
20495	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20496		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20497
20498				;;
20499			esac
20500
20501	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20502	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20503
20504			;;
20505		esac
20506		;;
20507	(*)
20508
20509	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20510	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20511
20512		;;
20513	esac
20514	;;
20515(yes)
20516
20517	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20518	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20519
20520	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20521
20522	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20523		&& test -z "${cf_tst_cflags}" \
20524		&& cf_fix_cppflags=no
20525	;;
20526esac
20527done
20528
20529if test -n "$cf_new_cflags" ; then
20530
20531	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20532	CFLAGS="${CFLAGS}$cf_new_cflags"
20533
20534fi
20535
20536if test -n "$cf_new_cppflags" ; then
20537
20538	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20539	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20540
20541fi
20542
20543if test -n "$cf_new_extra_cppflags" ; then
20544
20545	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20546	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20547
20548fi
20549
20550		;;
20551	esac
20552	;;
20553esac
20554
20555if test "$with_dbmalloc" = yes ; then
20556	echo "$as_me:20556: checking for dbmalloc.h" >&5
20557echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
20558if test "${ac_cv_header_dbmalloc_h+set}" = set; then
20559  echo $ECHO_N "(cached) $ECHO_C" >&6
20560else
20561  cat >conftest.$ac_ext <<_ACEOF
20562#line 20562 "configure"
20563#include "confdefs.h"
20564#include <dbmalloc.h>
20565_ACEOF
20566if { (eval echo "$as_me:20566: \"$ac_cpp conftest.$ac_ext\"") >&5
20567  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
20568  ac_status=$?
20569  egrep -v '^ *\+' conftest.er1 >conftest.err
20570  rm -f conftest.er1
20571  cat conftest.err >&5
20572  echo "$as_me:20572: \$? = $ac_status" >&5
20573  (exit $ac_status); } >/dev/null; then
20574  if test -s conftest.err; then
20575    ac_cpp_err=$ac_c_preproc_warn_flag
20576  else
20577    ac_cpp_err=
20578  fi
20579else
20580  ac_cpp_err=yes
20581fi
20582if test -z "$ac_cpp_err"; then
20583  ac_cv_header_dbmalloc_h=yes
20584else
20585  echo "$as_me: failed program was:" >&5
20586  cat conftest.$ac_ext >&5
20587  ac_cv_header_dbmalloc_h=no
20588fi
20589rm -f conftest.err conftest.$ac_ext
20590fi
20591echo "$as_me:20591: result: $ac_cv_header_dbmalloc_h" >&5
20592echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
20593if test $ac_cv_header_dbmalloc_h = yes; then
20594
20595echo "$as_me:20595: checking for debug_malloc in -ldbmalloc" >&5
20596echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
20597if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
20598  echo $ECHO_N "(cached) $ECHO_C" >&6
20599else
20600  ac_check_lib_save_LIBS=$LIBS
20601LIBS="-ldbmalloc  $LIBS"
20602cat >conftest.$ac_ext <<_ACEOF
20603#line 20603 "configure"
20604#include "confdefs.h"
20605
20606/* Override any gcc2 internal prototype to avoid an error.  */
20607#ifdef __cplusplus
20608extern "C"
20609#endif
20610/* We use char because int might match the return type of a gcc2
20611   builtin and then its argument prototype would still apply.  */
20612char debug_malloc ();
20613int
20614main (void)
20615{
20616debug_malloc ();
20617  ;
20618  return 0;
20619}
20620_ACEOF
20621rm -f conftest.$ac_objext conftest$ac_exeext
20622if { (eval echo "$as_me:20622: \"$ac_link\"") >&5
20623  (eval $ac_link) 2>&5
20624  ac_status=$?
20625  echo "$as_me:20625: \$? = $ac_status" >&5
20626  (exit $ac_status); } &&
20627         { ac_try='test -s conftest$ac_exeext'
20628  { (eval echo "$as_me:20628: \"$ac_try\"") >&5
20629  (eval $ac_try) 2>&5
20630  ac_status=$?
20631  echo "$as_me:20631: \$? = $ac_status" >&5
20632  (exit $ac_status); }; }; then
20633  ac_cv_lib_dbmalloc_debug_malloc=yes
20634else
20635  echo "$as_me: failed program was:" >&5
20636cat conftest.$ac_ext >&5
20637ac_cv_lib_dbmalloc_debug_malloc=no
20638fi
20639rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20640LIBS=$ac_check_lib_save_LIBS
20641fi
20642echo "$as_me:20642: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
20643echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
20644if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
20645  cat >>confdefs.h <<EOF
20646#define HAVE_LIBDBMALLOC 1
20647EOF
20648
20649  LIBS="-ldbmalloc $LIBS"
20650
20651fi
20652
20653fi
20654
20655fi
20656
20657echo "$as_me:20657: checking if you want to use valgrind for testing" >&5
20658echo $ECHO_N "checking if you want to use valgrind for testing... $ECHO_C" >&6
20659
20660# Check whether --with-valgrind or --without-valgrind was given.
20661if test "${with_valgrind+set}" = set; then
20662  withval="$with_valgrind"
20663
20664cat >>confdefs.h <<EOF
20665#define USE_VALGRIND 1
20666EOF
20667
20668	: ${with_cflags:=-g}
20669	: ${with_no_leaks:=yes}
20670	 with_valgrind=yes
20671else
20672  with_valgrind=
20673fi;
20674echo "$as_me:20674: result: ${with_valgrind:-no}" >&5
20675echo "${ECHO_T}${with_valgrind:-no}" >&6
20676
20677case .$with_cflags in
20678(.*-g*)
20679	case .$CFLAGS in
20680	(.*-g*)
20681		;;
20682	(*)
20683
20684cf_fix_cppflags=no
20685cf_new_cflags=
20686cf_new_cppflags=
20687cf_new_extra_cppflags=
20688
20689for cf_add_cflags in -g
20690do
20691case $cf_fix_cppflags in
20692(no)
20693	case $cf_add_cflags in
20694	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20695		case $cf_add_cflags in
20696		(-D*)
20697			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20698
20699			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20700				&& test -z "${cf_tst_cflags}" \
20701				&& cf_fix_cppflags=yes
20702
20703			if test $cf_fix_cppflags = yes ; then
20704
20705	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20706	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20707
20708				continue
20709			elif test "${cf_tst_cflags}" = "\"'" ; then
20710
20711	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20712	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20713
20714				continue
20715			fi
20716			;;
20717		esac
20718		case "$CPPFLAGS" in
20719		(*$cf_add_cflags)
20720			;;
20721		(*)
20722			case $cf_add_cflags in
20723			(-D*)
20724				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20725
20726CPPFLAGS=`echo "$CPPFLAGS" | \
20727	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20728		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20729
20730				;;
20731			esac
20732
20733	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20734	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20735
20736			;;
20737		esac
20738		;;
20739	(*)
20740
20741	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20742	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20743
20744		;;
20745	esac
20746	;;
20747(yes)
20748
20749	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20750	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20751
20752	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
20753
20754	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20755		&& test -z "${cf_tst_cflags}" \
20756		&& cf_fix_cppflags=no
20757	;;
20758esac
20759done
20760
20761if test -n "$cf_new_cflags" ; then
20762
20763	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20764	CFLAGS="${CFLAGS}$cf_new_cflags"
20765
20766fi
20767
20768if test -n "$cf_new_cppflags" ; then
20769
20770	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20771	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20772
20773fi
20774
20775if test -n "$cf_new_extra_cppflags" ; then
20776
20777	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20778	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20779
20780fi
20781
20782		;;
20783	esac
20784	;;
20785esac
20786
20787echo "$as_me:20787: checking if you want to perform memory-leak testing" >&5
20788echo $ECHO_N "checking if you want to perform memory-leak testing... $ECHO_C" >&6
20789
20790# Check whether --enable-leaks or --disable-leaks was given.
20791if test "${enable_leaks+set}" = set; then
20792  enableval="$enable_leaks"
20793  if test "x$enableval" = xno; then with_no_leaks=yes; else with_no_leaks=no; fi
20794else
20795  : ${with_no_leaks:=no}
20796fi;
20797echo "$as_me:20797: result: $with_no_leaks" >&5
20798echo "${ECHO_T}$with_no_leaks" >&6
20799
20800if test "$with_no_leaks" = yes ; then
20801
20802cat >>confdefs.h <<\EOF
20803#define NO_LEAKS 1
20804EOF
20805
20806cat >>confdefs.h <<\EOF
20807#define YY_NO_LEAKS 1
20808EOF
20809
20810fi
20811
20812echo "$as_me:20812: checking if you want to see long compiling messages" >&5
20813echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
20814
20815# Check whether --enable-echo or --disable-echo was given.
20816if test "${enable_echo+set}" = set; then
20817  enableval="$enable_echo"
20818  test "$enableval" != no && enableval=yes
20819	if test "$enableval" != "yes" ; then
20820
20821	ECHO_LT='--silent'
20822	ECHO_LD='@echo linking $@;'
20823	RULE_CC='@echo compiling $<'
20824	SHOW_CC='@echo compiling $@'
20825	ECHO_CC='@'
20826
20827	else
20828
20829	ECHO_LT=''
20830	ECHO_LD=''
20831	RULE_CC=''
20832	SHOW_CC=''
20833	ECHO_CC=''
20834
20835	fi
20836else
20837  enableval=yes
20838
20839	ECHO_LT=''
20840	ECHO_LD=''
20841	RULE_CC=''
20842	SHOW_CC=''
20843	ECHO_CC=''
20844
20845fi;
20846echo "$as_me:20846: result: $enableval" >&5
20847echo "${ECHO_T}$enableval" >&6
20848
20849echo "$as_me:20849: checking if you want magic cookie emulation" >&5
20850echo $ECHO_N "checking if you want magic cookie emulation... $ECHO_C" >&6
20851
20852# Check whether --enable-xmc-glitch or --disable-xmc-glitch was given.
20853if test "${enable_xmc_glitch+set}" = set; then
20854  enableval="$enable_xmc_glitch"
20855  test "$enableval" != yes && enableval=no
20856	if test "$enableval" != "no" ; then
20857    enable_xmc=yes
20858	else
20859		enable_xmc=no
20860	fi
20861else
20862  enableval=no
20863	enable_xmc=no
20864
20865fi;
20866echo "$as_me:20866: result: $enable_xmc" >&5
20867echo "${ECHO_T}$enable_xmc" >&6
20868if test "$enable_xmc" = yes ; then
20869
20870cat >>confdefs.h <<\EOF
20871#define OPT_XMC_GLITCH 1
20872EOF
20873
20874	EXTRASRCS="$EXTRASRCS testxmc.c"
20875	EXTRAOBJS="$EXTRAOBJS testxmc.o"
20876fi
20877
20878for ac_func in tigetstr
20879do
20880as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20881echo "$as_me:20881: checking for $ac_func" >&5
20882echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20883if eval "test \"\${$as_ac_var+set}\" = set"; then
20884  echo $ECHO_N "(cached) $ECHO_C" >&6
20885else
20886  cat >conftest.$ac_ext <<_ACEOF
20887#line 20887 "configure"
20888#include "confdefs.h"
20889/* System header to define __stub macros and hopefully few prototypes,
20890    which can conflict with char $ac_func (); below.  */
20891#include <assert.h>
20892/* Override any gcc2 internal prototype to avoid an error.  */
20893#ifdef __cplusplus
20894extern "C"
20895#endif
20896/* We use char because int might match the return type of a gcc2
20897   builtin and then its argument prototype would still apply.  */
20898char $ac_func ();
20899char (*f) ();
20900
20901int
20902main (void)
20903{
20904/* The GNU C library defines this for functions which it implements
20905    to always fail with ENOSYS.  Some functions are actually named
20906    something starting with __ and the normal name is an alias.  */
20907#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20908choke me
20909#else
20910f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20911#endif
20912
20913  ;
20914  return 0;
20915}
20916_ACEOF
20917rm -f conftest.$ac_objext conftest$ac_exeext
20918if { (eval echo "$as_me:20918: \"$ac_link\"") >&5
20919  (eval $ac_link) 2>&5
20920  ac_status=$?
20921  echo "$as_me:20921: \$? = $ac_status" >&5
20922  (exit $ac_status); } &&
20923         { ac_try='test -s conftest$ac_exeext'
20924  { (eval echo "$as_me:20924: \"$ac_try\"") >&5
20925  (eval $ac_try) 2>&5
20926  ac_status=$?
20927  echo "$as_me:20927: \$? = $ac_status" >&5
20928  (exit $ac_status); }; }; then
20929  eval "$as_ac_var=yes"
20930else
20931  echo "$as_me: failed program was:" >&5
20932cat conftest.$ac_ext >&5
20933eval "$as_ac_var=no"
20934fi
20935rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20936fi
20937echo "$as_me:20937: result: `eval echo '${'$as_ac_var'}'`" >&5
20938echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20939if test `eval echo '${'$as_ac_var'}'` = yes; then
20940  cat >>confdefs.h <<EOF
20941#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20942EOF
20943
20944fi
20945done
20946
20947if test -n "$cf_cv_lib_part_tgetent"; then
20948
20949for ac_func in use_extended_names
20950do
20951as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20952echo "$as_me:20952: checking for $ac_func" >&5
20953echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20954if eval "test \"\${$as_ac_var+set}\" = set"; then
20955  echo $ECHO_N "(cached) $ECHO_C" >&6
20956else
20957  cat >conftest.$ac_ext <<_ACEOF
20958#line 20958 "configure"
20959#include "confdefs.h"
20960/* System header to define __stub macros and hopefully few prototypes,
20961    which can conflict with char $ac_func (); below.  */
20962#include <assert.h>
20963/* Override any gcc2 internal prototype to avoid an error.  */
20964#ifdef __cplusplus
20965extern "C"
20966#endif
20967/* We use char because int might match the return type of a gcc2
20968   builtin and then its argument prototype would still apply.  */
20969char $ac_func ();
20970char (*f) ();
20971
20972int
20973main (void)
20974{
20975/* The GNU C library defines this for functions which it implements
20976    to always fail with ENOSYS.  Some functions are actually named
20977    something starting with __ and the normal name is an alias.  */
20978#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20979choke me
20980#else
20981f = $ac_func; /* workaround for ICC 12.0.3 */ if (f == 0) return 1;
20982#endif
20983
20984  ;
20985  return 0;
20986}
20987_ACEOF
20988rm -f conftest.$ac_objext conftest$ac_exeext
20989if { (eval echo "$as_me:20989: \"$ac_link\"") >&5
20990  (eval $ac_link) 2>&5
20991  ac_status=$?
20992  echo "$as_me:20992: \$? = $ac_status" >&5
20993  (exit $ac_status); } &&
20994         { ac_try='test -s conftest$ac_exeext'
20995  { (eval echo "$as_me:20995: \"$ac_try\"") >&5
20996  (eval $ac_try) 2>&5
20997  ac_status=$?
20998  echo "$as_me:20998: \$? = $ac_status" >&5
20999  (exit $ac_status); }; }; then
21000  eval "$as_ac_var=yes"
21001else
21002  echo "$as_me: failed program was:" >&5
21003cat conftest.$ac_ext >&5
21004eval "$as_ac_var=no"
21005fi
21006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21007fi
21008echo "$as_me:21008: result: `eval echo '${'$as_ac_var'}'`" >&5
21009echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
21010if test `eval echo '${'$as_ac_var'}'` = yes; then
21011  cat >>confdefs.h <<EOF
21012#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
21013EOF
21014
21015fi
21016done
21017
21018fi
21019
21020if test -n "$GCC" ; then
21021echo "$as_me:21021: checking if you want to turn on gcc warnings" >&5
21022echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
21023
21024# Check whether --enable-warnings or --disable-warnings was given.
21025if test "${enable_warnings+set}" = set; then
21026  enableval="$enable_warnings"
21027  test "$enableval" != yes && enableval=no
21028	if test "$enableval" != "no" ; then
21029    with_warnings=yes
21030	else
21031		with_warnings=no
21032	fi
21033else
21034  enableval=no
21035	with_warnings=no
21036
21037fi;
21038echo "$as_me:21038: result: $with_warnings" >&5
21039echo "${ECHO_T}$with_warnings" >&6
21040if test "$with_warnings" = yes
21041then
21042
21043if test "$GCC" = yes
21044then
21045cat > conftest.i <<EOF
21046#ifndef GCC_PRINTF
21047#define GCC_PRINTF 0
21048#endif
21049#ifndef GCC_SCANF
21050#define GCC_SCANF 0
21051#endif
21052#ifndef GCC_NORETURN
21053#define GCC_NORETURN /* nothing */
21054#endif
21055#ifndef GCC_UNUSED
21056#define GCC_UNUSED /* nothing */
21057#endif
21058EOF
21059if test "$GCC" = yes
21060then
21061	{ echo "$as_me:21061: checking for $CC __attribute__ directives..." >&5
21062echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
21063cat > conftest.$ac_ext <<EOF
21064#line 21064 "${as_me:-configure}"
21065#include "confdefs.h"
21066#include "conftest.h"
21067#include "conftest.i"
21068#if	GCC_PRINTF
21069#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
21070#else
21071#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
21072#endif
21073#if	GCC_SCANF
21074#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
21075#else
21076#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
21077#endif
21078extern void wow(char *,...) GCC_SCANFLIKE(1,2);
21079extern void oops(char *,...) GCC_PRINTFLIKE(1,2) GCC_NORETURN;
21080extern void foo(void) GCC_NORETURN;
21081int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { return 0; }
21082EOF
21083	cf_printf_attribute=no
21084	cf_scanf_attribute=no
21085	for cf_attribute in scanf printf unused noreturn
21086	do
21087
21088cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21089
21090		cf_directive="__attribute__(($cf_attribute))"
21091		echo "checking for $CC $cf_directive" 1>&5
21092
21093		case $cf_attribute in
21094		(printf)
21095			cf_printf_attribute=yes
21096			cat >conftest.h <<EOF
21097#define GCC_$cf_ATTRIBUTE 1
21098EOF
21099			;;
21100		(scanf)
21101			cf_scanf_attribute=yes
21102			cat >conftest.h <<EOF
21103#define GCC_$cf_ATTRIBUTE 1
21104EOF
21105			;;
21106		(*)
21107			cat >conftest.h <<EOF
21108#define GCC_$cf_ATTRIBUTE $cf_directive
21109EOF
21110			;;
21111		esac
21112
21113		if { (eval echo "$as_me:21113: \"$ac_compile\"") >&5
21114  (eval $ac_compile) 2>&5
21115  ac_status=$?
21116  echo "$as_me:21116: \$? = $ac_status" >&5
21117  (exit $ac_status); }; then
21118			test -n "$verbose" && echo "$as_me:21118: result: ... $cf_attribute" >&5
21119echo "${ECHO_T}... $cf_attribute" >&6
21120			cat conftest.h >>confdefs.h
21121			case $cf_attribute in
21122			(noreturn)
21123
21124cat >>confdefs.h <<EOF
21125#define GCC_NORETURN $cf_directive
21126EOF
21127
21128				;;
21129			(printf)
21130				cf_value='/* nothing */'
21131				if test "$cf_printf_attribute" != no ; then
21132					cf_value='__attribute__((format(printf,fmt,var)))'
21133
21134cat >>confdefs.h <<\EOF
21135#define GCC_PRINTF 1
21136EOF
21137
21138				fi
21139
21140cat >>confdefs.h <<EOF
21141#define GCC_PRINTFLIKE(fmt,var) $cf_value
21142EOF
21143
21144				;;
21145			(scanf)
21146				cf_value='/* nothing */'
21147				if test "$cf_scanf_attribute" != no ; then
21148					cf_value='__attribute__((format(scanf,fmt,var)))'
21149
21150cat >>confdefs.h <<\EOF
21151#define GCC_SCANF 1
21152EOF
21153
21154				fi
21155
21156cat >>confdefs.h <<EOF
21157#define GCC_SCANFLIKE(fmt,var) $cf_value
21158EOF
21159
21160				;;
21161			(unused)
21162
21163cat >>confdefs.h <<EOF
21164#define GCC_UNUSED $cf_directive
21165EOF
21166
21167				;;
21168			esac
21169		fi
21170	done
21171else
21172	fgrep define conftest.i >>confdefs.h
21173fi
21174rm -rf conftest*
21175fi
21176
21177INTEL_COMPILER=no
21178
21179if test "$GCC" = yes ; then
21180	case $host_os in
21181	(linux*|gnu*)
21182		echo "$as_me:21182: checking if this is really Intel C compiler" >&5
21183echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
21184		cf_save_CFLAGS="$CFLAGS"
21185		CFLAGS="$CFLAGS -no-gcc"
21186		cat >conftest.$ac_ext <<_ACEOF
21187#line 21187 "configure"
21188#include "confdefs.h"
21189
21190int
21191main (void)
21192{
21193
21194#ifdef __INTEL_COMPILER
21195#else
21196make an error
21197#endif
21198
21199  ;
21200  return 0;
21201}
21202_ACEOF
21203rm -f conftest.$ac_objext
21204if { (eval echo "$as_me:21204: \"$ac_compile\"") >&5
21205  (eval $ac_compile) 2>&5
21206  ac_status=$?
21207  echo "$as_me:21207: \$? = $ac_status" >&5
21208  (exit $ac_status); } &&
21209         { ac_try='test -s conftest.$ac_objext'
21210  { (eval echo "$as_me:21210: \"$ac_try\"") >&5
21211  (eval $ac_try) 2>&5
21212  ac_status=$?
21213  echo "$as_me:21213: \$? = $ac_status" >&5
21214  (exit $ac_status); }; }; then
21215  INTEL_COMPILER=yes
21216cf_save_CFLAGS="$cf_save_CFLAGS -we147"
21217
21218else
21219  echo "$as_me: failed program was:" >&5
21220cat conftest.$ac_ext >&5
21221fi
21222rm -f conftest.$ac_objext conftest.$ac_ext
21223		CFLAGS="$cf_save_CFLAGS"
21224		echo "$as_me:21224: result: $INTEL_COMPILER" >&5
21225echo "${ECHO_T}$INTEL_COMPILER" >&6
21226		;;
21227	esac
21228fi
21229
21230CLANG_COMPILER=no
21231
21232if test "$GCC" = yes ; then
21233	echo "$as_me:21233: checking if this is really Clang C compiler" >&5
21234echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
21235	cf_save_CFLAGS="$CFLAGS"
21236	CFLAGS="$CFLAGS -Qunused-arguments"
21237	cat >conftest.$ac_ext <<_ACEOF
21238#line 21238 "configure"
21239#include "confdefs.h"
21240
21241int
21242main (void)
21243{
21244
21245#ifdef __clang__
21246#else
21247make an error
21248#endif
21249
21250  ;
21251  return 0;
21252}
21253_ACEOF
21254rm -f conftest.$ac_objext
21255if { (eval echo "$as_me:21255: \"$ac_compile\"") >&5
21256  (eval $ac_compile) 2>&5
21257  ac_status=$?
21258  echo "$as_me:21258: \$? = $ac_status" >&5
21259  (exit $ac_status); } &&
21260         { ac_try='test -s conftest.$ac_objext'
21261  { (eval echo "$as_me:21261: \"$ac_try\"") >&5
21262  (eval $ac_try) 2>&5
21263  ac_status=$?
21264  echo "$as_me:21264: \$? = $ac_status" >&5
21265  (exit $ac_status); }; }; then
21266  CLANG_COMPILER=yes
21267cf_save_CFLAGS="$cf_save_CFLAGS -Qunused-arguments"
21268
21269else
21270  echo "$as_me: failed program was:" >&5
21271cat conftest.$ac_ext >&5
21272fi
21273rm -f conftest.$ac_objext conftest.$ac_ext
21274	CFLAGS="$cf_save_CFLAGS"
21275	echo "$as_me:21275: result: $CLANG_COMPILER" >&5
21276echo "${ECHO_T}$CLANG_COMPILER" >&6
21277fi
21278
21279cat > conftest.$ac_ext <<EOF
21280#line 21280 "${as_me:-configure}"
21281int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
21282EOF
21283
21284if test "$INTEL_COMPILER" = yes
21285then
21286# The "-wdXXX" options suppress warnings:
21287# remark #1419: external declaration in primary source file
21288# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
21289# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
21290# remark #193: zero used for undefined preprocessing identifier
21291# remark #593: variable "curs_sb_left_arrow" was set but never used
21292# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
21293# remark #869: parameter "tw" was never referenced
21294# remark #981: operands are evaluated in unspecified order
21295# warning #279: controlling expression is constant
21296
21297	{ echo "$as_me:21297: checking for $CC warning options..." >&5
21298echo "$as_me: checking for $CC warning options..." >&6;}
21299	cf_save_CFLAGS="$CFLAGS"
21300	EXTRA_CFLAGS="-Wall"
21301	for cf_opt in \
21302		wd1419 \
21303		wd1683 \
21304		wd1684 \
21305		wd193 \
21306		wd593 \
21307		wd279 \
21308		wd810 \
21309		wd869 \
21310		wd981
21311	do
21312		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21313		if { (eval echo "$as_me:21313: \"$ac_compile\"") >&5
21314  (eval $ac_compile) 2>&5
21315  ac_status=$?
21316  echo "$as_me:21316: \$? = $ac_status" >&5
21317  (exit $ac_status); }; then
21318			test -n "$verbose" && echo "$as_me:21318: result: ... -$cf_opt" >&5
21319echo "${ECHO_T}... -$cf_opt" >&6
21320			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21321		fi
21322	done
21323	CFLAGS="$cf_save_CFLAGS"
21324
21325elif test "$GCC" = yes
21326then
21327	{ echo "$as_me:21327: checking for $CC warning options..." >&5
21328echo "$as_me: checking for $CC warning options..." >&6;}
21329	cf_save_CFLAGS="$CFLAGS"
21330	EXTRA_CFLAGS=
21331	cf_warn_CONST=""
21332	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
21333	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
21334	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
21335	for cf_opt in W Wall \
21336		Wbad-function-cast \
21337		Wcast-align \
21338		Wcast-qual \
21339		Wdeclaration-after-statement \
21340		Wextra \
21341		Winline \
21342		Wmissing-declarations \
21343		Wmissing-prototypes \
21344		Wnested-externs \
21345		Wpointer-arith \
21346		Wshadow \
21347		Wstrict-prototypes \
21348		Wundef $cf_gcc_warnings $cf_warn_CONST Wdeclaration-after-statement Wextra Wno-unknown-pragmas Wswitch-enum
21349	do
21350		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
21351		if { (eval echo "$as_me:21351: \"$ac_compile\"") >&5
21352  (eval $ac_compile) 2>&5
21353  ac_status=$?
21354  echo "$as_me:21354: \$? = $ac_status" >&5
21355  (exit $ac_status); }; then
21356			test -n "$verbose" && echo "$as_me:21356: result: ... -$cf_opt" >&5
21357echo "${ECHO_T}... -$cf_opt" >&6
21358			case $cf_opt in
21359			(Wcast-qual)
21360				CPPFLAGS="$CPPFLAGS -DXTSTRINGDEFINES"
21361				;;
21362			(Winline)
21363				case $GCC_VERSION in
21364				([34].*)
21365					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
21366
21367echo "${as_me:-configure}:21367: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21368
21369					continue;;
21370				esac
21371				;;
21372			(Wpointer-arith)
21373				case $GCC_VERSION in
21374				([12].*)
21375					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
21376
21377echo "${as_me:-configure}:21377: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
21378
21379					continue;;
21380				esac
21381				;;
21382			esac
21383			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
21384		fi
21385	done
21386	CFLAGS="$cf_save_CFLAGS"
21387fi
21388rm -rf conftest*
21389
21390fi
21391fi
21392
21393test "$disable_setuid" = yes &&
21394cat >>confdefs.h <<\EOF
21395#define DISABLE_SETUID 1
21396EOF
21397
21398test "$disable_setgid" = yes &&
21399cat >>confdefs.h <<\EOF
21400#define DISABLE_SETGID 1
21401EOF
21402
21403if test $disable_setuid = yes ; then
21404	MAY_SETUID="#"
21405	NOT_SETUID=
21406elif test $disable_setgid = yes ; then
21407	MAY_SETUID="#"
21408	NOT_SETUID=
21409else
21410	MAY_SETUID=
21411	NOT_SETUID="#"
21412fi
21413
21414###	remove from CPPFLAGS the optional features we define in xtermcfg.h
21415###	or other conflicting symbols that may be defined via imake:
21416for cf_def in \
21417	__STDC__ \
21418	ALLOWLOGGING \
21419	ALLOWLOGFILEEXEC \
21420	OPT_LUIT_PROG \
21421	OPT_WIDE_CHARS \
21422	SCROLLBAR_RIGHT \
21423	USE_TTY_GROUP \
21424	USE_UTEMPTER \
21425	XRENDERFONT
21426do
21427	CPPFLAGS=`echo "$CPPFLAGS" | sed -e s/-D$cf_def//`
21428done
21429
21430echo "$as_me:21430: checking if filesystem supports mixed-case filenames" >&5
21431echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
21432if test "${cf_cv_mixedcase+set}" = set; then
21433  echo $ECHO_N "(cached) $ECHO_C" >&6
21434else
21435
21436if test "$cross_compiling" = yes ; then
21437	case $target_alias in
21438	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*)
21439		cf_cv_mixedcase=no
21440		;;
21441	(*)
21442		cf_cv_mixedcase=yes
21443		;;
21444	esac
21445else
21446	rm -f conftest CONFTEST
21447	echo test >conftest
21448	if test -f CONFTEST ; then
21449		cf_cv_mixedcase=no
21450	else
21451		cf_cv_mixedcase=yes
21452	fi
21453	rm -f conftest CONFTEST
21454fi
21455
21456fi
21457echo "$as_me:21457: result: $cf_cv_mixedcase" >&5
21458echo "${ECHO_T}$cf_cv_mixedcase" >&6
21459test "$cf_cv_mixedcase" = yes &&
21460cat >>confdefs.h <<\EOF
21461#define MIXEDCASE_FILENAMES 1
21462EOF
21463
21464for ac_prog in exctags ctags
21465do
21466  # Extract the first word of "$ac_prog", so it can be a program name with args.
21467set dummy $ac_prog; ac_word=$2
21468echo "$as_me:21468: checking for $ac_word" >&5
21469echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21470if test "${ac_cv_prog_CTAGS+set}" = set; then
21471  echo $ECHO_N "(cached) $ECHO_C" >&6
21472else
21473  if test -n "$CTAGS"; then
21474  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
21475else
21476  ac_save_IFS=$IFS; IFS=$ac_path_separator
21477ac_dummy="$PATH"
21478for ac_dir in $ac_dummy; do
21479  IFS=$ac_save_IFS
21480  test -z "$ac_dir" && ac_dir=.
21481  $as_executable_p "$ac_dir/$ac_word" || continue
21482ac_cv_prog_CTAGS="$ac_prog"
21483echo "$as_me:21483: found $ac_dir/$ac_word" >&5
21484break
21485done
21486
21487fi
21488fi
21489CTAGS=$ac_cv_prog_CTAGS
21490if test -n "$CTAGS"; then
21491  echo "$as_me:21491: result: $CTAGS" >&5
21492echo "${ECHO_T}$CTAGS" >&6
21493else
21494  echo "$as_me:21494: result: no" >&5
21495echo "${ECHO_T}no" >&6
21496fi
21497
21498  test -n "$CTAGS" && break
21499done
21500
21501for ac_prog in exetags etags
21502do
21503  # Extract the first word of "$ac_prog", so it can be a program name with args.
21504set dummy $ac_prog; ac_word=$2
21505echo "$as_me:21505: checking for $ac_word" >&5
21506echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21507if test "${ac_cv_prog_ETAGS+set}" = set; then
21508  echo $ECHO_N "(cached) $ECHO_C" >&6
21509else
21510  if test -n "$ETAGS"; then
21511  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
21512else
21513  ac_save_IFS=$IFS; IFS=$ac_path_separator
21514ac_dummy="$PATH"
21515for ac_dir in $ac_dummy; do
21516  IFS=$ac_save_IFS
21517  test -z "$ac_dir" && ac_dir=.
21518  $as_executable_p "$ac_dir/$ac_word" || continue
21519ac_cv_prog_ETAGS="$ac_prog"
21520echo "$as_me:21520: found $ac_dir/$ac_word" >&5
21521break
21522done
21523
21524fi
21525fi
21526ETAGS=$ac_cv_prog_ETAGS
21527if test -n "$ETAGS"; then
21528  echo "$as_me:21528: result: $ETAGS" >&5
21529echo "${ECHO_T}$ETAGS" >&6
21530else
21531  echo "$as_me:21531: result: no" >&5
21532echo "${ECHO_T}no" >&6
21533fi
21534
21535  test -n "$ETAGS" && break
21536done
21537
21538# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
21539set dummy ${CTAGS:-ctags}; ac_word=$2
21540echo "$as_me:21540: checking for $ac_word" >&5
21541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21542if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
21543  echo $ECHO_N "(cached) $ECHO_C" >&6
21544else
21545  if test -n "$MAKE_LOWER_TAGS"; then
21546  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
21547else
21548  ac_save_IFS=$IFS; IFS=$ac_path_separator
21549ac_dummy="$PATH"
21550for ac_dir in $ac_dummy; do
21551  IFS=$ac_save_IFS
21552  test -z "$ac_dir" && ac_dir=.
21553  $as_executable_p "$ac_dir/$ac_word" || continue
21554ac_cv_prog_MAKE_LOWER_TAGS="yes"
21555echo "$as_me:21555: found $ac_dir/$ac_word" >&5
21556break
21557done
21558
21559  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
21560fi
21561fi
21562MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
21563if test -n "$MAKE_LOWER_TAGS"; then
21564  echo "$as_me:21564: result: $MAKE_LOWER_TAGS" >&5
21565echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
21566else
21567  echo "$as_me:21567: result: no" >&5
21568echo "${ECHO_T}no" >&6
21569fi
21570
21571if test "$cf_cv_mixedcase" = yes ; then
21572	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
21573set dummy ${ETAGS:-etags}; ac_word=$2
21574echo "$as_me:21574: checking for $ac_word" >&5
21575echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21576if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
21577  echo $ECHO_N "(cached) $ECHO_C" >&6
21578else
21579  if test -n "$MAKE_UPPER_TAGS"; then
21580  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
21581else
21582  ac_save_IFS=$IFS; IFS=$ac_path_separator
21583ac_dummy="$PATH"
21584for ac_dir in $ac_dummy; do
21585  IFS=$ac_save_IFS
21586  test -z "$ac_dir" && ac_dir=.
21587  $as_executable_p "$ac_dir/$ac_word" || continue
21588ac_cv_prog_MAKE_UPPER_TAGS="yes"
21589echo "$as_me:21589: found $ac_dir/$ac_word" >&5
21590break
21591done
21592
21593  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
21594fi
21595fi
21596MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
21597if test -n "$MAKE_UPPER_TAGS"; then
21598  echo "$as_me:21598: result: $MAKE_UPPER_TAGS" >&5
21599echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
21600else
21601  echo "$as_me:21601: result: no" >&5
21602echo "${ECHO_T}no" >&6
21603fi
21604
21605else
21606	MAKE_UPPER_TAGS=no
21607fi
21608
21609if test "$MAKE_UPPER_TAGS" = yes ; then
21610	MAKE_UPPER_TAGS=
21611else
21612	MAKE_UPPER_TAGS="#"
21613fi
21614
21615if test "$MAKE_LOWER_TAGS" = yes ; then
21616	MAKE_LOWER_TAGS=
21617else
21618	MAKE_LOWER_TAGS="#"
21619fi
21620
21621LD_RPATH_OPT=
21622echo "$as_me:21622: checking for an rpath option" >&5
21623echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
21624case $cf_cv_system_name in
21625(irix*)
21626	if test "$GCC" = yes; then
21627		LD_RPATH_OPT="-Wl,-rpath,"
21628	else
21629		LD_RPATH_OPT="-rpath "
21630	fi
21631	;;
21632(linux*|gnu*|k*bsd*-gnu|freebsd*)
21633	LD_RPATH_OPT="-Wl,-rpath,"
21634	;;
21635(openbsd[2-9].*|mirbsd*)
21636	LD_RPATH_OPT="-Wl,-rpath,"
21637	;;
21638(dragonfly*)
21639	LD_RPATH_OPT="-rpath "
21640	;;
21641(netbsd*)
21642	LD_RPATH_OPT="-Wl,-rpath,"
21643	;;
21644(osf*|mls+*)
21645	LD_RPATH_OPT="-rpath "
21646	;;
21647(solaris2*)
21648	LD_RPATH_OPT="-R"
21649	;;
21650(*)
21651	;;
21652esac
21653echo "$as_me:21653: result: $LD_RPATH_OPT" >&5
21654echo "${ECHO_T}$LD_RPATH_OPT" >&6
21655
21656case "x$LD_RPATH_OPT" in
21657(x-R*)
21658	echo "$as_me:21658: checking if we need a space after rpath option" >&5
21659echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
21660	cf_save_LIBS="$LIBS"
21661
21662cf_add_libs="${LD_RPATH_OPT}$libdir"
21663# Filter out duplicates - this happens with badly-designed ".pc" files...
21664for cf_add_1lib in $LIBS
21665do
21666	for cf_add_2lib in $cf_add_libs
21667	do
21668		if test "x$cf_add_1lib" = "x$cf_add_2lib"
21669		then
21670			cf_add_1lib=
21671			break
21672		fi
21673	done
21674	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_libs $cf_add_1lib"
21675done
21676LIBS="$cf_add_libs"
21677
21678	cat >conftest.$ac_ext <<_ACEOF
21679#line 21679 "configure"
21680#include "confdefs.h"
21681
21682int
21683main (void)
21684{
21685
21686  ;
21687  return 0;
21688}
21689_ACEOF
21690rm -f conftest.$ac_objext conftest$ac_exeext
21691if { (eval echo "$as_me:21691: \"$ac_link\"") >&5
21692  (eval $ac_link) 2>&5
21693  ac_status=$?
21694  echo "$as_me:21694: \$? = $ac_status" >&5
21695  (exit $ac_status); } &&
21696         { ac_try='test -s conftest$ac_exeext'
21697  { (eval echo "$as_me:21697: \"$ac_try\"") >&5
21698  (eval $ac_try) 2>&5
21699  ac_status=$?
21700  echo "$as_me:21700: \$? = $ac_status" >&5
21701  (exit $ac_status); }; }; then
21702  cf_rpath_space=no
21703else
21704  echo "$as_me: failed program was:" >&5
21705cat conftest.$ac_ext >&5
21706cf_rpath_space=yes
21707fi
21708rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21709	LIBS="$cf_save_LIBS"
21710	echo "$as_me:21710: result: $cf_rpath_space" >&5
21711echo "${ECHO_T}$cf_rpath_space" >&6
21712	test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
21713	;;
21714esac
21715
21716echo "$as_me:21716: checking if rpath-hack should be disabled" >&5
21717echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
21718
21719# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
21720if test "${enable_rpath_hack+set}" = set; then
21721  enableval="$enable_rpath_hack"
21722  test "$enableval" != no && enableval=yes
21723	if test "$enableval" != "yes" ; then
21724    cf_disable_rpath_hack=yes
21725	else
21726		cf_disable_rpath_hack=no
21727	fi
21728else
21729  enableval=yes
21730	cf_disable_rpath_hack=no
21731
21732fi;
21733echo "$as_me:21733: result: $cf_disable_rpath_hack" >&5
21734echo "${ECHO_T}$cf_disable_rpath_hack" >&6
21735if test "$cf_disable_rpath_hack" = no ; then
21736
21737echo "$as_me:21737: checking for updated LDFLAGS" >&5
21738echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
21739if test -n "$LD_RPATH_OPT" ; then
21740	echo "$as_me:21740: result: maybe" >&5
21741echo "${ECHO_T}maybe" >&6
21742
21743	for ac_prog in ldd
21744do
21745  # Extract the first word of "$ac_prog", so it can be a program name with args.
21746set dummy $ac_prog; ac_word=$2
21747echo "$as_me:21747: checking for $ac_word" >&5
21748echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
21749if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
21750  echo $ECHO_N "(cached) $ECHO_C" >&6
21751else
21752  if test -n "$cf_ldd_prog"; then
21753  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
21754else
21755  ac_save_IFS=$IFS; IFS=$ac_path_separator
21756ac_dummy="$PATH"
21757for ac_dir in $ac_dummy; do
21758  IFS=$ac_save_IFS
21759  test -z "$ac_dir" && ac_dir=.
21760  $as_executable_p "$ac_dir/$ac_word" || continue
21761ac_cv_prog_cf_ldd_prog="$ac_prog"
21762echo "$as_me:21762: found $ac_dir/$ac_word" >&5
21763break
21764done
21765
21766fi
21767fi
21768cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
21769if test -n "$cf_ldd_prog"; then
21770  echo "$as_me:21770: result: $cf_ldd_prog" >&5
21771echo "${ECHO_T}$cf_ldd_prog" >&6
21772else
21773  echo "$as_me:21773: result: no" >&5
21774echo "${ECHO_T}no" >&6
21775fi
21776
21777  test -n "$cf_ldd_prog" && break
21778done
21779test -n "$cf_ldd_prog" || cf_ldd_prog="no"
21780
21781	cf_rpath_list="/usr/lib /lib"
21782	if test "$cf_ldd_prog" != no
21783	then
21784		cf_rpath_oops=
21785
21786cat >conftest.$ac_ext <<_ACEOF
21787#line 21787 "configure"
21788#include "confdefs.h"
21789#include <stdio.h>
21790int
21791main (void)
21792{
21793printf("Hello");
21794  ;
21795  return 0;
21796}
21797_ACEOF
21798rm -f conftest.$ac_objext conftest$ac_exeext
21799if { (eval echo "$as_me:21799: \"$ac_link\"") >&5
21800  (eval $ac_link) 2>&5
21801  ac_status=$?
21802  echo "$as_me:21802: \$? = $ac_status" >&5
21803  (exit $ac_status); } &&
21804         { ac_try='test -s conftest$ac_exeext'
21805  { (eval echo "$as_me:21805: \"$ac_try\"") >&5
21806  (eval $ac_try) 2>&5
21807  ac_status=$?
21808  echo "$as_me:21808: \$? = $ac_status" >&5
21809  (exit $ac_status); }; }; then
21810  cf_rpath_oops=`$cf_ldd_prog conftest$ac_exeext | fgrep ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
21811		 cf_rpath_list=`$cf_ldd_prog conftest$ac_exeext | fgrep / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
21812else
21813  echo "$as_me: failed program was:" >&5
21814cat conftest.$ac_ext >&5
21815fi
21816rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21817
21818		# If we passed the link-test, but get a "not found" on a given library,
21819		# this could be due to inept reconfiguration of gcc to make it only
21820		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
21821		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
21822		# /usr/local libraries.
21823		if test -n "$cf_rpath_oops"
21824		then
21825			for cf_rpath_src in $cf_rpath_oops
21826			do
21827				for cf_rpath_dir in \
21828					/usr/local \
21829					/usr/pkg \
21830					/opt/sfw
21831				do
21832					if test -f $cf_rpath_dir/lib/$cf_rpath_src
21833					then
21834						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
21835
21836echo "${as_me:-configure}:21836: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
21837
21838						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
21839						break
21840					fi
21841				done
21842			done
21843		fi
21844	fi
21845
21846	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
21847
21848echo "${as_me:-configure}:21848: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
21849
21850test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
21851
21852echo "${as_me:-configure}:21852: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
21853
21854cf_rpath_dst=
21855for cf_rpath_src in $LDFLAGS
21856do
21857	case $cf_rpath_src in
21858	(-L*)
21859
21860		# check if this refers to a directory which we will ignore
21861		cf_rpath_skip=no
21862		if test -n "$cf_rpath_list"
21863		then
21864			for cf_rpath_item in $cf_rpath_list
21865			do
21866				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
21867				then
21868					cf_rpath_skip=yes
21869					break
21870				fi
21871			done
21872		fi
21873
21874		if test "$cf_rpath_skip" = no
21875		then
21876			# transform the option
21877			if test "$LD_RPATH_OPT" = "-R " ; then
21878				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
21879			else
21880				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
21881			fi
21882
21883			# if we have not already added this, add it now
21884			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
21885			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
21886			then
21887				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
21888
21889echo "${as_me:-configure}:21889: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
21890
21891				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
21892			fi
21893		fi
21894		;;
21895	esac
21896	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
21897done
21898LDFLAGS=$cf_rpath_dst
21899
21900test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
21901
21902echo "${as_me:-configure}:21902: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
21903
21904test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
21905
21906echo "${as_me:-configure}:21906: testing ...checking LIBS $LIBS ..." 1>&5
21907
21908cf_rpath_dst=
21909for cf_rpath_src in $LIBS
21910do
21911	case $cf_rpath_src in
21912	(-L*)
21913
21914		# check if this refers to a directory which we will ignore
21915		cf_rpath_skip=no
21916		if test -n "$cf_rpath_list"
21917		then
21918			for cf_rpath_item in $cf_rpath_list
21919			do
21920				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
21921				then
21922					cf_rpath_skip=yes
21923					break
21924				fi
21925			done
21926		fi
21927
21928		if test "$cf_rpath_skip" = no
21929		then
21930			# transform the option
21931			if test "$LD_RPATH_OPT" = "-R " ; then
21932				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
21933			else
21934				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
21935			fi
21936
21937			# if we have not already added this, add it now
21938			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
21939			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
21940			then
21941				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
21942
21943echo "${as_me:-configure}:21943: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
21944
21945				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
21946			fi
21947		fi
21948		;;
21949	esac
21950	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
21951done
21952LIBS=$cf_rpath_dst
21953
21954test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
21955
21956echo "${as_me:-configure}:21956: testing ...checked LIBS $LIBS ..." 1>&5
21957
21958	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
21959
21960echo "${as_me:-configure}:21960: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
21961
21962else
21963	echo "$as_me:21963: result: no" >&5
21964echo "${ECHO_T}no" >&6
21965fi
21966
21967fi
21968
21969# Force plink.sh to not trim pcre's libraries, which have the same symbol
21970# names as the system regexp.
21971if test "$with_pcre" != no
21972then
21973	LIBS=`echo "$LIBS" | sed -e 's/-lpcre/-kpcre/g'`
21974fi
21975
21976###	output xtermcfg.h, etc
21977ac_config_files="$ac_config_files Makefile df-install minstall:minstall.in"
21978
21979cat >confcache <<\_ACEOF
21980# This file is a shell script that caches the results of configure
21981# tests run on this system so they can be shared between configure
21982# scripts and configure runs, see configure's option --config-cache.
21983# It is not useful on other systems.  If it contains results you don't
21984# want to keep, you may remove or edit it.
21985#
21986# config.status only pays attention to the cache file if you give it
21987# the --recheck option to rerun configure.
21988#
21989# `ac_cv_env_foo' variables (set or unset) will be overriden when
21990# loading this file, other *unset* `ac_cv_foo' will be assigned the
21991# following values.
21992
21993_ACEOF
21994
21995# The following way of writing the cache mishandles newlines in values,
21996# but we know of no workaround that is simple, portable, and efficient.
21997# So, don't put newlines in cache variables' values.
21998# Ultrix sh set writes to stderr and can't be redirected directly,
21999# and sets the high bit in the cache file unless we assign to the vars.
22000{
22001  (set) 2>&1 |
22002    case `(ac_space=' '; set | grep ac_space) 2>&1` in
22003    *ac_space=\ *)
22004      # `set' does not quote correctly, so add quotes (double-quote
22005      # substitution turns \\\\ into \\, and sed turns \\ into \).
22006      sed -n \
22007        "s/'/'\\\\''/g;
22008    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
22009      ;;
22010    *)
22011      # `set' quotes correctly as required by POSIX, so do not add quotes.
22012      sed -n \
22013        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
22014      ;;
22015    esac;
22016} |
22017  sed '
22018     t clear
22019     : clear
22020     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
22021     t end
22022     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
22023     : end' >>confcache
22024if cmp -s $cache_file confcache; then :; else
22025  if test -w $cache_file; then
22026    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
22027    cat confcache >$cache_file
22028  else
22029    echo "not updating unwritable cache $cache_file"
22030  fi
22031fi
22032rm -f confcache
22033
22034test "x$prefix" = xNONE && prefix=$ac_default_prefix
22035# Let make expand exec_prefix.
22036test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
22037
22038# VPATH may cause trouble with some makes, so we remove $(srcdir),
22039# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
22040# trailing colons and then remove the whole line if VPATH becomes empty
22041# (actually we leave an empty line to preserve line numbers).
22042if test "x$srcdir" = x.; then
22043  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
22044s/:*\$(srcdir):*/:/;
22045s/:*\${srcdir}:*/:/;
22046s/:*@srcdir@:*/:/;
22047s/^\([^=]*=[ 	]*\):*/\1/;
22048s/:*$//;
22049s/^[^=]*=[ 	]*$//;
22050}'
22051fi
22052
22053DEFS=-DHAVE_CONFIG_H
22054
22055: ${CONFIG_STATUS=./config.status}
22056ac_clean_files_save=$ac_clean_files
22057ac_clean_files="$ac_clean_files $CONFIG_STATUS"
22058{ echo "$as_me:22058: creating $CONFIG_STATUS" >&5
22059echo "$as_me: creating $CONFIG_STATUS" >&6;}
22060cat >$CONFIG_STATUS <<_ACEOF
22061#! $SHELL
22062# Generated automatically by configure.
22063# Run this file to recreate the current configuration.
22064# Compiler output produced by configure, useful for debugging
22065# configure, is in config.log if it exists.
22066
22067debug=false
22068SHELL=\${CONFIG_SHELL-$SHELL}
22069ac_cs_invocation="\$0 \$@"
22070
22071_ACEOF
22072
22073cat >>$CONFIG_STATUS <<\_ACEOF
22074# Be Bourne compatible
22075if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
22076  emulate sh
22077  NULLCMD=:
22078elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
22079  set -o posix
22080fi
22081
22082# Name of the executable.
22083as_me=`echo "$0" |sed 's,.*[\\/],,'`
22084
22085if expr a : '\(a\)' >/dev/null 2>&1; then
22086  as_expr=expr
22087else
22088  as_expr=false
22089fi
22090
22091rm -f conf$$ conf$$.exe conf$$.file
22092echo >conf$$.file
22093if ln -s conf$$.file conf$$ 2>/dev/null; then
22094  # We could just check for DJGPP; but this test a) works b) is more generic
22095  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
22096  if test -f conf$$.exe; then
22097    # Don't use ln at all; we don't have any links
22098    as_ln_s='cp -p'
22099  else
22100    as_ln_s='ln -s'
22101  fi
22102elif ln conf$$.file conf$$ 2>/dev/null; then
22103  as_ln_s=ln
22104else
22105  as_ln_s='cp -p'
22106fi
22107rm -f conf$$ conf$$.exe conf$$.file
22108
22109as_executable_p="test -f"
22110
22111# Support unset when possible.
22112if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
22113  as_unset=unset
22114else
22115  as_unset=false
22116fi
22117
22118# NLS nuisances.
22119$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
22120$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
22121$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
22122$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
22123$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
22124$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
22125$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
22126$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
22127
22128# IFS
22129# We need space, tab and new line, in precisely that order.
22130as_nl='
22131'
22132IFS=" 	$as_nl"
22133
22134# CDPATH.
22135$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
22136
22137exec 6>&1
22138
22139_ACEOF
22140
22141# Files that config.status was made for.
22142if test -n "$ac_config_files"; then
22143  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
22144fi
22145
22146if test -n "$ac_config_headers"; then
22147  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
22148fi
22149
22150if test -n "$ac_config_links"; then
22151  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
22152fi
22153
22154if test -n "$ac_config_commands"; then
22155  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
22156fi
22157
22158cat >>$CONFIG_STATUS <<\EOF
22159
22160ac_cs_usage="\
22161\`$as_me' instantiates files from templates according to the
22162current configuration.
22163
22164Usage: $0 [OPTIONS] [FILE]...
22165
22166  -h, --help       print this help, then exit
22167  -V, --version    print version number, then exit
22168  -d, --debug      don't remove temporary files
22169      --recheck    update $as_me by reconfiguring in the same conditions
22170  --file=FILE[:TEMPLATE]
22171                   instantiate the configuration file FILE
22172  --header=FILE[:TEMPLATE]
22173                   instantiate the configuration header FILE
22174
22175Configuration files:
22176$config_files
22177
22178Configuration headers:
22179$config_headers
22180
22181Report bugs to <dickey@invisible-island.net>."
22182EOF
22183
22184cat >>$CONFIG_STATUS <<EOF
22185ac_cs_version="\\
22186config.status
22187configured by $0, generated by GNU Autoconf 2.52.20170501,
22188  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
22189
22190Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
22191Free Software Foundation, Inc.
22192This config.status script is free software; the Free Software Foundation
22193gives unlimited permission to copy, distribute and modify it."
22194srcdir=$srcdir
22195INSTALL="$INSTALL"
22196EOF
22197
22198cat >>$CONFIG_STATUS <<\EOF
22199# If no file are specified by the user, then we need to provide default
22200# value.  By we need to know if files were specified by the user.
22201ac_need_defaults=:
22202while test $# != 0
22203do
22204  case $1 in
22205  --*=*)
22206    ac_option=`expr "x$1" : 'x\([^=]*\)='`
22207    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
22208    shift
22209    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
22210    shift
22211    ;;
22212  -*);;
22213  *) # This is not an option, so the user has probably given explicit
22214     # arguments.
22215     ac_need_defaults=false;;
22216  esac
22217
22218  case $1 in
22219  # Handling of the options.
22220EOF
22221cat >>$CONFIG_STATUS <<EOF
22222  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
22223    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
22224    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
22225EOF
22226cat >>$CONFIG_STATUS <<\EOF
22227  --version | --vers* | -V )
22228    echo "$ac_cs_version"; exit 0 ;;
22229  --he | --h)
22230    # Conflict between --help and --header
22231    { { echo "$as_me:22231: error: ambiguous option: $1
22232Try \`$0 --help' for more information." >&5
22233echo "$as_me: error: ambiguous option: $1
22234Try \`$0 --help' for more information." >&2;}
22235   { (exit 1); exit 1; }; };;
22236  --help | --hel | -h )
22237    echo "$ac_cs_usage"; exit 0 ;;
22238  --debug | --d* | -d )
22239    debug=: ;;
22240  --file | --fil | --fi | --f )
22241    shift
22242    CONFIG_FILES="$CONFIG_FILES $1"
22243    ac_need_defaults=false;;
22244  --header | --heade | --head | --hea )
22245    shift
22246    CONFIG_HEADERS="$CONFIG_HEADERS $1"
22247    ac_need_defaults=false;;
22248
22249  # This is an error.
22250  -*) { { echo "$as_me:22250: error: unrecognized option: $1
22251Try \`$0 --help' for more information." >&5
22252echo "$as_me: error: unrecognized option: $1
22253Try \`$0 --help' for more information." >&2;}
22254   { (exit 1); exit 1; }; } ;;
22255
22256  *) ac_config_targets="$ac_config_targets $1" ;;
22257
22258  esac
22259  shift
22260done
22261
22262exec 5>>config.log
22263cat >&5 << _ACEOF
22264
22265## ----------------------- ##
22266## Running config.status.  ##
22267## ----------------------- ##
22268
22269This file was extended by $as_me 2.52.20170501, executed with
22270  CONFIG_FILES    = $CONFIG_FILES
22271  CONFIG_HEADERS  = $CONFIG_HEADERS
22272  CONFIG_LINKS    = $CONFIG_LINKS
22273  CONFIG_COMMANDS = $CONFIG_COMMANDS
22274  > $ac_cs_invocation
22275on `(hostname || uname -n) 2>/dev/null | sed 1q`
22276
22277_ACEOF
22278EOF
22279
22280cat >>$CONFIG_STATUS <<\EOF
22281for ac_config_target in $ac_config_targets
22282do
22283  case "$ac_config_target" in
22284  # Handling of arguments.
22285  "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
22286  "df-install" ) CONFIG_FILES="$CONFIG_FILES df-install" ;;
22287  "minstall" ) CONFIG_FILES="$CONFIG_FILES minstall:minstall.in" ;;
22288  "xtermcfg.h" ) CONFIG_HEADERS="$CONFIG_HEADERS xtermcfg.h:xtermcfg.hin" ;;
22289  *) { { echo "$as_me:22289: error: invalid argument: $ac_config_target" >&5
22290echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
22291   { (exit 1); exit 1; }; };;
22292  esac
22293done
22294
22295# If the user did not use the arguments to specify the items to instantiate,
22296# then the envvar interface is used.  Set only those that are not.
22297# We use the long form for the default assignment because of an extremely
22298# bizarre bug on SunOS 4.1.3.
22299if $ac_need_defaults; then
22300  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
22301  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
22302fi
22303
22304# Create a temporary directory, and hook for its removal unless debugging.
22305$debug ||
22306{
22307  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
22308  trap '{ (exit 1); exit 1; }' 1 2 13 15
22309}
22310
22311# Create a (secure) tmp directory for tmp files.
22312: ${TMPDIR=/tmp}
22313{
22314  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
22315  test -n "$tmp" && test -d "$tmp"
22316}  ||
22317{
22318  tmp=$TMPDIR/cs$$-$RANDOM
22319  (umask 077 && mkdir $tmp)
22320} ||
22321{
22322   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
22323   { (exit 1); exit 1; }
22324}
22325
22326EOF
22327
22328cat >>$CONFIG_STATUS <<EOF
22329
22330#
22331# CONFIG_FILES section.
22332#
22333
22334# No need to generate the scripts if there are no CONFIG_FILES.
22335# This happens for instance when ./config.status config.h
22336if test -n "\$CONFIG_FILES"; then
22337  # Protect against being on the right side of a sed subst in config.status.
22338  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
22339   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
22340s,@SHELL@,$SHELL,;t t
22341s,@exec_prefix@,$exec_prefix,;t t
22342s,@prefix@,$prefix,;t t
22343s,@program_transform_name@,$program_transform_name,;t t
22344s,@bindir@,$bindir,;t t
22345s,@sbindir@,$sbindir,;t t
22346s,@libexecdir@,$libexecdir,;t t
22347s,@datarootdir@,$datarootdir,;t t
22348s,@datadir@,$datadir,;t t
22349s,@sysconfdir@,$sysconfdir,;t t
22350s,@sharedstatedir@,$sharedstatedir,;t t
22351s,@localstatedir@,$localstatedir,;t t
22352s,@libdir@,$libdir,;t t
22353s,@includedir@,$includedir,;t t
22354s,@oldincludedir@,$oldincludedir,;t t
22355s,@infodir@,$infodir,;t t
22356s,@mandir@,$mandir,;t t
22357s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
22358s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
22359s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
22360s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
22361s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
22362s,@build_alias@,$build_alias,;t t
22363s,@host_alias@,$host_alias,;t t
22364s,@target_alias@,$target_alias,;t t
22365s,@ECHO_C@,$ECHO_C,;t t
22366s,@ECHO_N@,$ECHO_N,;t t
22367s,@ECHO_T@,$ECHO_T,;t t
22368s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
22369s,@DEFS@,$DEFS,;t t
22370s,@LIBS@,$LIBS,;t t
22371s,@build@,$build,;t t
22372s,@build_cpu@,$build_cpu,;t t
22373s,@build_vendor@,$build_vendor,;t t
22374s,@build_os@,$build_os,;t t
22375s,@host@,$host,;t t
22376s,@host_cpu@,$host_cpu,;t t
22377s,@host_vendor@,$host_vendor,;t t
22378s,@host_os@,$host_os,;t t
22379s,@CC@,$CC,;t t
22380s,@CFLAGS@,$CFLAGS,;t t
22381s,@LDFLAGS@,$LDFLAGS,;t t
22382s,@CPPFLAGS@,$CPPFLAGS,;t t
22383s,@ac_ct_CC@,$ac_ct_CC,;t t
22384s,@EXEEXT@,$EXEEXT,;t t
22385s,@OBJEXT@,$OBJEXT,;t t
22386s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
22387s,@CPP@,$CPP,;t t
22388s,@AWK@,$AWK,;t t
22389s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
22390s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
22391s,@INSTALL_DATA@,$INSTALL_DATA,;t t
22392s,@LN_S@,$LN_S,;t t
22393s,@LINT@,$LINT,;t t
22394s,@LINT_OPTS@,$LINT_OPTS,;t t
22395s,@APP_CLASS@,$APP_CLASS,;t t
22396s,@APPSDIR@,$APPSDIR,;t t
22397s,@no_appsdir@,$no_appsdir,;t t
22398s,@ICON_NAME@,$ICON_NAME,;t t
22399s,@ICON_SYMLINK@,$ICON_SYMLINK,;t t
22400s,@PIXMAPDIR@,$PIXMAPDIR,;t t
22401s,@no_pixmapdir@,$no_pixmapdir,;t t
22402s,@ICONDIR@,$ICONDIR,;t t
22403s,@no_icondir@,$no_icondir,;t t
22404s,@ICON_FORMAT@,$ICON_FORMAT,;t t
22405s,@ICON_THEME@,$ICON_THEME,;t t
22406s,@ICON_LIST@,$ICON_LIST,;t t
22407s,@desktop_utils@,$desktop_utils,;t t
22408s,@DESKTOP_FLAGS@,$DESKTOP_FLAGS,;t t
22409s,@DESKTOP_CATEGORY@,$DESKTOP_CATEGORY,;t t
22410s,@XTERM_PATH@,$XTERM_PATH,;t t
22411s,@XTERM_SYMLINK@,$XTERM_SYMLINK,;t t
22412s,@SINSTALL_OPTS@,$SINSTALL_OPTS,;t t
22413s,@X_CFLAGS@,$X_CFLAGS,;t t
22414s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
22415s,@X_LIBS@,$X_LIBS,;t t
22416s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
22417s,@PKG_CONFIG@,$PKG_CONFIG,;t t
22418s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
22419s,@ICON_SUFFIX@,$ICON_SUFFIX,;t t
22420s,@IMAKE@,$IMAKE,;t t
22421s,@IMAKE_CFLAGS@,$IMAKE_CFLAGS,;t t
22422s,@IMAKE_LOADFLAGS@,$IMAKE_LOADFLAGS,;t t
22423s,@GROFF_PATH@,$GROFF_PATH,;t t
22424s,@NROFF_PATH@,$NROFF_PATH,;t t
22425s,@GROFF_NOTE@,$GROFF_NOTE,;t t
22426s,@NROFF_NOTE@,$NROFF_NOTE,;t t
22427s,@cf_man2html@,$cf_man2html,;t t
22428s,@MAN2HTML_NOTE@,$MAN2HTML_NOTE,;t t
22429s,@MAN2HTML_PATH@,$MAN2HTML_PATH,;t t
22430s,@MAN2HTML_TEMP@,$MAN2HTML_TEMP,;t t
22431s,@default_termid@,$default_termid,;t t
22432s,@default_TERM@,$default_TERM,;t t
22433s,@backarrow_is_bs@,$backarrow_is_bs,;t t
22434s,@backarrow_is_erase@,$backarrow_is_erase,;t t
22435s,@delete_is_del@,$delete_is_del,;t t
22436s,@initial_erase@,$initial_erase,;t t
22437s,@alt_sends_esc@,$alt_sends_esc,;t t
22438s,@meta_sends_esc@,$meta_sends_esc,;t t
22439s,@cf_tic_prog@,$cf_tic_prog,;t t
22440s,@no_ticprog@,$no_ticprog,;t t
22441s,@TERMINFO_DIR@,$TERMINFO_DIR,;t t
22442s,@SET_TERMINFO@,$SET_TERMINFO,;t t
22443s,@FREETYPE_CONFIG@,$FREETYPE_CONFIG,;t t
22444s,@FREETYPE_OLD_CONFIG@,$FREETYPE_OLD_CONFIG,;t t
22445s,@FREETYPE_XFT_CONFIG@,$FREETYPE_XFT_CONFIG,;t t
22446s,@HAVE_TYPE_FCCHAR32@,$HAVE_TYPE_FCCHAR32,;t t
22447s,@HAVE_TYPE_XFTCHARSPEC@,$HAVE_TYPE_XFTCHARSPEC,;t t
22448s,@LUIT@,$LUIT,;t t
22449s,@ECHO_LT@,$ECHO_LT,;t t
22450s,@ECHO_LD@,$ECHO_LD,;t t
22451s,@RULE_CC@,$RULE_CC,;t t
22452s,@SHOW_CC@,$SHOW_CC,;t t
22453s,@ECHO_CC@,$ECHO_CC,;t t
22454s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
22455s,@CHARPROC_DEPS@,$CHARPROC_DEPS,;t t
22456s,@EXTRAHDRS@,$EXTRAHDRS,;t t
22457s,@EXTRASRCS@,$EXTRASRCS,;t t
22458s,@EXTRAOBJS@,$EXTRAOBJS,;t t
22459s,@MAY_SETUID@,$MAY_SETUID,;t t
22460s,@NOT_SETUID@,$NOT_SETUID,;t t
22461s,@CTAGS@,$CTAGS,;t t
22462s,@ETAGS@,$ETAGS,;t t
22463s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
22464s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
22465s,@cf_ldd_prog@,$cf_ldd_prog,;t t
22466s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
22467CEOF
22468
22469EOF
22470
22471  cat >>$CONFIG_STATUS <<\EOF
22472  # Split the substitutions into bite-sized pieces for seds with
22473  # small command number limits, like on Digital OSF/1 and HP-UX.
22474  ac_max_sed_lines=48
22475  ac_sed_frag=1 # Number of current file.
22476  ac_beg=1 # First line for current file.
22477  ac_end=$ac_max_sed_lines # Line after last line for current file.
22478  ac_more_lines=:
22479  ac_sed_cmds=
22480  while $ac_more_lines; do
22481    if test $ac_beg -gt 1; then
22482      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22483    else
22484      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
22485    fi
22486    if test ! -s $tmp/subs.frag; then
22487      ac_more_lines=false
22488    else
22489      # The purpose of the label and of the branching condition is to
22490      # speed up the sed processing (if there are no `@' at all, there
22491      # is no need to browse any of the substitutions).
22492      # These are the two extra sed commands mentioned above.
22493      (echo ':t
22494  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
22495      # It is possible to make a multiline substitution using escaped newlines.
22496      # Ensure that we do not split the substitution between script fragments.
22497      ac_BEG=$ac_end
22498      ac_END=`expr $ac_end + $ac_max_sed_lines`
22499      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
22500      if test -s $tmp/subs.next; then
22501        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
22502        if test ! -s $tmp/subs.edit; then
22503          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
22504          if test ! -s $tmp/subs.edit; then
22505            if test $ac_beg -gt 1; then
22506              ac_end=`expr $ac_end - 1`
22507              continue
22508            fi
22509          fi
22510        fi
22511      fi
22512
22513      if test -z "$ac_sed_cmds"; then
22514        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
22515      else
22516        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
22517      fi
22518      ac_sed_frag=`expr $ac_sed_frag + 1`
22519      ac_beg=$ac_end
22520      ac_end=`expr $ac_end + $ac_max_sed_lines`
22521    fi
22522  done
22523  if test -z "$ac_sed_cmds"; then
22524    ac_sed_cmds=cat
22525  fi
22526fi # test -n "$CONFIG_FILES"
22527
22528EOF
22529cat >>$CONFIG_STATUS <<\EOF
22530for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
22531  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22532  case $ac_file in
22533  - | *:- | *:-:* ) # input from stdin
22534        cat >$tmp/stdin
22535        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22536        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22537  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22538        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22539  * )   ac_file_in=$ac_file.in ;;
22540  esac
22541
22542  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
22543  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22544         X"$ac_file" : 'X\(//\)[^/]' \| \
22545         X"$ac_file" : 'X\(//\)$' \| \
22546         X"$ac_file" : 'X\(/\)' \| \
22547         .     : '\(.\)' 2>/dev/null ||
22548echo X"$ac_file" |
22549    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22550  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22551  	  /^X\(\/\/\)$/{ s//\1/; q; }
22552  	  /^X\(\/\).*/{ s//\1/; q; }
22553  	  s/.*/./; q'`
22554  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22555    { case "$ac_dir" in
22556  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22557  *)                      as_incr_dir=.;;
22558esac
22559as_dummy="$ac_dir"
22560for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22561  case $as_mkdir_dir in
22562    # Skip DOS drivespec
22563    ?:) as_incr_dir=$as_mkdir_dir ;;
22564    *)
22565      as_incr_dir=$as_incr_dir/$as_mkdir_dir
22566      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22567    ;;
22568  esac
22569done; }
22570
22571    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
22572    # A "../" for each directory in $ac_dir_suffix.
22573    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
22574  else
22575    ac_dir_suffix= ac_dots=
22576  fi
22577
22578  case $srcdir in
22579  .)  ac_srcdir=.
22580      if test -z "$ac_dots"; then
22581         ac_top_srcdir=.
22582      else
22583         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
22584      fi ;;
22585  [\\/]* | ?:[\\/]* )
22586      ac_srcdir=$srcdir$ac_dir_suffix;
22587      ac_top_srcdir=$srcdir ;;
22588  *) # Relative path.
22589    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
22590    ac_top_srcdir=$ac_dots$srcdir ;;
22591  esac
22592
22593  case $INSTALL in
22594  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
22595  *) ac_INSTALL=$ac_dots$INSTALL ;;
22596  esac
22597
22598  if test x"$ac_file" != x-; then
22599    { echo "$as_me:22599: creating $ac_file" >&5
22600echo "$as_me: creating $ac_file" >&6;}
22601    rm -f "$ac_file"
22602  fi
22603  # Let's still pretend it is `configure' which instantiates (i.e., don't
22604  # use $as_me), people would be surprised to read:
22605  #    /* config.h.  Generated automatically by config.status.  */
22606  configure_input="Generated automatically from `echo $ac_file_in |
22607                                                 sed 's,.*/,,'` by configure."
22608
22609  # First look for the input files in the build tree, otherwise in the
22610  # src tree.
22611  ac_file_inputs=`IFS=:
22612    for f in $ac_file_in; do
22613      case $f in
22614      -) echo $tmp/stdin ;;
22615      [\\/$]*)
22616         # Absolute (can't be DOS-style, as IFS=:)
22617         test -f "$f" || { { echo "$as_me:22617: error: cannot find input file: $f" >&5
22618echo "$as_me: error: cannot find input file: $f" >&2;}
22619   { (exit 1); exit 1; }; }
22620         echo $f;;
22621      *) # Relative
22622         if test -f "$f"; then
22623           # Build tree
22624           echo $f
22625         elif test -f "$srcdir/$f"; then
22626           # Source tree
22627           echo $srcdir/$f
22628         else
22629           # /dev/null tree
22630           { { echo "$as_me:22630: error: cannot find input file: $f" >&5
22631echo "$as_me: error: cannot find input file: $f" >&2;}
22632   { (exit 1); exit 1; }; }
22633         fi;;
22634      esac
22635    done` || { (exit 1); exit 1; }
22636EOF
22637cat >>$CONFIG_STATUS <<\EOF
22638  ac_warn_datarootdir=no
22639  if test x"$ac_file" != x-; then
22640    for ac_item in $ac_file_inputs
22641    do
22642      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
22643      if test -n "$ac_seen"; then
22644        ac_used=`grep '@datarootdir@' $ac_item`
22645        if test -z "$ac_used"; then
22646          { echo "$as_me:22646: WARNING: datarootdir was used implicitly but not set:
22647$ac_seen" >&5
22648echo "$as_me: WARNING: datarootdir was used implicitly but not set:
22649$ac_seen" >&2;}
22650          ac_warn_datarootdir=yes
22651        fi
22652      fi
22653      ac_seen=`grep '${datarootdir}' $ac_item`
22654      if test -n "$ac_seen"; then
22655        { echo "$as_me:22655: WARNING: datarootdir was used explicitly but not set:
22656$ac_seen" >&5
22657echo "$as_me: WARNING: datarootdir was used explicitly but not set:
22658$ac_seen" >&2;}
22659        ac_warn_datarootdir=yes
22660      fi
22661    done
22662  fi
22663
22664if test "x$ac_warn_datarootdir" = xyes; then
22665  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
22666fi
22667
22668EOF
22669cat >>$CONFIG_STATUS <<EOF
22670  sed "$ac_vpsub
22671$extrasub
22672EOF
22673cat >>$CONFIG_STATUS <<\EOF
22674:t
22675/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
22676s,@configure_input@,$configure_input,;t t
22677s,@srcdir@,$ac_srcdir,;t t
22678s,@top_srcdir@,$ac_top_srcdir,;t t
22679s,@INSTALL@,$ac_INSTALL,;t t
22680" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
22681  rm -f $tmp/stdin
22682  if test x"$ac_file" != x-; then
22683    cp $tmp/out $ac_file
22684
22685    for ac_name in prefix exec_prefix datarootdir
22686    do
22687        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
22688        if test -n "$ac_seen"; then
22689            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
22690            if test -z "$ac_init"; then
22691              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
22692              { echo "$as_me:22692: WARNING: Variable $ac_name is used but was not set:
22693$ac_seen" >&5
22694echo "$as_me: WARNING: Variable $ac_name is used but was not set:
22695$ac_seen" >&2;}
22696            fi
22697        fi
22698    done
22699    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
22700    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
22701    if test -s $tmp/out; then
22702      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
22703      { echo "$as_me:22703: WARNING: Some variables may not be substituted:
22704$ac_seen" >&5
22705echo "$as_me: WARNING: Some variables may not be substituted:
22706$ac_seen" >&2;}
22707    fi
22708  else
22709    cat $tmp/out
22710  fi
22711  rm -f $tmp/out
22712
22713done
22714EOF
22715cat >>$CONFIG_STATUS <<\EOF
22716
22717#
22718# CONFIG_HEADER section.
22719#
22720
22721# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
22722# NAME is the cpp macro being defined and VALUE is the value it is being given.
22723#
22724# ac_d sets the value in "#define NAME VALUE" lines.
22725ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
22726ac_dB='[ 	].*$,\1#\2'
22727ac_dC=' '
22728ac_dD=',;t'
22729# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
22730ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
22731ac_iB='\([ 	]\),\1#\2define\3'
22732ac_iC=' '
22733ac_iD='\4,;t'
22734# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
22735ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
22736ac_uB='$,\1#\2define\3'
22737ac_uC=' '
22738ac_uD=',;t'
22739
22740for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
22741  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
22742  case $ac_file in
22743  - | *:- | *:-:* ) # input from stdin
22744        cat >$tmp/stdin
22745        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22746        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22747  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
22748        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
22749  * )   ac_file_in=$ac_file.in ;;
22750  esac
22751
22752  test x"$ac_file" != x- && { echo "$as_me:22752: creating $ac_file" >&5
22753echo "$as_me: creating $ac_file" >&6;}
22754
22755  # First look for the input files in the build tree, otherwise in the
22756  # src tree.
22757  ac_file_inputs=`IFS=:
22758    for f in $ac_file_in; do
22759      case $f in
22760      -) echo $tmp/stdin ;;
22761      [\\/$]*)
22762         # Absolute (can't be DOS-style, as IFS=:)
22763         test -f "$f" || { { echo "$as_me:22763: error: cannot find input file: $f" >&5
22764echo "$as_me: error: cannot find input file: $f" >&2;}
22765   { (exit 1); exit 1; }; }
22766         echo $f;;
22767      *) # Relative
22768         if test -f "$f"; then
22769           # Build tree
22770           echo $f
22771         elif test -f "$srcdir/$f"; then
22772           # Source tree
22773           echo $srcdir/$f
22774         else
22775           # /dev/null tree
22776           { { echo "$as_me:22776: error: cannot find input file: $f" >&5
22777echo "$as_me: error: cannot find input file: $f" >&2;}
22778   { (exit 1); exit 1; }; }
22779         fi;;
22780      esac
22781    done` || { (exit 1); exit 1; }
22782  # Remove the trailing spaces.
22783  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
22784
22785EOF
22786
22787# Transform confdefs.h into two sed scripts, `conftest.defines' and
22788# `conftest.undefs', that substitutes the proper values into
22789# config.h.in to produce config.h.  The first handles `#define'
22790# templates, and the second `#undef' templates.
22791# And first: Protect against being on the right side of a sed subst in
22792# config.status.  Protect against being in an unquoted here document
22793# in config.status.
22794rm -f conftest.defines conftest.undefs
22795# Using a here document instead of a string reduces the quoting nightmare.
22796# Putting comments in sed scripts is not portable.
22797#
22798# `end' is used to avoid that the second main sed command (meant for
22799# 0-ary CPP macros) applies to n-ary macro definitions.
22800# See the Autoconf documentation for `clear'.
22801cat >confdef2sed.sed <<\EOF
22802s/[\\&,]/\\&/g
22803s,[\\$`],\\&,g
22804t clear
22805: clear
22806s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
22807t end
22808s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
22809: end
22810EOF
22811# If some macros were called several times there might be several times
22812# the same #defines, which is useless.  Nevertheless, we may not want to
22813# sort them, since we want the *last* AC-DEFINE to be honored.
22814uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
22815sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
22816sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
22817rm -f confdef2sed.sed
22818
22819# This sed command replaces #undef with comments.  This is necessary, for
22820# example, in the case of _POSIX_SOURCE, which is predefined and required
22821# on some systems where configure will not decide to define it.
22822cat >>conftest.undefs <<\EOF
22823s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
22824EOF
22825
22826# Break up conftest.defines because some shells have a limit on the size
22827# of here documents, and old seds have small limits too (100 cmds).
22828echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
22829echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
22830echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
22831echo '  :' >>$CONFIG_STATUS
22832rm -f conftest.tail
22833while grep . conftest.defines >/dev/null
22834do
22835  # Write a limited-size here document to $tmp/defines.sed.
22836  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
22837  # Speed up: don't consider the non `#define' lines.
22838  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
22839  # Work around the forget-to-reset-the-flag bug.
22840  echo 't clr' >>$CONFIG_STATUS
22841  echo ': clr' >>$CONFIG_STATUS
22842  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
22843  echo 'CEOF
22844  sed -f $tmp/defines.sed $tmp/in >$tmp/out
22845  rm -f $tmp/in
22846  mv $tmp/out $tmp/in
22847' >>$CONFIG_STATUS
22848  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
22849  rm -f conftest.defines
22850  mv conftest.tail conftest.defines
22851done
22852rm -f conftest.defines
22853echo '  fi # egrep' >>$CONFIG_STATUS
22854echo >>$CONFIG_STATUS
22855
22856# Break up conftest.undefs because some shells have a limit on the size
22857# of here documents, and old seds have small limits too (100 cmds).
22858echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
22859rm -f conftest.tail
22860while grep . conftest.undefs >/dev/null
22861do
22862  # Write a limited-size here document to $tmp/undefs.sed.
22863  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
22864  # Speed up: don't consider the non `#undef'
22865  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
22866  # Work around the forget-to-reset-the-flag bug.
22867  echo 't clr' >>$CONFIG_STATUS
22868  echo ': clr' >>$CONFIG_STATUS
22869  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
22870  echo 'CEOF
22871  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
22872  rm -f $tmp/in
22873  mv $tmp/out $tmp/in
22874' >>$CONFIG_STATUS
22875  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
22876  rm -f conftest.undefs
22877  mv conftest.tail conftest.undefs
22878done
22879rm -f conftest.undefs
22880
22881cat >>$CONFIG_STATUS <<\EOF
22882  # Let's still pretend it is `configure' which instantiates (i.e., don't
22883  # use $as_me), people would be surprised to read:
22884  #    /* config.h.  Generated automatically by config.status.  */
22885  if test x"$ac_file" = x-; then
22886    echo "/* Generated automatically by configure.  */" >$tmp/config.h
22887  else
22888    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
22889  fi
22890  cat $tmp/in >>$tmp/config.h
22891  rm -f $tmp/in
22892  if test x"$ac_file" != x-; then
22893    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
22894      { echo "$as_me:22894: $ac_file is unchanged" >&5
22895echo "$as_me: $ac_file is unchanged" >&6;}
22896    else
22897      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
22898         X"$ac_file" : 'X\(//\)[^/]' \| \
22899         X"$ac_file" : 'X\(//\)$' \| \
22900         X"$ac_file" : 'X\(/\)' \| \
22901         .     : '\(.\)' 2>/dev/null ||
22902echo X"$ac_file" |
22903    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
22904  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
22905  	  /^X\(\/\/\)$/{ s//\1/; q; }
22906  	  /^X\(\/\).*/{ s//\1/; q; }
22907  	  s/.*/./; q'`
22908      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
22909        { case "$ac_dir" in
22910  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
22911  *)                      as_incr_dir=.;;
22912esac
22913as_dummy="$ac_dir"
22914for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
22915  case $as_mkdir_dir in
22916    # Skip DOS drivespec
22917    ?:) as_incr_dir=$as_mkdir_dir ;;
22918    *)
22919      as_incr_dir=$as_incr_dir/$as_mkdir_dir
22920      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
22921    ;;
22922  esac
22923done; }
22924
22925      fi
22926      rm -f $ac_file
22927      mv $tmp/config.h $ac_file
22928    fi
22929  else
22930    cat $tmp/config.h
22931    rm -f $tmp/config.h
22932  fi
22933done
22934EOF
22935
22936cat >>$CONFIG_STATUS <<\EOF
22937
22938{ (exit 0); exit 0; }
22939EOF
22940chmod +x $CONFIG_STATUS
22941ac_clean_files=$ac_clean_files_save
22942
22943# configure is writing to config.log, and then calls config.status.
22944# config.status does its own redirection, appending to config.log.
22945# Unfortunately, on DOS this fails, as config.log is still kept open
22946# by configure, so config.status won't be able to write to it; its
22947# output is simply discarded.  So we exec the FD to /dev/null,
22948# effectively closing config.log, so it can be properly (re)opened and
22949# appended to by config.status.  When coming back to configure, we
22950# need to make the FD available again.
22951if test "$no_create" != yes; then
22952  ac_cs_success=:
22953  exec 5>/dev/null
22954  $SHELL $CONFIG_STATUS || ac_cs_success=false
22955  exec 5>>config.log
22956  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
22957  # would make configure fail if this is the last instruction.
22958  $ac_cs_success || { (exit 1); exit 1; }
22959fi
22960
22961