1#! /bin/sh
2# Guess values for system-dependent variables and create Makefiles.
3# Generated by Autoconf 2.52.20200802.
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="include/tin.h"
108ac_default_prefix=/usr/local
109# Factoring default headers for most tests.
110ac_includes_default="\
111#include <stdio.h>
112#if HAVE_SYS_TYPES_H
113# include <sys/types.h>
114#endif
115#if HAVE_SYS_STAT_H
116# include <sys/stat.h>
117#endif
118#if STDC_HEADERS
119# include <stdlib.h>
120# include <stddef.h>
121#else
122# if HAVE_STDLIB_H
123#  include <stdlib.h>
124# endif
125#endif
126#if HAVE_STRING_H
127# if !STDC_HEADERS && HAVE_MEMORY_H
128#  include <memory.h>
129# endif
130# include <string.h>
131#endif
132#if HAVE_STRINGS_H
133# include <strings.h>
134#endif
135#if HAVE_INTTYPES_H
136# include <inttypes.h>
137#else
138# if HAVE_STDINT_H
139#  include <stdint.h>
140# endif
141#endif
142#if HAVE_UNISTD_H
143# include <unistd.h>
144#endif"
145
146# Initialize some variables set by options.
147ac_init_help=
148ac_init_version=false
149# The variables have the same names as the options, with
150# dashes changed to underlines.
151cache_file=/dev/null
152exec_prefix=NONE
153no_create=
154no_recursion=
155prefix=NONE
156program_prefix=NONE
157program_suffix=NONE
158program_transform_name=s,x,x,
159silent=
160site=
161srcdir=
162verbose=
163x_includes=NONE
164x_libraries=NONE
165
166# Installation directory options.
167# These are left unexpanded so users can "make install exec_prefix=/foo"
168# and all the variables that are supposed to be based on exec_prefix
169# by default will actually change.
170# Use braces instead of parens because sh, perl, etc. also accept them.
171bindir='${exec_prefix}/bin'
172sbindir='${exec_prefix}/sbin'
173libexecdir='${exec_prefix}/libexec'
174datarootdir='${prefix}/share'
175datadir='${datarootdir}'
176sysconfdir='${prefix}/etc'
177sharedstatedir='${prefix}/com'
178localstatedir='${prefix}/var'
179runstatedir='${localstatedir}/run'
180libdir='${exec_prefix}/lib'
181includedir='${prefix}/include'
182oldincludedir='/usr/include'
183infodir='${datarootdir}/info'
184mandir='${datarootdir}/man'
185
186# Identity of this package.
187PACKAGE_NAME=
188PACKAGE_TARNAME=
189PACKAGE_VERSION=
190PACKAGE_STRING=
191PACKAGE_BUGREPORT=
192
193ac_prev=
194for ac_option
195do
196  # If the previous option needs an argument, assign it.
197  if test -n "$ac_prev"; then
198    eval "$ac_prev=\$ac_option"
199    ac_prev=
200    continue
201  fi
202
203  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
204
205  # Accept the important Cygnus configure options, so we can diagnose typos.
206
207  case $ac_option in
208
209  -bindir | --bindir | --bindi | --bind | --bin | --bi)
210    ac_prev=bindir ;;
211  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
212    bindir=$ac_optarg ;;
213
214  -build | --build | --buil | --bui | --bu)
215    ac_prev=build_alias ;;
216  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
217    build_alias=$ac_optarg ;;
218
219  -cache-file | --cache-file | --cache-fil | --cache-fi \
220  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
221    ac_prev=cache_file ;;
222  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
223  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
224    cache_file=$ac_optarg ;;
225
226  --config-cache | -C)
227    cache_file=config.cache ;;
228
229  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
230    ac_prev=datadir ;;
231  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
232  | --da=*)
233    datadir=$ac_optarg ;;
234
235  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
236  | --dataroo | --dataro | --datar)
237    ac_prev=datarootdir ;;
238  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
239  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
240    datarootdir=$ac_optarg ;;
241
242  -disable-* | --disable-*)
243    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
244    # Reject names that are not valid shell variable names.
245    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
246      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
247   { (exit 1); exit 1; }; }
248    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
249    eval "enable_$ac_feature=no" ;;
250
251  -enable-* | --enable-*)
252    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
253    # Reject names that are not valid shell variable names.
254    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
255      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
256   { (exit 1); exit 1; }; }
257    ac_feature=`echo $ac_feature | sed 's/-/_/g'`
258    case $ac_option in
259      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
260      *) ac_optarg=yes ;;
261    esac
262    eval "enable_$ac_feature='$ac_optarg'" ;;
263
264  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
265  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
266  | --exec | --exe | --ex)
267    ac_prev=exec_prefix ;;
268  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
269  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
270  | --exec=* | --exe=* | --ex=*)
271    exec_prefix=$ac_optarg ;;
272
273  -gas | --gas | --ga | --g)
274    # Obsolete; use --with-gas.
275    with_gas=yes ;;
276
277  -help | --help | --hel | --he | -h)
278    ac_init_help=long ;;
279  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
280    ac_init_help=recursive ;;
281  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
282    ac_init_help=short ;;
283
284  -host | --host | --hos | --ho)
285    ac_prev=host_alias ;;
286  -host=* | --host=* | --hos=* | --ho=*)
287    host_alias=$ac_optarg ;;
288
289  -includedir | --includedir | --includedi | --included | --include \
290  | --includ | --inclu | --incl | --inc)
291    ac_prev=includedir ;;
292  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
293  | --includ=* | --inclu=* | --incl=* | --inc=*)
294    includedir=$ac_optarg ;;
295
296  -infodir | --infodir | --infodi | --infod | --info | --inf)
297    ac_prev=infodir ;;
298  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
299    infodir=$ac_optarg ;;
300
301  -libdir | --libdir | --libdi | --libd)
302    ac_prev=libdir ;;
303  -libdir=* | --libdir=* | --libdi=* | --libd=*)
304    libdir=$ac_optarg ;;
305
306  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
307  | --libexe | --libex | --libe)
308    ac_prev=libexecdir ;;
309  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
310  | --libexe=* | --libex=* | --libe=*)
311    libexecdir=$ac_optarg ;;
312
313  -localstatedir | --localstatedir | --localstatedi | --localstated \
314  | --localstate | --localstat | --localsta | --localst \
315  | --locals | --local | --loca | --loc | --lo)
316    ac_prev=localstatedir ;;
317  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
318  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
319  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
320    localstatedir=$ac_optarg ;;
321
322  -runstatedir | --runstatedir | --runstatedi | --runstated \
323  | --runstate | --runstat | --runsta | --runst \
324  | --runs | --run | --ru)
325    ac_prev=runstatedir ;;
326  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
327  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
328  | --runs=* | --run=* | --ru=*)
329    runstatedir=$ac_optarg ;;
330
331  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
332    ac_prev=mandir ;;
333  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
334    mandir=$ac_optarg ;;
335
336  -nfp | --nfp | --nf)
337    # Obsolete; use --without-fp.
338    with_fp=no ;;
339
340  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
341  | --no-cr | --no-c)
342    no_create=yes ;;
343
344  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
345  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
346    no_recursion=yes ;;
347
348  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
349  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
350  | --oldin | --oldi | --old | --ol | --o)
351    ac_prev=oldincludedir ;;
352  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
353  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
354  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
355    oldincludedir=$ac_optarg ;;
356
357  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
358    ac_prev=prefix ;;
359  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
360    prefix=$ac_optarg ;;
361
362  -program-prefix | --program-prefix | --program-prefi | --program-pref \
363  | --program-pre | --program-pr | --program-p)
364    ac_prev=program_prefix ;;
365  -program-prefix=* | --program-prefix=* | --program-prefi=* \
366  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
367    program_prefix=$ac_optarg ;;
368
369  -program-suffix | --program-suffix | --program-suffi | --program-suff \
370  | --program-suf | --program-su | --program-s)
371    ac_prev=program_suffix ;;
372  -program-suffix=* | --program-suffix=* | --program-suffi=* \
373  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
374    program_suffix=$ac_optarg ;;
375
376  -program-transform-name | --program-transform-name \
377  | --program-transform-nam | --program-transform-na \
378  | --program-transform-n | --program-transform- \
379  | --program-transform | --program-transfor \
380  | --program-transfo | --program-transf \
381  | --program-trans | --program-tran \
382  | --progr-tra | --program-tr | --program-t)
383    ac_prev=program_transform_name ;;
384  -program-transform-name=* | --program-transform-name=* \
385  | --program-transform-nam=* | --program-transform-na=* \
386  | --program-transform-n=* | --program-transform-=* \
387  | --program-transform=* | --program-transfor=* \
388  | --program-transfo=* | --program-transf=* \
389  | --program-trans=* | --program-tran=* \
390  | --progr-tra=* | --program-tr=* | --program-t=*)
391    program_transform_name=$ac_optarg ;;
392
393  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
394  | -silent | --silent | --silen | --sile | --sil)
395    silent=yes ;;
396
397  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
398    ac_prev=sbindir ;;
399  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
400  | --sbi=* | --sb=*)
401    sbindir=$ac_optarg ;;
402
403  -sharedstatedir | --sharedstatedir | --sharedstatedi \
404  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
405  | --sharedst | --shareds | --shared | --share | --shar \
406  | --sha | --sh)
407    ac_prev=sharedstatedir ;;
408  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
409  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
410  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
411  | --sha=* | --sh=*)
412    sharedstatedir=$ac_optarg ;;
413
414  -site | --site | --sit)
415    ac_prev=site ;;
416  -site=* | --site=* | --sit=*)
417    site=$ac_optarg ;;
418
419  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
420    ac_prev=srcdir ;;
421  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
422    srcdir=$ac_optarg ;;
423
424  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
425  | --syscon | --sysco | --sysc | --sys | --sy)
426    ac_prev=sysconfdir ;;
427  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
428  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
429    sysconfdir=$ac_optarg ;;
430
431  -target | --target | --targe | --targ | --tar | --ta | --t)
432    ac_prev=target_alias ;;
433  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
434    target_alias=$ac_optarg ;;
435
436  -v | -verbose | --verbose | --verbos | --verbo | --verb)
437    verbose=yes ;;
438
439  -version | --version | --versio | --versi | --vers | -V)
440    ac_init_version=: ;;
441
442  -with-* | --with-*)
443    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
444    # Reject names that are not valid shell variable names.
445    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
446      { echo "$as_me: error: invalid package name: $ac_package" >&2
447   { (exit 1); exit 1; }; }
448    ac_package=`echo $ac_package| sed 's/-/_/g'`
449    case $ac_option in
450      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
451      *) ac_optarg=yes ;;
452    esac
453    eval "with_$ac_package='$ac_optarg'" ;;
454
455  -without-* | --without-*)
456    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
457    # Reject names that are not valid shell variable names.
458    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
459      { echo "$as_me: error: invalid package name: $ac_package" >&2
460   { (exit 1); exit 1; }; }
461    ac_package=`echo $ac_package | sed 's/-/_/g'`
462    eval "with_$ac_package=no" ;;
463
464  --x)
465    # Obsolete; use --with-x.
466    with_x=yes ;;
467
468  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
469  | --x-incl | --x-inc | --x-in | --x-i)
470    ac_prev=x_includes ;;
471  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
472  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
473    x_includes=$ac_optarg ;;
474
475  -x-libraries | --x-libraries | --x-librarie | --x-librari \
476  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
477    ac_prev=x_libraries ;;
478  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
479  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
480    x_libraries=$ac_optarg ;;
481
482  -*) { echo "$as_me: error: unrecognized option: $ac_option
483Try \`$0 --help' for more information." >&2
484   { (exit 1); exit 1; }; }
485    ;;
486
487  *=*)
488    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
489    # Reject names that are not valid shell variable names.
490    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
491      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
492   { (exit 1); exit 1; }; }
493    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
494    eval "$ac_envvar='$ac_optarg'"
495    export $ac_envvar ;;
496
497  *)
498    # FIXME: should be removed in autoconf 3.0.
499    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
500    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
501      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
502    : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
503    ;;
504
505  esac
506done
507
508if test -n "$ac_prev"; then
509  ac_option=--`echo $ac_prev | sed 's/_/-/g'`
510  { echo "$as_me: error: missing argument to $ac_option" >&2
511   { (exit 1); exit 1; }; }
512fi
513
514# Be sure to have absolute paths.
515for ac_var in exec_prefix prefix
516do
517  eval ac_val=$`echo $ac_var`
518  case $ac_val in
519    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
520    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
521   { (exit 1); exit 1; }; };;
522  esac
523done
524
525# Be sure to have absolute paths.
526for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
527              localstatedir libdir includedir oldincludedir infodir mandir
528do
529  eval ac_val=$`echo $ac_var`
530  case $ac_val in
531    [\\/$]* | ?:[\\/]* ) ;;
532    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
533   { (exit 1); exit 1; }; };;
534  esac
535done
536
537# There might be people who depend on the old broken behavior: `$host'
538# used to hold the argument of --host etc.
539build=$build_alias
540host=$host_alias
541target=$target_alias
542
543# FIXME: should be removed in autoconf 3.0.
544if test "x$host_alias" != x; then
545  if test "x$build_alias" = x; then
546    cross_compiling=maybe
547    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
548    If a cross compiler is detected then cross compile mode will be used." >&2
549  elif test "x$build_alias" != "x$host_alias"; then
550    cross_compiling=yes
551  fi
552fi
553
554ac_tool_prefix=
555test -n "$host_alias" && ac_tool_prefix=$host_alias-
556
557test "$silent" = yes && exec 6>/dev/null
558
559# Find the source files, if location was not specified.
560if test -z "$srcdir"; then
561  ac_srcdir_defaulted=yes
562  # Try the directory containing this script, then its parent.
563  ac_prog=$0
564  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
565  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
566  srcdir=$ac_confdir
567  if test ! -r $srcdir/$ac_unique_file; then
568    srcdir=..
569  fi
570else
571  ac_srcdir_defaulted=no
572fi
573if test ! -r $srcdir/$ac_unique_file; then
574  if test "$ac_srcdir_defaulted" = yes; then
575    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
576   { (exit 1); exit 1; }; }
577  else
578    { echo "$as_me: error: cannot find sources in $srcdir" >&2
579   { (exit 1); exit 1; }; }
580  fi
581fi
582srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
583ac_env_build_alias_set=${build_alias+set}
584ac_env_build_alias_value=$build_alias
585ac_cv_env_build_alias_set=${build_alias+set}
586ac_cv_env_build_alias_value=$build_alias
587ac_env_host_alias_set=${host_alias+set}
588ac_env_host_alias_value=$host_alias
589ac_cv_env_host_alias_set=${host_alias+set}
590ac_cv_env_host_alias_value=$host_alias
591ac_env_target_alias_set=${target_alias+set}
592ac_env_target_alias_value=$target_alias
593ac_cv_env_target_alias_set=${target_alias+set}
594ac_cv_env_target_alias_value=$target_alias
595ac_env_CC_set=${CC+set}
596ac_env_CC_value=$CC
597ac_cv_env_CC_set=${CC+set}
598ac_cv_env_CC_value=$CC
599ac_env_CFLAGS_set=${CFLAGS+set}
600ac_env_CFLAGS_value=$CFLAGS
601ac_cv_env_CFLAGS_set=${CFLAGS+set}
602ac_cv_env_CFLAGS_value=$CFLAGS
603ac_env_LDFLAGS_set=${LDFLAGS+set}
604ac_env_LDFLAGS_value=$LDFLAGS
605ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
606ac_cv_env_LDFLAGS_value=$LDFLAGS
607ac_env_CPPFLAGS_set=${CPPFLAGS+set}
608ac_env_CPPFLAGS_value=$CPPFLAGS
609ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
610ac_cv_env_CPPFLAGS_value=$CPPFLAGS
611ac_env_CPP_set=${CPP+set}
612ac_env_CPP_value=$CPP
613ac_cv_env_CPP_set=${CPP+set}
614ac_cv_env_CPP_value=$CPP
615
616#
617# Report the --help message.
618#
619if test "$ac_init_help" = "long"; then
620  # Omit some internal or obsolete options to make the list less imposing.
621  # This message is too long to be a string in the A/UX 3.1 sh.
622  cat <<EOF
623\`configure' configures this package to adapt to many kinds of systems.
624
625Usage: $0 [OPTION]... [VAR=VALUE]...
626
627To assign environment variables (e.g., CC, CFLAGS...), specify them as
628VAR=VALUE.  See below for descriptions of some of the useful variables.
629
630Defaults for the options are specified in brackets.
631
632Configuration:
633  -h, --help              display this help and exit
634      --help=short        display options specific to this package
635      --help=recursive    display the short help of all the included packages
636  -V, --version           display version information and exit
637  -q, --quiet, --silent   do not print \`checking...' messages
638      --cache-file=FILE   cache test results in FILE [disabled]
639  -C, --config-cache      alias for \`--cache-file=config.cache'
640  -n, --no-create         do not create output files
641      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
642
643EOF
644
645  cat <<EOF
646Installation directories:
647  --prefix=PREFIX         install architecture-independent files in PREFIX
648                          [$ac_default_prefix]
649  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
650                          [PREFIX]
651
652By default, \`make install' will install all the files in
653\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
654an installation prefix other than \`$ac_default_prefix' using \`--prefix',
655for instance \`--prefix=\$HOME'.
656
657For better control, use the options below.
658
659Fine tuning of the installation directories:
660  --bindir=DIR            user executables [EPREFIX/bin]
661  --sbindir=DIR           system admin executables [EPREFIX/sbin]
662  --libexecdir=DIR        program executables [EPREFIX/libexec]
663  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
664  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
665  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
666  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
667  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
668  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
669  --libdir=DIR            object code libraries [EPREFIX/lib]
670  --includedir=DIR        C header files [PREFIX/include]
671  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
672  --infodir=DIR           info documentation [DATAROOTDIR/info]
673  --mandir=DIR            man documentation [DATAROOTDIR/man]
674EOF
675
676  cat <<\EOF
677
678Program names:
679  --program-prefix=PREFIX            prepend PREFIX to installed program names
680  --program-suffix=SUFFIX            append SUFFIX to installed program names
681  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
682
683X features:
684  --x-includes=DIR    X include files are in DIR
685  --x-libraries=DIR   X library files are in DIR
686
687System types:
688  --build=BUILD           configure for building on BUILD [guessed]
689  --host=HOST       build programs to run on HOST [BUILD]
690EOF
691fi
692
693if test -n "$ac_init_help"; then
694
695  cat <<\EOF
696
697Optional Packages:
698  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
699  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
700
701Optional Features:
702  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
703  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
704
705  --with-install-prefix   prefixes actual install location (default: /)
706  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
707  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
708  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
709  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
710  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
711  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
712  --disable-heapsort      disable heapsort() as alternative to qsort
713  --with-ispell           (default: from system path)
714  --with-metamail         (default: from system path)
715  --with-sum              (default: from system path)
716  --with-editor=PROG      specify editor (default: vi)
717  --with-mailer=PROG      specify default mailer-program (default: mailx)
718  --with-mailbox=DIR      directory for incoming mailboxes (default: empty)
719  --with-pkg-config{=path} enable/disable use of pkg-config
720  --disable-pgp-gpg       disable PGP/GPG Support
721  --with-pgp              (default: from system path)
722  --with-pgpk             (default: from system path)
723  --with-gpg              (default: from system path)
724  --with-slrnface         (default: from system path)
725  --with-shell=PROG       default $SHELL program (default: sh)
726  --disable-nntp          disable reading via NNTP
727  --enable-nntp-only      enable reading via NNTP only
728  --enable-debug          turn on debug support
729  --disable-echo          do not display "compiling" commands
730  --enable-prototypes     check for optional prototypes
731  --enable-warnings       turn on GCC compiler warnings
732  --with-x                use the X Window System
733  --with-libdir=PATH      news-library (default: /usr/lib/news)
734  --with-spooldir=PATH    news spool-directory (default: /var/spool/news)
735  --with-nov-dir=PATH     news overview-directory (default: $SPOOLDIR)
736  --with-nov-fname        specify names of overview files (default: .overview)
737  --with-inews-dir=PATH   directory containing "inews" (default: $INEWSPATH)
738  --with-socks=path       link with socks library if available
739  --with-socks5=path      link with socks5 library if available
740  --disable-fcntl         disable fcntl() locking
741  --enable-lockf          enable lockf() locking
742  --enable-flock          enable flock() locking
743  --with-screen=xxx       specify screen type, which must be one of:
744                          termcap, terminfo, curses, ncurses, ncursesw, or
745                          pdcurses (replaces options --enable-curses and
746                          --with-ncurses)
747  --with-curses-dir=DIR   directory in which (n)curses is installed
748  --with-ncurses          link with ncurses if available (deprecated)
749  --enable-curses         use curses interface (deprecated)
750  --with-pcre=PATH        use installed pcre versus bundled
751  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
752  --with-dmalloc          test: use Gray Watson's dmalloc library
753  --with-trace            use debugging/traces for screen output
754  --with-domain-name      sets $DOMAIN_NAME (default: empty)
755  --with-nntp-default-server
756                          (sets NNTP_DEFAULT_SERVER)
757                          (default: news.$DOMAIN_NAME)
758  --enable-mh-mail-handling
759                          use MH style mail handling for mailgroups
760  --enable-cancel-locks   enable creation of Cancel-Locks
761  --with-cancel-locks=PATH use installed canlock versus bundled
762  --disable-gsasl         don't use GNU SASL
763  --disable-8bit-keys     disable 8-bit keycode support
764  --disable-color         disable ANSI-color support
765  --disable-etiquette     disable printing of posting-etiquette
766  --disable-break-long-lines
767                          don't break long mime-encoded lines
768  --disable-mime-strict-charset
769                          force MM_CHARSET obeyance
770  --with-mime-default-charset=CHARSET
771                          fallback for $MM_CHARSET (default: US-ASCII)
772  --with-iso-to-ascii     ISO -> ASCII conversion (default: -1)
773  --disable-locale        disable locale support
774  --disable-posting       disable posting
775  --disable-shell-escape  disable shell escape
776  --enable-fascist-newsadmin
777                          have fascist newsadmin
778  --disable-inverse-video disable inverse video and highlighting
779  --disable-piping        disable piping support
780  --disable-printing      disable printer support
781  --disable-append-pid    disable appending .pid to tmp-files
782  --disable-xhdr-xref     disable XHDR XREF fallback
783  --enable-broken-listgroup-fix
784                          send extra GROUP command before LISTGROUP
785  --enable-broken-system-fix
786                          ignore system()s return value
787  --with-defaults-dir=PATH
788                          directory containing tin.defaults file
789                          (default: /etc/tin)
790  --disable-ipv6          disable IPv6 support (default: enabled)
791  --enable-long-article-numbers
792                          enable long article numbers (default: disabled)
793  --with-coffee           coffee support
794  --with-libiconv-prefix=DIR
795                          search for libiconv in DIR/include and DIR/lib
796  --disable-nls           do not use Native Language Support
797  --with-included-gettext use the GNU gettext library included here
798  --with-textdomain=PKG   NLS text-domain (default is package name)
799  --disable-included-msgs use included messages, for i18n support
800  --with-Xaw3d            link with Xaw 3d library
801  --with-Xaw3dxft         link with Xaw 3d xft library
802  --with-neXtaw           link with neXT Athena library
803  --with-XawPlus          link with Athena-Plus library
804
805Some influential environment variables:
806  CC          C compiler command
807  CFLAGS      C compiler flags
808  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
809              nonstandard directory <lib dir>
810  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
811              headers in a nonstandard directory <include dir>
812  CPP         C preprocessor
813
814Use these variables to override the choices made by `configure' or to help
815it to find libraries and programs with nonstandard names/locations.
816
817EOF
818fi
819
820if test "$ac_init_help" = "recursive"; then
821  # If there are subdirs, report their specific --help.
822  ac_popdir=`pwd`
823  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
824    cd $ac_subdir
825    # A "../" for each directory in /$ac_subdir.
826    ac_dots=`echo $ac_subdir |
827             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
828
829    case $srcdir in
830    .) # No --srcdir option.  We are building in place.
831      ac_sub_srcdir=$srcdir ;;
832    [\\/]* | ?:[\\/]* ) # Absolute path.
833      ac_sub_srcdir=$srcdir/$ac_subdir ;;
834    *) # Relative path.
835      ac_sub_srcdir=$ac_dots$srcdir/$ac_subdir ;;
836    esac
837
838    # Check for guested configure; otherwise get Cygnus style configure.
839    if test -f $ac_sub_srcdir/configure.gnu; then
840      echo
841      $SHELL $ac_sub_srcdir/configure.gnu  --help=recursive
842    elif test -f $ac_sub_srcdir/configure; then
843      echo
844      $SHELL $ac_sub_srcdir/configure  --help=recursive
845    elif test -f $ac_sub_srcdir/configure.ac ||
846           test -f $ac_sub_srcdir/configure.in; then
847      echo
848      $ac_configure --help
849    else
850      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
851    fi
852    cd $ac_popdir
853  done
854fi
855
856test -n "$ac_init_help" && exit 0
857if $ac_init_version; then
858  cat <<\EOF
859
860Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
861Free Software Foundation, Inc.
862This configure script is free software; the Free Software Foundation
863gives unlimited permission to copy, distribute and modify it.
864EOF
865  exit 0
866fi
867exec 5>config.log
868cat >&5 <<EOF
869This file contains any messages produced by compilers while
870running configure, to aid debugging if configure makes a mistake.
871
872It was created by $as_me, which was
873generated by GNU Autoconf 2.52.20200802.  Invocation command line was
874
875  $ $0 $@
876
877EOF
878{
879cat <<_ASUNAME
880## ---------- ##
881## Platform.  ##
882## ---------- ##
883
884hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
885uname -m = `(uname -m) 2>/dev/null || echo unknown`
886uname -r = `(uname -r) 2>/dev/null || echo unknown`
887uname -s = `(uname -s) 2>/dev/null || echo unknown`
888uname -v = `(uname -v) 2>/dev/null || echo unknown`
889
890/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
891/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
892
893/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
894/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
895/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
896hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
897/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
898/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
899/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
900
901PATH = $PATH
902
903_ASUNAME
904} >&5
905
906cat >&5 <<EOF
907## ------------ ##
908## Core tests.  ##
909## ------------ ##
910
911EOF
912
913# Keep a trace of the command line.
914# Strip out --no-create and --no-recursion so they do not pile up.
915# Also quote any args containing shell meta-characters.
916ac_configure_args=
917ac_sep=
918for ac_arg
919do
920  case $ac_arg in
921  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
922  | --no-cr | --no-c) ;;
923  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
924  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
925  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
926    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
927    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
928    ac_sep=" " ;;
929  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
930     ac_sep=" " ;;
931  esac
932  # Get rid of the leading space.
933done
934
935# When interrupted or exit'd, cleanup temporary files, and complete
936# config.log.  We remove comments because anyway the quotes in there
937# would cause problems or look ugly.
938trap 'exit_status=$?
939  # Save into config.log some information that might help in debugging.
940  echo >&5
941  echo "## ----------------- ##" >&5
942  echo "## Cache variables.  ##" >&5
943  echo "## ----------------- ##" >&5
944  echo >&5
945  # The following way of writing the cache mishandles newlines in values,
946{
947  (set) 2>&1 |
948    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
949    *ac_space=\ *)
950      sed -n \
951        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
952    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
953      ;;
954    *)
955      sed -n \
956        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
957      ;;
958    esac;
959} >&5
960  sed "/^$/d" confdefs.h >conftest.log
961  if test -s conftest.log; then
962    echo >&5
963    echo "## ------------ ##" >&5
964    echo "## confdefs.h.  ##" >&5
965    echo "## ------------ ##" >&5
966    echo >&5
967    cat conftest.log >&5
968  fi
969  (echo; echo) >&5
970  test "$ac_signal" != 0 &&
971    echo "$as_me: caught signal $ac_signal" >&5
972  echo "$as_me: exit $exit_status" >&5
973  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
974    exit $exit_status
975     ' 0
976for ac_signal in 1 2 13 15; do
977  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
978done
979ac_signal=0
980
981# confdefs.h avoids OS command line length limits that DEFS can exceed.
982rm -rf conftest* confdefs.h
983# AIX cpp loses on an empty file, so make sure it contains at least a newline.
984echo >confdefs.h
985
986# Let the site file select an alternate cache file if it wants to.
987# Prefer explicitly selected file to automatically selected ones.
988if test -z "$CONFIG_SITE"; then
989  if test "x$prefix" != xNONE; then
990    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
991  else
992    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
993  fi
994fi
995for ac_site_file in $CONFIG_SITE; do
996  if test -r "$ac_site_file"; then
997    { echo "$as_me:997: loading site script $ac_site_file" >&5
998echo "$as_me: loading site script $ac_site_file" >&6;}
999    cat "$ac_site_file" >&5
1000    . "$ac_site_file"
1001  fi
1002done
1003
1004if test -r "$cache_file"; then
1005  # Some versions of bash will fail to source /dev/null (special
1006  # files actually), so we avoid doing that.
1007  if test -f "$cache_file"; then
1008    { echo "$as_me:1008: loading cache $cache_file" >&5
1009echo "$as_me: loading cache $cache_file" >&6;}
1010    case $cache_file in
1011      [\\/]* | ?:[\\/]* ) . $cache_file;;
1012      *)                      . ./$cache_file;;
1013    esac
1014  fi
1015else
1016  { echo "$as_me:1016: creating cache $cache_file" >&5
1017echo "$as_me: creating cache $cache_file" >&6;}
1018  >$cache_file
1019fi
1020
1021# Check that the precious variables saved in the cache have kept the same
1022# value.
1023ac_cache_corrupted=false
1024for ac_var in `(set) 2>&1 |
1025               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1026  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1027  eval ac_new_set=\$ac_env_${ac_var}_set
1028  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1029  eval ac_new_val="\$ac_env_${ac_var}_value"
1030  case $ac_old_set,$ac_new_set in
1031    set,)
1032      { echo "$as_me:1032: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1033echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1034      ac_cache_corrupted=: ;;
1035    ,set)
1036      { echo "$as_me:1036: error: \`$ac_var' was not set in the previous run" >&5
1037echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1038      ac_cache_corrupted=: ;;
1039    ,);;
1040    *)
1041      if test "x$ac_old_val" != "x$ac_new_val"; then
1042        { echo "$as_me:1042: error: \`$ac_var' has changed since the previous run:" >&5
1043echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1044        { echo "$as_me:1044:   former value:  $ac_old_val" >&5
1045echo "$as_me:   former value:  $ac_old_val" >&2;}
1046        { echo "$as_me:1046:   current value: $ac_new_val" >&5
1047echo "$as_me:   current value: $ac_new_val" >&2;}
1048        ac_cache_corrupted=:
1049      fi;;
1050  esac
1051  # Pass precious variables to config.status.  It doesn't matter if
1052  # we pass some twice (in addition to the command line arguments).
1053  if test "$ac_new_set" = set; then
1054    case $ac_new_val in
1055    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1056      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1057      ac_configure_args="$ac_configure_args '$ac_arg'"
1058      ;;
1059    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1060       ;;
1061    esac
1062  fi
1063done
1064if $ac_cache_corrupted; then
1065  { echo "$as_me:1065: error: changes in the environment can compromise the build" >&5
1066echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1067  { { echo "$as_me:1067: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1068echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1069   { (exit 1); exit 1; }; }
1070fi
1071
1072ac_ext=c
1073ac_cpp='$CPP $CPPFLAGS'
1074ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1075ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1076ac_compiler_gnu=$ac_cv_c_compiler_gnu
1077ac_main_return=return
1078
1079case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1080  *c*,-n*) ECHO_N= ECHO_C=	# newlines do not sed ;-) only broken shells would use this case anyway
1081		   ECHO_T='	' ;;
1082  *c*,*  ) ECHO_N=-n ECHO_C= ECHO_T= ;;
1083  *)      ECHO_N= ECHO_C='\c' ECHO_T= ;;
1084esac
1085echo "#! $SHELL" >conftest.sh
1086echo  "exit 0"   >>conftest.sh
1087chmod +x conftest.sh
1088if { (echo "$as_me:1088: PATH=\".;.\"; conftest.sh") >&5
1089  (PATH=".;."; conftest.sh) 2>&5
1090  ac_status=$?
1091  echo "$as_me:1091: \$? = $ac_status" >&5
1092  (exit $ac_status); }; then
1093  ac_path_separator=';'
1094else
1095  ac_path_separator=:
1096fi
1097PATH_SEPARATOR="$ac_path_separator"
1098rm -f conftest.sh
1099
1100ac_config_headers="$ac_config_headers include/autoconf.h:include/autoconf.hin"
1101
1102PACKAGE=tin
1103VERSION=2.4.5
1104
1105cat >>confdefs.h <<EOF
1106#define PACKAGE "$PACKAGE"
1107EOF
1108
1109cat >>confdefs.h <<EOF
1110#define VERSION "$VERSION"
1111EOF
1112
1113EXTRAO_DEP='#'
1114
1115ac_aux_dir=
1116for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1117  if test -f $ac_dir/install-sh; then
1118    ac_aux_dir=$ac_dir
1119    ac_install_sh="$ac_aux_dir/install-sh -c"
1120    break
1121  elif test -f $ac_dir/install.sh; then
1122    ac_aux_dir=$ac_dir
1123    ac_install_sh="$ac_aux_dir/install.sh -c"
1124    break
1125  elif test -f $ac_dir/shtool; then
1126    ac_aux_dir=$ac_dir
1127    ac_install_sh="$ac_aux_dir/shtool install -c"
1128    break
1129  fi
1130done
1131if test -z "$ac_aux_dir"; then
1132  { { echo "$as_me:1132: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1133echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1134   { (exit 1); exit 1; }; }
1135fi
1136ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1137ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1138ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1139
1140# Make sure we can run config.sub.
1141$ac_config_sub sun4 >/dev/null 2>&1 ||
1142  { { echo "$as_me:1142: error: cannot run $ac_config_sub" >&5
1143echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1144   { (exit 1); exit 1; }; }
1145
1146echo "$as_me:1146: checking build system type" >&5
1147echo $ECHO_N "checking build system type... $ECHO_C" >&6
1148if test "${ac_cv_build+set}" = set; then
1149  echo $ECHO_N "(cached) $ECHO_C" >&6
1150else
1151  ac_cv_build_alias=$build_alias
1152test -z "$ac_cv_build_alias" &&
1153  ac_cv_build_alias=`$ac_config_guess`
1154test -z "$ac_cv_build_alias" &&
1155  { { echo "$as_me:1155: error: cannot guess build type; you must specify one" >&5
1156echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1157   { (exit 1); exit 1; }; }
1158ac_cv_build=`$ac_config_sub $ac_cv_build_alias` ||
1159  { { echo "$as_me:1159: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1160echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1161   { (exit 1); exit 1; }; }
1162
1163fi
1164echo "$as_me:1164: result: $ac_cv_build" >&5
1165echo "${ECHO_T}$ac_cv_build" >&6
1166build=$ac_cv_build
1167build_cpu=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1168build_vendor=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1169build_os=`echo $ac_cv_build | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1170
1171if test -f $srcdir/config.guess || test -f $ac_aux_dir/config.guess ; then
1172	echo "$as_me:1172: checking host system type" >&5
1173echo $ECHO_N "checking host system type... $ECHO_C" >&6
1174if test "${ac_cv_host+set}" = set; then
1175  echo $ECHO_N "(cached) $ECHO_C" >&6
1176else
1177  ac_cv_host_alias=$host_alias
1178test -z "$ac_cv_host_alias" &&
1179  ac_cv_host_alias=$ac_cv_build_alias
1180ac_cv_host=`$ac_config_sub $ac_cv_host_alias` ||
1181  { { echo "$as_me:1181: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1182echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1183   { (exit 1); exit 1; }; }
1184
1185fi
1186echo "$as_me:1186: result: $ac_cv_host" >&5
1187echo "${ECHO_T}$ac_cv_host" >&6
1188host=$ac_cv_host
1189host_cpu=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1190host_vendor=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1191host_os=`echo $ac_cv_host | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1192
1193	system_name="$host_os"
1194else
1195	system_name="`(uname -s -r) 2>/dev/null`"
1196	if test -z "$system_name" ; then
1197		system_name="`(hostname) 2>/dev/null`"
1198	fi
1199fi
1200test -n "$system_name" &&
1201cat >>confdefs.h <<EOF
1202#define SYSTEM_NAME "$system_name"
1203EOF
1204
1205if test "${cf_cv_system_name+set}" = set; then
1206  echo $ECHO_N "(cached) $ECHO_C" >&6
1207else
1208  cf_cv_system_name="$system_name"
1209fi
1210
1211test -z "$system_name" && system_name="$cf_cv_system_name"
1212test -n "$cf_cv_system_name" && echo "$as_me:1212: result: Configuring for $cf_cv_system_name" >&5
1213echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1214
1215if test ".$system_name" != ".$cf_cv_system_name" ; then
1216	echo "$as_me:1216: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1217echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1218	{ { echo "$as_me:1218: error: \"Please remove config.cache and try again.\"" >&5
1219echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1220   { (exit 1); exit 1; }; }
1221fi
1222
1223	echo "$as_me:1223: checking for PATH separator" >&5
1224echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
1225	case $cf_cv_system_name in
1226	os2*)	PATH_SEPARATOR=';'  ;;
1227	*)	${PATH_SEPARATOR:=':'}  ;;
1228	esac
1229
1230	echo "$as_me:1230: result: $PATH_SEPARATOR" >&5
1231echo "${ECHO_T}$PATH_SEPARATOR" >&6
1232
1233# Check whether --with-install-prefix or --without-install-prefix was given.
1234if test "${with_install_prefix+set}" = set; then
1235  withval="$with_install_prefix"
1236
1237else
1238  withval="${DESTDIR:-/}"
1239fi; if true ; then
1240
1241if test "x$prefix" != xNONE; then
1242	cf_path_syntax="$prefix"
1243else
1244	cf_path_syntax="$ac_default_prefix"
1245fi
1246
1247case ".$withval" in
1248.\$\(*\)*|.\'*\'*)
1249	;;
1250..|./*|.\\*)
1251	;;
1252.[a-zA-Z]:[\\/]*) # OS/2 EMX
1253	;;
1254.\${*prefix}*|.\${*dir}*)
1255	eval withval="$withval"
1256	case ".$withval" in
1257	.NONE/*)
1258		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
1259		;;
1260	esac
1261	;;
1262.no|.NONE/*)
1263	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
1264	;;
1265*)
1266	{ { echo "$as_me:1266: error: expected a pathname, not \"$withval\"" >&5
1267echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
1268   { (exit 1); exit 1; }; }
1269	;;
1270esac
1271
1272fi
1273eval DESTDIR="$withval"
1274
1275case ".$DESTDIR" in # (vi
1276./)	DESTDIR=
1277	;; # (vi
1278./*/)	;; # (vi
1279./*)	DESTDIR="$DESTDIR/"
1280	;;
1281esac
1282
1283test "$program_prefix" != NONE &&
1284  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1285# Use a double $ so make ignores it.
1286test "$program_suffix" != NONE &&
1287  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1288# Double any \ or $.  echo might interpret backslashes.
1289# By default was `s,x,x', remove it if useless.
1290cat <<\_ACEOF >conftest.sed
1291s/[\\$]/&&/g;s/;s,x,x,$//
1292_ACEOF
1293program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1294rm conftest.sed
1295
1296###	Compiler/options that autoconf doesn't get right
1297case "$host_os" in
1298	aix*)	#(vi
1299		if test "$CC" = ""; then
1300			# Extract the first word of "xlc", so it can be a program name with args.
1301set dummy xlc; ac_word=$2
1302echo "$as_me:1302: checking for $ac_word" >&5
1303echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1304if test "${ac_cv_path_XLC+set}" = set; then
1305  echo $ECHO_N "(cached) $ECHO_C" >&6
1306else
1307  case $XLC in
1308  [\\/]* | ?:[\\/]*)
1309  ac_cv_path_XLC="$XLC" # Let the user override the test with a path.
1310  ;;
1311  *)
1312  ac_save_IFS=$IFS; IFS=$ac_path_separator
1313ac_dummy="$PATH"
1314for ac_dir in $ac_dummy; do
1315  IFS=$ac_save_IFS
1316  test -z "$ac_dir" && ac_dir=.
1317  if $as_executable_p "$ac_dir/$ac_word"; then
1318   ac_cv_path_XLC="$ac_dir/$ac_word"
1319   echo "$as_me:1319: found $ac_dir/$ac_word" >&5
1320   break
1321fi
1322done
1323
1324  ;;
1325esac
1326fi
1327XLC=$ac_cv_path_XLC
1328
1329if test -n "$XLC"; then
1330  echo "$as_me:1330: result: $XLC" >&5
1331echo "${ECHO_T}$XLC" >&6
1332else
1333  echo "$as_me:1333: result: no" >&5
1334echo "${ECHO_T}no" >&6
1335fi
1336
1337			if test "$ac_cv_path_XLC" != ""; then
1338				CC="$ac_cv_path_XLC"
1339			fi
1340		fi
1341		;;
1342	hpux*)	#(vi
1343		test "$CC" != "cc" && test -z "$CFLAGS" && CFLAGS="-O"
1344		;;
1345esac
1346
1347### Native Language Support
1348ALL_LINGUAS="da de en_GB es et fr ru sv tr zh_CN zh_TW"
1349
1350### Checks for programs
1351save_CFLAGS="$CFLAGS"
1352
1353ac_ext=c
1354ac_cpp='$CPP $CPPFLAGS'
1355ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
1356ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
1357ac_compiler_gnu=$ac_cv_c_compiler_gnu
1358ac_main_return=return
1359if test -n "$ac_tool_prefix"; then
1360  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1361set dummy ${ac_tool_prefix}gcc; ac_word=$2
1362echo "$as_me:1362: checking for $ac_word" >&5
1363echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1364if test "${ac_cv_prog_CC+set}" = set; then
1365  echo $ECHO_N "(cached) $ECHO_C" >&6
1366else
1367  if test -n "$CC"; then
1368  ac_cv_prog_CC="$CC" # Let the user override the test.
1369else
1370  ac_save_IFS=$IFS; IFS=$ac_path_separator
1371ac_dummy="$PATH"
1372for ac_dir in $ac_dummy; do
1373  IFS=$ac_save_IFS
1374  test -z "$ac_dir" && ac_dir=.
1375  $as_executable_p "$ac_dir/$ac_word" || continue
1376ac_cv_prog_CC="${ac_tool_prefix}gcc"
1377echo "$as_me:1377: found $ac_dir/$ac_word" >&5
1378break
1379done
1380
1381fi
1382fi
1383CC=$ac_cv_prog_CC
1384if test -n "$CC"; then
1385  echo "$as_me:1385: result: $CC" >&5
1386echo "${ECHO_T}$CC" >&6
1387else
1388  echo "$as_me:1388: result: no" >&5
1389echo "${ECHO_T}no" >&6
1390fi
1391
1392fi
1393if test -z "$ac_cv_prog_CC"; then
1394  ac_ct_CC=$CC
1395  # Extract the first word of "gcc", so it can be a program name with args.
1396set dummy gcc; ac_word=$2
1397echo "$as_me:1397: checking for $ac_word" >&5
1398echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1399if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1400  echo $ECHO_N "(cached) $ECHO_C" >&6
1401else
1402  if test -n "$ac_ct_CC"; then
1403  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1404else
1405  ac_save_IFS=$IFS; IFS=$ac_path_separator
1406ac_dummy="$PATH"
1407for ac_dir in $ac_dummy; do
1408  IFS=$ac_save_IFS
1409  test -z "$ac_dir" && ac_dir=.
1410  $as_executable_p "$ac_dir/$ac_word" || continue
1411ac_cv_prog_ac_ct_CC="gcc"
1412echo "$as_me:1412: found $ac_dir/$ac_word" >&5
1413break
1414done
1415
1416fi
1417fi
1418ac_ct_CC=$ac_cv_prog_ac_ct_CC
1419if test -n "$ac_ct_CC"; then
1420  echo "$as_me:1420: result: $ac_ct_CC" >&5
1421echo "${ECHO_T}$ac_ct_CC" >&6
1422else
1423  echo "$as_me:1423: result: no" >&5
1424echo "${ECHO_T}no" >&6
1425fi
1426
1427  CC=$ac_ct_CC
1428else
1429  CC="$ac_cv_prog_CC"
1430fi
1431
1432if test -z "$CC"; then
1433  if test -n "$ac_tool_prefix"; then
1434  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1435set dummy ${ac_tool_prefix}cc; 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}cc"
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
1466fi
1467if test -z "$ac_cv_prog_CC"; then
1468  ac_ct_CC=$CC
1469  # Extract the first word of "cc", so it can be a program name with args.
1470set dummy cc; ac_word=$2
1471echo "$as_me:1471: checking for $ac_word" >&5
1472echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1473if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1474  echo $ECHO_N "(cached) $ECHO_C" >&6
1475else
1476  if test -n "$ac_ct_CC"; then
1477  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1478else
1479  ac_save_IFS=$IFS; IFS=$ac_path_separator
1480ac_dummy="$PATH"
1481for ac_dir in $ac_dummy; do
1482  IFS=$ac_save_IFS
1483  test -z "$ac_dir" && ac_dir=.
1484  $as_executable_p "$ac_dir/$ac_word" || continue
1485ac_cv_prog_ac_ct_CC="cc"
1486echo "$as_me:1486: found $ac_dir/$ac_word" >&5
1487break
1488done
1489
1490fi
1491fi
1492ac_ct_CC=$ac_cv_prog_ac_ct_CC
1493if test -n "$ac_ct_CC"; then
1494  echo "$as_me:1494: result: $ac_ct_CC" >&5
1495echo "${ECHO_T}$ac_ct_CC" >&6
1496else
1497  echo "$as_me:1497: result: no" >&5
1498echo "${ECHO_T}no" >&6
1499fi
1500
1501  CC=$ac_ct_CC
1502else
1503  CC="$ac_cv_prog_CC"
1504fi
1505
1506fi
1507if test -z "$CC"; then
1508  # Extract the first word of "cc", so it can be a program name with args.
1509set dummy cc; ac_word=$2
1510echo "$as_me:1510: checking for $ac_word" >&5
1511echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1512if test "${ac_cv_prog_CC+set}" = set; then
1513  echo $ECHO_N "(cached) $ECHO_C" >&6
1514else
1515  if test -n "$CC"; then
1516  ac_cv_prog_CC="$CC" # Let the user override the test.
1517else
1518  ac_prog_rejected=no
1519  ac_save_IFS=$IFS; IFS=$ac_path_separator
1520ac_dummy="$PATH"
1521for ac_dir in $ac_dummy; do
1522  IFS=$ac_save_IFS
1523  test -z "$ac_dir" && ac_dir=.
1524  $as_executable_p "$ac_dir/$ac_word" || continue
1525if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1526  ac_prog_rejected=yes
1527  continue
1528fi
1529ac_cv_prog_CC="cc"
1530echo "$as_me:1530: found $ac_dir/$ac_word" >&5
1531break
1532done
1533
1534if test $ac_prog_rejected = yes; then
1535  # We found a bogon in the path, so make sure we never use it.
1536  set dummy $ac_cv_prog_CC
1537  shift
1538  if test $# != 0; then
1539    # We chose a different compiler from the bogus one.
1540    # However, it has the same basename, so the bogon will be chosen
1541    # first if we set CC to just the basename; use the full file name.
1542    shift
1543    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1544    shift
1545    ac_cv_prog_CC="$@"
1546  fi
1547fi
1548fi
1549fi
1550CC=$ac_cv_prog_CC
1551if test -n "$CC"; then
1552  echo "$as_me:1552: result: $CC" >&5
1553echo "${ECHO_T}$CC" >&6
1554else
1555  echo "$as_me:1555: result: no" >&5
1556echo "${ECHO_T}no" >&6
1557fi
1558
1559fi
1560if test -z "$CC"; then
1561  if test -n "$ac_tool_prefix"; then
1562  for ac_prog in cl
1563  do
1564    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1565set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1566echo "$as_me:1566: checking for $ac_word" >&5
1567echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1568if test "${ac_cv_prog_CC+set}" = set; then
1569  echo $ECHO_N "(cached) $ECHO_C" >&6
1570else
1571  if test -n "$CC"; then
1572  ac_cv_prog_CC="$CC" # Let the user override the test.
1573else
1574  ac_save_IFS=$IFS; IFS=$ac_path_separator
1575ac_dummy="$PATH"
1576for ac_dir in $ac_dummy; do
1577  IFS=$ac_save_IFS
1578  test -z "$ac_dir" && ac_dir=.
1579  $as_executable_p "$ac_dir/$ac_word" || continue
1580ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1581echo "$as_me:1581: found $ac_dir/$ac_word" >&5
1582break
1583done
1584
1585fi
1586fi
1587CC=$ac_cv_prog_CC
1588if test -n "$CC"; then
1589  echo "$as_me:1589: result: $CC" >&5
1590echo "${ECHO_T}$CC" >&6
1591else
1592  echo "$as_me:1592: result: no" >&5
1593echo "${ECHO_T}no" >&6
1594fi
1595
1596    test -n "$CC" && break
1597  done
1598fi
1599if test -z "$CC"; then
1600  ac_ct_CC=$CC
1601  for ac_prog in cl
1602do
1603  # Extract the first word of "$ac_prog", so it can be a program name with args.
1604set dummy $ac_prog; ac_word=$2
1605echo "$as_me:1605: checking for $ac_word" >&5
1606echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1607if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1608  echo $ECHO_N "(cached) $ECHO_C" >&6
1609else
1610  if test -n "$ac_ct_CC"; then
1611  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1612else
1613  ac_save_IFS=$IFS; IFS=$ac_path_separator
1614ac_dummy="$PATH"
1615for ac_dir in $ac_dummy; do
1616  IFS=$ac_save_IFS
1617  test -z "$ac_dir" && ac_dir=.
1618  $as_executable_p "$ac_dir/$ac_word" || continue
1619ac_cv_prog_ac_ct_CC="$ac_prog"
1620echo "$as_me:1620: found $ac_dir/$ac_word" >&5
1621break
1622done
1623
1624fi
1625fi
1626ac_ct_CC=$ac_cv_prog_ac_ct_CC
1627if test -n "$ac_ct_CC"; then
1628  echo "$as_me:1628: result: $ac_ct_CC" >&5
1629echo "${ECHO_T}$ac_ct_CC" >&6
1630else
1631  echo "$as_me:1631: result: no" >&5
1632echo "${ECHO_T}no" >&6
1633fi
1634
1635  test -n "$ac_ct_CC" && break
1636done
1637
1638  CC=$ac_ct_CC
1639fi
1640
1641fi
1642
1643test -z "$CC" && { { echo "$as_me:1643: error: no acceptable cc found in \$PATH" >&5
1644echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1645   { (exit 1); exit 1; }; }
1646
1647# Provide some information about the compiler.
1648echo "$as_me:1648:" \
1649     "checking for C compiler version" >&5
1650ac_compiler=`set X $ac_compile; echo $2`
1651{ (eval echo "$as_me:1651: \"$ac_compiler --version </dev/null >&5\"") >&5
1652  (eval $ac_compiler --version </dev/null >&5) 2>&5
1653  ac_status=$?
1654  echo "$as_me:1654: \$? = $ac_status" >&5
1655  (exit $ac_status); }
1656{ (eval echo "$as_me:1656: \"$ac_compiler -v </dev/null >&5\"") >&5
1657  (eval $ac_compiler -v </dev/null >&5) 2>&5
1658  ac_status=$?
1659  echo "$as_me:1659: \$? = $ac_status" >&5
1660  (exit $ac_status); }
1661{ (eval echo "$as_me:1661: \"$ac_compiler -V </dev/null >&5\"") >&5
1662  (eval $ac_compiler -V </dev/null >&5) 2>&5
1663  ac_status=$?
1664  echo "$as_me:1664: \$? = $ac_status" >&5
1665  (exit $ac_status); }
1666
1667cat >conftest.$ac_ext <<_ACEOF
1668#line 1668 "configure"
1669#include "confdefs.h"
1670
1671int
1672main (void)
1673{
1674
1675  ;
1676  return 0;
1677}
1678_ACEOF
1679ac_clean_files_save=$ac_clean_files
1680ac_clean_files="$ac_clean_files a.out a.exe"
1681# Try to create an executable without -o first, disregard a.out.
1682# It will help us diagnose broken compilers, and finding out an intuition
1683# of exeext.
1684echo "$as_me:1684: checking for C compiler default output" >&5
1685echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1686ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
1687if { (eval echo "$as_me:1687: \"$ac_link_default\"") >&5
1688  (eval $ac_link_default) 2>&5
1689  ac_status=$?
1690  echo "$as_me:1690: \$? = $ac_status" >&5
1691  (exit $ac_status); }; then
1692  # Find the output, starting from the most likely.  This scheme is
1693# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1694# resort.
1695for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1696                ls a.out conftest 2>/dev/null;
1697                ls a.* conftest.* 2>/dev/null`; do
1698  case $ac_file in
1699    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1700    a.out ) # We found the default executable, but exeext='' is most
1701            # certainly right.
1702            break;;
1703    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1704          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1705          export ac_cv_exeext
1706          break;;
1707    * ) break;;
1708  esac
1709done
1710else
1711  echo "$as_me: failed program was:" >&5
1712cat conftest.$ac_ext >&5
1713{ { echo "$as_me:1713: error: C compiler cannot create executables" >&5
1714echo "$as_me: error: C compiler cannot create executables" >&2;}
1715   { (exit 77); exit 77; }; }
1716fi
1717
1718ac_exeext=$ac_cv_exeext
1719echo "$as_me:1719: result: $ac_file" >&5
1720echo "${ECHO_T}$ac_file" >&6
1721
1722# Check the compiler produces executables we can run.  If not, either
1723# the compiler is broken, or we cross compile.
1724echo "$as_me:1724: checking whether the C compiler works" >&5
1725echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1726# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1727# If not cross compiling, check that we can run a simple program.
1728if test "$cross_compiling" != yes; then
1729  if { ac_try='./$ac_file'
1730  { (eval echo "$as_me:1730: \"$ac_try\"") >&5
1731  (eval $ac_try) 2>&5
1732  ac_status=$?
1733  echo "$as_me:1733: \$? = $ac_status" >&5
1734  (exit $ac_status); }; }; then
1735    cross_compiling=no
1736  else
1737    if test "$cross_compiling" = maybe; then
1738	cross_compiling=yes
1739    else
1740	{ { echo "$as_me:1740: error: cannot run C compiled programs.
1741If you meant to cross compile, use \`--host'." >&5
1742echo "$as_me: error: cannot run C compiled programs.
1743If you meant to cross compile, use \`--host'." >&2;}
1744   { (exit 1); exit 1; }; }
1745    fi
1746  fi
1747fi
1748echo "$as_me:1748: result: yes" >&5
1749echo "${ECHO_T}yes" >&6
1750
1751rm -f a.out a.exe conftest$ac_cv_exeext
1752ac_clean_files=$ac_clean_files_save
1753# Check the compiler produces executables we can run.  If not, either
1754# the compiler is broken, or we cross compile.
1755echo "$as_me:1755: checking whether we are cross compiling" >&5
1756echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1757echo "$as_me:1757: result: $cross_compiling" >&5
1758echo "${ECHO_T}$cross_compiling" >&6
1759
1760echo "$as_me:1760: checking for executable suffix" >&5
1761echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1762if { (eval echo "$as_me:1762: \"$ac_link\"") >&5
1763  (eval $ac_link) 2>&5
1764  ac_status=$?
1765  echo "$as_me:1765: \$? = $ac_status" >&5
1766  (exit $ac_status); }; then
1767  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1768# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1769# work properly (i.e., refer to `conftest.exe'), while it won't with
1770# `rm'.
1771for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1772  case $ac_file in
1773    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1774    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1775          export ac_cv_exeext
1776          break;;
1777    * ) break;;
1778  esac
1779done
1780else
1781  { { echo "$as_me:1781: error: cannot compute EXEEXT: cannot compile and link" >&5
1782echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1783   { (exit 1); exit 1; }; }
1784fi
1785
1786rm -f conftest$ac_cv_exeext
1787echo "$as_me:1787: result: $ac_cv_exeext" >&5
1788echo "${ECHO_T}$ac_cv_exeext" >&6
1789
1790rm -f conftest.$ac_ext
1791EXEEXT=$ac_cv_exeext
1792ac_exeext=$EXEEXT
1793echo "$as_me:1793: checking for object suffix" >&5
1794echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1795if test "${ac_cv_objext+set}" = set; then
1796  echo $ECHO_N "(cached) $ECHO_C" >&6
1797else
1798  cat >conftest.$ac_ext <<_ACEOF
1799#line 1799 "configure"
1800#include "confdefs.h"
1801
1802int
1803main (void)
1804{
1805
1806  ;
1807  return 0;
1808}
1809_ACEOF
1810rm -f conftest.o conftest.obj
1811if { (eval echo "$as_me:1811: \"$ac_compile\"") >&5
1812  (eval $ac_compile) 2>&5
1813  ac_status=$?
1814  echo "$as_me:1814: \$? = $ac_status" >&5
1815  (exit $ac_status); }; then
1816  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1817  case $ac_file in
1818    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1819    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1820       break;;
1821  esac
1822done
1823else
1824  echo "$as_me: failed program was:" >&5
1825cat conftest.$ac_ext >&5
1826{ { echo "$as_me:1826: error: cannot compute OBJEXT: cannot compile" >&5
1827echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1828   { (exit 1); exit 1; }; }
1829fi
1830
1831rm -f conftest.$ac_cv_objext conftest.$ac_ext
1832fi
1833echo "$as_me:1833: result: $ac_cv_objext" >&5
1834echo "${ECHO_T}$ac_cv_objext" >&6
1835OBJEXT=$ac_cv_objext
1836ac_objext=$OBJEXT
1837echo "$as_me:1837: checking whether we are using the GNU C compiler" >&5
1838echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1839if test "${ac_cv_c_compiler_gnu+set}" = set; then
1840  echo $ECHO_N "(cached) $ECHO_C" >&6
1841else
1842  cat >conftest.$ac_ext <<_ACEOF
1843#line 1843 "configure"
1844#include "confdefs.h"
1845
1846int
1847main (void)
1848{
1849#ifndef __GNUC__
1850       choke me
1851#endif
1852
1853  ;
1854  return 0;
1855}
1856_ACEOF
1857rm -f conftest.$ac_objext
1858if { (eval echo "$as_me:1858: \"$ac_compile\"") >&5
1859  (eval $ac_compile) 2>&5
1860  ac_status=$?
1861  echo "$as_me:1861: \$? = $ac_status" >&5
1862  (exit $ac_status); } &&
1863         { ac_try='test -s conftest.$ac_objext'
1864  { (eval echo "$as_me:1864: \"$ac_try\"") >&5
1865  (eval $ac_try) 2>&5
1866  ac_status=$?
1867  echo "$as_me:1867: \$? = $ac_status" >&5
1868  (exit $ac_status); }; }; then
1869  ac_compiler_gnu=yes
1870else
1871  echo "$as_me: failed program was:" >&5
1872cat conftest.$ac_ext >&5
1873ac_compiler_gnu=no
1874fi
1875rm -f conftest.$ac_objext conftest.$ac_ext
1876ac_cv_c_compiler_gnu=$ac_compiler_gnu
1877
1878fi
1879echo "$as_me:1879: result: $ac_cv_c_compiler_gnu" >&5
1880echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1881GCC=`test $ac_compiler_gnu = yes && echo yes`
1882ac_test_CFLAGS=${CFLAGS+set}
1883ac_save_CFLAGS=$CFLAGS
1884CFLAGS="-g"
1885echo "$as_me:1885: checking whether $CC accepts -g" >&5
1886echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1887if test "${ac_cv_prog_cc_g+set}" = set; then
1888  echo $ECHO_N "(cached) $ECHO_C" >&6
1889else
1890  cat >conftest.$ac_ext <<_ACEOF
1891#line 1891 "configure"
1892#include "confdefs.h"
1893
1894int
1895main (void)
1896{
1897
1898  ;
1899  return 0;
1900}
1901_ACEOF
1902rm -f conftest.$ac_objext
1903if { (eval echo "$as_me:1903: \"$ac_compile\"") >&5
1904  (eval $ac_compile) 2>&5
1905  ac_status=$?
1906  echo "$as_me:1906: \$? = $ac_status" >&5
1907  (exit $ac_status); } &&
1908         { ac_try='test -s conftest.$ac_objext'
1909  { (eval echo "$as_me:1909: \"$ac_try\"") >&5
1910  (eval $ac_try) 2>&5
1911  ac_status=$?
1912  echo "$as_me:1912: \$? = $ac_status" >&5
1913  (exit $ac_status); }; }; then
1914  ac_cv_prog_cc_g=yes
1915else
1916  echo "$as_me: failed program was:" >&5
1917cat conftest.$ac_ext >&5
1918ac_cv_prog_cc_g=no
1919fi
1920rm -f conftest.$ac_objext conftest.$ac_ext
1921fi
1922echo "$as_me:1922: result: $ac_cv_prog_cc_g" >&5
1923echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1924if test "$ac_test_CFLAGS" = set; then
1925  CFLAGS=$ac_save_CFLAGS
1926elif test $ac_cv_prog_cc_g = yes; then
1927  if test "$GCC" = yes; then
1928    CFLAGS="-g -O2"
1929  else
1930    CFLAGS="-g"
1931  fi
1932else
1933  if test "$GCC" = yes; then
1934    CFLAGS="-O2"
1935  else
1936    CFLAGS=
1937  fi
1938fi
1939# Some people use a C++ compiler to compile C.  Since we use `exit',
1940# in C++ we need to declare it.  In case someone uses the same compiler
1941# for both compiling C and C++ we need to have the C++ compiler decide
1942# the declaration of exit, since it's the most demanding environment.
1943cat >conftest.$ac_ext <<_ACEOF
1944#ifndef __cplusplus
1945  choke me
1946#endif
1947_ACEOF
1948rm -f conftest.$ac_objext
1949if { (eval echo "$as_me:1949: \"$ac_compile\"") >&5
1950  (eval $ac_compile) 2>&5
1951  ac_status=$?
1952  echo "$as_me:1952: \$? = $ac_status" >&5
1953  (exit $ac_status); } &&
1954         { ac_try='test -s conftest.$ac_objext'
1955  { (eval echo "$as_me:1955: \"$ac_try\"") >&5
1956  (eval $ac_try) 2>&5
1957  ac_status=$?
1958  echo "$as_me:1958: \$? = $ac_status" >&5
1959  (exit $ac_status); }; }; then
1960  for ac_declaration in \
1961   ''\
1962   '#include <stdlib.h>' \
1963   'extern "C" void std::exit (int) throw (); using std::exit;' \
1964   'extern "C" void std::exit (int); using std::exit;' \
1965   'extern "C" void exit (int) throw ();' \
1966   'extern "C" void exit (int);' \
1967   'void exit (int);'
1968do
1969  cat >conftest.$ac_ext <<_ACEOF
1970#line 1970 "configure"
1971#include "confdefs.h"
1972#include <stdlib.h>
1973$ac_declaration
1974int
1975main (void)
1976{
1977exit (42);
1978  ;
1979  return 0;
1980}
1981_ACEOF
1982rm -f conftest.$ac_objext
1983if { (eval echo "$as_me:1983: \"$ac_compile\"") >&5
1984  (eval $ac_compile) 2>&5
1985  ac_status=$?
1986  echo "$as_me:1986: \$? = $ac_status" >&5
1987  (exit $ac_status); } &&
1988         { ac_try='test -s conftest.$ac_objext'
1989  { (eval echo "$as_me:1989: \"$ac_try\"") >&5
1990  (eval $ac_try) 2>&5
1991  ac_status=$?
1992  echo "$as_me:1992: \$? = $ac_status" >&5
1993  (exit $ac_status); }; }; then
1994  :
1995else
1996  echo "$as_me: failed program was:" >&5
1997cat conftest.$ac_ext >&5
1998continue
1999fi
2000rm -f conftest.$ac_objext conftest.$ac_ext
2001  cat >conftest.$ac_ext <<_ACEOF
2002#line 2002 "configure"
2003#include "confdefs.h"
2004$ac_declaration
2005int
2006main (void)
2007{
2008exit (42);
2009  ;
2010  return 0;
2011}
2012_ACEOF
2013rm -f conftest.$ac_objext
2014if { (eval echo "$as_me:2014: \"$ac_compile\"") >&5
2015  (eval $ac_compile) 2>&5
2016  ac_status=$?
2017  echo "$as_me:2017: \$? = $ac_status" >&5
2018  (exit $ac_status); } &&
2019         { ac_try='test -s conftest.$ac_objext'
2020  { (eval echo "$as_me:2020: \"$ac_try\"") >&5
2021  (eval $ac_try) 2>&5
2022  ac_status=$?
2023  echo "$as_me:2023: \$? = $ac_status" >&5
2024  (exit $ac_status); }; }; then
2025  break
2026else
2027  echo "$as_me: failed program was:" >&5
2028cat conftest.$ac_ext >&5
2029fi
2030rm -f conftest.$ac_objext conftest.$ac_ext
2031done
2032rm -rf conftest*
2033if test -n "$ac_declaration"; then
2034  echo '#ifdef __cplusplus' >>confdefs.h
2035  echo $ac_declaration      >>confdefs.h
2036  echo '#endif'             >>confdefs.h
2037fi
2038
2039else
2040  echo "$as_me: failed program was:" >&5
2041cat conftest.$ac_ext >&5
2042fi
2043rm -f conftest.$ac_objext conftest.$ac_ext
2044ac_ext=c
2045ac_cpp='$CPP $CPPFLAGS'
2046ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2047ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2048ac_compiler_gnu=$ac_cv_c_compiler_gnu
2049ac_main_return=return
2050
2051GCC_VERSION=none
2052if test "$GCC" = yes ; then
2053	echo "$as_me:2053: checking version of $CC" >&5
2054echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2055	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.].*//'`"
2056	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2057	echo "$as_me:2057: result: $GCC_VERSION" >&5
2058echo "${ECHO_T}$GCC_VERSION" >&6
2059fi
2060
2061INTEL_COMPILER=no
2062
2063if test "$GCC" = yes ; then
2064	case $host_os in
2065	linux*|gnu*)
2066		echo "$as_me:2066: checking if this is really Intel C compiler" >&5
2067echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2068		cf_save_CFLAGS="$CFLAGS"
2069		CFLAGS="$CFLAGS -no-gcc"
2070		cat >conftest.$ac_ext <<_ACEOF
2071#line 2071 "configure"
2072#include "confdefs.h"
2073
2074int
2075main (void)
2076{
2077
2078#ifdef __INTEL_COMPILER
2079#else
2080make an error
2081#endif
2082
2083  ;
2084  return 0;
2085}
2086_ACEOF
2087rm -f conftest.$ac_objext
2088if { (eval echo "$as_me:2088: \"$ac_compile\"") >&5
2089  (eval $ac_compile) 2>&5
2090  ac_status=$?
2091  echo "$as_me:2091: \$? = $ac_status" >&5
2092  (exit $ac_status); } &&
2093         { ac_try='test -s conftest.$ac_objext'
2094  { (eval echo "$as_me:2094: \"$ac_try\"") >&5
2095  (eval $ac_try) 2>&5
2096  ac_status=$?
2097  echo "$as_me:2097: \$? = $ac_status" >&5
2098  (exit $ac_status); }; }; then
2099  INTEL_COMPILER=yes
2100cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2101
2102else
2103  echo "$as_me: failed program was:" >&5
2104cat conftest.$ac_ext >&5
2105fi
2106rm -f conftest.$ac_objext conftest.$ac_ext
2107		CFLAGS="$cf_save_CFLAGS"
2108		echo "$as_me:2108: result: $INTEL_COMPILER" >&5
2109echo "${ECHO_T}$INTEL_COMPILER" >&6
2110		;;
2111	esac
2112fi
2113
2114CLANG_COMPILER=no
2115
2116if test "$GCC" = yes ; then
2117	echo "$as_me:2117: checking if this is really Clang C compiler" >&5
2118echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2119	cf_save_CFLAGS="$CFLAGS"
2120	cat >conftest.$ac_ext <<_ACEOF
2121#line 2121 "configure"
2122#include "confdefs.h"
2123
2124int
2125main (void)
2126{
2127
2128#ifdef __clang__
2129#else
2130make an error
2131#endif
2132
2133  ;
2134  return 0;
2135}
2136_ACEOF
2137rm -f conftest.$ac_objext
2138if { (eval echo "$as_me:2138: \"$ac_compile\"") >&5
2139  (eval $ac_compile) 2>&5
2140  ac_status=$?
2141  echo "$as_me:2141: \$? = $ac_status" >&5
2142  (exit $ac_status); } &&
2143         { ac_try='test -s conftest.$ac_objext'
2144  { (eval echo "$as_me:2144: \"$ac_try\"") >&5
2145  (eval $ac_try) 2>&5
2146  ac_status=$?
2147  echo "$as_me:2147: \$? = $ac_status" >&5
2148  (exit $ac_status); }; }; then
2149  CLANG_COMPILER=yes
2150
2151else
2152  echo "$as_me: failed program was:" >&5
2153cat conftest.$ac_ext >&5
2154fi
2155rm -f conftest.$ac_objext conftest.$ac_ext
2156	CFLAGS="$cf_save_CFLAGS"
2157	echo "$as_me:2157: result: $CLANG_COMPILER" >&5
2158echo "${ECHO_T}$CLANG_COMPILER" >&6
2159fi
2160
2161CLANG_VERSION=none
2162
2163if test "x$CLANG_COMPILER" = "xyes" ; then
2164	case "$CC" in
2165	c[1-9][0-9]|*/c[1-9][0-9])
2166		{ echo "$as_me:2166: WARNING: replacing broken compiler alias $CC" >&5
2167echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2168		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2169		CC=clang
2170		;;
2171	esac
2172
2173	echo "$as_me:2173: checking version of $CC" >&5
2174echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2175	CLANG_VERSION="`$CC --version 2>/dev/null | sed -e '2,$d' -e 's/^.*(CLANG[^)]*) //' -e 's/^.*(Debian[^)]*) //' -e 's/^[^0-9.]*//' -e 's/[^0-9.].*//'`"
2176	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2177	echo "$as_me:2177: result: $CLANG_VERSION" >&5
2178echo "${ECHO_T}$CLANG_VERSION" >&6
2179
2180	for cf_clang_opt in \
2181		-Qunused-arguments \
2182		-Wno-error=implicit-function-declaration
2183	do
2184		echo "$as_me:2184: checking if option $cf_clang_opt works" >&5
2185echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2186		cf_save_CFLAGS="$CFLAGS"
2187		CFLAGS="$CFLAGS $cf_clang_opt"
2188		cat >conftest.$ac_ext <<_ACEOF
2189#line 2189 "configure"
2190#include "confdefs.h"
2191
2192			#include <stdio.h>
2193int
2194main (void)
2195{
2196
2197			printf("hello!\n");
2198  ;
2199  return 0;
2200}
2201_ACEOF
2202rm -f conftest.$ac_objext conftest$ac_exeext
2203if { (eval echo "$as_me:2203: \"$ac_link\"") >&5
2204  (eval $ac_link) 2>&5
2205  ac_status=$?
2206  echo "$as_me:2206: \$? = $ac_status" >&5
2207  (exit $ac_status); } &&
2208         { ac_try='test -s conftest$ac_exeext'
2209  { (eval echo "$as_me:2209: \"$ac_try\"") >&5
2210  (eval $ac_try) 2>&5
2211  ac_status=$?
2212  echo "$as_me:2212: \$? = $ac_status" >&5
2213  (exit $ac_status); }; }; then
2214
2215			cf_clang_optok=yes
2216else
2217  echo "$as_me: failed program was:" >&5
2218cat conftest.$ac_ext >&5
2219
2220			cf_clang_optok=no
2221fi
2222rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
2223		echo "$as_me:2223: result: $cf_clang_optok" >&5
2224echo "${ECHO_T}$cf_clang_optok" >&6
2225		CFLAGS="$cf_save_CFLAGS"
2226		if test $cf_clang_optok = yes; then
2227			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2228
2229echo "${as_me:-configure}:2229: testing adding option $cf_clang_opt ..." 1>&5
2230
2231	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2232	CFLAGS="${CFLAGS}$cf_clang_opt"
2233
2234		fi
2235	done
2236fi
2237
2238echo "$as_me:2238: checking for $CC option to accept ANSI C" >&5
2239echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2240if test "${ac_cv_prog_cc_stdc+set}" = set; then
2241  echo $ECHO_N "(cached) $ECHO_C" >&6
2242else
2243  ac_cv_prog_cc_stdc=no
2244ac_save_CC=$CC
2245cat >conftest.$ac_ext <<_ACEOF
2246#line 2246 "configure"
2247#include "confdefs.h"
2248#include <stdarg.h>
2249#include <stdio.h>
2250#include <sys/types.h>
2251#include <sys/stat.h>
2252/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2253struct buf { int x; };
2254FILE * (*rcsopen) (struct buf *, struct stat *, int);
2255static char *e (p, i)
2256     char **p;
2257     int i;
2258{
2259  return p[i];
2260}
2261static char *f (char * (*g) (char **, int), char **p, ...)
2262{
2263  char *s;
2264  va_list v;
2265  va_start (v,p);
2266  s = g (p, va_arg (v,int));
2267  va_end (v);
2268  return s;
2269}
2270int test (int i, double x);
2271struct s1 {int (*f) (int a);};
2272struct s2 {int (*f) (double a);};
2273int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2274int argc;
2275char **argv;
2276int
2277main (void)
2278{
2279return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2280  ;
2281  return 0;
2282}
2283_ACEOF
2284# Don't try gcc -ansi; that turns off useful extensions and
2285# breaks some systems' header files.
2286# AIX			-qlanglvl=ansi
2287# Ultrix and OSF/1	-std1
2288# HP-UX 10.20 and later	-Ae
2289# HP-UX older versions	-Aa -D_HPUX_SOURCE
2290# SVR4			-Xc -D__EXTENSIONS__
2291for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2292do
2293  CC="$ac_save_CC $ac_arg"
2294  rm -f conftest.$ac_objext
2295if { (eval echo "$as_me:2295: \"$ac_compile\"") >&5
2296  (eval $ac_compile) 2>&5
2297  ac_status=$?
2298  echo "$as_me:2298: \$? = $ac_status" >&5
2299  (exit $ac_status); } &&
2300         { ac_try='test -s conftest.$ac_objext'
2301  { (eval echo "$as_me:2301: \"$ac_try\"") >&5
2302  (eval $ac_try) 2>&5
2303  ac_status=$?
2304  echo "$as_me:2304: \$? = $ac_status" >&5
2305  (exit $ac_status); }; }; then
2306  ac_cv_prog_cc_stdc=$ac_arg
2307break
2308else
2309  echo "$as_me: failed program was:" >&5
2310cat conftest.$ac_ext >&5
2311fi
2312rm -f conftest.$ac_objext
2313done
2314rm -f conftest.$ac_ext conftest.$ac_objext
2315CC=$ac_save_CC
2316
2317fi
2318
2319case "x$ac_cv_prog_cc_stdc" in
2320  x|xno)
2321    echo "$as_me:2321: result: none needed" >&5
2322echo "${ECHO_T}none needed" >&6 ;;
2323  *)
2324    echo "$as_me:2324: result: $ac_cv_prog_cc_stdc" >&5
2325echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2326    CC="$CC $ac_cv_prog_cc_stdc" ;;
2327esac
2328
2329# This should have been defined by AC_PROG_CC
2330: ${CC:=cc}
2331
2332echo "$as_me:2332: checking \$CFLAGS variable" >&5
2333echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2334case "x$CFLAGS" in
2335*-[IUD]*)
2336	echo "$as_me:2336: result: broken" >&5
2337echo "${ECHO_T}broken" >&6
2338	{ echo "$as_me:2338: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2339echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2340	cf_flags="$CFLAGS"
2341	CFLAGS=
2342	for cf_arg in $cf_flags
2343	do
2344
2345cf_fix_cppflags=no
2346cf_new_cflags=
2347cf_new_cppflags=
2348cf_new_extra_cppflags=
2349
2350for cf_add_cflags in $cf_arg
2351do
2352case $cf_fix_cppflags in
2353no)
2354	case $cf_add_cflags in
2355	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2356		case $cf_add_cflags in
2357		-D*)
2358			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2359
2360			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2361				&& test -z "${cf_tst_cflags}" \
2362				&& cf_fix_cppflags=yes
2363
2364			if test $cf_fix_cppflags = yes ; then
2365
2366	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2367	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2368
2369				continue
2370			elif test "${cf_tst_cflags}" = "\"'" ; then
2371
2372	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2373	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2374
2375				continue
2376			fi
2377			;;
2378		esac
2379		case "$CPPFLAGS" in
2380		*$cf_add_cflags)
2381			;;
2382		*)
2383			case $cf_add_cflags in
2384			-D*)
2385				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2386
2387CPPFLAGS=`echo "$CPPFLAGS" | \
2388	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2389		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2390
2391				;;
2392			esac
2393
2394	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2395	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2396
2397			;;
2398		esac
2399		;;
2400	*)
2401
2402	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2403	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2404
2405		;;
2406	esac
2407	;;
2408yes)
2409
2410	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2411	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2412
2413	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2414
2415	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2416		&& test -z "${cf_tst_cflags}" \
2417		&& cf_fix_cppflags=no
2418	;;
2419esac
2420done
2421
2422if test -n "$cf_new_cflags" ; then
2423
2424	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2425	CFLAGS="${CFLAGS}$cf_new_cflags"
2426
2427fi
2428
2429if test -n "$cf_new_cppflags" ; then
2430
2431	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2432	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2433
2434fi
2435
2436if test -n "$cf_new_extra_cppflags" ; then
2437
2438	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2439	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2440
2441fi
2442
2443	done
2444	;;
2445*)
2446	echo "$as_me:2446: result: ok" >&5
2447echo "${ECHO_T}ok" >&6
2448	;;
2449esac
2450
2451echo "$as_me:2451: checking \$CC variable" >&5
2452echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2453case "$CC" in
2454*[\ \	]-*)
2455	echo "$as_me:2455: result: broken" >&5
2456echo "${ECHO_T}broken" >&6
2457	{ echo "$as_me:2457: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2458echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2459	# humor him...
2460	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2461	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2462	CC="$cf_prog"
2463	for cf_arg in $cf_flags
2464	do
2465		case "x$cf_arg" in
2466		x-[IUDfgOW]*)
2467
2468cf_fix_cppflags=no
2469cf_new_cflags=
2470cf_new_cppflags=
2471cf_new_extra_cppflags=
2472
2473for cf_add_cflags in $cf_arg
2474do
2475case $cf_fix_cppflags in
2476no)
2477	case $cf_add_cflags in
2478	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2479		case $cf_add_cflags in
2480		-D*)
2481			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2482
2483			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2484				&& test -z "${cf_tst_cflags}" \
2485				&& cf_fix_cppflags=yes
2486
2487			if test $cf_fix_cppflags = yes ; then
2488
2489	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2490	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2491
2492				continue
2493			elif test "${cf_tst_cflags}" = "\"'" ; then
2494
2495	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2496	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2497
2498				continue
2499			fi
2500			;;
2501		esac
2502		case "$CPPFLAGS" in
2503		*$cf_add_cflags)
2504			;;
2505		*)
2506			case $cf_add_cflags in
2507			-D*)
2508				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2509
2510CPPFLAGS=`echo "$CPPFLAGS" | \
2511	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2512		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2513
2514				;;
2515			esac
2516
2517	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2518	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2519
2520			;;
2521		esac
2522		;;
2523	*)
2524
2525	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2526	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2527
2528		;;
2529	esac
2530	;;
2531yes)
2532
2533	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2534	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2535
2536	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
2537
2538	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2539		&& test -z "${cf_tst_cflags}" \
2540		&& cf_fix_cppflags=no
2541	;;
2542esac
2543done
2544
2545if test -n "$cf_new_cflags" ; then
2546
2547	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2548	CFLAGS="${CFLAGS}$cf_new_cflags"
2549
2550fi
2551
2552if test -n "$cf_new_cppflags" ; then
2553
2554	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2555	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2556
2557fi
2558
2559if test -n "$cf_new_extra_cppflags" ; then
2560
2561	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2562	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2563
2564fi
2565
2566			;;
2567		*)
2568			CC="$CC $cf_arg"
2569			;;
2570		esac
2571	done
2572	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2573
2574echo "${as_me:-configure}:2574: testing resulting CC: '$CC' ..." 1>&5
2575
2576	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2577
2578echo "${as_me:-configure}:2578: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2579
2580	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2581
2582echo "${as_me:-configure}:2582: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2583
2584	;;
2585*)
2586	echo "$as_me:2586: result: ok" >&5
2587echo "${ECHO_T}ok" >&6
2588	;;
2589esac
2590
2591ac_ext=c
2592ac_cpp='$CPP $CPPFLAGS'
2593ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2594ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2595ac_compiler_gnu=$ac_cv_c_compiler_gnu
2596ac_main_return=return
2597echo "$as_me:2597: checking how to run the C preprocessor" >&5
2598echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2599# On Suns, sometimes $CPP names a directory.
2600if test -n "$CPP" && test -d "$CPP"; then
2601  CPP=
2602fi
2603if test -z "$CPP"; then
2604  if test "${ac_cv_prog_CPP+set}" = set; then
2605  echo $ECHO_N "(cached) $ECHO_C" >&6
2606else
2607      # Double quotes because CPP needs to be expanded
2608    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2609    do
2610      ac_preproc_ok=false
2611for ac_c_preproc_warn_flag in '' yes
2612do
2613  # Use a header file that comes with gcc, so configuring glibc
2614  # with a fresh cross-compiler works.
2615  # On the NeXT, cc -E runs the code through the compiler's parser,
2616  # not just through cpp. "Syntax error" is here to catch this case.
2617  cat >conftest.$ac_ext <<_ACEOF
2618#line 2618 "configure"
2619#include "confdefs.h"
2620#include <assert.h>
2621                     Syntax error
2622_ACEOF
2623if { (eval echo "$as_me:2623: \"$ac_cpp conftest.$ac_ext\"") >&5
2624  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2625  ac_status=$?
2626  egrep -v '^ *\+' conftest.er1 >conftest.err
2627  rm -f conftest.er1
2628  cat conftest.err >&5
2629  echo "$as_me:2629: \$? = $ac_status" >&5
2630  (exit $ac_status); } >/dev/null; then
2631  if test -s conftest.err; then
2632    ac_cpp_err=$ac_c_preproc_warn_flag
2633  else
2634    ac_cpp_err=
2635  fi
2636else
2637  ac_cpp_err=yes
2638fi
2639if test -z "$ac_cpp_err"; then
2640  :
2641else
2642  echo "$as_me: failed program was:" >&5
2643  cat conftest.$ac_ext >&5
2644  # Broken: fails on valid input.
2645continue
2646fi
2647rm -f conftest.err conftest.$ac_ext
2648
2649  # OK, works on sane cases.  Now check whether non-existent headers
2650  # can be detected and how.
2651  cat >conftest.$ac_ext <<_ACEOF
2652#line 2652 "configure"
2653#include "confdefs.h"
2654#include <ac_nonexistent.h>
2655_ACEOF
2656if { (eval echo "$as_me:2656: \"$ac_cpp conftest.$ac_ext\"") >&5
2657  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2658  ac_status=$?
2659  egrep -v '^ *\+' conftest.er1 >conftest.err
2660  rm -f conftest.er1
2661  cat conftest.err >&5
2662  echo "$as_me:2662: \$? = $ac_status" >&5
2663  (exit $ac_status); } >/dev/null; then
2664  if test -s conftest.err; then
2665    ac_cpp_err=$ac_c_preproc_warn_flag
2666  else
2667    ac_cpp_err=
2668  fi
2669else
2670  ac_cpp_err=yes
2671fi
2672if test -z "$ac_cpp_err"; then
2673  # Broken: success on invalid input.
2674continue
2675else
2676  echo "$as_me: failed program was:" >&5
2677  cat conftest.$ac_ext >&5
2678  # Passes both tests.
2679ac_preproc_ok=:
2680break
2681fi
2682rm -f conftest.err conftest.$ac_ext
2683
2684done
2685# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2686rm -f conftest.err conftest.$ac_ext
2687if $ac_preproc_ok; then
2688  break
2689fi
2690
2691    done
2692    ac_cv_prog_CPP=$CPP
2693
2694fi
2695  CPP=$ac_cv_prog_CPP
2696else
2697  ac_cv_prog_CPP=$CPP
2698fi
2699echo "$as_me:2699: result: $CPP" >&5
2700echo "${ECHO_T}$CPP" >&6
2701ac_preproc_ok=false
2702for ac_c_preproc_warn_flag in '' yes
2703do
2704  # Use a header file that comes with gcc, so configuring glibc
2705  # with a fresh cross-compiler works.
2706  # On the NeXT, cc -E runs the code through the compiler's parser,
2707  # not just through cpp. "Syntax error" is here to catch this case.
2708  cat >conftest.$ac_ext <<_ACEOF
2709#line 2709 "configure"
2710#include "confdefs.h"
2711#include <assert.h>
2712                     Syntax error
2713_ACEOF
2714if { (eval echo "$as_me:2714: \"$ac_cpp conftest.$ac_ext\"") >&5
2715  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2716  ac_status=$?
2717  egrep -v '^ *\+' conftest.er1 >conftest.err
2718  rm -f conftest.er1
2719  cat conftest.err >&5
2720  echo "$as_me:2720: \$? = $ac_status" >&5
2721  (exit $ac_status); } >/dev/null; then
2722  if test -s conftest.err; then
2723    ac_cpp_err=$ac_c_preproc_warn_flag
2724  else
2725    ac_cpp_err=
2726  fi
2727else
2728  ac_cpp_err=yes
2729fi
2730if test -z "$ac_cpp_err"; then
2731  :
2732else
2733  echo "$as_me: failed program was:" >&5
2734  cat conftest.$ac_ext >&5
2735  # Broken: fails on valid input.
2736continue
2737fi
2738rm -f conftest.err conftest.$ac_ext
2739
2740  # OK, works on sane cases.  Now check whether non-existent headers
2741  # can be detected and how.
2742  cat >conftest.$ac_ext <<_ACEOF
2743#line 2743 "configure"
2744#include "confdefs.h"
2745#include <ac_nonexistent.h>
2746_ACEOF
2747if { (eval echo "$as_me:2747: \"$ac_cpp conftest.$ac_ext\"") >&5
2748  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
2749  ac_status=$?
2750  egrep -v '^ *\+' conftest.er1 >conftest.err
2751  rm -f conftest.er1
2752  cat conftest.err >&5
2753  echo "$as_me:2753: \$? = $ac_status" >&5
2754  (exit $ac_status); } >/dev/null; then
2755  if test -s conftest.err; then
2756    ac_cpp_err=$ac_c_preproc_warn_flag
2757  else
2758    ac_cpp_err=
2759  fi
2760else
2761  ac_cpp_err=yes
2762fi
2763if test -z "$ac_cpp_err"; then
2764  # Broken: success on invalid input.
2765continue
2766else
2767  echo "$as_me: failed program was:" >&5
2768  cat conftest.$ac_ext >&5
2769  # Passes both tests.
2770ac_preproc_ok=:
2771break
2772fi
2773rm -f conftest.err conftest.$ac_ext
2774
2775done
2776# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2777rm -f conftest.err conftest.$ac_ext
2778if $ac_preproc_ok; then
2779  :
2780else
2781  { { echo "$as_me:2781: error: C preprocessor \"$CPP\" fails sanity check" >&5
2782echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2783   { (exit 1); exit 1; }; }
2784fi
2785
2786ac_ext=c
2787ac_cpp='$CPP $CPPFLAGS'
2788ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
2789ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
2790ac_compiler_gnu=$ac_cv_c_compiler_gnu
2791ac_main_return=return
2792
2793if test $ac_cv_c_compiler_gnu = yes; then
2794    echo "$as_me:2794: checking whether $CC needs -traditional" >&5
2795echo $ECHO_N "checking whether $CC needs -traditional... $ECHO_C" >&6
2796if test "${ac_cv_prog_gcc_traditional+set}" = set; then
2797  echo $ECHO_N "(cached) $ECHO_C" >&6
2798else
2799    ac_pattern="Autoconf.*'x'"
2800  cat >conftest.$ac_ext <<_ACEOF
2801#line 2801 "configure"
2802#include "confdefs.h"
2803#include <sgtty.h>
2804int Autoconf = TIOCGETP;
2805_ACEOF
2806if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2807  egrep "$ac_pattern" >/dev/null 2>&1; then
2808  ac_cv_prog_gcc_traditional=yes
2809else
2810  ac_cv_prog_gcc_traditional=no
2811fi
2812rm -rf conftest*
2813
2814  if test $ac_cv_prog_gcc_traditional = no; then
2815    cat >conftest.$ac_ext <<_ACEOF
2816#line 2816 "configure"
2817#include "confdefs.h"
2818#include <termio.h>
2819int Autoconf = TCGETA;
2820_ACEOF
2821if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
2822  egrep "$ac_pattern" >/dev/null 2>&1; then
2823  ac_cv_prog_gcc_traditional=yes
2824fi
2825rm -rf conftest*
2826
2827  fi
2828fi
2829echo "$as_me:2829: result: $ac_cv_prog_gcc_traditional" >&5
2830echo "${ECHO_T}$ac_cv_prog_gcc_traditional" >&6
2831  if test $ac_cv_prog_gcc_traditional = yes; then
2832    CC="$CC -traditional"
2833  fi
2834fi
2835
2836echo "$as_me:2836: checking whether ${MAKE-make} sets \${MAKE}" >&5
2837echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2838set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2839if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2840  echo $ECHO_N "(cached) $ECHO_C" >&6
2841else
2842  cat >conftest.make <<\EOF
2843all:
2844	@echo 'ac_maketemp="${MAKE}"'
2845EOF
2846# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2847eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2848if test -n "$ac_maketemp"; then
2849  eval ac_cv_prog_make_${ac_make}_set=yes
2850else
2851  eval ac_cv_prog_make_${ac_make}_set=no
2852fi
2853rm -f conftest.make
2854fi
2855if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2856  echo "$as_me:2856: result: yes" >&5
2857echo "${ECHO_T}yes" >&6
2858  SET_MAKE=
2859else
2860  echo "$as_me:2860: result: no" >&5
2861echo "${ECHO_T}no" >&6
2862  SET_MAKE="MAKE=${MAKE-make}"
2863fi
2864
2865# Find a good install program.  We prefer a C program (faster),
2866# so one script is as good as another.  But avoid the broken or
2867# incompatible versions:
2868# SysV /etc/install, /usr/sbin/install
2869# SunOS /usr/etc/install
2870# IRIX /sbin/install
2871# AIX /bin/install
2872# AmigaOS /C/install, which installs bootblocks on floppy discs
2873# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2874# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2875# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2876# ./install, which can be erroneously created by make from ./install.sh.
2877echo "$as_me:2877: checking for a BSD compatible install" >&5
2878echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2879if test -z "$INSTALL"; then
2880if test "${ac_cv_path_install+set}" = set; then
2881  echo $ECHO_N "(cached) $ECHO_C" >&6
2882else
2883    ac_save_IFS=$IFS; IFS=$ac_path_separator
2884  for ac_dir in $PATH; do
2885    IFS=$ac_save_IFS
2886    # Account for people who put trailing slashes in PATH elements.
2887    case $ac_dir/ in
2888    / | ./ | .// | /cC/* \
2889    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
2890    | /usr/ucb/* ) ;;
2891    *)
2892      # OSF1 and SCO ODT 3.0 have their own names for install.
2893      # Don't use installbsd from OSF since it installs stuff as root
2894      # by default.
2895      for ac_prog in ginstall scoinst install; do
2896        if $as_executable_p "$ac_dir/$ac_prog"; then
2897	  if test $ac_prog = install &&
2898            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2899	    # AIX install.  It has an incompatible calling convention.
2900	    :
2901	  elif test $ac_prog = install &&
2902	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
2903	    # program-specific install script used by HP pwplus--don't use.
2904	    :
2905	  else
2906	    ac_cv_path_install="$ac_dir/$ac_prog -c"
2907	    break 2
2908	  fi
2909	fi
2910      done
2911      ;;
2912    esac
2913  done
2914
2915fi
2916  if test "${ac_cv_path_install+set}" = set; then
2917    INSTALL=$ac_cv_path_install
2918  else
2919    # As a last resort, use the slow shell script.  We don't cache a
2920    # path for INSTALL within a source directory, because that will
2921    # break other packages using the cache if that directory is
2922    # removed, or if the path is relative.
2923    INSTALL=$ac_install_sh
2924  fi
2925fi
2926echo "$as_me:2926: result: $INSTALL" >&5
2927echo "${ECHO_T}$INSTALL" >&6
2928
2929# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
2930# It thinks the first close brace ends the variable substitution.
2931test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
2932
2933test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
2934
2935test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
2936
2937if test "${cf_cv_prog_YACC+set}" = set; then
2938  echo $ECHO_N "(cached) $ECHO_C" >&6
2939else
2940
2941if test -n "$YACC" ; then
2942  cf_cv_prog_YACC="$YACC" # Let the user override the test.
2943else
2944cat >conftest.y <<EOF
2945%{
2946void yyerror(s) char *s; { }
2947%}
2948%token	NUMBER
2949%%
2950time	: NUMBER ':' NUMBER
2951	;
2952%%
2953int yylex() { return NUMBER; }
2954int main() { return yyparse(); }
2955EOF
2956  for cf_prog in 'bison -y' byacc yacc
2957  do
2958    rm -f y.tab.ch
2959    echo "$as_me:2959: checking for $cf_prog" >&5
2960echo $ECHO_N "checking for $cf_prog... $ECHO_C" >&6
2961    cf_command="$cf_prog conftest.y"
2962    cf_result=no
2963    if { (eval echo "$as_me:2963: \"$cf_command\"") >&5
2964  (eval $cf_command) 2>&5
2965  ac_status=$?
2966  echo "$as_me:2966: \$? = $ac_status" >&5
2967  (exit $ac_status); } && test -s y.tab.c ; then
2968      mv y.tab.c conftest.c
2969      rm -f y.tab.h
2970      if test "$cf_prog" = 'bison -y' ; then
2971        if { (eval echo "$as_me:2971: \"$ac_link\"") >&5
2972  (eval $ac_link) 2>&5
2973  ac_status=$?
2974  echo "$as_me:2974: \$? = $ac_status" >&5
2975  (exit $ac_status); } && test -s conftest ; then
2976          cf_result=yes
2977        fi
2978      else
2979        cf_result=yes
2980      fi
2981    fi
2982    echo "$as_me:2982: result: $cf_result" >&5
2983echo "${ECHO_T}$cf_result" >&6
2984    if test $cf_result = yes ; then
2985      cf_cv_prog_YACC="$cf_prog"
2986      break
2987    fi
2988  done
2989fi
2990
2991fi
2992
2993YACC="$cf_cv_prog_YACC"
2994
2995for ac_prog in lint alint lclint tdlint splint
2996do
2997  # Extract the first word of "$ac_prog", so it can be a program name with args.
2998set dummy $ac_prog; ac_word=$2
2999echo "$as_me:2999: checking for $ac_word" >&5
3000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3001if test "${ac_cv_prog_LINT+set}" = set; then
3002  echo $ECHO_N "(cached) $ECHO_C" >&6
3003else
3004  if test -n "$LINT"; then
3005  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3006else
3007  ac_save_IFS=$IFS; IFS=$ac_path_separator
3008ac_dummy="$PATH"
3009for ac_dir in $ac_dummy; do
3010  IFS=$ac_save_IFS
3011  test -z "$ac_dir" && ac_dir=.
3012  $as_executable_p "$ac_dir/$ac_word" || continue
3013ac_cv_prog_LINT="$ac_prog"
3014echo "$as_me:3014: found $ac_dir/$ac_word" >&5
3015break
3016done
3017
3018fi
3019fi
3020LINT=$ac_cv_prog_LINT
3021if test -n "$LINT"; then
3022  echo "$as_me:3022: result: $LINT" >&5
3023echo "${ECHO_T}$LINT" >&6
3024else
3025  echo "$as_me:3025: result: no" >&5
3026echo "${ECHO_T}no" >&6
3027fi
3028
3029  test -n "$LINT" && break
3030done
3031test -n "$LINT" || LINT=":"
3032
3033echo "$as_me:3033: checking if the POSIX test-macros are already defined" >&5
3034echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
3035if test "${cf_cv_posix_visible+set}" = set; then
3036  echo $ECHO_N "(cached) $ECHO_C" >&6
3037else
3038
3039cat >conftest.$ac_ext <<_ACEOF
3040#line 3040 "configure"
3041#include "confdefs.h"
3042#include <stdio.h>
3043int
3044main (void)
3045{
3046
3047#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
3048	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
3049	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
3050	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
3051#error conflicting symbols found
3052#endif
3053
3054  ;
3055  return 0;
3056}
3057_ACEOF
3058rm -f conftest.$ac_objext
3059if { (eval echo "$as_me:3059: \"$ac_compile\"") >&5
3060  (eval $ac_compile) 2>&5
3061  ac_status=$?
3062  echo "$as_me:3062: \$? = $ac_status" >&5
3063  (exit $ac_status); } &&
3064         { ac_try='test -s conftest.$ac_objext'
3065  { (eval echo "$as_me:3065: \"$ac_try\"") >&5
3066  (eval $ac_try) 2>&5
3067  ac_status=$?
3068  echo "$as_me:3068: \$? = $ac_status" >&5
3069  (exit $ac_status); }; }; then
3070  cf_cv_posix_visible=no
3071else
3072  echo "$as_me: failed program was:" >&5
3073cat conftest.$ac_ext >&5
3074cf_cv_posix_visible=yes
3075fi
3076rm -f conftest.$ac_objext conftest.$ac_ext
3077
3078fi
3079echo "$as_me:3079: result: $cf_cv_posix_visible" >&5
3080echo "${ECHO_T}$cf_cv_posix_visible" >&6
3081
3082if test "$cf_cv_posix_visible" = no; then
3083
3084cf_XOPEN_SOURCE=500
3085cf_POSIX_C_SOURCE=199506L
3086cf_xopen_source=
3087
3088case $host_os in
3089aix[4-7]*)
3090	cf_xopen_source="-D_ALL_SOURCE"
3091	;;
3092msys)
3093	cf_XOPEN_SOURCE=600
3094	;;
3095darwin[0-8].*)
3096	cf_xopen_source="-D_APPLE_C_SOURCE"
3097	;;
3098darwin*)
3099	cf_xopen_source="-D_DARWIN_C_SOURCE"
3100	cf_XOPEN_SOURCE=
3101	;;
3102freebsd*|dragonfly*|midnightbsd*)
3103	# 5.x headers associate
3104	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
3105	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
3106	cf_POSIX_C_SOURCE=200112L
3107	cf_XOPEN_SOURCE=600
3108	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3109	;;
3110hpux11*)
3111	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
3112	;;
3113hpux*)
3114	cf_xopen_source="-D_HPUX_SOURCE"
3115	;;
3116irix[56].*)
3117	cf_xopen_source="-D_SGI_SOURCE"
3118	cf_XOPEN_SOURCE=
3119	;;
3120linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
3121
3122cf_gnu_xopen_source=$cf_XOPEN_SOURCE
3123
3124echo "$as_me:3124: checking if this is the GNU C library" >&5
3125echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
3126if test "${cf_cv_gnu_library+set}" = set; then
3127  echo $ECHO_N "(cached) $ECHO_C" >&6
3128else
3129
3130cat >conftest.$ac_ext <<_ACEOF
3131#line 3131 "configure"
3132#include "confdefs.h"
3133#include <sys/types.h>
3134int
3135main (void)
3136{
3137
3138	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
3139		return 0;
3140	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
3141		return 0;
3142	#else
3143	#	error not GNU C library
3144	#endif
3145  ;
3146  return 0;
3147}
3148_ACEOF
3149rm -f conftest.$ac_objext
3150if { (eval echo "$as_me:3150: \"$ac_compile\"") >&5
3151  (eval $ac_compile) 2>&5
3152  ac_status=$?
3153  echo "$as_me:3153: \$? = $ac_status" >&5
3154  (exit $ac_status); } &&
3155         { ac_try='test -s conftest.$ac_objext'
3156  { (eval echo "$as_me:3156: \"$ac_try\"") >&5
3157  (eval $ac_try) 2>&5
3158  ac_status=$?
3159  echo "$as_me:3159: \$? = $ac_status" >&5
3160  (exit $ac_status); }; }; then
3161  cf_cv_gnu_library=yes
3162else
3163  echo "$as_me: failed program was:" >&5
3164cat conftest.$ac_ext >&5
3165cf_cv_gnu_library=no
3166fi
3167rm -f conftest.$ac_objext conftest.$ac_ext
3168
3169fi
3170echo "$as_me:3170: result: $cf_cv_gnu_library" >&5
3171echo "${ECHO_T}$cf_cv_gnu_library" >&6
3172
3173if test x$cf_cv_gnu_library = xyes; then
3174
3175	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
3176	# was changed to help a little.  newlib incorporated the change about 4
3177	# years later.
3178	echo "$as_me:3178: checking if _DEFAULT_SOURCE can be used as a basis" >&5
3179echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
3180if test "${cf_cv_gnu_library_219+set}" = set; then
3181  echo $ECHO_N "(cached) $ECHO_C" >&6
3182else
3183
3184		cf_save="$CPPFLAGS"
3185
3186	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3187	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3188
3189		cat >conftest.$ac_ext <<_ACEOF
3190#line 3190 "configure"
3191#include "confdefs.h"
3192#include <sys/types.h>
3193int
3194main (void)
3195{
3196
3197			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
3198				return 0;
3199			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
3200				return 0;
3201			#else
3202			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
3203			#endif
3204  ;
3205  return 0;
3206}
3207_ACEOF
3208rm -f conftest.$ac_objext
3209if { (eval echo "$as_me:3209: \"$ac_compile\"") >&5
3210  (eval $ac_compile) 2>&5
3211  ac_status=$?
3212  echo "$as_me:3212: \$? = $ac_status" >&5
3213  (exit $ac_status); } &&
3214         { ac_try='test -s conftest.$ac_objext'
3215  { (eval echo "$as_me:3215: \"$ac_try\"") >&5
3216  (eval $ac_try) 2>&5
3217  ac_status=$?
3218  echo "$as_me:3218: \$? = $ac_status" >&5
3219  (exit $ac_status); }; }; then
3220  cf_cv_gnu_library_219=yes
3221else
3222  echo "$as_me: failed program was:" >&5
3223cat conftest.$ac_ext >&5
3224cf_cv_gnu_library_219=no
3225fi
3226rm -f conftest.$ac_objext conftest.$ac_ext
3227		CPPFLAGS="$cf_save"
3228
3229fi
3230echo "$as_me:3230: result: $cf_cv_gnu_library_219" >&5
3231echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
3232
3233	if test "x$cf_cv_gnu_library_219" = xyes; then
3234		cf_save="$CPPFLAGS"
3235		echo "$as_me:3235: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
3236echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
3237if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
3238  echo $ECHO_N "(cached) $ECHO_C" >&6
3239else
3240
3241cf_fix_cppflags=no
3242cf_new_cflags=
3243cf_new_cppflags=
3244cf_new_extra_cppflags=
3245
3246for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
3247do
3248case $cf_fix_cppflags in
3249no)
3250	case $cf_add_cflags in
3251	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3252		case $cf_add_cflags in
3253		-D*)
3254			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3255
3256			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3257				&& test -z "${cf_tst_cflags}" \
3258				&& cf_fix_cppflags=yes
3259
3260			if test $cf_fix_cppflags = yes ; then
3261
3262	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3263	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3264
3265				continue
3266			elif test "${cf_tst_cflags}" = "\"'" ; then
3267
3268	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3269	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3270
3271				continue
3272			fi
3273			;;
3274		esac
3275		case "$CPPFLAGS" in
3276		*$cf_add_cflags)
3277			;;
3278		*)
3279			case $cf_add_cflags in
3280			-D*)
3281				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3282
3283CPPFLAGS=`echo "$CPPFLAGS" | \
3284	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3285		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3286
3287				;;
3288			esac
3289
3290	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3291	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3292
3293			;;
3294		esac
3295		;;
3296	*)
3297
3298	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3299	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3300
3301		;;
3302	esac
3303	;;
3304yes)
3305
3306	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3307	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3308
3309	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3310
3311	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3312		&& test -z "${cf_tst_cflags}" \
3313		&& cf_fix_cppflags=no
3314	;;
3315esac
3316done
3317
3318if test -n "$cf_new_cflags" ; then
3319
3320	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3321	CFLAGS="${CFLAGS}$cf_new_cflags"
3322
3323fi
3324
3325if test -n "$cf_new_cppflags" ; then
3326
3327	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3328	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3329
3330fi
3331
3332if test -n "$cf_new_extra_cppflags" ; then
3333
3334	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3335	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3336
3337fi
3338
3339			cat >conftest.$ac_ext <<_ACEOF
3340#line 3340 "configure"
3341#include "confdefs.h"
3342
3343				#include <limits.h>
3344				#include <sys/types.h>
3345
3346int
3347main (void)
3348{
3349
3350				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
3351					return 0;
3352				#else
3353				#	error GNU C library is too old
3354				#endif
3355  ;
3356  return 0;
3357}
3358_ACEOF
3359rm -f conftest.$ac_objext
3360if { (eval echo "$as_me:3360: \"$ac_compile\"") >&5
3361  (eval $ac_compile) 2>&5
3362  ac_status=$?
3363  echo "$as_me:3363: \$? = $ac_status" >&5
3364  (exit $ac_status); } &&
3365         { ac_try='test -s conftest.$ac_objext'
3366  { (eval echo "$as_me:3366: \"$ac_try\"") >&5
3367  (eval $ac_try) 2>&5
3368  ac_status=$?
3369  echo "$as_me:3369: \$? = $ac_status" >&5
3370  (exit $ac_status); }; }; then
3371  cf_cv_gnu_dftsrc_219=yes
3372else
3373  echo "$as_me: failed program was:" >&5
3374cat conftest.$ac_ext >&5
3375cf_cv_gnu_dftsrc_219=no
3376fi
3377rm -f conftest.$ac_objext conftest.$ac_ext
3378
3379fi
3380echo "$as_me:3380: result: $cf_cv_gnu_dftsrc_219" >&5
3381echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
3382		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
3383	else
3384		cf_cv_gnu_dftsrc_219=maybe
3385	fi
3386
3387	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
3388
3389		echo "$as_me:3389: checking if we must define _GNU_SOURCE" >&5
3390echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
3391if test "${cf_cv_gnu_source+set}" = set; then
3392  echo $ECHO_N "(cached) $ECHO_C" >&6
3393else
3394
3395		cat >conftest.$ac_ext <<_ACEOF
3396#line 3396 "configure"
3397#include "confdefs.h"
3398#include <sys/types.h>
3399int
3400main (void)
3401{
3402
3403			#ifndef _XOPEN_SOURCE
3404			#error	expected _XOPEN_SOURCE to be defined
3405			#endif
3406  ;
3407  return 0;
3408}
3409_ACEOF
3410rm -f conftest.$ac_objext
3411if { (eval echo "$as_me:3411: \"$ac_compile\"") >&5
3412  (eval $ac_compile) 2>&5
3413  ac_status=$?
3414  echo "$as_me:3414: \$? = $ac_status" >&5
3415  (exit $ac_status); } &&
3416         { ac_try='test -s conftest.$ac_objext'
3417  { (eval echo "$as_me:3417: \"$ac_try\"") >&5
3418  (eval $ac_try) 2>&5
3419  ac_status=$?
3420  echo "$as_me:3420: \$? = $ac_status" >&5
3421  (exit $ac_status); }; }; then
3422  cf_cv_gnu_source=no
3423else
3424  echo "$as_me: failed program was:" >&5
3425cat conftest.$ac_ext >&5
3426cf_save="$CPPFLAGS"
3427
3428cf_fix_cppflags=no
3429cf_new_cflags=
3430cf_new_cppflags=
3431cf_new_extra_cppflags=
3432
3433for cf_add_cflags in -D_GNU_SOURCE
3434do
3435case $cf_fix_cppflags in
3436no)
3437	case $cf_add_cflags in
3438	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3439		case $cf_add_cflags in
3440		-D*)
3441			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3442
3443			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3444				&& test -z "${cf_tst_cflags}" \
3445				&& cf_fix_cppflags=yes
3446
3447			if test $cf_fix_cppflags = yes ; then
3448
3449	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3450	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3451
3452				continue
3453			elif test "${cf_tst_cflags}" = "\"'" ; then
3454
3455	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3456	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3457
3458				continue
3459			fi
3460			;;
3461		esac
3462		case "$CPPFLAGS" in
3463		*$cf_add_cflags)
3464			;;
3465		*)
3466			case $cf_add_cflags in
3467			-D*)
3468				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3469
3470CPPFLAGS=`echo "$CPPFLAGS" | \
3471	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3472		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3473
3474				;;
3475			esac
3476
3477	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3478	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3479
3480			;;
3481		esac
3482		;;
3483	*)
3484
3485	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3486	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3487
3488		;;
3489	esac
3490	;;
3491yes)
3492
3493	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3494	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3495
3496	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3497
3498	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3499		&& test -z "${cf_tst_cflags}" \
3500		&& cf_fix_cppflags=no
3501	;;
3502esac
3503done
3504
3505if test -n "$cf_new_cflags" ; then
3506
3507	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3508	CFLAGS="${CFLAGS}$cf_new_cflags"
3509
3510fi
3511
3512if test -n "$cf_new_cppflags" ; then
3513
3514	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3515	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3516
3517fi
3518
3519if test -n "$cf_new_extra_cppflags" ; then
3520
3521	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3522	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3523
3524fi
3525
3526			 cat >conftest.$ac_ext <<_ACEOF
3527#line 3527 "configure"
3528#include "confdefs.h"
3529#include <sys/types.h>
3530int
3531main (void)
3532{
3533
3534				#ifdef _XOPEN_SOURCE
3535				#error	expected _XOPEN_SOURCE to be undefined
3536				#endif
3537  ;
3538  return 0;
3539}
3540_ACEOF
3541rm -f conftest.$ac_objext
3542if { (eval echo "$as_me:3542: \"$ac_compile\"") >&5
3543  (eval $ac_compile) 2>&5
3544  ac_status=$?
3545  echo "$as_me:3545: \$? = $ac_status" >&5
3546  (exit $ac_status); } &&
3547         { ac_try='test -s conftest.$ac_objext'
3548  { (eval echo "$as_me:3548: \"$ac_try\"") >&5
3549  (eval $ac_try) 2>&5
3550  ac_status=$?
3551  echo "$as_me:3551: \$? = $ac_status" >&5
3552  (exit $ac_status); }; }; then
3553  cf_cv_gnu_source=no
3554else
3555  echo "$as_me: failed program was:" >&5
3556cat conftest.$ac_ext >&5
3557cf_cv_gnu_source=yes
3558fi
3559rm -f conftest.$ac_objext conftest.$ac_ext
3560			CPPFLAGS="$cf_save"
3561
3562fi
3563rm -f conftest.$ac_objext conftest.$ac_ext
3564
3565fi
3566echo "$as_me:3566: result: $cf_cv_gnu_source" >&5
3567echo "${ECHO_T}$cf_cv_gnu_source" >&6
3568
3569		if test "$cf_cv_gnu_source" = yes
3570		then
3571		echo "$as_me:3571: checking if we should also define _DEFAULT_SOURCE" >&5
3572echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
3573if test "${cf_cv_default_source+set}" = set; then
3574  echo $ECHO_N "(cached) $ECHO_C" >&6
3575else
3576
3577	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3578	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
3579
3580			cat >conftest.$ac_ext <<_ACEOF
3581#line 3581 "configure"
3582#include "confdefs.h"
3583#include <sys/types.h>
3584int
3585main (void)
3586{
3587
3588				#ifdef _DEFAULT_SOURCE
3589				#error	expected _DEFAULT_SOURCE to be undefined
3590				#endif
3591  ;
3592  return 0;
3593}
3594_ACEOF
3595rm -f conftest.$ac_objext
3596if { (eval echo "$as_me:3596: \"$ac_compile\"") >&5
3597  (eval $ac_compile) 2>&5
3598  ac_status=$?
3599  echo "$as_me:3599: \$? = $ac_status" >&5
3600  (exit $ac_status); } &&
3601         { ac_try='test -s conftest.$ac_objext'
3602  { (eval echo "$as_me:3602: \"$ac_try\"") >&5
3603  (eval $ac_try) 2>&5
3604  ac_status=$?
3605  echo "$as_me:3605: \$? = $ac_status" >&5
3606  (exit $ac_status); }; }; then
3607  cf_cv_default_source=no
3608else
3609  echo "$as_me: failed program was:" >&5
3610cat conftest.$ac_ext >&5
3611cf_cv_default_source=yes
3612fi
3613rm -f conftest.$ac_objext conftest.$ac_ext
3614
3615fi
3616echo "$as_me:3616: result: $cf_cv_default_source" >&5
3617echo "${ECHO_T}$cf_cv_default_source" >&6
3618			if test "$cf_cv_default_source" = yes
3619			then
3620
3621	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3622	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
3623
3624			fi
3625		fi
3626	fi
3627
3628fi
3629
3630	;;
3631minix*)
3632	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
3633	;;
3634mirbsd*)
3635	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
3636	cf_XOPEN_SOURCE=
3637
3638if test "$cf_cv_posix_visible" = no; then
3639
3640cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
3641
3642cf_save_CFLAGS="$CFLAGS"
3643cf_save_CPPFLAGS="$CPPFLAGS"
3644
3645cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
3646	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3647		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3648
3649cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
3650	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
3651		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
3652
3653echo "$as_me:3653: checking if we should define _POSIX_C_SOURCE" >&5
3654echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
3655if test "${cf_cv_posix_c_source+set}" = set; then
3656  echo $ECHO_N "(cached) $ECHO_C" >&6
3657else
3658
3659echo "${as_me:-configure}:3659: testing if the symbol is already defined go no further ..." 1>&5
3660
3661	cat >conftest.$ac_ext <<_ACEOF
3662#line 3662 "configure"
3663#include "confdefs.h"
3664#include <sys/types.h>
3665int
3666main (void)
3667{
3668
3669#ifndef _POSIX_C_SOURCE
3670make an error
3671#endif
3672  ;
3673  return 0;
3674}
3675_ACEOF
3676rm -f conftest.$ac_objext
3677if { (eval echo "$as_me:3677: \"$ac_compile\"") >&5
3678  (eval $ac_compile) 2>&5
3679  ac_status=$?
3680  echo "$as_me:3680: \$? = $ac_status" >&5
3681  (exit $ac_status); } &&
3682         { ac_try='test -s conftest.$ac_objext'
3683  { (eval echo "$as_me:3683: \"$ac_try\"") >&5
3684  (eval $ac_try) 2>&5
3685  ac_status=$?
3686  echo "$as_me:3686: \$? = $ac_status" >&5
3687  (exit $ac_status); }; }; then
3688  cf_cv_posix_c_source=no
3689else
3690  echo "$as_me: failed program was:" >&5
3691cat conftest.$ac_ext >&5
3692cf_want_posix_source=no
3693	 case .$cf_POSIX_C_SOURCE in
3694	 .[12]??*)
3695		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3696		;;
3697	 .2)
3698		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
3699		cf_want_posix_source=yes
3700		;;
3701	 .*)
3702		cf_want_posix_source=yes
3703		;;
3704	 esac
3705	 if test "$cf_want_posix_source" = yes ; then
3706		cat >conftest.$ac_ext <<_ACEOF
3707#line 3707 "configure"
3708#include "confdefs.h"
3709#include <sys/types.h>
3710int
3711main (void)
3712{
3713
3714#ifdef _POSIX_SOURCE
3715make an error
3716#endif
3717  ;
3718  return 0;
3719}
3720_ACEOF
3721rm -f conftest.$ac_objext
3722if { (eval echo "$as_me:3722: \"$ac_compile\"") >&5
3723  (eval $ac_compile) 2>&5
3724  ac_status=$?
3725  echo "$as_me:3725: \$? = $ac_status" >&5
3726  (exit $ac_status); } &&
3727         { ac_try='test -s conftest.$ac_objext'
3728  { (eval echo "$as_me:3728: \"$ac_try\"") >&5
3729  (eval $ac_try) 2>&5
3730  ac_status=$?
3731  echo "$as_me:3731: \$? = $ac_status" >&5
3732  (exit $ac_status); }; }; then
3733  :
3734else
3735  echo "$as_me: failed program was:" >&5
3736cat conftest.$ac_ext >&5
3737cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
3738fi
3739rm -f conftest.$ac_objext conftest.$ac_ext
3740	 fi
3741
3742echo "${as_me:-configure}:3742: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
3743
3744	 CFLAGS="$cf_trim_CFLAGS"
3745	 CPPFLAGS="$cf_trim_CPPFLAGS"
3746
3747	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3748	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
3749
3750echo "${as_me:-configure}:3750: testing if the second compile does not leave our definition intact error ..." 1>&5
3751
3752	 cat >conftest.$ac_ext <<_ACEOF
3753#line 3753 "configure"
3754#include "confdefs.h"
3755#include <sys/types.h>
3756int
3757main (void)
3758{
3759
3760#ifndef _POSIX_C_SOURCE
3761make an error
3762#endif
3763  ;
3764  return 0;
3765}
3766_ACEOF
3767rm -f conftest.$ac_objext
3768if { (eval echo "$as_me:3768: \"$ac_compile\"") >&5
3769  (eval $ac_compile) 2>&5
3770  ac_status=$?
3771  echo "$as_me:3771: \$? = $ac_status" >&5
3772  (exit $ac_status); } &&
3773         { ac_try='test -s conftest.$ac_objext'
3774  { (eval echo "$as_me:3774: \"$ac_try\"") >&5
3775  (eval $ac_try) 2>&5
3776  ac_status=$?
3777  echo "$as_me:3777: \$? = $ac_status" >&5
3778  (exit $ac_status); }; }; then
3779  :
3780else
3781  echo "$as_me: failed program was:" >&5
3782cat conftest.$ac_ext >&5
3783cf_cv_posix_c_source=no
3784fi
3785rm -f conftest.$ac_objext conftest.$ac_ext
3786	 CFLAGS="$cf_save_CFLAGS"
3787	 CPPFLAGS="$cf_save_CPPFLAGS"
3788
3789fi
3790rm -f conftest.$ac_objext conftest.$ac_ext
3791
3792fi
3793echo "$as_me:3793: result: $cf_cv_posix_c_source" >&5
3794echo "${ECHO_T}$cf_cv_posix_c_source" >&6
3795
3796if test "$cf_cv_posix_c_source" != no ; then
3797	CFLAGS="$cf_trim_CFLAGS"
3798	CPPFLAGS="$cf_trim_CPPFLAGS"
3799
3800cf_fix_cppflags=no
3801cf_new_cflags=
3802cf_new_cppflags=
3803cf_new_extra_cppflags=
3804
3805for cf_add_cflags in $cf_cv_posix_c_source
3806do
3807case $cf_fix_cppflags in
3808no)
3809	case $cf_add_cflags in
3810	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
3811		case $cf_add_cflags in
3812		-D*)
3813			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
3814
3815			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3816				&& test -z "${cf_tst_cflags}" \
3817				&& cf_fix_cppflags=yes
3818
3819			if test $cf_fix_cppflags = yes ; then
3820
3821	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3822	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3823
3824				continue
3825			elif test "${cf_tst_cflags}" = "\"'" ; then
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				continue
3831			fi
3832			;;
3833		esac
3834		case "$CPPFLAGS" in
3835		*$cf_add_cflags)
3836			;;
3837		*)
3838			case $cf_add_cflags in
3839			-D*)
3840				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
3841
3842CPPFLAGS=`echo "$CPPFLAGS" | \
3843	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
3844		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
3845
3846				;;
3847			esac
3848
3849	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
3850	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
3851
3852			;;
3853		esac
3854		;;
3855	*)
3856
3857	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
3858	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
3859
3860		;;
3861	esac
3862	;;
3863yes)
3864
3865	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
3866	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
3867
3868	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
3869
3870	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
3871		&& test -z "${cf_tst_cflags}" \
3872		&& cf_fix_cppflags=no
3873	;;
3874esac
3875done
3876
3877if test -n "$cf_new_cflags" ; then
3878
3879	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
3880	CFLAGS="${CFLAGS}$cf_new_cflags"
3881
3882fi
3883
3884if test -n "$cf_new_cppflags" ; then
3885
3886	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3887	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
3888
3889fi
3890
3891if test -n "$cf_new_extra_cppflags" ; then
3892
3893	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
3894	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
3895
3896fi
3897
3898fi
3899
3900fi # cf_cv_posix_visible
3901
3902	;;
3903netbsd*)
3904	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
3905	;;
3906openbsd[4-9]*)
3907	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
3908	cf_xopen_source="-D_BSD_SOURCE"
3909	cf_XOPEN_SOURCE=600
3910	;;
3911openbsd*)
3912	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
3913	;;
3914osf[45]*)
3915	cf_xopen_source="-D_OSF_SOURCE"
3916	;;
3917nto-qnx*)
3918	cf_xopen_source="-D_QNX_SOURCE"
3919	;;
3920sco*)
3921	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
3922	;;
3923solaris2.*)
3924	cf_xopen_source="-D__EXTENSIONS__"
3925	cf_cv_xopen_source=broken
3926	;;
3927sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
3928	cf_XOPEN_SOURCE=
3929	cf_POSIX_C_SOURCE=
3930	;;
3931*)
3932
3933echo "$as_me:3933: checking if we should define _XOPEN_SOURCE" >&5
3934echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
3935if test "${cf_cv_xopen_source+set}" = set; then
3936  echo $ECHO_N "(cached) $ECHO_C" >&6
3937else
3938
3939	cat >conftest.$ac_ext <<_ACEOF
3940#line 3940 "configure"
3941#include "confdefs.h"
3942
3943#include <stdlib.h>
3944#include <string.h>
3945#include <sys/types.h>
3946
3947int
3948main (void)
3949{
3950
3951#ifndef _XOPEN_SOURCE
3952make an error
3953#endif
3954  ;
3955  return 0;
3956}
3957_ACEOF
3958rm -f conftest.$ac_objext
3959if { (eval echo "$as_me:3959: \"$ac_compile\"") >&5
3960  (eval $ac_compile) 2>&5
3961  ac_status=$?
3962  echo "$as_me:3962: \$? = $ac_status" >&5
3963  (exit $ac_status); } &&
3964         { ac_try='test -s conftest.$ac_objext'
3965  { (eval echo "$as_me:3965: \"$ac_try\"") >&5
3966  (eval $ac_try) 2>&5
3967  ac_status=$?
3968  echo "$as_me:3968: \$? = $ac_status" >&5
3969  (exit $ac_status); }; }; then
3970  cf_cv_xopen_source=no
3971else
3972  echo "$as_me: failed program was:" >&5
3973cat conftest.$ac_ext >&5
3974cf_save="$CPPFLAGS"
3975
3976	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
3977	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
3978
3979	 cat >conftest.$ac_ext <<_ACEOF
3980#line 3980 "configure"
3981#include "confdefs.h"
3982
3983#include <stdlib.h>
3984#include <string.h>
3985#include <sys/types.h>
3986
3987int
3988main (void)
3989{
3990
3991#ifdef _XOPEN_SOURCE
3992make an error
3993#endif
3994  ;
3995  return 0;
3996}
3997_ACEOF
3998rm -f conftest.$ac_objext
3999if { (eval echo "$as_me:3999: \"$ac_compile\"") >&5
4000  (eval $ac_compile) 2>&5
4001  ac_status=$?
4002  echo "$as_me:4002: \$? = $ac_status" >&5
4003  (exit $ac_status); } &&
4004         { ac_try='test -s conftest.$ac_objext'
4005  { (eval echo "$as_me:4005: \"$ac_try\"") >&5
4006  (eval $ac_try) 2>&5
4007  ac_status=$?
4008  echo "$as_me:4008: \$? = $ac_status" >&5
4009  (exit $ac_status); }; }; then
4010  cf_cv_xopen_source=no
4011else
4012  echo "$as_me: failed program was:" >&5
4013cat conftest.$ac_ext >&5
4014cf_cv_xopen_source=$cf_XOPEN_SOURCE
4015fi
4016rm -f conftest.$ac_objext conftest.$ac_ext
4017	CPPFLAGS="$cf_save"
4018
4019fi
4020rm -f conftest.$ac_objext conftest.$ac_ext
4021
4022fi
4023echo "$as_me:4023: result: $cf_cv_xopen_source" >&5
4024echo "${ECHO_T}$cf_cv_xopen_source" >&6
4025
4026if test "$cf_cv_xopen_source" != no ; then
4027
4028CFLAGS=`echo "$CFLAGS" | \
4029	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4030		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4031
4032CPPFLAGS=`echo "$CPPFLAGS" | \
4033	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4034		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4035
4036	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4037
4038cf_fix_cppflags=no
4039cf_new_cflags=
4040cf_new_cppflags=
4041cf_new_extra_cppflags=
4042
4043for cf_add_cflags in $cf_temp_xopen_source
4044do
4045case $cf_fix_cppflags in
4046no)
4047	case $cf_add_cflags in
4048	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4049		case $cf_add_cflags in
4050		-D*)
4051			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4052
4053			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4054				&& test -z "${cf_tst_cflags}" \
4055				&& cf_fix_cppflags=yes
4056
4057			if test $cf_fix_cppflags = yes ; then
4058
4059	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4060	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4061
4062				continue
4063			elif test "${cf_tst_cflags}" = "\"'" ; then
4064
4065	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4066	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4067
4068				continue
4069			fi
4070			;;
4071		esac
4072		case "$CPPFLAGS" in
4073		*$cf_add_cflags)
4074			;;
4075		*)
4076			case $cf_add_cflags in
4077			-D*)
4078				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4079
4080CPPFLAGS=`echo "$CPPFLAGS" | \
4081	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4082		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4083
4084				;;
4085			esac
4086
4087	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4088	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4089
4090			;;
4091		esac
4092		;;
4093	*)
4094
4095	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4096	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4097
4098		;;
4099	esac
4100	;;
4101yes)
4102
4103	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4104	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4105
4106	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4107
4108	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4109		&& test -z "${cf_tst_cflags}" \
4110		&& cf_fix_cppflags=no
4111	;;
4112esac
4113done
4114
4115if test -n "$cf_new_cflags" ; then
4116
4117	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4118	CFLAGS="${CFLAGS}$cf_new_cflags"
4119
4120fi
4121
4122if test -n "$cf_new_cppflags" ; then
4123
4124	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4125	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4126
4127fi
4128
4129if test -n "$cf_new_extra_cppflags" ; then
4130
4131	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4132	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4133
4134fi
4135
4136fi
4137
4138if test "$cf_cv_posix_visible" = no; then
4139
4140cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
4141
4142cf_save_CFLAGS="$CFLAGS"
4143cf_save_CPPFLAGS="$CPPFLAGS"
4144
4145cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
4146	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4147		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4148
4149cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
4150	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4151		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
4152
4153echo "$as_me:4153: checking if we should define _POSIX_C_SOURCE" >&5
4154echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
4155if test "${cf_cv_posix_c_source+set}" = set; then
4156  echo $ECHO_N "(cached) $ECHO_C" >&6
4157else
4158
4159echo "${as_me:-configure}:4159: testing if the symbol is already defined go no further ..." 1>&5
4160
4161	cat >conftest.$ac_ext <<_ACEOF
4162#line 4162 "configure"
4163#include "confdefs.h"
4164#include <sys/types.h>
4165int
4166main (void)
4167{
4168
4169#ifndef _POSIX_C_SOURCE
4170make an error
4171#endif
4172  ;
4173  return 0;
4174}
4175_ACEOF
4176rm -f conftest.$ac_objext
4177if { (eval echo "$as_me:4177: \"$ac_compile\"") >&5
4178  (eval $ac_compile) 2>&5
4179  ac_status=$?
4180  echo "$as_me:4180: \$? = $ac_status" >&5
4181  (exit $ac_status); } &&
4182         { ac_try='test -s conftest.$ac_objext'
4183  { (eval echo "$as_me:4183: \"$ac_try\"") >&5
4184  (eval $ac_try) 2>&5
4185  ac_status=$?
4186  echo "$as_me:4186: \$? = $ac_status" >&5
4187  (exit $ac_status); }; }; then
4188  cf_cv_posix_c_source=no
4189else
4190  echo "$as_me: failed program was:" >&5
4191cat conftest.$ac_ext >&5
4192cf_want_posix_source=no
4193	 case .$cf_POSIX_C_SOURCE in
4194	 .[12]??*)
4195		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4196		;;
4197	 .2)
4198		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
4199		cf_want_posix_source=yes
4200		;;
4201	 .*)
4202		cf_want_posix_source=yes
4203		;;
4204	 esac
4205	 if test "$cf_want_posix_source" = yes ; then
4206		cat >conftest.$ac_ext <<_ACEOF
4207#line 4207 "configure"
4208#include "confdefs.h"
4209#include <sys/types.h>
4210int
4211main (void)
4212{
4213
4214#ifdef _POSIX_SOURCE
4215make an error
4216#endif
4217  ;
4218  return 0;
4219}
4220_ACEOF
4221rm -f conftest.$ac_objext
4222if { (eval echo "$as_me:4222: \"$ac_compile\"") >&5
4223  (eval $ac_compile) 2>&5
4224  ac_status=$?
4225  echo "$as_me:4225: \$? = $ac_status" >&5
4226  (exit $ac_status); } &&
4227         { ac_try='test -s conftest.$ac_objext'
4228  { (eval echo "$as_me:4228: \"$ac_try\"") >&5
4229  (eval $ac_try) 2>&5
4230  ac_status=$?
4231  echo "$as_me:4231: \$? = $ac_status" >&5
4232  (exit $ac_status); }; }; then
4233  :
4234else
4235  echo "$as_me: failed program was:" >&5
4236cat conftest.$ac_ext >&5
4237cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
4238fi
4239rm -f conftest.$ac_objext conftest.$ac_ext
4240	 fi
4241
4242echo "${as_me:-configure}:4242: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
4243
4244	 CFLAGS="$cf_trim_CFLAGS"
4245	 CPPFLAGS="$cf_trim_CPPFLAGS"
4246
4247	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4248	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
4249
4250echo "${as_me:-configure}:4250: testing if the second compile does not leave our definition intact error ..." 1>&5
4251
4252	 cat >conftest.$ac_ext <<_ACEOF
4253#line 4253 "configure"
4254#include "confdefs.h"
4255#include <sys/types.h>
4256int
4257main (void)
4258{
4259
4260#ifndef _POSIX_C_SOURCE
4261make an error
4262#endif
4263  ;
4264  return 0;
4265}
4266_ACEOF
4267rm -f conftest.$ac_objext
4268if { (eval echo "$as_me:4268: \"$ac_compile\"") >&5
4269  (eval $ac_compile) 2>&5
4270  ac_status=$?
4271  echo "$as_me:4271: \$? = $ac_status" >&5
4272  (exit $ac_status); } &&
4273         { ac_try='test -s conftest.$ac_objext'
4274  { (eval echo "$as_me:4274: \"$ac_try\"") >&5
4275  (eval $ac_try) 2>&5
4276  ac_status=$?
4277  echo "$as_me:4277: \$? = $ac_status" >&5
4278  (exit $ac_status); }; }; then
4279  :
4280else
4281  echo "$as_me: failed program was:" >&5
4282cat conftest.$ac_ext >&5
4283cf_cv_posix_c_source=no
4284fi
4285rm -f conftest.$ac_objext conftest.$ac_ext
4286	 CFLAGS="$cf_save_CFLAGS"
4287	 CPPFLAGS="$cf_save_CPPFLAGS"
4288
4289fi
4290rm -f conftest.$ac_objext conftest.$ac_ext
4291
4292fi
4293echo "$as_me:4293: result: $cf_cv_posix_c_source" >&5
4294echo "${ECHO_T}$cf_cv_posix_c_source" >&6
4295
4296if test "$cf_cv_posix_c_source" != no ; then
4297	CFLAGS="$cf_trim_CFLAGS"
4298	CPPFLAGS="$cf_trim_CPPFLAGS"
4299
4300cf_fix_cppflags=no
4301cf_new_cflags=
4302cf_new_cppflags=
4303cf_new_extra_cppflags=
4304
4305for cf_add_cflags in $cf_cv_posix_c_source
4306do
4307case $cf_fix_cppflags in
4308no)
4309	case $cf_add_cflags in
4310	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4311		case $cf_add_cflags in
4312		-D*)
4313			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4314
4315			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4316				&& test -z "${cf_tst_cflags}" \
4317				&& cf_fix_cppflags=yes
4318
4319			if test $cf_fix_cppflags = yes ; then
4320
4321	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4322	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4323
4324				continue
4325			elif test "${cf_tst_cflags}" = "\"'" ; then
4326
4327	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4328	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4329
4330				continue
4331			fi
4332			;;
4333		esac
4334		case "$CPPFLAGS" in
4335		*$cf_add_cflags)
4336			;;
4337		*)
4338			case $cf_add_cflags in
4339			-D*)
4340				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4341
4342CPPFLAGS=`echo "$CPPFLAGS" | \
4343	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4344		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4345
4346				;;
4347			esac
4348
4349	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4350	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4351
4352			;;
4353		esac
4354		;;
4355	*)
4356
4357	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4358	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4359
4360		;;
4361	esac
4362	;;
4363yes)
4364
4365	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4366	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4367
4368	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4369
4370	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4371		&& test -z "${cf_tst_cflags}" \
4372		&& cf_fix_cppflags=no
4373	;;
4374esac
4375done
4376
4377if test -n "$cf_new_cflags" ; then
4378
4379	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4380	CFLAGS="${CFLAGS}$cf_new_cflags"
4381
4382fi
4383
4384if test -n "$cf_new_cppflags" ; then
4385
4386	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4387	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4388
4389fi
4390
4391if test -n "$cf_new_extra_cppflags" ; then
4392
4393	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4394	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4395
4396fi
4397
4398fi
4399
4400fi # cf_cv_posix_visible
4401
4402	;;
4403esac
4404
4405if test -n "$cf_xopen_source" ; then
4406
4407cf_fix_cppflags=no
4408cf_new_cflags=
4409cf_new_cppflags=
4410cf_new_extra_cppflags=
4411
4412for cf_add_cflags in $cf_xopen_source
4413do
4414case $cf_fix_cppflags in
4415no)
4416	case $cf_add_cflags in
4417	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4418		case $cf_add_cflags in
4419		-D*)
4420			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4421
4422			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4423				&& test -z "${cf_tst_cflags}" \
4424				&& cf_fix_cppflags=yes
4425
4426			if test $cf_fix_cppflags = yes ; then
4427
4428	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4429	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4430
4431				continue
4432			elif test "${cf_tst_cflags}" = "\"'" ; then
4433
4434	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4435	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4436
4437				continue
4438			fi
4439			;;
4440		esac
4441		case "$CPPFLAGS" in
4442		*$cf_add_cflags)
4443			;;
4444		*)
4445			case $cf_add_cflags in
4446			-D*)
4447				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4448
4449CPPFLAGS=`echo "$CPPFLAGS" | \
4450	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4451		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4452
4453				;;
4454			esac
4455
4456	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4457	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4458
4459			;;
4460		esac
4461		;;
4462	*)
4463
4464	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4465	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4466
4467		;;
4468	esac
4469	;;
4470yes)
4471
4472	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4473	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4474
4475	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4476
4477	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4478		&& test -z "${cf_tst_cflags}" \
4479		&& cf_fix_cppflags=no
4480	;;
4481esac
4482done
4483
4484if test -n "$cf_new_cflags" ; then
4485	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
4486
4487echo "${as_me:-configure}:4487: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
4488
4489	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4490	CFLAGS="${CFLAGS}$cf_new_cflags"
4491
4492fi
4493
4494if test -n "$cf_new_cppflags" ; then
4495	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
4496
4497echo "${as_me:-configure}:4497: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
4498
4499	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4500	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4501
4502fi
4503
4504if test -n "$cf_new_extra_cppflags" ; then
4505	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
4506
4507echo "${as_me:-configure}:4507: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
4508
4509	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4510	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4511
4512fi
4513
4514fi
4515
4516if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
4517	echo "$as_me:4517: checking if _XOPEN_SOURCE really is set" >&5
4518echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
4519	cat >conftest.$ac_ext <<_ACEOF
4520#line 4520 "configure"
4521#include "confdefs.h"
4522#include <stdlib.h>
4523int
4524main (void)
4525{
4526
4527#ifndef _XOPEN_SOURCE
4528make an error
4529#endif
4530  ;
4531  return 0;
4532}
4533_ACEOF
4534rm -f conftest.$ac_objext
4535if { (eval echo "$as_me:4535: \"$ac_compile\"") >&5
4536  (eval $ac_compile) 2>&5
4537  ac_status=$?
4538  echo "$as_me:4538: \$? = $ac_status" >&5
4539  (exit $ac_status); } &&
4540         { ac_try='test -s conftest.$ac_objext'
4541  { (eval echo "$as_me:4541: \"$ac_try\"") >&5
4542  (eval $ac_try) 2>&5
4543  ac_status=$?
4544  echo "$as_me:4544: \$? = $ac_status" >&5
4545  (exit $ac_status); }; }; then
4546  cf_XOPEN_SOURCE_set=yes
4547else
4548  echo "$as_me: failed program was:" >&5
4549cat conftest.$ac_ext >&5
4550cf_XOPEN_SOURCE_set=no
4551fi
4552rm -f conftest.$ac_objext conftest.$ac_ext
4553	echo "$as_me:4553: result: $cf_XOPEN_SOURCE_set" >&5
4554echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
4555	if test $cf_XOPEN_SOURCE_set = yes
4556	then
4557		cat >conftest.$ac_ext <<_ACEOF
4558#line 4558 "configure"
4559#include "confdefs.h"
4560#include <stdlib.h>
4561int
4562main (void)
4563{
4564
4565#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
4566make an error
4567#endif
4568  ;
4569  return 0;
4570}
4571_ACEOF
4572rm -f conftest.$ac_objext
4573if { (eval echo "$as_me:4573: \"$ac_compile\"") >&5
4574  (eval $ac_compile) 2>&5
4575  ac_status=$?
4576  echo "$as_me:4576: \$? = $ac_status" >&5
4577  (exit $ac_status); } &&
4578         { ac_try='test -s conftest.$ac_objext'
4579  { (eval echo "$as_me:4579: \"$ac_try\"") >&5
4580  (eval $ac_try) 2>&5
4581  ac_status=$?
4582  echo "$as_me:4582: \$? = $ac_status" >&5
4583  (exit $ac_status); }; }; then
4584  cf_XOPEN_SOURCE_set_ok=yes
4585else
4586  echo "$as_me: failed program was:" >&5
4587cat conftest.$ac_ext >&5
4588cf_XOPEN_SOURCE_set_ok=no
4589fi
4590rm -f conftest.$ac_objext conftest.$ac_ext
4591		if test $cf_XOPEN_SOURCE_set_ok = no
4592		then
4593			{ echo "$as_me:4593: WARNING: _XOPEN_SOURCE is lower than requested" >&5
4594echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
4595		fi
4596	else
4597
4598echo "$as_me:4598: checking if we should define _XOPEN_SOURCE" >&5
4599echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
4600if test "${cf_cv_xopen_source+set}" = set; then
4601  echo $ECHO_N "(cached) $ECHO_C" >&6
4602else
4603
4604	cat >conftest.$ac_ext <<_ACEOF
4605#line 4605 "configure"
4606#include "confdefs.h"
4607
4608#include <stdlib.h>
4609#include <string.h>
4610#include <sys/types.h>
4611
4612int
4613main (void)
4614{
4615
4616#ifndef _XOPEN_SOURCE
4617make an error
4618#endif
4619  ;
4620  return 0;
4621}
4622_ACEOF
4623rm -f conftest.$ac_objext
4624if { (eval echo "$as_me:4624: \"$ac_compile\"") >&5
4625  (eval $ac_compile) 2>&5
4626  ac_status=$?
4627  echo "$as_me:4627: \$? = $ac_status" >&5
4628  (exit $ac_status); } &&
4629         { ac_try='test -s conftest.$ac_objext'
4630  { (eval echo "$as_me:4630: \"$ac_try\"") >&5
4631  (eval $ac_try) 2>&5
4632  ac_status=$?
4633  echo "$as_me:4633: \$? = $ac_status" >&5
4634  (exit $ac_status); }; }; then
4635  cf_cv_xopen_source=no
4636else
4637  echo "$as_me: failed program was:" >&5
4638cat conftest.$ac_ext >&5
4639cf_save="$CPPFLAGS"
4640
4641	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4642	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
4643
4644	 cat >conftest.$ac_ext <<_ACEOF
4645#line 4645 "configure"
4646#include "confdefs.h"
4647
4648#include <stdlib.h>
4649#include <string.h>
4650#include <sys/types.h>
4651
4652int
4653main (void)
4654{
4655
4656#ifdef _XOPEN_SOURCE
4657make an error
4658#endif
4659  ;
4660  return 0;
4661}
4662_ACEOF
4663rm -f conftest.$ac_objext
4664if { (eval echo "$as_me:4664: \"$ac_compile\"") >&5
4665  (eval $ac_compile) 2>&5
4666  ac_status=$?
4667  echo "$as_me:4667: \$? = $ac_status" >&5
4668  (exit $ac_status); } &&
4669         { ac_try='test -s conftest.$ac_objext'
4670  { (eval echo "$as_me:4670: \"$ac_try\"") >&5
4671  (eval $ac_try) 2>&5
4672  ac_status=$?
4673  echo "$as_me:4673: \$? = $ac_status" >&5
4674  (exit $ac_status); }; }; then
4675  cf_cv_xopen_source=no
4676else
4677  echo "$as_me: failed program was:" >&5
4678cat conftest.$ac_ext >&5
4679cf_cv_xopen_source=$cf_XOPEN_SOURCE
4680fi
4681rm -f conftest.$ac_objext conftest.$ac_ext
4682	CPPFLAGS="$cf_save"
4683
4684fi
4685rm -f conftest.$ac_objext conftest.$ac_ext
4686
4687fi
4688echo "$as_me:4688: result: $cf_cv_xopen_source" >&5
4689echo "${ECHO_T}$cf_cv_xopen_source" >&6
4690
4691if test "$cf_cv_xopen_source" != no ; then
4692
4693CFLAGS=`echo "$CFLAGS" | \
4694	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4695		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4696
4697CPPFLAGS=`echo "$CPPFLAGS" | \
4698	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
4699		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
4700
4701	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
4702
4703cf_fix_cppflags=no
4704cf_new_cflags=
4705cf_new_cppflags=
4706cf_new_extra_cppflags=
4707
4708for cf_add_cflags in $cf_temp_xopen_source
4709do
4710case $cf_fix_cppflags in
4711no)
4712	case $cf_add_cflags in
4713	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
4714		case $cf_add_cflags in
4715		-D*)
4716			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
4717
4718			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4719				&& test -z "${cf_tst_cflags}" \
4720				&& cf_fix_cppflags=yes
4721
4722			if test $cf_fix_cppflags = yes ; then
4723
4724	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4725	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4726
4727				continue
4728			elif test "${cf_tst_cflags}" = "\"'" ; then
4729
4730	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4731	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4732
4733				continue
4734			fi
4735			;;
4736		esac
4737		case "$CPPFLAGS" in
4738		*$cf_add_cflags)
4739			;;
4740		*)
4741			case $cf_add_cflags in
4742			-D*)
4743				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
4744
4745CPPFLAGS=`echo "$CPPFLAGS" | \
4746	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
4747		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
4748
4749				;;
4750			esac
4751
4752	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
4753	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
4754
4755			;;
4756		esac
4757		;;
4758	*)
4759
4760	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
4761	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
4762
4763		;;
4764	esac
4765	;;
4766yes)
4767
4768	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
4769	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
4770
4771	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
4772
4773	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
4774		&& test -z "${cf_tst_cflags}" \
4775		&& cf_fix_cppflags=no
4776	;;
4777esac
4778done
4779
4780if test -n "$cf_new_cflags" ; then
4781
4782	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
4783	CFLAGS="${CFLAGS}$cf_new_cflags"
4784
4785fi
4786
4787if test -n "$cf_new_cppflags" ; then
4788
4789	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4790	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
4791
4792fi
4793
4794if test -n "$cf_new_extra_cppflags" ; then
4795
4796	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
4797	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
4798
4799fi
4800
4801fi
4802
4803	fi
4804fi
4805fi # cf_cv_posix_visible
4806
4807echo "$as_me:4807: checking if SIGWINCH is defined" >&5
4808echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
4809if test "${cf_cv_define_sigwinch+set}" = set; then
4810  echo $ECHO_N "(cached) $ECHO_C" >&6
4811else
4812
4813	cat >conftest.$ac_ext <<_ACEOF
4814#line 4814 "configure"
4815#include "confdefs.h"
4816
4817#include <sys/types.h>
4818#include <sys/signal.h>
4819
4820int
4821main (void)
4822{
4823int x = SIGWINCH; (void)x
4824  ;
4825  return 0;
4826}
4827_ACEOF
4828rm -f conftest.$ac_objext
4829if { (eval echo "$as_me:4829: \"$ac_compile\"") >&5
4830  (eval $ac_compile) 2>&5
4831  ac_status=$?
4832  echo "$as_me:4832: \$? = $ac_status" >&5
4833  (exit $ac_status); } &&
4834         { ac_try='test -s conftest.$ac_objext'
4835  { (eval echo "$as_me:4835: \"$ac_try\"") >&5
4836  (eval $ac_try) 2>&5
4837  ac_status=$?
4838  echo "$as_me:4838: \$? = $ac_status" >&5
4839  (exit $ac_status); }; }; then
4840  cf_cv_define_sigwinch=yes
4841else
4842  echo "$as_me: failed program was:" >&5
4843cat conftest.$ac_ext >&5
4844cat >conftest.$ac_ext <<_ACEOF
4845#line 4845 "configure"
4846#include "confdefs.h"
4847
4848#undef _XOPEN_SOURCE
4849#undef _POSIX_SOURCE
4850#undef _POSIX_C_SOURCE
4851#include <sys/types.h>
4852#include <sys/signal.h>
4853
4854int
4855main (void)
4856{
4857int x = SIGWINCH; (void)x
4858  ;
4859  return 0;
4860}
4861_ACEOF
4862rm -f conftest.$ac_objext
4863if { (eval echo "$as_me:4863: \"$ac_compile\"") >&5
4864  (eval $ac_compile) 2>&5
4865  ac_status=$?
4866  echo "$as_me:4866: \$? = $ac_status" >&5
4867  (exit $ac_status); } &&
4868         { ac_try='test -s conftest.$ac_objext'
4869  { (eval echo "$as_me:4869: \"$ac_try\"") >&5
4870  (eval $ac_try) 2>&5
4871  ac_status=$?
4872  echo "$as_me:4872: \$? = $ac_status" >&5
4873  (exit $ac_status); }; }; then
4874  cf_cv_define_sigwinch=maybe
4875else
4876  echo "$as_me: failed program was:" >&5
4877cat conftest.$ac_ext >&5
4878cf_cv_define_sigwinch=no
4879fi
4880rm -f conftest.$ac_objext conftest.$ac_ext
4881
4882fi
4883rm -f conftest.$ac_objext conftest.$ac_ext
4884
4885fi
4886echo "$as_me:4886: result: $cf_cv_define_sigwinch" >&5
4887echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
4888
4889if test "$cf_cv_define_sigwinch" = maybe ; then
4890echo "$as_me:4890: checking for actual SIGWINCH definition" >&5
4891echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
4892if test "${cf_cv_fixup_sigwinch+set}" = set; then
4893  echo $ECHO_N "(cached) $ECHO_C" >&6
4894else
4895
4896cf_cv_fixup_sigwinch=unknown
4897cf_sigwinch=32
4898while test $cf_sigwinch != 1
4899do
4900	cat >conftest.$ac_ext <<_ACEOF
4901#line 4901 "configure"
4902#include "confdefs.h"
4903
4904#undef _XOPEN_SOURCE
4905#undef _POSIX_SOURCE
4906#undef _POSIX_C_SOURCE
4907#include <sys/types.h>
4908#include <sys/signal.h>
4909
4910int
4911main (void)
4912{
4913
4914#if SIGWINCH != $cf_sigwinch
4915make an error
4916#endif
4917int x = SIGWINCH; (void)x
4918  ;
4919  return 0;
4920}
4921_ACEOF
4922rm -f conftest.$ac_objext
4923if { (eval echo "$as_me:4923: \"$ac_compile\"") >&5
4924  (eval $ac_compile) 2>&5
4925  ac_status=$?
4926  echo "$as_me:4926: \$? = $ac_status" >&5
4927  (exit $ac_status); } &&
4928         { ac_try='test -s conftest.$ac_objext'
4929  { (eval echo "$as_me:4929: \"$ac_try\"") >&5
4930  (eval $ac_try) 2>&5
4931  ac_status=$?
4932  echo "$as_me:4932: \$? = $ac_status" >&5
4933  (exit $ac_status); }; }; then
4934  cf_cv_fixup_sigwinch=$cf_sigwinch
4935	 break
4936else
4937  echo "$as_me: failed program was:" >&5
4938cat conftest.$ac_ext >&5
4939fi
4940rm -f conftest.$ac_objext conftest.$ac_ext
4941
4942cf_sigwinch=`expr $cf_sigwinch - 1`
4943done
4944
4945fi
4946echo "$as_me:4946: result: $cf_cv_fixup_sigwinch" >&5
4947echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
4948
4949	if test "$cf_cv_fixup_sigwinch" != unknown ; then
4950		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
4951	fi
4952fi
4953
4954case $cf_cv_system_name in
4955os2*)
4956	CFLAGS="$CFLAGS -Zmt"
4957
4958	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
4959	CPPFLAGS="${CPPFLAGS}-D__ST_MT_ERRNO__"
4960
4961	CXXFLAGS="$CXXFLAGS -Zmt"
4962	# autoconf's macro sets -Zexe and suffix both, which conflict:w
4963	LDFLAGS="$LDFLAGS -Zmt -Zcrtdll"
4964	ac_cv_exeext=.exe
4965	;;
4966esac
4967
4968PROG_EXT="$EXEEXT"
4969
4970test -n "$PROG_EXT" &&
4971cat >>confdefs.h <<EOF
4972#define PROG_EXT "$PROG_EXT"
4973EOF
4974
4975	case $cf_cv_system_name in
4976	OS/2*|os2*)
4977		if test "$DFT_LWR_MODEL" = libtool; then
4978			LIB_PREFIX='lib'
4979		else
4980			LIB_PREFIX=''
4981		fi
4982		;;
4983	*-msvc*)
4984		LIB_PREFIX=''
4985		;;
4986	*)	LIB_PREFIX='lib'
4987		;;
4988	esac
4989LIB_PREFIX=$LIB_PREFIX
4990
4991echo "$as_me:4991: checking whether ln -s works" >&5
4992echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
4993LN_S=$as_ln_s
4994if test "$LN_S" = "ln -s"; then
4995  echo "$as_me:4995: result: yes" >&5
4996echo "${ECHO_T}yes" >&6
4997else
4998  echo "$as_me:4998: result: no, using $LN_S" >&5
4999echo "${ECHO_T}no, using $LN_S" >&6
5000fi
5001
5002if test "$cross_compiling" = yes ; then
5003
5004	# defaults that we might want to override
5005	: ${BUILD_CFLAGS:=''}
5006	: ${BUILD_CPPFLAGS:='-I$(INCDIR)'}
5007	: ${BUILD_LDFLAGS:=''}
5008	: ${BUILD_LIBS:=''}
5009	: ${BUILD_EXEEXT:='$x'}
5010	: ${BUILD_OBJEXT:='o'}
5011
5012# Check whether --with-build-cc or --without-build-cc was given.
5013if test "${with_build_cc+set}" = set; then
5014  withval="$with_build_cc"
5015  BUILD_CC="$withval"
5016else
5017  for ac_prog in gcc clang c99 c89 cc cl
5018do
5019  # Extract the first word of "$ac_prog", so it can be a program name with args.
5020set dummy $ac_prog; ac_word=$2
5021echo "$as_me:5021: checking for $ac_word" >&5
5022echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5023if test "${ac_cv_prog_BUILD_CC+set}" = set; then
5024  echo $ECHO_N "(cached) $ECHO_C" >&6
5025else
5026  if test -n "$BUILD_CC"; then
5027  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
5028else
5029  ac_save_IFS=$IFS; IFS=$ac_path_separator
5030ac_dummy="$PATH"
5031for ac_dir in $ac_dummy; do
5032  IFS=$ac_save_IFS
5033  test -z "$ac_dir" && ac_dir=.
5034  $as_executable_p "$ac_dir/$ac_word" || continue
5035ac_cv_prog_BUILD_CC="$ac_prog"
5036echo "$as_me:5036: found $ac_dir/$ac_word" >&5
5037break
5038done
5039
5040fi
5041fi
5042BUILD_CC=$ac_cv_prog_BUILD_CC
5043if test -n "$BUILD_CC"; then
5044  echo "$as_me:5044: result: $BUILD_CC" >&5
5045echo "${ECHO_T}$BUILD_CC" >&6
5046else
5047  echo "$as_me:5047: result: no" >&5
5048echo "${ECHO_T}no" >&6
5049fi
5050
5051  test -n "$BUILD_CC" && break
5052done
5053test -n "$BUILD_CC" || BUILD_CC="none"
5054
5055fi;
5056	echo "$as_me:5056: checking for native build C compiler" >&5
5057echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
5058	echo "$as_me:5058: result: $BUILD_CC" >&5
5059echo "${ECHO_T}$BUILD_CC" >&6
5060
5061	echo "$as_me:5061: checking for native build C preprocessor" >&5
5062echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
5063
5064# Check whether --with-build-cpp or --without-build-cpp was given.
5065if test "${with_build_cpp+set}" = set; then
5066  withval="$with_build_cpp"
5067  BUILD_CPP="$withval"
5068else
5069  BUILD_CPP='${BUILD_CC} -E'
5070fi;
5071	echo "$as_me:5071: result: $BUILD_CPP" >&5
5072echo "${ECHO_T}$BUILD_CPP" >&6
5073
5074	echo "$as_me:5074: checking for native build C flags" >&5
5075echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
5076
5077# Check whether --with-build-cflags or --without-build-cflags was given.
5078if test "${with_build_cflags+set}" = set; then
5079  withval="$with_build_cflags"
5080  BUILD_CFLAGS="$withval"
5081fi;
5082	echo "$as_me:5082: result: $BUILD_CFLAGS" >&5
5083echo "${ECHO_T}$BUILD_CFLAGS" >&6
5084
5085	echo "$as_me:5085: checking for native build C preprocessor-flags" >&5
5086echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
5087
5088# Check whether --with-build-cppflags or --without-build-cppflags was given.
5089if test "${with_build_cppflags+set}" = set; then
5090  withval="$with_build_cppflags"
5091  BUILD_CPPFLAGS="$withval"
5092fi;
5093	echo "$as_me:5093: result: $BUILD_CPPFLAGS" >&5
5094echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
5095
5096	echo "$as_me:5096: checking for native build linker-flags" >&5
5097echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
5098
5099# Check whether --with-build-ldflags or --without-build-ldflags was given.
5100if test "${with_build_ldflags+set}" = set; then
5101  withval="$with_build_ldflags"
5102  BUILD_LDFLAGS="$withval"
5103fi;
5104	echo "$as_me:5104: result: $BUILD_LDFLAGS" >&5
5105echo "${ECHO_T}$BUILD_LDFLAGS" >&6
5106
5107	echo "$as_me:5107: checking for native build linker-libraries" >&5
5108echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
5109
5110# Check whether --with-build-libs or --without-build-libs was given.
5111if test "${with_build_libs+set}" = set; then
5112  withval="$with_build_libs"
5113  BUILD_LIBS="$withval"
5114fi;
5115	echo "$as_me:5115: result: $BUILD_LIBS" >&5
5116echo "${ECHO_T}$BUILD_LIBS" >&6
5117
5118	# this assumes we're on Unix.
5119	BUILD_EXEEXT=
5120	BUILD_OBJEXT=o
5121
5122	: ${BUILD_CC:='${CC}'}
5123
5124	if ( test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}' ) ; then
5125		{ { echo "$as_me:5125: error: Cross-build requires two compilers.
5126Use --with-build-cc to specify the native compiler." >&5
5127echo "$as_me: error: Cross-build requires two compilers.
5128Use --with-build-cc to specify the native compiler." >&2;}
5129   { (exit 1); exit 1; }; }
5130	fi
5131
5132else
5133	: ${BUILD_CC:='${CC}'}
5134	: ${BUILD_CPP:='${CPP}'}
5135	: ${BUILD_CFLAGS:='${CFLAGS}'}
5136	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
5137	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
5138	: ${BUILD_LIBS:='${LIBS}'}
5139	: ${BUILD_EXEEXT:='$x'}
5140	: ${BUILD_OBJEXT:='o'}
5141fi
5142
5143if test -n "$ac_tool_prefix"; then
5144  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
5145set dummy ${ac_tool_prefix}ranlib; ac_word=$2
5146echo "$as_me:5146: checking for $ac_word" >&5
5147echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5148if test "${ac_cv_prog_RANLIB+set}" = set; then
5149  echo $ECHO_N "(cached) $ECHO_C" >&6
5150else
5151  if test -n "$RANLIB"; then
5152  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
5153else
5154  ac_save_IFS=$IFS; IFS=$ac_path_separator
5155ac_dummy="$PATH"
5156for ac_dir in $ac_dummy; do
5157  IFS=$ac_save_IFS
5158  test -z "$ac_dir" && ac_dir=.
5159  $as_executable_p "$ac_dir/$ac_word" || continue
5160ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
5161echo "$as_me:5161: found $ac_dir/$ac_word" >&5
5162break
5163done
5164
5165fi
5166fi
5167RANLIB=$ac_cv_prog_RANLIB
5168if test -n "$RANLIB"; then
5169  echo "$as_me:5169: result: $RANLIB" >&5
5170echo "${ECHO_T}$RANLIB" >&6
5171else
5172  echo "$as_me:5172: result: no" >&5
5173echo "${ECHO_T}no" >&6
5174fi
5175
5176fi
5177if test -z "$ac_cv_prog_RANLIB"; then
5178  ac_ct_RANLIB=$RANLIB
5179  # Extract the first word of "ranlib", so it can be a program name with args.
5180set dummy ranlib; ac_word=$2
5181echo "$as_me:5181: checking for $ac_word" >&5
5182echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5183if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
5184  echo $ECHO_N "(cached) $ECHO_C" >&6
5185else
5186  if test -n "$ac_ct_RANLIB"; then
5187  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
5188else
5189  ac_save_IFS=$IFS; IFS=$ac_path_separator
5190ac_dummy="$PATH"
5191for ac_dir in $ac_dummy; do
5192  IFS=$ac_save_IFS
5193  test -z "$ac_dir" && ac_dir=.
5194  $as_executable_p "$ac_dir/$ac_word" || continue
5195ac_cv_prog_ac_ct_RANLIB="ranlib"
5196echo "$as_me:5196: found $ac_dir/$ac_word" >&5
5197break
5198done
5199
5200  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
5201fi
5202fi
5203ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
5204if test -n "$ac_ct_RANLIB"; then
5205  echo "$as_me:5205: result: $ac_ct_RANLIB" >&5
5206echo "${ECHO_T}$ac_ct_RANLIB" >&6
5207else
5208  echo "$as_me:5208: result: no" >&5
5209echo "${ECHO_T}no" >&6
5210fi
5211
5212  RANLIB=$ac_ct_RANLIB
5213else
5214  RANLIB="$ac_cv_prog_RANLIB"
5215fi
5216
5217if test -n "$ac_tool_prefix"; then
5218  # Extract the first word of "${ac_tool_prefix}ld", so it can be a program name with args.
5219set dummy ${ac_tool_prefix}ld; ac_word=$2
5220echo "$as_me:5220: checking for $ac_word" >&5
5221echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5222if test "${ac_cv_prog_LD+set}" = set; then
5223  echo $ECHO_N "(cached) $ECHO_C" >&6
5224else
5225  if test -n "$LD"; then
5226  ac_cv_prog_LD="$LD" # Let the user override the test.
5227else
5228  ac_save_IFS=$IFS; IFS=$ac_path_separator
5229ac_dummy="$PATH"
5230for ac_dir in $ac_dummy; do
5231  IFS=$ac_save_IFS
5232  test -z "$ac_dir" && ac_dir=.
5233  $as_executable_p "$ac_dir/$ac_word" || continue
5234ac_cv_prog_LD="${ac_tool_prefix}ld"
5235echo "$as_me:5235: found $ac_dir/$ac_word" >&5
5236break
5237done
5238
5239fi
5240fi
5241LD=$ac_cv_prog_LD
5242if test -n "$LD"; then
5243  echo "$as_me:5243: result: $LD" >&5
5244echo "${ECHO_T}$LD" >&6
5245else
5246  echo "$as_me:5246: result: no" >&5
5247echo "${ECHO_T}no" >&6
5248fi
5249
5250fi
5251if test -z "$ac_cv_prog_LD"; then
5252  ac_ct_LD=$LD
5253  # Extract the first word of "ld", so it can be a program name with args.
5254set dummy ld; ac_word=$2
5255echo "$as_me:5255: checking for $ac_word" >&5
5256echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5257if test "${ac_cv_prog_ac_ct_LD+set}" = set; then
5258  echo $ECHO_N "(cached) $ECHO_C" >&6
5259else
5260  if test -n "$ac_ct_LD"; then
5261  ac_cv_prog_ac_ct_LD="$ac_ct_LD" # Let the user override the test.
5262else
5263  ac_save_IFS=$IFS; IFS=$ac_path_separator
5264ac_dummy="$PATH"
5265for ac_dir in $ac_dummy; do
5266  IFS=$ac_save_IFS
5267  test -z "$ac_dir" && ac_dir=.
5268  $as_executable_p "$ac_dir/$ac_word" || continue
5269ac_cv_prog_ac_ct_LD="ld"
5270echo "$as_me:5270: found $ac_dir/$ac_word" >&5
5271break
5272done
5273
5274  test -z "$ac_cv_prog_ac_ct_LD" && ac_cv_prog_ac_ct_LD="ld"
5275fi
5276fi
5277ac_ct_LD=$ac_cv_prog_ac_ct_LD
5278if test -n "$ac_ct_LD"; then
5279  echo "$as_me:5279: result: $ac_ct_LD" >&5
5280echo "${ECHO_T}$ac_ct_LD" >&6
5281else
5282  echo "$as_me:5282: result: no" >&5
5283echo "${ECHO_T}no" >&6
5284fi
5285
5286  LD=$ac_ct_LD
5287else
5288  LD="$ac_cv_prog_LD"
5289fi
5290
5291if test -n "$ac_tool_prefix"; then
5292  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
5293set dummy ${ac_tool_prefix}ar; ac_word=$2
5294echo "$as_me:5294: checking for $ac_word" >&5
5295echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5296if test "${ac_cv_prog_AR+set}" = set; then
5297  echo $ECHO_N "(cached) $ECHO_C" >&6
5298else
5299  if test -n "$AR"; then
5300  ac_cv_prog_AR="$AR" # Let the user override the test.
5301else
5302  ac_save_IFS=$IFS; IFS=$ac_path_separator
5303ac_dummy="$PATH"
5304for ac_dir in $ac_dummy; do
5305  IFS=$ac_save_IFS
5306  test -z "$ac_dir" && ac_dir=.
5307  $as_executable_p "$ac_dir/$ac_word" || continue
5308ac_cv_prog_AR="${ac_tool_prefix}ar"
5309echo "$as_me:5309: found $ac_dir/$ac_word" >&5
5310break
5311done
5312
5313fi
5314fi
5315AR=$ac_cv_prog_AR
5316if test -n "$AR"; then
5317  echo "$as_me:5317: result: $AR" >&5
5318echo "${ECHO_T}$AR" >&6
5319else
5320  echo "$as_me:5320: result: no" >&5
5321echo "${ECHO_T}no" >&6
5322fi
5323
5324fi
5325if test -z "$ac_cv_prog_AR"; then
5326  ac_ct_AR=$AR
5327  # Extract the first word of "ar", so it can be a program name with args.
5328set dummy ar; ac_word=$2
5329echo "$as_me:5329: checking for $ac_word" >&5
5330echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5331if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
5332  echo $ECHO_N "(cached) $ECHO_C" >&6
5333else
5334  if test -n "$ac_ct_AR"; then
5335  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
5336else
5337  ac_save_IFS=$IFS; IFS=$ac_path_separator
5338ac_dummy="$PATH"
5339for ac_dir in $ac_dummy; do
5340  IFS=$ac_save_IFS
5341  test -z "$ac_dir" && ac_dir=.
5342  $as_executable_p "$ac_dir/$ac_word" || continue
5343ac_cv_prog_ac_ct_AR="ar"
5344echo "$as_me:5344: found $ac_dir/$ac_word" >&5
5345break
5346done
5347
5348  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
5349fi
5350fi
5351ac_ct_AR=$ac_cv_prog_ac_ct_AR
5352if test -n "$ac_ct_AR"; then
5353  echo "$as_me:5353: result: $ac_ct_AR" >&5
5354echo "${ECHO_T}$ac_ct_AR" >&6
5355else
5356  echo "$as_me:5356: result: no" >&5
5357echo "${ECHO_T}no" >&6
5358fi
5359
5360  AR=$ac_ct_AR
5361else
5362  AR="$ac_cv_prog_AR"
5363fi
5364
5365echo "$as_me:5365: checking for options to update archives" >&5
5366echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
5367if test "${cf_cv_ar_flags+set}" = set; then
5368  echo $ECHO_N "(cached) $ECHO_C" >&6
5369else
5370
5371	case $cf_cv_system_name in
5372	*-msvc*)
5373		cf_cv_ar_flags=''
5374		cat >mk_static_lib.sh <<-EOF
5375		#!$SHELL
5376		MSVC_BIN="$AR"
5377		out="\$1"
5378		shift
5379		exec \$MSVC_BIN -out:"\$out" \$@
5380		EOF
5381		chmod +x mk_static_lib.sh
5382		AR=`pwd`/mk_static_lib.sh
5383		;;
5384	*)
5385		cf_cv_ar_flags=unknown
5386		for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
5387		do
5388
5389			# check if $ARFLAGS already contains this choice
5390			if test "x$ARFLAGS" != "x" ; then
5391				cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
5392				if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
5393					cf_cv_ar_flags=
5394					break
5395				fi
5396			fi
5397
5398			rm -f conftest.$ac_cv_objext
5399			rm -f conftest.a
5400
5401			cat >conftest.$ac_ext <<EOF
5402#line 5402 "configure"
5403int	testdata[3] = { 123, 456, 789 };
5404EOF
5405			if { (eval echo "$as_me:5405: \"$ac_compile\"") >&5
5406  (eval $ac_compile) 2>&5
5407  ac_status=$?
5408  echo "$as_me:5408: \$? = $ac_status" >&5
5409  (exit $ac_status); } ; then
5410				echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
5411				$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext 2>&5 1>/dev/null
5412				if test -f conftest.a ; then
5413					cf_cv_ar_flags=$cf_ar_flags
5414					break
5415				fi
5416			else
5417				test -n "$verbose" && echo "	cannot compile test-program" 1>&6
5418
5419echo "${as_me:-configure}:5419: testing cannot compile test-program ..." 1>&5
5420
5421				break
5422			fi
5423		done
5424		rm -f conftest.a conftest.$ac_ext conftest.$ac_cv_objext
5425		;;
5426	esac
5427
5428fi
5429echo "$as_me:5429: result: $cf_cv_ar_flags" >&5
5430echo "${ECHO_T}$cf_cv_ar_flags" >&6
5431
5432if test -n "$ARFLAGS" ; then
5433	if test -n "$cf_cv_ar_flags" ; then
5434		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
5435	fi
5436else
5437	ARFLAGS=$cf_cv_ar_flags
5438fi
5439
5440case "$host_cpu:$host_vendor:$host_os" in
5441	# check for cygwin environment
5442	# -DSTATIC is needed for pcre
5443	*:*:*cygwin*)	#(vi
5444		PCRE_DEFINES="$PCRE_DEFINES -DSTATIC"
5445		;;
5446	# SEIUX doesn't have any useful preprocessor symbol
5447	mips:sei:seiux*)	#(vi
5448
5449cat >>confdefs.h <<\EOF
5450#define SEIUX 1
5451EOF
5452
5453		;;
5454	# ISC Interactive Unix likewise
5455	i386:pc:isc*)	#(vi
5456
5457cat >>confdefs.h <<\EOF
5458#define ISC_UNIX 1
5459EOF
5460
5461esac
5462
5463echo "$as_me:5463: checking if you would like to use heapsort" >&5
5464echo $ECHO_N "checking if you would like to use heapsort... $ECHO_C" >&6
5465
5466# Check whether --enable-heapsort or --disable-heapsort was given.
5467if test "${enable_heapsort+set}" = set; then
5468  enableval="$enable_heapsort"
5469  test "$enableval" != no && enableval=yes
5470	if test "$enableval" != "yes" ; then
5471    cf_use_heapsort=no
5472	else
5473		cf_use_heapsort=yes
5474	fi
5475else
5476  enableval=yes
5477	cf_use_heapsort=yes
5478
5479fi;
5480echo "$as_me:5480: result: $cf_use_heapsort" >&5
5481echo "${ECHO_T}$cf_use_heapsort" >&6
5482if test "x$cf_use_heapsort" = xyes; then
5483
5484for ac_func in heapsort
5485do
5486as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
5487echo "$as_me:5487: checking for $ac_func" >&5
5488echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
5489if eval "test \"\${$as_ac_var+set}\" = set"; then
5490  echo $ECHO_N "(cached) $ECHO_C" >&6
5491else
5492  cat >conftest.$ac_ext <<_ACEOF
5493#line 5493 "configure"
5494#include "confdefs.h"
5495#define $ac_func autoconf_temporary
5496#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5497#undef $ac_func
5498
5499#ifdef __cplusplus
5500extern "C"
5501#endif
5502
5503/* We use char because int might match the return type of a gcc2
5504   builtin and then its argument prototype would still apply.  */
5505char $ac_func (void);
5506
5507int
5508main (void)
5509{
5510
5511/* The GNU C library defines stubs for functions which it implements
5512    to always fail with ENOSYS.  Some functions are actually named
5513    something starting with __ and the normal name is an alias.  */
5514#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
5515#error found stub for $ac_func
5516#endif
5517
5518	return $ac_func ();
5519  ;
5520  return 0;
5521}
5522_ACEOF
5523rm -f conftest.$ac_objext conftest$ac_exeext
5524if { (eval echo "$as_me:5524: \"$ac_link\"") >&5
5525  (eval $ac_link) 2>&5
5526  ac_status=$?
5527  echo "$as_me:5527: \$? = $ac_status" >&5
5528  (exit $ac_status); } &&
5529         { ac_try='test -s conftest$ac_exeext'
5530  { (eval echo "$as_me:5530: \"$ac_try\"") >&5
5531  (eval $ac_try) 2>&5
5532  ac_status=$?
5533  echo "$as_me:5533: \$? = $ac_status" >&5
5534  (exit $ac_status); }; }; then
5535  eval "$as_ac_var=yes"
5536else
5537  echo "$as_me: failed program was:" >&5
5538cat conftest.$ac_ext >&5
5539eval "$as_ac_var=no"
5540fi
5541rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
5542fi
5543echo "$as_me:5543: result: `eval echo '${'$as_ac_var'}'`" >&5
5544echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
5545if test `eval echo '${'$as_ac_var'}'` = yes; then
5546  cat >>confdefs.h <<EOF
5547#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
5548EOF
5549
5550fi
5551done
5552
5553	if test x"$ac_cv_func_heapsort" = xyes; then
5554		echo "$as_me:5554: checking if its prototype is compatible with qsort" >&5
5555echo $ECHO_N "checking if its prototype is compatible with qsort... $ECHO_C" >&6
5556		cat >conftest.$ac_ext <<_ACEOF
5557#line 5557 "configure"
5558#include "confdefs.h"
5559
5560#include <stdlib.h>
5561#include <sys/types.h>
5562extern int my_compare(const void *, const void *);
5563
5564int
5565main (void)
5566{
5567
5568	char *base = 0;
5569	heapsort((void *)0, 1, 2, my_compare);
5570
5571  ;
5572  return 0;
5573}
5574_ACEOF
5575rm -f conftest.$ac_objext
5576if { (eval echo "$as_me:5576: \"$ac_compile\"") >&5
5577  (eval $ac_compile) 2>&5
5578  ac_status=$?
5579  echo "$as_me:5579: \$? = $ac_status" >&5
5580  (exit $ac_status); } &&
5581         { ac_try='test -s conftest.$ac_objext'
5582  { (eval echo "$as_me:5582: \"$ac_try\"") >&5
5583  (eval $ac_try) 2>&5
5584  ac_status=$?
5585  echo "$as_me:5585: \$? = $ac_status" >&5
5586  (exit $ac_status); }; }; then
5587  :
5588else
5589  echo "$as_me: failed program was:" >&5
5590cat conftest.$ac_ext >&5
5591cf_use_heapsort=no
5592fi
5593rm -f conftest.$ac_objext conftest.$ac_ext;
5594		echo "$as_me:5594: result: $cf_use_heapsort" >&5
5595echo "${ECHO_T}$cf_use_heapsort" >&6
5596	else
5597		test -n "$verbose" && echo "	will use our own heapsort function" 1>&6
5598
5599echo "${as_me:-configure}:5599: testing will use our own heapsort function ..." 1>&5
5600
5601		EXTRAO_DEP=''
5602		EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/heapsort.o"
5603	fi
5604fi
5605if test "x$cf_use_heapsort" = xyes; then
5606
5607cat >>confdefs.h <<\EOF
5608#define USE_HEAPSORT 1
5609EOF
5610
5611fi
5612
5613# Check whether --with-ispell or --without-ispell was given.
5614if test "${with_ispell+set}" = set; then
5615  withval="$with_ispell"
5616  case "$withval" in #(vi
5617  yes)
5618   { { echo "$as_me:5618: error: expected a value for --with-ispell" >&5
5619echo "$as_me: error: expected a value for --with-ispell" >&2;}
5620   { (exit 1); exit 1; }; }
5621   ;; #(vi
5622  no)
5623   ;; #(vi
5624  *)
5625   # user supplied option-value for "--with-ispell=path"
5626   echo "$as_me:5626: checking for ispell" >&5
5627echo $ECHO_N "checking for ispell... $ECHO_C" >&6
5628   ac_cv_path_PATH_ISPELL="$withval"
5629
5630cat >>confdefs.h <<EOF
5631#define PATH_ISPELL "$withval"
5632EOF
5633
5634cat >>confdefs.h <<\EOF
5635#define HAVE_ISPELL 1
5636EOF
5637   echo "$as_me:5637: result: $withval" >&5
5638echo "${ECHO_T}$withval" >&6
5639   ;;
5640 esac
5641else
5642
5643  # user did not specify "--with-ispell"; do automatic check
5644  # Extract the first word of "ispell", so it can be a program name with args.
5645set dummy ispell; ac_word=$2
5646echo "$as_me:5646: checking for $ac_word" >&5
5647echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5648if test "${ac_cv_path_PATH_ISPELL+set}" = set; then
5649  echo $ECHO_N "(cached) $ECHO_C" >&6
5650else
5651  case $PATH_ISPELL in
5652  [\\/]* | ?:[\\/]*)
5653  ac_cv_path_PATH_ISPELL="$PATH_ISPELL" # Let the user override the test with a path.
5654  ;;
5655  *)
5656  ac_save_IFS=$IFS; IFS=$ac_path_separator
5657ac_dummy="$PATH"
5658for ac_dir in $ac_dummy; do
5659  IFS=$ac_save_IFS
5660  test -z "$ac_dir" && ac_dir=.
5661  if $as_executable_p "$ac_dir/$ac_word"; then
5662   ac_cv_path_PATH_ISPELL="$ac_dir/$ac_word"
5663   echo "$as_me:5663: found $ac_dir/$ac_word" >&5
5664   break
5665fi
5666done
5667
5668  ;;
5669esac
5670fi
5671PATH_ISPELL=$ac_cv_path_PATH_ISPELL
5672
5673if test -n "$PATH_ISPELL"; then
5674  echo "$as_me:5674: result: $PATH_ISPELL" >&5
5675echo "${ECHO_T}$PATH_ISPELL" >&6
5676else
5677  echo "$as_me:5677: result: no" >&5
5678echo "${ECHO_T}no" >&6
5679fi
5680
5681  if test -n "$PATH_ISPELL"; then
5682    cat >>confdefs.h <<EOF
5683#define PATH_ISPELL "$PATH_ISPELL"
5684EOF
5685    cat >>confdefs.h <<\EOF
5686#define HAVE_ISPELL 1
5687EOF
5688  fi
5689
5690fi;
5691
5692# Check whether --with-metamail or --without-metamail was given.
5693if test "${with_metamail+set}" = set; then
5694  withval="$with_metamail"
5695  case "$withval" in #(vi
5696  yes)
5697   { { echo "$as_me:5697: error: expected a value for --with-metamail" >&5
5698echo "$as_me: error: expected a value for --with-metamail" >&2;}
5699   { (exit 1); exit 1; }; }
5700   ;; #(vi
5701  no)
5702   ;; #(vi
5703  *)
5704   # user supplied option-value for "--with-metamail=path"
5705   echo "$as_me:5705: checking for metamail" >&5
5706echo $ECHO_N "checking for metamail... $ECHO_C" >&6
5707   ac_cv_path_PATH_METAMAIL="$withval"
5708
5709cat >>confdefs.h <<EOF
5710#define PATH_METAMAIL "$withval"
5711EOF
5712
5713cat >>confdefs.h <<\EOF
5714#define HAVE_METAMAIL 1
5715EOF
5716   echo "$as_me:5716: result: $withval" >&5
5717echo "${ECHO_T}$withval" >&6
5718   ;;
5719 esac
5720else
5721
5722  # user did not specify "--with-metamail"; do automatic check
5723  # Extract the first word of "metamail", so it can be a program name with args.
5724set dummy metamail; ac_word=$2
5725echo "$as_me:5725: checking for $ac_word" >&5
5726echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5727if test "${ac_cv_path_PATH_METAMAIL+set}" = set; then
5728  echo $ECHO_N "(cached) $ECHO_C" >&6
5729else
5730  case $PATH_METAMAIL in
5731  [\\/]* | ?:[\\/]*)
5732  ac_cv_path_PATH_METAMAIL="$PATH_METAMAIL" # Let the user override the test with a path.
5733  ;;
5734  *)
5735  ac_save_IFS=$IFS; IFS=$ac_path_separator
5736ac_dummy="$PATH"
5737for ac_dir in $ac_dummy; do
5738  IFS=$ac_save_IFS
5739  test -z "$ac_dir" && ac_dir=.
5740  if $as_executable_p "$ac_dir/$ac_word"; then
5741   ac_cv_path_PATH_METAMAIL="$ac_dir/$ac_word"
5742   echo "$as_me:5742: found $ac_dir/$ac_word" >&5
5743   break
5744fi
5745done
5746
5747  ;;
5748esac
5749fi
5750PATH_METAMAIL=$ac_cv_path_PATH_METAMAIL
5751
5752if test -n "$PATH_METAMAIL"; then
5753  echo "$as_me:5753: result: $PATH_METAMAIL" >&5
5754echo "${ECHO_T}$PATH_METAMAIL" >&6
5755else
5756  echo "$as_me:5756: result: no" >&5
5757echo "${ECHO_T}no" >&6
5758fi
5759
5760  if test -n "$PATH_METAMAIL"; then
5761    cat >>confdefs.h <<EOF
5762#define PATH_METAMAIL "$PATH_METAMAIL"
5763EOF
5764    cat >>confdefs.h <<\EOF
5765#define HAVE_METAMAIL 1
5766EOF
5767  fi
5768
5769fi;
5770
5771# Check whether --with-sum or --without-sum was given.
5772if test "${with_sum+set}" = set; then
5773  withval="$with_sum"
5774  case "$withval" in #(vi
5775  yes)
5776   { { echo "$as_me:5776: error: expected a value for --with-sum" >&5
5777echo "$as_me: error: expected a value for --with-sum" >&2;}
5778   { (exit 1); exit 1; }; }
5779   ;; #(vi
5780  no)
5781   ;; #(vi
5782  *)
5783   # user supplied option-value for "--with-sum=path"
5784   echo "$as_me:5784: checking for sum" >&5
5785echo $ECHO_N "checking for sum... $ECHO_C" >&6
5786   ac_cv_path_PATH_SUM="$withval"
5787
5788cat >>confdefs.h <<EOF
5789#define PATH_SUM "$withval"
5790EOF
5791
5792cat >>confdefs.h <<\EOF
5793#define HAVE_SUM 1
5794EOF
5795   echo "$as_me:5795: result: $withval" >&5
5796echo "${ECHO_T}$withval" >&6
5797   ;;
5798 esac
5799else
5800
5801  # user did not specify "--with-sum"; do automatic check
5802  # Extract the first word of "sum", so it can be a program name with args.
5803set dummy sum; ac_word=$2
5804echo "$as_me:5804: checking for $ac_word" >&5
5805echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5806if test "${ac_cv_path_PATH_SUM+set}" = set; then
5807  echo $ECHO_N "(cached) $ECHO_C" >&6
5808else
5809  case $PATH_SUM in
5810  [\\/]* | ?:[\\/]*)
5811  ac_cv_path_PATH_SUM="$PATH_SUM" # Let the user override the test with a path.
5812  ;;
5813  *)
5814  ac_save_IFS=$IFS; IFS=$ac_path_separator
5815ac_dummy="$PATH"
5816for ac_dir in $ac_dummy; do
5817  IFS=$ac_save_IFS
5818  test -z "$ac_dir" && ac_dir=.
5819  if $as_executable_p "$ac_dir/$ac_word"; then
5820   ac_cv_path_PATH_SUM="$ac_dir/$ac_word"
5821   echo "$as_me:5821: found $ac_dir/$ac_word" >&5
5822   break
5823fi
5824done
5825
5826  ;;
5827esac
5828fi
5829PATH_SUM=$ac_cv_path_PATH_SUM
5830
5831if test -n "$PATH_SUM"; then
5832  echo "$as_me:5832: result: $PATH_SUM" >&5
5833echo "${ECHO_T}$PATH_SUM" >&6
5834else
5835  echo "$as_me:5835: result: no" >&5
5836echo "${ECHO_T}no" >&6
5837fi
5838
5839  if test -n "$PATH_SUM"; then
5840    cat >>confdefs.h <<EOF
5841#define PATH_SUM "$PATH_SUM"
5842EOF
5843    cat >>confdefs.h <<\EOF
5844#define HAVE_SUM 1
5845EOF
5846  fi
5847
5848fi;
5849
5850if test $ac_cv_path_PATH_SUM
5851then
5852echo "$as_me:5852: checking if $ac_cv_path_PATH_SUM takes -r" >&5
5853echo $ECHO_N "checking if $ac_cv_path_PATH_SUM takes -r... $ECHO_C" >&6
5854if test "${ac_cv_prog_sum_r+set}" = set; then
5855  echo $ECHO_N "(cached) $ECHO_C" >&6
5856else
5857
5858if { ac_try='$ac_cv_path_PATH_SUM -r config.log 1>&5'
5859  { (eval echo "$as_me:5859: \"$ac_try\"") >&5
5860  (eval $ac_try) 2>&5
5861  ac_status=$?
5862  echo "$as_me:5862: \$? = $ac_status" >&5
5863  (exit $ac_status); }; }
5864then
5865	ac_cv_prog_sum_r=yes
5866else
5867	ac_cv_prog_sum_r=no
5868fi
5869
5870fi
5871
5872if test $ac_cv_prog_sum_r = yes; then
5873
5874cat >>confdefs.h <<\EOF
5875#define SUM_TAKES_DASH_R 1
5876EOF
5877
5878cat >>confdefs.h <<EOF
5879#define PATH_SUM_R "$ac_cv_path_PATH_SUM -r"
5880EOF
5881
5882else
5883	cat >>confdefs.h <<EOF
5884#define PATH_SUM_R "$ac_cv_path_PATH_SUM"
5885EOF
5886
5887fi
5888echo "$as_me:5888: result: $ac_cv_prog_sum_r" >&5
5889echo "${ECHO_T}$ac_cv_prog_sum_r" >&6
5890fi
5891
5892echo "$as_me:5892: checking for default editor" >&5
5893echo $ECHO_N "checking for default editor... $ECHO_C" >&6
5894
5895# Check whether --with-editor or --without-editor was given.
5896if test "${with_editor+set}" = set; then
5897  withval="$with_editor"
5898
5899else
5900  withval="${DEFAULT_EDITOR}"
5901fi; test -n "$withval" && \
5902case "$withval" in #(vi
5903yes)
5904  { { echo "$as_me:5904: error: expected a value for --with-editor" >&5
5905echo "$as_me: error: expected a value for --with-editor" >&2;}
5906   { (exit 1); exit 1; }; }
5907  ;; #(vi
5908no) withval=""
5909  ;;
5910esac
5911DEFAULT_EDITOR="$withval"
5912
5913if test -z "$DEFAULT_EDITOR" ; then
5914    if test -n "$EDITOR" ; then
5915    	DEFAULT_EDITOR="$EDITOR"
5916    elif test -n "$VISUAL" ; then
5917    	DEFAULT_EDITOR="$VISUAL"
5918    else
5919	# Extract the first word of "vi", so it can be a program name with args.
5920set dummy vi; ac_word=$2
5921echo "$as_me:5921: checking for $ac_word" >&5
5922echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5923if test "${ac_cv_path_DEFAULT_EDITOR+set}" = set; then
5924  echo $ECHO_N "(cached) $ECHO_C" >&6
5925else
5926  case $DEFAULT_EDITOR in
5927  [\\/]* | ?:[\\/]*)
5928  ac_cv_path_DEFAULT_EDITOR="$DEFAULT_EDITOR" # Let the user override the test with a path.
5929  ;;
5930  *)
5931  ac_save_IFS=$IFS; IFS=$ac_path_separator
5932ac_dummy="$PATH:/usr/bin:/usr/ucb"
5933for ac_dir in $ac_dummy; do
5934  IFS=$ac_save_IFS
5935  test -z "$ac_dir" && ac_dir=.
5936  if $as_executable_p "$ac_dir/$ac_word"; then
5937   ac_cv_path_DEFAULT_EDITOR="$ac_dir/$ac_word"
5938   echo "$as_me:5938: found $ac_dir/$ac_word" >&5
5939   break
5940fi
5941done
5942
5943  test -z "$ac_cv_path_DEFAULT_EDITOR" && ac_cv_path_DEFAULT_EDITOR="vi"
5944  ;;
5945esac
5946fi
5947DEFAULT_EDITOR=$ac_cv_path_DEFAULT_EDITOR
5948
5949if test -n "$DEFAULT_EDITOR"; then
5950  echo "$as_me:5950: result: $DEFAULT_EDITOR" >&5
5951echo "${ECHO_T}$DEFAULT_EDITOR" >&6
5952else
5953  echo "$as_me:5953: result: no" >&5
5954echo "${ECHO_T}no" >&6
5955fi
5956
5957    fi
5958fi
5959echo "$as_me:5959: result: $DEFAULT_EDITOR" >&5
5960echo "${ECHO_T}$DEFAULT_EDITOR" >&6
5961
5962cat >>confdefs.h <<EOF
5963#define DEFAULT_EDITOR "$DEFAULT_EDITOR"
5964EOF
5965
5966# Extract the first word of "sendmail", so it can be a program name with args.
5967set dummy sendmail; ac_word=$2
5968echo "$as_me:5968: checking for $ac_word" >&5
5969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
5970if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
5971  echo $ECHO_N "(cached) $ECHO_C" >&6
5972else
5973  case $DEFAULT_MAILER in
5974  [\\/]* | ?:[\\/]*)
5975  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
5976  ;;
5977  *)
5978  ac_save_IFS=$IFS; IFS=$ac_path_separator
5979ac_dummy="$PATH:/usr/sbin:/usr/lib"
5980for ac_dir in $ac_dummy; do
5981  IFS=$ac_save_IFS
5982  test -z "$ac_dir" && ac_dir=.
5983  if $as_executable_p "$ac_dir/$ac_word"; then
5984   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
5985   echo "$as_me:5985: found $ac_dir/$ac_word" >&5
5986   break
5987fi
5988done
5989
5990  ;;
5991esac
5992fi
5993DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER
5994
5995if test -n "$DEFAULT_MAILER"; then
5996  echo "$as_me:5996: result: $DEFAULT_MAILER" >&5
5997echo "${ECHO_T}$DEFAULT_MAILER" >&6
5998else
5999  echo "$as_me:5999: result: no" >&5
6000echo "${ECHO_T}no" >&6
6001fi
6002
6003# Check whether --with-mailer or --without-mailer was given.
6004if test "${with_mailer+set}" = set; then
6005  withval="$with_mailer"
6006
6007else
6008  withval="${DEFAULT_MAILER}"
6009fi; test -n "$withval" && \
6010case "$withval" in #(vi
6011yes)
6012  { { echo "$as_me:6012: error: expected a value for --with-mailer" >&5
6013echo "$as_me: error: expected a value for --with-mailer" >&2;}
6014   { (exit 1); exit 1; }; }
6015  ;; #(vi
6016no) withval=""
6017  ;;
6018esac
6019DEFAULT_MAILER="$withval"
6020
6021if test -z "$DEFAULT_MAILER" ; then
6022# Extract the first word of "mailx", so it can be a program name with args.
6023set dummy mailx; ac_word=$2
6024echo "$as_me:6024: checking for $ac_word" >&5
6025echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6026if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
6027  echo $ECHO_N "(cached) $ECHO_C" >&6
6028else
6029  case $DEFAULT_MAILER in
6030  [\\/]* | ?:[\\/]*)
6031  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
6032  ;;
6033  *)
6034  ac_save_IFS=$IFS; IFS=$ac_path_separator
6035ac_dummy="$PATH:/usr/bin"
6036for ac_dir in $ac_dummy; do
6037  IFS=$ac_save_IFS
6038  test -z "$ac_dir" && ac_dir=.
6039  if $as_executable_p "$ac_dir/$ac_word"; then
6040   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
6041   echo "$as_me:6041: found $ac_dir/$ac_word" >&5
6042   break
6043fi
6044done
6045
6046  ;;
6047esac
6048fi
6049DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER
6050
6051if test -n "$DEFAULT_MAILER"; then
6052  echo "$as_me:6052: result: $DEFAULT_MAILER" >&5
6053echo "${ECHO_T}$DEFAULT_MAILER" >&6
6054else
6055  echo "$as_me:6055: result: no" >&5
6056echo "${ECHO_T}no" >&6
6057fi
6058
6059fi
6060if test -z "$DEFAULT_MAILER" ; then
6061# Extract the first word of "mail", so it can be a program name with args.
6062set dummy mail; ac_word=$2
6063echo "$as_me:6063: checking for $ac_word" >&5
6064echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6065if test "${ac_cv_path_DEFAULT_MAILER+set}" = set; then
6066  echo $ECHO_N "(cached) $ECHO_C" >&6
6067else
6068  case $DEFAULT_MAILER in
6069  [\\/]* | ?:[\\/]*)
6070  ac_cv_path_DEFAULT_MAILER="$DEFAULT_MAILER" # Let the user override the test with a path.
6071  ;;
6072  *)
6073  ac_save_IFS=$IFS; IFS=$ac_path_separator
6074ac_dummy="$PATH:/usr/bin"
6075for ac_dir in $ac_dummy; do
6076  IFS=$ac_save_IFS
6077  test -z "$ac_dir" && ac_dir=.
6078  if $as_executable_p "$ac_dir/$ac_word"; then
6079   ac_cv_path_DEFAULT_MAILER="$ac_dir/$ac_word"
6080   echo "$as_me:6080: found $ac_dir/$ac_word" >&5
6081   break
6082fi
6083done
6084
6085  ;;
6086esac
6087fi
6088DEFAULT_MAILER=$ac_cv_path_DEFAULT_MAILER
6089
6090if test -n "$DEFAULT_MAILER"; then
6091  echo "$as_me:6091: result: $DEFAULT_MAILER" >&5
6092echo "${ECHO_T}$DEFAULT_MAILER" >&6
6093else
6094  echo "$as_me:6094: result: no" >&5
6095echo "${ECHO_T}no" >&6
6096fi
6097
6098fi
6099echo "$as_me:6099: checking for default mailer" >&5
6100echo $ECHO_N "checking for default mailer... $ECHO_C" >&6
6101if test -n "$DEFAULT_MAILER" ; then
6102
6103case $cf_cv_system_name in #(vi
6104os2*|cygwin*)
6105	ac_cv_path_DEFAULT_MAILER=`echo "$ac_cv_path_DEFAULT_MAILER" | sed -e 's%\\\\%/%g'`
6106	;;
6107esac
6108
6109case $cf_cv_system_name in #(vi
6110os2*|cygwin*)
6111	DEFAULT_MAILER=`echo "$DEFAULT_MAILER" | sed -e 's%\\\\%/%g'`
6112	;;
6113esac
6114
6115cat >>confdefs.h <<EOF
6116#define DEFAULT_MAILER "$DEFAULT_MAILER"
6117EOF
6118
6119else
6120	DEFAULT_MAILER=none
6121fi
6122echo "$as_me:6122: result: $DEFAULT_MAILER" >&5
6123echo "${ECHO_T}$DEFAULT_MAILER" >&6
6124
6125echo "$as_me:6125: checking for incoming-mail directory" >&5
6126echo $ECHO_N "checking for incoming-mail directory... $ECHO_C" >&6
6127
6128# Check whether --with-mailbox or --without-mailbox was given.
6129if test "${with_mailbox+set}" = set; then
6130  withval="$with_mailbox"
6131
6132else
6133  withval="${DEFAULT_MAILBOX}"
6134fi; test -n "$withval" && \
6135case "$withval" in #(vi
6136yes)
6137  { { echo "$as_me:6137: error: expected a value for --with-mailbox" >&5
6138echo "$as_me: error: expected a value for --with-mailbox" >&2;}
6139   { (exit 1); exit 1; }; }
6140  ;; #(vi
6141no) withval=""
6142  ;;
6143esac
6144DEFAULT_MAILBOX="$withval"
6145
6146if test -z "$DEFAULT_MAILBOX" ; then
6147for cf_dir in \
6148	/var/spool/mail \
6149	/usr/spool/mail \
6150	/var/mail \
6151	/usr/mail \
6152	/mail
6153    do
6154    	if test -d $cf_dir ; then
6155	    DEFAULT_MAILBOX=$cf_dir
6156	    break
6157	fi
6158    done
6159fi
6160if test -n "$DEFAULT_MAILBOX" ; then
6161
6162cat >>confdefs.h <<EOF
6163#define DEFAULT_MAILBOX "$DEFAULT_MAILBOX"
6164EOF
6165
6166else
6167	DEFAULT_MAILBOX=none
6168fi
6169echo "$as_me:6169: result: $DEFAULT_MAILBOX" >&5
6170echo "${ECHO_T}$DEFAULT_MAILBOX" >&6
6171
6172echo "$as_me:6172: checking if you want to use pkg-config" >&5
6173echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
6174
6175# Check whether --with-pkg-config or --without-pkg-config was given.
6176if test "${with_pkg_config+set}" = set; then
6177  withval="$with_pkg_config"
6178  cf_pkg_config=$withval
6179else
6180  cf_pkg_config=yes
6181fi;
6182echo "$as_me:6182: result: $cf_pkg_config" >&5
6183echo "${ECHO_T}$cf_pkg_config" >&6
6184
6185case $cf_pkg_config in
6186no)
6187	PKG_CONFIG=none
6188	;;
6189yes)
6190
6191if test -n "$ac_tool_prefix"; then
6192  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
6193set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
6194echo "$as_me:6194: checking for $ac_word" >&5
6195echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6196if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
6197  echo $ECHO_N "(cached) $ECHO_C" >&6
6198else
6199  case $PKG_CONFIG in
6200  [\\/]* | ?:[\\/]*)
6201  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
6202  ;;
6203  *)
6204  ac_save_IFS=$IFS; IFS=$ac_path_separator
6205ac_dummy="$PATH"
6206for ac_dir in $ac_dummy; do
6207  IFS=$ac_save_IFS
6208  test -z "$ac_dir" && ac_dir=.
6209  if $as_executable_p "$ac_dir/$ac_word"; then
6210   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
6211   echo "$as_me:6211: found $ac_dir/$ac_word" >&5
6212   break
6213fi
6214done
6215
6216  ;;
6217esac
6218fi
6219PKG_CONFIG=$ac_cv_path_PKG_CONFIG
6220
6221if test -n "$PKG_CONFIG"; then
6222  echo "$as_me:6222: result: $PKG_CONFIG" >&5
6223echo "${ECHO_T}$PKG_CONFIG" >&6
6224else
6225  echo "$as_me:6225: result: no" >&5
6226echo "${ECHO_T}no" >&6
6227fi
6228
6229fi
6230if test -z "$ac_cv_path_PKG_CONFIG"; then
6231  ac_pt_PKG_CONFIG=$PKG_CONFIG
6232  # Extract the first word of "pkg-config", so it can be a program name with args.
6233set dummy pkg-config; ac_word=$2
6234echo "$as_me:6234: checking for $ac_word" >&5
6235echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6236if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
6237  echo $ECHO_N "(cached) $ECHO_C" >&6
6238else
6239  case $ac_pt_PKG_CONFIG in
6240  [\\/]* | ?:[\\/]*)
6241  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
6242  ;;
6243  *)
6244  ac_save_IFS=$IFS; IFS=$ac_path_separator
6245ac_dummy="$PATH"
6246for ac_dir in $ac_dummy; do
6247  IFS=$ac_save_IFS
6248  test -z "$ac_dir" && ac_dir=.
6249  if $as_executable_p "$ac_dir/$ac_word"; then
6250   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
6251   echo "$as_me:6251: found $ac_dir/$ac_word" >&5
6252   break
6253fi
6254done
6255
6256  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
6257  ;;
6258esac
6259fi
6260ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
6261
6262if test -n "$ac_pt_PKG_CONFIG"; then
6263  echo "$as_me:6263: result: $ac_pt_PKG_CONFIG" >&5
6264echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
6265else
6266  echo "$as_me:6266: result: no" >&5
6267echo "${ECHO_T}no" >&6
6268fi
6269
6270  PKG_CONFIG=$ac_pt_PKG_CONFIG
6271else
6272  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
6273fi
6274
6275	;;
6276*)
6277	PKG_CONFIG=$withval
6278	;;
6279esac
6280
6281test -z "$PKG_CONFIG" && PKG_CONFIG=none
6282if test "$PKG_CONFIG" != none ; then
6283
6284if test "x$prefix" != xNONE; then
6285	cf_path_syntax="$prefix"
6286else
6287	cf_path_syntax="$ac_default_prefix"
6288fi
6289
6290case ".$PKG_CONFIG" in
6291.\$\(*\)*|.\'*\'*)
6292	;;
6293..|./*|.\\*)
6294	;;
6295.[a-zA-Z]:[\\/]*) # OS/2 EMX
6296	;;
6297.\${*prefix}*|.\${*dir}*)
6298	eval PKG_CONFIG="$PKG_CONFIG"
6299	case ".$PKG_CONFIG" in
6300	.NONE/*)
6301		PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6302		;;
6303	esac
6304	;;
6305.no|.NONE/*)
6306	PKG_CONFIG=`echo $PKG_CONFIG | sed -e s%NONE%$cf_path_syntax%`
6307	;;
6308*)
6309	{ { echo "$as_me:6309: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
6310echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
6311   { (exit 1); exit 1; }; }
6312	;;
6313esac
6314
6315elif test "x$cf_pkg_config" != xno ; then
6316	{ echo "$as_me:6316: WARNING: pkg-config is not installed" >&5
6317echo "$as_me: WARNING: pkg-config is not installed" >&2;}
6318fi
6319
6320## PGP Support
6321echo "$as_me:6321: checking if you want PGP/GPG-Support" >&5
6322echo $ECHO_N "checking if you want PGP/GPG-Support... $ECHO_C" >&6
6323
6324# Check whether --enable-pgp-gpg or --disable-pgp-gpg was given.
6325if test "${enable_pgp_gpg+set}" = set; then
6326  enableval="$enable_pgp_gpg"
6327  test "$enableval" != no && enableval=yes
6328	if test "$enableval" != "yes" ; then
6329    USE_PGP_GPG=no
6330	else
6331		USE_PGP_GPG=yes
6332	fi
6333else
6334  enableval=yes
6335	USE_PGP_GPG=yes
6336
6337fi;
6338echo "$as_me:6338: result: $enableval" >&5
6339echo "${ECHO_T}$enableval" >&6
6340if test "$USE_PGP_GPG" = "yes" ; then
6341
6342# Check whether --with-pgp or --without-pgp was given.
6343if test "${with_pgp+set}" = set; then
6344  withval="$with_pgp"
6345  case "$withval" in #(vi
6346  yes)
6347   { { echo "$as_me:6347: error: expected a value for --with-pgp" >&5
6348echo "$as_me: error: expected a value for --with-pgp" >&2;}
6349   { (exit 1); exit 1; }; }
6350   ;; #(vi
6351  no)
6352   ;; #(vi
6353  *)
6354   # user supplied option-value for "--with-pgp=path"
6355   echo "$as_me:6355: checking for pgp" >&5
6356echo $ECHO_N "checking for pgp... $ECHO_C" >&6
6357   ac_cv_path_PATH_PGP="$withval"
6358
6359cat >>confdefs.h <<EOF
6360#define PATH_PGP "$withval"
6361EOF
6362
6363cat >>confdefs.h <<\EOF
6364#define HAVE_PGP 1
6365EOF
6366   echo "$as_me:6366: result: $withval" >&5
6367echo "${ECHO_T}$withval" >&6
6368   ;;
6369 esac
6370else
6371
6372  # user did not specify "--with-pgp"; do automatic check
6373  # Extract the first word of "pgp", so it can be a program name with args.
6374set dummy pgp; ac_word=$2
6375echo "$as_me:6375: checking for $ac_word" >&5
6376echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6377if test "${ac_cv_path_PATH_PGP+set}" = set; then
6378  echo $ECHO_N "(cached) $ECHO_C" >&6
6379else
6380  case $PATH_PGP in
6381  [\\/]* | ?:[\\/]*)
6382  ac_cv_path_PATH_PGP="$PATH_PGP" # Let the user override the test with a path.
6383  ;;
6384  *)
6385  ac_save_IFS=$IFS; IFS=$ac_path_separator
6386ac_dummy="$PATH"
6387for ac_dir in $ac_dummy; do
6388  IFS=$ac_save_IFS
6389  test -z "$ac_dir" && ac_dir=.
6390  if $as_executable_p "$ac_dir/$ac_word"; then
6391   ac_cv_path_PATH_PGP="$ac_dir/$ac_word"
6392   echo "$as_me:6392: found $ac_dir/$ac_word" >&5
6393   break
6394fi
6395done
6396
6397  ;;
6398esac
6399fi
6400PATH_PGP=$ac_cv_path_PATH_PGP
6401
6402if test -n "$PATH_PGP"; then
6403  echo "$as_me:6403: result: $PATH_PGP" >&5
6404echo "${ECHO_T}$PATH_PGP" >&6
6405else
6406  echo "$as_me:6406: result: no" >&5
6407echo "${ECHO_T}no" >&6
6408fi
6409
6410  if test -n "$PATH_PGP"; then
6411    cat >>confdefs.h <<EOF
6412#define PATH_PGP "$PATH_PGP"
6413EOF
6414    cat >>confdefs.h <<\EOF
6415#define HAVE_PGP 1
6416EOF
6417  fi
6418
6419fi;
6420	# FIXME: check if pgp is pgp2 or pgp6
6421
6422# Check whether --with-pgpk or --without-pgpk was given.
6423if test "${with_pgpk+set}" = set; then
6424  withval="$with_pgpk"
6425  case "$withval" in #(vi
6426  yes)
6427   { { echo "$as_me:6427: error: expected a value for --with-pgpk" >&5
6428echo "$as_me: error: expected a value for --with-pgpk" >&2;}
6429   { (exit 1); exit 1; }; }
6430   ;; #(vi
6431  no)
6432   ;; #(vi
6433  *)
6434   # user supplied option-value for "--with-pgpk=path"
6435   echo "$as_me:6435: checking for pgpk" >&5
6436echo $ECHO_N "checking for pgpk... $ECHO_C" >&6
6437   ac_cv_path_PATH_PGPK="$withval"
6438
6439cat >>confdefs.h <<EOF
6440#define PATH_PGPK "$withval"
6441EOF
6442
6443cat >>confdefs.h <<\EOF
6444#define HAVE_PGPK 1
6445EOF
6446   echo "$as_me:6446: result: $withval" >&5
6447echo "${ECHO_T}$withval" >&6
6448   ;;
6449 esac
6450else
6451
6452  # user did not specify "--with-pgpk"; do automatic check
6453  # Extract the first word of "pgpk", so it can be a program name with args.
6454set dummy pgpk; ac_word=$2
6455echo "$as_me:6455: checking for $ac_word" >&5
6456echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6457if test "${ac_cv_path_PATH_PGPK+set}" = set; then
6458  echo $ECHO_N "(cached) $ECHO_C" >&6
6459else
6460  case $PATH_PGPK in
6461  [\\/]* | ?:[\\/]*)
6462  ac_cv_path_PATH_PGPK="$PATH_PGPK" # Let the user override the test with a path.
6463  ;;
6464  *)
6465  ac_save_IFS=$IFS; IFS=$ac_path_separator
6466ac_dummy="$PATH"
6467for ac_dir in $ac_dummy; do
6468  IFS=$ac_save_IFS
6469  test -z "$ac_dir" && ac_dir=.
6470  if $as_executable_p "$ac_dir/$ac_word"; then
6471   ac_cv_path_PATH_PGPK="$ac_dir/$ac_word"
6472   echo "$as_me:6472: found $ac_dir/$ac_word" >&5
6473   break
6474fi
6475done
6476
6477  ;;
6478esac
6479fi
6480PATH_PGPK=$ac_cv_path_PATH_PGPK
6481
6482if test -n "$PATH_PGPK"; then
6483  echo "$as_me:6483: result: $PATH_PGPK" >&5
6484echo "${ECHO_T}$PATH_PGPK" >&6
6485else
6486  echo "$as_me:6486: result: no" >&5
6487echo "${ECHO_T}no" >&6
6488fi
6489
6490  if test -n "$PATH_PGPK"; then
6491    cat >>confdefs.h <<EOF
6492#define PATH_PGPK "$PATH_PGPK"
6493EOF
6494    cat >>confdefs.h <<\EOF
6495#define HAVE_PGPK 1
6496EOF
6497  fi
6498
6499fi;
6500	# FIXME: remove tailing k
6501
6502# Check whether --with-gpg or --without-gpg was given.
6503if test "${with_gpg+set}" = set; then
6504  withval="$with_gpg"
6505  case "$withval" in #(vi
6506  yes)
6507   { { echo "$as_me:6507: error: expected a value for --with-gpg" >&5
6508echo "$as_me: error: expected a value for --with-gpg" >&2;}
6509   { (exit 1); exit 1; }; }
6510   ;; #(vi
6511  no)
6512   ;; #(vi
6513  *)
6514   # user supplied option-value for "--with-gpg=path"
6515   echo "$as_me:6515: checking for gpg" >&5
6516echo $ECHO_N "checking for gpg... $ECHO_C" >&6
6517   ac_cv_path_PATH_GPG="$withval"
6518
6519cat >>confdefs.h <<EOF
6520#define PATH_GPG "$withval"
6521EOF
6522
6523cat >>confdefs.h <<\EOF
6524#define HAVE_GPG 1
6525EOF
6526   echo "$as_me:6526: result: $withval" >&5
6527echo "${ECHO_T}$withval" >&6
6528   ;;
6529 esac
6530else
6531
6532  # user did not specify "--with-gpg"; do automatic check
6533  # Extract the first word of "gpg", so it can be a program name with args.
6534set dummy gpg; ac_word=$2
6535echo "$as_me:6535: checking for $ac_word" >&5
6536echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6537if test "${ac_cv_path_PATH_GPG+set}" = set; then
6538  echo $ECHO_N "(cached) $ECHO_C" >&6
6539else
6540  case $PATH_GPG in
6541  [\\/]* | ?:[\\/]*)
6542  ac_cv_path_PATH_GPG="$PATH_GPG" # Let the user override the test with a path.
6543  ;;
6544  *)
6545  ac_save_IFS=$IFS; IFS=$ac_path_separator
6546ac_dummy="$PATH"
6547for ac_dir in $ac_dummy; do
6548  IFS=$ac_save_IFS
6549  test -z "$ac_dir" && ac_dir=.
6550  if $as_executable_p "$ac_dir/$ac_word"; then
6551   ac_cv_path_PATH_GPG="$ac_dir/$ac_word"
6552   echo "$as_me:6552: found $ac_dir/$ac_word" >&5
6553   break
6554fi
6555done
6556
6557  ;;
6558esac
6559fi
6560PATH_GPG=$ac_cv_path_PATH_GPG
6561
6562if test -n "$PATH_GPG"; then
6563  echo "$as_me:6563: result: $PATH_GPG" >&5
6564echo "${ECHO_T}$PATH_GPG" >&6
6565else
6566  echo "$as_me:6566: result: no" >&5
6567echo "${ECHO_T}no" >&6
6568fi
6569
6570  if test -n "$PATH_GPG"; then
6571    cat >>confdefs.h <<EOF
6572#define PATH_GPG "$PATH_GPG"
6573EOF
6574    cat >>confdefs.h <<\EOF
6575#define HAVE_GPG 1
6576EOF
6577  fi
6578
6579fi;
6580fi
6581
6582## slrnface
6583
6584# Check whether --with-slrnface or --without-slrnface was given.
6585if test "${with_slrnface+set}" = set; then
6586  withval="$with_slrnface"
6587  case "$withval" in #(vi
6588  yes)
6589   { { echo "$as_me:6589: error: expected a value for --with-slrnface" >&5
6590echo "$as_me: error: expected a value for --with-slrnface" >&2;}
6591   { (exit 1); exit 1; }; }
6592   ;; #(vi
6593  no)
6594   ;; #(vi
6595  *)
6596   # user supplied option-value for "--with-slrnface=path"
6597   echo "$as_me:6597: checking for slrnface" >&5
6598echo $ECHO_N "checking for slrnface... $ECHO_C" >&6
6599   ac_cv_path_PATH_SLRNFACE="$withval"
6600
6601cat >>confdefs.h <<EOF
6602#define PATH_SLRNFACE "$withval"
6603EOF
6604
6605cat >>confdefs.h <<\EOF
6606#define HAVE_SLRNFACE 1
6607EOF
6608   echo "$as_me:6608: result: $withval" >&5
6609echo "${ECHO_T}$withval" >&6
6610   ;;
6611 esac
6612else
6613
6614  # user did not specify "--with-slrnface"; do automatic check
6615  # Extract the first word of "slrnface", so it can be a program name with args.
6616set dummy slrnface; ac_word=$2
6617echo "$as_me:6617: checking for $ac_word" >&5
6618echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6619if test "${ac_cv_path_PATH_SLRNFACE+set}" = set; then
6620  echo $ECHO_N "(cached) $ECHO_C" >&6
6621else
6622  case $PATH_SLRNFACE in
6623  [\\/]* | ?:[\\/]*)
6624  ac_cv_path_PATH_SLRNFACE="$PATH_SLRNFACE" # Let the user override the test with a path.
6625  ;;
6626  *)
6627  ac_save_IFS=$IFS; IFS=$ac_path_separator
6628ac_dummy="$PATH"
6629for ac_dir in $ac_dummy; do
6630  IFS=$ac_save_IFS
6631  test -z "$ac_dir" && ac_dir=.
6632  if $as_executable_p "$ac_dir/$ac_word"; then
6633   ac_cv_path_PATH_SLRNFACE="$ac_dir/$ac_word"
6634   echo "$as_me:6634: found $ac_dir/$ac_word" >&5
6635   break
6636fi
6637done
6638
6639  ;;
6640esac
6641fi
6642PATH_SLRNFACE=$ac_cv_path_PATH_SLRNFACE
6643
6644if test -n "$PATH_SLRNFACE"; then
6645  echo "$as_me:6645: result: $PATH_SLRNFACE" >&5
6646echo "${ECHO_T}$PATH_SLRNFACE" >&6
6647else
6648  echo "$as_me:6648: result: no" >&5
6649echo "${ECHO_T}no" >&6
6650fi
6651
6652  if test -n "$PATH_SLRNFACE"; then
6653    cat >>confdefs.h <<EOF
6654#define PATH_SLRNFACE "$PATH_SLRNFACE"
6655EOF
6656    cat >>confdefs.h <<\EOF
6657#define HAVE_SLRNFACE 1
6658EOF
6659  fi
6660
6661fi;
6662if test -n "$ac_cv_path_PATH_SLRNFACE"; then
6663	EXTRAO_DEP=""
6664	EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/xface.o"
6665fi
6666
6667## Default shell
6668
6669# Check whether --with-shell or --without-shell was given.
6670if test "${with_shell+set}" = set; then
6671  withval="$with_shell"
6672  cf_cv_default_shell=$withval
6673else
6674  cf_cv_default_shell=
6675fi;
6676
6677echo "$as_me:6677: checking for the default shell program" >&5
6678echo $ECHO_N "checking for the default shell program... $ECHO_C" >&6
6679cf_shell_progs="$cf_cv_default_shell"
6680if test -z "$cf_shell_progs" ; then
6681	cf_shell_progs="sh ksh bash zsh pdksh mksh jsh keysh ash dash"
6682	# TIN preferred default shell for BSD systems is csh. Others are sh.
6683	cat >conftest.$ac_ext <<_ACEOF
6684#line 6684 "configure"
6685#include "confdefs.h"
6686
6687#include <sys/params.h>
6688int
6689main (void)
6690{
6691
6692#if (defined(BSD) && (BSD >= 199103))
6693#else
6694make an error
6695#endif
6696
6697  ;
6698  return 0;
6699}
6700_ACEOF
6701rm -f conftest.$ac_objext
6702if { (eval echo "$as_me:6702: \"$ac_compile\"") >&5
6703  (eval $ac_compile) 2>&5
6704  ac_status=$?
6705  echo "$as_me:6705: \$? = $ac_status" >&5
6706  (exit $ac_status); } &&
6707         { ac_try='test -s conftest.$ac_objext'
6708  { (eval echo "$as_me:6708: \"$ac_try\"") >&5
6709  (eval $ac_try) 2>&5
6710  ac_status=$?
6711  echo "$as_me:6711: \$? = $ac_status" >&5
6712  (exit $ac_status); }; }; then
6713  $cf_shell_progs="csh tcsh $cf_shell_progs"
6714else
6715  echo "$as_me: failed program was:" >&5
6716cat conftest.$ac_ext >&5
6717fi
6718rm -f conftest.$ac_objext conftest.$ac_ext
6719fi
6720
6721echo "${as_me:-configure}:6721: testing paths of shell programs: $cf_shell_progs ..." 1>&5
6722
6723if test -s /etc/shells && test `egrep -c -v '^(#| |    |$)' /etc/shells` -gt 0; then
6724
6725echo "${as_me:-configure}:6725: testing /etc/shells ..." 1>&5
6726
6727	for cf_prog in $cf_shell_progs
6728	do
6729		case $cf_prog in
6730			/*)
6731				cf_pattern="^"$cf_prog"$"
6732				;;
6733			*/*)
6734				{ { echo "$as_me:6734: error: Program name must be absolute or filename: $cf_prog" >&5
6735echo "$as_me: error: Program name must be absolute or filename: $cf_prog" >&2;}
6736   { (exit 1); exit 1; }; }
6737				;;
6738			*)
6739				cf_pattern="/"$cf_prog"$"
6740				;;
6741		esac
6742		cf_path=`egrep $cf_pattern /etc/shells 2>/dev/null`
6743		if test -n "$cf_path"
6744		then
6745			for cf_shell in $cf_path
6746			do
6747				if test -f "$cf_shell"
6748				then
6749					DEFAULT_SHELL="$cf_shell"
6750					break
6751				fi
6752			done
6753		fi
6754		if test -n "$DEFAULT_SHELL"
6755		then
6756			break
6757		fi
6758	done
6759	echo "$as_me:6759: result: $DEFAULT_SHELL" >&5
6760echo "${ECHO_T}$DEFAULT_SHELL" >&6
6761else
6762
6763echo "${as_me:-configure}:6763: testing $PATH ..." 1>&5
6764
6765for ac_prog in $cf_shell_progs
6766do
6767  # Extract the first word of "$ac_prog", so it can be a program name with args.
6768set dummy $ac_prog; ac_word=$2
6769echo "$as_me:6769: checking for $ac_word" >&5
6770echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6771if test "${ac_cv_path_DEFAULT_SHELL+set}" = set; then
6772  echo $ECHO_N "(cached) $ECHO_C" >&6
6773else
6774  case $DEFAULT_SHELL in
6775  [\\/]* | ?:[\\/]*)
6776  ac_cv_path_DEFAULT_SHELL="$DEFAULT_SHELL" # Let the user override the test with a path.
6777  ;;
6778  *)
6779  ac_save_IFS=$IFS; IFS=$ac_path_separator
6780ac_dummy="$PATH:/bin:/usr/bin:/usr/xpg4/bin:/bin/posix:/usr/bin/posix:/usr/old/bin:/usr/local/bin"
6781for ac_dir in $ac_dummy; do
6782  IFS=$ac_save_IFS
6783  test -z "$ac_dir" && ac_dir=.
6784  if $as_executable_p "$ac_dir/$ac_word"; then
6785   ac_cv_path_DEFAULT_SHELL="$ac_dir/$ac_word"
6786   echo "$as_me:6786: found $ac_dir/$ac_word" >&5
6787   break
6788fi
6789done
6790
6791  ;;
6792esac
6793fi
6794DEFAULT_SHELL=$ac_cv_path_DEFAULT_SHELL
6795
6796if test -n "$DEFAULT_SHELL"; then
6797  echo "$as_me:6797: result: $DEFAULT_SHELL" >&5
6798echo "${ECHO_T}$DEFAULT_SHELL" >&6
6799else
6800  echo "$as_me:6800: result: no" >&5
6801echo "${ECHO_T}no" >&6
6802fi
6803
6804  test -n "$DEFAULT_SHELL" && break
6805done
6806
6807fi
6808if test -z "$DEFAULT_SHELL" ; then
6809	{ echo "$as_me:6809: WARNING: Cannot find the default shell you specified: $cf_shell_progs" >&5
6810echo "$as_me: WARNING: Cannot find the default shell you specified: $cf_shell_progs" >&2;}
6811	if test -f /bin/false ; then
6812		{ echo "$as_me:6812: WARNING: Using /bin/false instead" >&5
6813echo "$as_me: WARNING: Using /bin/false instead" >&2;}
6814		DEFAULT_SHELL=/bin/false
6815	else
6816		{ { echo "$as_me:6816: error: Cannot use /bin/false because it does not exist" >&5
6817echo "$as_me: error: Cannot use /bin/false because it does not exist" >&2;}
6818   { (exit 1); exit 1; }; }
6819	fi
6820fi
6821
6822cat >>confdefs.h <<EOF
6823#define DEFAULT_SHELL "$DEFAULT_SHELL"
6824EOF
6825
6826### check for this early, since it'll override several options
6827echo "$as_me:6827: checking if NNTP-support will be used" >&5
6828echo $ECHO_N "checking if NNTP-support will be used... $ECHO_C" >&6
6829
6830# Check whether --enable-nntp or --disable-nntp was given.
6831if test "${enable_nntp+set}" = set; then
6832  enableval="$enable_nntp"
6833  test "$enableval" != no && enableval=yes
6834	if test "$enableval" != "yes" ; then
6835    USE_NNTP=no
6836	else
6837		USE_NNTP=yes
6838	fi
6839else
6840  enableval=yes
6841	USE_NNTP=yes
6842
6843fi;
6844echo "$as_me:6844: result: $enableval" >&5
6845echo "${ECHO_T}$enableval" >&6
6846
6847USE_SPOOLDIR=yes
6848if test "$USE_NNTP" = "yes" ; then
6849echo "$as_me:6849: checking whether to be NNTP_ONLY" >&5
6850echo $ECHO_N "checking whether to be NNTP_ONLY... $ECHO_C" >&6
6851
6852# Check whether --enable-nntp-only or --disable-nntp-only was given.
6853if test "${enable_nntp_only+set}" = set; then
6854  enableval="$enable_nntp_only"
6855  test "$enableval" != yes && enableval=no
6856	if test "$enableval" != "no" ; then
6857
6858cat >>confdefs.h <<\EOF
6859#define NNTP_ONLY 1
6860EOF
6861
6862	 USE_SPOOLDIR=no
6863	else
6864
6865cat >>confdefs.h <<\EOF
6866#define NNTP_ABLE 1
6867EOF
6868
6869	fi
6870else
6871  enableval=no
6872
6873cat >>confdefs.h <<\EOF
6874#define NNTP_ABLE 1
6875EOF
6876
6877fi;
6878echo "$as_me:6878: result: $enableval" >&5
6879echo "${ECHO_T}$enableval" >&6
6880fi
6881
6882###	use option --enable-debug to compile-in test/development code
6883echo "$as_me:6883: checking if you want to compile-in debug support" >&5
6884echo $ECHO_N "checking if you want to compile-in debug support... $ECHO_C" >&6
6885
6886# Check whether --enable-debug or --disable-debug was given.
6887if test "${enable_debug+set}" = set; then
6888  enableval="$enable_debug"
6889  test "$enableval" != yes && enableval=no
6890	if test "$enableval" != "no" ; then
6891    ENABLE_DEBUG=''
6892	CFLAGS="-g $CFLAGS"
6893	LDFLAGS="-g $LDFLAGS"
6894	else
6895		ENABLE_DEBUG='#'
6896	test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`
6897	fi
6898else
6899  enableval=no
6900	ENABLE_DEBUG='#'
6901	test -z "$save_CFLAGS" && CFLAGS=`echo $CFLAGS|sed -e 's/-g //' -e 's/-g$//'`
6902
6903fi;
6904echo "$as_me:6904: result: $enableval" >&5
6905echo "${ECHO_T}$enableval" >&6
6906
6907###	use option --disable-echo to suppress full display compiling commands
6908
6909echo "$as_me:6909: checking if you want to see long compiling messages" >&5
6910echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
6911
6912# Check whether --enable-echo or --disable-echo was given.
6913if test "${enable_echo+set}" = set; then
6914  enableval="$enable_echo"
6915  test "$enableval" != no && enableval=yes
6916	if test "$enableval" != "yes" ; then
6917
6918	ECHO_LT='--silent'
6919	ECHO_LD='@echo linking $@;'
6920	RULE_CC='@echo compiling $<'
6921	SHOW_CC='@echo compiling $@'
6922	ECHO_CC='@'
6923
6924	else
6925
6926	ECHO_LT=''
6927	ECHO_LD=''
6928	RULE_CC=''
6929	SHOW_CC=''
6930	ECHO_CC=''
6931
6932	fi
6933else
6934  enableval=yes
6935
6936	ECHO_LT=''
6937	ECHO_LD=''
6938	RULE_CC=''
6939	SHOW_CC=''
6940	ECHO_CC=''
6941
6942fi;
6943echo "$as_me:6943: result: $enableval" >&5
6944echo "${ECHO_T}$enableval" >&6
6945
6946### use option --enable-prototypes to turn on optional prototypes
6947echo "$as_me:6947: checking if you want to compile with fallback prototypes" >&5
6948echo $ECHO_N "checking if you want to compile with fallback prototypes... $ECHO_C" >&6
6949
6950# Check whether --enable-prototypes or --disable-prototypes was given.
6951if test "${enable_prototypes+set}" = set; then
6952  enableval="$enable_prototypes"
6953  test "$enableval" != yes && enableval=no
6954	if test "$enableval" != "no" ; then
6955    with_decl_check=yes
6956	else
6957		with_decl_check=no
6958	fi
6959else
6960  enableval=no
6961	with_decl_check=no
6962
6963fi;
6964echo "$as_me:6964: result: $enableval" >&5
6965echo "${ECHO_T}$enableval" >&6
6966
6967###	use option --enable-warnings to turn on all gcc warnings
6968EXTRA_CFLAGS=""
6969if test -n "$GCC"
6970then
6971echo "$as_me:6971: checking if you want to turn on gcc warnings" >&5
6972echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
6973
6974# Check whether --enable-warnings or --disable-warnings was given.
6975if test "${enable_warnings+set}" = set; then
6976  enableval="$enable_warnings"
6977  test "$enableval" != yes && enableval=no
6978	if test "$enableval" != "no" ; then
6979    with_warnings=yes
6980	else
6981		with_warnings=no
6982	fi
6983else
6984  enableval=no
6985	with_warnings=no
6986
6987fi;
6988echo "$as_me:6988: result: $with_warnings" >&5
6989echo "${ECHO_T}$with_warnings" >&6
6990if test "$with_warnings" = "yes"
6991then
6992	with_ext_const=yes
6993	echo "$as_me:6993: checking for X" >&5
6994echo $ECHO_N "checking for X... $ECHO_C" >&6
6995
6996# Check whether --with-x or --without-x was given.
6997if test "${with_x+set}" = set; then
6998  withval="$with_x"
6999
7000fi;
7001# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
7002if test "x$with_x" = xno; then
7003  # The user explicitly disabled X.
7004  have_x=disabled
7005else
7006  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
7007    # Both variables are already set.
7008    have_x=yes
7009  else
7010    if test "${ac_cv_have_x+set}" = set; then
7011  echo $ECHO_N "(cached) $ECHO_C" >&6
7012else
7013  # One or both of the vars are not set, and there is no cached value.
7014ac_x_includes=no ac_x_libraries=no
7015rm -fr conftest.dir
7016if mkdir conftest.dir; then
7017  cd conftest.dir
7018  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
7019  cat >Imakefile <<'EOF'
7020acfindx:
7021	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
7022EOF
7023  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
7024    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
7025    eval `${MAKE-make} acfindx 2>/dev/null | grep -v make`
7026    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
7027    for ac_extension in a so sl dylib dll; do
7028      if test ! -f $ac_im_usrlibdir/libX11.$ac_extension &&
7029         test -f $ac_im_libdir/libX11.$ac_extension; then
7030        ac_im_usrlibdir=$ac_im_libdir; break
7031      fi
7032    done
7033    # Screen out bogus values from the imake configuration.  They are
7034    # bogus both because they are the default anyway, and because
7035    # using them would break gcc on systems where it needs fixed includes.
7036    case $ac_im_incroot in
7037	/usr/include) ;;
7038	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
7039    esac
7040    case $ac_im_usrlibdir in
7041	/usr/lib | /lib) ;;
7042	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
7043    esac
7044  fi
7045  cd ..
7046  rm -fr conftest.dir
7047fi
7048
7049# Standard set of common directories for X headers.
7050# Check X11 before X11Rn because it is often a symlink to the current release.
7051ac_x_header_dirs='
7052/usr/X11/include
7053/usr/X11R7/include
7054/usr/X11R6/include
7055/usr/X11R5/include
7056/usr/X11R4/include
7057
7058/opt/local/include
7059/opt/X11/include
7060
7061/usr/include/X11
7062/usr/include/X11R7
7063/usr/include/X11R6
7064/usr/include/X11R5
7065/usr/include/X11R4
7066
7067/usr/local/X11/include
7068/usr/local/X11R7/include
7069/usr/local/X11R6/include
7070/usr/local/X11R5/include
7071/usr/local/X11R4/include
7072
7073/usr/local/include/X11
7074/usr/local/include/X11R7
7075/usr/local/include/X11R6
7076/usr/local/include/X11R5
7077/usr/local/include/X11R4
7078
7079/usr/X386/include
7080/usr/x386/include
7081/usr/XFree86/include/X11
7082
7083/usr/include
7084/usr/local/include
7085/usr/unsupported/include
7086/usr/athena/include
7087/usr/local/x11r5/include
7088/usr/lpp/Xamples/include
7089
7090/usr/openwin/include
7091/usr/openwin/share/include'
7092
7093if test "$ac_x_includes" = no; then
7094  # Guess where to find include files, by looking for Intrinsic.h.
7095  # First, try using that file with no special directory specified.
7096  cat >conftest.$ac_ext <<_ACEOF
7097#line 7097 "configure"
7098#include "confdefs.h"
7099#include <X11/Intrinsic.h>
7100_ACEOF
7101if { (eval echo "$as_me:7101: \"$ac_cpp conftest.$ac_ext\"") >&5
7102  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
7103  ac_status=$?
7104  egrep -v '^ *\+' conftest.er1 >conftest.err
7105  rm -f conftest.er1
7106  cat conftest.err >&5
7107  echo "$as_me:7107: \$? = $ac_status" >&5
7108  (exit $ac_status); } >/dev/null; then
7109  if test -s conftest.err; then
7110    ac_cpp_err=$ac_c_preproc_warn_flag
7111  else
7112    ac_cpp_err=
7113  fi
7114else
7115  ac_cpp_err=yes
7116fi
7117if test -z "$ac_cpp_err"; then
7118  # We can compile using X headers with no special include directory.
7119ac_x_includes=
7120else
7121  echo "$as_me: failed program was:" >&5
7122  cat conftest.$ac_ext >&5
7123  for ac_dir in $ac_x_header_dirs; do
7124  if test -r "$ac_dir/X11/Intrinsic.h"; then
7125    ac_x_includes=$ac_dir
7126    break
7127  fi
7128done
7129fi
7130rm -f conftest.err conftest.$ac_ext
7131fi # $ac_x_includes = no
7132
7133if test "$ac_x_libraries" = no; then
7134  # Check for the libraries.
7135  # See if we find them without any special options.
7136  # Don't add to $LIBS permanently.
7137  ac_save_LIBS=$LIBS
7138  LIBS="-lXt $LIBS"
7139  cat >conftest.$ac_ext <<_ACEOF
7140#line 7140 "configure"
7141#include "confdefs.h"
7142#include <X11/Intrinsic.h>
7143int
7144main (void)
7145{
7146XtMalloc (0)
7147  ;
7148  return 0;
7149}
7150_ACEOF
7151rm -f conftest.$ac_objext conftest$ac_exeext
7152if { (eval echo "$as_me:7152: \"$ac_link\"") >&5
7153  (eval $ac_link) 2>&5
7154  ac_status=$?
7155  echo "$as_me:7155: \$? = $ac_status" >&5
7156  (exit $ac_status); } &&
7157         { ac_try='test -s conftest$ac_exeext'
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  LIBS=$ac_save_LIBS
7164# We can link X programs with no special library path.
7165ac_x_libraries=
7166else
7167  echo "$as_me: failed program was:" >&5
7168cat conftest.$ac_ext >&5
7169LIBS=$ac_save_LIBS
7170for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
7171do
7172  # Don't even attempt the hair of trying to link an X program!
7173  for ac_extension in a so sl dylib dll; do
7174    if test -r $ac_dir/libXt.$ac_extension; then
7175      ac_x_libraries=$ac_dir
7176      break 2
7177    fi
7178  done
7179done
7180fi
7181rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7182fi # $ac_x_libraries = no
7183
7184if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
7185  # Didn't find X anywhere.  Cache the known absence of X.
7186  ac_cv_have_x="have_x=no"
7187else
7188  # Record where we found X for the cache.
7189  ac_cv_have_x="have_x=yes \
7190	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
7191fi
7192fi
7193
7194  fi
7195  eval "$ac_cv_have_x"
7196fi # $with_x != no
7197
7198if test "$have_x" != yes; then
7199  echo "$as_me:7199: result: $have_x" >&5
7200echo "${ECHO_T}$have_x" >&6
7201  no_x=yes
7202else
7203  # If each of the values was on the command line, it overrides each guess.
7204  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
7205  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
7206  # Update the cache value to reflect the command line values.
7207  ac_cv_have_x="have_x=yes \
7208		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
7209  echo "$as_me:7209: result: libraries $x_libraries, headers $x_includes" >&5
7210echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
7211fi
7212
7213if test "$no_x" = yes; then
7214  # Not all programs may use this symbol, but it does not hurt to define it.
7215
7216cat >>confdefs.h <<\EOF
7217#define X_DISPLAY_MISSING 1
7218EOF
7219
7220  X_CFLAGS= X_PRE_LIBS= X_LIBS= X_EXTRA_LIBS=
7221else
7222  if test -n "$x_includes"; then
7223    X_CFLAGS="$X_CFLAGS -I$x_includes"
7224  fi
7225
7226  # It would also be nice to do this for all -L options, not just this one.
7227  if test -n "$x_libraries"; then
7228    X_LIBS="$X_LIBS -L$x_libraries"
7229    # For Solaris; some versions of Sun CC require a space after -R and
7230    # others require no space.  Words are not sufficient . . . .
7231    case `(uname -sr) 2>/dev/null` in
7232    "SunOS 5"*)
7233      echo "$as_me:7233: checking whether -R must be followed by a space" >&5
7234echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
7235      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
7236      cat >conftest.$ac_ext <<_ACEOF
7237#line 7237 "configure"
7238#include "confdefs.h"
7239
7240int
7241main (void)
7242{
7243
7244  ;
7245  return 0;
7246}
7247_ACEOF
7248rm -f conftest.$ac_objext conftest$ac_exeext
7249if { (eval echo "$as_me:7249: \"$ac_link\"") >&5
7250  (eval $ac_link) 2>&5
7251  ac_status=$?
7252  echo "$as_me:7252: \$? = $ac_status" >&5
7253  (exit $ac_status); } &&
7254         { ac_try='test -s conftest$ac_exeext'
7255  { (eval echo "$as_me:7255: \"$ac_try\"") >&5
7256  (eval $ac_try) 2>&5
7257  ac_status=$?
7258  echo "$as_me:7258: \$? = $ac_status" >&5
7259  (exit $ac_status); }; }; then
7260  ac_R_nospace=yes
7261else
7262  echo "$as_me: failed program was:" >&5
7263cat conftest.$ac_ext >&5
7264ac_R_nospace=no
7265fi
7266rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7267      if test $ac_R_nospace = yes; then
7268	echo "$as_me:7268: result: no" >&5
7269echo "${ECHO_T}no" >&6
7270	X_LIBS="$X_LIBS -R$x_libraries"
7271      else
7272	LIBS="$ac_xsave_LIBS -R $x_libraries"
7273	cat >conftest.$ac_ext <<_ACEOF
7274#line 7274 "configure"
7275#include "confdefs.h"
7276
7277int
7278main (void)
7279{
7280
7281  ;
7282  return 0;
7283}
7284_ACEOF
7285rm -f conftest.$ac_objext conftest$ac_exeext
7286if { (eval echo "$as_me:7286: \"$ac_link\"") >&5
7287  (eval $ac_link) 2>&5
7288  ac_status=$?
7289  echo "$as_me:7289: \$? = $ac_status" >&5
7290  (exit $ac_status); } &&
7291         { ac_try='test -s conftest$ac_exeext'
7292  { (eval echo "$as_me:7292: \"$ac_try\"") >&5
7293  (eval $ac_try) 2>&5
7294  ac_status=$?
7295  echo "$as_me:7295: \$? = $ac_status" >&5
7296  (exit $ac_status); }; }; then
7297  ac_R_space=yes
7298else
7299  echo "$as_me: failed program was:" >&5
7300cat conftest.$ac_ext >&5
7301ac_R_space=no
7302fi
7303rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7304	if test $ac_R_space = yes; then
7305	  echo "$as_me:7305: result: yes" >&5
7306echo "${ECHO_T}yes" >&6
7307	  X_LIBS="$X_LIBS -R $x_libraries"
7308	else
7309	  echo "$as_me:7309: result: neither works" >&5
7310echo "${ECHO_T}neither works" >&6
7311	fi
7312      fi
7313      LIBS=$ac_xsave_LIBS
7314    esac
7315  fi
7316
7317  # Check for system-dependent libraries X programs must link with.
7318  # Do this before checking for the system-independent R6 libraries
7319  # (-lICE), since we may need -lsocket or whatever for X linking.
7320
7321  if test "$ISC" = yes; then
7322    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
7323  else
7324    # Martyn Johnson says this is needed for Ultrix, if the X
7325    # libraries were built with DECnet support.  And Karl Berry says
7326    # the Alpha needs dnet_stub (dnet does not exist).
7327    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
7328    cat >conftest.$ac_ext <<_ACEOF
7329#line 7329 "configure"
7330#include "confdefs.h"
7331
7332/* Override any gcc2 internal prototype to avoid an error.  */
7333#ifdef __cplusplus
7334extern "C"
7335#endif
7336/* We use char because int might match the return type of a gcc2
7337   builtin and then its argument prototype would still apply.  */
7338char XOpenDisplay ();
7339int
7340main (void)
7341{
7342XOpenDisplay ();
7343  ;
7344  return 0;
7345}
7346_ACEOF
7347rm -f conftest.$ac_objext conftest$ac_exeext
7348if { (eval echo "$as_me:7348: \"$ac_link\"") >&5
7349  (eval $ac_link) 2>&5
7350  ac_status=$?
7351  echo "$as_me:7351: \$? = $ac_status" >&5
7352  (exit $ac_status); } &&
7353         { ac_try='test -s conftest$ac_exeext'
7354  { (eval echo "$as_me:7354: \"$ac_try\"") >&5
7355  (eval $ac_try) 2>&5
7356  ac_status=$?
7357  echo "$as_me:7357: \$? = $ac_status" >&5
7358  (exit $ac_status); }; }; then
7359  :
7360else
7361  echo "$as_me: failed program was:" >&5
7362cat conftest.$ac_ext >&5
7363echo "$as_me:7363: checking for dnet_ntoa in -ldnet" >&5
7364echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
7365if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
7366  echo $ECHO_N "(cached) $ECHO_C" >&6
7367else
7368  ac_check_lib_save_LIBS=$LIBS
7369LIBS="-ldnet  $LIBS"
7370cat >conftest.$ac_ext <<_ACEOF
7371#line 7371 "configure"
7372#include "confdefs.h"
7373
7374/* Override any gcc2 internal prototype to avoid an error.  */
7375#ifdef __cplusplus
7376extern "C"
7377#endif
7378/* We use char because int might match the return type of a gcc2
7379   builtin and then its argument prototype would still apply.  */
7380char dnet_ntoa ();
7381int
7382main (void)
7383{
7384dnet_ntoa ();
7385  ;
7386  return 0;
7387}
7388_ACEOF
7389rm -f conftest.$ac_objext conftest$ac_exeext
7390if { (eval echo "$as_me:7390: \"$ac_link\"") >&5
7391  (eval $ac_link) 2>&5
7392  ac_status=$?
7393  echo "$as_me:7393: \$? = $ac_status" >&5
7394  (exit $ac_status); } &&
7395         { ac_try='test -s conftest$ac_exeext'
7396  { (eval echo "$as_me:7396: \"$ac_try\"") >&5
7397  (eval $ac_try) 2>&5
7398  ac_status=$?
7399  echo "$as_me:7399: \$? = $ac_status" >&5
7400  (exit $ac_status); }; }; then
7401  ac_cv_lib_dnet_dnet_ntoa=yes
7402else
7403  echo "$as_me: failed program was:" >&5
7404cat conftest.$ac_ext >&5
7405ac_cv_lib_dnet_dnet_ntoa=no
7406fi
7407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7408LIBS=$ac_check_lib_save_LIBS
7409fi
7410echo "$as_me:7410: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
7411echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
7412if test $ac_cv_lib_dnet_dnet_ntoa = yes; then
7413  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
7414fi
7415
7416    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
7417      echo "$as_me:7417: checking for dnet_ntoa in -ldnet_stub" >&5
7418echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
7419if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
7420  echo $ECHO_N "(cached) $ECHO_C" >&6
7421else
7422  ac_check_lib_save_LIBS=$LIBS
7423LIBS="-ldnet_stub  $LIBS"
7424cat >conftest.$ac_ext <<_ACEOF
7425#line 7425 "configure"
7426#include "confdefs.h"
7427
7428/* Override any gcc2 internal prototype to avoid an error.  */
7429#ifdef __cplusplus
7430extern "C"
7431#endif
7432/* We use char because int might match the return type of a gcc2
7433   builtin and then its argument prototype would still apply.  */
7434char dnet_ntoa ();
7435int
7436main (void)
7437{
7438dnet_ntoa ();
7439  ;
7440  return 0;
7441}
7442_ACEOF
7443rm -f conftest.$ac_objext conftest$ac_exeext
7444if { (eval echo "$as_me:7444: \"$ac_link\"") >&5
7445  (eval $ac_link) 2>&5
7446  ac_status=$?
7447  echo "$as_me:7447: \$? = $ac_status" >&5
7448  (exit $ac_status); } &&
7449         { ac_try='test -s conftest$ac_exeext'
7450  { (eval echo "$as_me:7450: \"$ac_try\"") >&5
7451  (eval $ac_try) 2>&5
7452  ac_status=$?
7453  echo "$as_me:7453: \$? = $ac_status" >&5
7454  (exit $ac_status); }; }; then
7455  ac_cv_lib_dnet_stub_dnet_ntoa=yes
7456else
7457  echo "$as_me: failed program was:" >&5
7458cat conftest.$ac_ext >&5
7459ac_cv_lib_dnet_stub_dnet_ntoa=no
7460fi
7461rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7462LIBS=$ac_check_lib_save_LIBS
7463fi
7464echo "$as_me:7464: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
7465echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
7466if test $ac_cv_lib_dnet_stub_dnet_ntoa = yes; then
7467  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
7468fi
7469
7470    fi
7471fi
7472rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7473    LIBS="$ac_xsave_LIBS"
7474
7475    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
7476    # to get the SysV transport functions.
7477    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
7478    # needs -lnsl.
7479    # The nsl library prevents programs from opening the X display
7480    # on Irix 5.2, according to T.E. Dickey.
7481    # The functions gethostbyname, getservbyname, and inet_addr are
7482    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
7483    echo "$as_me:7483: checking for gethostbyname" >&5
7484echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
7485if test "${ac_cv_func_gethostbyname+set}" = set; then
7486  echo $ECHO_N "(cached) $ECHO_C" >&6
7487else
7488  cat >conftest.$ac_ext <<_ACEOF
7489#line 7489 "configure"
7490#include "confdefs.h"
7491#define gethostbyname autoconf_temporary
7492#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7493#undef gethostbyname
7494
7495#ifdef __cplusplus
7496extern "C"
7497#endif
7498
7499/* We use char because int might match the return type of a gcc2
7500   builtin and then its argument prototype would still apply.  */
7501char gethostbyname (void);
7502
7503int
7504main (void)
7505{
7506
7507/* The GNU C library defines stubs for functions which it implements
7508    to always fail with ENOSYS.  Some functions are actually named
7509    something starting with __ and the normal name is an alias.  */
7510#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
7511#error found stub for gethostbyname
7512#endif
7513
7514	return gethostbyname ();
7515  ;
7516  return 0;
7517}
7518_ACEOF
7519rm -f conftest.$ac_objext conftest$ac_exeext
7520if { (eval echo "$as_me:7520: \"$ac_link\"") >&5
7521  (eval $ac_link) 2>&5
7522  ac_status=$?
7523  echo "$as_me:7523: \$? = $ac_status" >&5
7524  (exit $ac_status); } &&
7525         { ac_try='test -s conftest$ac_exeext'
7526  { (eval echo "$as_me:7526: \"$ac_try\"") >&5
7527  (eval $ac_try) 2>&5
7528  ac_status=$?
7529  echo "$as_me:7529: \$? = $ac_status" >&5
7530  (exit $ac_status); }; }; then
7531  ac_cv_func_gethostbyname=yes
7532else
7533  echo "$as_me: failed program was:" >&5
7534cat conftest.$ac_ext >&5
7535ac_cv_func_gethostbyname=no
7536fi
7537rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7538fi
7539echo "$as_me:7539: result: $ac_cv_func_gethostbyname" >&5
7540echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
7541
7542    if test $ac_cv_func_gethostbyname = no; then
7543      echo "$as_me:7543: checking for gethostbyname in -lnsl" >&5
7544echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
7545if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
7546  echo $ECHO_N "(cached) $ECHO_C" >&6
7547else
7548  ac_check_lib_save_LIBS=$LIBS
7549LIBS="-lnsl  $LIBS"
7550cat >conftest.$ac_ext <<_ACEOF
7551#line 7551 "configure"
7552#include "confdefs.h"
7553
7554/* Override any gcc2 internal prototype to avoid an error.  */
7555#ifdef __cplusplus
7556extern "C"
7557#endif
7558/* We use char because int might match the return type of a gcc2
7559   builtin and then its argument prototype would still apply.  */
7560char gethostbyname ();
7561int
7562main (void)
7563{
7564gethostbyname ();
7565  ;
7566  return 0;
7567}
7568_ACEOF
7569rm -f conftest.$ac_objext conftest$ac_exeext
7570if { (eval echo "$as_me:7570: \"$ac_link\"") >&5
7571  (eval $ac_link) 2>&5
7572  ac_status=$?
7573  echo "$as_me:7573: \$? = $ac_status" >&5
7574  (exit $ac_status); } &&
7575         { ac_try='test -s conftest$ac_exeext'
7576  { (eval echo "$as_me:7576: \"$ac_try\"") >&5
7577  (eval $ac_try) 2>&5
7578  ac_status=$?
7579  echo "$as_me:7579: \$? = $ac_status" >&5
7580  (exit $ac_status); }; }; then
7581  ac_cv_lib_nsl_gethostbyname=yes
7582else
7583  echo "$as_me: failed program was:" >&5
7584cat conftest.$ac_ext >&5
7585ac_cv_lib_nsl_gethostbyname=no
7586fi
7587rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7588LIBS=$ac_check_lib_save_LIBS
7589fi
7590echo "$as_me:7590: result: $ac_cv_lib_nsl_gethostbyname" >&5
7591echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
7592if test $ac_cv_lib_nsl_gethostbyname = yes; then
7593  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
7594fi
7595
7596      if test $ac_cv_lib_nsl_gethostbyname = no; then
7597        echo "$as_me:7597: checking for gethostbyname in -lbsd" >&5
7598echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
7599if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
7600  echo $ECHO_N "(cached) $ECHO_C" >&6
7601else
7602  ac_check_lib_save_LIBS=$LIBS
7603LIBS="-lbsd  $LIBS"
7604cat >conftest.$ac_ext <<_ACEOF
7605#line 7605 "configure"
7606#include "confdefs.h"
7607
7608/* Override any gcc2 internal prototype to avoid an error.  */
7609#ifdef __cplusplus
7610extern "C"
7611#endif
7612/* We use char because int might match the return type of a gcc2
7613   builtin and then its argument prototype would still apply.  */
7614char gethostbyname ();
7615int
7616main (void)
7617{
7618gethostbyname ();
7619  ;
7620  return 0;
7621}
7622_ACEOF
7623rm -f conftest.$ac_objext conftest$ac_exeext
7624if { (eval echo "$as_me:7624: \"$ac_link\"") >&5
7625  (eval $ac_link) 2>&5
7626  ac_status=$?
7627  echo "$as_me:7627: \$? = $ac_status" >&5
7628  (exit $ac_status); } &&
7629         { ac_try='test -s conftest$ac_exeext'
7630  { (eval echo "$as_me:7630: \"$ac_try\"") >&5
7631  (eval $ac_try) 2>&5
7632  ac_status=$?
7633  echo "$as_me:7633: \$? = $ac_status" >&5
7634  (exit $ac_status); }; }; then
7635  ac_cv_lib_bsd_gethostbyname=yes
7636else
7637  echo "$as_me: failed program was:" >&5
7638cat conftest.$ac_ext >&5
7639ac_cv_lib_bsd_gethostbyname=no
7640fi
7641rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7642LIBS=$ac_check_lib_save_LIBS
7643fi
7644echo "$as_me:7644: result: $ac_cv_lib_bsd_gethostbyname" >&5
7645echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
7646if test $ac_cv_lib_bsd_gethostbyname = yes; then
7647  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
7648fi
7649
7650      fi
7651    fi
7652
7653    # lieder@skyler.mavd.honeywell.com says without -lsocket,
7654    # socket/setsockopt and other routines are undefined under SCO ODT
7655    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
7656    # on later versions), says Simon Leinen: it contains gethostby*
7657    # variants that don't use the nameserver (or something).  -lsocket
7658    # must be given before -lnsl if both are needed.  We assume that
7659    # if connect needs -lnsl, so does gethostbyname.
7660    echo "$as_me:7660: checking for connect" >&5
7661echo $ECHO_N "checking for connect... $ECHO_C" >&6
7662if test "${ac_cv_func_connect+set}" = set; then
7663  echo $ECHO_N "(cached) $ECHO_C" >&6
7664else
7665  cat >conftest.$ac_ext <<_ACEOF
7666#line 7666 "configure"
7667#include "confdefs.h"
7668#define connect autoconf_temporary
7669#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7670#undef connect
7671
7672#ifdef __cplusplus
7673extern "C"
7674#endif
7675
7676/* We use char because int might match the return type of a gcc2
7677   builtin and then its argument prototype would still apply.  */
7678char connect (void);
7679
7680int
7681main (void)
7682{
7683
7684/* The GNU C library defines stubs for functions which it implements
7685    to always fail with ENOSYS.  Some functions are actually named
7686    something starting with __ and the normal name is an alias.  */
7687#if defined (__stub_connect) || defined (__stub___connect)
7688#error found stub for connect
7689#endif
7690
7691	return connect ();
7692  ;
7693  return 0;
7694}
7695_ACEOF
7696rm -f conftest.$ac_objext conftest$ac_exeext
7697if { (eval echo "$as_me:7697: \"$ac_link\"") >&5
7698  (eval $ac_link) 2>&5
7699  ac_status=$?
7700  echo "$as_me:7700: \$? = $ac_status" >&5
7701  (exit $ac_status); } &&
7702         { ac_try='test -s conftest$ac_exeext'
7703  { (eval echo "$as_me:7703: \"$ac_try\"") >&5
7704  (eval $ac_try) 2>&5
7705  ac_status=$?
7706  echo "$as_me:7706: \$? = $ac_status" >&5
7707  (exit $ac_status); }; }; then
7708  ac_cv_func_connect=yes
7709else
7710  echo "$as_me: failed program was:" >&5
7711cat conftest.$ac_ext >&5
7712ac_cv_func_connect=no
7713fi
7714rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7715fi
7716echo "$as_me:7716: result: $ac_cv_func_connect" >&5
7717echo "${ECHO_T}$ac_cv_func_connect" >&6
7718
7719    if test $ac_cv_func_connect = no; then
7720      echo "$as_me:7720: checking for connect in -lsocket" >&5
7721echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
7722if test "${ac_cv_lib_socket_connect+set}" = set; then
7723  echo $ECHO_N "(cached) $ECHO_C" >&6
7724else
7725  ac_check_lib_save_LIBS=$LIBS
7726LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
7727cat >conftest.$ac_ext <<_ACEOF
7728#line 7728 "configure"
7729#include "confdefs.h"
7730
7731/* Override any gcc2 internal prototype to avoid an error.  */
7732#ifdef __cplusplus
7733extern "C"
7734#endif
7735/* We use char because int might match the return type of a gcc2
7736   builtin and then its argument prototype would still apply.  */
7737char connect ();
7738int
7739main (void)
7740{
7741connect ();
7742  ;
7743  return 0;
7744}
7745_ACEOF
7746rm -f conftest.$ac_objext conftest$ac_exeext
7747if { (eval echo "$as_me:7747: \"$ac_link\"") >&5
7748  (eval $ac_link) 2>&5
7749  ac_status=$?
7750  echo "$as_me:7750: \$? = $ac_status" >&5
7751  (exit $ac_status); } &&
7752         { ac_try='test -s conftest$ac_exeext'
7753  { (eval echo "$as_me:7753: \"$ac_try\"") >&5
7754  (eval $ac_try) 2>&5
7755  ac_status=$?
7756  echo "$as_me:7756: \$? = $ac_status" >&5
7757  (exit $ac_status); }; }; then
7758  ac_cv_lib_socket_connect=yes
7759else
7760  echo "$as_me: failed program was:" >&5
7761cat conftest.$ac_ext >&5
7762ac_cv_lib_socket_connect=no
7763fi
7764rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7765LIBS=$ac_check_lib_save_LIBS
7766fi
7767echo "$as_me:7767: result: $ac_cv_lib_socket_connect" >&5
7768echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
7769if test $ac_cv_lib_socket_connect = yes; then
7770  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
7771fi
7772
7773    fi
7774
7775    # Guillermo Gomez says -lposix is necessary on A/UX.
7776    echo "$as_me:7776: checking for remove" >&5
7777echo $ECHO_N "checking for remove... $ECHO_C" >&6
7778if test "${ac_cv_func_remove+set}" = set; then
7779  echo $ECHO_N "(cached) $ECHO_C" >&6
7780else
7781  cat >conftest.$ac_ext <<_ACEOF
7782#line 7782 "configure"
7783#include "confdefs.h"
7784#define remove autoconf_temporary
7785#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7786#undef remove
7787
7788#ifdef __cplusplus
7789extern "C"
7790#endif
7791
7792/* We use char because int might match the return type of a gcc2
7793   builtin and then its argument prototype would still apply.  */
7794char remove (void);
7795
7796int
7797main (void)
7798{
7799
7800/* The GNU C library defines stubs for functions which it implements
7801    to always fail with ENOSYS.  Some functions are actually named
7802    something starting with __ and the normal name is an alias.  */
7803#if defined (__stub_remove) || defined (__stub___remove)
7804#error found stub for remove
7805#endif
7806
7807	return remove ();
7808  ;
7809  return 0;
7810}
7811_ACEOF
7812rm -f conftest.$ac_objext conftest$ac_exeext
7813if { (eval echo "$as_me:7813: \"$ac_link\"") >&5
7814  (eval $ac_link) 2>&5
7815  ac_status=$?
7816  echo "$as_me:7816: \$? = $ac_status" >&5
7817  (exit $ac_status); } &&
7818         { ac_try='test -s conftest$ac_exeext'
7819  { (eval echo "$as_me:7819: \"$ac_try\"") >&5
7820  (eval $ac_try) 2>&5
7821  ac_status=$?
7822  echo "$as_me:7822: \$? = $ac_status" >&5
7823  (exit $ac_status); }; }; then
7824  ac_cv_func_remove=yes
7825else
7826  echo "$as_me: failed program was:" >&5
7827cat conftest.$ac_ext >&5
7828ac_cv_func_remove=no
7829fi
7830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7831fi
7832echo "$as_me:7832: result: $ac_cv_func_remove" >&5
7833echo "${ECHO_T}$ac_cv_func_remove" >&6
7834
7835    if test $ac_cv_func_remove = no; then
7836      echo "$as_me:7836: checking for remove in -lposix" >&5
7837echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
7838if test "${ac_cv_lib_posix_remove+set}" = set; then
7839  echo $ECHO_N "(cached) $ECHO_C" >&6
7840else
7841  ac_check_lib_save_LIBS=$LIBS
7842LIBS="-lposix  $LIBS"
7843cat >conftest.$ac_ext <<_ACEOF
7844#line 7844 "configure"
7845#include "confdefs.h"
7846
7847/* Override any gcc2 internal prototype to avoid an error.  */
7848#ifdef __cplusplus
7849extern "C"
7850#endif
7851/* We use char because int might match the return type of a gcc2
7852   builtin and then its argument prototype would still apply.  */
7853char remove ();
7854int
7855main (void)
7856{
7857remove ();
7858  ;
7859  return 0;
7860}
7861_ACEOF
7862rm -f conftest.$ac_objext conftest$ac_exeext
7863if { (eval echo "$as_me:7863: \"$ac_link\"") >&5
7864  (eval $ac_link) 2>&5
7865  ac_status=$?
7866  echo "$as_me:7866: \$? = $ac_status" >&5
7867  (exit $ac_status); } &&
7868         { ac_try='test -s conftest$ac_exeext'
7869  { (eval echo "$as_me:7869: \"$ac_try\"") >&5
7870  (eval $ac_try) 2>&5
7871  ac_status=$?
7872  echo "$as_me:7872: \$? = $ac_status" >&5
7873  (exit $ac_status); }; }; then
7874  ac_cv_lib_posix_remove=yes
7875else
7876  echo "$as_me: failed program was:" >&5
7877cat conftest.$ac_ext >&5
7878ac_cv_lib_posix_remove=no
7879fi
7880rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7881LIBS=$ac_check_lib_save_LIBS
7882fi
7883echo "$as_me:7883: result: $ac_cv_lib_posix_remove" >&5
7884echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
7885if test $ac_cv_lib_posix_remove = yes; then
7886  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
7887fi
7888
7889    fi
7890
7891    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
7892    echo "$as_me:7892: checking for shmat" >&5
7893echo $ECHO_N "checking for shmat... $ECHO_C" >&6
7894if test "${ac_cv_func_shmat+set}" = set; then
7895  echo $ECHO_N "(cached) $ECHO_C" >&6
7896else
7897  cat >conftest.$ac_ext <<_ACEOF
7898#line 7898 "configure"
7899#include "confdefs.h"
7900#define shmat autoconf_temporary
7901#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
7902#undef shmat
7903
7904#ifdef __cplusplus
7905extern "C"
7906#endif
7907
7908/* We use char because int might match the return type of a gcc2
7909   builtin and then its argument prototype would still apply.  */
7910char shmat (void);
7911
7912int
7913main (void)
7914{
7915
7916/* The GNU C library defines stubs for functions which it implements
7917    to always fail with ENOSYS.  Some functions are actually named
7918    something starting with __ and the normal name is an alias.  */
7919#if defined (__stub_shmat) || defined (__stub___shmat)
7920#error found stub for shmat
7921#endif
7922
7923	return shmat ();
7924  ;
7925  return 0;
7926}
7927_ACEOF
7928rm -f conftest.$ac_objext conftest$ac_exeext
7929if { (eval echo "$as_me:7929: \"$ac_link\"") >&5
7930  (eval $ac_link) 2>&5
7931  ac_status=$?
7932  echo "$as_me:7932: \$? = $ac_status" >&5
7933  (exit $ac_status); } &&
7934         { ac_try='test -s conftest$ac_exeext'
7935  { (eval echo "$as_me:7935: \"$ac_try\"") >&5
7936  (eval $ac_try) 2>&5
7937  ac_status=$?
7938  echo "$as_me:7938: \$? = $ac_status" >&5
7939  (exit $ac_status); }; }; then
7940  ac_cv_func_shmat=yes
7941else
7942  echo "$as_me: failed program was:" >&5
7943cat conftest.$ac_ext >&5
7944ac_cv_func_shmat=no
7945fi
7946rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7947fi
7948echo "$as_me:7948: result: $ac_cv_func_shmat" >&5
7949echo "${ECHO_T}$ac_cv_func_shmat" >&6
7950
7951    if test $ac_cv_func_shmat = no; then
7952      echo "$as_me:7952: checking for shmat in -lipc" >&5
7953echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
7954if test "${ac_cv_lib_ipc_shmat+set}" = set; then
7955  echo $ECHO_N "(cached) $ECHO_C" >&6
7956else
7957  ac_check_lib_save_LIBS=$LIBS
7958LIBS="-lipc  $LIBS"
7959cat >conftest.$ac_ext <<_ACEOF
7960#line 7960 "configure"
7961#include "confdefs.h"
7962
7963/* Override any gcc2 internal prototype to avoid an error.  */
7964#ifdef __cplusplus
7965extern "C"
7966#endif
7967/* We use char because int might match the return type of a gcc2
7968   builtin and then its argument prototype would still apply.  */
7969char shmat ();
7970int
7971main (void)
7972{
7973shmat ();
7974  ;
7975  return 0;
7976}
7977_ACEOF
7978rm -f conftest.$ac_objext conftest$ac_exeext
7979if { (eval echo "$as_me:7979: \"$ac_link\"") >&5
7980  (eval $ac_link) 2>&5
7981  ac_status=$?
7982  echo "$as_me:7982: \$? = $ac_status" >&5
7983  (exit $ac_status); } &&
7984         { ac_try='test -s conftest$ac_exeext'
7985  { (eval echo "$as_me:7985: \"$ac_try\"") >&5
7986  (eval $ac_try) 2>&5
7987  ac_status=$?
7988  echo "$as_me:7988: \$? = $ac_status" >&5
7989  (exit $ac_status); }; }; then
7990  ac_cv_lib_ipc_shmat=yes
7991else
7992  echo "$as_me: failed program was:" >&5
7993cat conftest.$ac_ext >&5
7994ac_cv_lib_ipc_shmat=no
7995fi
7996rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
7997LIBS=$ac_check_lib_save_LIBS
7998fi
7999echo "$as_me:7999: result: $ac_cv_lib_ipc_shmat" >&5
8000echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
8001if test $ac_cv_lib_ipc_shmat = yes; then
8002  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
8003fi
8004
8005    fi
8006  fi
8007
8008  # Check for libraries that X11R6 Xt/Xaw programs need.
8009  ac_save_LDFLAGS=$LDFLAGS
8010  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
8011  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
8012  # check for ICE first), but we must link in the order -lSM -lICE or
8013  # we get undefined symbols.  So assume we have SM if we have ICE.
8014  # These have to be linked with before -lX11, unlike the other
8015  # libraries we check for below, so use a different variable.
8016  # John Interrante, Karl Berry
8017  echo "$as_me:8017: checking for IceConnectionNumber in -lICE" >&5
8018echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
8019if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
8020  echo $ECHO_N "(cached) $ECHO_C" >&6
8021else
8022  ac_check_lib_save_LIBS=$LIBS
8023LIBS="-lICE $X_EXTRA_LIBS $LIBS"
8024cat >conftest.$ac_ext <<_ACEOF
8025#line 8025 "configure"
8026#include "confdefs.h"
8027
8028/* Override any gcc2 internal prototype to avoid an error.  */
8029#ifdef __cplusplus
8030extern "C"
8031#endif
8032/* We use char because int might match the return type of a gcc2
8033   builtin and then its argument prototype would still apply.  */
8034char IceConnectionNumber ();
8035int
8036main (void)
8037{
8038IceConnectionNumber ();
8039  ;
8040  return 0;
8041}
8042_ACEOF
8043rm -f conftest.$ac_objext conftest$ac_exeext
8044if { (eval echo "$as_me:8044: \"$ac_link\"") >&5
8045  (eval $ac_link) 2>&5
8046  ac_status=$?
8047  echo "$as_me:8047: \$? = $ac_status" >&5
8048  (exit $ac_status); } &&
8049         { ac_try='test -s conftest$ac_exeext'
8050  { (eval echo "$as_me:8050: \"$ac_try\"") >&5
8051  (eval $ac_try) 2>&5
8052  ac_status=$?
8053  echo "$as_me:8053: \$? = $ac_status" >&5
8054  (exit $ac_status); }; }; then
8055  ac_cv_lib_ICE_IceConnectionNumber=yes
8056else
8057  echo "$as_me: failed program was:" >&5
8058cat conftest.$ac_ext >&5
8059ac_cv_lib_ICE_IceConnectionNumber=no
8060fi
8061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
8062LIBS=$ac_check_lib_save_LIBS
8063fi
8064echo "$as_me:8064: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
8065echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
8066if test $ac_cv_lib_ICE_IceConnectionNumber = yes; then
8067  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
8068fi
8069
8070  LDFLAGS=$ac_save_LDFLAGS
8071
8072fi
8073
8074if test "x$have_x" = xyes; then
8075
8076cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
8077cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
8078cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
8079LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
8080for cf_X_CFLAGS in $X_CFLAGS
8081do
8082	case "x$cf_X_CFLAGS" in
8083	x-[IUD]*)
8084		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
8085		;;
8086	*)
8087		CFLAGS="$CFLAGS $cf_X_CFLAGS"
8088		;;
8089	esac
8090done
8091
8092cat >conftest.$ac_ext <<_ACEOF
8093#line 8093 "configure"
8094#include "confdefs.h"
8095
8096#include <stdlib.h>
8097#include <X11/Intrinsic.h>
8098
8099int
8100main (void)
8101{
8102String foo = malloc(1); (void)foo
8103  ;
8104  return 0;
8105}
8106_ACEOF
8107rm -f conftest.$ac_objext
8108if { (eval echo "$as_me:8108: \"$ac_compile\"") >&5
8109  (eval $ac_compile) 2>&5
8110  ac_status=$?
8111  echo "$as_me:8111: \$? = $ac_status" >&5
8112  (exit $ac_status); } &&
8113         { ac_try='test -s conftest.$ac_objext'
8114  { (eval echo "$as_me:8114: \"$ac_try\"") >&5
8115  (eval $ac_try) 2>&5
8116  ac_status=$?
8117  echo "$as_me:8117: \$? = $ac_status" >&5
8118  (exit $ac_status); }; }; then
8119
8120echo "$as_me:8120: checking for X11/Xt const-feature" >&5
8121echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
8122if test "${cf_cv_const_x_string+set}" = set; then
8123  echo $ECHO_N "(cached) $ECHO_C" >&6
8124else
8125
8126	cat >conftest.$ac_ext <<_ACEOF
8127#line 8127 "configure"
8128#include "confdefs.h"
8129
8130#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
8131#undef  XTSTRINGDEFINES	/* X11R5 and later */
8132#include <stdlib.h>
8133#include <X11/Intrinsic.h>
8134
8135int
8136main (void)
8137{
8138String foo = malloc(1); *foo = 0
8139  ;
8140  return 0;
8141}
8142_ACEOF
8143rm -f conftest.$ac_objext
8144if { (eval echo "$as_me:8144: \"$ac_compile\"") >&5
8145  (eval $ac_compile) 2>&5
8146  ac_status=$?
8147  echo "$as_me:8147: \$? = $ac_status" >&5
8148  (exit $ac_status); } &&
8149         { ac_try='test -s conftest.$ac_objext'
8150  { (eval echo "$as_me:8150: \"$ac_try\"") >&5
8151  (eval $ac_try) 2>&5
8152  ac_status=$?
8153  echo "$as_me:8153: \$? = $ac_status" >&5
8154  (exit $ac_status); }; }; then
8155
8156			cf_cv_const_x_string=no
8157
8158else
8159  echo "$as_me: failed program was:" >&5
8160cat conftest.$ac_ext >&5
8161
8162			cf_cv_const_x_string=yes
8163
8164fi
8165rm -f conftest.$ac_objext conftest.$ac_ext
8166
8167fi
8168echo "$as_me:8168: result: $cf_cv_const_x_string" >&5
8169echo "${ECHO_T}$cf_cv_const_x_string" >&6
8170
8171LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
8172CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
8173CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
8174
8175case $cf_cv_const_x_string in
8176no)
8177
8178	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8179	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
8180
8181	;;
8182*)
8183
8184	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8185	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
8186
8187	;;
8188esac
8189
8190else
8191  echo "$as_me: failed program was:" >&5
8192cat conftest.$ac_ext >&5
8193fi
8194rm -f conftest.$ac_objext conftest.$ac_ext
8195 fi
8196cat > conftest.$ac_ext <<EOF
8197#line 8197 "${as_me:-configure}"
8198int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
8199EOF
8200if test "$INTEL_COMPILER" = yes
8201then
8202# The "-wdXXX" options suppress warnings:
8203# remark #1419: external declaration in primary source file
8204# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
8205# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
8206# remark #193: zero used for undefined preprocessing identifier
8207# remark #593: variable "curs_sb_left_arrow" was set but never used
8208# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
8209# remark #869: parameter "tw" was never referenced
8210# remark #981: operands are evaluated in unspecified order
8211# warning #279: controlling expression is constant
8212
8213	{ echo "$as_me:8213: checking for $CC warning options..." >&5
8214echo "$as_me: checking for $CC warning options..." >&6;}
8215	cf_save_CFLAGS="$CFLAGS"
8216	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
8217	for cf_opt in \
8218		wd1419 \
8219		wd1683 \
8220		wd1684 \
8221		wd193 \
8222		wd593 \
8223		wd279 \
8224		wd810 \
8225		wd869 \
8226		wd981
8227	do
8228		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8229		if { (eval echo "$as_me:8229: \"$ac_compile\"") >&5
8230  (eval $ac_compile) 2>&5
8231  ac_status=$?
8232  echo "$as_me:8232: \$? = $ac_status" >&5
8233  (exit $ac_status); }; then
8234			test -n "$verbose" && echo "$as_me:8234: result: ... -$cf_opt" >&5
8235echo "${ECHO_T}... -$cf_opt" >&6
8236			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8237		fi
8238	done
8239	CFLAGS="$cf_save_CFLAGS"
8240elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
8241then
8242	{ echo "$as_me:8242: checking for $CC warning options..." >&5
8243echo "$as_me: checking for $CC warning options..." >&6;}
8244	cf_save_CFLAGS="$CFLAGS"
8245	cf_warn_CONST=""
8246	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
8247	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
8248	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
8249	for cf_opt in W Wall \
8250		Wbad-function-cast \
8251		Wcast-align \
8252		Wcast-qual \
8253		Wdeclaration-after-statement \
8254		Wextra \
8255		Winline \
8256		Wmissing-declarations \
8257		Wmissing-prototypes \
8258		Wnested-externs \
8259		Wpointer-arith \
8260		Wshadow \
8261		Wstrict-prototypes \
8262		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
8263	do
8264		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
8265		if { (eval echo "$as_me:8265: \"$ac_compile\"") >&5
8266  (eval $ac_compile) 2>&5
8267  ac_status=$?
8268  echo "$as_me:8268: \$? = $ac_status" >&5
8269  (exit $ac_status); }; then
8270			test -n "$verbose" && echo "$as_me:8270: result: ... -$cf_opt" >&5
8271echo "${ECHO_T}... -$cf_opt" >&6
8272			case $cf_opt in
8273			Winline)
8274				case $GCC_VERSION in
8275				[34].*)
8276					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
8277
8278echo "${as_me:-configure}:8278: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
8279
8280					continue;;
8281				esac
8282				;;
8283			Wpointer-arith)
8284				case $GCC_VERSION in
8285				[12].*)
8286					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
8287
8288echo "${as_me:-configure}:8288: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
8289
8290					continue;;
8291				esac
8292				;;
8293			esac
8294			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
8295		fi
8296	done
8297	CFLAGS="$cf_save_CFLAGS"
8298fi
8299rm -rf conftest*
8300
8301fi
8302fi
8303
8304## !NNTP_ONLY
8305if test "$USE_SPOOLDIR" = "yes"; then
8306	## options for directories
8307	echo "$as_me:8307: checking for news-library path" >&5
8308echo $ECHO_N "checking for news-library path... $ECHO_C" >&6
8309
8310# Check whether --with-libdir or --without-libdir was given.
8311if test "${with_libdir+set}" = set; then
8312  withval="$with_libdir"
8313
8314else
8315  withval="${NEWSLIBDIR:-/usr/lib/news}"
8316fi; if true ; then
8317
8318if test "x$prefix" != xNONE; then
8319	cf_path_syntax="$prefix"
8320else
8321	cf_path_syntax="$ac_default_prefix"
8322fi
8323
8324case ".$withval" in
8325.\$\(*\)*|.\'*\'*)
8326	;;
8327..|./*|.\\*)
8328	;;
8329.[a-zA-Z]:[\\/]*) # OS/2 EMX
8330	;;
8331.\${*prefix}*|.\${*dir}*)
8332	eval withval="$withval"
8333	case ".$withval" in
8334	.NONE/*)
8335		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8336		;;
8337	esac
8338	;;
8339.no|.NONE/*)
8340	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8341	;;
8342*)
8343	{ { echo "$as_me:8343: error: expected a pathname, not \"$withval\"" >&5
8344echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8345   { (exit 1); exit 1; }; }
8346	;;
8347esac
8348
8349fi
8350eval NEWSLIBDIR="$withval"
8351
8352	echo "$as_me:8352: result: $NEWSLIBDIR" >&5
8353echo "${ECHO_T}$NEWSLIBDIR" >&6
8354
8355	echo "$as_me:8355: checking for news spool-directory path" >&5
8356echo $ECHO_N "checking for news spool-directory path... $ECHO_C" >&6
8357
8358# Check whether --with-spooldir or --without-spooldir was given.
8359if test "${with_spooldir+set}" = set; then
8360  withval="$with_spooldir"
8361
8362else
8363  withval="${SPOOLDIR:-/var/spool/news}"
8364fi; if true ; then
8365
8366if test "x$prefix" != xNONE; then
8367	cf_path_syntax="$prefix"
8368else
8369	cf_path_syntax="$ac_default_prefix"
8370fi
8371
8372case ".$withval" in
8373.\$\(*\)*|.\'*\'*)
8374	;;
8375..|./*|.\\*)
8376	;;
8377.[a-zA-Z]:[\\/]*) # OS/2 EMX
8378	;;
8379.\${*prefix}*|.\${*dir}*)
8380	eval withval="$withval"
8381	case ".$withval" in
8382	.NONE/*)
8383		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8384		;;
8385	esac
8386	;;
8387.no|.NONE/*)
8388	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8389	;;
8390*)
8391	{ { echo "$as_me:8391: error: expected a pathname, not \"$withval\"" >&5
8392echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8393   { (exit 1); exit 1; }; }
8394	;;
8395esac
8396
8397fi
8398eval SPOOLDIR="$withval"
8399
8400	echo "$as_me:8400: result: $SPOOLDIR" >&5
8401echo "${ECHO_T}$SPOOLDIR" >&6
8402
8403	echo "$as_me:8403: checking for news overview-directory path" >&5
8404echo $ECHO_N "checking for news overview-directory path... $ECHO_C" >&6
8405
8406# Check whether --with-nov-dir or --without-nov-dir was given.
8407if test "${with_nov_dir+set}" = set; then
8408  withval="$with_nov_dir"
8409
8410else
8411  withval="${NOVROOTDIR:-$SPOOLDIR}"
8412fi; if true ; then
8413
8414if test "x$prefix" != xNONE; then
8415	cf_path_syntax="$prefix"
8416else
8417	cf_path_syntax="$ac_default_prefix"
8418fi
8419
8420case ".$withval" in
8421.\$\(*\)*|.\'*\'*)
8422	;;
8423..|./*|.\\*)
8424	;;
8425.[a-zA-Z]:[\\/]*) # OS/2 EMX
8426	;;
8427.\${*prefix}*|.\${*dir}*)
8428	eval withval="$withval"
8429	case ".$withval" in
8430	.NONE/*)
8431		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8432		;;
8433	esac
8434	;;
8435.no|.NONE/*)
8436	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8437	;;
8438*)
8439	{ { echo "$as_me:8439: error: expected a pathname, not \"$withval\"" >&5
8440echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8441   { (exit 1); exit 1; }; }
8442	;;
8443esac
8444
8445fi
8446eval NOVROOTDIR="$withval"
8447
8448	echo "$as_me:8448: result: $NOVROOTDIR" >&5
8449echo "${ECHO_T}$NOVROOTDIR" >&6
8450
8451	echo "$as_me:8451: checking for overview filename" >&5
8452echo $ECHO_N "checking for overview filename... $ECHO_C" >&6
8453
8454# Check whether --with-nov-fname or --without-nov-fname was given.
8455if test "${with_nov_fname+set}" = set; then
8456  withval="$with_nov_fname"
8457
8458else
8459  withval="${OVERVIEW_FILE-.overview}"
8460fi; test -z "$withval" && withval=no
8461case "$withval" in #(vi
8462yes)
8463  { { echo "$as_me:8463: error: expected a value for --with-nov-fname" >&5
8464echo "$as_me: error: expected a value for --with-nov-fname" >&2;}
8465   { (exit 1); exit 1; }; }
8466  ;; #(vi
8467no) withval=""
8468  ;;
8469esac
8470OVERVIEW_FILE="$withval"
8471
8472cat >>confdefs.h <<EOF
8473#define OVERVIEW_FILE "$withval"
8474EOF
8475
8476	echo "$as_me:8476: result: $OVERVIEW_FILE" >&5
8477echo "${ECHO_T}$OVERVIEW_FILE" >&6
8478
8479	INEWSPATH="$NEWSLIBDIR"
8480else
8481	NEWSLIBDIR=""
8482	SPOOLDIR=""
8483	NOVROOTDIR=""
8484	INEWSPATH="/usr/lib/news"
8485fi
8486
8487## TODO: kick the --with-inews-dir= stuff, the check below should be enough
8488## (requires some code rework in tin)
8489echo "$as_me:8489: checking for directory containing \"inews\"" >&5
8490echo $ECHO_N "checking for directory containing \"inews\"... $ECHO_C" >&6
8491
8492# Check whether --with-inews-dir or --without-inews-dir was given.
8493if test "${with_inews_dir+set}" = set; then
8494  withval="$with_inews_dir"
8495
8496else
8497  withval="${INEWSDIR:-$INEWSPATH}"
8498fi; if true ; then
8499
8500if test "x$prefix" != xNONE; then
8501	cf_path_syntax="$prefix"
8502else
8503	cf_path_syntax="$ac_default_prefix"
8504fi
8505
8506case ".$withval" in
8507.\$\(*\)*|.\'*\'*)
8508	;;
8509..|./*|.\\*)
8510	;;
8511.[a-zA-Z]:[\\/]*) # OS/2 EMX
8512	;;
8513.\${*prefix}*|.\${*dir}*)
8514	eval withval="$withval"
8515	case ".$withval" in
8516	.NONE/*)
8517		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8518		;;
8519	esac
8520	;;
8521.no|.NONE/*)
8522	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
8523	;;
8524*)
8525	{ { echo "$as_me:8525: error: expected a pathname, not \"$withval\"" >&5
8526echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
8527   { (exit 1); exit 1; }; }
8528	;;
8529esac
8530
8531fi
8532eval INEWSDIR="$withval"
8533
8534INEWSDIR=`echo $INEWSDIR |sed -e 's,/$,,'`
8535echo "$as_me:8535: result: $INEWSDIR" >&5
8536echo "${ECHO_T}$INEWSDIR" >&6
8537
8538# Extract the first word of "inews", so it can be a program name with args.
8539set dummy inews; ac_word=$2
8540echo "$as_me:8540: checking for $ac_word" >&5
8541echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
8542if test "${ac_cv_path_INEWS+set}" = set; then
8543  echo $ECHO_N "(cached) $ECHO_C" >&6
8544else
8545  case $INEWS in
8546  [\\/]* | ?:[\\/]*)
8547  ac_cv_path_INEWS="$INEWS" # Let the user override the test with a path.
8548  ;;
8549  *)
8550  ac_save_IFS=$IFS; IFS=$ac_path_separator
8551ac_dummy="$INEWSDIR:/news/bin:/usr/lib/news/bin:$INEWSPATH"
8552for ac_dir in $ac_dummy; do
8553  IFS=$ac_save_IFS
8554  test -z "$ac_dir" && ac_dir=.
8555  if $as_executable_p "$ac_dir/$ac_word"; then
8556   ac_cv_path_INEWS="$ac_dir/$ac_word"
8557   echo "$as_me:8557: found $ac_dir/$ac_word" >&5
8558   break
8559fi
8560done
8561
8562  test -z "$ac_cv_path_INEWS" && ac_cv_path_INEWS="--internal"
8563  ;;
8564esac
8565fi
8566INEWS=$ac_cv_path_INEWS
8567
8568if test -n "$INEWS"; then
8569  echo "$as_me:8569: result: $INEWS" >&5
8570echo "${ECHO_T}$INEWS" >&6
8571else
8572  echo "$as_me:8572: result: no" >&5
8573echo "${ECHO_T}no" >&6
8574fi
8575
8576if test "$ac_cv_path_INEWS" != ""; then
8577	if test "$ac_cv_path_INEWS" = "--internal"; then
8578
8579cf_define=`echo "$INEWS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
8580
8581cat >>confdefs.h <<EOF
8582#define PATH_INEWS "$cf_define"
8583EOF
8584
8585	else
8586
8587cf_define=`echo "$INEWS -h"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
8588
8589cat >>confdefs.h <<EOF
8590#define PATH_INEWS "$cf_define"
8591EOF
8592
8593	fi
8594fi
8595
8596### Look for network libraries first, since some functions (such as gethostname)
8597### are used in a lot of places.
8598echo "$as_me:8598: checking if you want socks library" >&5
8599echo $ECHO_N "checking if you want socks library... $ECHO_C" >&6
8600if test "${cf_cv_use_libsocks+set}" = set; then
8601  echo $ECHO_N "(cached) $ECHO_C" >&6
8602else
8603
8604# Check whether --with-socks or --without-socks was given.
8605if test "${with_socks+set}" = set; then
8606  withval="$with_socks"
8607  cf_cv_use_libsocks=$withval
8608else
8609  cf_cv_use_libsocks=no
8610fi;
8611
8612fi
8613echo "$as_me:8613: result: $cf_cv_use_libsocks" >&5
8614echo "${ECHO_T}$cf_cv_use_libsocks" >&6
8615
8616echo "$as_me:8616: checking if you want socks5 library" >&5
8617echo $ECHO_N "checking if you want socks5 library... $ECHO_C" >&6
8618if test "${cf_cv_use_libsocks5+set}" = set; then
8619  echo $ECHO_N "(cached) $ECHO_C" >&6
8620else
8621
8622# Check whether --with-socks5 or --without-socks5 was given.
8623if test "${with_socks5+set}" = set; then
8624  withval="$with_socks5"
8625  cf_cv_use_libsocks5=$withval
8626else
8627  cf_cv_use_libsocks5=no
8628fi;
8629
8630fi
8631echo "$as_me:8631: result: $cf_cv_use_libsocks5" >&5
8632echo "${ECHO_T}$cf_cv_use_libsocks5" >&6
8633
8634if test "x$cf_cv_use_libsocks" != xno ; then
8635
8636case "$cf_cv_use_libsocks" in
8637no)
8638	;;
8639yes)
8640	;;
8641*)
8642
8643for cf_searchpath in `echo "$cf_cv_use_libsocks" | tr $PATH_SEPARATOR ' '`; do
8644	if test -d $cf_searchpath/include; then
8645
8646if test -n "$cf_searchpath/include" ; then
8647  for cf_add_incdir in $cf_searchpath/include
8648  do
8649	while test $cf_add_incdir != /usr/include
8650	do
8651	  if test -d $cf_add_incdir
8652	  then
8653		cf_have_incdir=no
8654		if test -n "$CFLAGS$CPPFLAGS" ; then
8655		  # a loop is needed to ensure we can add subdirs of existing dirs
8656		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8657			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8658			  cf_have_incdir=yes; break
8659			fi
8660		  done
8661		fi
8662
8663		if test "$cf_have_incdir" = no ; then
8664		  if test "$cf_add_incdir" = /usr/local/include ; then
8665			if test "$GCC" = yes
8666			then
8667			  cf_save_CPPFLAGS=$CPPFLAGS
8668
8669	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8670	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8671
8672			  cat >conftest.$ac_ext <<_ACEOF
8673#line 8673 "configure"
8674#include "confdefs.h"
8675#include <stdio.h>
8676int
8677main (void)
8678{
8679printf("Hello")
8680  ;
8681  return 0;
8682}
8683_ACEOF
8684rm -f conftest.$ac_objext
8685if { (eval echo "$as_me:8685: \"$ac_compile\"") >&5
8686  (eval $ac_compile) 2>&5
8687  ac_status=$?
8688  echo "$as_me:8688: \$? = $ac_status" >&5
8689  (exit $ac_status); } &&
8690         { ac_try='test -s conftest.$ac_objext'
8691  { (eval echo "$as_me:8691: \"$ac_try\"") >&5
8692  (eval $ac_try) 2>&5
8693  ac_status=$?
8694  echo "$as_me:8694: \$? = $ac_status" >&5
8695  (exit $ac_status); }; }; then
8696  :
8697else
8698  echo "$as_me: failed program was:" >&5
8699cat conftest.$ac_ext >&5
8700cf_have_incdir=yes
8701fi
8702rm -f conftest.$ac_objext conftest.$ac_ext
8703			  CPPFLAGS=$cf_save_CPPFLAGS
8704			fi
8705		  fi
8706		fi
8707
8708		if test "$cf_have_incdir" = no ; then
8709		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8710
8711echo "${as_me:-configure}:8711: testing adding $cf_add_incdir to include-path ..." 1>&5
8712
8713		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8714
8715		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8716		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8717		  cf_add_incdir="$cf_top_incdir"
8718		else
8719		  break
8720		fi
8721	  else
8722		break
8723	  fi
8724	done
8725  done
8726fi
8727
8728	elif test -d $cf_searchpath/../include ; then
8729
8730if test -n "$cf_searchpath/../include" ; then
8731  for cf_add_incdir in $cf_searchpath/../include
8732  do
8733	while test $cf_add_incdir != /usr/include
8734	do
8735	  if test -d $cf_add_incdir
8736	  then
8737		cf_have_incdir=no
8738		if test -n "$CFLAGS$CPPFLAGS" ; then
8739		  # a loop is needed to ensure we can add subdirs of existing dirs
8740		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
8741			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
8742			  cf_have_incdir=yes; break
8743			fi
8744		  done
8745		fi
8746
8747		if test "$cf_have_incdir" = no ; then
8748		  if test "$cf_add_incdir" = /usr/local/include ; then
8749			if test "$GCC" = yes
8750			then
8751			  cf_save_CPPFLAGS=$CPPFLAGS
8752
8753	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
8754	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
8755
8756			  cat >conftest.$ac_ext <<_ACEOF
8757#line 8757 "configure"
8758#include "confdefs.h"
8759#include <stdio.h>
8760int
8761main (void)
8762{
8763printf("Hello")
8764  ;
8765  return 0;
8766}
8767_ACEOF
8768rm -f conftest.$ac_objext
8769if { (eval echo "$as_me:8769: \"$ac_compile\"") >&5
8770  (eval $ac_compile) 2>&5
8771  ac_status=$?
8772  echo "$as_me:8772: \$? = $ac_status" >&5
8773  (exit $ac_status); } &&
8774         { ac_try='test -s conftest.$ac_objext'
8775  { (eval echo "$as_me:8775: \"$ac_try\"") >&5
8776  (eval $ac_try) 2>&5
8777  ac_status=$?
8778  echo "$as_me:8778: \$? = $ac_status" >&5
8779  (exit $ac_status); }; }; then
8780  :
8781else
8782  echo "$as_me: failed program was:" >&5
8783cat conftest.$ac_ext >&5
8784cf_have_incdir=yes
8785fi
8786rm -f conftest.$ac_objext conftest.$ac_ext
8787			  CPPFLAGS=$cf_save_CPPFLAGS
8788			fi
8789		  fi
8790		fi
8791
8792		if test "$cf_have_incdir" = no ; then
8793		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
8794
8795echo "${as_me:-configure}:8795: testing adding $cf_add_incdir to include-path ..." 1>&5
8796
8797		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
8798
8799		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
8800		  test "$cf_top_incdir" = "$cf_add_incdir" && break
8801		  cf_add_incdir="$cf_top_incdir"
8802		else
8803		  break
8804		fi
8805	  else
8806		break
8807	  fi
8808	done
8809  done
8810fi
8811
8812	else
8813{ { echo "$as_me:8813: error: cannot find socks library under $cf_cv_use_libsocks" >&5
8814echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
8815   { (exit 1); exit 1; }; }
8816	fi
8817	if test -d $cf_searchpath/lib; then
8818
8819if test -n "$cf_searchpath/lib" ; then
8820	for cf_add_libdir in $cf_searchpath/lib
8821	do
8822		if test $cf_add_libdir = /usr/lib ; then
8823			:
8824		elif test -d $cf_add_libdir
8825		then
8826			cf_have_libdir=no
8827			if test -n "$LDFLAGS$LIBS" ; then
8828				# a loop is needed to ensure we can add subdirs of existing dirs
8829				for cf_test_libdir in $LDFLAGS $LIBS ; do
8830					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8831						cf_have_libdir=yes; break
8832					fi
8833				done
8834			fi
8835			if test "$cf_have_libdir" = no ; then
8836				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8837
8838echo "${as_me:-configure}:8838: testing adding $cf_add_libdir to library-path ..." 1>&5
8839
8840				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8841			fi
8842		fi
8843	done
8844fi
8845
8846	elif test -d $cf_searchpath ; then
8847
8848if test -n "$cf_searchpath" ; then
8849	for cf_add_libdir in $cf_searchpath
8850	do
8851		if test $cf_add_libdir = /usr/lib ; then
8852			:
8853		elif test -d $cf_add_libdir
8854		then
8855			cf_have_libdir=no
8856			if test -n "$LDFLAGS$LIBS" ; then
8857				# a loop is needed to ensure we can add subdirs of existing dirs
8858				for cf_test_libdir in $LDFLAGS $LIBS ; do
8859					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
8860						cf_have_libdir=yes; break
8861					fi
8862				done
8863			fi
8864			if test "$cf_have_libdir" = no ; then
8865				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
8866
8867echo "${as_me:-configure}:8867: testing adding $cf_add_libdir to library-path ..." 1>&5
8868
8869				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
8870			fi
8871		fi
8872	done
8873fi
8874
8875	else
8876{ { echo "$as_me:8876: error: cannot find socks library under $cf_cv_use_libsocks" >&5
8877echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
8878   { (exit 1); exit 1; }; }
8879	fi
8880done
8881
8882	;;
8883esac
8884
8885# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
8886# will be set on completion of the AC_TRY_LINK below.
8887cf_cv_header_path_socks=
8888cf_cv_library_path_socks=
8889
8890echo "${as_me:-configure}:8890: testing Starting FIND_LINKAGE(socks,) ..." 1>&5
8891
8892cf_save_LIBS="$LIBS"
8893
8894cat >conftest.$ac_ext <<_ACEOF
8895#line 8895 "configure"
8896#include "confdefs.h"
8897
8898#include <stdio.h>
8899
8900int
8901main (void)
8902{
8903
8904      Raccept((char *)0)
8905
8906  ;
8907  return 0;
8908}
8909_ACEOF
8910rm -f conftest.$ac_objext conftest$ac_exeext
8911if { (eval echo "$as_me:8911: \"$ac_link\"") >&5
8912  (eval $ac_link) 2>&5
8913  ac_status=$?
8914  echo "$as_me:8914: \$? = $ac_status" >&5
8915  (exit $ac_status); } &&
8916         { ac_try='test -s conftest$ac_exeext'
8917  { (eval echo "$as_me:8917: \"$ac_try\"") >&5
8918  (eval $ac_try) 2>&5
8919  ac_status=$?
8920  echo "$as_me:8920: \$? = $ac_status" >&5
8921  (exit $ac_status); }; }; then
8922
8923	cf_cv_find_linkage_socks=yes
8924	cf_cv_header_path_socks=/usr/include
8925	cf_cv_library_path_socks=/usr/lib
8926
8927else
8928  echo "$as_me: failed program was:" >&5
8929cat conftest.$ac_ext >&5
8930
8931LIBS="-lsocks  $cf_save_LIBS"
8932
8933cat >conftest.$ac_ext <<_ACEOF
8934#line 8934 "configure"
8935#include "confdefs.h"
8936
8937#include <stdio.h>
8938
8939int
8940main (void)
8941{
8942
8943      Raccept((char *)0)
8944
8945  ;
8946  return 0;
8947}
8948_ACEOF
8949rm -f conftest.$ac_objext conftest$ac_exeext
8950if { (eval echo "$as_me:8950: \"$ac_link\"") >&5
8951  (eval $ac_link) 2>&5
8952  ac_status=$?
8953  echo "$as_me:8953: \$? = $ac_status" >&5
8954  (exit $ac_status); } &&
8955         { ac_try='test -s conftest$ac_exeext'
8956  { (eval echo "$as_me:8956: \"$ac_try\"") >&5
8957  (eval $ac_try) 2>&5
8958  ac_status=$?
8959  echo "$as_me:8959: \$? = $ac_status" >&5
8960  (exit $ac_status); }; }; then
8961
8962	cf_cv_find_linkage_socks=yes
8963	cf_cv_header_path_socks=/usr/include
8964	cf_cv_library_path_socks=/usr/lib
8965	cf_cv_library_file_socks="-lsocks"
8966
8967else
8968  echo "$as_me: failed program was:" >&5
8969cat conftest.$ac_ext >&5
8970
8971	cf_cv_find_linkage_socks=no
8972	LIBS="$cf_save_LIBS"
8973
8974	test -n "$verbose" && echo "	find linkage for socks library" 1>&6
8975
8976echo "${as_me:-configure}:8976: testing find linkage for socks library ..." 1>&5
8977
8978echo "${as_me:-configure}:8978: testing Searching for headers in FIND_LINKAGE(socks,) ..." 1>&5
8979
8980	cf_save_CPPFLAGS="$CPPFLAGS"
8981	cf_test_CPPFLAGS="$CPPFLAGS"
8982
8983cf_search=
8984
8985# collect the current set of include-directories from compiler flags
8986cf_header_path_list=""
8987if test -n "${CFLAGS}${CPPFLAGS}" ; then
8988	for cf_header_path in $CPPFLAGS $CFLAGS
8989	do
8990		case $cf_header_path in
8991		-I*)
8992			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
8993
8994test "x$cf_header_path" != "xNONE" && \
8995test -d "$cf_header_path" && \
8996 {
8997	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
8998	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
8999	test -d $cf_header_path/include/socks &&       cf_search="$cf_search $cf_header_path/include/socks"
9000	test -d $cf_header_path/include/socks/include &&    cf_search="$cf_search $cf_header_path/include/socks/include"
9001	test -d $cf_header_path/socks/include &&       cf_search="$cf_search $cf_header_path/socks/include"
9002	test -d $cf_header_path/socks/include/socks &&    cf_search="$cf_search $cf_header_path/socks/include/socks"
9003}
9004
9005			cf_header_path_list="$cf_header_path_list $cf_search"
9006			;;
9007		esac
9008	done
9009fi
9010
9011# add the variations for the package we are looking for
9012
9013cf_search=
9014
9015test "x$prefix" != "xNONE" && \
9016test -d "$prefix" && \
9017 {
9018	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9019	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
9020	test -d $prefix/include/socks &&       cf_search="$cf_search $prefix/include/socks"
9021	test -d $prefix/include/socks/include &&    cf_search="$cf_search $prefix/include/socks/include"
9022	test -d $prefix/socks/include &&       cf_search="$cf_search $prefix/socks/include"
9023	test -d $prefix/socks/include/socks &&    cf_search="$cf_search $prefix/socks/include/socks"
9024}
9025
9026for cf_subdir_prefix in \
9027	/usr \
9028	/usr/local \
9029	/usr/pkg \
9030	/opt \
9031	/opt/local \
9032	$HOME
9033do
9034
9035test "x$cf_subdir_prefix" != "x$prefix" && \
9036test -d "$cf_subdir_prefix" && \
9037(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9038	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
9039	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
9040	test -d $cf_subdir_prefix/include/socks &&       cf_search="$cf_search $cf_subdir_prefix/include/socks"
9041	test -d $cf_subdir_prefix/include/socks/include &&    cf_search="$cf_search $cf_subdir_prefix/include/socks/include"
9042	test -d $cf_subdir_prefix/socks/include &&       cf_search="$cf_search $cf_subdir_prefix/socks/include"
9043	test -d $cf_subdir_prefix/socks/include/socks &&    cf_search="$cf_search $cf_subdir_prefix/socks/include/socks"
9044}
9045
9046done
9047
9048test "$includedir" != NONE && \
9049test "$includedir" != "/usr/include" && \
9050test -d "$includedir" && {
9051	test -d $includedir &&    cf_search="$cf_search $includedir"
9052	test -d $includedir/socks && cf_search="$cf_search $includedir/socks"
9053}
9054
9055test "$oldincludedir" != NONE && \
9056test "$oldincludedir" != "/usr/include" && \
9057test -d "$oldincludedir" && {
9058	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
9059	test -d $oldincludedir/socks && cf_search="$cf_search $oldincludedir/socks"
9060}
9061
9062cf_search="$cf_search $cf_header_path_list"
9063
9064	for cf_cv_header_path_socks in $cf_search
9065	do
9066		if test -d $cf_cv_header_path_socks ; then
9067			test -n "$verbose" && echo "	... testing $cf_cv_header_path_socks" 1>&6
9068
9069echo "${as_me:-configure}:9069: testing ... testing $cf_cv_header_path_socks ..." 1>&5
9070
9071			CPPFLAGS="$cf_save_CPPFLAGS"
9072
9073	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9074	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_socks"
9075
9076			cat >conftest.$ac_ext <<_ACEOF
9077#line 9077 "configure"
9078#include "confdefs.h"
9079
9080#include <stdio.h>
9081
9082int
9083main (void)
9084{
9085
9086      Raccept((char *)0)
9087
9088  ;
9089  return 0;
9090}
9091_ACEOF
9092rm -f conftest.$ac_objext
9093if { (eval echo "$as_me:9093: \"$ac_compile\"") >&5
9094  (eval $ac_compile) 2>&5
9095  ac_status=$?
9096  echo "$as_me:9096: \$? = $ac_status" >&5
9097  (exit $ac_status); } &&
9098         { ac_try='test -s conftest.$ac_objext'
9099  { (eval echo "$as_me:9099: \"$ac_try\"") >&5
9100  (eval $ac_try) 2>&5
9101  ac_status=$?
9102  echo "$as_me:9102: \$? = $ac_status" >&5
9103  (exit $ac_status); }; }; then
9104
9105				test -n "$verbose" && echo "	... found socks headers in $cf_cv_header_path_socks" 1>&6
9106
9107echo "${as_me:-configure}:9107: testing ... found socks headers in $cf_cv_header_path_socks ..." 1>&5
9108
9109				cf_cv_find_linkage_socks=maybe
9110				cf_test_CPPFLAGS="$CPPFLAGS"
9111				break
9112else
9113  echo "$as_me: failed program was:" >&5
9114cat conftest.$ac_ext >&5
9115
9116				CPPFLAGS="$cf_save_CPPFLAGS"
9117
9118fi
9119rm -f conftest.$ac_objext conftest.$ac_ext
9120		fi
9121	done
9122
9123	if test "$cf_cv_find_linkage_socks" = maybe ; then
9124
9125echo "${as_me:-configure}:9125: testing Searching for socks library in FIND_LINKAGE(socks,) ..." 1>&5
9126
9127		cf_save_LIBS="$LIBS"
9128		cf_save_LDFLAGS="$LDFLAGS"
9129
9130		if test "$cf_cv_find_linkage_socks" != yes ; then
9131
9132cf_search=
9133cf_library_path_list=""
9134if test -n "${LDFLAGS}${LIBS}" ; then
9135	for cf_library_path in $LDFLAGS $LIBS
9136	do
9137		case $cf_library_path in
9138		-L*)
9139			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9140
9141test "x$cf_library_path" != "xNONE" && \
9142test -d "$cf_library_path" && \
9143 {
9144	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9145	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
9146	test -d $cf_library_path/lib/socks &&       cf_search="$cf_search $cf_library_path/lib/socks"
9147	test -d $cf_library_path/lib/socks/lib &&    cf_search="$cf_search $cf_library_path/lib/socks/lib"
9148	test -d $cf_library_path/socks/lib &&       cf_search="$cf_search $cf_library_path/socks/lib"
9149	test -d $cf_library_path/socks/lib/socks &&    cf_search="$cf_search $cf_library_path/socks/lib/socks"
9150}
9151
9152			cf_library_path_list="$cf_library_path_list $cf_search"
9153			;;
9154		esac
9155	done
9156fi
9157
9158cf_search=
9159
9160test "x$prefix" != "xNONE" && \
9161test -d "$prefix" && \
9162 {
9163	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9164	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
9165	test -d $prefix/lib/socks &&       cf_search="$cf_search $prefix/lib/socks"
9166	test -d $prefix/lib/socks/lib &&    cf_search="$cf_search $prefix/lib/socks/lib"
9167	test -d $prefix/socks/lib &&       cf_search="$cf_search $prefix/socks/lib"
9168	test -d $prefix/socks/lib/socks &&    cf_search="$cf_search $prefix/socks/lib/socks"
9169}
9170
9171for cf_subdir_prefix in \
9172	/usr \
9173	/usr/local \
9174	/usr/pkg \
9175	/opt \
9176	/opt/local \
9177	$HOME
9178do
9179
9180test "x$cf_subdir_prefix" != "x$prefix" && \
9181test -d "$cf_subdir_prefix" && \
9182(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
9183	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
9184	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9185	test -d $cf_subdir_prefix/lib/socks &&       cf_search="$cf_search $cf_subdir_prefix/lib/socks"
9186	test -d $cf_subdir_prefix/lib/socks/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/socks/lib"
9187	test -d $cf_subdir_prefix/socks/lib &&       cf_search="$cf_search $cf_subdir_prefix/socks/lib"
9188	test -d $cf_subdir_prefix/socks/lib/socks &&    cf_search="$cf_search $cf_subdir_prefix/socks/lib/socks"
9189}
9190
9191done
9192
9193cf_search="$cf_library_path_list $cf_search"
9194
9195			for cf_cv_library_path_socks in $cf_search
9196			do
9197				if test -d $cf_cv_library_path_socks ; then
9198					test -n "$verbose" && echo "	... testing $cf_cv_library_path_socks" 1>&6
9199
9200echo "${as_me:-configure}:9200: testing ... testing $cf_cv_library_path_socks ..." 1>&5
9201
9202					CPPFLAGS="$cf_test_CPPFLAGS"
9203					LIBS="-lsocks  $cf_save_LIBS"
9204					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_socks"
9205					cat >conftest.$ac_ext <<_ACEOF
9206#line 9206 "configure"
9207#include "confdefs.h"
9208
9209#include <stdio.h>
9210
9211int
9212main (void)
9213{
9214
9215      Raccept((char *)0)
9216
9217  ;
9218  return 0;
9219}
9220_ACEOF
9221rm -f conftest.$ac_objext conftest$ac_exeext
9222if { (eval echo "$as_me:9222: \"$ac_link\"") >&5
9223  (eval $ac_link) 2>&5
9224  ac_status=$?
9225  echo "$as_me:9225: \$? = $ac_status" >&5
9226  (exit $ac_status); } &&
9227         { ac_try='test -s conftest$ac_exeext'
9228  { (eval echo "$as_me:9228: \"$ac_try\"") >&5
9229  (eval $ac_try) 2>&5
9230  ac_status=$?
9231  echo "$as_me:9231: \$? = $ac_status" >&5
9232  (exit $ac_status); }; }; then
9233
9234					test -n "$verbose" && echo "	... found socks library in $cf_cv_library_path_socks" 1>&6
9235
9236echo "${as_me:-configure}:9236: testing ... found socks library in $cf_cv_library_path_socks ..." 1>&5
9237
9238					cf_cv_find_linkage_socks=yes
9239					cf_cv_library_file_socks="-lsocks"
9240					break
9241else
9242  echo "$as_me: failed program was:" >&5
9243cat conftest.$ac_ext >&5
9244
9245					CPPFLAGS="$cf_save_CPPFLAGS"
9246					LIBS="$cf_save_LIBS"
9247					LDFLAGS="$cf_save_LDFLAGS"
9248
9249fi
9250rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9251				fi
9252			done
9253			CPPFLAGS="$cf_save_CPPFLAGS"
9254			LDFLAGS="$cf_save_LDFLAGS"
9255		fi
9256
9257	else
9258		cf_cv_find_linkage_socks=no
9259	fi
9260
9261fi
9262rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9263
9264fi
9265rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9266
9267LIBS="$cf_save_LIBS"
9268
9269if test "$cf_cv_find_linkage_socks" = yes ; then
9270
9271if test -n "$cf_cv_header_path_socks" ; then
9272  for cf_add_incdir in $cf_cv_header_path_socks
9273  do
9274	while test $cf_add_incdir != /usr/include
9275	do
9276	  if test -d $cf_add_incdir
9277	  then
9278		cf_have_incdir=no
9279		if test -n "$CFLAGS$CPPFLAGS" ; then
9280		  # a loop is needed to ensure we can add subdirs of existing dirs
9281		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9282			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9283			  cf_have_incdir=yes; break
9284			fi
9285		  done
9286		fi
9287
9288		if test "$cf_have_incdir" = no ; then
9289		  if test "$cf_add_incdir" = /usr/local/include ; then
9290			if test "$GCC" = yes
9291			then
9292			  cf_save_CPPFLAGS=$CPPFLAGS
9293
9294	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9295	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9296
9297			  cat >conftest.$ac_ext <<_ACEOF
9298#line 9298 "configure"
9299#include "confdefs.h"
9300#include <stdio.h>
9301int
9302main (void)
9303{
9304printf("Hello")
9305  ;
9306  return 0;
9307}
9308_ACEOF
9309rm -f conftest.$ac_objext
9310if { (eval echo "$as_me:9310: \"$ac_compile\"") >&5
9311  (eval $ac_compile) 2>&5
9312  ac_status=$?
9313  echo "$as_me:9313: \$? = $ac_status" >&5
9314  (exit $ac_status); } &&
9315         { ac_try='test -s conftest.$ac_objext'
9316  { (eval echo "$as_me:9316: \"$ac_try\"") >&5
9317  (eval $ac_try) 2>&5
9318  ac_status=$?
9319  echo "$as_me:9319: \$? = $ac_status" >&5
9320  (exit $ac_status); }; }; then
9321  :
9322else
9323  echo "$as_me: failed program was:" >&5
9324cat conftest.$ac_ext >&5
9325cf_have_incdir=yes
9326fi
9327rm -f conftest.$ac_objext conftest.$ac_ext
9328			  CPPFLAGS=$cf_save_CPPFLAGS
9329			fi
9330		  fi
9331		fi
9332
9333		if test "$cf_have_incdir" = no ; then
9334		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9335
9336echo "${as_me:-configure}:9336: testing adding $cf_add_incdir to include-path ..." 1>&5
9337
9338		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9339
9340		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
9341		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9342		  cf_add_incdir="$cf_top_incdir"
9343		else
9344		  break
9345		fi
9346	  else
9347		break
9348	  fi
9349	done
9350  done
9351fi
9352
9353if test -n "$cf_cv_library_path_socks" ; then
9354	for cf_add_libdir in $cf_cv_library_path_socks
9355	do
9356		if test $cf_add_libdir = /usr/lib ; then
9357			:
9358		elif test -d $cf_add_libdir
9359		then
9360			cf_have_libdir=no
9361			if test -n "$LDFLAGS$LIBS" ; then
9362				# a loop is needed to ensure we can add subdirs of existing dirs
9363				for cf_test_libdir in $LDFLAGS $LIBS ; do
9364					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9365						cf_have_libdir=yes; break
9366					fi
9367				done
9368			fi
9369			if test "$cf_have_libdir" = no ; then
9370				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9371
9372echo "${as_me:-configure}:9372: testing adding $cf_add_libdir to library-path ..." 1>&5
9373
9374				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9375			fi
9376		fi
9377	done
9378fi
9379
9380cf_add_libs="$LIBS"
9381# reverse order
9382cf_add_0lib=
9383for cf_add_1lib in -lsocks; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9384# filter duplicates
9385for cf_add_1lib in $cf_add_0lib; do
9386	for cf_add_2lib in $cf_add_libs; do
9387		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9388			cf_add_1lib=
9389			break
9390		fi
9391	done
9392	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9393done
9394LIBS="$cf_add_libs"
9395
9396else
9397{ echo "$as_me:9397: WARNING: Cannot find socks library" >&5
9398echo "$as_me: WARNING: Cannot find socks library" >&2;}
9399fi
9400
9401  if test "x$cf_cv_find_linkage_socks" = "xyes" ; then
9402
9403cat >>confdefs.h <<\EOF
9404#define SOCKS 1
9405EOF
9406
9407cat >>confdefs.h <<\EOF
9408#define accept Raccept
9409EOF
9410
9411cat >>confdefs.h <<\EOF
9412#define bind Rbind
9413EOF
9414
9415cat >>confdefs.h <<\EOF
9416#define connect Rconnect
9417EOF
9418
9419cat >>confdefs.h <<\EOF
9420#define getpeername Rgetpeername
9421EOF
9422
9423cat >>confdefs.h <<\EOF
9424#define getsockname Rgetsockname
9425EOF
9426
9427cat >>confdefs.h <<\EOF
9428#define listen Rlisten
9429EOF
9430
9431cat >>confdefs.h <<\EOF
9432#define recvfrom Rrecvfrom
9433EOF
9434
9435cat >>confdefs.h <<\EOF
9436#define select Rselect
9437EOF
9438
9439  else
9440    { { echo "$as_me:9440: error: cannot link with socks library" >&5
9441echo "$as_me: error: cannot link with socks library" >&2;}
9442   { (exit 1); exit 1; }; }
9443  fi
9444
9445else
9446
9447cf_test_netlibs=no
9448
9449echo "$as_me:9449: checking for network libraries" >&5
9450echo $ECHO_N "checking for network libraries... $ECHO_C" >&6
9451
9452if test "${cf_cv_netlibs+set}" = set; then
9453  echo $ECHO_N "(cached) $ECHO_C" >&6
9454else
9455
9456echo "$as_me:9456: result: working..." >&5
9457echo "${ECHO_T}working..." >&6
9458
9459cf_cv_netlibs=""
9460cf_test_netlibs=yes
9461
9462case $host_os in
9463mingw*)
9464
9465for ac_header in windows.h winsock.h winsock2.h
9466do
9467as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
9468echo "$as_me:9468: checking for $ac_header" >&5
9469echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
9470if eval "test \"\${$as_ac_Header+set}\" = set"; then
9471  echo $ECHO_N "(cached) $ECHO_C" >&6
9472else
9473  cat >conftest.$ac_ext <<_ACEOF
9474#line 9474 "configure"
9475#include "confdefs.h"
9476#include <$ac_header>
9477_ACEOF
9478if { (eval echo "$as_me:9478: \"$ac_cpp conftest.$ac_ext\"") >&5
9479  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
9480  ac_status=$?
9481  egrep -v '^ *\+' conftest.er1 >conftest.err
9482  rm -f conftest.er1
9483  cat conftest.err >&5
9484  echo "$as_me:9484: \$? = $ac_status" >&5
9485  (exit $ac_status); } >/dev/null; then
9486  if test -s conftest.err; then
9487    ac_cpp_err=$ac_c_preproc_warn_flag
9488  else
9489    ac_cpp_err=
9490  fi
9491else
9492  ac_cpp_err=yes
9493fi
9494if test -z "$ac_cpp_err"; then
9495  eval "$as_ac_Header=yes"
9496else
9497  echo "$as_me: failed program was:" >&5
9498  cat conftest.$ac_ext >&5
9499  eval "$as_ac_Header=no"
9500fi
9501rm -f conftest.err conftest.$ac_ext
9502fi
9503echo "$as_me:9503: result: `eval echo '${'$as_ac_Header'}'`" >&5
9504echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
9505if test `eval echo '${'$as_ac_Header'}'` = yes; then
9506  cat >>confdefs.h <<EOF
9507#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
9508EOF
9509
9510fi
9511done
9512
9513	if test "$ac_cv_header_winsock2_h" = "yes" ; then
9514		cf_winsock_lib="-lws2_32"
9515	elif test "$ac_cv_header_winsock_h" = "yes" ; then
9516		cf_winsock_lib="-lwsock32"
9517	fi
9518
9519	cf_save_LIBS="$LIBS"
9520
9521cf_add_libs="$LIBS"
9522# reverse order
9523cf_add_0lib=
9524for cf_add_1lib in $cf_winsock_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
9525# filter duplicates
9526for cf_add_1lib in $cf_add_0lib; do
9527	for cf_add_2lib in $cf_add_libs; do
9528		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
9529			cf_add_1lib=
9530			break
9531		fi
9532	done
9533	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
9534done
9535LIBS="$cf_add_libs"
9536
9537	cat >conftest.$ac_ext <<_ACEOF
9538#line 9538 "configure"
9539#include "confdefs.h"
9540
9541#ifdef HAVE_WINDOWS_H
9542#undef WIN32_LEAN_AND_MEAN
9543#define WIN32_LEAN_AND_MEAN
9544#include <windows.h>
9545#ifdef HAVE_WINSOCK2_H
9546#include <winsock2.h>
9547#else
9548#ifdef HAVE_WINSOCK_H
9549#include <winsock.h>
9550#endif
9551#endif
9552#endif
9553
9554int
9555main (void)
9556{
9557
9558	char buffer[1024];
9559	gethostname(buffer, sizeof(buffer));
9560  ;
9561  return 0;
9562}
9563_ACEOF
9564rm -f conftest.$ac_objext conftest$ac_exeext
9565if { (eval echo "$as_me:9565: \"$ac_link\"") >&5
9566  (eval $ac_link) 2>&5
9567  ac_status=$?
9568  echo "$as_me:9568: \$? = $ac_status" >&5
9569  (exit $ac_status); } &&
9570         { ac_try='test -s conftest$ac_exeext'
9571  { (eval echo "$as_me:9571: \"$ac_try\"") >&5
9572  (eval $ac_try) 2>&5
9573  ac_status=$?
9574  echo "$as_me:9574: \$? = $ac_status" >&5
9575  (exit $ac_status); }; }; then
9576  cf_cv_netlibs="$cf_winsock_lib $cf_cv_netlibs"
9577else
9578  echo "$as_me: failed program was:" >&5
9579cat conftest.$ac_ext >&5
9580{ { echo "$as_me:9580: error: Cannot link against winsock library" >&5
9581echo "$as_me: error: Cannot link against winsock library" >&2;}
9582   { (exit 1); exit 1; }; }
9583fi
9584rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9585
9586	LIBS="$cf_save_LIBS"
9587	;;
9588*)
9589
9590for ac_func in gethostname
9591do
9592as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9593echo "$as_me:9593: checking for $ac_func" >&5
9594echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9595if eval "test \"\${$as_ac_var+set}\" = set"; then
9596  echo $ECHO_N "(cached) $ECHO_C" >&6
9597else
9598  cat >conftest.$ac_ext <<_ACEOF
9599#line 9599 "configure"
9600#include "confdefs.h"
9601#define $ac_func autoconf_temporary
9602#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9603#undef $ac_func
9604
9605#ifdef __cplusplus
9606extern "C"
9607#endif
9608
9609/* We use char because int might match the return type of a gcc2
9610   builtin and then its argument prototype would still apply.  */
9611char $ac_func (void);
9612
9613int
9614main (void)
9615{
9616
9617/* The GNU C library defines stubs for functions which it implements
9618    to always fail with ENOSYS.  Some functions are actually named
9619    something starting with __ and the normal name is an alias.  */
9620#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9621#error found stub for $ac_func
9622#endif
9623
9624	return $ac_func ();
9625  ;
9626  return 0;
9627}
9628_ACEOF
9629rm -f conftest.$ac_objext conftest$ac_exeext
9630if { (eval echo "$as_me:9630: \"$ac_link\"") >&5
9631  (eval $ac_link) 2>&5
9632  ac_status=$?
9633  echo "$as_me:9633: \$? = $ac_status" >&5
9634  (exit $ac_status); } &&
9635         { ac_try='test -s conftest$ac_exeext'
9636  { (eval echo "$as_me:9636: \"$ac_try\"") >&5
9637  (eval $ac_try) 2>&5
9638  ac_status=$?
9639  echo "$as_me:9639: \$? = $ac_status" >&5
9640  (exit $ac_status); }; }; then
9641  eval "$as_ac_var=yes"
9642else
9643  echo "$as_me: failed program was:" >&5
9644cat conftest.$ac_ext >&5
9645eval "$as_ac_var=no"
9646fi
9647rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9648fi
9649echo "$as_me:9649: result: `eval echo '${'$as_ac_var'}'`" >&5
9650echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9651if test `eval echo '${'$as_ac_var'}'` = yes; then
9652  cat >>confdefs.h <<EOF
9653#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9654EOF
9655
9656else
9657
9658echo "$as_me:9658: checking for gethostname in -lnsl" >&5
9659echo $ECHO_N "checking for gethostname in -lnsl... $ECHO_C" >&6
9660if test "${ac_cv_lib_nsl_gethostname+set}" = set; then
9661  echo $ECHO_N "(cached) $ECHO_C" >&6
9662else
9663  ac_check_lib_save_LIBS=$LIBS
9664LIBS="-lnsl $cf_cv_netlibs $LIBS"
9665cat >conftest.$ac_ext <<_ACEOF
9666#line 9666 "configure"
9667#include "confdefs.h"
9668
9669/* Override any gcc2 internal prototype to avoid an error.  */
9670#ifdef __cplusplus
9671extern "C"
9672#endif
9673/* We use char because int might match the return type of a gcc2
9674   builtin and then its argument prototype would still apply.  */
9675char gethostname ();
9676int
9677main (void)
9678{
9679gethostname ();
9680  ;
9681  return 0;
9682}
9683_ACEOF
9684rm -f conftest.$ac_objext conftest$ac_exeext
9685if { (eval echo "$as_me:9685: \"$ac_link\"") >&5
9686  (eval $ac_link) 2>&5
9687  ac_status=$?
9688  echo "$as_me:9688: \$? = $ac_status" >&5
9689  (exit $ac_status); } &&
9690         { ac_try='test -s conftest$ac_exeext'
9691  { (eval echo "$as_me:9691: \"$ac_try\"") >&5
9692  (eval $ac_try) 2>&5
9693  ac_status=$?
9694  echo "$as_me:9694: \$? = $ac_status" >&5
9695  (exit $ac_status); }; }; then
9696  ac_cv_lib_nsl_gethostname=yes
9697else
9698  echo "$as_me: failed program was:" >&5
9699cat conftest.$ac_ext >&5
9700ac_cv_lib_nsl_gethostname=no
9701fi
9702rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9703LIBS=$ac_check_lib_save_LIBS
9704fi
9705echo "$as_me:9705: result: $ac_cv_lib_nsl_gethostname" >&5
9706echo "${ECHO_T}$ac_cv_lib_nsl_gethostname" >&6
9707if test $ac_cv_lib_nsl_gethostname = yes; then
9708
9709cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9710
9711	cat >>confdefs.h <<EOF
9712#define HAVE_$cf_tr_func 1
9713EOF
9714
9715	ac_cv_func_gethostname=yes
9716	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
9717else
9718
9719	ac_cv_func_gethostname=unknown
9720	unset ac_cv_func_gethostname 2>/dev/null
9721
9722echo "$as_me:9722: checking for gethostname in -lsocket" >&5
9723echo $ECHO_N "checking for gethostname in -lsocket... $ECHO_C" >&6
9724if test "${ac_cv_lib_socket_gethostname+set}" = set; then
9725  echo $ECHO_N "(cached) $ECHO_C" >&6
9726else
9727  ac_check_lib_save_LIBS=$LIBS
9728LIBS="-lsocket $cf_cv_netlibs $LIBS"
9729cat >conftest.$ac_ext <<_ACEOF
9730#line 9730 "configure"
9731#include "confdefs.h"
9732
9733/* Override any gcc2 internal prototype to avoid an error.  */
9734#ifdef __cplusplus
9735extern "C"
9736#endif
9737/* We use char because int might match the return type of a gcc2
9738   builtin and then its argument prototype would still apply.  */
9739char gethostname ();
9740int
9741main (void)
9742{
9743gethostname ();
9744  ;
9745  return 0;
9746}
9747_ACEOF
9748rm -f conftest.$ac_objext conftest$ac_exeext
9749if { (eval echo "$as_me:9749: \"$ac_link\"") >&5
9750  (eval $ac_link) 2>&5
9751  ac_status=$?
9752  echo "$as_me:9752: \$? = $ac_status" >&5
9753  (exit $ac_status); } &&
9754         { ac_try='test -s conftest$ac_exeext'
9755  { (eval echo "$as_me:9755: \"$ac_try\"") >&5
9756  (eval $ac_try) 2>&5
9757  ac_status=$?
9758  echo "$as_me:9758: \$? = $ac_status" >&5
9759  (exit $ac_status); }; }; then
9760  ac_cv_lib_socket_gethostname=yes
9761else
9762  echo "$as_me: failed program was:" >&5
9763cat conftest.$ac_ext >&5
9764ac_cv_lib_socket_gethostname=no
9765fi
9766rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9767LIBS=$ac_check_lib_save_LIBS
9768fi
9769echo "$as_me:9769: result: $ac_cv_lib_socket_gethostname" >&5
9770echo "${ECHO_T}$ac_cv_lib_socket_gethostname" >&6
9771if test $ac_cv_lib_socket_gethostname = yes; then
9772
9773cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9774
9775	cat >>confdefs.h <<EOF
9776#define HAVE_$cf_tr_func 1
9777EOF
9778
9779	ac_cv_func_gethostname=yes
9780	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
9781else
9782
9783	ac_cv_func_gethostname=unknown
9784	unset ac_cv_func_gethostname 2>/dev/null
9785
9786fi
9787
9788fi
9789
9790fi
9791done
9792
9793	echo "$as_me:9793: checking for main in -linet" >&5
9794echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
9795if test "${ac_cv_lib_inet_main+set}" = set; then
9796  echo $ECHO_N "(cached) $ECHO_C" >&6
9797else
9798  ac_check_lib_save_LIBS=$LIBS
9799LIBS="-linet  $LIBS"
9800cat >conftest.$ac_ext <<_ACEOF
9801#line 9801 "configure"
9802#include "confdefs.h"
9803
9804int
9805main (void)
9806{
9807main ();
9808  ;
9809  return 0;
9810}
9811_ACEOF
9812rm -f conftest.$ac_objext conftest$ac_exeext
9813if { (eval echo "$as_me:9813: \"$ac_link\"") >&5
9814  (eval $ac_link) 2>&5
9815  ac_status=$?
9816  echo "$as_me:9816: \$? = $ac_status" >&5
9817  (exit $ac_status); } &&
9818         { ac_try='test -s conftest$ac_exeext'
9819  { (eval echo "$as_me:9819: \"$ac_try\"") >&5
9820  (eval $ac_try) 2>&5
9821  ac_status=$?
9822  echo "$as_me:9822: \$? = $ac_status" >&5
9823  (exit $ac_status); }; }; then
9824  ac_cv_lib_inet_main=yes
9825else
9826  echo "$as_me: failed program was:" >&5
9827cat conftest.$ac_ext >&5
9828ac_cv_lib_inet_main=no
9829fi
9830rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9831LIBS=$ac_check_lib_save_LIBS
9832fi
9833echo "$as_me:9833: result: $ac_cv_lib_inet_main" >&5
9834echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
9835if test $ac_cv_lib_inet_main = yes; then
9836  cf_cv_netlibs="-linet $cf_cv_netlibs"
9837fi
9838
9839	if test "$ac_cv_func_lsocket" != no ; then
9840
9841for ac_func in socket
9842do
9843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
9844echo "$as_me:9844: checking for $ac_func" >&5
9845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
9846if eval "test \"\${$as_ac_var+set}\" = set"; then
9847  echo $ECHO_N "(cached) $ECHO_C" >&6
9848else
9849  cat >conftest.$ac_ext <<_ACEOF
9850#line 9850 "configure"
9851#include "confdefs.h"
9852#define $ac_func autoconf_temporary
9853#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
9854#undef $ac_func
9855
9856#ifdef __cplusplus
9857extern "C"
9858#endif
9859
9860/* We use char because int might match the return type of a gcc2
9861   builtin and then its argument prototype would still apply.  */
9862char $ac_func (void);
9863
9864int
9865main (void)
9866{
9867
9868/* The GNU C library defines stubs for functions which it implements
9869    to always fail with ENOSYS.  Some functions are actually named
9870    something starting with __ and the normal name is an alias.  */
9871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
9872#error found stub for $ac_func
9873#endif
9874
9875	return $ac_func ();
9876  ;
9877  return 0;
9878}
9879_ACEOF
9880rm -f conftest.$ac_objext conftest$ac_exeext
9881if { (eval echo "$as_me:9881: \"$ac_link\"") >&5
9882  (eval $ac_link) 2>&5
9883  ac_status=$?
9884  echo "$as_me:9884: \$? = $ac_status" >&5
9885  (exit $ac_status); } &&
9886         { ac_try='test -s conftest$ac_exeext'
9887  { (eval echo "$as_me:9887: \"$ac_try\"") >&5
9888  (eval $ac_try) 2>&5
9889  ac_status=$?
9890  echo "$as_me:9890: \$? = $ac_status" >&5
9891  (exit $ac_status); }; }; then
9892  eval "$as_ac_var=yes"
9893else
9894  echo "$as_me: failed program was:" >&5
9895cat conftest.$ac_ext >&5
9896eval "$as_ac_var=no"
9897fi
9898rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9899fi
9900echo "$as_me:9900: result: `eval echo '${'$as_ac_var'}'`" >&5
9901echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
9902if test `eval echo '${'$as_ac_var'}'` = yes; then
9903  cat >>confdefs.h <<EOF
9904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9905EOF
9906
9907else
9908
9909echo "$as_me:9909: checking for socket in -lsocket" >&5
9910echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
9911if test "${ac_cv_lib_socket_socket+set}" = set; then
9912  echo $ECHO_N "(cached) $ECHO_C" >&6
9913else
9914  ac_check_lib_save_LIBS=$LIBS
9915LIBS="-lsocket $cf_cv_netlibs $LIBS"
9916cat >conftest.$ac_ext <<_ACEOF
9917#line 9917 "configure"
9918#include "confdefs.h"
9919
9920/* Override any gcc2 internal prototype to avoid an error.  */
9921#ifdef __cplusplus
9922extern "C"
9923#endif
9924/* We use char because int might match the return type of a gcc2
9925   builtin and then its argument prototype would still apply.  */
9926char socket ();
9927int
9928main (void)
9929{
9930socket ();
9931  ;
9932  return 0;
9933}
9934_ACEOF
9935rm -f conftest.$ac_objext conftest$ac_exeext
9936if { (eval echo "$as_me:9936: \"$ac_link\"") >&5
9937  (eval $ac_link) 2>&5
9938  ac_status=$?
9939  echo "$as_me:9939: \$? = $ac_status" >&5
9940  (exit $ac_status); } &&
9941         { ac_try='test -s conftest$ac_exeext'
9942  { (eval echo "$as_me:9942: \"$ac_try\"") >&5
9943  (eval $ac_try) 2>&5
9944  ac_status=$?
9945  echo "$as_me:9945: \$? = $ac_status" >&5
9946  (exit $ac_status); }; }; then
9947  ac_cv_lib_socket_socket=yes
9948else
9949  echo "$as_me: failed program was:" >&5
9950cat conftest.$ac_ext >&5
9951ac_cv_lib_socket_socket=no
9952fi
9953rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
9954LIBS=$ac_check_lib_save_LIBS
9955fi
9956echo "$as_me:9956: result: $ac_cv_lib_socket_socket" >&5
9957echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
9958if test $ac_cv_lib_socket_socket = yes; then
9959
9960cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
9961
9962	cat >>confdefs.h <<EOF
9963#define HAVE_$cf_tr_func 1
9964EOF
9965
9966	ac_cv_func_socket=yes
9967	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
9968else
9969
9970	ac_cv_func_socket=unknown
9971	unset ac_cv_func_socket 2>/dev/null
9972
9973echo "$as_me:9973: checking for socket in -lbsd" >&5
9974echo $ECHO_N "checking for socket in -lbsd... $ECHO_C" >&6
9975if test "${ac_cv_lib_bsd_socket+set}" = set; then
9976  echo $ECHO_N "(cached) $ECHO_C" >&6
9977else
9978  ac_check_lib_save_LIBS=$LIBS
9979LIBS="-lbsd $cf_cv_netlibs $LIBS"
9980cat >conftest.$ac_ext <<_ACEOF
9981#line 9981 "configure"
9982#include "confdefs.h"
9983
9984/* Override any gcc2 internal prototype to avoid an error.  */
9985#ifdef __cplusplus
9986extern "C"
9987#endif
9988/* We use char because int might match the return type of a gcc2
9989   builtin and then its argument prototype would still apply.  */
9990char socket ();
9991int
9992main (void)
9993{
9994socket ();
9995  ;
9996  return 0;
9997}
9998_ACEOF
9999rm -f conftest.$ac_objext conftest$ac_exeext
10000if { (eval echo "$as_me:10000: \"$ac_link\"") >&5
10001  (eval $ac_link) 2>&5
10002  ac_status=$?
10003  echo "$as_me:10003: \$? = $ac_status" >&5
10004  (exit $ac_status); } &&
10005         { ac_try='test -s conftest$ac_exeext'
10006  { (eval echo "$as_me:10006: \"$ac_try\"") >&5
10007  (eval $ac_try) 2>&5
10008  ac_status=$?
10009  echo "$as_me:10009: \$? = $ac_status" >&5
10010  (exit $ac_status); }; }; then
10011  ac_cv_lib_bsd_socket=yes
10012else
10013  echo "$as_me: failed program was:" >&5
10014cat conftest.$ac_ext >&5
10015ac_cv_lib_bsd_socket=no
10016fi
10017rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10018LIBS=$ac_check_lib_save_LIBS
10019fi
10020echo "$as_me:10020: result: $ac_cv_lib_bsd_socket" >&5
10021echo "${ECHO_T}$ac_cv_lib_bsd_socket" >&6
10022if test $ac_cv_lib_bsd_socket = yes; then
10023
10024cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10025
10026	cat >>confdefs.h <<EOF
10027#define HAVE_$cf_tr_func 1
10028EOF
10029
10030	ac_cv_func_socket=yes
10031	if test "$cf_used_lib_bsd" != yes ; then cf_used_lib_bsd=yes; cf_cv_netlibs="-lbsd $cf_cv_netlibs"; fi
10032else
10033
10034	ac_cv_func_socket=unknown
10035	unset ac_cv_func_socket 2>/dev/null
10036
10037fi
10038
10039fi
10040
10041fi
10042done
10043
10044	fi
10045
10046for ac_func in gethostbyname
10047do
10048as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10049echo "$as_me:10049: checking for $ac_func" >&5
10050echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10051if eval "test \"\${$as_ac_var+set}\" = set"; then
10052  echo $ECHO_N "(cached) $ECHO_C" >&6
10053else
10054  cat >conftest.$ac_ext <<_ACEOF
10055#line 10055 "configure"
10056#include "confdefs.h"
10057#define $ac_func autoconf_temporary
10058#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10059#undef $ac_func
10060
10061#ifdef __cplusplus
10062extern "C"
10063#endif
10064
10065/* We use char because int might match the return type of a gcc2
10066   builtin and then its argument prototype would still apply.  */
10067char $ac_func (void);
10068
10069int
10070main (void)
10071{
10072
10073/* The GNU C library defines stubs for functions which it implements
10074    to always fail with ENOSYS.  Some functions are actually named
10075    something starting with __ and the normal name is an alias.  */
10076#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10077#error found stub for $ac_func
10078#endif
10079
10080	return $ac_func ();
10081  ;
10082  return 0;
10083}
10084_ACEOF
10085rm -f conftest.$ac_objext conftest$ac_exeext
10086if { (eval echo "$as_me:10086: \"$ac_link\"") >&5
10087  (eval $ac_link) 2>&5
10088  ac_status=$?
10089  echo "$as_me:10089: \$? = $ac_status" >&5
10090  (exit $ac_status); } &&
10091         { ac_try='test -s conftest$ac_exeext'
10092  { (eval echo "$as_me:10092: \"$ac_try\"") >&5
10093  (eval $ac_try) 2>&5
10094  ac_status=$?
10095  echo "$as_me:10095: \$? = $ac_status" >&5
10096  (exit $ac_status); }; }; then
10097  eval "$as_ac_var=yes"
10098else
10099  echo "$as_me: failed program was:" >&5
10100cat conftest.$ac_ext >&5
10101eval "$as_ac_var=no"
10102fi
10103rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10104fi
10105echo "$as_me:10105: result: `eval echo '${'$as_ac_var'}'`" >&5
10106echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10107if test `eval echo '${'$as_ac_var'}'` = yes; then
10108  cat >>confdefs.h <<EOF
10109#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10110EOF
10111
10112else
10113
10114echo "$as_me:10114: checking for gethostbyname in -lnsl" >&5
10115echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
10116if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
10117  echo $ECHO_N "(cached) $ECHO_C" >&6
10118else
10119  ac_check_lib_save_LIBS=$LIBS
10120LIBS="-lnsl $cf_cv_netlibs $LIBS"
10121cat >conftest.$ac_ext <<_ACEOF
10122#line 10122 "configure"
10123#include "confdefs.h"
10124
10125/* Override any gcc2 internal prototype to avoid an error.  */
10126#ifdef __cplusplus
10127extern "C"
10128#endif
10129/* We use char because int might match the return type of a gcc2
10130   builtin and then its argument prototype would still apply.  */
10131char gethostbyname ();
10132int
10133main (void)
10134{
10135gethostbyname ();
10136  ;
10137  return 0;
10138}
10139_ACEOF
10140rm -f conftest.$ac_objext conftest$ac_exeext
10141if { (eval echo "$as_me:10141: \"$ac_link\"") >&5
10142  (eval $ac_link) 2>&5
10143  ac_status=$?
10144  echo "$as_me:10144: \$? = $ac_status" >&5
10145  (exit $ac_status); } &&
10146         { ac_try='test -s conftest$ac_exeext'
10147  { (eval echo "$as_me:10147: \"$ac_try\"") >&5
10148  (eval $ac_try) 2>&5
10149  ac_status=$?
10150  echo "$as_me:10150: \$? = $ac_status" >&5
10151  (exit $ac_status); }; }; then
10152  ac_cv_lib_nsl_gethostbyname=yes
10153else
10154  echo "$as_me: failed program was:" >&5
10155cat conftest.$ac_ext >&5
10156ac_cv_lib_nsl_gethostbyname=no
10157fi
10158rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10159LIBS=$ac_check_lib_save_LIBS
10160fi
10161echo "$as_me:10161: result: $ac_cv_lib_nsl_gethostbyname" >&5
10162echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
10163if test $ac_cv_lib_nsl_gethostbyname = yes; then
10164
10165cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10166
10167	cat >>confdefs.h <<EOF
10168#define HAVE_$cf_tr_func 1
10169EOF
10170
10171	ac_cv_func_gethostbyname=yes
10172	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
10173else
10174
10175	ac_cv_func_gethostbyname=unknown
10176	unset ac_cv_func_gethostbyname 2>/dev/null
10177
10178fi
10179
10180fi
10181done
10182
10183for ac_func in inet_ntoa
10184do
10185as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10186echo "$as_me:10186: checking for $ac_func" >&5
10187echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10188if eval "test \"\${$as_ac_var+set}\" = set"; then
10189  echo $ECHO_N "(cached) $ECHO_C" >&6
10190else
10191  cat >conftest.$ac_ext <<_ACEOF
10192#line 10192 "configure"
10193#include "confdefs.h"
10194#define $ac_func autoconf_temporary
10195#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10196#undef $ac_func
10197
10198#ifdef __cplusplus
10199extern "C"
10200#endif
10201
10202/* We use char because int might match the return type of a gcc2
10203   builtin and then its argument prototype would still apply.  */
10204char $ac_func (void);
10205
10206int
10207main (void)
10208{
10209
10210/* The GNU C library defines stubs for functions which it implements
10211    to always fail with ENOSYS.  Some functions are actually named
10212    something starting with __ and the normal name is an alias.  */
10213#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10214#error found stub for $ac_func
10215#endif
10216
10217	return $ac_func ();
10218  ;
10219  return 0;
10220}
10221_ACEOF
10222rm -f conftest.$ac_objext conftest$ac_exeext
10223if { (eval echo "$as_me:10223: \"$ac_link\"") >&5
10224  (eval $ac_link) 2>&5
10225  ac_status=$?
10226  echo "$as_me:10226: \$? = $ac_status" >&5
10227  (exit $ac_status); } &&
10228         { ac_try='test -s conftest$ac_exeext'
10229  { (eval echo "$as_me:10229: \"$ac_try\"") >&5
10230  (eval $ac_try) 2>&5
10231  ac_status=$?
10232  echo "$as_me:10232: \$? = $ac_status" >&5
10233  (exit $ac_status); }; }; then
10234  eval "$as_ac_var=yes"
10235else
10236  echo "$as_me: failed program was:" >&5
10237cat conftest.$ac_ext >&5
10238eval "$as_ac_var=no"
10239fi
10240rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10241fi
10242echo "$as_me:10242: result: `eval echo '${'$as_ac_var'}'`" >&5
10243echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10244if test `eval echo '${'$as_ac_var'}'` = yes; then
10245  cat >>confdefs.h <<EOF
10246#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10247EOF
10248
10249else
10250
10251echo "$as_me:10251: checking for inet_ntoa in -lnsl" >&5
10252echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
10253if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
10254  echo $ECHO_N "(cached) $ECHO_C" >&6
10255else
10256  ac_check_lib_save_LIBS=$LIBS
10257LIBS="-lnsl $cf_cv_netlibs $LIBS"
10258cat >conftest.$ac_ext <<_ACEOF
10259#line 10259 "configure"
10260#include "confdefs.h"
10261
10262/* Override any gcc2 internal prototype to avoid an error.  */
10263#ifdef __cplusplus
10264extern "C"
10265#endif
10266/* We use char because int might match the return type of a gcc2
10267   builtin and then its argument prototype would still apply.  */
10268char inet_ntoa ();
10269int
10270main (void)
10271{
10272inet_ntoa ();
10273  ;
10274  return 0;
10275}
10276_ACEOF
10277rm -f conftest.$ac_objext conftest$ac_exeext
10278if { (eval echo "$as_me:10278: \"$ac_link\"") >&5
10279  (eval $ac_link) 2>&5
10280  ac_status=$?
10281  echo "$as_me:10281: \$? = $ac_status" >&5
10282  (exit $ac_status); } &&
10283         { ac_try='test -s conftest$ac_exeext'
10284  { (eval echo "$as_me:10284: \"$ac_try\"") >&5
10285  (eval $ac_try) 2>&5
10286  ac_status=$?
10287  echo "$as_me:10287: \$? = $ac_status" >&5
10288  (exit $ac_status); }; }; then
10289  ac_cv_lib_nsl_inet_ntoa=yes
10290else
10291  echo "$as_me: failed program was:" >&5
10292cat conftest.$ac_ext >&5
10293ac_cv_lib_nsl_inet_ntoa=no
10294fi
10295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10296LIBS=$ac_check_lib_save_LIBS
10297fi
10298echo "$as_me:10298: result: $ac_cv_lib_nsl_inet_ntoa" >&5
10299echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
10300if test $ac_cv_lib_nsl_inet_ntoa = yes; then
10301
10302cf_tr_func=`echo "inet_ntoa" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10303
10304	cat >>confdefs.h <<EOF
10305#define HAVE_$cf_tr_func 1
10306EOF
10307
10308	ac_cv_func_inet_ntoa=yes
10309	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
10310else
10311
10312	ac_cv_func_inet_ntoa=unknown
10313	unset ac_cv_func_inet_ntoa 2>/dev/null
10314
10315fi
10316
10317fi
10318done
10319
10320for ac_func in gethostbyname
10321do
10322as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10323echo "$as_me:10323: checking for $ac_func" >&5
10324echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10325if eval "test \"\${$as_ac_var+set}\" = set"; then
10326  echo $ECHO_N "(cached) $ECHO_C" >&6
10327else
10328  cat >conftest.$ac_ext <<_ACEOF
10329#line 10329 "configure"
10330#include "confdefs.h"
10331#define $ac_func autoconf_temporary
10332#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10333#undef $ac_func
10334
10335#ifdef __cplusplus
10336extern "C"
10337#endif
10338
10339/* We use char because int might match the return type of a gcc2
10340   builtin and then its argument prototype would still apply.  */
10341char $ac_func (void);
10342
10343int
10344main (void)
10345{
10346
10347/* The GNU C library defines stubs for functions which it implements
10348    to always fail with ENOSYS.  Some functions are actually named
10349    something starting with __ and the normal name is an alias.  */
10350#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10351#error found stub for $ac_func
10352#endif
10353
10354	return $ac_func ();
10355  ;
10356  return 0;
10357}
10358_ACEOF
10359rm -f conftest.$ac_objext conftest$ac_exeext
10360if { (eval echo "$as_me:10360: \"$ac_link\"") >&5
10361  (eval $ac_link) 2>&5
10362  ac_status=$?
10363  echo "$as_me:10363: \$? = $ac_status" >&5
10364  (exit $ac_status); } &&
10365         { ac_try='test -s conftest$ac_exeext'
10366  { (eval echo "$as_me:10366: \"$ac_try\"") >&5
10367  (eval $ac_try) 2>&5
10368  ac_status=$?
10369  echo "$as_me:10369: \$? = $ac_status" >&5
10370  (exit $ac_status); }; }; then
10371  eval "$as_ac_var=yes"
10372else
10373  echo "$as_me: failed program was:" >&5
10374cat conftest.$ac_ext >&5
10375eval "$as_ac_var=no"
10376fi
10377rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10378fi
10379echo "$as_me:10379: result: `eval echo '${'$as_ac_var'}'`" >&5
10380echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10381if test `eval echo '${'$as_ac_var'}'` = yes; then
10382  cat >>confdefs.h <<EOF
10383#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10384EOF
10385
10386else
10387
10388echo "$as_me:10388: checking for gethostbyname in -lnetwork" >&5
10389echo $ECHO_N "checking for gethostbyname in -lnetwork... $ECHO_C" >&6
10390if test "${ac_cv_lib_network_gethostbyname+set}" = set; then
10391  echo $ECHO_N "(cached) $ECHO_C" >&6
10392else
10393  ac_check_lib_save_LIBS=$LIBS
10394LIBS="-lnetwork $cf_cv_netlibs $LIBS"
10395cat >conftest.$ac_ext <<_ACEOF
10396#line 10396 "configure"
10397#include "confdefs.h"
10398
10399/* Override any gcc2 internal prototype to avoid an error.  */
10400#ifdef __cplusplus
10401extern "C"
10402#endif
10403/* We use char because int might match the return type of a gcc2
10404   builtin and then its argument prototype would still apply.  */
10405char gethostbyname ();
10406int
10407main (void)
10408{
10409gethostbyname ();
10410  ;
10411  return 0;
10412}
10413_ACEOF
10414rm -f conftest.$ac_objext conftest$ac_exeext
10415if { (eval echo "$as_me:10415: \"$ac_link\"") >&5
10416  (eval $ac_link) 2>&5
10417  ac_status=$?
10418  echo "$as_me:10418: \$? = $ac_status" >&5
10419  (exit $ac_status); } &&
10420         { ac_try='test -s conftest$ac_exeext'
10421  { (eval echo "$as_me:10421: \"$ac_try\"") >&5
10422  (eval $ac_try) 2>&5
10423  ac_status=$?
10424  echo "$as_me:10424: \$? = $ac_status" >&5
10425  (exit $ac_status); }; }; then
10426  ac_cv_lib_network_gethostbyname=yes
10427else
10428  echo "$as_me: failed program was:" >&5
10429cat conftest.$ac_ext >&5
10430ac_cv_lib_network_gethostbyname=no
10431fi
10432rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10433LIBS=$ac_check_lib_save_LIBS
10434fi
10435echo "$as_me:10435: result: $ac_cv_lib_network_gethostbyname" >&5
10436echo "${ECHO_T}$ac_cv_lib_network_gethostbyname" >&6
10437if test $ac_cv_lib_network_gethostbyname = yes; then
10438
10439cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10440
10441	cat >>confdefs.h <<EOF
10442#define HAVE_$cf_tr_func 1
10443EOF
10444
10445	ac_cv_func_gethostbyname=yes
10446	if test "$cf_used_lib_network" != yes ; then cf_used_lib_network=yes; cf_cv_netlibs="-lnetwork $cf_cv_netlibs"; fi
10447else
10448
10449	ac_cv_func_gethostbyname=unknown
10450	unset ac_cv_func_gethostbyname 2>/dev/null
10451
10452fi
10453
10454fi
10455done
10456
10457for ac_func in strcasecmp
10458do
10459as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10460echo "$as_me:10460: checking for $ac_func" >&5
10461echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10462if eval "test \"\${$as_ac_var+set}\" = set"; then
10463  echo $ECHO_N "(cached) $ECHO_C" >&6
10464else
10465  cat >conftest.$ac_ext <<_ACEOF
10466#line 10466 "configure"
10467#include "confdefs.h"
10468#define $ac_func autoconf_temporary
10469#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10470#undef $ac_func
10471
10472#ifdef __cplusplus
10473extern "C"
10474#endif
10475
10476/* We use char because int might match the return type of a gcc2
10477   builtin and then its argument prototype would still apply.  */
10478char $ac_func (void);
10479
10480int
10481main (void)
10482{
10483
10484/* The GNU C library defines stubs for functions which it implements
10485    to always fail with ENOSYS.  Some functions are actually named
10486    something starting with __ and the normal name is an alias.  */
10487#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10488#error found stub for $ac_func
10489#endif
10490
10491	return $ac_func ();
10492  ;
10493  return 0;
10494}
10495_ACEOF
10496rm -f conftest.$ac_objext conftest$ac_exeext
10497if { (eval echo "$as_me:10497: \"$ac_link\"") >&5
10498  (eval $ac_link) 2>&5
10499  ac_status=$?
10500  echo "$as_me:10500: \$? = $ac_status" >&5
10501  (exit $ac_status); } &&
10502         { ac_try='test -s conftest$ac_exeext'
10503  { (eval echo "$as_me:10503: \"$ac_try\"") >&5
10504  (eval $ac_try) 2>&5
10505  ac_status=$?
10506  echo "$as_me:10506: \$? = $ac_status" >&5
10507  (exit $ac_status); }; }; then
10508  eval "$as_ac_var=yes"
10509else
10510  echo "$as_me: failed program was:" >&5
10511cat conftest.$ac_ext >&5
10512eval "$as_ac_var=no"
10513fi
10514rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10515fi
10516echo "$as_me:10516: result: `eval echo '${'$as_ac_var'}'`" >&5
10517echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
10518if test `eval echo '${'$as_ac_var'}'` = yes; then
10519  cat >>confdefs.h <<EOF
10520#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10521EOF
10522
10523else
10524
10525echo "$as_me:10525: checking for strcasecmp in -lresolv" >&5
10526echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
10527if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
10528  echo $ECHO_N "(cached) $ECHO_C" >&6
10529else
10530  ac_check_lib_save_LIBS=$LIBS
10531LIBS="-lresolv $cf_cv_netlibs $LIBS"
10532cat >conftest.$ac_ext <<_ACEOF
10533#line 10533 "configure"
10534#include "confdefs.h"
10535
10536/* Override any gcc2 internal prototype to avoid an error.  */
10537#ifdef __cplusplus
10538extern "C"
10539#endif
10540/* We use char because int might match the return type of a gcc2
10541   builtin and then its argument prototype would still apply.  */
10542char strcasecmp ();
10543int
10544main (void)
10545{
10546strcasecmp ();
10547  ;
10548  return 0;
10549}
10550_ACEOF
10551rm -f conftest.$ac_objext conftest$ac_exeext
10552if { (eval echo "$as_me:10552: \"$ac_link\"") >&5
10553  (eval $ac_link) 2>&5
10554  ac_status=$?
10555  echo "$as_me:10555: \$? = $ac_status" >&5
10556  (exit $ac_status); } &&
10557         { ac_try='test -s conftest$ac_exeext'
10558  { (eval echo "$as_me:10558: \"$ac_try\"") >&5
10559  (eval $ac_try) 2>&5
10560  ac_status=$?
10561  echo "$as_me:10561: \$? = $ac_status" >&5
10562  (exit $ac_status); }; }; then
10563  ac_cv_lib_resolv_strcasecmp=yes
10564else
10565  echo "$as_me: failed program was:" >&5
10566cat conftest.$ac_ext >&5
10567ac_cv_lib_resolv_strcasecmp=no
10568fi
10569rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10570LIBS=$ac_check_lib_save_LIBS
10571fi
10572echo "$as_me:10572: result: $ac_cv_lib_resolv_strcasecmp" >&5
10573echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
10574if test $ac_cv_lib_resolv_strcasecmp = yes; then
10575
10576cf_tr_func=`echo "strcasecmp" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
10577
10578	cat >>confdefs.h <<EOF
10579#define HAVE_$cf_tr_func 1
10580EOF
10581
10582	ac_cv_func_strcasecmp=yes
10583	if test "$cf_used_lib_resolv" != yes ; then cf_used_lib_resolv=yes; cf_cv_netlibs="-lresolv $cf_cv_netlibs"; fi
10584else
10585
10586	ac_cv_func_strcasecmp=unknown
10587	unset ac_cv_func_strcasecmp 2>/dev/null
10588
10589fi
10590
10591fi
10592done
10593
10594	;;
10595esac
10596
10597fi
10598
10599case $cf_cv_netlibs in
10600*ws2_32*)
10601
10602cat >>confdefs.h <<\EOF
10603#define USE_WINSOCK2_H 1
10604EOF
10605
10606	;;
10607esac
10608
10609cf_add_libs="$LIBS"
10610# reverse order
10611cf_add_0lib=
10612for cf_add_1lib in $cf_cv_netlibs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10613# filter duplicates
10614for cf_add_1lib in $cf_add_0lib; do
10615	for cf_add_2lib in $cf_add_libs; do
10616		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10617			cf_add_1lib=
10618			break
10619		fi
10620	done
10621	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10622done
10623LIBS="$cf_add_libs"
10624
10625test $cf_test_netlibs = no && echo "$cf_cv_netlibs" >&6
10626
10627	if test "x$cf_cv_use_libsocks5" != xno ; then
10628
10629case "$cf_cv_use_libsocks5" in
10630no)
10631	;;
10632yes)
10633	;;
10634*)
10635
10636for cf_searchpath in `echo "$cf_cv_use_libsocks5" | tr $PATH_SEPARATOR ' '`; do
10637	if test -d $cf_searchpath/include; then
10638
10639if test -n "$cf_searchpath/include" ; then
10640  for cf_add_incdir in $cf_searchpath/include
10641  do
10642	while test $cf_add_incdir != /usr/include
10643	do
10644	  if test -d $cf_add_incdir
10645	  then
10646		cf_have_incdir=no
10647		if test -n "$CFLAGS$CPPFLAGS" ; then
10648		  # a loop is needed to ensure we can add subdirs of existing dirs
10649		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10650			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10651			  cf_have_incdir=yes; break
10652			fi
10653		  done
10654		fi
10655
10656		if test "$cf_have_incdir" = no ; then
10657		  if test "$cf_add_incdir" = /usr/local/include ; then
10658			if test "$GCC" = yes
10659			then
10660			  cf_save_CPPFLAGS=$CPPFLAGS
10661
10662	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10663	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10664
10665			  cat >conftest.$ac_ext <<_ACEOF
10666#line 10666 "configure"
10667#include "confdefs.h"
10668#include <stdio.h>
10669int
10670main (void)
10671{
10672printf("Hello")
10673  ;
10674  return 0;
10675}
10676_ACEOF
10677rm -f conftest.$ac_objext
10678if { (eval echo "$as_me:10678: \"$ac_compile\"") >&5
10679  (eval $ac_compile) 2>&5
10680  ac_status=$?
10681  echo "$as_me:10681: \$? = $ac_status" >&5
10682  (exit $ac_status); } &&
10683         { ac_try='test -s conftest.$ac_objext'
10684  { (eval echo "$as_me:10684: \"$ac_try\"") >&5
10685  (eval $ac_try) 2>&5
10686  ac_status=$?
10687  echo "$as_me:10687: \$? = $ac_status" >&5
10688  (exit $ac_status); }; }; then
10689  :
10690else
10691  echo "$as_me: failed program was:" >&5
10692cat conftest.$ac_ext >&5
10693cf_have_incdir=yes
10694fi
10695rm -f conftest.$ac_objext conftest.$ac_ext
10696			  CPPFLAGS=$cf_save_CPPFLAGS
10697			fi
10698		  fi
10699		fi
10700
10701		if test "$cf_have_incdir" = no ; then
10702		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10703
10704echo "${as_me:-configure}:10704: testing adding $cf_add_incdir to include-path ..." 1>&5
10705
10706		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10707
10708		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10709		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10710		  cf_add_incdir="$cf_top_incdir"
10711		else
10712		  break
10713		fi
10714	  else
10715		break
10716	  fi
10717	done
10718  done
10719fi
10720
10721	elif test -d $cf_searchpath/../include ; then
10722
10723if test -n "$cf_searchpath/../include" ; then
10724  for cf_add_incdir in $cf_searchpath/../include
10725  do
10726	while test $cf_add_incdir != /usr/include
10727	do
10728	  if test -d $cf_add_incdir
10729	  then
10730		cf_have_incdir=no
10731		if test -n "$CFLAGS$CPPFLAGS" ; then
10732		  # a loop is needed to ensure we can add subdirs of existing dirs
10733		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10734			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10735			  cf_have_incdir=yes; break
10736			fi
10737		  done
10738		fi
10739
10740		if test "$cf_have_incdir" = no ; then
10741		  if test "$cf_add_incdir" = /usr/local/include ; then
10742			if test "$GCC" = yes
10743			then
10744			  cf_save_CPPFLAGS=$CPPFLAGS
10745
10746	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10747	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10748
10749			  cat >conftest.$ac_ext <<_ACEOF
10750#line 10750 "configure"
10751#include "confdefs.h"
10752#include <stdio.h>
10753int
10754main (void)
10755{
10756printf("Hello")
10757  ;
10758  return 0;
10759}
10760_ACEOF
10761rm -f conftest.$ac_objext
10762if { (eval echo "$as_me:10762: \"$ac_compile\"") >&5
10763  (eval $ac_compile) 2>&5
10764  ac_status=$?
10765  echo "$as_me:10765: \$? = $ac_status" >&5
10766  (exit $ac_status); } &&
10767         { ac_try='test -s conftest.$ac_objext'
10768  { (eval echo "$as_me:10768: \"$ac_try\"") >&5
10769  (eval $ac_try) 2>&5
10770  ac_status=$?
10771  echo "$as_me:10771: \$? = $ac_status" >&5
10772  (exit $ac_status); }; }; then
10773  :
10774else
10775  echo "$as_me: failed program was:" >&5
10776cat conftest.$ac_ext >&5
10777cf_have_incdir=yes
10778fi
10779rm -f conftest.$ac_objext conftest.$ac_ext
10780			  CPPFLAGS=$cf_save_CPPFLAGS
10781			fi
10782		  fi
10783		fi
10784
10785		if test "$cf_have_incdir" = no ; then
10786		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10787
10788echo "${as_me:-configure}:10788: testing adding $cf_add_incdir to include-path ..." 1>&5
10789
10790		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10791
10792		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
10793		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10794		  cf_add_incdir="$cf_top_incdir"
10795		else
10796		  break
10797		fi
10798	  else
10799		break
10800	  fi
10801	done
10802  done
10803fi
10804
10805	else
10806{ { echo "$as_me:10806: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
10807echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
10808   { (exit 1); exit 1; }; }
10809	fi
10810	if test -d $cf_searchpath/lib; then
10811
10812if test -n "$cf_searchpath/lib" ; then
10813	for cf_add_libdir in $cf_searchpath/lib
10814	do
10815		if test $cf_add_libdir = /usr/lib ; then
10816			:
10817		elif test -d $cf_add_libdir
10818		then
10819			cf_have_libdir=no
10820			if test -n "$LDFLAGS$LIBS" ; then
10821				# a loop is needed to ensure we can add subdirs of existing dirs
10822				for cf_test_libdir in $LDFLAGS $LIBS ; do
10823					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10824						cf_have_libdir=yes; break
10825					fi
10826				done
10827			fi
10828			if test "$cf_have_libdir" = no ; then
10829				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10830
10831echo "${as_me:-configure}:10831: testing adding $cf_add_libdir to library-path ..." 1>&5
10832
10833				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10834			fi
10835		fi
10836	done
10837fi
10838
10839	elif test -d $cf_searchpath ; then
10840
10841if test -n "$cf_searchpath" ; then
10842	for cf_add_libdir in $cf_searchpath
10843	do
10844		if test $cf_add_libdir = /usr/lib ; then
10845			:
10846		elif test -d $cf_add_libdir
10847		then
10848			cf_have_libdir=no
10849			if test -n "$LDFLAGS$LIBS" ; then
10850				# a loop is needed to ensure we can add subdirs of existing dirs
10851				for cf_test_libdir in $LDFLAGS $LIBS ; do
10852					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10853						cf_have_libdir=yes; break
10854					fi
10855				done
10856			fi
10857			if test "$cf_have_libdir" = no ; then
10858				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10859
10860echo "${as_me:-configure}:10860: testing adding $cf_add_libdir to library-path ..." 1>&5
10861
10862				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
10863			fi
10864		fi
10865	done
10866fi
10867
10868	else
10869{ { echo "$as_me:10869: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
10870echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
10871   { (exit 1); exit 1; }; }
10872	fi
10873done
10874
10875	;;
10876esac
10877
10878cf_add_libs="$LIBS"
10879# reverse order
10880cf_add_0lib=
10881for cf_add_1lib in -lsocks5; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10882# filter duplicates
10883for cf_add_1lib in $cf_add_0lib; do
10884	for cf_add_2lib in $cf_add_libs; do
10885		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10886			cf_add_1lib=
10887			break
10888		fi
10889	done
10890	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10891done
10892LIBS="$cf_add_libs"
10893
10894cat >>confdefs.h <<\EOF
10895#define USE_SOCKS5 1
10896EOF
10897
10898cat >>confdefs.h <<\EOF
10899#define SOCKS 1
10900EOF
10901
10902echo "$as_me:10902: checking if the socks library uses socks4 prefix" >&5
10903echo $ECHO_N "checking if the socks library uses socks4 prefix... $ECHO_C" >&6
10904cf_use_socks4=error
10905cat >conftest.$ac_ext <<_ACEOF
10906#line 10906 "configure"
10907#include "confdefs.h"
10908
10909#include <socks.h>
10910int
10911main (void)
10912{
10913
10914	Rinit((char *)0)
10915  ;
10916  return 0;
10917}
10918_ACEOF
10919rm -f conftest.$ac_objext conftest$ac_exeext
10920if { (eval echo "$as_me:10920: \"$ac_link\"") >&5
10921  (eval $ac_link) 2>&5
10922  ac_status=$?
10923  echo "$as_me:10923: \$? = $ac_status" >&5
10924  (exit $ac_status); } &&
10925         { ac_try='test -s conftest$ac_exeext'
10926  { (eval echo "$as_me:10926: \"$ac_try\"") >&5
10927  (eval $ac_try) 2>&5
10928  ac_status=$?
10929  echo "$as_me:10929: \$? = $ac_status" >&5
10930  (exit $ac_status); }; }; then
10931
10932cat >>confdefs.h <<\EOF
10933#define USE_SOCKS4_PREFIX 1
10934EOF
10935
10936	 cf_use_socks4=yes
10937else
10938  echo "$as_me: failed program was:" >&5
10939cat conftest.$ac_ext >&5
10940cat >conftest.$ac_ext <<_ACEOF
10941#line 10941 "configure"
10942#include "confdefs.h"
10943#include <socks.h>
10944int
10945main (void)
10946{
10947SOCKSinit((char *)0)
10948  ;
10949  return 0;
10950}
10951_ACEOF
10952rm -f conftest.$ac_objext conftest$ac_exeext
10953if { (eval echo "$as_me:10953: \"$ac_link\"") >&5
10954  (eval $ac_link) 2>&5
10955  ac_status=$?
10956  echo "$as_me:10956: \$? = $ac_status" >&5
10957  (exit $ac_status); } &&
10958         { ac_try='test -s conftest$ac_exeext'
10959  { (eval echo "$as_me:10959: \"$ac_try\"") >&5
10960  (eval $ac_try) 2>&5
10961  ac_status=$?
10962  echo "$as_me:10962: \$? = $ac_status" >&5
10963  (exit $ac_status); }; }; then
10964  cf_use_socks4=no
10965else
10966  echo "$as_me: failed program was:" >&5
10967cat conftest.$ac_ext >&5
10968{ { echo "$as_me:10968: error: Cannot link with socks5 library" >&5
10969echo "$as_me: error: Cannot link with socks5 library" >&2;}
10970   { (exit 1); exit 1; }; }
10971fi
10972rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10973fi
10974rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
10975echo "$as_me:10975: result: $cf_use_socks4" >&5
10976echo "${ECHO_T}$cf_use_socks4" >&6
10977
10978if test "$cf_use_socks4" = "yes" ; then
10979	cat >>confdefs.h <<\EOF
10980#define accept Raccept
10981EOF
10982
10983	cat >>confdefs.h <<\EOF
10984#define bind Rbind
10985EOF
10986
10987	cat >>confdefs.h <<\EOF
10988#define connect Rconnect
10989EOF
10990
10991	cat >>confdefs.h <<\EOF
10992#define getpeername Rgetpeername
10993EOF
10994
10995	cat >>confdefs.h <<\EOF
10996#define getsockname Rgetsockname
10997EOF
10998
10999	cat >>confdefs.h <<\EOF
11000#define listen Rlisten
11001EOF
11002
11003	cat >>confdefs.h <<\EOF
11004#define recvfrom Rrecvfrom
11005EOF
11006
11007	cat >>confdefs.h <<\EOF
11008#define select Rselect
11009EOF
11010
11011else
11012	cat >>confdefs.h <<\EOF
11013#define accept SOCKSaccept
11014EOF
11015
11016	cat >>confdefs.h <<\EOF
11017#define getpeername SOCKSgetpeername
11018EOF
11019
11020	cat >>confdefs.h <<\EOF
11021#define getsockname SOCKSgetsockname
11022EOF
11023
11024	cat >>confdefs.h <<\EOF
11025#define recvfrom SOCKSrecvfrom
11026EOF
11027
11028fi
11029
11030echo "$as_me:11030: checking if socks5p.h is available" >&5
11031echo $ECHO_N "checking if socks5p.h is available... $ECHO_C" >&6
11032cat >conftest.$ac_ext <<_ACEOF
11033#line 11033 "configure"
11034#include "confdefs.h"
11035
11036#define INCLUDE_PROTOTYPES
11037#include <socks.h>
11038int
11039main (void)
11040{
11041
11042	init((char *)0)
11043  ;
11044  return 0;
11045}
11046_ACEOF
11047rm -f conftest.$ac_objext
11048if { (eval echo "$as_me:11048: \"$ac_compile\"") >&5
11049  (eval $ac_compile) 2>&5
11050  ac_status=$?
11051  echo "$as_me:11051: \$? = $ac_status" >&5
11052  (exit $ac_status); } &&
11053         { ac_try='test -s conftest.$ac_objext'
11054  { (eval echo "$as_me:11054: \"$ac_try\"") >&5
11055  (eval $ac_try) 2>&5
11056  ac_status=$?
11057  echo "$as_me:11057: \$? = $ac_status" >&5
11058  (exit $ac_status); }; }; then
11059  cf_use_socks5p_h=yes
11060else
11061  echo "$as_me: failed program was:" >&5
11062cat conftest.$ac_ext >&5
11063cf_use_socks5p_h=no
11064fi
11065rm -f conftest.$ac_objext conftest.$ac_ext
11066echo "$as_me:11066: result: $cf_use_socks5p_h" >&5
11067echo "${ECHO_T}$cf_use_socks5p_h" >&6
11068
11069test "$cf_use_socks5p_h" = yes &&
11070cat >>confdefs.h <<\EOF
11071#define INCLUDE_PROTOTYPES 1
11072EOF
11073
11074	fi
11075fi
11076
11077### which locking method should be used for mailbox locking
11078### first look for all available locking methods
11079
11080for ac_header in unistd.h fcntl.h sys/file.h
11081do
11082as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11083echo "$as_me:11083: checking for $ac_header" >&5
11084echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11085if eval "test \"\${$as_ac_Header+set}\" = set"; then
11086  echo $ECHO_N "(cached) $ECHO_C" >&6
11087else
11088  cat >conftest.$ac_ext <<_ACEOF
11089#line 11089 "configure"
11090#include "confdefs.h"
11091#include <$ac_header>
11092_ACEOF
11093if { (eval echo "$as_me:11093: \"$ac_cpp conftest.$ac_ext\"") >&5
11094  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
11095  ac_status=$?
11096  egrep -v '^ *\+' conftest.er1 >conftest.err
11097  rm -f conftest.er1
11098  cat conftest.err >&5
11099  echo "$as_me:11099: \$? = $ac_status" >&5
11100  (exit $ac_status); } >/dev/null; then
11101  if test -s conftest.err; then
11102    ac_cpp_err=$ac_c_preproc_warn_flag
11103  else
11104    ac_cpp_err=
11105  fi
11106else
11107  ac_cpp_err=yes
11108fi
11109if test -z "$ac_cpp_err"; then
11110  eval "$as_ac_Header=yes"
11111else
11112  echo "$as_me: failed program was:" >&5
11113  cat conftest.$ac_ext >&5
11114  eval "$as_ac_Header=no"
11115fi
11116rm -f conftest.err conftest.$ac_ext
11117fi
11118echo "$as_me:11118: result: `eval echo '${'$as_ac_Header'}'`" >&5
11119echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
11120if test `eval echo '${'$as_ac_Header'}'` = yes; then
11121  cat >>confdefs.h <<EOF
11122#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11123EOF
11124
11125fi
11126done
11127
11128echo "$as_me:11128: checking for fcntl" >&5
11129echo $ECHO_N "checking for fcntl... $ECHO_C" >&6
11130if test "${ac_cv_func_fcntl+set}" = set; then
11131  echo $ECHO_N "(cached) $ECHO_C" >&6
11132else
11133  cat >conftest.$ac_ext <<_ACEOF
11134#line 11134 "configure"
11135#include "confdefs.h"
11136#define fcntl autoconf_temporary
11137#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11138#undef fcntl
11139
11140#ifdef __cplusplus
11141extern "C"
11142#endif
11143
11144/* We use char because int might match the return type of a gcc2
11145   builtin and then its argument prototype would still apply.  */
11146char fcntl (void);
11147
11148int
11149main (void)
11150{
11151
11152/* The GNU C library defines stubs for functions which it implements
11153    to always fail with ENOSYS.  Some functions are actually named
11154    something starting with __ and the normal name is an alias.  */
11155#if defined (__stub_fcntl) || defined (__stub___fcntl)
11156#error found stub for fcntl
11157#endif
11158
11159	return fcntl ();
11160  ;
11161  return 0;
11162}
11163_ACEOF
11164rm -f conftest.$ac_objext conftest$ac_exeext
11165if { (eval echo "$as_me:11165: \"$ac_link\"") >&5
11166  (eval $ac_link) 2>&5
11167  ac_status=$?
11168  echo "$as_me:11168: \$? = $ac_status" >&5
11169  (exit $ac_status); } &&
11170         { ac_try='test -s conftest$ac_exeext'
11171  { (eval echo "$as_me:11171: \"$ac_try\"") >&5
11172  (eval $ac_try) 2>&5
11173  ac_status=$?
11174  echo "$as_me:11174: \$? = $ac_status" >&5
11175  (exit $ac_status); }; }; then
11176  ac_cv_func_fcntl=yes
11177else
11178  echo "$as_me: failed program was:" >&5
11179cat conftest.$ac_ext >&5
11180ac_cv_func_fcntl=no
11181fi
11182rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11183fi
11184echo "$as_me:11184: result: $ac_cv_func_fcntl" >&5
11185echo "${ECHO_T}$ac_cv_func_fcntl" >&6
11186
11187echo "$as_me:11187: checking for lockf" >&5
11188echo $ECHO_N "checking for lockf... $ECHO_C" >&6
11189if test "${ac_cv_func_lockf+set}" = set; then
11190  echo $ECHO_N "(cached) $ECHO_C" >&6
11191else
11192  cat >conftest.$ac_ext <<_ACEOF
11193#line 11193 "configure"
11194#include "confdefs.h"
11195#define lockf autoconf_temporary
11196#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11197#undef lockf
11198
11199#ifdef __cplusplus
11200extern "C"
11201#endif
11202
11203/* We use char because int might match the return type of a gcc2
11204   builtin and then its argument prototype would still apply.  */
11205char lockf (void);
11206
11207int
11208main (void)
11209{
11210
11211/* The GNU C library defines stubs for functions which it implements
11212    to always fail with ENOSYS.  Some functions are actually named
11213    something starting with __ and the normal name is an alias.  */
11214#if defined (__stub_lockf) || defined (__stub___lockf)
11215#error found stub for lockf
11216#endif
11217
11218	return lockf ();
11219  ;
11220  return 0;
11221}
11222_ACEOF
11223rm -f conftest.$ac_objext conftest$ac_exeext
11224if { (eval echo "$as_me:11224: \"$ac_link\"") >&5
11225  (eval $ac_link) 2>&5
11226  ac_status=$?
11227  echo "$as_me:11227: \$? = $ac_status" >&5
11228  (exit $ac_status); } &&
11229         { ac_try='test -s conftest$ac_exeext'
11230  { (eval echo "$as_me:11230: \"$ac_try\"") >&5
11231  (eval $ac_try) 2>&5
11232  ac_status=$?
11233  echo "$as_me:11233: \$? = $ac_status" >&5
11234  (exit $ac_status); }; }; then
11235  ac_cv_func_lockf=yes
11236else
11237  echo "$as_me: failed program was:" >&5
11238cat conftest.$ac_ext >&5
11239ac_cv_func_lockf=no
11240fi
11241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11242fi
11243echo "$as_me:11243: result: $ac_cv_func_lockf" >&5
11244echo "${ECHO_T}$ac_cv_func_lockf" >&6
11245
11246echo "$as_me:11246: checking for flock" >&5
11247echo $ECHO_N "checking for flock... $ECHO_C" >&6
11248if test "${ac_cv_func_flock+set}" = set; then
11249  echo $ECHO_N "(cached) $ECHO_C" >&6
11250else
11251  cat >conftest.$ac_ext <<_ACEOF
11252#line 11252 "configure"
11253#include "confdefs.h"
11254#define flock autoconf_temporary
11255#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
11256#undef flock
11257
11258#ifdef __cplusplus
11259extern "C"
11260#endif
11261
11262/* We use char because int might match the return type of a gcc2
11263   builtin and then its argument prototype would still apply.  */
11264char flock (void);
11265
11266int
11267main (void)
11268{
11269
11270/* The GNU C library defines stubs for functions which it implements
11271    to always fail with ENOSYS.  Some functions are actually named
11272    something starting with __ and the normal name is an alias.  */
11273#if defined (__stub_flock) || defined (__stub___flock)
11274#error found stub for flock
11275#endif
11276
11277	return flock ();
11278  ;
11279  return 0;
11280}
11281_ACEOF
11282rm -f conftest.$ac_objext conftest$ac_exeext
11283if { (eval echo "$as_me:11283: \"$ac_link\"") >&5
11284  (eval $ac_link) 2>&5
11285  ac_status=$?
11286  echo "$as_me:11286: \$? = $ac_status" >&5
11287  (exit $ac_status); } &&
11288         { ac_try='test -s conftest$ac_exeext'
11289  { (eval echo "$as_me:11289: \"$ac_try\"") >&5
11290  (eval $ac_try) 2>&5
11291  ac_status=$?
11292  echo "$as_me:11292: \$? = $ac_status" >&5
11293  (exit $ac_status); }; }; then
11294  ac_cv_func_flock=yes
11295else
11296  echo "$as_me: failed program was:" >&5
11297cat conftest.$ac_ext >&5
11298ac_cv_func_flock=no
11299fi
11300rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11301fi
11302echo "$as_me:11302: result: $ac_cv_func_flock" >&5
11303echo "${ECHO_T}$ac_cv_func_flock" >&6
11304
11305echo "$as_me:11305: checking for file-locking functions" >&5
11306echo $ECHO_N "checking for file-locking functions... $ECHO_C" >&6
11307if test "${cf_cv_lockfile+set}" = set; then
11308  echo $ECHO_N "(cached) $ECHO_C" >&6
11309else
11310
11311cf_cv_lockfile=
11312for cf_lock in fcntl lockf flock
11313do
11314if eval 'test ${ac_cv_func_'$cf_lock'+set} = set'; then
11315	case $cf_lock in #(vi
11316	fcntl) #(vi
11317		cat >conftest.$ac_ext <<_ACEOF
11318#line 11318 "configure"
11319#include "confdefs.h"
11320
11321#include <stdio.h>
11322#ifdef HAVE_UNISTD_H
11323#include <unistd.h>
11324#endif
11325#ifdef HAVE_FCNTL_H
11326#include <fcntl.h>
11327#endif
11328
11329int
11330main (void)
11331{
11332
11333	struct flock flk;
11334	int block = 1;
11335	int fd = 0;
11336	int rc;
11337
11338	flk.l_type = F_WRLCK;
11339	flk.l_whence = SEEK_SET;
11340	flk.l_start = 0;
11341	flk.l_len = 0;
11342	rc = fcntl(fd, block ? F_SETLKW : F_SETLK, &flk)
11343	&& fcntl(fd, F_GETLK, &flk)
11344	&& fcntl(fd, F_SETLK, &flk);
11345
11346  ;
11347  return 0;
11348}
11349_ACEOF
11350rm -f conftest.$ac_objext
11351if { (eval echo "$as_me:11351: \"$ac_compile\"") >&5
11352  (eval $ac_compile) 2>&5
11353  ac_status=$?
11354  echo "$as_me:11354: \$? = $ac_status" >&5
11355  (exit $ac_status); } &&
11356         { ac_try='test -s conftest.$ac_objext'
11357  { (eval echo "$as_me:11357: \"$ac_try\"") >&5
11358  (eval $ac_try) 2>&5
11359  ac_status=$?
11360  echo "$as_me:11360: \$? = $ac_status" >&5
11361  (exit $ac_status); }; }; then
11362  :
11363else
11364  echo "$as_me: failed program was:" >&5
11365cat conftest.$ac_ext >&5
11366continue
11367fi
11368rm -f conftest.$ac_objext conftest.$ac_ext
11369		;;
11370	lockf) #(vi
11371		cat >conftest.$ac_ext <<_ACEOF
11372#line 11372 "configure"
11373#include "confdefs.h"
11374
11375#include <stdio.h>
11376#ifdef HAVE_UNISTD_H
11377#include <unistd.h>
11378#endif
11379#ifdef HAVE_FCNTL_H
11380#include <fcntl.h>
11381#endif
11382
11383int
11384main (void)
11385{
11386
11387	int block = 1, fd = 0;
11388	int ret = lockf(fd, block ? F_LOCK : F_TLOCK, 0L)
11389	 && lockf(fd, F_TEST, 0L)
11390	 && lockf(fd, F_ULOCK, 0L);
11391
11392  ;
11393  return 0;
11394}
11395_ACEOF
11396rm -f conftest.$ac_objext
11397if { (eval echo "$as_me:11397: \"$ac_compile\"") >&5
11398  (eval $ac_compile) 2>&5
11399  ac_status=$?
11400  echo "$as_me:11400: \$? = $ac_status" >&5
11401  (exit $ac_status); } &&
11402         { ac_try='test -s conftest.$ac_objext'
11403  { (eval echo "$as_me:11403: \"$ac_try\"") >&5
11404  (eval $ac_try) 2>&5
11405  ac_status=$?
11406  echo "$as_me:11406: \$? = $ac_status" >&5
11407  (exit $ac_status); }; }; then
11408  :
11409else
11410  echo "$as_me: failed program was:" >&5
11411cat conftest.$ac_ext >&5
11412continue
11413fi
11414rm -f conftest.$ac_objext conftest.$ac_ext
11415		;;
11416	flock)
11417		cat >conftest.$ac_ext <<_ACEOF
11418#line 11418 "configure"
11419#include "confdefs.h"
11420
11421#include <stdio.h>
11422#ifdef HAVE_UNISTD_H
11423#include <unistd.h>
11424#endif
11425#ifdef HAVE_FCNTL_H
11426#include <fcntl.h>
11427#endif
11428#ifdef HAVE_SYS_FILE_H
11429#include <sys/file.h>
11430#endif
11431
11432int
11433main (void)
11434{
11435
11436	int block = 1, fd = 0;
11437	int ret = flock(fd, (LOCK_EX|LOCK_NB))
11438	 && flock(fd, LOCK_UN)
11439	 && flock(fd, block ? LOCK_EX : (LOCK_EX | LOCK_NB));
11440
11441  ;
11442  return 0;
11443}
11444_ACEOF
11445rm -f conftest.$ac_objext
11446if { (eval echo "$as_me:11446: \"$ac_compile\"") >&5
11447  (eval $ac_compile) 2>&5
11448  ac_status=$?
11449  echo "$as_me:11449: \$? = $ac_status" >&5
11450  (exit $ac_status); } &&
11451         { ac_try='test -s conftest.$ac_objext'
11452  { (eval echo "$as_me:11452: \"$ac_try\"") >&5
11453  (eval $ac_try) 2>&5
11454  ac_status=$?
11455  echo "$as_me:11455: \$? = $ac_status" >&5
11456  (exit $ac_status); }; }; then
11457  :
11458else
11459  echo "$as_me: failed program was:" >&5
11460cat conftest.$ac_ext >&5
11461continue
11462fi
11463rm -f conftest.$ac_objext conftest.$ac_ext
11464		;;
11465	esac
11466	cf_cv_lockfile="$cf_cv_lockfile $cf_lock"
11467fi
11468done
11469
11470fi
11471echo "$as_me:11471: result: $cf_cv_lockfile" >&5
11472echo "${ECHO_T}$cf_cv_lockfile" >&6
11473
11474echo "$as_me:11474: checking which locking method will be used" >&5
11475echo $ECHO_N "checking which locking method will be used... $ECHO_C" >&6
11476### fcntl() is preferred, if the user just disables fcntl()
11477### without specifying an alternative lockf() is preferred
11478
11479# Check whether --enable-fcntl or --disable-fcntl was given.
11480if test "${enable_fcntl+set}" = set; then
11481  enableval="$enable_fcntl"
11482  test "$enableval" != no && enableval=yes
11483	if test "$enableval" != "yes" ; then
11484    requested_lock="lockf"
11485	else
11486		requested_lock="fcntl"
11487	fi
11488else
11489  enableval=yes
11490	requested_lock="fcntl"
11491
11492fi;
11493
11494# Check whether --enable-lockf or --disable-lockf was given.
11495if test "${enable_lockf+set}" = set; then
11496  enableval="$enable_lockf"
11497  test "$enableval" != yes && enableval=no
11498	if test "$enableval" != "no" ; then
11499    requested_lock="lockf"
11500	fi
11501else
11502  enableval=no
11503fi;
11504
11505# Check whether --enable-flock or --disable-flock was given.
11506if test "${enable_flock+set}" = set; then
11507  enableval="$enable_flock"
11508  test "$enableval" != yes && enableval=no
11509	if test "$enableval" != "no" ; then
11510    requested_lock="flock"
11511	fi
11512else
11513  enableval=no
11514fi;
11515### now check the users wishes against available locking methods
11516if test -n "$cf_cv_lockfile"; then
11517	for lock in $cf_cv_lockfile; do
11518		if test "$lock" = "$requested_lock"; then
11519			used_locking=$lock
11520			break
11521		fi
11522	done
11523### if none of them matched use the one with the highest priority
11524	if test "x$used_locking" = "x"; then
11525		used_locking=`echo $cf_cv_lockfile|sed -e 's/^\([^ ]\+\).*/\1/g'`
11526	fi
11527	echo "$as_me:11527: result: $used_locking" >&5
11528echo "${ECHO_T}$used_locking" >&6
11529
11530used_locking=`echo "$used_locking" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
11531
11532	cat >>confdefs.h <<EOF
11533#define USE_$used_locking 1
11534EOF
11535
11536else
11537	echo "$as_me:11537: result: none" >&5
11538echo "${ECHO_T}none" >&6;
11539	{ echo "$as_me:11539: WARNING: None of fcntl(), lockf(), flock() available" >&5
11540echo "$as_me: WARNING: None of fcntl(), lockf(), flock() available" >&2;}
11541fi
11542
11543echo "$as_me:11543: checking for screen type" >&5
11544echo $ECHO_N "checking for screen type... $ECHO_C" >&6
11545
11546# Check whether --with-screen or --without-screen was given.
11547if test "${with_screen+set}" = set; then
11548  withval="$with_screen"
11549  cf_with_screen=$withval
11550else
11551  cf_with_screen=none
11552fi;
11553echo "$as_me:11553: result: $cf_with_screen" >&5
11554echo "${ECHO_T}$cf_with_screen" >&6
11555
11556use_curses=no
11557use_ncurses=no
11558
11559echo "$as_me:11559: checking for specific curses-directory" >&5
11560echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
11561
11562# Check whether --with-curses-dir or --without-curses-dir was given.
11563if test "${with_curses_dir+set}" = set; then
11564  withval="$with_curses_dir"
11565  cf_cv_curses_dir=$withval
11566else
11567  cf_cv_curses_dir=no
11568fi;
11569echo "$as_me:11569: result: $cf_cv_curses_dir" >&5
11570echo "${ECHO_T}$cf_cv_curses_dir" >&6
11571
11572if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
11573then
11574
11575if test "x$prefix" != xNONE; then
11576	cf_path_syntax="$prefix"
11577else
11578	cf_path_syntax="$ac_default_prefix"
11579fi
11580
11581case ".$withval" in
11582.\$\(*\)*|.\'*\'*)
11583	;;
11584..|./*|.\\*)
11585	;;
11586.[a-zA-Z]:[\\/]*) # OS/2 EMX
11587	;;
11588.\${*prefix}*|.\${*dir}*)
11589	eval withval="$withval"
11590	case ".$withval" in
11591	.NONE/*)
11592		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11593		;;
11594	esac
11595	;;
11596.no|.NONE/*)
11597	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
11598	;;
11599*)
11600	{ { echo "$as_me:11600: error: expected a pathname, not \"$withval\"" >&5
11601echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11602   { (exit 1); exit 1; }; }
11603	;;
11604esac
11605
11606	if test -d "$cf_cv_curses_dir"
11607	then
11608
11609if test -n "$cf_cv_curses_dir/include" ; then
11610  for cf_add_incdir in $cf_cv_curses_dir/include
11611  do
11612	while test $cf_add_incdir != /usr/include
11613	do
11614	  if test -d $cf_add_incdir
11615	  then
11616		cf_have_incdir=no
11617		if test -n "$CFLAGS$CPPFLAGS" ; then
11618		  # a loop is needed to ensure we can add subdirs of existing dirs
11619		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
11620			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
11621			  cf_have_incdir=yes; break
11622			fi
11623		  done
11624		fi
11625
11626		if test "$cf_have_incdir" = no ; then
11627		  if test "$cf_add_incdir" = /usr/local/include ; then
11628			if test "$GCC" = yes
11629			then
11630			  cf_save_CPPFLAGS=$CPPFLAGS
11631
11632	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11633	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
11634
11635			  cat >conftest.$ac_ext <<_ACEOF
11636#line 11636 "configure"
11637#include "confdefs.h"
11638#include <stdio.h>
11639int
11640main (void)
11641{
11642printf("Hello")
11643  ;
11644  return 0;
11645}
11646_ACEOF
11647rm -f conftest.$ac_objext
11648if { (eval echo "$as_me:11648: \"$ac_compile\"") >&5
11649  (eval $ac_compile) 2>&5
11650  ac_status=$?
11651  echo "$as_me:11651: \$? = $ac_status" >&5
11652  (exit $ac_status); } &&
11653         { ac_try='test -s conftest.$ac_objext'
11654  { (eval echo "$as_me:11654: \"$ac_try\"") >&5
11655  (eval $ac_try) 2>&5
11656  ac_status=$?
11657  echo "$as_me:11657: \$? = $ac_status" >&5
11658  (exit $ac_status); }; }; then
11659  :
11660else
11661  echo "$as_me: failed program was:" >&5
11662cat conftest.$ac_ext >&5
11663cf_have_incdir=yes
11664fi
11665rm -f conftest.$ac_objext conftest.$ac_ext
11666			  CPPFLAGS=$cf_save_CPPFLAGS
11667			fi
11668		  fi
11669		fi
11670
11671		if test "$cf_have_incdir" = no ; then
11672		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
11673
11674echo "${as_me:-configure}:11674: testing adding $cf_add_incdir to include-path ..." 1>&5
11675
11676		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
11677
11678		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
11679		  test "$cf_top_incdir" = "$cf_add_incdir" && break
11680		  cf_add_incdir="$cf_top_incdir"
11681		else
11682		  break
11683		fi
11684	  else
11685		break
11686	  fi
11687	done
11688  done
11689fi
11690
11691if test -n "$cf_cv_curses_dir/lib" ; then
11692	for cf_add_libdir in $cf_cv_curses_dir/lib
11693	do
11694		if test $cf_add_libdir = /usr/lib ; then
11695			:
11696		elif test -d $cf_add_libdir
11697		then
11698			cf_have_libdir=no
11699			if test -n "$LDFLAGS$LIBS" ; then
11700				# a loop is needed to ensure we can add subdirs of existing dirs
11701				for cf_test_libdir in $LDFLAGS $LIBS ; do
11702					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
11703						cf_have_libdir=yes; break
11704					fi
11705				done
11706			fi
11707			if test "$cf_have_libdir" = no ; then
11708				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
11709
11710echo "${as_me:-configure}:11710: testing adding $cf_add_libdir to library-path ..." 1>&5
11711
11712				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
11713			fi
11714		fi
11715	done
11716fi
11717
11718	fi
11719fi
11720
11721case $cf_with_screen in #(vi
11722termcap|terminfo) #(we will determine which it really is
11723	;;
11724curses) #(vi
11725	use_curses=yes
11726	;;
11727ncurses) #(vi
11728	use_curses=yes
11729	use_ncurses=yes
11730	;;
11731ncursesw) #(vi
11732	use_curses=yes
11733	use_ncurses=yes
11734	;;
11735pdcurses) #(vi
11736	use_curses=yes
11737	;;
11738none)
11739	echo "$as_me:11739: checking if you want to use ncurses library" >&5
11740echo $ECHO_N "checking if you want to use ncurses library... $ECHO_C" >&6
11741
11742# Check whether --with-ncurses or --without-ncurses was given.
11743if test "${with_ncurses+set}" = set; then
11744  withval="$with_ncurses"
11745  use_ncurses=$withval
11746else
11747  use_ncurses=no
11748fi;
11749	echo "$as_me:11749: result: $use_ncurses" >&5
11750echo "${ECHO_T}$use_ncurses" >&6
11751
11752	echo "$as_me:11752: checking if you want curses rather than termcap interface" >&5
11753echo $ECHO_N "checking if you want curses rather than termcap interface... $ECHO_C" >&6
11754
11755# Check whether --enable-curses or --disable-curses was given.
11756if test "${enable_curses+set}" = set; then
11757  enableval="$enable_curses"
11758  test "$enableval" != yes && enableval=no
11759	if test "$enableval" != "no" ; then
11760    cf_with_screen=curses;  use_curses=$withval
11761	else
11762		cf_with_screen=termcap; use_curses=no
11763	fi
11764else
11765  enableval=no
11766	cf_with_screen=termcap; use_curses=no
11767
11768fi;
11769	echo "$as_me:11769: result: $enableval" >&5
11770echo "${ECHO_T}$enableval" >&6
11771	;;
11772esac
11773
11774if test $use_curses != no ; then
11775
11776cat >>confdefs.h <<\EOF
11777#define USE_CURSES 1
11778EOF
11779
11780	case $cf_with_screen in #(vi
11781	ncurses) #(vi
11782
11783cf_ncuconfig_root=ncurses
11784cf_have_ncuconfig=no
11785
11786if test "x${PKG_CONFIG:=none}" != xnone; then
11787	echo "$as_me:11787: checking pkg-config for $cf_ncuconfig_root" >&5
11788echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
11789	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
11790		echo "$as_me:11790: result: yes" >&5
11791echo "${ECHO_T}yes" >&6
11792
11793		echo "$as_me:11793: checking if the $cf_ncuconfig_root package files work" >&5
11794echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
11795		cf_have_ncuconfig=unknown
11796
11797		cf_save_CFLAGS="$CFLAGS"
11798		cf_save_CPPFLAGS="$CPPFLAGS"
11799		cf_save_LIBS="$LIBS"
11800
11801		cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
11802		cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
11803
11804		# while -W for passing linker flags is prevalent, it is not "standard".
11805		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
11806		# incompatible _and_ non-standard -W option which gives an error.  Work
11807		# around that pitfall.
11808		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
11809		x*c[89]9@@*-W*)
11810
11811cf_fix_cppflags=no
11812cf_new_cflags=
11813cf_new_cppflags=
11814cf_new_extra_cppflags=
11815
11816for cf_add_cflags in $cf_pkg_cflags
11817do
11818case $cf_fix_cppflags in
11819no)
11820	case $cf_add_cflags in
11821	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11822		case $cf_add_cflags in
11823		-D*)
11824			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11825
11826			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11827				&& test -z "${cf_tst_cflags}" \
11828				&& cf_fix_cppflags=yes
11829
11830			if test $cf_fix_cppflags = yes ; then
11831
11832	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11833	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11834
11835				continue
11836			elif test "${cf_tst_cflags}" = "\"'" ; then
11837
11838	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11839	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11840
11841				continue
11842			fi
11843			;;
11844		esac
11845		case "$CPPFLAGS" in
11846		*$cf_add_cflags)
11847			;;
11848		*)
11849			case $cf_add_cflags in
11850			-D*)
11851				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11852
11853CPPFLAGS=`echo "$CPPFLAGS" | \
11854	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11855		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11856
11857				;;
11858			esac
11859
11860	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11861	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11862
11863			;;
11864		esac
11865		;;
11866	*)
11867
11868	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11869	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11870
11871		;;
11872	esac
11873	;;
11874yes)
11875
11876	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11877	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11878
11879	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
11880
11881	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11882		&& test -z "${cf_tst_cflags}" \
11883		&& cf_fix_cppflags=no
11884	;;
11885esac
11886done
11887
11888if test -n "$cf_new_cflags" ; then
11889
11890	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11891	CFLAGS="${CFLAGS}$cf_new_cflags"
11892
11893fi
11894
11895if test -n "$cf_new_cppflags" ; then
11896
11897	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11898	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11899
11900fi
11901
11902if test -n "$cf_new_extra_cppflags" ; then
11903
11904	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11905	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11906
11907fi
11908
11909cf_add_libs="$LIBS"
11910# reverse order
11911cf_add_0lib=
11912for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
11913# filter duplicates
11914for cf_add_1lib in $cf_add_0lib; do
11915	for cf_add_2lib in $cf_add_libs; do
11916		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
11917			cf_add_1lib=
11918			break
11919		fi
11920	done
11921	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
11922done
11923LIBS="$cf_add_libs"
11924
11925			cat >conftest.$ac_ext <<_ACEOF
11926#line 11926 "configure"
11927#include "confdefs.h"
11928#include <${cf_cv_ncurses_header:-curses.h}>
11929int
11930main (void)
11931{
11932initscr(); mousemask(0,0); tigetstr((char *)0);
11933  ;
11934  return 0;
11935}
11936_ACEOF
11937rm -f conftest.$ac_objext conftest$ac_exeext
11938if { (eval echo "$as_me:11938: \"$ac_link\"") >&5
11939  (eval $ac_link) 2>&5
11940  ac_status=$?
11941  echo "$as_me:11941: \$? = $ac_status" >&5
11942  (exit $ac_status); } &&
11943         { ac_try='test -s conftest$ac_exeext'
11944  { (eval echo "$as_me:11944: \"$ac_try\"") >&5
11945  (eval $ac_try) 2>&5
11946  ac_status=$?
11947  echo "$as_me:11947: \$? = $ac_status" >&5
11948  (exit $ac_status); }; }; then
11949  if test "$cross_compiling" = yes; then
11950  cf_test_ncuconfig=maybe
11951else
11952  cat >conftest.$ac_ext <<_ACEOF
11953#line 11953 "configure"
11954#include "confdefs.h"
11955#include <${cf_cv_ncurses_header:-curses.h}>
11956					int main(void)
11957					{ char *xx = curses_version(); return (xx == 0); }
11958_ACEOF
11959rm -f conftest$ac_exeext
11960if { (eval echo "$as_me:11960: \"$ac_link\"") >&5
11961  (eval $ac_link) 2>&5
11962  ac_status=$?
11963  echo "$as_me:11963: \$? = $ac_status" >&5
11964  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
11965  { (eval echo "$as_me:11965: \"$ac_try\"") >&5
11966  (eval $ac_try) 2>&5
11967  ac_status=$?
11968  echo "$as_me:11968: \$? = $ac_status" >&5
11969  (exit $ac_status); }; }; then
11970  cf_test_ncuconfig=yes
11971else
11972  echo "$as_me: program exited with status $ac_status" >&5
11973echo "$as_me: failed program was:" >&5
11974cat conftest.$ac_ext >&5
11975cf_test_ncuconfig=no
11976fi
11977rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
11978fi
11979else
11980  echo "$as_me: failed program was:" >&5
11981cat conftest.$ac_ext >&5
11982cf_test_ncuconfig=no
11983fi
11984rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
11985
11986			CFLAGS="$cf_save_CFLAGS"
11987			CPPFLAGS="$cf_save_CPPFLAGS"
11988			LIBS="$cf_save_LIBS"
11989
11990			if test "x$cf_test_ncuconfig" != xyes; then
11991				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
11992				cf_pkg_cflags="$cf_temp"
11993				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
11994				cf_pkg_libs="$cf_temp"
11995			fi
11996			;;
11997		esac
11998
11999cf_fix_cppflags=no
12000cf_new_cflags=
12001cf_new_cppflags=
12002cf_new_extra_cppflags=
12003
12004for cf_add_cflags in $cf_pkg_cflags
12005do
12006case $cf_fix_cppflags in
12007no)
12008	case $cf_add_cflags in
12009	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12010		case $cf_add_cflags in
12011		-D*)
12012			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12013
12014			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12015				&& test -z "${cf_tst_cflags}" \
12016				&& cf_fix_cppflags=yes
12017
12018			if test $cf_fix_cppflags = yes ; then
12019
12020	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12021	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12022
12023				continue
12024			elif test "${cf_tst_cflags}" = "\"'" ; then
12025
12026	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12027	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12028
12029				continue
12030			fi
12031			;;
12032		esac
12033		case "$CPPFLAGS" in
12034		*$cf_add_cflags)
12035			;;
12036		*)
12037			case $cf_add_cflags in
12038			-D*)
12039				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12040
12041CPPFLAGS=`echo "$CPPFLAGS" | \
12042	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12043		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12044
12045				;;
12046			esac
12047
12048	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12049	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12050
12051			;;
12052		esac
12053		;;
12054	*)
12055
12056	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12057	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12058
12059		;;
12060	esac
12061	;;
12062yes)
12063
12064	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12065	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12066
12067	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12068
12069	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12070		&& test -z "${cf_tst_cflags}" \
12071		&& cf_fix_cppflags=no
12072	;;
12073esac
12074done
12075
12076if test -n "$cf_new_cflags" ; then
12077
12078	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12079	CFLAGS="${CFLAGS}$cf_new_cflags"
12080
12081fi
12082
12083if test -n "$cf_new_cppflags" ; then
12084
12085	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12086	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12087
12088fi
12089
12090if test -n "$cf_new_extra_cppflags" ; then
12091
12092	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12093	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12094
12095fi
12096
12097cf_add_libs="$LIBS"
12098# reverse order
12099cf_add_0lib=
12100for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12101# filter duplicates
12102for cf_add_1lib in $cf_add_0lib; do
12103	for cf_add_2lib in $cf_add_libs; do
12104		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12105			cf_add_1lib=
12106			break
12107		fi
12108	done
12109	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12110done
12111LIBS="$cf_add_libs"
12112
12113		cat >conftest.$ac_ext <<_ACEOF
12114#line 12114 "configure"
12115#include "confdefs.h"
12116#include <${cf_cv_ncurses_header:-curses.h}>
12117int
12118main (void)
12119{
12120initscr(); mousemask(0,0); tigetstr((char *)0);
12121  ;
12122  return 0;
12123}
12124_ACEOF
12125rm -f conftest.$ac_objext conftest$ac_exeext
12126if { (eval echo "$as_me:12126: \"$ac_link\"") >&5
12127  (eval $ac_link) 2>&5
12128  ac_status=$?
12129  echo "$as_me:12129: \$? = $ac_status" >&5
12130  (exit $ac_status); } &&
12131         { ac_try='test -s conftest$ac_exeext'
12132  { (eval echo "$as_me:12132: \"$ac_try\"") >&5
12133  (eval $ac_try) 2>&5
12134  ac_status=$?
12135  echo "$as_me:12135: \$? = $ac_status" >&5
12136  (exit $ac_status); }; }; then
12137  if test "$cross_compiling" = yes; then
12138  cf_have_ncuconfig=maybe
12139else
12140  cat >conftest.$ac_ext <<_ACEOF
12141#line 12141 "configure"
12142#include "confdefs.h"
12143#include <${cf_cv_ncurses_header:-curses.h}>
12144				int main(void)
12145				{ char *xx = curses_version(); return (xx == 0); }
12146_ACEOF
12147rm -f conftest$ac_exeext
12148if { (eval echo "$as_me:12148: \"$ac_link\"") >&5
12149  (eval $ac_link) 2>&5
12150  ac_status=$?
12151  echo "$as_me:12151: \$? = $ac_status" >&5
12152  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
12153  { (eval echo "$as_me:12153: \"$ac_try\"") >&5
12154  (eval $ac_try) 2>&5
12155  ac_status=$?
12156  echo "$as_me:12156: \$? = $ac_status" >&5
12157  (exit $ac_status); }; }; then
12158  cf_have_ncuconfig=yes
12159else
12160  echo "$as_me: program exited with status $ac_status" >&5
12161echo "$as_me: failed program was:" >&5
12162cat conftest.$ac_ext >&5
12163cf_have_ncuconfig=no
12164fi
12165rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
12166fi
12167else
12168  echo "$as_me: failed program was:" >&5
12169cat conftest.$ac_ext >&5
12170cf_have_ncuconfig=no
12171fi
12172rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
12173		echo "$as_me:12173: result: $cf_have_ncuconfig" >&5
12174echo "${ECHO_T}$cf_have_ncuconfig" >&6
12175		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
12176		if test "$cf_have_ncuconfig" != "yes"
12177		then
12178			CPPFLAGS="$cf_save_CPPFLAGS"
12179			LIBS="$cf_save_LIBS"
12180			NCURSES_CONFIG_PKG=none
12181		else
12182
12183cat >>confdefs.h <<\EOF
12184#define NCURSES 1
12185EOF
12186
12187			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
12188
12189echo "$as_me:12189: checking for terminfo header" >&5
12190echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
12191if test "${cf_cv_term_header+set}" = set; then
12192  echo $ECHO_N "(cached) $ECHO_C" >&6
12193else
12194
12195case ${cf_cv_ncurses_header} in
12196*/ncurses.h|*/ncursesw.h)
12197	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
12198	;;
12199*)
12200	cf_term_header=term.h
12201	;;
12202esac
12203
12204for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
12205do
12206cat >conftest.$ac_ext <<_ACEOF
12207#line 12207 "configure"
12208#include "confdefs.h"
12209#include <stdio.h>
12210#include <${cf_cv_ncurses_header:-curses.h}>
12211#include <$cf_test>
12212
12213int
12214main (void)
12215{
12216int x = auto_left_margin; (void)x
12217  ;
12218  return 0;
12219}
12220_ACEOF
12221rm -f conftest.$ac_objext
12222if { (eval echo "$as_me:12222: \"$ac_compile\"") >&5
12223  (eval $ac_compile) 2>&5
12224  ac_status=$?
12225  echo "$as_me:12225: \$? = $ac_status" >&5
12226  (exit $ac_status); } &&
12227         { ac_try='test -s conftest.$ac_objext'
12228  { (eval echo "$as_me:12228: \"$ac_try\"") >&5
12229  (eval $ac_try) 2>&5
12230  ac_status=$?
12231  echo "$as_me:12231: \$? = $ac_status" >&5
12232  (exit $ac_status); }; }; then
12233
12234	cf_cv_term_header="$cf_test"
12235else
12236  echo "$as_me: failed program was:" >&5
12237cat conftest.$ac_ext >&5
12238
12239	cf_cv_term_header=unknown
12240
12241fi
12242rm -f conftest.$ac_objext conftest.$ac_ext
12243	test "$cf_cv_term_header" != unknown && break
12244done
12245
12246fi
12247echo "$as_me:12247: result: $cf_cv_term_header" >&5
12248echo "${ECHO_T}$cf_cv_term_header" >&6
12249
12250# Set definitions to allow ifdef'ing to accommodate subdirectories
12251
12252case $cf_cv_term_header in
12253*term.h)
12254
12255cat >>confdefs.h <<\EOF
12256#define HAVE_TERM_H 1
12257EOF
12258
12259	;;
12260esac
12261
12262case $cf_cv_term_header in
12263ncurses/term.h)
12264
12265cat >>confdefs.h <<\EOF
12266#define HAVE_NCURSES_TERM_H 1
12267EOF
12268
12269	;;
12270ncursesw/term.h)
12271
12272cat >>confdefs.h <<\EOF
12273#define HAVE_NCURSESW_TERM_H 1
12274EOF
12275
12276	;;
12277esac
12278
12279		fi
12280
12281	else
12282		echo "$as_me:12282: result: no" >&5
12283echo "${ECHO_T}no" >&6
12284		NCURSES_CONFIG_PKG=none
12285	fi
12286else
12287	NCURSES_CONFIG_PKG=none
12288fi
12289
12290if test "x$cf_have_ncuconfig" = "xno"; then
12291	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
12292
12293if test -n "$ac_tool_prefix"; then
12294  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
12295  do
12296    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
12297set dummy $ac_tool_prefix$ac_prog; ac_word=$2
12298echo "$as_me:12298: checking for $ac_word" >&5
12299echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12300if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
12301  echo $ECHO_N "(cached) $ECHO_C" >&6
12302else
12303  if test -n "$NCURSES_CONFIG"; then
12304  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
12305else
12306  ac_save_IFS=$IFS; IFS=$ac_path_separator
12307ac_dummy="$PATH"
12308for ac_dir in $ac_dummy; do
12309  IFS=$ac_save_IFS
12310  test -z "$ac_dir" && ac_dir=.
12311  $as_executable_p "$ac_dir/$ac_word" || continue
12312ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
12313echo "$as_me:12313: found $ac_dir/$ac_word" >&5
12314break
12315done
12316
12317fi
12318fi
12319NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
12320if test -n "$NCURSES_CONFIG"; then
12321  echo "$as_me:12321: result: $NCURSES_CONFIG" >&5
12322echo "${ECHO_T}$NCURSES_CONFIG" >&6
12323else
12324  echo "$as_me:12324: result: no" >&5
12325echo "${ECHO_T}no" >&6
12326fi
12327
12328    test -n "$NCURSES_CONFIG" && break
12329  done
12330fi
12331if test -z "$NCURSES_CONFIG"; then
12332  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
12333  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
12334do
12335  # Extract the first word of "$ac_prog", so it can be a program name with args.
12336set dummy $ac_prog; ac_word=$2
12337echo "$as_me:12337: checking for $ac_word" >&5
12338echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
12339if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
12340  echo $ECHO_N "(cached) $ECHO_C" >&6
12341else
12342  if test -n "$ac_ct_NCURSES_CONFIG"; then
12343  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
12344else
12345  ac_save_IFS=$IFS; IFS=$ac_path_separator
12346ac_dummy="$PATH"
12347for ac_dir in $ac_dummy; do
12348  IFS=$ac_save_IFS
12349  test -z "$ac_dir" && ac_dir=.
12350  $as_executable_p "$ac_dir/$ac_word" || continue
12351ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
12352echo "$as_me:12352: found $ac_dir/$ac_word" >&5
12353break
12354done
12355
12356fi
12357fi
12358ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
12359if test -n "$ac_ct_NCURSES_CONFIG"; then
12360  echo "$as_me:12360: result: $ac_ct_NCURSES_CONFIG" >&5
12361echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
12362else
12363  echo "$as_me:12363: result: no" >&5
12364echo "${ECHO_T}no" >&6
12365fi
12366
12367  test -n "$ac_ct_NCURSES_CONFIG" && break
12368done
12369test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
12370
12371  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
12372fi
12373
12374	if test "$NCURSES_CONFIG" != none ; then
12375
12376cf_fix_cppflags=no
12377cf_new_cflags=
12378cf_new_cppflags=
12379cf_new_extra_cppflags=
12380
12381for cf_add_cflags in `$NCURSES_CONFIG --cflags`
12382do
12383case $cf_fix_cppflags in
12384no)
12385	case $cf_add_cflags in
12386	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12387		case $cf_add_cflags in
12388		-D*)
12389			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12390
12391			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12392				&& test -z "${cf_tst_cflags}" \
12393				&& cf_fix_cppflags=yes
12394
12395			if test $cf_fix_cppflags = yes ; then
12396
12397	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12398	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12399
12400				continue
12401			elif test "${cf_tst_cflags}" = "\"'" ; then
12402
12403	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12404	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12405
12406				continue
12407			fi
12408			;;
12409		esac
12410		case "$CPPFLAGS" in
12411		*$cf_add_cflags)
12412			;;
12413		*)
12414			case $cf_add_cflags in
12415			-D*)
12416				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12417
12418CPPFLAGS=`echo "$CPPFLAGS" | \
12419	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12420		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12421
12422				;;
12423			esac
12424
12425	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12426	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12427
12428			;;
12429		esac
12430		;;
12431	*)
12432
12433	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12434	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12435
12436		;;
12437	esac
12438	;;
12439yes)
12440
12441	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12442	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12443
12444	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
12445
12446	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12447		&& test -z "${cf_tst_cflags}" \
12448		&& cf_fix_cppflags=no
12449	;;
12450esac
12451done
12452
12453if test -n "$cf_new_cflags" ; then
12454
12455	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12456	CFLAGS="${CFLAGS}$cf_new_cflags"
12457
12458fi
12459
12460if test -n "$cf_new_cppflags" ; then
12461
12462	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12463	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12464
12465fi
12466
12467if test -n "$cf_new_extra_cppflags" ; then
12468
12469	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12470	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12471
12472fi
12473
12474cf_add_libs="$LIBS"
12475# reverse order
12476cf_add_0lib=
12477for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
12478# filter duplicates
12479for cf_add_1lib in $cf_add_0lib; do
12480	for cf_add_2lib in $cf_add_libs; do
12481		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
12482			cf_add_1lib=
12483			break
12484		fi
12485	done
12486	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
12487done
12488LIBS="$cf_add_libs"
12489
12490		# even with config script, some packages use no-override for curses.h
12491
12492echo "$as_me:12492: checking if we have identified curses headers" >&5
12493echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
12494if test "${cf_cv_ncurses_header+set}" = set; then
12495  echo $ECHO_N "(cached) $ECHO_C" >&6
12496else
12497
12498cf_cv_ncurses_header=none
12499for cf_header in \
12500	ncurses.h ncurses/ncurses.h \
12501	curses.h ncurses/curses.h
12502do
12503cat >conftest.$ac_ext <<_ACEOF
12504#line 12504 "configure"
12505#include "confdefs.h"
12506#include <${cf_header}>
12507int
12508main (void)
12509{
12510initscr(); tgoto("?", 0,0)
12511  ;
12512  return 0;
12513}
12514_ACEOF
12515rm -f conftest.$ac_objext
12516if { (eval echo "$as_me:12516: \"$ac_compile\"") >&5
12517  (eval $ac_compile) 2>&5
12518  ac_status=$?
12519  echo "$as_me:12519: \$? = $ac_status" >&5
12520  (exit $ac_status); } &&
12521         { ac_try='test -s conftest.$ac_objext'
12522  { (eval echo "$as_me:12522: \"$ac_try\"") >&5
12523  (eval $ac_try) 2>&5
12524  ac_status=$?
12525  echo "$as_me:12525: \$? = $ac_status" >&5
12526  (exit $ac_status); }; }; then
12527  cf_cv_ncurses_header=$cf_header; break
12528else
12529  echo "$as_me: failed program was:" >&5
12530cat conftest.$ac_ext >&5
12531fi
12532rm -f conftest.$ac_objext conftest.$ac_ext
12533done
12534
12535fi
12536echo "$as_me:12536: result: $cf_cv_ncurses_header" >&5
12537echo "${ECHO_T}$cf_cv_ncurses_header" >&6
12538
12539if test "$cf_cv_ncurses_header" = none ; then
12540	{ { echo "$as_me:12540: error: No curses header-files found" >&5
12541echo "$as_me: error: No curses header-files found" >&2;}
12542   { (exit 1); exit 1; }; }
12543fi
12544
12545# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
12546
12547for ac_header in $cf_cv_ncurses_header
12548do
12549as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
12550echo "$as_me:12550: checking for $ac_header" >&5
12551echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
12552if eval "test \"\${$as_ac_Header+set}\" = set"; then
12553  echo $ECHO_N "(cached) $ECHO_C" >&6
12554else
12555  cat >conftest.$ac_ext <<_ACEOF
12556#line 12556 "configure"
12557#include "confdefs.h"
12558#include <$ac_header>
12559_ACEOF
12560if { (eval echo "$as_me:12560: \"$ac_cpp conftest.$ac_ext\"") >&5
12561  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
12562  ac_status=$?
12563  egrep -v '^ *\+' conftest.er1 >conftest.err
12564  rm -f conftest.er1
12565  cat conftest.err >&5
12566  echo "$as_me:12566: \$? = $ac_status" >&5
12567  (exit $ac_status); } >/dev/null; then
12568  if test -s conftest.err; then
12569    ac_cpp_err=$ac_c_preproc_warn_flag
12570  else
12571    ac_cpp_err=
12572  fi
12573else
12574  ac_cpp_err=yes
12575fi
12576if test -z "$ac_cpp_err"; then
12577  eval "$as_ac_Header=yes"
12578else
12579  echo "$as_me: failed program was:" >&5
12580  cat conftest.$ac_ext >&5
12581  eval "$as_ac_Header=no"
12582fi
12583rm -f conftest.err conftest.$ac_ext
12584fi
12585echo "$as_me:12585: result: `eval echo '${'$as_ac_Header'}'`" >&5
12586echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
12587if test `eval echo '${'$as_ac_Header'}'` = yes; then
12588  cat >>confdefs.h <<EOF
12589#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
12590EOF
12591
12592fi
12593done
12594
12595cat >>confdefs.h <<\EOF
12596#define NCURSES 1
12597EOF
12598
12599cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
12600
12601		cat >>confdefs.h <<EOF
12602#define $cf_nculib_ROOT 1
12603EOF
12604
12605				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
12606
12607	else
12608
12609cf_ncuhdr_root=ncurses
12610
12611test -n "$cf_cv_curses_dir" && \
12612test "$cf_cv_curses_dir" != "no" && { \
12613
12614if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
12615  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
12616  do
12617	while test $cf_add_incdir != /usr/include
12618	do
12619	  if test -d $cf_add_incdir
12620	  then
12621		cf_have_incdir=no
12622		if test -n "$CFLAGS$CPPFLAGS" ; then
12623		  # a loop is needed to ensure we can add subdirs of existing dirs
12624		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12625			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12626			  cf_have_incdir=yes; break
12627			fi
12628		  done
12629		fi
12630
12631		if test "$cf_have_incdir" = no ; then
12632		  if test "$cf_add_incdir" = /usr/local/include ; then
12633			if test "$GCC" = yes
12634			then
12635			  cf_save_CPPFLAGS=$CPPFLAGS
12636
12637	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12638	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12639
12640			  cat >conftest.$ac_ext <<_ACEOF
12641#line 12641 "configure"
12642#include "confdefs.h"
12643#include <stdio.h>
12644int
12645main (void)
12646{
12647printf("Hello")
12648  ;
12649  return 0;
12650}
12651_ACEOF
12652rm -f conftest.$ac_objext
12653if { (eval echo "$as_me:12653: \"$ac_compile\"") >&5
12654  (eval $ac_compile) 2>&5
12655  ac_status=$?
12656  echo "$as_me:12656: \$? = $ac_status" >&5
12657  (exit $ac_status); } &&
12658         { ac_try='test -s conftest.$ac_objext'
12659  { (eval echo "$as_me:12659: \"$ac_try\"") >&5
12660  (eval $ac_try) 2>&5
12661  ac_status=$?
12662  echo "$as_me:12662: \$? = $ac_status" >&5
12663  (exit $ac_status); }; }; then
12664  :
12665else
12666  echo "$as_me: failed program was:" >&5
12667cat conftest.$ac_ext >&5
12668cf_have_incdir=yes
12669fi
12670rm -f conftest.$ac_objext conftest.$ac_ext
12671			  CPPFLAGS=$cf_save_CPPFLAGS
12672			fi
12673		  fi
12674		fi
12675
12676		if test "$cf_have_incdir" = no ; then
12677		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
12678
12679echo "${as_me:-configure}:12679: testing adding $cf_add_incdir to include-path ..." 1>&5
12680
12681		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12682
12683		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12684		  test "$cf_top_incdir" = "$cf_add_incdir" && break
12685		  cf_add_incdir="$cf_top_incdir"
12686		else
12687		  break
12688		fi
12689	  else
12690		break
12691	  fi
12692	done
12693  done
12694fi
12695
12696}
12697
12698echo "$as_me:12698: checking for $cf_ncuhdr_root header in include-path" >&5
12699echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
12700if test "${cf_cv_ncurses_h+set}" = set; then
12701  echo $ECHO_N "(cached) $ECHO_C" >&6
12702else
12703
12704	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
12705	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
12706	for cf_header in $cf_header_list
12707	do
12708
12709	cat >conftest.$ac_ext <<_ACEOF
12710#line 12710 "configure"
12711#include "confdefs.h"
12712
12713#include <$cf_header>
12714int
12715main (void)
12716{
12717
12718#ifdef NCURSES_VERSION
12719
12720printf("%s\n", NCURSES_VERSION);
12721#else
12722#ifdef __NCURSES_H
12723printf("old\n");
12724#else
12725	make an error
12726#endif
12727#endif
12728
12729  ;
12730  return 0;
12731}
12732_ACEOF
12733rm -f conftest.$ac_objext
12734if { (eval echo "$as_me:12734: \"$ac_compile\"") >&5
12735  (eval $ac_compile) 2>&5
12736  ac_status=$?
12737  echo "$as_me:12737: \$? = $ac_status" >&5
12738  (exit $ac_status); } &&
12739         { ac_try='test -s conftest.$ac_objext'
12740  { (eval echo "$as_me:12740: \"$ac_try\"") >&5
12741  (eval $ac_try) 2>&5
12742  ac_status=$?
12743  echo "$as_me:12743: \$? = $ac_status" >&5
12744  (exit $ac_status); }; }; then
12745  cf_cv_ncurses_h=$cf_header
12746
12747else
12748  echo "$as_me: failed program was:" >&5
12749cat conftest.$ac_ext >&5
12750cf_cv_ncurses_h=no
12751fi
12752rm -f conftest.$ac_objext conftest.$ac_ext
12753
12754		test "$cf_cv_ncurses_h" != no && break
12755	done
12756
12757fi
12758echo "$as_me:12758: result: $cf_cv_ncurses_h" >&5
12759echo "${ECHO_T}$cf_cv_ncurses_h" >&6
12760
12761if test "$cf_cv_ncurses_h" != no ; then
12762	cf_cv_ncurses_header=$cf_cv_ncurses_h
12763else
12764
12765echo "$as_me:12765: checking for $cf_ncuhdr_root include-path" >&5
12766echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
12767if test "${cf_cv_ncurses_h2+set}" = set; then
12768  echo $ECHO_N "(cached) $ECHO_C" >&6
12769else
12770
12771	test -n "$verbose" && echo
12772
12773cf_search=
12774
12775# collect the current set of include-directories from compiler flags
12776cf_header_path_list=""
12777if test -n "${CFLAGS}${CPPFLAGS}" ; then
12778	for cf_header_path in $CPPFLAGS $CFLAGS
12779	do
12780		case $cf_header_path in
12781		-I*)
12782			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
12783
12784test "x$cf_header_path" != "xNONE" && \
12785test -d "$cf_header_path" && \
12786 {
12787	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
12788	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
12789	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
12790	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
12791	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
12792	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
12793}
12794
12795			cf_header_path_list="$cf_header_path_list $cf_search"
12796			;;
12797		esac
12798	done
12799fi
12800
12801# add the variations for the package we are looking for
12802
12803cf_search=
12804
12805test "x$prefix" != "xNONE" && \
12806test -d "$prefix" && \
12807 {
12808	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
12809	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
12810	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
12811	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
12812	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
12813	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
12814}
12815
12816for cf_subdir_prefix in \
12817	/usr \
12818	/usr/local \
12819	/usr/pkg \
12820	/opt \
12821	/opt/local \
12822	$HOME
12823do
12824
12825test "x$cf_subdir_prefix" != "x$prefix" && \
12826test -d "$cf_subdir_prefix" && \
12827(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
12828	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
12829	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
12830	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
12831	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
12832	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
12833	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
12834}
12835
12836done
12837
12838test "$includedir" != NONE && \
12839test "$includedir" != "/usr/include" && \
12840test -d "$includedir" && {
12841	test -d $includedir &&    cf_search="$cf_search $includedir"
12842	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
12843}
12844
12845test "$oldincludedir" != NONE && \
12846test "$oldincludedir" != "/usr/include" && \
12847test -d "$oldincludedir" && {
12848	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
12849	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
12850}
12851
12852cf_search="$cf_search $cf_header_path_list"
12853
12854	test -n "$verbose" && echo search path $cf_search
12855	cf_save2_CPPFLAGS="$CPPFLAGS"
12856	for cf_incdir in $cf_search
12857	do
12858
12859if test -n "$cf_incdir" ; then
12860  for cf_add_incdir in $cf_incdir
12861  do
12862	while test $cf_add_incdir != /usr/include
12863	do
12864	  if test -d $cf_add_incdir
12865	  then
12866		cf_have_incdir=no
12867		if test -n "$CFLAGS$CPPFLAGS" ; then
12868		  # a loop is needed to ensure we can add subdirs of existing dirs
12869		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
12870			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
12871			  cf_have_incdir=yes; break
12872			fi
12873		  done
12874		fi
12875
12876		if test "$cf_have_incdir" = no ; then
12877		  if test "$cf_add_incdir" = /usr/local/include ; then
12878			if test "$GCC" = yes
12879			then
12880			  cf_save_CPPFLAGS=$CPPFLAGS
12881
12882	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12883	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
12884
12885			  cat >conftest.$ac_ext <<_ACEOF
12886#line 12886 "configure"
12887#include "confdefs.h"
12888#include <stdio.h>
12889int
12890main (void)
12891{
12892printf("Hello")
12893  ;
12894  return 0;
12895}
12896_ACEOF
12897rm -f conftest.$ac_objext
12898if { (eval echo "$as_me:12898: \"$ac_compile\"") >&5
12899  (eval $ac_compile) 2>&5
12900  ac_status=$?
12901  echo "$as_me:12901: \$? = $ac_status" >&5
12902  (exit $ac_status); } &&
12903         { ac_try='test -s conftest.$ac_objext'
12904  { (eval echo "$as_me:12904: \"$ac_try\"") >&5
12905  (eval $ac_try) 2>&5
12906  ac_status=$?
12907  echo "$as_me:12907: \$? = $ac_status" >&5
12908  (exit $ac_status); }; }; then
12909  :
12910else
12911  echo "$as_me: failed program was:" >&5
12912cat conftest.$ac_ext >&5
12913cf_have_incdir=yes
12914fi
12915rm -f conftest.$ac_objext conftest.$ac_ext
12916			  CPPFLAGS=$cf_save_CPPFLAGS
12917			fi
12918		  fi
12919		fi
12920
12921		if test "$cf_have_incdir" = no ; then
12922		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
12923
12924echo "${as_me:-configure}:12924: testing adding $cf_add_incdir to include-path ..." 1>&5
12925
12926		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
12927
12928		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
12929		  test "$cf_top_incdir" = "$cf_add_incdir" && break
12930		  cf_add_incdir="$cf_top_incdir"
12931		else
12932		  break
12933		fi
12934	  else
12935		break
12936	  fi
12937	done
12938  done
12939fi
12940
12941		for cf_header in \
12942			ncurses.h \
12943			curses.h
12944		do
12945
12946	cat >conftest.$ac_ext <<_ACEOF
12947#line 12947 "configure"
12948#include "confdefs.h"
12949
12950#include <$cf_header>
12951int
12952main (void)
12953{
12954
12955#ifdef NCURSES_VERSION
12956
12957printf("%s\n", NCURSES_VERSION);
12958#else
12959#ifdef __NCURSES_H
12960printf("old\n");
12961#else
12962	make an error
12963#endif
12964#endif
12965
12966  ;
12967  return 0;
12968}
12969_ACEOF
12970rm -f conftest.$ac_objext
12971if { (eval echo "$as_me:12971: \"$ac_compile\"") >&5
12972  (eval $ac_compile) 2>&5
12973  ac_status=$?
12974  echo "$as_me:12974: \$? = $ac_status" >&5
12975  (exit $ac_status); } &&
12976         { ac_try='test -s conftest.$ac_objext'
12977  { (eval echo "$as_me:12977: \"$ac_try\"") >&5
12978  (eval $ac_try) 2>&5
12979  ac_status=$?
12980  echo "$as_me:12980: \$? = $ac_status" >&5
12981  (exit $ac_status); }; }; then
12982  cf_cv_ncurses_h2=$cf_header
12983
12984else
12985  echo "$as_me: failed program was:" >&5
12986cat conftest.$ac_ext >&5
12987cf_cv_ncurses_h2=no
12988fi
12989rm -f conftest.$ac_objext conftest.$ac_ext
12990
12991			if test "$cf_cv_ncurses_h2" != no ; then
12992				cf_cv_ncurses_h2=$cf_incdir/$cf_header
12993				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
12994				break
12995			fi
12996			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
12997		done
12998		CPPFLAGS="$cf_save2_CPPFLAGS"
12999		test "$cf_cv_ncurses_h2" != no && break
13000	done
13001	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:13001: error: not found" >&5
13002echo "$as_me: error: not found" >&2;}
13003   { (exit 1); exit 1; }; }
13004
13005fi
13006echo "$as_me:13006: result: $cf_cv_ncurses_h2" >&5
13007echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
13008
13009	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
13010	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
13011	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
13012		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
13013	fi
13014
13015if test -n "$cf_1st_incdir" ; then
13016  for cf_add_incdir in $cf_1st_incdir
13017  do
13018	while test $cf_add_incdir != /usr/include
13019	do
13020	  if test -d $cf_add_incdir
13021	  then
13022		cf_have_incdir=no
13023		if test -n "$CFLAGS$CPPFLAGS" ; then
13024		  # a loop is needed to ensure we can add subdirs of existing dirs
13025		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13026			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13027			  cf_have_incdir=yes; break
13028			fi
13029		  done
13030		fi
13031
13032		if test "$cf_have_incdir" = no ; then
13033		  if test "$cf_add_incdir" = /usr/local/include ; then
13034			if test "$GCC" = yes
13035			then
13036			  cf_save_CPPFLAGS=$CPPFLAGS
13037
13038	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13039	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13040
13041			  cat >conftest.$ac_ext <<_ACEOF
13042#line 13042 "configure"
13043#include "confdefs.h"
13044#include <stdio.h>
13045int
13046main (void)
13047{
13048printf("Hello")
13049  ;
13050  return 0;
13051}
13052_ACEOF
13053rm -f conftest.$ac_objext
13054if { (eval echo "$as_me:13054: \"$ac_compile\"") >&5
13055  (eval $ac_compile) 2>&5
13056  ac_status=$?
13057  echo "$as_me:13057: \$? = $ac_status" >&5
13058  (exit $ac_status); } &&
13059         { ac_try='test -s conftest.$ac_objext'
13060  { (eval echo "$as_me:13060: \"$ac_try\"") >&5
13061  (eval $ac_try) 2>&5
13062  ac_status=$?
13063  echo "$as_me:13063: \$? = $ac_status" >&5
13064  (exit $ac_status); }; }; then
13065  :
13066else
13067  echo "$as_me: failed program was:" >&5
13068cat conftest.$ac_ext >&5
13069cf_have_incdir=yes
13070fi
13071rm -f conftest.$ac_objext conftest.$ac_ext
13072			  CPPFLAGS=$cf_save_CPPFLAGS
13073			fi
13074		  fi
13075		fi
13076
13077		if test "$cf_have_incdir" = no ; then
13078		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13079
13080echo "${as_me:-configure}:13080: testing adding $cf_add_incdir to include-path ..." 1>&5
13081
13082		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13083
13084		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
13085		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13086		  cf_add_incdir="$cf_top_incdir"
13087		else
13088		  break
13089		fi
13090	  else
13091		break
13092	  fi
13093	done
13094  done
13095fi
13096
13097fi
13098
13099# Set definitions to allow ifdef'ing for ncurses.h
13100
13101case $cf_cv_ncurses_header in
13102*ncurses.h)
13103
13104cat >>confdefs.h <<\EOF
13105#define HAVE_NCURSES_H 1
13106EOF
13107
13108	;;
13109esac
13110
13111case $cf_cv_ncurses_header in
13112ncurses/curses.h|ncurses/ncurses.h)
13113
13114cat >>confdefs.h <<\EOF
13115#define HAVE_NCURSES_NCURSES_H 1
13116EOF
13117
13118	;;
13119ncursesw/curses.h|ncursesw/ncurses.h)
13120
13121cat >>confdefs.h <<\EOF
13122#define HAVE_NCURSESW_NCURSES_H 1
13123EOF
13124
13125	;;
13126esac
13127
13128echo "$as_me:13128: checking for terminfo header" >&5
13129echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
13130if test "${cf_cv_term_header+set}" = set; then
13131  echo $ECHO_N "(cached) $ECHO_C" >&6
13132else
13133
13134case ${cf_cv_ncurses_header} in
13135*/ncurses.h|*/ncursesw.h)
13136	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
13137	;;
13138*)
13139	cf_term_header=term.h
13140	;;
13141esac
13142
13143for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
13144do
13145cat >conftest.$ac_ext <<_ACEOF
13146#line 13146 "configure"
13147#include "confdefs.h"
13148#include <stdio.h>
13149#include <${cf_cv_ncurses_header:-curses.h}>
13150#include <$cf_test>
13151
13152int
13153main (void)
13154{
13155int x = auto_left_margin; (void)x
13156  ;
13157  return 0;
13158}
13159_ACEOF
13160rm -f conftest.$ac_objext
13161if { (eval echo "$as_me:13161: \"$ac_compile\"") >&5
13162  (eval $ac_compile) 2>&5
13163  ac_status=$?
13164  echo "$as_me:13164: \$? = $ac_status" >&5
13165  (exit $ac_status); } &&
13166         { ac_try='test -s conftest.$ac_objext'
13167  { (eval echo "$as_me:13167: \"$ac_try\"") >&5
13168  (eval $ac_try) 2>&5
13169  ac_status=$?
13170  echo "$as_me:13170: \$? = $ac_status" >&5
13171  (exit $ac_status); }; }; then
13172
13173	cf_cv_term_header="$cf_test"
13174else
13175  echo "$as_me: failed program was:" >&5
13176cat conftest.$ac_ext >&5
13177
13178	cf_cv_term_header=unknown
13179
13180fi
13181rm -f conftest.$ac_objext conftest.$ac_ext
13182	test "$cf_cv_term_header" != unknown && break
13183done
13184
13185fi
13186echo "$as_me:13186: result: $cf_cv_term_header" >&5
13187echo "${ECHO_T}$cf_cv_term_header" >&6
13188
13189# Set definitions to allow ifdef'ing to accommodate subdirectories
13190
13191case $cf_cv_term_header in
13192*term.h)
13193
13194cat >>confdefs.h <<\EOF
13195#define HAVE_TERM_H 1
13196EOF
13197
13198	;;
13199esac
13200
13201case $cf_cv_term_header in
13202ncurses/term.h)
13203
13204cat >>confdefs.h <<\EOF
13205#define HAVE_NCURSES_TERM_H 1
13206EOF
13207
13208	;;
13209ncursesw/term.h)
13210
13211cat >>confdefs.h <<\EOF
13212#define HAVE_NCURSESW_TERM_H 1
13213EOF
13214
13215	;;
13216esac
13217
13218# some applications need this, but should check for NCURSES_VERSION
13219
13220cat >>confdefs.h <<\EOF
13221#define NCURSES 1
13222EOF
13223
13224echo "$as_me:13224: checking for ncurses version" >&5
13225echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
13226if test "${cf_cv_ncurses_version+set}" = set; then
13227  echo $ECHO_N "(cached) $ECHO_C" >&6
13228else
13229
13230	cf_cv_ncurses_version=no
13231	cf_tempfile=out$$
13232	rm -f $cf_tempfile
13233	if test "$cross_compiling" = yes; then
13234
13235	# This will not work if the preprocessor splits the line after the
13236	# Autoconf token.  The 'unproto' program does that.
13237	cat > conftest.$ac_ext <<EOF
13238#include <${cf_cv_ncurses_header:-curses.h}>
13239#undef Autoconf
13240#ifdef NCURSES_VERSION
13241Autoconf NCURSES_VERSION
13242#else
13243#ifdef __NCURSES_H
13244Autoconf "old"
13245#endif
13246;
13247#endif
13248EOF
13249	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
13250	{ (eval echo "$as_me:13250: \"$cf_try\"") >&5
13251  (eval $cf_try) 2>&5
13252  ac_status=$?
13253  echo "$as_me:13253: \$? = $ac_status" >&5
13254  (exit $ac_status); }
13255	if test -f conftest.out ; then
13256		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
13257		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
13258		rm -f conftest.out
13259	fi
13260
13261else
13262  cat >conftest.$ac_ext <<_ACEOF
13263#line 13263 "configure"
13264#include "confdefs.h"
13265
13266#include <${cf_cv_ncurses_header:-curses.h}>
13267#include <stdio.h>
13268int main(void)
13269{
13270	FILE *fp = fopen("$cf_tempfile", "w");
13271#ifdef NCURSES_VERSION
13272# ifdef NCURSES_VERSION_PATCH
13273	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
13274# else
13275	fprintf(fp, "%s\n", NCURSES_VERSION);
13276# endif
13277#else
13278# ifdef __NCURSES_H
13279	fprintf(fp, "old\n");
13280# else
13281	make an error
13282# endif
13283#endif
13284	${cf_cv_main_return:-return}(0);
13285}
13286_ACEOF
13287rm -f conftest$ac_exeext
13288if { (eval echo "$as_me:13288: \"$ac_link\"") >&5
13289  (eval $ac_link) 2>&5
13290  ac_status=$?
13291  echo "$as_me:13291: \$? = $ac_status" >&5
13292  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
13293  { (eval echo "$as_me:13293: \"$ac_try\"") >&5
13294  (eval $ac_try) 2>&5
13295  ac_status=$?
13296  echo "$as_me:13296: \$? = $ac_status" >&5
13297  (exit $ac_status); }; }; then
13298
13299	cf_cv_ncurses_version=`cat $cf_tempfile`
13300else
13301  echo "$as_me: program exited with status $ac_status" >&5
13302echo "$as_me: failed program was:" >&5
13303cat conftest.$ac_ext >&5
13304fi
13305rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
13306fi
13307	rm -f $cf_tempfile
13308
13309fi
13310echo "$as_me:13310: result: $cf_cv_ncurses_version" >&5
13311echo "${ECHO_T}$cf_cv_ncurses_version" >&6
13312test "$cf_cv_ncurses_version" = no ||
13313cat >>confdefs.h <<\EOF
13314#define NCURSES 1
13315EOF
13316
13317cf_nculib_root=ncurses
13318	# This works, except for the special case where we find gpm, but
13319	# ncurses is in a nonstandard location via $LIBS, and we really want
13320	# to link gpm.
13321cf_ncurses_LIBS=""
13322cf_ncurses_SAVE="$LIBS"
13323echo "$as_me:13323: checking for Gpm_Open in -lgpm" >&5
13324echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
13325if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
13326  echo $ECHO_N "(cached) $ECHO_C" >&6
13327else
13328  ac_check_lib_save_LIBS=$LIBS
13329LIBS="-lgpm  $LIBS"
13330cat >conftest.$ac_ext <<_ACEOF
13331#line 13331 "configure"
13332#include "confdefs.h"
13333
13334/* Override any gcc2 internal prototype to avoid an error.  */
13335#ifdef __cplusplus
13336extern "C"
13337#endif
13338/* We use char because int might match the return type of a gcc2
13339   builtin and then its argument prototype would still apply.  */
13340char Gpm_Open ();
13341int
13342main (void)
13343{
13344Gpm_Open ();
13345  ;
13346  return 0;
13347}
13348_ACEOF
13349rm -f conftest.$ac_objext conftest$ac_exeext
13350if { (eval echo "$as_me:13350: \"$ac_link\"") >&5
13351  (eval $ac_link) 2>&5
13352  ac_status=$?
13353  echo "$as_me:13353: \$? = $ac_status" >&5
13354  (exit $ac_status); } &&
13355         { ac_try='test -s conftest$ac_exeext'
13356  { (eval echo "$as_me:13356: \"$ac_try\"") >&5
13357  (eval $ac_try) 2>&5
13358  ac_status=$?
13359  echo "$as_me:13359: \$? = $ac_status" >&5
13360  (exit $ac_status); }; }; then
13361  ac_cv_lib_gpm_Gpm_Open=yes
13362else
13363  echo "$as_me: failed program was:" >&5
13364cat conftest.$ac_ext >&5
13365ac_cv_lib_gpm_Gpm_Open=no
13366fi
13367rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13368LIBS=$ac_check_lib_save_LIBS
13369fi
13370echo "$as_me:13370: result: $ac_cv_lib_gpm_Gpm_Open" >&5
13371echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
13372if test $ac_cv_lib_gpm_Gpm_Open = yes; then
13373  echo "$as_me:13373: checking for initscr in -lgpm" >&5
13374echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
13375if test "${ac_cv_lib_gpm_initscr+set}" = set; then
13376  echo $ECHO_N "(cached) $ECHO_C" >&6
13377else
13378  ac_check_lib_save_LIBS=$LIBS
13379LIBS="-lgpm  $LIBS"
13380cat >conftest.$ac_ext <<_ACEOF
13381#line 13381 "configure"
13382#include "confdefs.h"
13383
13384/* Override any gcc2 internal prototype to avoid an error.  */
13385#ifdef __cplusplus
13386extern "C"
13387#endif
13388/* We use char because int might match the return type of a gcc2
13389   builtin and then its argument prototype would still apply.  */
13390char initscr ();
13391int
13392main (void)
13393{
13394initscr ();
13395  ;
13396  return 0;
13397}
13398_ACEOF
13399rm -f conftest.$ac_objext conftest$ac_exeext
13400if { (eval echo "$as_me:13400: \"$ac_link\"") >&5
13401  (eval $ac_link) 2>&5
13402  ac_status=$?
13403  echo "$as_me:13403: \$? = $ac_status" >&5
13404  (exit $ac_status); } &&
13405         { ac_try='test -s conftest$ac_exeext'
13406  { (eval echo "$as_me:13406: \"$ac_try\"") >&5
13407  (eval $ac_try) 2>&5
13408  ac_status=$?
13409  echo "$as_me:13409: \$? = $ac_status" >&5
13410  (exit $ac_status); }; }; then
13411  ac_cv_lib_gpm_initscr=yes
13412else
13413  echo "$as_me: failed program was:" >&5
13414cat conftest.$ac_ext >&5
13415ac_cv_lib_gpm_initscr=no
13416fi
13417rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13418LIBS=$ac_check_lib_save_LIBS
13419fi
13420echo "$as_me:13420: result: $ac_cv_lib_gpm_initscr" >&5
13421echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
13422if test $ac_cv_lib_gpm_initscr = yes; then
13423  LIBS="$cf_ncurses_SAVE"
13424else
13425  cf_ncurses_LIBS="-lgpm"
13426fi
13427
13428fi
13429
13430case $host_os in
13431XXXfreebsd*)
13432	# This is only necessary if you are linking against an obsolete
13433	# version of ncurses (but it should do no harm, since it's static).
13434	if test "$cf_nculib_root" = ncurses ; then
13435		echo "$as_me:13435: checking for tgoto in -lmytinfo" >&5
13436echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
13437if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
13438  echo $ECHO_N "(cached) $ECHO_C" >&6
13439else
13440  ac_check_lib_save_LIBS=$LIBS
13441LIBS="-lmytinfo  $LIBS"
13442cat >conftest.$ac_ext <<_ACEOF
13443#line 13443 "configure"
13444#include "confdefs.h"
13445
13446/* Override any gcc2 internal prototype to avoid an error.  */
13447#ifdef __cplusplus
13448extern "C"
13449#endif
13450/* We use char because int might match the return type of a gcc2
13451   builtin and then its argument prototype would still apply.  */
13452char tgoto ();
13453int
13454main (void)
13455{
13456tgoto ();
13457  ;
13458  return 0;
13459}
13460_ACEOF
13461rm -f conftest.$ac_objext conftest$ac_exeext
13462if { (eval echo "$as_me:13462: \"$ac_link\"") >&5
13463  (eval $ac_link) 2>&5
13464  ac_status=$?
13465  echo "$as_me:13465: \$? = $ac_status" >&5
13466  (exit $ac_status); } &&
13467         { ac_try='test -s conftest$ac_exeext'
13468  { (eval echo "$as_me:13468: \"$ac_try\"") >&5
13469  (eval $ac_try) 2>&5
13470  ac_status=$?
13471  echo "$as_me:13471: \$? = $ac_status" >&5
13472  (exit $ac_status); }; }; then
13473  ac_cv_lib_mytinfo_tgoto=yes
13474else
13475  echo "$as_me: failed program was:" >&5
13476cat conftest.$ac_ext >&5
13477ac_cv_lib_mytinfo_tgoto=no
13478fi
13479rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13480LIBS=$ac_check_lib_save_LIBS
13481fi
13482echo "$as_me:13482: result: $ac_cv_lib_mytinfo_tgoto" >&5
13483echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
13484if test $ac_cv_lib_mytinfo_tgoto = yes; then
13485  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
13486fi
13487
13488	fi
13489	;;
13490esac
13491
13492cf_add_libs="$LIBS"
13493# reverse order
13494cf_add_0lib=
13495for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13496# filter duplicates
13497for cf_add_1lib in $cf_add_0lib; do
13498	for cf_add_2lib in $cf_add_libs; do
13499		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13500			cf_add_1lib=
13501			break
13502		fi
13503	done
13504	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13505done
13506LIBS="$cf_add_libs"
13507
13508if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
13509then
13510
13511cf_add_libs="$LIBS"
13512# reverse order
13513cf_add_0lib=
13514for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
13515# filter duplicates
13516for cf_add_1lib in $cf_add_0lib; do
13517	for cf_add_2lib in $cf_add_libs; do
13518		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
13519			cf_add_1lib=
13520			break
13521		fi
13522	done
13523	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
13524done
13525LIBS="$cf_add_libs"
13526
13527else
13528
13529	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
13530	cf_libdir=""
13531	echo "$as_me:13531: checking for initscr" >&5
13532echo $ECHO_N "checking for initscr... $ECHO_C" >&6
13533if test "${ac_cv_func_initscr+set}" = set; then
13534  echo $ECHO_N "(cached) $ECHO_C" >&6
13535else
13536  cat >conftest.$ac_ext <<_ACEOF
13537#line 13537 "configure"
13538#include "confdefs.h"
13539#define initscr autoconf_temporary
13540#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
13541#undef initscr
13542
13543#ifdef __cplusplus
13544extern "C"
13545#endif
13546
13547/* We use char because int might match the return type of a gcc2
13548   builtin and then its argument prototype would still apply.  */
13549char initscr (void);
13550
13551int
13552main (void)
13553{
13554
13555/* The GNU C library defines stubs for functions which it implements
13556    to always fail with ENOSYS.  Some functions are actually named
13557    something starting with __ and the normal name is an alias.  */
13558#if defined (__stub_initscr) || defined (__stub___initscr)
13559#error found stub for initscr
13560#endif
13561
13562	return initscr ();
13563  ;
13564  return 0;
13565}
13566_ACEOF
13567rm -f conftest.$ac_objext conftest$ac_exeext
13568if { (eval echo "$as_me:13568: \"$ac_link\"") >&5
13569  (eval $ac_link) 2>&5
13570  ac_status=$?
13571  echo "$as_me:13571: \$? = $ac_status" >&5
13572  (exit $ac_status); } &&
13573         { ac_try='test -s conftest$ac_exeext'
13574  { (eval echo "$as_me:13574: \"$ac_try\"") >&5
13575  (eval $ac_try) 2>&5
13576  ac_status=$?
13577  echo "$as_me:13577: \$? = $ac_status" >&5
13578  (exit $ac_status); }; }; then
13579  ac_cv_func_initscr=yes
13580else
13581  echo "$as_me: failed program was:" >&5
13582cat conftest.$ac_ext >&5
13583ac_cv_func_initscr=no
13584fi
13585rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13586fi
13587echo "$as_me:13587: result: $ac_cv_func_initscr" >&5
13588echo "${ECHO_T}$ac_cv_func_initscr" >&6
13589if test $ac_cv_func_initscr = yes; then
13590  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
13591else
13592
13593		cf_save_LIBS="$LIBS"
13594		echo "$as_me:13594: checking for initscr in -l$cf_nculib_root" >&5
13595echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
13596		LIBS="-l$cf_nculib_root $LIBS"
13597		cat >conftest.$ac_ext <<_ACEOF
13598#line 13598 "configure"
13599#include "confdefs.h"
13600#include <${cf_cv_ncurses_header:-curses.h}>
13601int
13602main (void)
13603{
13604initscr()
13605  ;
13606  return 0;
13607}
13608_ACEOF
13609rm -f conftest.$ac_objext conftest$ac_exeext
13610if { (eval echo "$as_me:13610: \"$ac_link\"") >&5
13611  (eval $ac_link) 2>&5
13612  ac_status=$?
13613  echo "$as_me:13613: \$? = $ac_status" >&5
13614  (exit $ac_status); } &&
13615         { ac_try='test -s conftest$ac_exeext'
13616  { (eval echo "$as_me:13616: \"$ac_try\"") >&5
13617  (eval $ac_try) 2>&5
13618  ac_status=$?
13619  echo "$as_me:13619: \$? = $ac_status" >&5
13620  (exit $ac_status); }; }; then
13621  echo "$as_me:13621: result: yes" >&5
13622echo "${ECHO_T}yes" >&6
13623			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
13624
13625else
13626  echo "$as_me: failed program was:" >&5
13627cat conftest.$ac_ext >&5
13628echo "$as_me:13628: result: no" >&5
13629echo "${ECHO_T}no" >&6
13630
13631cf_search=
13632cf_library_path_list=""
13633if test -n "${LDFLAGS}${LIBS}" ; then
13634	for cf_library_path in $LDFLAGS $LIBS
13635	do
13636		case $cf_library_path in
13637		-L*)
13638			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
13639
13640test "x$cf_library_path" != "xNONE" && \
13641test -d "$cf_library_path" && \
13642 {
13643	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
13644	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
13645	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
13646	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
13647	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
13648	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
13649}
13650
13651			cf_library_path_list="$cf_library_path_list $cf_search"
13652			;;
13653		esac
13654	done
13655fi
13656
13657cf_search=
13658
13659test "x$prefix" != "xNONE" && \
13660test -d "$prefix" && \
13661 {
13662	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
13663	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
13664	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
13665	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
13666	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
13667	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
13668}
13669
13670for cf_subdir_prefix in \
13671	/usr \
13672	/usr/local \
13673	/usr/pkg \
13674	/opt \
13675	/opt/local \
13676	$HOME
13677do
13678
13679test "x$cf_subdir_prefix" != "x$prefix" && \
13680test -d "$cf_subdir_prefix" && \
13681(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
13682	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
13683	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
13684	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
13685	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
13686	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
13687	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
13688}
13689
13690done
13691
13692cf_search="$cf_library_path_list $cf_search"
13693
13694			for cf_libdir in $cf_search
13695			do
13696				echo "$as_me:13696: checking for -l$cf_nculib_root in $cf_libdir" >&5
13697echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
13698				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
13699				cat >conftest.$ac_ext <<_ACEOF
13700#line 13700 "configure"
13701#include "confdefs.h"
13702#include <${cf_cv_ncurses_header:-curses.h}>
13703int
13704main (void)
13705{
13706initscr()
13707  ;
13708  return 0;
13709}
13710_ACEOF
13711rm -f conftest.$ac_objext conftest$ac_exeext
13712if { (eval echo "$as_me:13712: \"$ac_link\"") >&5
13713  (eval $ac_link) 2>&5
13714  ac_status=$?
13715  echo "$as_me:13715: \$? = $ac_status" >&5
13716  (exit $ac_status); } &&
13717         { ac_try='test -s conftest$ac_exeext'
13718  { (eval echo "$as_me:13718: \"$ac_try\"") >&5
13719  (eval $ac_try) 2>&5
13720  ac_status=$?
13721  echo "$as_me:13721: \$? = $ac_status" >&5
13722  (exit $ac_status); }; }; then
13723  echo "$as_me:13723: result: yes" >&5
13724echo "${ECHO_T}yes" >&6
13725			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
13726					 break
13727else
13728  echo "$as_me: failed program was:" >&5
13729cat conftest.$ac_ext >&5
13730echo "$as_me:13730: result: no" >&5
13731echo "${ECHO_T}no" >&6
13732					 LIBS="$cf_save_LIBS"
13733fi
13734rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13735			done
13736
13737fi
13738rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13739
13740fi
13741
13742eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
13743
13744if test $cf_found_library = no ; then
13745	{ { echo "$as_me:13745: error: Cannot link $cf_nculib_root library" >&5
13746echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
13747   { (exit 1); exit 1; }; }
13748fi
13749
13750fi
13751
13752if test -n "$cf_ncurses_LIBS" ; then
13753	echo "$as_me:13753: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
13754echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
13755	cf_ncurses_SAVE="$LIBS"
13756	for p in $cf_ncurses_LIBS ; do
13757		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
13758		if test "$q" != "$LIBS" ; then
13759			LIBS="$q"
13760		fi
13761	done
13762	cat >conftest.$ac_ext <<_ACEOF
13763#line 13763 "configure"
13764#include "confdefs.h"
13765#include <${cf_cv_ncurses_header:-curses.h}>
13766int
13767main (void)
13768{
13769initscr(); mousemask(0,0); tigetstr((char *)0);
13770  ;
13771  return 0;
13772}
13773_ACEOF
13774rm -f conftest.$ac_objext conftest$ac_exeext
13775if { (eval echo "$as_me:13775: \"$ac_link\"") >&5
13776  (eval $ac_link) 2>&5
13777  ac_status=$?
13778  echo "$as_me:13778: \$? = $ac_status" >&5
13779  (exit $ac_status); } &&
13780         { ac_try='test -s conftest$ac_exeext'
13781  { (eval echo "$as_me:13781: \"$ac_try\"") >&5
13782  (eval $ac_try) 2>&5
13783  ac_status=$?
13784  echo "$as_me:13784: \$? = $ac_status" >&5
13785  (exit $ac_status); }; }; then
13786  echo "$as_me:13786: result: yes" >&5
13787echo "${ECHO_T}yes" >&6
13788else
13789  echo "$as_me: failed program was:" >&5
13790cat conftest.$ac_ext >&5
13791echo "$as_me:13791: result: no" >&5
13792echo "${ECHO_T}no" >&6
13793		 LIBS="$cf_ncurses_SAVE"
13794fi
13795rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
13796fi
13797
13798cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13799
13800cat >>confdefs.h <<EOF
13801#define $cf_nculib_ROOT 1
13802EOF
13803
13804	fi
13805else
13806	NCURSES_CONFIG=none
13807fi
13808
13809		;;
13810	ncursesw) #(vi
13811
13812for cf_hdr in stdlib.h wchar.h wctype.h
13813do
13814	echo "$as_me:13814: checking for $cf_hdr" >&5
13815echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
13816	cat >conftest.$ac_ext <<_ACEOF
13817#line 13817 "configure"
13818#include "confdefs.h"
13819
13820#include <sys/types.h>
13821#include <$cf_hdr>
13822
13823_ACEOF
13824if { (eval echo "$as_me:13824: \"$ac_cpp conftest.$ac_ext\"") >&5
13825  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
13826  ac_status=$?
13827  egrep -v '^ *\+' conftest.er1 >conftest.err
13828  rm -f conftest.er1
13829  cat conftest.err >&5
13830  echo "$as_me:13830: \$? = $ac_status" >&5
13831  (exit $ac_status); } >/dev/null; then
13832  if test -s conftest.err; then
13833    ac_cpp_err=$ac_c_preproc_warn_flag
13834  else
13835    ac_cpp_err=
13836  fi
13837else
13838  ac_cpp_err=yes
13839fi
13840if test -z "$ac_cpp_err"; then
13841  cf_found=yes
13842else
13843  echo "$as_me: failed program was:" >&5
13844  cat conftest.$ac_ext >&5
13845  cf_found=no
13846fi
13847rm -f conftest.err conftest.$ac_ext
13848echo "$as_me:13848: result: $cf_found" >&5
13849echo "${ECHO_T}$cf_found" >&6
13850if test $cf_found = yes ; then
13851
13852cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
13853
13854	cat >>confdefs.h <<EOF
13855#define HAVE_${cf_tr_hdr} 1
13856EOF
13857
13858fi
13859done
13860
13861  echo "$as_me:13861: checking for wide char and multibyte support" >&5
13862echo $ECHO_N "checking for wide char and multibyte support... $ECHO_C" >&6
13863if test "${am_cv_multibyte_able+set}" = set; then
13864  echo $ECHO_N "(cached) $ECHO_C" >&6
13865else
13866  cat >conftest.$ac_ext <<_ACEOF
13867#line 13867 "configure"
13868#include "confdefs.h"
13869#include <stdio.h>
13870#ifdef HAVE_STDLIB_H
13871#	include <stdlib.h>
13872#endif /* HAVE_STDLIB_H */
13873#ifdef HAVE_WCHAR_H
13874#	include <wchar.h>
13875#endif /* HAVE_WCHAR_H */
13876#ifdef HAVE_WCTYPE_H
13877#	include <wctype.h>
13878#endif /* HAVE_WCTYPE_H */
13879
13880int
13881main (void)
13882{
13883const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
13884      char ocb[5];
13885      wchar_t wcb[5];
13886      wchar_t wcb2[5];
13887      wchar_t format[3];
13888
13889      putwc(0, 0);
13890      fputwc(0, 0);
13891      fwide(0, 0);
13892      mbtowc(wcb, icb, MB_CUR_MAX);
13893      mbstowcs(wcb, icb, 5);
13894      (void) iswalnum((wint_t) wcb[0]);
13895      (void) iswcntrl((wint_t) wcb[0]);
13896      (void) iswdigit((wint_t) wcb[0]);
13897      (void) iswgraph((wint_t) wcb[0]);
13898      (void) iswprint((wint_t) wcb[0]);
13899      (void) iswspace((wint_t) wcb[0]);
13900      (void) towupper((wint_t) wcb[0]);
13901      /* (void) iswupper((wint_t) wcb[0]); */
13902      /* (void) towlower((wint_t) wcb[0]); */
13903      /* (void) iswlower((wint_t) wcb[0]); */
13904      (void) iswalpha((wint_t) wcb[0]);
13905      /* (void) iswblank((wint_t) wcb[0]); */
13906      /* (void) iswpunct((wint_t) wcb[0]); */
13907      /* (void) iswxdigit((wint_t) wcb[0]); */
13908      /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
13909      /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
13910      (void) wcslen(wcb);
13911      /* (void) wcsnlen(wcb, 4); */
13912      wcwidth((wint_t) wcb[0]);
13913      wcswidth(wcb, 5);
13914      wcstombs(ocb, wcb, 5);
13915      wctomb(ocb, wcb[0]);
13916      wcscat(wcb2, wcb);
13917      wcscpy(wcb2, wcb);
13918      mbstowcs(format, "%s", 2);
13919      swprintf(wcb, 5, format, "test");
13920      wcsncat(wcb2, wcb, 5);
13921  ;
13922  return 0;
13923}
13924_ACEOF
13925rm -f conftest.$ac_objext conftest$ac_exeext
13926if { (eval echo "$as_me:13926: \"$ac_link\"") >&5
13927  (eval $ac_link) 2>&5
13928  ac_status=$?
13929  echo "$as_me:13929: \$? = $ac_status" >&5
13930  (exit $ac_status); } &&
13931         { ac_try='test -s conftest$ac_exeext'
13932  { (eval echo "$as_me:13932: \"$ac_try\"") >&5
13933  (eval $ac_try) 2>&5
13934  ac_status=$?
13935  echo "$as_me:13935: \$? = $ac_status" >&5
13936  (exit $ac_status); }; }; then
13937  am_cv_multibyte_able=yes
13938else
13939  echo "$as_me: failed program was:" >&5
13940cat conftest.$ac_ext >&5
13941cf_save_LIBS="$LIBS"
13942      LIBS="-lutf8 $LIBS"
13943      cat >conftest.$ac_ext <<_ACEOF
13944#line 13944 "configure"
13945#include "confdefs.h"
13946#include <libutf8.h>
13947int
13948main (void)
13949{
13950const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
13951        char ocb[5];
13952        wchar_t wcb[5];
13953        wchar_t wcb2[5];
13954        wchar_t format[3];
13955
13956        putwc(0, 0);
13957        fputwc(0, 0);
13958        fwide(0, 0);
13959        mbtowc(wcb, icb, MB_CUR_MAX);
13960        mbstowcs(wcb, icb, 5);
13961        (void) iswalnum((wint_t) wcb[0]);
13962        (void) iswcntrl((wint_t) wcb[0]);
13963        (void) iswdigit((wint_t) wcb[0]);
13964        (void) iswgraph((wint_t) wcb[0]);
13965        (void) iswprint((wint_t) wcb[0]);
13966        (void) iswspace((wint_t) wcb[0]);
13967        (void) towupper((wint_t) wcb[0]);
13968        /* (void) iswupper((wint_t) wcb[0]); */
13969        /* (void) towlower((wint_t) wcb[0]); */
13970        /* (void) iswlower((wint_t) wcb[0]); */
13971        (void) iswalpha((wint_t) wcb[0]);
13972        /* (void) iswblank((wint_t) wcb[0]); */
13973        /* (void) iswpunct((wint_t) wcb[0]); */
13974        /* (void) iswxdigit((wint_t) wcb[0]); */
13975        /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
13976        /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
13977        (void) wcslen(wcb);
13978        /* (void) wcsnlen(wcb, 4); */
13979        wcwidth((wint_t) wcb[0]);
13980        wcswidth(wcb, 5);
13981        wcstombs(ocb, wcb, 5);
13982        wctomb(ocb, wcb[0]);
13983        wcscat(wcb2, wcb);
13984        wcscpy(wcb2, wcb);
13985        mbstowcs(format, "%s", 2);
13986        swprintf(wcb, 5, format, "test");
13987        wcsncat(wcb2, wcb, 5);
13988  ;
13989  return 0;
13990}
13991_ACEOF
13992rm -f conftest.$ac_objext conftest$ac_exeext
13993if { (eval echo "$as_me:13993: \"$ac_link\"") >&5
13994  (eval $ac_link) 2>&5
13995  ac_status=$?
13996  echo "$as_me:13996: \$? = $ac_status" >&5
13997  (exit $ac_status); } &&
13998         { ac_try='test -s conftest$ac_exeext'
13999  { (eval echo "$as_me:13999: \"$ac_try\"") >&5
14000  (eval $ac_try) 2>&5
14001  ac_status=$?
14002  echo "$as_me:14002: \$? = $ac_status" >&5
14003  (exit $ac_status); }; }; then
14004  am_cv_multibyte_able=libutf8
14005else
14006  echo "$as_me: failed program was:" >&5
14007cat conftest.$ac_ext >&5
14008am_cv_multibyte_able=no
14009fi
14010rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14011      LIBS="$cf_save_LIBS"
14012
14013fi
14014rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14015
14016fi
14017echo "$as_me:14017: result: $am_cv_multibyte_able" >&5
14018echo "${ECHO_T}$am_cv_multibyte_able" >&6
14019  if test "$am_cv_multibyte_able" != no; then
14020    if test "$am_cv_multibyte_able" = libutf8; then
14021
14022cat >>confdefs.h <<\EOF
14023#define HAVE_LIBUTF8_H 1
14024EOF
14025
14026      LIBS="-lutf8 $LIBS"
14027    fi
14028
14029cat >>confdefs.h <<\EOF
14030#define MULTIBYTE_ABLE 1
14031EOF
14032
14033  fi
14034
14035cf_ncuconfig_root=ncursesw
14036cf_have_ncuconfig=no
14037
14038if test "x${PKG_CONFIG:=none}" != xnone; then
14039	echo "$as_me:14039: checking pkg-config for $cf_ncuconfig_root" >&5
14040echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
14041	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
14042		echo "$as_me:14042: result: yes" >&5
14043echo "${ECHO_T}yes" >&6
14044
14045		echo "$as_me:14045: checking if the $cf_ncuconfig_root package files work" >&5
14046echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
14047		cf_have_ncuconfig=unknown
14048
14049		cf_save_CFLAGS="$CFLAGS"
14050		cf_save_CPPFLAGS="$CPPFLAGS"
14051		cf_save_LIBS="$LIBS"
14052
14053		cf_pkg_cflags=`$PKG_CONFIG --cflags $cf_ncuconfig_root`
14054		cf_pkg_libs=`$PKG_CONFIG --libs $cf_ncuconfig_root`
14055
14056		# while -W for passing linker flags is prevalent, it is not "standard".
14057		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
14058		# incompatible _and_ non-standard -W option which gives an error.  Work
14059		# around that pitfall.
14060		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
14061		x*c[89]9@@*-W*)
14062
14063cf_fix_cppflags=no
14064cf_new_cflags=
14065cf_new_cppflags=
14066cf_new_extra_cppflags=
14067
14068for cf_add_cflags in $cf_pkg_cflags
14069do
14070case $cf_fix_cppflags in
14071no)
14072	case $cf_add_cflags in
14073	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14074		case $cf_add_cflags in
14075		-D*)
14076			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14077
14078			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14079				&& test -z "${cf_tst_cflags}" \
14080				&& cf_fix_cppflags=yes
14081
14082			if test $cf_fix_cppflags = yes ; then
14083
14084	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14085	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14086
14087				continue
14088			elif test "${cf_tst_cflags}" = "\"'" ; then
14089
14090	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14091	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14092
14093				continue
14094			fi
14095			;;
14096		esac
14097		case "$CPPFLAGS" in
14098		*$cf_add_cflags)
14099			;;
14100		*)
14101			case $cf_add_cflags in
14102			-D*)
14103				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14104
14105CPPFLAGS=`echo "$CPPFLAGS" | \
14106	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14107		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14108
14109				;;
14110			esac
14111
14112	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14113	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14114
14115			;;
14116		esac
14117		;;
14118	*)
14119
14120	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14121	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14122
14123		;;
14124	esac
14125	;;
14126yes)
14127
14128	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14129	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14130
14131	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14132
14133	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14134		&& test -z "${cf_tst_cflags}" \
14135		&& cf_fix_cppflags=no
14136	;;
14137esac
14138done
14139
14140if test -n "$cf_new_cflags" ; then
14141
14142	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14143	CFLAGS="${CFLAGS}$cf_new_cflags"
14144
14145fi
14146
14147if test -n "$cf_new_cppflags" ; then
14148
14149	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14150	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14151
14152fi
14153
14154if test -n "$cf_new_extra_cppflags" ; then
14155
14156	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14157	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14158
14159fi
14160
14161cf_add_libs="$LIBS"
14162# reverse order
14163cf_add_0lib=
14164for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14165# filter duplicates
14166for cf_add_1lib in $cf_add_0lib; do
14167	for cf_add_2lib in $cf_add_libs; do
14168		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14169			cf_add_1lib=
14170			break
14171		fi
14172	done
14173	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14174done
14175LIBS="$cf_add_libs"
14176
14177			cat >conftest.$ac_ext <<_ACEOF
14178#line 14178 "configure"
14179#include "confdefs.h"
14180#include <${cf_cv_ncurses_header:-curses.h}>
14181int
14182main (void)
14183{
14184initscr(); mousemask(0,0); tigetstr((char *)0);
14185  ;
14186  return 0;
14187}
14188_ACEOF
14189rm -f conftest.$ac_objext conftest$ac_exeext
14190if { (eval echo "$as_me:14190: \"$ac_link\"") >&5
14191  (eval $ac_link) 2>&5
14192  ac_status=$?
14193  echo "$as_me:14193: \$? = $ac_status" >&5
14194  (exit $ac_status); } &&
14195         { ac_try='test -s conftest$ac_exeext'
14196  { (eval echo "$as_me:14196: \"$ac_try\"") >&5
14197  (eval $ac_try) 2>&5
14198  ac_status=$?
14199  echo "$as_me:14199: \$? = $ac_status" >&5
14200  (exit $ac_status); }; }; then
14201  if test "$cross_compiling" = yes; then
14202  cf_test_ncuconfig=maybe
14203else
14204  cat >conftest.$ac_ext <<_ACEOF
14205#line 14205 "configure"
14206#include "confdefs.h"
14207#include <${cf_cv_ncurses_header:-curses.h}>
14208					int main(void)
14209					{ char *xx = curses_version(); return (xx == 0); }
14210_ACEOF
14211rm -f conftest$ac_exeext
14212if { (eval echo "$as_me:14212: \"$ac_link\"") >&5
14213  (eval $ac_link) 2>&5
14214  ac_status=$?
14215  echo "$as_me:14215: \$? = $ac_status" >&5
14216  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14217  { (eval echo "$as_me:14217: \"$ac_try\"") >&5
14218  (eval $ac_try) 2>&5
14219  ac_status=$?
14220  echo "$as_me:14220: \$? = $ac_status" >&5
14221  (exit $ac_status); }; }; then
14222  cf_test_ncuconfig=yes
14223else
14224  echo "$as_me: program exited with status $ac_status" >&5
14225echo "$as_me: failed program was:" >&5
14226cat conftest.$ac_ext >&5
14227cf_test_ncuconfig=no
14228fi
14229rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14230fi
14231else
14232  echo "$as_me: failed program was:" >&5
14233cat conftest.$ac_ext >&5
14234cf_test_ncuconfig=no
14235fi
14236rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14237
14238			CFLAGS="$cf_save_CFLAGS"
14239			CPPFLAGS="$cf_save_CPPFLAGS"
14240			LIBS="$cf_save_LIBS"
14241
14242			if test "x$cf_test_ncuconfig" != xyes; then
14243				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
14244				cf_pkg_cflags="$cf_temp"
14245				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
14246				cf_pkg_libs="$cf_temp"
14247			fi
14248			;;
14249		esac
14250
14251cf_fix_cppflags=no
14252cf_new_cflags=
14253cf_new_cppflags=
14254cf_new_extra_cppflags=
14255
14256for cf_add_cflags in $cf_pkg_cflags
14257do
14258case $cf_fix_cppflags in
14259no)
14260	case $cf_add_cflags in
14261	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14262		case $cf_add_cflags in
14263		-D*)
14264			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14265
14266			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14267				&& test -z "${cf_tst_cflags}" \
14268				&& cf_fix_cppflags=yes
14269
14270			if test $cf_fix_cppflags = yes ; then
14271
14272	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14273	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14274
14275				continue
14276			elif test "${cf_tst_cflags}" = "\"'" ; then
14277
14278	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14279	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14280
14281				continue
14282			fi
14283			;;
14284		esac
14285		case "$CPPFLAGS" in
14286		*$cf_add_cflags)
14287			;;
14288		*)
14289			case $cf_add_cflags in
14290			-D*)
14291				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14292
14293CPPFLAGS=`echo "$CPPFLAGS" | \
14294	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14295		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14296
14297				;;
14298			esac
14299
14300	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14301	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14302
14303			;;
14304		esac
14305		;;
14306	*)
14307
14308	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14309	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14310
14311		;;
14312	esac
14313	;;
14314yes)
14315
14316	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14317	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14318
14319	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14320
14321	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14322		&& test -z "${cf_tst_cflags}" \
14323		&& cf_fix_cppflags=no
14324	;;
14325esac
14326done
14327
14328if test -n "$cf_new_cflags" ; then
14329
14330	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14331	CFLAGS="${CFLAGS}$cf_new_cflags"
14332
14333fi
14334
14335if test -n "$cf_new_cppflags" ; then
14336
14337	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14338	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14339
14340fi
14341
14342if test -n "$cf_new_extra_cppflags" ; then
14343
14344	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14345	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14346
14347fi
14348
14349cf_add_libs="$LIBS"
14350# reverse order
14351cf_add_0lib=
14352for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14353# filter duplicates
14354for cf_add_1lib in $cf_add_0lib; do
14355	for cf_add_2lib in $cf_add_libs; do
14356		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14357			cf_add_1lib=
14358			break
14359		fi
14360	done
14361	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14362done
14363LIBS="$cf_add_libs"
14364
14365		cat >conftest.$ac_ext <<_ACEOF
14366#line 14366 "configure"
14367#include "confdefs.h"
14368#include <${cf_cv_ncurses_header:-curses.h}>
14369int
14370main (void)
14371{
14372initscr(); mousemask(0,0); tigetstr((char *)0);
14373  ;
14374  return 0;
14375}
14376_ACEOF
14377rm -f conftest.$ac_objext conftest$ac_exeext
14378if { (eval echo "$as_me:14378: \"$ac_link\"") >&5
14379  (eval $ac_link) 2>&5
14380  ac_status=$?
14381  echo "$as_me:14381: \$? = $ac_status" >&5
14382  (exit $ac_status); } &&
14383         { ac_try='test -s conftest$ac_exeext'
14384  { (eval echo "$as_me:14384: \"$ac_try\"") >&5
14385  (eval $ac_try) 2>&5
14386  ac_status=$?
14387  echo "$as_me:14387: \$? = $ac_status" >&5
14388  (exit $ac_status); }; }; then
14389  if test "$cross_compiling" = yes; then
14390  cf_have_ncuconfig=maybe
14391else
14392  cat >conftest.$ac_ext <<_ACEOF
14393#line 14393 "configure"
14394#include "confdefs.h"
14395#include <${cf_cv_ncurses_header:-curses.h}>
14396				int main(void)
14397				{ char *xx = curses_version(); return (xx == 0); }
14398_ACEOF
14399rm -f conftest$ac_exeext
14400if { (eval echo "$as_me:14400: \"$ac_link\"") >&5
14401  (eval $ac_link) 2>&5
14402  ac_status=$?
14403  echo "$as_me:14403: \$? = $ac_status" >&5
14404  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
14405  { (eval echo "$as_me:14405: \"$ac_try\"") >&5
14406  (eval $ac_try) 2>&5
14407  ac_status=$?
14408  echo "$as_me:14408: \$? = $ac_status" >&5
14409  (exit $ac_status); }; }; then
14410  cf_have_ncuconfig=yes
14411else
14412  echo "$as_me: program exited with status $ac_status" >&5
14413echo "$as_me: failed program was:" >&5
14414cat conftest.$ac_ext >&5
14415cf_have_ncuconfig=no
14416fi
14417rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
14418fi
14419else
14420  echo "$as_me: failed program was:" >&5
14421cat conftest.$ac_ext >&5
14422cf_have_ncuconfig=no
14423fi
14424rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
14425		echo "$as_me:14425: result: $cf_have_ncuconfig" >&5
14426echo "${ECHO_T}$cf_have_ncuconfig" >&6
14427		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
14428		if test "$cf_have_ncuconfig" != "yes"
14429		then
14430			CPPFLAGS="$cf_save_CPPFLAGS"
14431			LIBS="$cf_save_LIBS"
14432			NCURSES_CONFIG_PKG=none
14433		else
14434
14435cat >>confdefs.h <<\EOF
14436#define NCURSES 1
14437EOF
14438
14439			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
14440
14441echo "$as_me:14441: checking for terminfo header" >&5
14442echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
14443if test "${cf_cv_term_header+set}" = set; then
14444  echo $ECHO_N "(cached) $ECHO_C" >&6
14445else
14446
14447case ${cf_cv_ncurses_header} in
14448*/ncurses.h|*/ncursesw.h)
14449	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
14450	;;
14451*)
14452	cf_term_header=term.h
14453	;;
14454esac
14455
14456for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
14457do
14458cat >conftest.$ac_ext <<_ACEOF
14459#line 14459 "configure"
14460#include "confdefs.h"
14461#include <stdio.h>
14462#include <${cf_cv_ncurses_header:-curses.h}>
14463#include <$cf_test>
14464
14465int
14466main (void)
14467{
14468int x = auto_left_margin; (void)x
14469  ;
14470  return 0;
14471}
14472_ACEOF
14473rm -f conftest.$ac_objext
14474if { (eval echo "$as_me:14474: \"$ac_compile\"") >&5
14475  (eval $ac_compile) 2>&5
14476  ac_status=$?
14477  echo "$as_me:14477: \$? = $ac_status" >&5
14478  (exit $ac_status); } &&
14479         { ac_try='test -s conftest.$ac_objext'
14480  { (eval echo "$as_me:14480: \"$ac_try\"") >&5
14481  (eval $ac_try) 2>&5
14482  ac_status=$?
14483  echo "$as_me:14483: \$? = $ac_status" >&5
14484  (exit $ac_status); }; }; then
14485
14486	cf_cv_term_header="$cf_test"
14487else
14488  echo "$as_me: failed program was:" >&5
14489cat conftest.$ac_ext >&5
14490
14491	cf_cv_term_header=unknown
14492
14493fi
14494rm -f conftest.$ac_objext conftest.$ac_ext
14495	test "$cf_cv_term_header" != unknown && break
14496done
14497
14498fi
14499echo "$as_me:14499: result: $cf_cv_term_header" >&5
14500echo "${ECHO_T}$cf_cv_term_header" >&6
14501
14502# Set definitions to allow ifdef'ing to accommodate subdirectories
14503
14504case $cf_cv_term_header in
14505*term.h)
14506
14507cat >>confdefs.h <<\EOF
14508#define HAVE_TERM_H 1
14509EOF
14510
14511	;;
14512esac
14513
14514case $cf_cv_term_header in
14515ncurses/term.h)
14516
14517cat >>confdefs.h <<\EOF
14518#define HAVE_NCURSES_TERM_H 1
14519EOF
14520
14521	;;
14522ncursesw/term.h)
14523
14524cat >>confdefs.h <<\EOF
14525#define HAVE_NCURSESW_TERM_H 1
14526EOF
14527
14528	;;
14529esac
14530
14531		fi
14532
14533	else
14534		echo "$as_me:14534: result: no" >&5
14535echo "${ECHO_T}no" >&6
14536		NCURSES_CONFIG_PKG=none
14537	fi
14538else
14539	NCURSES_CONFIG_PKG=none
14540fi
14541
14542if test "x$cf_have_ncuconfig" = "xno"; then
14543	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
14544
14545if test -n "$ac_tool_prefix"; then
14546  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14547  do
14548    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
14549set dummy $ac_tool_prefix$ac_prog; ac_word=$2
14550echo "$as_me:14550: checking for $ac_word" >&5
14551echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14552if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
14553  echo $ECHO_N "(cached) $ECHO_C" >&6
14554else
14555  if test -n "$NCURSES_CONFIG"; then
14556  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
14557else
14558  ac_save_IFS=$IFS; IFS=$ac_path_separator
14559ac_dummy="$PATH"
14560for ac_dir in $ac_dummy; do
14561  IFS=$ac_save_IFS
14562  test -z "$ac_dir" && ac_dir=.
14563  $as_executable_p "$ac_dir/$ac_word" || continue
14564ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
14565echo "$as_me:14565: found $ac_dir/$ac_word" >&5
14566break
14567done
14568
14569fi
14570fi
14571NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
14572if test -n "$NCURSES_CONFIG"; then
14573  echo "$as_me:14573: result: $NCURSES_CONFIG" >&5
14574echo "${ECHO_T}$NCURSES_CONFIG" >&6
14575else
14576  echo "$as_me:14576: result: no" >&5
14577echo "${ECHO_T}no" >&6
14578fi
14579
14580    test -n "$NCURSES_CONFIG" && break
14581  done
14582fi
14583if test -z "$NCURSES_CONFIG"; then
14584  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
14585  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
14586do
14587  # Extract the first word of "$ac_prog", so it can be a program name with args.
14588set dummy $ac_prog; ac_word=$2
14589echo "$as_me:14589: checking for $ac_word" >&5
14590echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
14591if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
14592  echo $ECHO_N "(cached) $ECHO_C" >&6
14593else
14594  if test -n "$ac_ct_NCURSES_CONFIG"; then
14595  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
14596else
14597  ac_save_IFS=$IFS; IFS=$ac_path_separator
14598ac_dummy="$PATH"
14599for ac_dir in $ac_dummy; do
14600  IFS=$ac_save_IFS
14601  test -z "$ac_dir" && ac_dir=.
14602  $as_executable_p "$ac_dir/$ac_word" || continue
14603ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
14604echo "$as_me:14604: found $ac_dir/$ac_word" >&5
14605break
14606done
14607
14608fi
14609fi
14610ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
14611if test -n "$ac_ct_NCURSES_CONFIG"; then
14612  echo "$as_me:14612: result: $ac_ct_NCURSES_CONFIG" >&5
14613echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
14614else
14615  echo "$as_me:14615: result: no" >&5
14616echo "${ECHO_T}no" >&6
14617fi
14618
14619  test -n "$ac_ct_NCURSES_CONFIG" && break
14620done
14621test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
14622
14623  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
14624fi
14625
14626	if test "$NCURSES_CONFIG" != none ; then
14627
14628cf_fix_cppflags=no
14629cf_new_cflags=
14630cf_new_cppflags=
14631cf_new_extra_cppflags=
14632
14633for cf_add_cflags in `$NCURSES_CONFIG --cflags`
14634do
14635case $cf_fix_cppflags in
14636no)
14637	case $cf_add_cflags in
14638	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
14639		case $cf_add_cflags in
14640		-D*)
14641			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
14642
14643			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14644				&& test -z "${cf_tst_cflags}" \
14645				&& cf_fix_cppflags=yes
14646
14647			if test $cf_fix_cppflags = yes ; then
14648
14649	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14650	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14651
14652				continue
14653			elif test "${cf_tst_cflags}" = "\"'" ; then
14654
14655	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14656	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14657
14658				continue
14659			fi
14660			;;
14661		esac
14662		case "$CPPFLAGS" in
14663		*$cf_add_cflags)
14664			;;
14665		*)
14666			case $cf_add_cflags in
14667			-D*)
14668				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
14669
14670CPPFLAGS=`echo "$CPPFLAGS" | \
14671	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
14672		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
14673
14674				;;
14675			esac
14676
14677	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
14678	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
14679
14680			;;
14681		esac
14682		;;
14683	*)
14684
14685	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
14686	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
14687
14688		;;
14689	esac
14690	;;
14691yes)
14692
14693	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
14694	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
14695
14696	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
14697
14698	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
14699		&& test -z "${cf_tst_cflags}" \
14700		&& cf_fix_cppflags=no
14701	;;
14702esac
14703done
14704
14705if test -n "$cf_new_cflags" ; then
14706
14707	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
14708	CFLAGS="${CFLAGS}$cf_new_cflags"
14709
14710fi
14711
14712if test -n "$cf_new_cppflags" ; then
14713
14714	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14715	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
14716
14717fi
14718
14719if test -n "$cf_new_extra_cppflags" ; then
14720
14721	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
14722	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
14723
14724fi
14725
14726cf_add_libs="$LIBS"
14727# reverse order
14728cf_add_0lib=
14729for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14730# filter duplicates
14731for cf_add_1lib in $cf_add_0lib; do
14732	for cf_add_2lib in $cf_add_libs; do
14733		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14734			cf_add_1lib=
14735			break
14736		fi
14737	done
14738	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14739done
14740LIBS="$cf_add_libs"
14741
14742		# even with config script, some packages use no-override for curses.h
14743
14744echo "$as_me:14744: checking if we have identified curses headers" >&5
14745echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
14746if test "${cf_cv_ncurses_header+set}" = set; then
14747  echo $ECHO_N "(cached) $ECHO_C" >&6
14748else
14749
14750cf_cv_ncurses_header=none
14751for cf_header in \
14752	ncurses.h ncursesw/ncurses.h \
14753	curses.h ncursesw/curses.h
14754do
14755cat >conftest.$ac_ext <<_ACEOF
14756#line 14756 "configure"
14757#include "confdefs.h"
14758#include <${cf_header}>
14759int
14760main (void)
14761{
14762initscr(); tgoto("?", 0,0)
14763  ;
14764  return 0;
14765}
14766_ACEOF
14767rm -f conftest.$ac_objext
14768if { (eval echo "$as_me:14768: \"$ac_compile\"") >&5
14769  (eval $ac_compile) 2>&5
14770  ac_status=$?
14771  echo "$as_me:14771: \$? = $ac_status" >&5
14772  (exit $ac_status); } &&
14773         { ac_try='test -s conftest.$ac_objext'
14774  { (eval echo "$as_me:14774: \"$ac_try\"") >&5
14775  (eval $ac_try) 2>&5
14776  ac_status=$?
14777  echo "$as_me:14777: \$? = $ac_status" >&5
14778  (exit $ac_status); }; }; then
14779  cf_cv_ncurses_header=$cf_header; break
14780else
14781  echo "$as_me: failed program was:" >&5
14782cat conftest.$ac_ext >&5
14783fi
14784rm -f conftest.$ac_objext conftest.$ac_ext
14785done
14786
14787fi
14788echo "$as_me:14788: result: $cf_cv_ncurses_header" >&5
14789echo "${ECHO_T}$cf_cv_ncurses_header" >&6
14790
14791if test "$cf_cv_ncurses_header" = none ; then
14792	{ { echo "$as_me:14792: error: No curses header-files found" >&5
14793echo "$as_me: error: No curses header-files found" >&2;}
14794   { (exit 1); exit 1; }; }
14795fi
14796
14797# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
14798
14799for ac_header in $cf_cv_ncurses_header
14800do
14801as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14802echo "$as_me:14802: checking for $ac_header" >&5
14803echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14804if eval "test \"\${$as_ac_Header+set}\" = set"; then
14805  echo $ECHO_N "(cached) $ECHO_C" >&6
14806else
14807  cat >conftest.$ac_ext <<_ACEOF
14808#line 14808 "configure"
14809#include "confdefs.h"
14810#include <$ac_header>
14811_ACEOF
14812if { (eval echo "$as_me:14812: \"$ac_cpp conftest.$ac_ext\"") >&5
14813  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
14814  ac_status=$?
14815  egrep -v '^ *\+' conftest.er1 >conftest.err
14816  rm -f conftest.er1
14817  cat conftest.err >&5
14818  echo "$as_me:14818: \$? = $ac_status" >&5
14819  (exit $ac_status); } >/dev/null; then
14820  if test -s conftest.err; then
14821    ac_cpp_err=$ac_c_preproc_warn_flag
14822  else
14823    ac_cpp_err=
14824  fi
14825else
14826  ac_cpp_err=yes
14827fi
14828if test -z "$ac_cpp_err"; then
14829  eval "$as_ac_Header=yes"
14830else
14831  echo "$as_me: failed program was:" >&5
14832  cat conftest.$ac_ext >&5
14833  eval "$as_ac_Header=no"
14834fi
14835rm -f conftest.err conftest.$ac_ext
14836fi
14837echo "$as_me:14837: result: `eval echo '${'$as_ac_Header'}'`" >&5
14838echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
14839if test `eval echo '${'$as_ac_Header'}'` = yes; then
14840  cat >>confdefs.h <<EOF
14841#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14842EOF
14843
14844fi
14845done
14846
14847cat >>confdefs.h <<\EOF
14848#define NCURSES 1
14849EOF
14850
14851cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
14852
14853		cat >>confdefs.h <<EOF
14854#define $cf_nculib_ROOT 1
14855EOF
14856
14857				cf_cv_ncurses_version=`$NCURSES_CONFIG --version`
14858
14859	else
14860
14861cf_ncuhdr_root=ncursesw
14862
14863test -n "$cf_cv_curses_dir" && \
14864test "$cf_cv_curses_dir" != "no" && { \
14865
14866if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
14867  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
14868  do
14869	while test $cf_add_incdir != /usr/include
14870	do
14871	  if test -d $cf_add_incdir
14872	  then
14873		cf_have_incdir=no
14874		if test -n "$CFLAGS$CPPFLAGS" ; then
14875		  # a loop is needed to ensure we can add subdirs of existing dirs
14876		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14877			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14878			  cf_have_incdir=yes; break
14879			fi
14880		  done
14881		fi
14882
14883		if test "$cf_have_incdir" = no ; then
14884		  if test "$cf_add_incdir" = /usr/local/include ; then
14885			if test "$GCC" = yes
14886			then
14887			  cf_save_CPPFLAGS=$CPPFLAGS
14888
14889	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14890	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14891
14892			  cat >conftest.$ac_ext <<_ACEOF
14893#line 14893 "configure"
14894#include "confdefs.h"
14895#include <stdio.h>
14896int
14897main (void)
14898{
14899printf("Hello")
14900  ;
14901  return 0;
14902}
14903_ACEOF
14904rm -f conftest.$ac_objext
14905if { (eval echo "$as_me:14905: \"$ac_compile\"") >&5
14906  (eval $ac_compile) 2>&5
14907  ac_status=$?
14908  echo "$as_me:14908: \$? = $ac_status" >&5
14909  (exit $ac_status); } &&
14910         { ac_try='test -s conftest.$ac_objext'
14911  { (eval echo "$as_me:14911: \"$ac_try\"") >&5
14912  (eval $ac_try) 2>&5
14913  ac_status=$?
14914  echo "$as_me:14914: \$? = $ac_status" >&5
14915  (exit $ac_status); }; }; then
14916  :
14917else
14918  echo "$as_me: failed program was:" >&5
14919cat conftest.$ac_ext >&5
14920cf_have_incdir=yes
14921fi
14922rm -f conftest.$ac_objext conftest.$ac_ext
14923			  CPPFLAGS=$cf_save_CPPFLAGS
14924			fi
14925		  fi
14926		fi
14927
14928		if test "$cf_have_incdir" = no ; then
14929		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14930
14931echo "${as_me:-configure}:14931: testing adding $cf_add_incdir to include-path ..." 1>&5
14932
14933		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14934
14935		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
14936		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14937		  cf_add_incdir="$cf_top_incdir"
14938		else
14939		  break
14940		fi
14941	  else
14942		break
14943	  fi
14944	done
14945  done
14946fi
14947
14948}
14949
14950echo "$as_me:14950: checking for $cf_ncuhdr_root header in include-path" >&5
14951echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
14952if test "${cf_cv_ncurses_h+set}" = set; then
14953  echo $ECHO_N "(cached) $ECHO_C" >&6
14954else
14955
14956	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
14957	( test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw ) && cf_header_list="$cf_header_list curses.h ncurses.h"
14958	for cf_header in $cf_header_list
14959	do
14960
14961	cat >conftest.$ac_ext <<_ACEOF
14962#line 14962 "configure"
14963#include "confdefs.h"
14964
14965#define _XOPEN_SOURCE_EXTENDED
14966#undef  HAVE_LIBUTF8_H	/* in case we used CF_UTF8_LIB */
14967#define HAVE_LIBUTF8_H	/* to force ncurses' header file to use cchar_t */
14968
14969#include <$cf_header>
14970int
14971main (void)
14972{
14973
14974#ifdef NCURSES_VERSION
14975
14976#ifndef WACS_BSSB
14977	make an error
14978#endif
14979
14980printf("%s\n", NCURSES_VERSION);
14981#else
14982#ifdef __NCURSES_H
14983printf("old\n");
14984#else
14985	make an error
14986#endif
14987#endif
14988
14989  ;
14990  return 0;
14991}
14992_ACEOF
14993rm -f conftest.$ac_objext
14994if { (eval echo "$as_me:14994: \"$ac_compile\"") >&5
14995  (eval $ac_compile) 2>&5
14996  ac_status=$?
14997  echo "$as_me:14997: \$? = $ac_status" >&5
14998  (exit $ac_status); } &&
14999         { ac_try='test -s conftest.$ac_objext'
15000  { (eval echo "$as_me:15000: \"$ac_try\"") >&5
15001  (eval $ac_try) 2>&5
15002  ac_status=$?
15003  echo "$as_me:15003: \$? = $ac_status" >&5
15004  (exit $ac_status); }; }; then
15005  cf_cv_ncurses_h=$cf_header
15006
15007else
15008  echo "$as_me: failed program was:" >&5
15009cat conftest.$ac_ext >&5
15010cf_cv_ncurses_h=no
15011fi
15012rm -f conftest.$ac_objext conftest.$ac_ext
15013
15014		test "$cf_cv_ncurses_h" != no && break
15015	done
15016
15017fi
15018echo "$as_me:15018: result: $cf_cv_ncurses_h" >&5
15019echo "${ECHO_T}$cf_cv_ncurses_h" >&6
15020
15021if test "$cf_cv_ncurses_h" != no ; then
15022	cf_cv_ncurses_header=$cf_cv_ncurses_h
15023else
15024
15025echo "$as_me:15025: checking for $cf_ncuhdr_root include-path" >&5
15026echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
15027if test "${cf_cv_ncurses_h2+set}" = set; then
15028  echo $ECHO_N "(cached) $ECHO_C" >&6
15029else
15030
15031	test -n "$verbose" && echo
15032
15033cf_search=
15034
15035# collect the current set of include-directories from compiler flags
15036cf_header_path_list=""
15037if test -n "${CFLAGS}${CPPFLAGS}" ; then
15038	for cf_header_path in $CPPFLAGS $CFLAGS
15039	do
15040		case $cf_header_path in
15041		-I*)
15042			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
15043
15044test "x$cf_header_path" != "xNONE" && \
15045test -d "$cf_header_path" && \
15046 {
15047	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
15048	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
15049	test -d $cf_header_path/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
15050	test -d $cf_header_path/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
15051	test -d $cf_header_path/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
15052	test -d $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15053}
15054
15055			cf_header_path_list="$cf_header_path_list $cf_search"
15056			;;
15057		esac
15058	done
15059fi
15060
15061# add the variations for the package we are looking for
15062
15063cf_search=
15064
15065test "x$prefix" != "xNONE" && \
15066test -d "$prefix" && \
15067 {
15068	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
15069	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
15070	test -d $prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
15071	test -d $prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
15072	test -d $prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
15073	test -d $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15074}
15075
15076for cf_subdir_prefix in \
15077	/usr \
15078	/usr/local \
15079	/usr/pkg \
15080	/opt \
15081	/opt/local \
15082	$HOME
15083do
15084
15085test "x$cf_subdir_prefix" != "x$prefix" && \
15086test -d "$cf_subdir_prefix" && \
15087(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
15088	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
15089	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
15090	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
15091	test -d $cf_subdir_prefix/include/$cf_ncuhdr_root/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
15092	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
15093	test -d $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
15094}
15095
15096done
15097
15098test "$includedir" != NONE && \
15099test "$includedir" != "/usr/include" && \
15100test -d "$includedir" && {
15101	test -d $includedir &&    cf_search="$cf_search $includedir"
15102	test -d $includedir/$cf_ncuhdr_root && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
15103}
15104
15105test "$oldincludedir" != NONE && \
15106test "$oldincludedir" != "/usr/include" && \
15107test -d "$oldincludedir" && {
15108	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
15109	test -d $oldincludedir/$cf_ncuhdr_root && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
15110}
15111
15112cf_search="$cf_search $cf_header_path_list"
15113
15114	test -n "$verbose" && echo search path $cf_search
15115	cf_save2_CPPFLAGS="$CPPFLAGS"
15116	for cf_incdir in $cf_search
15117	do
15118
15119if test -n "$cf_incdir" ; then
15120  for cf_add_incdir in $cf_incdir
15121  do
15122	while test $cf_add_incdir != /usr/include
15123	do
15124	  if test -d $cf_add_incdir
15125	  then
15126		cf_have_incdir=no
15127		if test -n "$CFLAGS$CPPFLAGS" ; then
15128		  # a loop is needed to ensure we can add subdirs of existing dirs
15129		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15130			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15131			  cf_have_incdir=yes; break
15132			fi
15133		  done
15134		fi
15135
15136		if test "$cf_have_incdir" = no ; then
15137		  if test "$cf_add_incdir" = /usr/local/include ; then
15138			if test "$GCC" = yes
15139			then
15140			  cf_save_CPPFLAGS=$CPPFLAGS
15141
15142	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15143	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15144
15145			  cat >conftest.$ac_ext <<_ACEOF
15146#line 15146 "configure"
15147#include "confdefs.h"
15148#include <stdio.h>
15149int
15150main (void)
15151{
15152printf("Hello")
15153  ;
15154  return 0;
15155}
15156_ACEOF
15157rm -f conftest.$ac_objext
15158if { (eval echo "$as_me:15158: \"$ac_compile\"") >&5
15159  (eval $ac_compile) 2>&5
15160  ac_status=$?
15161  echo "$as_me:15161: \$? = $ac_status" >&5
15162  (exit $ac_status); } &&
15163         { ac_try='test -s conftest.$ac_objext'
15164  { (eval echo "$as_me:15164: \"$ac_try\"") >&5
15165  (eval $ac_try) 2>&5
15166  ac_status=$?
15167  echo "$as_me:15167: \$? = $ac_status" >&5
15168  (exit $ac_status); }; }; then
15169  :
15170else
15171  echo "$as_me: failed program was:" >&5
15172cat conftest.$ac_ext >&5
15173cf_have_incdir=yes
15174fi
15175rm -f conftest.$ac_objext conftest.$ac_ext
15176			  CPPFLAGS=$cf_save_CPPFLAGS
15177			fi
15178		  fi
15179		fi
15180
15181		if test "$cf_have_incdir" = no ; then
15182		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15183
15184echo "${as_me:-configure}:15184: testing adding $cf_add_incdir to include-path ..." 1>&5
15185
15186		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15187
15188		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15189		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15190		  cf_add_incdir="$cf_top_incdir"
15191		else
15192		  break
15193		fi
15194	  else
15195		break
15196	  fi
15197	done
15198  done
15199fi
15200
15201		for cf_header in \
15202			ncurses.h \
15203			curses.h
15204		do
15205
15206	cat >conftest.$ac_ext <<_ACEOF
15207#line 15207 "configure"
15208#include "confdefs.h"
15209
15210#include <$cf_header>
15211int
15212main (void)
15213{
15214
15215#ifdef NCURSES_VERSION
15216
15217printf("%s\n", NCURSES_VERSION);
15218#else
15219#ifdef __NCURSES_H
15220printf("old\n");
15221#else
15222	make an error
15223#endif
15224#endif
15225
15226  ;
15227  return 0;
15228}
15229_ACEOF
15230rm -f conftest.$ac_objext
15231if { (eval echo "$as_me:15231: \"$ac_compile\"") >&5
15232  (eval $ac_compile) 2>&5
15233  ac_status=$?
15234  echo "$as_me:15234: \$? = $ac_status" >&5
15235  (exit $ac_status); } &&
15236         { ac_try='test -s conftest.$ac_objext'
15237  { (eval echo "$as_me:15237: \"$ac_try\"") >&5
15238  (eval $ac_try) 2>&5
15239  ac_status=$?
15240  echo "$as_me:15240: \$? = $ac_status" >&5
15241  (exit $ac_status); }; }; then
15242  cf_cv_ncurses_h2=$cf_header
15243
15244else
15245  echo "$as_me: failed program was:" >&5
15246cat conftest.$ac_ext >&5
15247cf_cv_ncurses_h2=no
15248fi
15249rm -f conftest.$ac_objext conftest.$ac_ext
15250
15251			if test "$cf_cv_ncurses_h2" != no ; then
15252				cf_cv_ncurses_h2=$cf_incdir/$cf_header
15253				test -n "$verbose" && echo $ac_n "	... found $ac_c" 1>&6
15254				break
15255			fi
15256			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
15257		done
15258		CPPFLAGS="$cf_save2_CPPFLAGS"
15259		test "$cf_cv_ncurses_h2" != no && break
15260	done
15261	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:15261: error: not found" >&5
15262echo "$as_me: error: not found" >&2;}
15263   { (exit 1); exit 1; }; }
15264
15265fi
15266echo "$as_me:15266: result: $cf_cv_ncurses_h2" >&5
15267echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
15268
15269	cf_1st_incdir=`echo $cf_cv_ncurses_h2 | sed -e 's%/[^/]*$%%'`
15270	cf_cv_ncurses_header=`basename $cf_cv_ncurses_h2`
15271	if test `basename $cf_1st_incdir` = $cf_ncuhdr_root ; then
15272		cf_cv_ncurses_header=$cf_ncuhdr_root/$cf_cv_ncurses_header
15273	fi
15274
15275if test -n "$cf_1st_incdir" ; then
15276  for cf_add_incdir in $cf_1st_incdir
15277  do
15278	while test $cf_add_incdir != /usr/include
15279	do
15280	  if test -d $cf_add_incdir
15281	  then
15282		cf_have_incdir=no
15283		if test -n "$CFLAGS$CPPFLAGS" ; then
15284		  # a loop is needed to ensure we can add subdirs of existing dirs
15285		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
15286			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
15287			  cf_have_incdir=yes; break
15288			fi
15289		  done
15290		fi
15291
15292		if test "$cf_have_incdir" = no ; then
15293		  if test "$cf_add_incdir" = /usr/local/include ; then
15294			if test "$GCC" = yes
15295			then
15296			  cf_save_CPPFLAGS=$CPPFLAGS
15297
15298	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
15299	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
15300
15301			  cat >conftest.$ac_ext <<_ACEOF
15302#line 15302 "configure"
15303#include "confdefs.h"
15304#include <stdio.h>
15305int
15306main (void)
15307{
15308printf("Hello")
15309  ;
15310  return 0;
15311}
15312_ACEOF
15313rm -f conftest.$ac_objext
15314if { (eval echo "$as_me:15314: \"$ac_compile\"") >&5
15315  (eval $ac_compile) 2>&5
15316  ac_status=$?
15317  echo "$as_me:15317: \$? = $ac_status" >&5
15318  (exit $ac_status); } &&
15319         { ac_try='test -s conftest.$ac_objext'
15320  { (eval echo "$as_me:15320: \"$ac_try\"") >&5
15321  (eval $ac_try) 2>&5
15322  ac_status=$?
15323  echo "$as_me:15323: \$? = $ac_status" >&5
15324  (exit $ac_status); }; }; then
15325  :
15326else
15327  echo "$as_me: failed program was:" >&5
15328cat conftest.$ac_ext >&5
15329cf_have_incdir=yes
15330fi
15331rm -f conftest.$ac_objext conftest.$ac_ext
15332			  CPPFLAGS=$cf_save_CPPFLAGS
15333			fi
15334		  fi
15335		fi
15336
15337		if test "$cf_have_incdir" = no ; then
15338		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
15339
15340echo "${as_me:-configure}:15340: testing adding $cf_add_incdir to include-path ..." 1>&5
15341
15342		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
15343
15344		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
15345		  test "$cf_top_incdir" = "$cf_add_incdir" && break
15346		  cf_add_incdir="$cf_top_incdir"
15347		else
15348		  break
15349		fi
15350	  else
15351		break
15352	  fi
15353	done
15354  done
15355fi
15356
15357fi
15358
15359# Set definitions to allow ifdef'ing for ncurses.h
15360
15361case $cf_cv_ncurses_header in
15362*ncurses.h)
15363
15364cat >>confdefs.h <<\EOF
15365#define HAVE_NCURSES_H 1
15366EOF
15367
15368	;;
15369esac
15370
15371case $cf_cv_ncurses_header in
15372ncurses/curses.h|ncurses/ncurses.h)
15373
15374cat >>confdefs.h <<\EOF
15375#define HAVE_NCURSES_NCURSES_H 1
15376EOF
15377
15378	;;
15379ncursesw/curses.h|ncursesw/ncurses.h)
15380
15381cat >>confdefs.h <<\EOF
15382#define HAVE_NCURSESW_NCURSES_H 1
15383EOF
15384
15385	;;
15386esac
15387
15388echo "$as_me:15388: checking for terminfo header" >&5
15389echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
15390if test "${cf_cv_term_header+set}" = set; then
15391  echo $ECHO_N "(cached) $ECHO_C" >&6
15392else
15393
15394case ${cf_cv_ncurses_header} in
15395*/ncurses.h|*/ncursesw.h)
15396	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
15397	;;
15398*)
15399	cf_term_header=term.h
15400	;;
15401esac
15402
15403for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
15404do
15405cat >conftest.$ac_ext <<_ACEOF
15406#line 15406 "configure"
15407#include "confdefs.h"
15408#include <stdio.h>
15409#include <${cf_cv_ncurses_header:-curses.h}>
15410#include <$cf_test>
15411
15412int
15413main (void)
15414{
15415int x = auto_left_margin; (void)x
15416  ;
15417  return 0;
15418}
15419_ACEOF
15420rm -f conftest.$ac_objext
15421if { (eval echo "$as_me:15421: \"$ac_compile\"") >&5
15422  (eval $ac_compile) 2>&5
15423  ac_status=$?
15424  echo "$as_me:15424: \$? = $ac_status" >&5
15425  (exit $ac_status); } &&
15426         { ac_try='test -s conftest.$ac_objext'
15427  { (eval echo "$as_me:15427: \"$ac_try\"") >&5
15428  (eval $ac_try) 2>&5
15429  ac_status=$?
15430  echo "$as_me:15430: \$? = $ac_status" >&5
15431  (exit $ac_status); }; }; then
15432
15433	cf_cv_term_header="$cf_test"
15434else
15435  echo "$as_me: failed program was:" >&5
15436cat conftest.$ac_ext >&5
15437
15438	cf_cv_term_header=unknown
15439
15440fi
15441rm -f conftest.$ac_objext conftest.$ac_ext
15442	test "$cf_cv_term_header" != unknown && break
15443done
15444
15445fi
15446echo "$as_me:15446: result: $cf_cv_term_header" >&5
15447echo "${ECHO_T}$cf_cv_term_header" >&6
15448
15449# Set definitions to allow ifdef'ing to accommodate subdirectories
15450
15451case $cf_cv_term_header in
15452*term.h)
15453
15454cat >>confdefs.h <<\EOF
15455#define HAVE_TERM_H 1
15456EOF
15457
15458	;;
15459esac
15460
15461case $cf_cv_term_header in
15462ncurses/term.h)
15463
15464cat >>confdefs.h <<\EOF
15465#define HAVE_NCURSES_TERM_H 1
15466EOF
15467
15468	;;
15469ncursesw/term.h)
15470
15471cat >>confdefs.h <<\EOF
15472#define HAVE_NCURSESW_TERM_H 1
15473EOF
15474
15475	;;
15476esac
15477
15478# some applications need this, but should check for NCURSES_VERSION
15479
15480cat >>confdefs.h <<\EOF
15481#define NCURSES 1
15482EOF
15483
15484echo "$as_me:15484: checking for ncurses version" >&5
15485echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
15486if test "${cf_cv_ncurses_version+set}" = set; then
15487  echo $ECHO_N "(cached) $ECHO_C" >&6
15488else
15489
15490	cf_cv_ncurses_version=no
15491	cf_tempfile=out$$
15492	rm -f $cf_tempfile
15493	if test "$cross_compiling" = yes; then
15494
15495	# This will not work if the preprocessor splits the line after the
15496	# Autoconf token.  The 'unproto' program does that.
15497	cat > conftest.$ac_ext <<EOF
15498#include <${cf_cv_ncurses_header:-curses.h}>
15499#undef Autoconf
15500#ifdef NCURSES_VERSION
15501Autoconf NCURSES_VERSION
15502#else
15503#ifdef __NCURSES_H
15504Autoconf "old"
15505#endif
15506;
15507#endif
15508EOF
15509	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
15510	{ (eval echo "$as_me:15510: \"$cf_try\"") >&5
15511  (eval $cf_try) 2>&5
15512  ac_status=$?
15513  echo "$as_me:15513: \$? = $ac_status" >&5
15514  (exit $ac_status); }
15515	if test -f conftest.out ; then
15516		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
15517		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
15518		rm -f conftest.out
15519	fi
15520
15521else
15522  cat >conftest.$ac_ext <<_ACEOF
15523#line 15523 "configure"
15524#include "confdefs.h"
15525
15526#include <${cf_cv_ncurses_header:-curses.h}>
15527#include <stdio.h>
15528int main(void)
15529{
15530	FILE *fp = fopen("$cf_tempfile", "w");
15531#ifdef NCURSES_VERSION
15532# ifdef NCURSES_VERSION_PATCH
15533	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
15534# else
15535	fprintf(fp, "%s\n", NCURSES_VERSION);
15536# endif
15537#else
15538# ifdef __NCURSES_H
15539	fprintf(fp, "old\n");
15540# else
15541	make an error
15542# endif
15543#endif
15544	${cf_cv_main_return:-return}(0);
15545}
15546_ACEOF
15547rm -f conftest$ac_exeext
15548if { (eval echo "$as_me:15548: \"$ac_link\"") >&5
15549  (eval $ac_link) 2>&5
15550  ac_status=$?
15551  echo "$as_me:15551: \$? = $ac_status" >&5
15552  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
15553  { (eval echo "$as_me:15553: \"$ac_try\"") >&5
15554  (eval $ac_try) 2>&5
15555  ac_status=$?
15556  echo "$as_me:15556: \$? = $ac_status" >&5
15557  (exit $ac_status); }; }; then
15558
15559	cf_cv_ncurses_version=`cat $cf_tempfile`
15560else
15561  echo "$as_me: program exited with status $ac_status" >&5
15562echo "$as_me: failed program was:" >&5
15563cat conftest.$ac_ext >&5
15564fi
15565rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
15566fi
15567	rm -f $cf_tempfile
15568
15569fi
15570echo "$as_me:15570: result: $cf_cv_ncurses_version" >&5
15571echo "${ECHO_T}$cf_cv_ncurses_version" >&6
15572test "$cf_cv_ncurses_version" = no ||
15573cat >>confdefs.h <<\EOF
15574#define NCURSES 1
15575EOF
15576
15577cf_nculib_root=ncursesw
15578	# This works, except for the special case where we find gpm, but
15579	# ncurses is in a nonstandard location via $LIBS, and we really want
15580	# to link gpm.
15581cf_ncurses_LIBS=""
15582cf_ncurses_SAVE="$LIBS"
15583echo "$as_me:15583: checking for Gpm_Open in -lgpm" >&5
15584echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
15585if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
15586  echo $ECHO_N "(cached) $ECHO_C" >&6
15587else
15588  ac_check_lib_save_LIBS=$LIBS
15589LIBS="-lgpm  $LIBS"
15590cat >conftest.$ac_ext <<_ACEOF
15591#line 15591 "configure"
15592#include "confdefs.h"
15593
15594/* Override any gcc2 internal prototype to avoid an error.  */
15595#ifdef __cplusplus
15596extern "C"
15597#endif
15598/* We use char because int might match the return type of a gcc2
15599   builtin and then its argument prototype would still apply.  */
15600char Gpm_Open ();
15601int
15602main (void)
15603{
15604Gpm_Open ();
15605  ;
15606  return 0;
15607}
15608_ACEOF
15609rm -f conftest.$ac_objext conftest$ac_exeext
15610if { (eval echo "$as_me:15610: \"$ac_link\"") >&5
15611  (eval $ac_link) 2>&5
15612  ac_status=$?
15613  echo "$as_me:15613: \$? = $ac_status" >&5
15614  (exit $ac_status); } &&
15615         { ac_try='test -s conftest$ac_exeext'
15616  { (eval echo "$as_me:15616: \"$ac_try\"") >&5
15617  (eval $ac_try) 2>&5
15618  ac_status=$?
15619  echo "$as_me:15619: \$? = $ac_status" >&5
15620  (exit $ac_status); }; }; then
15621  ac_cv_lib_gpm_Gpm_Open=yes
15622else
15623  echo "$as_me: failed program was:" >&5
15624cat conftest.$ac_ext >&5
15625ac_cv_lib_gpm_Gpm_Open=no
15626fi
15627rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15628LIBS=$ac_check_lib_save_LIBS
15629fi
15630echo "$as_me:15630: result: $ac_cv_lib_gpm_Gpm_Open" >&5
15631echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
15632if test $ac_cv_lib_gpm_Gpm_Open = yes; then
15633  echo "$as_me:15633: checking for initscr in -lgpm" >&5
15634echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
15635if test "${ac_cv_lib_gpm_initscr+set}" = set; then
15636  echo $ECHO_N "(cached) $ECHO_C" >&6
15637else
15638  ac_check_lib_save_LIBS=$LIBS
15639LIBS="-lgpm  $LIBS"
15640cat >conftest.$ac_ext <<_ACEOF
15641#line 15641 "configure"
15642#include "confdefs.h"
15643
15644/* Override any gcc2 internal prototype to avoid an error.  */
15645#ifdef __cplusplus
15646extern "C"
15647#endif
15648/* We use char because int might match the return type of a gcc2
15649   builtin and then its argument prototype would still apply.  */
15650char initscr ();
15651int
15652main (void)
15653{
15654initscr ();
15655  ;
15656  return 0;
15657}
15658_ACEOF
15659rm -f conftest.$ac_objext conftest$ac_exeext
15660if { (eval echo "$as_me:15660: \"$ac_link\"") >&5
15661  (eval $ac_link) 2>&5
15662  ac_status=$?
15663  echo "$as_me:15663: \$? = $ac_status" >&5
15664  (exit $ac_status); } &&
15665         { ac_try='test -s conftest$ac_exeext'
15666  { (eval echo "$as_me:15666: \"$ac_try\"") >&5
15667  (eval $ac_try) 2>&5
15668  ac_status=$?
15669  echo "$as_me:15669: \$? = $ac_status" >&5
15670  (exit $ac_status); }; }; then
15671  ac_cv_lib_gpm_initscr=yes
15672else
15673  echo "$as_me: failed program was:" >&5
15674cat conftest.$ac_ext >&5
15675ac_cv_lib_gpm_initscr=no
15676fi
15677rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15678LIBS=$ac_check_lib_save_LIBS
15679fi
15680echo "$as_me:15680: result: $ac_cv_lib_gpm_initscr" >&5
15681echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
15682if test $ac_cv_lib_gpm_initscr = yes; then
15683  LIBS="$cf_ncurses_SAVE"
15684else
15685  cf_ncurses_LIBS="-lgpm"
15686fi
15687
15688fi
15689
15690case $host_os in
15691XXXfreebsd*)
15692	# This is only necessary if you are linking against an obsolete
15693	# version of ncurses (but it should do no harm, since it's static).
15694	if test "$cf_nculib_root" = ncurses ; then
15695		echo "$as_me:15695: checking for tgoto in -lmytinfo" >&5
15696echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
15697if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
15698  echo $ECHO_N "(cached) $ECHO_C" >&6
15699else
15700  ac_check_lib_save_LIBS=$LIBS
15701LIBS="-lmytinfo  $LIBS"
15702cat >conftest.$ac_ext <<_ACEOF
15703#line 15703 "configure"
15704#include "confdefs.h"
15705
15706/* Override any gcc2 internal prototype to avoid an error.  */
15707#ifdef __cplusplus
15708extern "C"
15709#endif
15710/* We use char because int might match the return type of a gcc2
15711   builtin and then its argument prototype would still apply.  */
15712char tgoto ();
15713int
15714main (void)
15715{
15716tgoto ();
15717  ;
15718  return 0;
15719}
15720_ACEOF
15721rm -f conftest.$ac_objext conftest$ac_exeext
15722if { (eval echo "$as_me:15722: \"$ac_link\"") >&5
15723  (eval $ac_link) 2>&5
15724  ac_status=$?
15725  echo "$as_me:15725: \$? = $ac_status" >&5
15726  (exit $ac_status); } &&
15727         { ac_try='test -s conftest$ac_exeext'
15728  { (eval echo "$as_me:15728: \"$ac_try\"") >&5
15729  (eval $ac_try) 2>&5
15730  ac_status=$?
15731  echo "$as_me:15731: \$? = $ac_status" >&5
15732  (exit $ac_status); }; }; then
15733  ac_cv_lib_mytinfo_tgoto=yes
15734else
15735  echo "$as_me: failed program was:" >&5
15736cat conftest.$ac_ext >&5
15737ac_cv_lib_mytinfo_tgoto=no
15738fi
15739rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15740LIBS=$ac_check_lib_save_LIBS
15741fi
15742echo "$as_me:15742: result: $ac_cv_lib_mytinfo_tgoto" >&5
15743echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
15744if test $ac_cv_lib_mytinfo_tgoto = yes; then
15745  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
15746fi
15747
15748	fi
15749	;;
15750esac
15751
15752cf_add_libs="$LIBS"
15753# reverse order
15754cf_add_0lib=
15755for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15756# filter duplicates
15757for cf_add_1lib in $cf_add_0lib; do
15758	for cf_add_2lib in $cf_add_libs; do
15759		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15760			cf_add_1lib=
15761			break
15762		fi
15763	done
15764	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15765done
15766LIBS="$cf_add_libs"
15767
15768if ( test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no" )
15769then
15770
15771cf_add_libs="$LIBS"
15772# reverse order
15773cf_add_0lib=
15774for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15775# filter duplicates
15776for cf_add_1lib in $cf_add_0lib; do
15777	for cf_add_2lib in $cf_add_libs; do
15778		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15779			cf_add_1lib=
15780			break
15781		fi
15782	done
15783	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15784done
15785LIBS="$cf_add_libs"
15786
15787else
15788
15789	eval 'cf_cv_have_lib_'$cf_nculib_root'=no'
15790	cf_libdir=""
15791	echo "$as_me:15791: checking for initscr" >&5
15792echo $ECHO_N "checking for initscr... $ECHO_C" >&6
15793if test "${ac_cv_func_initscr+set}" = set; then
15794  echo $ECHO_N "(cached) $ECHO_C" >&6
15795else
15796  cat >conftest.$ac_ext <<_ACEOF
15797#line 15797 "configure"
15798#include "confdefs.h"
15799#define initscr autoconf_temporary
15800#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15801#undef initscr
15802
15803#ifdef __cplusplus
15804extern "C"
15805#endif
15806
15807/* We use char because int might match the return type of a gcc2
15808   builtin and then its argument prototype would still apply.  */
15809char initscr (void);
15810
15811int
15812main (void)
15813{
15814
15815/* The GNU C library defines stubs for functions which it implements
15816    to always fail with ENOSYS.  Some functions are actually named
15817    something starting with __ and the normal name is an alias.  */
15818#if defined (__stub_initscr) || defined (__stub___initscr)
15819#error found stub for initscr
15820#endif
15821
15822	return initscr ();
15823  ;
15824  return 0;
15825}
15826_ACEOF
15827rm -f conftest.$ac_objext conftest$ac_exeext
15828if { (eval echo "$as_me:15828: \"$ac_link\"") >&5
15829  (eval $ac_link) 2>&5
15830  ac_status=$?
15831  echo "$as_me:15831: \$? = $ac_status" >&5
15832  (exit $ac_status); } &&
15833         { ac_try='test -s conftest$ac_exeext'
15834  { (eval echo "$as_me:15834: \"$ac_try\"") >&5
15835  (eval $ac_try) 2>&5
15836  ac_status=$?
15837  echo "$as_me:15837: \$? = $ac_status" >&5
15838  (exit $ac_status); }; }; then
15839  ac_cv_func_initscr=yes
15840else
15841  echo "$as_me: failed program was:" >&5
15842cat conftest.$ac_ext >&5
15843ac_cv_func_initscr=no
15844fi
15845rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15846fi
15847echo "$as_me:15847: result: $ac_cv_func_initscr" >&5
15848echo "${ECHO_T}$ac_cv_func_initscr" >&6
15849if test $ac_cv_func_initscr = yes; then
15850  eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15851else
15852
15853		cf_save_LIBS="$LIBS"
15854		echo "$as_me:15854: checking for initscr in -l$cf_nculib_root" >&5
15855echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
15856		LIBS="-l$cf_nculib_root $LIBS"
15857		cat >conftest.$ac_ext <<_ACEOF
15858#line 15858 "configure"
15859#include "confdefs.h"
15860#include <${cf_cv_ncurses_header:-curses.h}>
15861int
15862main (void)
15863{
15864initscr()
15865  ;
15866  return 0;
15867}
15868_ACEOF
15869rm -f conftest.$ac_objext conftest$ac_exeext
15870if { (eval echo "$as_me:15870: \"$ac_link\"") >&5
15871  (eval $ac_link) 2>&5
15872  ac_status=$?
15873  echo "$as_me:15873: \$? = $ac_status" >&5
15874  (exit $ac_status); } &&
15875         { ac_try='test -s conftest$ac_exeext'
15876  { (eval echo "$as_me:15876: \"$ac_try\"") >&5
15877  (eval $ac_try) 2>&5
15878  ac_status=$?
15879  echo "$as_me:15879: \$? = $ac_status" >&5
15880  (exit $ac_status); }; }; then
15881  echo "$as_me:15881: result: yes" >&5
15882echo "${ECHO_T}yes" >&6
15883			 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15884
15885else
15886  echo "$as_me: failed program was:" >&5
15887cat conftest.$ac_ext >&5
15888echo "$as_me:15888: result: no" >&5
15889echo "${ECHO_T}no" >&6
15890
15891cf_search=
15892cf_library_path_list=""
15893if test -n "${LDFLAGS}${LIBS}" ; then
15894	for cf_library_path in $LDFLAGS $LIBS
15895	do
15896		case $cf_library_path in
15897		-L*)
15898			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
15899
15900test "x$cf_library_path" != "xNONE" && \
15901test -d "$cf_library_path" && \
15902 {
15903	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
15904	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
15905	test -d $cf_library_path/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
15906	test -d $cf_library_path/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
15907	test -d $cf_library_path/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
15908	test -d $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib/$cf_nculib_root"
15909}
15910
15911			cf_library_path_list="$cf_library_path_list $cf_search"
15912			;;
15913		esac
15914	done
15915fi
15916
15917cf_search=
15918
15919test "x$prefix" != "xNONE" && \
15920test -d "$prefix" && \
15921 {
15922	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
15923	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
15924	test -d $prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
15925	test -d $prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
15926	test -d $prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
15927	test -d $prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
15928}
15929
15930for cf_subdir_prefix in \
15931	/usr \
15932	/usr/local \
15933	/usr/pkg \
15934	/opt \
15935	/opt/local \
15936	$HOME
15937do
15938
15939test "x$cf_subdir_prefix" != "x$prefix" && \
15940test -d "$cf_subdir_prefix" && \
15941(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
15942	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
15943	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
15944	test -d $cf_subdir_prefix/lib/$cf_nculib_root &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
15945	test -d $cf_subdir_prefix/lib/$cf_nculib_root/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
15946	test -d $cf_subdir_prefix/$cf_nculib_root/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
15947	test -d $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root &&    cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib/$cf_nculib_root"
15948}
15949
15950done
15951
15952cf_search="$cf_library_path_list $cf_search"
15953
15954			for cf_libdir in $cf_search
15955			do
15956				echo "$as_me:15956: checking for -l$cf_nculib_root in $cf_libdir" >&5
15957echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
15958				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
15959				cat >conftest.$ac_ext <<_ACEOF
15960#line 15960 "configure"
15961#include "confdefs.h"
15962#include <${cf_cv_ncurses_header:-curses.h}>
15963int
15964main (void)
15965{
15966initscr()
15967  ;
15968  return 0;
15969}
15970_ACEOF
15971rm -f conftest.$ac_objext conftest$ac_exeext
15972if { (eval echo "$as_me:15972: \"$ac_link\"") >&5
15973  (eval $ac_link) 2>&5
15974  ac_status=$?
15975  echo "$as_me:15975: \$? = $ac_status" >&5
15976  (exit $ac_status); } &&
15977         { ac_try='test -s conftest$ac_exeext'
15978  { (eval echo "$as_me:15978: \"$ac_try\"") >&5
15979  (eval $ac_try) 2>&5
15980  ac_status=$?
15981  echo "$as_me:15981: \$? = $ac_status" >&5
15982  (exit $ac_status); }; }; then
15983  echo "$as_me:15983: result: yes" >&5
15984echo "${ECHO_T}yes" >&6
15985			 		 eval 'cf_cv_have_lib_'$cf_nculib_root'=yes'
15986					 break
15987else
15988  echo "$as_me: failed program was:" >&5
15989cat conftest.$ac_ext >&5
15990echo "$as_me:15990: result: no" >&5
15991echo "${ECHO_T}no" >&6
15992					 LIBS="$cf_save_LIBS"
15993fi
15994rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15995			done
15996
15997fi
15998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
15999
16000fi
16001
16002eval 'cf_found_library=$cf_cv_have_lib_'$cf_nculib_root
16003
16004if test $cf_found_library = no ; then
16005	{ { echo "$as_me:16005: error: Cannot link $cf_nculib_root library" >&5
16006echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
16007   { (exit 1); exit 1; }; }
16008fi
16009
16010fi
16011
16012if test -n "$cf_ncurses_LIBS" ; then
16013	echo "$as_me:16013: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
16014echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
16015	cf_ncurses_SAVE="$LIBS"
16016	for p in $cf_ncurses_LIBS ; do
16017		q=`echo $LIBS | sed -e "s%$p %%" -e "s%$p$%%"`
16018		if test "$q" != "$LIBS" ; then
16019			LIBS="$q"
16020		fi
16021	done
16022	cat >conftest.$ac_ext <<_ACEOF
16023#line 16023 "configure"
16024#include "confdefs.h"
16025#include <${cf_cv_ncurses_header:-curses.h}>
16026int
16027main (void)
16028{
16029initscr(); mousemask(0,0); tigetstr((char *)0);
16030  ;
16031  return 0;
16032}
16033_ACEOF
16034rm -f conftest.$ac_objext conftest$ac_exeext
16035if { (eval echo "$as_me:16035: \"$ac_link\"") >&5
16036  (eval $ac_link) 2>&5
16037  ac_status=$?
16038  echo "$as_me:16038: \$? = $ac_status" >&5
16039  (exit $ac_status); } &&
16040         { ac_try='test -s conftest$ac_exeext'
16041  { (eval echo "$as_me:16041: \"$ac_try\"") >&5
16042  (eval $ac_try) 2>&5
16043  ac_status=$?
16044  echo "$as_me:16044: \$? = $ac_status" >&5
16045  (exit $ac_status); }; }; then
16046  echo "$as_me:16046: result: yes" >&5
16047echo "${ECHO_T}yes" >&6
16048else
16049  echo "$as_me: failed program was:" >&5
16050cat conftest.$ac_ext >&5
16051echo "$as_me:16051: result: no" >&5
16052echo "${ECHO_T}no" >&6
16053		 LIBS="$cf_ncurses_SAVE"
16054fi
16055rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16056fi
16057
16058cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
16059
16060cat >>confdefs.h <<EOF
16061#define $cf_nculib_ROOT 1
16062EOF
16063
16064	fi
16065else
16066	NCURSES_CONFIG=none
16067fi
16068
16069echo "$as_me:16069: checking definition to turn on extended curses functions" >&5
16070echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
16071if test "${cf_cv_need_xopen_extension+set}" = set; then
16072  echo $ECHO_N "(cached) $ECHO_C" >&6
16073else
16074
16075cf_cv_need_xopen_extension=unknown
16076cat >conftest.$ac_ext <<_ACEOF
16077#line 16077 "configure"
16078#include "confdefs.h"
16079
16080#include <stdlib.h>
16081#include <${cf_cv_ncurses_header:-curses.h}>
16082int
16083main (void)
16084{
16085
16086#if defined(NCURSES_VERSION_PATCH)
16087#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
16088	make an error
16089#endif
16090#endif
16091#ifdef NCURSES_VERSION
16092	cchar_t check;
16093	int check2 = curs_set((int)sizeof(check));
16094#endif
16095	long x = winnstr(stdscr, "", 0);
16096	int x1, y1;
16097#ifdef NCURSES_VERSION
16098	(void)check2;
16099#endif
16100	getbegyx(stdscr, y1, x1);
16101	(void)x;
16102	(void)y1;
16103	(void)x1;
16104
16105  ;
16106  return 0;
16107}
16108_ACEOF
16109rm -f conftest.$ac_objext conftest$ac_exeext
16110if { (eval echo "$as_me:16110: \"$ac_link\"") >&5
16111  (eval $ac_link) 2>&5
16112  ac_status=$?
16113  echo "$as_me:16113: \$? = $ac_status" >&5
16114  (exit $ac_status); } &&
16115         { ac_try='test -s conftest$ac_exeext'
16116  { (eval echo "$as_me:16116: \"$ac_try\"") >&5
16117  (eval $ac_try) 2>&5
16118  ac_status=$?
16119  echo "$as_me:16119: \$? = $ac_status" >&5
16120  (exit $ac_status); }; }; then
16121  cf_cv_need_xopen_extension=none
16122else
16123  echo "$as_me: failed program was:" >&5
16124cat conftest.$ac_ext >&5
16125
16126	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
16127	do
16128		cat >conftest.$ac_ext <<_ACEOF
16129#line 16129 "configure"
16130#include "confdefs.h"
16131
16132#define $cf_try_xopen_extension 1
16133#include <stdlib.h>
16134#include <${cf_cv_ncurses_header:-curses.h}>
16135int
16136main (void)
16137{
16138
16139#ifdef NCURSES_VERSION
16140		cchar_t check;
16141		int check2 = curs_set((int)sizeof(check));
16142#endif
16143		long x = winnstr(stdscr, "", 0);
16144		int x1, y1;
16145		getbegyx(stdscr, y1, x1);
16146#ifdef NCURSES_VERSION
16147		(void)check2;
16148#endif
16149		(void)x;
16150		(void)y1;
16151		(void)x1;
16152
16153  ;
16154  return 0;
16155}
16156_ACEOF
16157rm -f conftest.$ac_objext conftest$ac_exeext
16158if { (eval echo "$as_me:16158: \"$ac_link\"") >&5
16159  (eval $ac_link) 2>&5
16160  ac_status=$?
16161  echo "$as_me:16161: \$? = $ac_status" >&5
16162  (exit $ac_status); } &&
16163         { ac_try='test -s conftest$ac_exeext'
16164  { (eval echo "$as_me:16164: \"$ac_try\"") >&5
16165  (eval $ac_try) 2>&5
16166  ac_status=$?
16167  echo "$as_me:16167: \$? = $ac_status" >&5
16168  (exit $ac_status); }; }; then
16169  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
16170else
16171  echo "$as_me: failed program was:" >&5
16172cat conftest.$ac_ext >&5
16173fi
16174rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16175	done
16176
16177fi
16178rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16179
16180fi
16181echo "$as_me:16181: result: $cf_cv_need_xopen_extension" >&5
16182echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
16183
16184case $cf_cv_need_xopen_extension in
16185*_*)
16186
16187	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16188	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
16189
16190	;;
16191esac
16192
16193		test "$cf_cv_need_xopen_extension" = unknown && { { echo "$as_me:16193: error: X/Open curses not found" >&5
16194echo "$as_me: error: X/Open curses not found" >&2;}
16195   { (exit 1); exit 1; }; }
16196		;;
16197	curses) #(vi
16198
16199echo "$as_me:16199: checking for extra include directories" >&5
16200echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
16201if test "${cf_cv_curses_incdir+set}" = set; then
16202  echo $ECHO_N "(cached) $ECHO_C" >&6
16203else
16204
16205cf_cv_curses_incdir=no
16206case $host_os in
16207hpux10.*)
16208	if test "x$cf_cv_screen" = "xcurses_colr"
16209	then
16210		test -d /usr/include/curses_colr && \
16211		cf_cv_curses_incdir="-I/usr/include/curses_colr"
16212	fi
16213	;;
16214sunos3*|sunos4*)
16215	if test "x$cf_cv_screen" = "xcurses_5lib"
16216	then
16217		test -d /usr/5lib && \
16218		test -d /usr/5include && \
16219		cf_cv_curses_incdir="-I/usr/5include"
16220	fi
16221	;;
16222esac
16223
16224fi
16225echo "$as_me:16225: result: $cf_cv_curses_incdir" >&5
16226echo "${ECHO_T}$cf_cv_curses_incdir" >&6
16227if test "$cf_cv_curses_incdir" != no
16228then
16229
16230	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16231	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
16232
16233fi
16234
16235echo "$as_me:16235: checking if we have identified curses headers" >&5
16236echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
16237if test "${cf_cv_ncurses_header+set}" = set; then
16238  echo $ECHO_N "(cached) $ECHO_C" >&6
16239else
16240
16241cf_cv_ncurses_header=none
16242for cf_header in \
16243	ncurses.h  \
16244	curses.h  ncurses/ncurses.h ncurses/curses.h
16245do
16246cat >conftest.$ac_ext <<_ACEOF
16247#line 16247 "configure"
16248#include "confdefs.h"
16249#include <${cf_header}>
16250int
16251main (void)
16252{
16253initscr(); tgoto("?", 0,0)
16254  ;
16255  return 0;
16256}
16257_ACEOF
16258rm -f conftest.$ac_objext
16259if { (eval echo "$as_me:16259: \"$ac_compile\"") >&5
16260  (eval $ac_compile) 2>&5
16261  ac_status=$?
16262  echo "$as_me:16262: \$? = $ac_status" >&5
16263  (exit $ac_status); } &&
16264         { ac_try='test -s conftest.$ac_objext'
16265  { (eval echo "$as_me:16265: \"$ac_try\"") >&5
16266  (eval $ac_try) 2>&5
16267  ac_status=$?
16268  echo "$as_me:16268: \$? = $ac_status" >&5
16269  (exit $ac_status); }; }; then
16270  cf_cv_ncurses_header=$cf_header; break
16271else
16272  echo "$as_me: failed program was:" >&5
16273cat conftest.$ac_ext >&5
16274fi
16275rm -f conftest.$ac_objext conftest.$ac_ext
16276done
16277
16278fi
16279echo "$as_me:16279: result: $cf_cv_ncurses_header" >&5
16280echo "${ECHO_T}$cf_cv_ncurses_header" >&6
16281
16282if test "$cf_cv_ncurses_header" = none ; then
16283	{ { echo "$as_me:16283: error: No curses header-files found" >&5
16284echo "$as_me: error: No curses header-files found" >&2;}
16285   { (exit 1); exit 1; }; }
16286fi
16287
16288# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
16289
16290for ac_header in $cf_cv_ncurses_header
16291do
16292as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
16293echo "$as_me:16293: checking for $ac_header" >&5
16294echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
16295if eval "test \"\${$as_ac_Header+set}\" = set"; then
16296  echo $ECHO_N "(cached) $ECHO_C" >&6
16297else
16298  cat >conftest.$ac_ext <<_ACEOF
16299#line 16299 "configure"
16300#include "confdefs.h"
16301#include <$ac_header>
16302_ACEOF
16303if { (eval echo "$as_me:16303: \"$ac_cpp conftest.$ac_ext\"") >&5
16304  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
16305  ac_status=$?
16306  egrep -v '^ *\+' conftest.er1 >conftest.err
16307  rm -f conftest.er1
16308  cat conftest.err >&5
16309  echo "$as_me:16309: \$? = $ac_status" >&5
16310  (exit $ac_status); } >/dev/null; then
16311  if test -s conftest.err; then
16312    ac_cpp_err=$ac_c_preproc_warn_flag
16313  else
16314    ac_cpp_err=
16315  fi
16316else
16317  ac_cpp_err=yes
16318fi
16319if test -z "$ac_cpp_err"; then
16320  eval "$as_ac_Header=yes"
16321else
16322  echo "$as_me: failed program was:" >&5
16323  cat conftest.$ac_ext >&5
16324  eval "$as_ac_Header=no"
16325fi
16326rm -f conftest.err conftest.$ac_ext
16327fi
16328echo "$as_me:16328: result: `eval echo '${'$as_ac_Header'}'`" >&5
16329echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
16330if test `eval echo '${'$as_ac_Header'}'` = yes; then
16331  cat >>confdefs.h <<EOF
16332#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
16333EOF
16334
16335fi
16336done
16337
16338echo "$as_me:16338: checking for terminfo header" >&5
16339echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
16340if test "${cf_cv_term_header+set}" = set; then
16341  echo $ECHO_N "(cached) $ECHO_C" >&6
16342else
16343
16344case ${cf_cv_ncurses_header} in
16345*/ncurses.h|*/ncursesw.h)
16346	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
16347	;;
16348*)
16349	cf_term_header=term.h
16350	;;
16351esac
16352
16353for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
16354do
16355cat >conftest.$ac_ext <<_ACEOF
16356#line 16356 "configure"
16357#include "confdefs.h"
16358#include <stdio.h>
16359#include <${cf_cv_ncurses_header:-curses.h}>
16360#include <$cf_test>
16361
16362int
16363main (void)
16364{
16365int x = auto_left_margin; (void)x
16366  ;
16367  return 0;
16368}
16369_ACEOF
16370rm -f conftest.$ac_objext
16371if { (eval echo "$as_me:16371: \"$ac_compile\"") >&5
16372  (eval $ac_compile) 2>&5
16373  ac_status=$?
16374  echo "$as_me:16374: \$? = $ac_status" >&5
16375  (exit $ac_status); } &&
16376         { ac_try='test -s conftest.$ac_objext'
16377  { (eval echo "$as_me:16377: \"$ac_try\"") >&5
16378  (eval $ac_try) 2>&5
16379  ac_status=$?
16380  echo "$as_me:16380: \$? = $ac_status" >&5
16381  (exit $ac_status); }; }; then
16382
16383	cf_cv_term_header="$cf_test"
16384else
16385  echo "$as_me: failed program was:" >&5
16386cat conftest.$ac_ext >&5
16387
16388	cf_cv_term_header=unknown
16389
16390fi
16391rm -f conftest.$ac_objext conftest.$ac_ext
16392	test "$cf_cv_term_header" != unknown && break
16393done
16394
16395fi
16396echo "$as_me:16396: result: $cf_cv_term_header" >&5
16397echo "${ECHO_T}$cf_cv_term_header" >&6
16398
16399# Set definitions to allow ifdef'ing to accommodate subdirectories
16400
16401case $cf_cv_term_header in
16402*term.h)
16403
16404cat >>confdefs.h <<\EOF
16405#define HAVE_TERM_H 1
16406EOF
16407
16408	;;
16409esac
16410
16411case $cf_cv_term_header in
16412ncurses/term.h)
16413
16414cat >>confdefs.h <<\EOF
16415#define HAVE_NCURSES_TERM_H 1
16416EOF
16417
16418	;;
16419ncursesw/term.h)
16420
16421cat >>confdefs.h <<\EOF
16422#define HAVE_NCURSESW_TERM_H 1
16423EOF
16424
16425	;;
16426esac
16427
16428echo "$as_me:16428: checking for ncurses version" >&5
16429echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
16430if test "${cf_cv_ncurses_version+set}" = set; then
16431  echo $ECHO_N "(cached) $ECHO_C" >&6
16432else
16433
16434	cf_cv_ncurses_version=no
16435	cf_tempfile=out$$
16436	rm -f $cf_tempfile
16437	if test "$cross_compiling" = yes; then
16438
16439	# This will not work if the preprocessor splits the line after the
16440	# Autoconf token.  The 'unproto' program does that.
16441	cat > conftest.$ac_ext <<EOF
16442#include <${cf_cv_ncurses_header:-curses.h}>
16443#undef Autoconf
16444#ifdef NCURSES_VERSION
16445Autoconf NCURSES_VERSION
16446#else
16447#ifdef __NCURSES_H
16448Autoconf "old"
16449#endif
16450;
16451#endif
16452EOF
16453	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
16454	{ (eval echo "$as_me:16454: \"$cf_try\"") >&5
16455  (eval $cf_try) 2>&5
16456  ac_status=$?
16457  echo "$as_me:16457: \$? = $ac_status" >&5
16458  (exit $ac_status); }
16459	if test -f conftest.out ; then
16460		cf_out=`cat conftest.out | sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%'`
16461		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
16462		rm -f conftest.out
16463	fi
16464
16465else
16466  cat >conftest.$ac_ext <<_ACEOF
16467#line 16467 "configure"
16468#include "confdefs.h"
16469
16470#include <${cf_cv_ncurses_header:-curses.h}>
16471#include <stdio.h>
16472int main(void)
16473{
16474	FILE *fp = fopen("$cf_tempfile", "w");
16475#ifdef NCURSES_VERSION
16476# ifdef NCURSES_VERSION_PATCH
16477	fprintf(fp, "%s.%d\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
16478# else
16479	fprintf(fp, "%s\n", NCURSES_VERSION);
16480# endif
16481#else
16482# ifdef __NCURSES_H
16483	fprintf(fp, "old\n");
16484# else
16485	make an error
16486# endif
16487#endif
16488	${cf_cv_main_return:-return}(0);
16489}
16490_ACEOF
16491rm -f conftest$ac_exeext
16492if { (eval echo "$as_me:16492: \"$ac_link\"") >&5
16493  (eval $ac_link) 2>&5
16494  ac_status=$?
16495  echo "$as_me:16495: \$? = $ac_status" >&5
16496  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
16497  { (eval echo "$as_me:16497: \"$ac_try\"") >&5
16498  (eval $ac_try) 2>&5
16499  ac_status=$?
16500  echo "$as_me:16500: \$? = $ac_status" >&5
16501  (exit $ac_status); }; }; then
16502
16503	cf_cv_ncurses_version=`cat $cf_tempfile`
16504else
16505  echo "$as_me: program exited with status $ac_status" >&5
16506echo "$as_me: failed program was:" >&5
16507cat conftest.$ac_ext >&5
16508fi
16509rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
16510fi
16511	rm -f $cf_tempfile
16512
16513fi
16514echo "$as_me:16514: result: $cf_cv_ncurses_version" >&5
16515echo "${ECHO_T}$cf_cv_ncurses_version" >&6
16516test "$cf_cv_ncurses_version" = no ||
16517cat >>confdefs.h <<\EOF
16518#define NCURSES 1
16519EOF
16520
16521echo "$as_me:16521: checking if we have identified curses libraries" >&5
16522echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
16523cat >conftest.$ac_ext <<_ACEOF
16524#line 16524 "configure"
16525#include "confdefs.h"
16526#include <${cf_cv_ncurses_header:-curses.h}>
16527int
16528main (void)
16529{
16530initscr(); tgoto("?", 0,0)
16531  ;
16532  return 0;
16533}
16534_ACEOF
16535rm -f conftest.$ac_objext conftest$ac_exeext
16536if { (eval echo "$as_me:16536: \"$ac_link\"") >&5
16537  (eval $ac_link) 2>&5
16538  ac_status=$?
16539  echo "$as_me:16539: \$? = $ac_status" >&5
16540  (exit $ac_status); } &&
16541         { ac_try='test -s conftest$ac_exeext'
16542  { (eval echo "$as_me:16542: \"$ac_try\"") >&5
16543  (eval $ac_try) 2>&5
16544  ac_status=$?
16545  echo "$as_me:16545: \$? = $ac_status" >&5
16546  (exit $ac_status); }; }; then
16547  cf_result=yes
16548else
16549  echo "$as_me: failed program was:" >&5
16550cat conftest.$ac_ext >&5
16551cf_result=no
16552fi
16553rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16554echo "$as_me:16554: result: $cf_result" >&5
16555echo "${ECHO_T}$cf_result" >&6
16556
16557if test "$cf_result" = no ; then
16558case $host_os in
16559XXXfreebsd*)
16560	echo "$as_me:16560: checking for tgoto in -lmytinfo" >&5
16561echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
16562if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
16563  echo $ECHO_N "(cached) $ECHO_C" >&6
16564else
16565  ac_check_lib_save_LIBS=$LIBS
16566LIBS="-lmytinfo  $LIBS"
16567cat >conftest.$ac_ext <<_ACEOF
16568#line 16568 "configure"
16569#include "confdefs.h"
16570
16571/* Override any gcc2 internal prototype to avoid an error.  */
16572#ifdef __cplusplus
16573extern "C"
16574#endif
16575/* We use char because int might match the return type of a gcc2
16576   builtin and then its argument prototype would still apply.  */
16577char tgoto ();
16578int
16579main (void)
16580{
16581tgoto ();
16582  ;
16583  return 0;
16584}
16585_ACEOF
16586rm -f conftest.$ac_objext conftest$ac_exeext
16587if { (eval echo "$as_me:16587: \"$ac_link\"") >&5
16588  (eval $ac_link) 2>&5
16589  ac_status=$?
16590  echo "$as_me:16590: \$? = $ac_status" >&5
16591  (exit $ac_status); } &&
16592         { ac_try='test -s conftest$ac_exeext'
16593  { (eval echo "$as_me:16593: \"$ac_try\"") >&5
16594  (eval $ac_try) 2>&5
16595  ac_status=$?
16596  echo "$as_me:16596: \$? = $ac_status" >&5
16597  (exit $ac_status); }; }; then
16598  ac_cv_lib_mytinfo_tgoto=yes
16599else
16600  echo "$as_me: failed program was:" >&5
16601cat conftest.$ac_ext >&5
16602ac_cv_lib_mytinfo_tgoto=no
16603fi
16604rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16605LIBS=$ac_check_lib_save_LIBS
16606fi
16607echo "$as_me:16607: result: $ac_cv_lib_mytinfo_tgoto" >&5
16608echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
16609if test $ac_cv_lib_mytinfo_tgoto = yes; then
16610
16611cf_add_libs="$LIBS"
16612# reverse order
16613cf_add_0lib=
16614for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16615# filter duplicates
16616for cf_add_1lib in $cf_add_0lib; do
16617	for cf_add_2lib in $cf_add_libs; do
16618		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16619			cf_add_1lib=
16620			break
16621		fi
16622	done
16623	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16624done
16625LIBS="$cf_add_libs"
16626
16627fi
16628
16629	;;
16630hpux10.*)
16631	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
16632	# next (1998), and xcurses "newer" (2000).  There is no header file for
16633	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
16634	# term.h) for cur_colr
16635	if test "x$cf_cv_screen" = "xcurses_colr"
16636	then
16637		echo "$as_me:16637: checking for initscr in -lcur_colr" >&5
16638echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
16639if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
16640  echo $ECHO_N "(cached) $ECHO_C" >&6
16641else
16642  ac_check_lib_save_LIBS=$LIBS
16643LIBS="-lcur_colr  $LIBS"
16644cat >conftest.$ac_ext <<_ACEOF
16645#line 16645 "configure"
16646#include "confdefs.h"
16647
16648/* Override any gcc2 internal prototype to avoid an error.  */
16649#ifdef __cplusplus
16650extern "C"
16651#endif
16652/* We use char because int might match the return type of a gcc2
16653   builtin and then its argument prototype would still apply.  */
16654char initscr ();
16655int
16656main (void)
16657{
16658initscr ();
16659  ;
16660  return 0;
16661}
16662_ACEOF
16663rm -f conftest.$ac_objext conftest$ac_exeext
16664if { (eval echo "$as_me:16664: \"$ac_link\"") >&5
16665  (eval $ac_link) 2>&5
16666  ac_status=$?
16667  echo "$as_me:16667: \$? = $ac_status" >&5
16668  (exit $ac_status); } &&
16669         { ac_try='test -s conftest$ac_exeext'
16670  { (eval echo "$as_me:16670: \"$ac_try\"") >&5
16671  (eval $ac_try) 2>&5
16672  ac_status=$?
16673  echo "$as_me:16673: \$? = $ac_status" >&5
16674  (exit $ac_status); }; }; then
16675  ac_cv_lib_cur_colr_initscr=yes
16676else
16677  echo "$as_me: failed program was:" >&5
16678cat conftest.$ac_ext >&5
16679ac_cv_lib_cur_colr_initscr=no
16680fi
16681rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16682LIBS=$ac_check_lib_save_LIBS
16683fi
16684echo "$as_me:16684: result: $ac_cv_lib_cur_colr_initscr" >&5
16685echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
16686if test $ac_cv_lib_cur_colr_initscr = yes; then
16687
16688cf_add_libs="$LIBS"
16689# reverse order
16690cf_add_0lib=
16691for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16692# filter duplicates
16693for cf_add_1lib in $cf_add_0lib; do
16694	for cf_add_2lib in $cf_add_libs; do
16695		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16696			cf_add_1lib=
16697			break
16698		fi
16699	done
16700	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16701done
16702LIBS="$cf_add_libs"
16703
16704			ac_cv_func_initscr=yes
16705
16706else
16707
16708		echo "$as_me:16708: checking for initscr in -lHcurses" >&5
16709echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
16710if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
16711  echo $ECHO_N "(cached) $ECHO_C" >&6
16712else
16713  ac_check_lib_save_LIBS=$LIBS
16714LIBS="-lHcurses  $LIBS"
16715cat >conftest.$ac_ext <<_ACEOF
16716#line 16716 "configure"
16717#include "confdefs.h"
16718
16719/* Override any gcc2 internal prototype to avoid an error.  */
16720#ifdef __cplusplus
16721extern "C"
16722#endif
16723/* We use char because int might match the return type of a gcc2
16724   builtin and then its argument prototype would still apply.  */
16725char initscr ();
16726int
16727main (void)
16728{
16729initscr ();
16730  ;
16731  return 0;
16732}
16733_ACEOF
16734rm -f conftest.$ac_objext conftest$ac_exeext
16735if { (eval echo "$as_me:16735: \"$ac_link\"") >&5
16736  (eval $ac_link) 2>&5
16737  ac_status=$?
16738  echo "$as_me:16738: \$? = $ac_status" >&5
16739  (exit $ac_status); } &&
16740         { ac_try='test -s conftest$ac_exeext'
16741  { (eval echo "$as_me:16741: \"$ac_try\"") >&5
16742  (eval $ac_try) 2>&5
16743  ac_status=$?
16744  echo "$as_me:16744: \$? = $ac_status" >&5
16745  (exit $ac_status); }; }; then
16746  ac_cv_lib_Hcurses_initscr=yes
16747else
16748  echo "$as_me: failed program was:" >&5
16749cat conftest.$ac_ext >&5
16750ac_cv_lib_Hcurses_initscr=no
16751fi
16752rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
16753LIBS=$ac_check_lib_save_LIBS
16754fi
16755echo "$as_me:16755: result: $ac_cv_lib_Hcurses_initscr" >&5
16756echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
16757if test $ac_cv_lib_Hcurses_initscr = yes; then
16758
16759			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
16760
16761cf_add_libs="$LIBS"
16762# reverse order
16763cf_add_0lib=
16764for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16765# filter duplicates
16766for cf_add_1lib in $cf_add_0lib; do
16767	for cf_add_2lib in $cf_add_libs; do
16768		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16769			cf_add_1lib=
16770			break
16771		fi
16772	done
16773	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16774done
16775LIBS="$cf_add_libs"
16776
16777	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16778	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
16779
16780			ac_cv_func_initscr=yes
16781
16782fi
16783
16784fi
16785
16786	fi
16787	;;
16788linux*)
16789	case `arch 2>/dev/null` in
16790	x86_64)
16791		if test -d /lib64
16792		then
16793
16794if test -n "/lib64" ; then
16795	for cf_add_libdir in /lib64
16796	do
16797		if test $cf_add_libdir = /usr/lib ; then
16798			:
16799		elif test -d $cf_add_libdir
16800		then
16801			cf_have_libdir=no
16802			if test -n "$LDFLAGS$LIBS" ; then
16803				# a loop is needed to ensure we can add subdirs of existing dirs
16804				for cf_test_libdir in $LDFLAGS $LIBS ; do
16805					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16806						cf_have_libdir=yes; break
16807					fi
16808				done
16809			fi
16810			if test "$cf_have_libdir" = no ; then
16811				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16812
16813echo "${as_me:-configure}:16813: testing adding $cf_add_libdir to library-path ..." 1>&5
16814
16815				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16816			fi
16817		fi
16818	done
16819fi
16820
16821		else
16822
16823if test -n "/lib" ; then
16824	for cf_add_libdir in /lib
16825	do
16826		if test $cf_add_libdir = /usr/lib ; then
16827			:
16828		elif test -d $cf_add_libdir
16829		then
16830			cf_have_libdir=no
16831			if test -n "$LDFLAGS$LIBS" ; then
16832				# a loop is needed to ensure we can add subdirs of existing dirs
16833				for cf_test_libdir in $LDFLAGS $LIBS ; do
16834					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16835						cf_have_libdir=yes; break
16836					fi
16837				done
16838			fi
16839			if test "$cf_have_libdir" = no ; then
16840				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16841
16842echo "${as_me:-configure}:16842: testing adding $cf_add_libdir to library-path ..." 1>&5
16843
16844				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16845			fi
16846		fi
16847	done
16848fi
16849
16850		fi
16851		;;
16852	*)
16853
16854if test -n "/lib" ; then
16855	for cf_add_libdir in /lib
16856	do
16857		if test $cf_add_libdir = /usr/lib ; then
16858			:
16859		elif test -d $cf_add_libdir
16860		then
16861			cf_have_libdir=no
16862			if test -n "$LDFLAGS$LIBS" ; then
16863				# a loop is needed to ensure we can add subdirs of existing dirs
16864				for cf_test_libdir in $LDFLAGS $LIBS ; do
16865					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16866						cf_have_libdir=yes; break
16867					fi
16868				done
16869			fi
16870			if test "$cf_have_libdir" = no ; then
16871				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16872
16873echo "${as_me:-configure}:16873: testing adding $cf_add_libdir to library-path ..." 1>&5
16874
16875				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16876			fi
16877		fi
16878	done
16879fi
16880
16881		;;
16882	esac
16883	;;
16884sunos3*|sunos4*)
16885	if test "x$cf_cv_screen" = "xcurses_5lib"
16886	then
16887		if test -d /usr/5lib ; then
16888
16889if test -n "/usr/5lib" ; then
16890	for cf_add_libdir in /usr/5lib
16891	do
16892		if test $cf_add_libdir = /usr/lib ; then
16893			:
16894		elif test -d $cf_add_libdir
16895		then
16896			cf_have_libdir=no
16897			if test -n "$LDFLAGS$LIBS" ; then
16898				# a loop is needed to ensure we can add subdirs of existing dirs
16899				for cf_test_libdir in $LDFLAGS $LIBS ; do
16900					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16901						cf_have_libdir=yes; break
16902					fi
16903				done
16904			fi
16905			if test "$cf_have_libdir" = no ; then
16906				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16907
16908echo "${as_me:-configure}:16908: testing adding $cf_add_libdir to library-path ..." 1>&5
16909
16910				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16911			fi
16912		fi
16913	done
16914fi
16915
16916cf_add_libs="$LIBS"
16917# reverse order
16918cf_add_0lib=
16919for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16920# filter duplicates
16921for cf_add_1lib in $cf_add_0lib; do
16922	for cf_add_2lib in $cf_add_libs; do
16923		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16924			cf_add_1lib=
16925			break
16926		fi
16927	done
16928	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16929done
16930LIBS="$cf_add_libs"
16931
16932		fi
16933	fi
16934	ac_cv_func_initscr=yes
16935	;;
16936esac
16937
16938if test ".$ac_cv_func_initscr" != .yes ; then
16939	cf_save_LIBS="$LIBS"
16940
16941	if test ".${cf_cv_ncurses_version:-no}" != .no
16942	then
16943		cf_check_list="ncurses curses cursesX"
16944	else
16945		cf_check_list="cursesX curses ncurses"
16946	fi
16947
16948	# Check for library containing tgoto.  Do this before curses library
16949	# because it may be needed to link the test-case for initscr.
16950	if test "x$cf_term_lib" = x
16951	then
16952		echo "$as_me:16952: checking for tgoto" >&5
16953echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
16954if test "${ac_cv_func_tgoto+set}" = set; then
16955  echo $ECHO_N "(cached) $ECHO_C" >&6
16956else
16957  cat >conftest.$ac_ext <<_ACEOF
16958#line 16958 "configure"
16959#include "confdefs.h"
16960#define tgoto autoconf_temporary
16961#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
16962#undef tgoto
16963
16964#ifdef __cplusplus
16965extern "C"
16966#endif
16967
16968/* We use char because int might match the return type of a gcc2
16969   builtin and then its argument prototype would still apply.  */
16970char tgoto (void);
16971
16972int
16973main (void)
16974{
16975
16976/* The GNU C library defines stubs for functions which it implements
16977    to always fail with ENOSYS.  Some functions are actually named
16978    something starting with __ and the normal name is an alias.  */
16979#if defined (__stub_tgoto) || defined (__stub___tgoto)
16980#error found stub for tgoto
16981#endif
16982
16983	return tgoto ();
16984  ;
16985  return 0;
16986}
16987_ACEOF
16988rm -f conftest.$ac_objext conftest$ac_exeext
16989if { (eval echo "$as_me:16989: \"$ac_link\"") >&5
16990  (eval $ac_link) 2>&5
16991  ac_status=$?
16992  echo "$as_me:16992: \$? = $ac_status" >&5
16993  (exit $ac_status); } &&
16994         { ac_try='test -s conftest$ac_exeext'
16995  { (eval echo "$as_me:16995: \"$ac_try\"") >&5
16996  (eval $ac_try) 2>&5
16997  ac_status=$?
16998  echo "$as_me:16998: \$? = $ac_status" >&5
16999  (exit $ac_status); }; }; then
17000  ac_cv_func_tgoto=yes
17001else
17002  echo "$as_me: failed program was:" >&5
17003cat conftest.$ac_ext >&5
17004ac_cv_func_tgoto=no
17005fi
17006rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17007fi
17008echo "$as_me:17008: result: $ac_cv_func_tgoto" >&5
17009echo "${ECHO_T}$ac_cv_func_tgoto" >&6
17010if test $ac_cv_func_tgoto = yes; then
17011  cf_term_lib=predefined
17012else
17013
17014			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
17015			do
17016				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
17017echo "$as_me:17017: checking for tgoto in -l$cf_term_lib" >&5
17018echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
17019if eval "test \"\${$as_ac_Lib+set}\" = set"; then
17020  echo $ECHO_N "(cached) $ECHO_C" >&6
17021else
17022  ac_check_lib_save_LIBS=$LIBS
17023LIBS="-l$cf_term_lib  $LIBS"
17024cat >conftest.$ac_ext <<_ACEOF
17025#line 17025 "configure"
17026#include "confdefs.h"
17027
17028/* Override any gcc2 internal prototype to avoid an error.  */
17029#ifdef __cplusplus
17030extern "C"
17031#endif
17032/* We use char because int might match the return type of a gcc2
17033   builtin and then its argument prototype would still apply.  */
17034char tgoto ();
17035int
17036main (void)
17037{
17038tgoto ();
17039  ;
17040  return 0;
17041}
17042_ACEOF
17043rm -f conftest.$ac_objext conftest$ac_exeext
17044if { (eval echo "$as_me:17044: \"$ac_link\"") >&5
17045  (eval $ac_link) 2>&5
17046  ac_status=$?
17047  echo "$as_me:17047: \$? = $ac_status" >&5
17048  (exit $ac_status); } &&
17049         { ac_try='test -s conftest$ac_exeext'
17050  { (eval echo "$as_me:17050: \"$ac_try\"") >&5
17051  (eval $ac_try) 2>&5
17052  ac_status=$?
17053  echo "$as_me:17053: \$? = $ac_status" >&5
17054  (exit $ac_status); }; }; then
17055  eval "$as_ac_Lib=yes"
17056else
17057  echo "$as_me: failed program was:" >&5
17058cat conftest.$ac_ext >&5
17059eval "$as_ac_Lib=no"
17060fi
17061rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17062LIBS=$ac_check_lib_save_LIBS
17063fi
17064echo "$as_me:17064: result: `eval echo '${'$as_ac_Lib'}'`" >&5
17065echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
17066if test `eval echo '${'$as_ac_Lib'}'` = yes; then
17067
17068					: ${cf_nculib_root:=$cf_term_lib}
17069					break
17070
17071fi
17072
17073			done
17074
17075fi
17076
17077	fi
17078
17079	# Check for library containing initscr
17080	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
17081	if test "x$cf_curs_lib" = x
17082	then
17083		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
17084		do
17085			LIBS="-l$cf_curs_lib $cf_save_LIBS"
17086			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
17087				echo "$as_me:17087: checking if we can link with $cf_curs_lib library" >&5
17088echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
17089				cat >conftest.$ac_ext <<_ACEOF
17090#line 17090 "configure"
17091#include "confdefs.h"
17092#include <${cf_cv_ncurses_header:-curses.h}>
17093int
17094main (void)
17095{
17096initscr()
17097  ;
17098  return 0;
17099}
17100_ACEOF
17101rm -f conftest.$ac_objext conftest$ac_exeext
17102if { (eval echo "$as_me:17102: \"$ac_link\"") >&5
17103  (eval $ac_link) 2>&5
17104  ac_status=$?
17105  echo "$as_me:17105: \$? = $ac_status" >&5
17106  (exit $ac_status); } &&
17107         { ac_try='test -s conftest$ac_exeext'
17108  { (eval echo "$as_me:17108: \"$ac_try\"") >&5
17109  (eval $ac_try) 2>&5
17110  ac_status=$?
17111  echo "$as_me:17111: \$? = $ac_status" >&5
17112  (exit $ac_status); }; }; then
17113  cf_result=yes
17114else
17115  echo "$as_me: failed program was:" >&5
17116cat conftest.$ac_ext >&5
17117cf_result=no
17118fi
17119rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17120				echo "$as_me:17120: result: $cf_result" >&5
17121echo "${ECHO_T}$cf_result" >&6
17122				test $cf_result = yes && break
17123			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
17124				cf_result=no
17125			elif test "$cf_term_lib" != predefined ; then
17126				echo "$as_me:17126: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
17127echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
17128				cat >conftest.$ac_ext <<_ACEOF
17129#line 17129 "configure"
17130#include "confdefs.h"
17131#include <${cf_cv_ncurses_header:-curses.h}>
17132int
17133main (void)
17134{
17135initscr(); tgoto((char *)0, 0, 0);
17136  ;
17137  return 0;
17138}
17139_ACEOF
17140rm -f conftest.$ac_objext conftest$ac_exeext
17141if { (eval echo "$as_me:17141: \"$ac_link\"") >&5
17142  (eval $ac_link) 2>&5
17143  ac_status=$?
17144  echo "$as_me:17144: \$? = $ac_status" >&5
17145  (exit $ac_status); } &&
17146         { ac_try='test -s conftest$ac_exeext'
17147  { (eval echo "$as_me:17147: \"$ac_try\"") >&5
17148  (eval $ac_try) 2>&5
17149  ac_status=$?
17150  echo "$as_me:17150: \$? = $ac_status" >&5
17151  (exit $ac_status); }; }; then
17152  cf_result=no
17153else
17154  echo "$as_me: failed program was:" >&5
17155cat conftest.$ac_ext >&5
17156
17157					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
17158					cat >conftest.$ac_ext <<_ACEOF
17159#line 17159 "configure"
17160#include "confdefs.h"
17161#include <${cf_cv_ncurses_header:-curses.h}>
17162int
17163main (void)
17164{
17165initscr()
17166  ;
17167  return 0;
17168}
17169_ACEOF
17170rm -f conftest.$ac_objext conftest$ac_exeext
17171if { (eval echo "$as_me:17171: \"$ac_link\"") >&5
17172  (eval $ac_link) 2>&5
17173  ac_status=$?
17174  echo "$as_me:17174: \$? = $ac_status" >&5
17175  (exit $ac_status); } &&
17176         { ac_try='test -s conftest$ac_exeext'
17177  { (eval echo "$as_me:17177: \"$ac_try\"") >&5
17178  (eval $ac_try) 2>&5
17179  ac_status=$?
17180  echo "$as_me:17180: \$? = $ac_status" >&5
17181  (exit $ac_status); }; }; then
17182  cf_result=yes
17183else
17184  echo "$as_me: failed program was:" >&5
17185cat conftest.$ac_ext >&5
17186cf_result=error
17187fi
17188rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17189
17190fi
17191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17192				echo "$as_me:17192: result: $cf_result" >&5
17193echo "${ECHO_T}$cf_result" >&6
17194				test $cf_result != error && break
17195			fi
17196		done
17197	fi
17198	test $cf_curs_lib = unknown && { { echo "$as_me:17198: error: no curses library found" >&5
17199echo "$as_me: error: no curses library found" >&2;}
17200   { (exit 1); exit 1; }; }
17201fi
17202fi
17203
17204echo "$as_me:17204: checking definition to turn on extended curses functions" >&5
17205echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
17206if test "${cf_cv_need_xopen_extension+set}" = set; then
17207  echo $ECHO_N "(cached) $ECHO_C" >&6
17208else
17209
17210cf_cv_need_xopen_extension=unknown
17211cat >conftest.$ac_ext <<_ACEOF
17212#line 17212 "configure"
17213#include "confdefs.h"
17214
17215#include <stdlib.h>
17216#include <${cf_cv_ncurses_header:-curses.h}>
17217int
17218main (void)
17219{
17220
17221#if defined(NCURSES_VERSION_PATCH)
17222#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
17223	make an error
17224#endif
17225#endif
17226#ifdef NCURSES_VERSION
17227	cchar_t check;
17228	int check2 = curs_set((int)sizeof(check));
17229#endif
17230	long x = winnstr(stdscr, "", 0);
17231	int x1, y1;
17232#ifdef NCURSES_VERSION
17233	(void)check2;
17234#endif
17235	getbegyx(stdscr, y1, x1);
17236	(void)x;
17237	(void)y1;
17238	(void)x1;
17239
17240  ;
17241  return 0;
17242}
17243_ACEOF
17244rm -f conftest.$ac_objext conftest$ac_exeext
17245if { (eval echo "$as_me:17245: \"$ac_link\"") >&5
17246  (eval $ac_link) 2>&5
17247  ac_status=$?
17248  echo "$as_me:17248: \$? = $ac_status" >&5
17249  (exit $ac_status); } &&
17250         { ac_try='test -s conftest$ac_exeext'
17251  { (eval echo "$as_me:17251: \"$ac_try\"") >&5
17252  (eval $ac_try) 2>&5
17253  ac_status=$?
17254  echo "$as_me:17254: \$? = $ac_status" >&5
17255  (exit $ac_status); }; }; then
17256  cf_cv_need_xopen_extension=none
17257else
17258  echo "$as_me: failed program was:" >&5
17259cat conftest.$ac_ext >&5
17260
17261	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
17262	do
17263		cat >conftest.$ac_ext <<_ACEOF
17264#line 17264 "configure"
17265#include "confdefs.h"
17266
17267#define $cf_try_xopen_extension 1
17268#include <stdlib.h>
17269#include <${cf_cv_ncurses_header:-curses.h}>
17270int
17271main (void)
17272{
17273
17274#ifdef NCURSES_VERSION
17275		cchar_t check;
17276		int check2 = curs_set((int)sizeof(check));
17277#endif
17278		long x = winnstr(stdscr, "", 0);
17279		int x1, y1;
17280		getbegyx(stdscr, y1, x1);
17281#ifdef NCURSES_VERSION
17282		(void)check2;
17283#endif
17284		(void)x;
17285		(void)y1;
17286		(void)x1;
17287
17288  ;
17289  return 0;
17290}
17291_ACEOF
17292rm -f conftest.$ac_objext conftest$ac_exeext
17293if { (eval echo "$as_me:17293: \"$ac_link\"") >&5
17294  (eval $ac_link) 2>&5
17295  ac_status=$?
17296  echo "$as_me:17296: \$? = $ac_status" >&5
17297  (exit $ac_status); } &&
17298         { ac_try='test -s conftest$ac_exeext'
17299  { (eval echo "$as_me:17299: \"$ac_try\"") >&5
17300  (eval $ac_try) 2>&5
17301  ac_status=$?
17302  echo "$as_me:17302: \$? = $ac_status" >&5
17303  (exit $ac_status); }; }; then
17304  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
17305else
17306  echo "$as_me: failed program was:" >&5
17307cat conftest.$ac_ext >&5
17308fi
17309rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17310	done
17311
17312fi
17313rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17314
17315fi
17316echo "$as_me:17316: result: $cf_cv_need_xopen_extension" >&5
17317echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
17318
17319case $cf_cv_need_xopen_extension in
17320*_*)
17321
17322	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17323	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
17324
17325	;;
17326esac
17327
17328		;;
17329	esac
17330fi
17331
17332## substitute externally-installed PCRE library for our bundled version
17333echo "$as_me:17333: checking if you want to use installed version of pcre" >&5
17334echo $ECHO_N "checking if you want to use installed version of pcre... $ECHO_C" >&6
17335
17336# Check whether --with-pcre or --without-pcre was given.
17337if test "${with_pcre+set}" = set; then
17338  withval="$with_pcre"
17339  PCRE_HOME=$withval
17340else
17341  PCRE_HOME=no
17342fi;
17343echo "$as_me:17343: result: $PCRE_HOME" >&5
17344echo "${ECHO_T}$PCRE_HOME" >&6
17345
17346cf_pcre_home=$PCRE_HOME
17347PCREDIR_MAKE=
17348PCREDIR_LIBS=
17349PCREDIR_CPPFLAGS=
17350
17351case .$cf_pcre_home in #(vi
17352.no) #(vi
17353	# setup to compile the bundled PCRE:
17354#	. $srcdir/pcre/version.sh
17355
17356	;;
17357.yes) #(vi
17358
17359cf_save_CFLAGS="$CFLAGS"
17360cf_save_LIBS="$LIBS"
17361cf_find_PCRE=yes
17362
17363if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre2; then
17364	test -n "$verbose" && echo "	found package libpcre2" 1>&6
17365
17366echo "${as_me:-configure}:17366: testing found package libpcre2 ..." 1>&5
17367
17368	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre2 2>/dev/null`"
17369	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre2 2>/dev/null`"
17370	test -n "$verbose" && echo "	package libpcre2 CFLAGS: $cf_pkgconfig_incs" 1>&6
17371
17372echo "${as_me:-configure}:17372: testing package libpcre2 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17373
17374	test -n "$verbose" && echo "	package libpcre2 LIBS: $cf_pkgconfig_libs" 1>&6
17375
17376echo "${as_me:-configure}:17376: testing package libpcre2 LIBS: $cf_pkgconfig_libs ..." 1>&5
17377
17378cf_fix_cppflags=no
17379cf_new_cflags=
17380cf_new_cppflags=
17381cf_new_extra_cppflags=
17382
17383for cf_add_cflags in $cf_pkgconfig_incs
17384do
17385case $cf_fix_cppflags in
17386no)
17387	case $cf_add_cflags in
17388	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17389		case $cf_add_cflags in
17390		-D*)
17391			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17392
17393			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17394				&& test -z "${cf_tst_cflags}" \
17395				&& cf_fix_cppflags=yes
17396
17397			if test $cf_fix_cppflags = yes ; then
17398
17399	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17400	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17401
17402				continue
17403			elif test "${cf_tst_cflags}" = "\"'" ; then
17404
17405	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17406	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17407
17408				continue
17409			fi
17410			;;
17411		esac
17412		case "$CPPFLAGS" in
17413		*$cf_add_cflags)
17414			;;
17415		*)
17416			case $cf_add_cflags in
17417			-D*)
17418				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17419
17420CPPFLAGS=`echo "$CPPFLAGS" | \
17421	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17422		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17423
17424				;;
17425			esac
17426
17427	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17428	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17429
17430			;;
17431		esac
17432		;;
17433	*)
17434
17435	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17436	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17437
17438		;;
17439	esac
17440	;;
17441yes)
17442
17443	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17444	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17445
17446	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17447
17448	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17449		&& test -z "${cf_tst_cflags}" \
17450		&& cf_fix_cppflags=no
17451	;;
17452esac
17453done
17454
17455if test -n "$cf_new_cflags" ; then
17456
17457	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17458	CFLAGS="${CFLAGS}$cf_new_cflags"
17459
17460fi
17461
17462if test -n "$cf_new_cppflags" ; then
17463
17464	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17465	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17466
17467fi
17468
17469if test -n "$cf_new_extra_cppflags" ; then
17470
17471	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17472	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17473
17474fi
17475
17476cf_add_libs="$LIBS"
17477# reverse order
17478cf_add_0lib=
17479for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17480# filter duplicates
17481for cf_add_1lib in $cf_add_0lib; do
17482	for cf_add_2lib in $cf_add_libs; do
17483		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17484			cf_add_1lib=
17485			break
17486		fi
17487	done
17488	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17489done
17490LIBS="$cf_add_libs"
17491
17492	:
17493else
17494	cf_pkgconfig_incs=
17495	cf_pkgconfig_libs=
17496
17497if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libpcre; then
17498	test -n "$verbose" && echo "	found package libpcre" 1>&6
17499
17500echo "${as_me:-configure}:17500: testing found package libpcre ..." 1>&5
17501
17502	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libpcre 2>/dev/null`"
17503	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libpcre 2>/dev/null`"
17504	test -n "$verbose" && echo "	package libpcre CFLAGS: $cf_pkgconfig_incs" 1>&6
17505
17506echo "${as_me:-configure}:17506: testing package libpcre CFLAGS: $cf_pkgconfig_incs ..." 1>&5
17507
17508	test -n "$verbose" && echo "	package libpcre LIBS: $cf_pkgconfig_libs" 1>&6
17509
17510echo "${as_me:-configure}:17510: testing package libpcre LIBS: $cf_pkgconfig_libs ..." 1>&5
17511
17512cf_fix_cppflags=no
17513cf_new_cflags=
17514cf_new_cppflags=
17515cf_new_extra_cppflags=
17516
17517for cf_add_cflags in $cf_pkgconfig_incs
17518do
17519case $cf_fix_cppflags in
17520no)
17521	case $cf_add_cflags in
17522	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17523		case $cf_add_cflags in
17524		-D*)
17525			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17526
17527			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17528				&& test -z "${cf_tst_cflags}" \
17529				&& cf_fix_cppflags=yes
17530
17531			if test $cf_fix_cppflags = yes ; then
17532
17533	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17534	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17535
17536				continue
17537			elif test "${cf_tst_cflags}" = "\"'" ; then
17538
17539	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17540	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17541
17542				continue
17543			fi
17544			;;
17545		esac
17546		case "$CPPFLAGS" in
17547		*$cf_add_cflags)
17548			;;
17549		*)
17550			case $cf_add_cflags in
17551			-D*)
17552				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17553
17554CPPFLAGS=`echo "$CPPFLAGS" | \
17555	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17556		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17557
17558				;;
17559			esac
17560
17561	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17562	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17563
17564			;;
17565		esac
17566		;;
17567	*)
17568
17569	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17570	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17571
17572		;;
17573	esac
17574	;;
17575yes)
17576
17577	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17578	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17579
17580	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
17581
17582	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17583		&& test -z "${cf_tst_cflags}" \
17584		&& cf_fix_cppflags=no
17585	;;
17586esac
17587done
17588
17589if test -n "$cf_new_cflags" ; then
17590
17591	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17592	CFLAGS="${CFLAGS}$cf_new_cflags"
17593
17594fi
17595
17596if test -n "$cf_new_cppflags" ; then
17597
17598	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17599	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17600
17601fi
17602
17603if test -n "$cf_new_extra_cppflags" ; then
17604
17605	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17606	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17607
17608fi
17609
17610cf_add_libs="$LIBS"
17611# reverse order
17612cf_add_0lib=
17613for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17614# filter duplicates
17615for cf_add_1lib in $cf_add_0lib; do
17616	for cf_add_2lib in $cf_add_libs; do
17617		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17618			cf_add_1lib=
17619			break
17620		fi
17621	done
17622	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17623done
17624LIBS="$cf_add_libs"
17625
17626	:
17627else
17628	cf_pkgconfig_incs=
17629	cf_pkgconfig_libs=
17630
17631		echo "$as_me:17631: checking for pcre_compile in -lpcre" >&5
17632echo $ECHO_N "checking for pcre_compile in -lpcre... $ECHO_C" >&6
17633if test "${ac_cv_lib_pcre_pcre_compile+set}" = set; then
17634  echo $ECHO_N "(cached) $ECHO_C" >&6
17635else
17636  ac_check_lib_save_LIBS=$LIBS
17637LIBS="-lpcre  $LIBS"
17638cat >conftest.$ac_ext <<_ACEOF
17639#line 17639 "configure"
17640#include "confdefs.h"
17641
17642/* Override any gcc2 internal prototype to avoid an error.  */
17643#ifdef __cplusplus
17644extern "C"
17645#endif
17646/* We use char because int might match the return type of a gcc2
17647   builtin and then its argument prototype would still apply.  */
17648char pcre_compile ();
17649int
17650main (void)
17651{
17652pcre_compile ();
17653  ;
17654  return 0;
17655}
17656_ACEOF
17657rm -f conftest.$ac_objext conftest$ac_exeext
17658if { (eval echo "$as_me:17658: \"$ac_link\"") >&5
17659  (eval $ac_link) 2>&5
17660  ac_status=$?
17661  echo "$as_me:17661: \$? = $ac_status" >&5
17662  (exit $ac_status); } &&
17663         { ac_try='test -s conftest$ac_exeext'
17664  { (eval echo "$as_me:17664: \"$ac_try\"") >&5
17665  (eval $ac_try) 2>&5
17666  ac_status=$?
17667  echo "$as_me:17667: \$? = $ac_status" >&5
17668  (exit $ac_status); }; }; then
17669  ac_cv_lib_pcre_pcre_compile=yes
17670else
17671  echo "$as_me: failed program was:" >&5
17672cat conftest.$ac_ext >&5
17673ac_cv_lib_pcre_pcre_compile=no
17674fi
17675rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17676LIBS=$ac_check_lib_save_LIBS
17677fi
17678echo "$as_me:17678: result: $ac_cv_lib_pcre_pcre_compile" >&5
17679echo "${ECHO_T}$ac_cv_lib_pcre_pcre_compile" >&6
17680if test $ac_cv_lib_pcre_pcre_compile = yes; then
17681
17682cf_add_libs="$LIBS"
17683# reverse order
17684cf_add_0lib=
17685for cf_add_1lib in -lpcre; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17686# filter duplicates
17687for cf_add_1lib in $cf_add_0lib; do
17688	for cf_add_2lib in $cf_add_libs; do
17689		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17690			cf_add_1lib=
17691			break
17692		fi
17693	done
17694	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17695done
17696LIBS="$cf_add_libs"
17697
17698			echo "$as_me:17698: checking for regcomp in -lpcre2-posix" >&5
17699echo $ECHO_N "checking for regcomp in -lpcre2-posix... $ECHO_C" >&6
17700if test "${ac_cv_lib_pcre2_posix_regcomp+set}" = set; then
17701  echo $ECHO_N "(cached) $ECHO_C" >&6
17702else
17703  ac_check_lib_save_LIBS=$LIBS
17704LIBS="-lpcre2-posix  $LIBS"
17705cat >conftest.$ac_ext <<_ACEOF
17706#line 17706 "configure"
17707#include "confdefs.h"
17708
17709/* Override any gcc2 internal prototype to avoid an error.  */
17710#ifdef __cplusplus
17711extern "C"
17712#endif
17713/* We use char because int might match the return type of a gcc2
17714   builtin and then its argument prototype would still apply.  */
17715char regcomp ();
17716int
17717main (void)
17718{
17719regcomp ();
17720  ;
17721  return 0;
17722}
17723_ACEOF
17724rm -f conftest.$ac_objext conftest$ac_exeext
17725if { (eval echo "$as_me:17725: \"$ac_link\"") >&5
17726  (eval $ac_link) 2>&5
17727  ac_status=$?
17728  echo "$as_me:17728: \$? = $ac_status" >&5
17729  (exit $ac_status); } &&
17730         { ac_try='test -s conftest$ac_exeext'
17731  { (eval echo "$as_me:17731: \"$ac_try\"") >&5
17732  (eval $ac_try) 2>&5
17733  ac_status=$?
17734  echo "$as_me:17734: \$? = $ac_status" >&5
17735  (exit $ac_status); }; }; then
17736  ac_cv_lib_pcre2_posix_regcomp=yes
17737else
17738  echo "$as_me: failed program was:" >&5
17739cat conftest.$ac_ext >&5
17740ac_cv_lib_pcre2_posix_regcomp=no
17741fi
17742rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17743LIBS=$ac_check_lib_save_LIBS
17744fi
17745echo "$as_me:17745: result: $ac_cv_lib_pcre2_posix_regcomp" >&5
17746echo "${ECHO_T}$ac_cv_lib_pcre2_posix_regcomp" >&6
17747if test $ac_cv_lib_pcre2_posix_regcomp = yes; then
17748
17749cf_add_libs="$LIBS"
17750# reverse order
17751cf_add_0lib=
17752for cf_add_1lib in -lpcre2-posix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17753# filter duplicates
17754for cf_add_1lib in $cf_add_0lib; do
17755	for cf_add_2lib in $cf_add_libs; do
17756		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17757			cf_add_1lib=
17758			break
17759		fi
17760	done
17761	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17762done
17763LIBS="$cf_add_libs"
17764
17765else
17766
17767					echo "$as_me:17767: checking for regcomp in -lpcreposix" >&5
17768echo $ECHO_N "checking for regcomp in -lpcreposix... $ECHO_C" >&6
17769if test "${ac_cv_lib_pcreposix_regcomp+set}" = set; then
17770  echo $ECHO_N "(cached) $ECHO_C" >&6
17771else
17772  ac_check_lib_save_LIBS=$LIBS
17773LIBS="-lpcreposix  $LIBS"
17774cat >conftest.$ac_ext <<_ACEOF
17775#line 17775 "configure"
17776#include "confdefs.h"
17777
17778/* Override any gcc2 internal prototype to avoid an error.  */
17779#ifdef __cplusplus
17780extern "C"
17781#endif
17782/* We use char because int might match the return type of a gcc2
17783   builtin and then its argument prototype would still apply.  */
17784char regcomp ();
17785int
17786main (void)
17787{
17788regcomp ();
17789  ;
17790  return 0;
17791}
17792_ACEOF
17793rm -f conftest.$ac_objext conftest$ac_exeext
17794if { (eval echo "$as_me:17794: \"$ac_link\"") >&5
17795  (eval $ac_link) 2>&5
17796  ac_status=$?
17797  echo "$as_me:17797: \$? = $ac_status" >&5
17798  (exit $ac_status); } &&
17799         { ac_try='test -s conftest$ac_exeext'
17800  { (eval echo "$as_me:17800: \"$ac_try\"") >&5
17801  (eval $ac_try) 2>&5
17802  ac_status=$?
17803  echo "$as_me:17803: \$? = $ac_status" >&5
17804  (exit $ac_status); }; }; then
17805  ac_cv_lib_pcreposix_regcomp=yes
17806else
17807  echo "$as_me: failed program was:" >&5
17808cat conftest.$ac_ext >&5
17809ac_cv_lib_pcreposix_regcomp=no
17810fi
17811rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
17812LIBS=$ac_check_lib_save_LIBS
17813fi
17814echo "$as_me:17814: result: $ac_cv_lib_pcreposix_regcomp" >&5
17815echo "${ECHO_T}$ac_cv_lib_pcreposix_regcomp" >&6
17816if test $ac_cv_lib_pcreposix_regcomp = yes; then
17817
17818cf_add_libs="$LIBS"
17819# reverse order
17820cf_add_0lib=
17821for cf_add_1lib in -lpcreposix; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17822# filter duplicates
17823for cf_add_1lib in $cf_add_0lib; do
17824	for cf_add_2lib in $cf_add_libs; do
17825		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17826			cf_add_1lib=
17827			break
17828		fi
17829	done
17830	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17831done
17832LIBS="$cf_add_libs"
17833
17834else
17835
17836						cf_find_PCRE=no
17837
17838fi
17839
17840fi
17841
17842else
17843
17844				cf_find_PCRE=no
17845
17846fi
17847
17848fi
17849
17850fi
17851
17852CFLAGS="$cf_save_CFLAGS"
17853LIBS="$cf_save_LIBS"
17854
17855cf_pcre_cppflags="$cf_pkgconfig_incs"
17856cf_pcre_libs="$cf_pkgconfig_libs"
17857
17858if test "$cf_find_PCRE" = yes; then
17859
17860			PCREDIR_MAKE='#'
17861			PCREDIR_LIBS="$cf_pcre_libs"
17862			PCREDIR_CPPFLAGS="$cf_pcre_cppflags"
17863
17864else
17865
17866			test -n "$verbose" && echo "	using bundled pcre because no installed pcre was found" 1>&6
17867
17868echo "${as_me:-configure}:17868: testing using bundled pcre because no installed pcre was found ..." 1>&5
17869
17870			cf_pcre_home=no
17871
17872fi
17873
17874	;;
17875.*)
17876
17877if test "x$prefix" != xNONE; then
17878	cf_path_syntax="$prefix"
17879else
17880	cf_path_syntax="$ac_default_prefix"
17881fi
17882
17883case ".$cf_pcre_home" in
17884.\$\(*\)*|.\'*\'*)
17885	;;
17886..|./*|.\\*)
17887	;;
17888.[a-zA-Z]:[\\/]*) # OS/2 EMX
17889	;;
17890.\${*prefix}*|.\${*dir}*)
17891	eval cf_pcre_home="$cf_pcre_home"
17892	case ".$cf_pcre_home" in
17893	.NONE/*)
17894		cf_pcre_home=`echo $cf_pcre_home | sed -e s%NONE%$cf_path_syntax%`
17895		;;
17896	esac
17897	;;
17898.no|.NONE/*)
17899	cf_pcre_home=`echo $cf_pcre_home | sed -e s%NONE%$cf_path_syntax%`
17900	;;
17901*)
17902	{ { echo "$as_me:17902: error: expected a pathname, not \"$cf_pcre_home\"" >&5
17903echo "$as_me: error: expected a pathname, not \"$cf_pcre_home\"" >&2;}
17904   { (exit 1); exit 1; }; }
17905	;;
17906esac
17907
17908	PCREDIR_MAKE='#'
17909	PCREDIR_LIBS="-L${cf_pcre_home}/lib -lpcre"
17910	PCREDIR_CPPFLAGS="-I${cf_pcre_home}/include"
17911	;;
17912esac
17913
17914PCRE_MAKEFILE=
17915if test "$cf_pcre_home" = "no" ; then
17916	LINK_SIZE="-DLINK_SIZE=2"
17917
17918	UTF8="-DSUPPORT_UTF8"
17919	UCP="-DSUPPORT_UCP"
17920
17921	PCRE_MAKEFILE="$PCRE_MAKEFILE pcre/Makefile pcre/RunTest"
17922fi
17923
17924## debugging libraries (do this after other libraries)
17925debug_malloc=none
17926
17927echo "$as_me:17927: checking if you want to use dbmalloc for testing" >&5
17928echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
17929
17930# Check whether --with-dbmalloc or --without-dbmalloc was given.
17931if test "${with_dbmalloc+set}" = set; then
17932  withval="$with_dbmalloc"
17933
17934cat >>confdefs.h <<EOF
17935#define USE_DBMALLOC 1
17936EOF
17937
17938	: ${with_cflags:=-g}
17939	: ${with_no_leaks:=yes}
17940	 with_dbmalloc=yes
17941else
17942  with_dbmalloc=
17943fi;
17944echo "$as_me:17944: result: ${with_dbmalloc:-no}" >&5
17945echo "${ECHO_T}${with_dbmalloc:-no}" >&6
17946
17947case .$with_cflags in
17948.*-g*)
17949	case .$CFLAGS in
17950	.*-g*)
17951		;;
17952	*)
17953
17954cf_fix_cppflags=no
17955cf_new_cflags=
17956cf_new_cppflags=
17957cf_new_extra_cppflags=
17958
17959for cf_add_cflags in -g
17960do
17961case $cf_fix_cppflags in
17962no)
17963	case $cf_add_cflags in
17964	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17965		case $cf_add_cflags in
17966		-D*)
17967			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17968
17969			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17970				&& test -z "${cf_tst_cflags}" \
17971				&& cf_fix_cppflags=yes
17972
17973			if test $cf_fix_cppflags = yes ; then
17974
17975	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17976	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17977
17978				continue
17979			elif test "${cf_tst_cflags}" = "\"'" ; then
17980
17981	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17982	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17983
17984				continue
17985			fi
17986			;;
17987		esac
17988		case "$CPPFLAGS" in
17989		*$cf_add_cflags)
17990			;;
17991		*)
17992			case $cf_add_cflags in
17993			-D*)
17994				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17995
17996CPPFLAGS=`echo "$CPPFLAGS" | \
17997	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17998		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17999
18000				;;
18001			esac
18002
18003	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18004	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18005
18006			;;
18007		esac
18008		;;
18009	*)
18010
18011	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18012	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18013
18014		;;
18015	esac
18016	;;
18017yes)
18018
18019	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18020	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18021
18022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18023
18024	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18025		&& test -z "${cf_tst_cflags}" \
18026		&& cf_fix_cppflags=no
18027	;;
18028esac
18029done
18030
18031if test -n "$cf_new_cflags" ; then
18032
18033	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18034	CFLAGS="${CFLAGS}$cf_new_cflags"
18035
18036fi
18037
18038if test -n "$cf_new_cppflags" ; then
18039
18040	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18041	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18042
18043fi
18044
18045if test -n "$cf_new_extra_cppflags" ; then
18046
18047	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18048	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18049
18050fi
18051
18052		;;
18053	esac
18054	;;
18055esac
18056
18057if test "$with_dbmalloc" = yes ; then
18058	echo "$as_me:18058: checking for dbmalloc.h" >&5
18059echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
18060if test "${ac_cv_header_dbmalloc_h+set}" = set; then
18061  echo $ECHO_N "(cached) $ECHO_C" >&6
18062else
18063  cat >conftest.$ac_ext <<_ACEOF
18064#line 18064 "configure"
18065#include "confdefs.h"
18066#include <dbmalloc.h>
18067_ACEOF
18068if { (eval echo "$as_me:18068: \"$ac_cpp conftest.$ac_ext\"") >&5
18069  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18070  ac_status=$?
18071  egrep -v '^ *\+' conftest.er1 >conftest.err
18072  rm -f conftest.er1
18073  cat conftest.err >&5
18074  echo "$as_me:18074: \$? = $ac_status" >&5
18075  (exit $ac_status); } >/dev/null; then
18076  if test -s conftest.err; then
18077    ac_cpp_err=$ac_c_preproc_warn_flag
18078  else
18079    ac_cpp_err=
18080  fi
18081else
18082  ac_cpp_err=yes
18083fi
18084if test -z "$ac_cpp_err"; then
18085  ac_cv_header_dbmalloc_h=yes
18086else
18087  echo "$as_me: failed program was:" >&5
18088  cat conftest.$ac_ext >&5
18089  ac_cv_header_dbmalloc_h=no
18090fi
18091rm -f conftest.err conftest.$ac_ext
18092fi
18093echo "$as_me:18093: result: $ac_cv_header_dbmalloc_h" >&5
18094echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
18095if test $ac_cv_header_dbmalloc_h = yes; then
18096  echo "$as_me:18096: checking for debug_malloc in -ldbmalloc" >&5
18097echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
18098if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
18099  echo $ECHO_N "(cached) $ECHO_C" >&6
18100else
18101  ac_check_lib_save_LIBS=$LIBS
18102LIBS="-ldbmalloc  $LIBS"
18103cat >conftest.$ac_ext <<_ACEOF
18104#line 18104 "configure"
18105#include "confdefs.h"
18106
18107/* Override any gcc2 internal prototype to avoid an error.  */
18108#ifdef __cplusplus
18109extern "C"
18110#endif
18111/* We use char because int might match the return type of a gcc2
18112   builtin and then its argument prototype would still apply.  */
18113char debug_malloc ();
18114int
18115main (void)
18116{
18117debug_malloc ();
18118  ;
18119  return 0;
18120}
18121_ACEOF
18122rm -f conftest.$ac_objext conftest$ac_exeext
18123if { (eval echo "$as_me:18123: \"$ac_link\"") >&5
18124  (eval $ac_link) 2>&5
18125  ac_status=$?
18126  echo "$as_me:18126: \$? = $ac_status" >&5
18127  (exit $ac_status); } &&
18128         { ac_try='test -s conftest$ac_exeext'
18129  { (eval echo "$as_me:18129: \"$ac_try\"") >&5
18130  (eval $ac_try) 2>&5
18131  ac_status=$?
18132  echo "$as_me:18132: \$? = $ac_status" >&5
18133  (exit $ac_status); }; }; then
18134  ac_cv_lib_dbmalloc_debug_malloc=yes
18135else
18136  echo "$as_me: failed program was:" >&5
18137cat conftest.$ac_ext >&5
18138ac_cv_lib_dbmalloc_debug_malloc=no
18139fi
18140rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18141LIBS=$ac_check_lib_save_LIBS
18142fi
18143echo "$as_me:18143: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
18144echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
18145if test $ac_cv_lib_dbmalloc_debug_malloc = yes; then
18146  debug_malloc=DBMALLOC
18147fi
18148
18149fi
18150
18151fi
18152
18153echo "$as_me:18153: checking if you want to use dmalloc for testing" >&5
18154echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
18155
18156# Check whether --with-dmalloc or --without-dmalloc was given.
18157if test "${with_dmalloc+set}" = set; then
18158  withval="$with_dmalloc"
18159
18160cat >>confdefs.h <<EOF
18161#define USE_DMALLOC 1
18162EOF
18163
18164	: ${with_cflags:=-g}
18165	: ${with_no_leaks:=yes}
18166	 with_dmalloc=yes
18167else
18168  with_dmalloc=
18169fi;
18170echo "$as_me:18170: result: ${with_dmalloc:-no}" >&5
18171echo "${ECHO_T}${with_dmalloc:-no}" >&6
18172
18173case .$with_cflags in
18174.*-g*)
18175	case .$CFLAGS in
18176	.*-g*)
18177		;;
18178	*)
18179
18180cf_fix_cppflags=no
18181cf_new_cflags=
18182cf_new_cppflags=
18183cf_new_extra_cppflags=
18184
18185for cf_add_cflags in -g
18186do
18187case $cf_fix_cppflags in
18188no)
18189	case $cf_add_cflags in
18190	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18191		case $cf_add_cflags in
18192		-D*)
18193			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18194
18195			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18196				&& test -z "${cf_tst_cflags}" \
18197				&& cf_fix_cppflags=yes
18198
18199			if test $cf_fix_cppflags = yes ; then
18200
18201	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18202	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18203
18204				continue
18205			elif test "${cf_tst_cflags}" = "\"'" ; then
18206
18207	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18208	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18209
18210				continue
18211			fi
18212			;;
18213		esac
18214		case "$CPPFLAGS" in
18215		*$cf_add_cflags)
18216			;;
18217		*)
18218			case $cf_add_cflags in
18219			-D*)
18220				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18221
18222CPPFLAGS=`echo "$CPPFLAGS" | \
18223	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18224		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18225
18226				;;
18227			esac
18228
18229	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18230	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18231
18232			;;
18233		esac
18234		;;
18235	*)
18236
18237	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18238	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18239
18240		;;
18241	esac
18242	;;
18243yes)
18244
18245	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18246	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18247
18248	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18249
18250	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18251		&& test -z "${cf_tst_cflags}" \
18252		&& cf_fix_cppflags=no
18253	;;
18254esac
18255done
18256
18257if test -n "$cf_new_cflags" ; then
18258
18259	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18260	CFLAGS="${CFLAGS}$cf_new_cflags"
18261
18262fi
18263
18264if test -n "$cf_new_cppflags" ; then
18265
18266	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18267	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18268
18269fi
18270
18271if test -n "$cf_new_extra_cppflags" ; then
18272
18273	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18274	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18275
18276fi
18277
18278		;;
18279	esac
18280	;;
18281esac
18282
18283if test "$with_dmalloc" = yes ; then
18284	echo "$as_me:18284: checking for dmalloc.h" >&5
18285echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
18286if test "${ac_cv_header_dmalloc_h+set}" = set; then
18287  echo $ECHO_N "(cached) $ECHO_C" >&6
18288else
18289  cat >conftest.$ac_ext <<_ACEOF
18290#line 18290 "configure"
18291#include "confdefs.h"
18292#include <dmalloc.h>
18293_ACEOF
18294if { (eval echo "$as_me:18294: \"$ac_cpp conftest.$ac_ext\"") >&5
18295  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
18296  ac_status=$?
18297  egrep -v '^ *\+' conftest.er1 >conftest.err
18298  rm -f conftest.er1
18299  cat conftest.err >&5
18300  echo "$as_me:18300: \$? = $ac_status" >&5
18301  (exit $ac_status); } >/dev/null; then
18302  if test -s conftest.err; then
18303    ac_cpp_err=$ac_c_preproc_warn_flag
18304  else
18305    ac_cpp_err=
18306  fi
18307else
18308  ac_cpp_err=yes
18309fi
18310if test -z "$ac_cpp_err"; then
18311  ac_cv_header_dmalloc_h=yes
18312else
18313  echo "$as_me: failed program was:" >&5
18314  cat conftest.$ac_ext >&5
18315  ac_cv_header_dmalloc_h=no
18316fi
18317rm -f conftest.err conftest.$ac_ext
18318fi
18319echo "$as_me:18319: result: $ac_cv_header_dmalloc_h" >&5
18320echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
18321if test $ac_cv_header_dmalloc_h = yes; then
18322  echo "$as_me:18322: checking for dmalloc_debug in -ldmalloc" >&5
18323echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
18324if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
18325  echo $ECHO_N "(cached) $ECHO_C" >&6
18326else
18327  ac_check_lib_save_LIBS=$LIBS
18328LIBS="-ldmalloc  $LIBS"
18329cat >conftest.$ac_ext <<_ACEOF
18330#line 18330 "configure"
18331#include "confdefs.h"
18332
18333/* Override any gcc2 internal prototype to avoid an error.  */
18334#ifdef __cplusplus
18335extern "C"
18336#endif
18337/* We use char because int might match the return type of a gcc2
18338   builtin and then its argument prototype would still apply.  */
18339char dmalloc_debug ();
18340int
18341main (void)
18342{
18343dmalloc_debug ();
18344  ;
18345  return 0;
18346}
18347_ACEOF
18348rm -f conftest.$ac_objext conftest$ac_exeext
18349if { (eval echo "$as_me:18349: \"$ac_link\"") >&5
18350  (eval $ac_link) 2>&5
18351  ac_status=$?
18352  echo "$as_me:18352: \$? = $ac_status" >&5
18353  (exit $ac_status); } &&
18354         { ac_try='test -s conftest$ac_exeext'
18355  { (eval echo "$as_me:18355: \"$ac_try\"") >&5
18356  (eval $ac_try) 2>&5
18357  ac_status=$?
18358  echo "$as_me:18358: \$? = $ac_status" >&5
18359  (exit $ac_status); }; }; then
18360  ac_cv_lib_dmalloc_dmalloc_debug=yes
18361else
18362  echo "$as_me: failed program was:" >&5
18363cat conftest.$ac_ext >&5
18364ac_cv_lib_dmalloc_dmalloc_debug=no
18365fi
18366rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18367LIBS=$ac_check_lib_save_LIBS
18368fi
18369echo "$as_me:18369: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
18370echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
18371if test $ac_cv_lib_dmalloc_dmalloc_debug = yes; then
18372  debug_malloc=DMALLOC
18373fi
18374
18375fi
18376
18377fi
18378
18379# Check whether --with-trace or --without-trace was given.
18380if test "${with_trace+set}" = set; then
18381  withval="$with_trace"
18382
18383	echo "$as_me:18383: checking for _tracef" >&5
18384echo $ECHO_N "checking for _tracef... $ECHO_C" >&6
18385if test "${ac_cv_func__tracef+set}" = set; then
18386  echo $ECHO_N "(cached) $ECHO_C" >&6
18387else
18388  cat >conftest.$ac_ext <<_ACEOF
18389#line 18389 "configure"
18390#include "confdefs.h"
18391#define _tracef autoconf_temporary
18392#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18393#undef _tracef
18394
18395#ifdef __cplusplus
18396extern "C"
18397#endif
18398
18399/* We use char because int might match the return type of a gcc2
18400   builtin and then its argument prototype would still apply.  */
18401char _tracef (void);
18402
18403int
18404main (void)
18405{
18406
18407/* The GNU C library defines stubs for functions which it implements
18408    to always fail with ENOSYS.  Some functions are actually named
18409    something starting with __ and the normal name is an alias.  */
18410#if defined (__stub__tracef) || defined (__stub____tracef)
18411#error found stub for _tracef
18412#endif
18413
18414	return _tracef ();
18415  ;
18416  return 0;
18417}
18418_ACEOF
18419rm -f conftest.$ac_objext conftest$ac_exeext
18420if { (eval echo "$as_me:18420: \"$ac_link\"") >&5
18421  (eval $ac_link) 2>&5
18422  ac_status=$?
18423  echo "$as_me:18423: \$? = $ac_status" >&5
18424  (exit $ac_status); } &&
18425         { ac_try='test -s conftest$ac_exeext'
18426  { (eval echo "$as_me:18426: \"$ac_try\"") >&5
18427  (eval $ac_try) 2>&5
18428  ac_status=$?
18429  echo "$as_me:18429: \$? = $ac_status" >&5
18430  (exit $ac_status); }; }; then
18431  ac_cv_func__tracef=yes
18432else
18433  echo "$as_me: failed program was:" >&5
18434cat conftest.$ac_ext >&5
18435ac_cv_func__tracef=no
18436fi
18437rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18438fi
18439echo "$as_me:18439: result: $ac_cv_func__tracef" >&5
18440echo "${ECHO_T}$ac_cv_func__tracef" >&6
18441if test $ac_cv_func__tracef = yes; then
18442
18443cat >>confdefs.h <<\EOF
18444#define HAVE__TRACEF 1
18445EOF
18446
18447else
18448
18449	as_ac_Lib=`echo "ac_cv_lib_${cf_with_screen}_g''__tracef" | $as_tr_sh`
18450echo "$as_me:18450: checking for _tracef in -l${cf_with_screen}_g" >&5
18451echo $ECHO_N "checking for _tracef in -l${cf_with_screen}_g... $ECHO_C" >&6
18452if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18453  echo $ECHO_N "(cached) $ECHO_C" >&6
18454else
18455  ac_check_lib_save_LIBS=$LIBS
18456LIBS="-l${cf_with_screen}_g  $LIBS"
18457cat >conftest.$ac_ext <<_ACEOF
18458#line 18458 "configure"
18459#include "confdefs.h"
18460
18461/* Override any gcc2 internal prototype to avoid an error.  */
18462#ifdef __cplusplus
18463extern "C"
18464#endif
18465/* We use char because int might match the return type of a gcc2
18466   builtin and then its argument prototype would still apply.  */
18467char _tracef ();
18468int
18469main (void)
18470{
18471_tracef ();
18472  ;
18473  return 0;
18474}
18475_ACEOF
18476rm -f conftest.$ac_objext conftest$ac_exeext
18477if { (eval echo "$as_me:18477: \"$ac_link\"") >&5
18478  (eval $ac_link) 2>&5
18479  ac_status=$?
18480  echo "$as_me:18480: \$? = $ac_status" >&5
18481  (exit $ac_status); } &&
18482         { ac_try='test -s conftest$ac_exeext'
18483  { (eval echo "$as_me:18483: \"$ac_try\"") >&5
18484  (eval $ac_try) 2>&5
18485  ac_status=$?
18486  echo "$as_me:18486: \$? = $ac_status" >&5
18487  (exit $ac_status); }; }; then
18488  eval "$as_ac_Lib=yes"
18489else
18490  echo "$as_me: failed program was:" >&5
18491cat conftest.$ac_ext >&5
18492eval "$as_ac_Lib=no"
18493fi
18494rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
18495LIBS=$ac_check_lib_save_LIBS
18496fi
18497echo "$as_me:18497: result: `eval echo '${'$as_ac_Lib'}'`" >&5
18498echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
18499if test `eval echo '${'$as_ac_Lib'}'` = yes; then
18500  cat >>confdefs.h <<\EOF
18501#define HAVE__TRACEF 1
18502EOF
18503
18504		 LIBS=`echo "$LIBS" | sed -e s/-l${cf_with_screen}// -e s/-lcurses//`
18505		 LIBS="-l${cf_with_screen}_g $LIBS"
18506		 use_trace=yes
18507
18508cat >>confdefs.h <<\EOF
18509#define USE_TRACE 1
18510EOF
18511
18512		 EXTRAO_DEP=''
18513		 EXTRAOBJS="$EXTRAOBJS \$(OBJDIR)/trace.o"
18514else
18515  use_trace=no
18516fi
18517
18518fi
18519
18520else
18521  use_trace=no
18522fi;
18523#AC_MSG_CHECKING(if you want debugging-trace)
18524#AC_MSG_RESULT($use_trace)
18525
18526## options for miscellaneous definitions
18527echo "$as_me:18527: checking for domain-name" >&5
18528echo $ECHO_N "checking for domain-name... $ECHO_C" >&6
18529
18530# Check whether --with-domain-name or --without-domain-name was given.
18531if test "${with_domain_name+set}" = set; then
18532  withval="$with_domain_name"
18533
18534else
18535  withval="${DOMAIN_NAME}"
18536fi; test -n "$withval" && \
18537case "$withval" in #(vi
18538yes)
18539  { { echo "$as_me:18539: error: expected a value for --with-domain-name" >&5
18540echo "$as_me: error: expected a value for --with-domain-name" >&2;}
18541   { (exit 1); exit 1; }; }
18542  ;; #(vi
18543no) withval=""
18544  ;;
18545esac
18546DOMAIN_NAME="$withval"
18547
18548if test "$DOMAIN_NAME" != ""; then
18549
18550cat >>confdefs.h <<EOF
18551#define DOMAIN_NAME "$DOMAIN_NAME"
18552EOF
18553
18554fi
18555echo "$as_me:18555: result: $DOMAIN_NAME" >&5
18556echo "${ECHO_T}$DOMAIN_NAME" >&6
18557
18558if test "$USE_NNTP" = "yes" ; then
18559echo "$as_me:18559: checking for NNTP default-server" >&5
18560echo $ECHO_N "checking for NNTP default-server... $ECHO_C" >&6
18561
18562# Check whether --with-nntp-default-server or --without-nntp-default-server was given.
18563if test "${with_nntp_default_server+set}" = set; then
18564  withval="$with_nntp_default_server"
18565
18566else
18567  withval="${NNTP_DEFAULT_SERVER-news.$DOMAIN_NAME}"
18568fi; test -z "$withval" && withval=no
18569case "$withval" in #(vi
18570yes)
18571  { { echo "$as_me:18571: error: expected a value for --with-nntp-default-server" >&5
18572echo "$as_me: error: expected a value for --with-nntp-default-server" >&2;}
18573   { (exit 1); exit 1; }; }
18574  ;; #(vi
18575no) withval=""
18576  ;;
18577esac
18578NNTP_DEFAULT_SERVER="$withval"
18579
18580    if test "$NNTP_DEFAULT_SERVER" = "" ; then
18581	if test "$DOMAIN_NAME" != "" ; then
18582		test -z "$NNTP_DEFAULT_SERVER" && \
18583		case "$DOMAIN_NAME" in #(((
18584	 	/*)
18585			if test -r "$DOMAIN_NAME" ; then
18586				NNTP_DEFAULT_SERVER="news.`cat $DOMAIN_NAME`"
18587			else
18588				NNTP_DEFAULT_SERVER="news"
18589			fi
18590			;;
18591	 	*)
18592			NNTP_DEFAULT_SERVER="news.$DOMAIN_NAME"
18593			;;
18594	 	esac
18595	else
18596		NNTP_DEFAULT_SERVER="news"
18597	fi
18598    fi
18599echo "$as_me:18599: result: $NNTP_DEFAULT_SERVER" >&5
18600echo "${ECHO_T}$NNTP_DEFAULT_SERVER" >&6
18601fi
18602
18603## These options are interdependent, so we delay defining them til now:
18604test -n "$NNTP_DEFAULT_SERVER" \
18605	&&
18606cat >>confdefs.h <<EOF
18607#define NNTP_DEFAULT_SERVER "$NNTP_DEFAULT_SERVER"
18608EOF
18609
18610test ".$INEWSDIR" != ".$NEWSLIBDIR" &&
18611cat >>confdefs.h <<EOF
18612#define INEWSDIR "$INEWSDIR"
18613EOF
18614
18615cat >>confdefs.h <<EOF
18616#define NEWSLIBDIR "$NEWSLIBDIR"
18617EOF
18618
18619cat >>confdefs.h <<EOF
18620#define NOVROOTDIR "$NOVROOTDIR"
18621EOF
18622
18623cat >>confdefs.h <<EOF
18624#define SPOOLDIR "$SPOOLDIR"
18625EOF
18626
18627## optional features
18628echo "$as_me:18628: checking whether to use MH style mail handling for mailgroups" >&5
18629echo $ECHO_N "checking whether to use MH style mail handling for mailgroups... $ECHO_C" >&6
18630
18631# Check whether --enable-mh-mail-handling or --disable-mh-mail-handling was given.
18632if test "${enable_mh_mail_handling+set}" = set; then
18633  enableval="$enable_mh_mail_handling"
18634  test "$enableval" != yes && enableval=no
18635	if test "$enableval" != "no" ; then
18636
18637cat >>confdefs.h <<\EOF
18638#define HAVE_MH_MAIL_HANDLING 1
18639EOF
18640
18641	fi
18642else
18643  enableval=no
18644fi;
18645echo "$as_me:18645: result: $enableval" >&5
18646echo "${ECHO_T}$enableval" >&6
18647
18648echo "$as_me:18648: checking whether to use Cancel-Locks" >&5
18649echo $ECHO_N "checking whether to use Cancel-Locks... $ECHO_C" >&6
18650
18651# Check whether --enable-cancel-locks or --disable-cancel-locks was given.
18652if test "${enable_cancel_locks+set}" = set; then
18653  enableval="$enable_cancel_locks"
18654  test "$enableval" != yes && enableval=no
18655	if test "$enableval" != "no" ; then
18656    :
18657	fi
18658else
18659  enableval=no
18660fi;
18661echo "$as_me:18661: result: $enableval" >&5
18662echo "${ECHO_T}$enableval" >&6
18663USE_CANLOCK=$enableval
18664
18665if test "$USE_CANLOCK" = yes ; then
18666	echo "$as_me:18666: checking whether to use installed canlock rather than bundled" >&5
18667echo $ECHO_N "checking whether to use installed canlock rather than bundled... $ECHO_C" >&6
18668
18669# Check whether --with-canlock or --without-canlock was given.
18670if test "${with_canlock+set}" = set; then
18671  withval="$with_canlock"
18672  CANLOCK_HOME=$withval
18673else
18674  CANLOCK_HOME=$USE_CANLOCK
18675fi;
18676	echo "$as_me:18676: result: $CANLOCK_HOME" >&5
18677echo "${ECHO_T}$CANLOCK_HOME" >&6
18678
18679cf_canlock_home=$CANLOCK_HOME
18680CANDIR_MAKE=
18681CANLIBS=
18682CAN_CPPFLAGS=
18683CAN_MAKEFILE=
18684
18685case .$cf_canlock_home in #(vi
18686.no) #(vi
18687	test -n "$verbose" && echo "	using bundled canlock" 1>&6
18688
18689echo "${as_me:-configure}:18689: testing using bundled canlock ..." 1>&5
18690
18691	CANLIBS='-L../libcanlock -lcanlock'
18692	CAN_CPPFLAGS='-I$(top_builddir)/libcanlock/include -I$(top_srcdir)/libcanlock/include'
18693	CAN_MAKEFILE='libcanlock/Makefile'
18694	;;
18695.yes) #(vi
18696
18697cf_save_CFLAGS="$CFLAGS"
18698cf_save_LIBS="$LIBS"
18699cf_find_CANLOCK=yes
18700
18701if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libcanlock3; then
18702	test -n "$verbose" && echo "	found package libcanlock3" 1>&6
18703
18704echo "${as_me:-configure}:18704: testing found package libcanlock3 ..." 1>&5
18705
18706	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libcanlock3 2>/dev/null`"
18707	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libcanlock3 2>/dev/null`"
18708	test -n "$verbose" && echo "	package libcanlock3 CFLAGS: $cf_pkgconfig_incs" 1>&6
18709
18710echo "${as_me:-configure}:18710: testing package libcanlock3 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18711
18712	test -n "$verbose" && echo "	package libcanlock3 LIBS: $cf_pkgconfig_libs" 1>&6
18713
18714echo "${as_me:-configure}:18714: testing package libcanlock3 LIBS: $cf_pkgconfig_libs ..." 1>&5
18715
18716cf_fix_cppflags=no
18717cf_new_cflags=
18718cf_new_cppflags=
18719cf_new_extra_cppflags=
18720
18721for cf_add_cflags in $cf_pkgconfig_incs
18722do
18723case $cf_fix_cppflags in
18724no)
18725	case $cf_add_cflags in
18726	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18727		case $cf_add_cflags in
18728		-D*)
18729			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18730
18731			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18732				&& test -z "${cf_tst_cflags}" \
18733				&& cf_fix_cppflags=yes
18734
18735			if test $cf_fix_cppflags = yes ; then
18736
18737	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18738	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18739
18740				continue
18741			elif test "${cf_tst_cflags}" = "\"'" ; then
18742
18743	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18744	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18745
18746				continue
18747			fi
18748			;;
18749		esac
18750		case "$CPPFLAGS" in
18751		*$cf_add_cflags)
18752			;;
18753		*)
18754			case $cf_add_cflags in
18755			-D*)
18756				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18757
18758CPPFLAGS=`echo "$CPPFLAGS" | \
18759	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18760		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18761
18762				;;
18763			esac
18764
18765	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18766	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18767
18768			;;
18769		esac
18770		;;
18771	*)
18772
18773	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18774	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18775
18776		;;
18777	esac
18778	;;
18779yes)
18780
18781	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18782	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18783
18784	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18785
18786	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18787		&& test -z "${cf_tst_cflags}" \
18788		&& cf_fix_cppflags=no
18789	;;
18790esac
18791done
18792
18793if test -n "$cf_new_cflags" ; then
18794
18795	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18796	CFLAGS="${CFLAGS}$cf_new_cflags"
18797
18798fi
18799
18800if test -n "$cf_new_cppflags" ; then
18801
18802	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18803	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18804
18805fi
18806
18807if test -n "$cf_new_extra_cppflags" ; then
18808
18809	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18810	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18811
18812fi
18813
18814cf_add_libs="$LIBS"
18815# reverse order
18816cf_add_0lib=
18817for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18818# filter duplicates
18819for cf_add_1lib in $cf_add_0lib; do
18820	for cf_add_2lib in $cf_add_libs; do
18821		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18822			cf_add_1lib=
18823			break
18824		fi
18825	done
18826	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18827done
18828LIBS="$cf_add_libs"
18829
18830	:
18831else
18832	cf_pkgconfig_incs=
18833	cf_pkgconfig_libs=
18834
18835if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists libcanlock; then
18836	test -n "$verbose" && echo "	found package libcanlock" 1>&6
18837
18838echo "${as_me:-configure}:18838: testing found package libcanlock ..." 1>&5
18839
18840	cf_pkgconfig_incs="`$PKG_CONFIG --cflags libcanlock 2>/dev/null`"
18841	cf_pkgconfig_libs="`$PKG_CONFIG --libs   libcanlock 2>/dev/null`"
18842	test -n "$verbose" && echo "	package libcanlock CFLAGS: $cf_pkgconfig_incs" 1>&6
18843
18844echo "${as_me:-configure}:18844: testing package libcanlock CFLAGS: $cf_pkgconfig_incs ..." 1>&5
18845
18846	test -n "$verbose" && echo "	package libcanlock LIBS: $cf_pkgconfig_libs" 1>&6
18847
18848echo "${as_me:-configure}:18848: testing package libcanlock LIBS: $cf_pkgconfig_libs ..." 1>&5
18849
18850cf_fix_cppflags=no
18851cf_new_cflags=
18852cf_new_cppflags=
18853cf_new_extra_cppflags=
18854
18855for cf_add_cflags in $cf_pkgconfig_incs
18856do
18857case $cf_fix_cppflags in
18858no)
18859	case $cf_add_cflags in
18860	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
18861		case $cf_add_cflags in
18862		-D*)
18863			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
18864
18865			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18866				&& test -z "${cf_tst_cflags}" \
18867				&& cf_fix_cppflags=yes
18868
18869			if test $cf_fix_cppflags = yes ; then
18870
18871	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18872	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18873
18874				continue
18875			elif test "${cf_tst_cflags}" = "\"'" ; then
18876
18877	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18878	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18879
18880				continue
18881			fi
18882			;;
18883		esac
18884		case "$CPPFLAGS" in
18885		*$cf_add_cflags)
18886			;;
18887		*)
18888			case $cf_add_cflags in
18889			-D*)
18890				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
18891
18892CPPFLAGS=`echo "$CPPFLAGS" | \
18893	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
18894		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
18895
18896				;;
18897			esac
18898
18899	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
18900	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
18901
18902			;;
18903		esac
18904		;;
18905	*)
18906
18907	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
18908	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
18909
18910		;;
18911	esac
18912	;;
18913yes)
18914
18915	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
18916	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
18917
18918	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
18919
18920	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
18921		&& test -z "${cf_tst_cflags}" \
18922		&& cf_fix_cppflags=no
18923	;;
18924esac
18925done
18926
18927if test -n "$cf_new_cflags" ; then
18928
18929	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
18930	CFLAGS="${CFLAGS}$cf_new_cflags"
18931
18932fi
18933
18934if test -n "$cf_new_cppflags" ; then
18935
18936	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18937	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
18938
18939fi
18940
18941if test -n "$cf_new_extra_cppflags" ; then
18942
18943	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
18944	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
18945
18946fi
18947
18948cf_add_libs="$LIBS"
18949# reverse order
18950cf_add_0lib=
18951for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18952# filter duplicates
18953for cf_add_1lib in $cf_add_0lib; do
18954	for cf_add_2lib in $cf_add_libs; do
18955		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18956			cf_add_1lib=
18957			break
18958		fi
18959	done
18960	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18961done
18962LIBS="$cf_add_libs"
18963
18964	:
18965else
18966	cf_pkgconfig_incs=
18967	cf_pkgconfig_libs=
18968
18969		cf_pkgconfig_incs=
18970		cf_pkgconfig_libs=
18971		for cf_canlock_lib in canlock3 canlock
18972		do
18973			as_ac_Lib=`echo "ac_cv_lib_$cf_canlock_lib''_cl_clear_secret" | $as_tr_sh`
18974echo "$as_me:18974: checking for cl_clear_secret in -l$cf_canlock_lib" >&5
18975echo $ECHO_N "checking for cl_clear_secret in -l$cf_canlock_lib... $ECHO_C" >&6
18976if eval "test \"\${$as_ac_Lib+set}\" = set"; then
18977  echo $ECHO_N "(cached) $ECHO_C" >&6
18978else
18979  ac_check_lib_save_LIBS=$LIBS
18980LIBS="-l$cf_canlock_lib  $LIBS"
18981cat >conftest.$ac_ext <<_ACEOF
18982#line 18982 "configure"
18983#include "confdefs.h"
18984
18985/* Override any gcc2 internal prototype to avoid an error.  */
18986#ifdef __cplusplus
18987extern "C"
18988#endif
18989/* We use char because int might match the return type of a gcc2
18990   builtin and then its argument prototype would still apply.  */
18991char cl_clear_secret ();
18992int
18993main (void)
18994{
18995cl_clear_secret ();
18996  ;
18997  return 0;
18998}
18999_ACEOF
19000rm -f conftest.$ac_objext conftest$ac_exeext
19001if { (eval echo "$as_me:19001: \"$ac_link\"") >&5
19002  (eval $ac_link) 2>&5
19003  ac_status=$?
19004  echo "$as_me:19004: \$? = $ac_status" >&5
19005  (exit $ac_status); } &&
19006         { ac_try='test -s conftest$ac_exeext'
19007  { (eval echo "$as_me:19007: \"$ac_try\"") >&5
19008  (eval $ac_try) 2>&5
19009  ac_status=$?
19010  echo "$as_me:19010: \$? = $ac_status" >&5
19011  (exit $ac_status); }; }; then
19012  eval "$as_ac_Lib=yes"
19013else
19014  echo "$as_me: failed program was:" >&5
19015cat conftest.$ac_ext >&5
19016eval "$as_ac_Lib=no"
19017fi
19018rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19019LIBS=$ac_check_lib_save_LIBS
19020fi
19021echo "$as_me:19021: result: `eval echo '${'$as_ac_Lib'}'`" >&5
19022echo "${ECHO_T}`eval echo '${'$as_ac_Lib'}'`" >&6
19023if test `eval echo '${'$as_ac_Lib'}'` = yes; then
19024
19025				cf_pkgconfig_libs="-l$cf_canlock_lib"
19026				break
19027
19028fi
19029
19030		done
19031		if test -z "$cf_pkgconfig_libs" ; then
19032			cf_find_CANLOCK=no
19033		else
19034
19035for ac_header in libcanlock-3/canlock.h canlock.h
19036do
19037as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
19038echo "$as_me:19038: checking for $ac_header" >&5
19039echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
19040if eval "test \"\${$as_ac_Header+set}\" = set"; then
19041  echo $ECHO_N "(cached) $ECHO_C" >&6
19042else
19043  cat >conftest.$ac_ext <<_ACEOF
19044#line 19044 "configure"
19045#include "confdefs.h"
19046#include <$ac_header>
19047_ACEOF
19048if { (eval echo "$as_me:19048: \"$ac_cpp conftest.$ac_ext\"") >&5
19049  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19050  ac_status=$?
19051  egrep -v '^ *\+' conftest.er1 >conftest.err
19052  rm -f conftest.er1
19053  cat conftest.err >&5
19054  echo "$as_me:19054: \$? = $ac_status" >&5
19055  (exit $ac_status); } >/dev/null; then
19056  if test -s conftest.err; then
19057    ac_cpp_err=$ac_c_preproc_warn_flag
19058  else
19059    ac_cpp_err=
19060  fi
19061else
19062  ac_cpp_err=yes
19063fi
19064if test -z "$ac_cpp_err"; then
19065  eval "$as_ac_Header=yes"
19066else
19067  echo "$as_me: failed program was:" >&5
19068  cat conftest.$ac_ext >&5
19069  eval "$as_ac_Header=no"
19070fi
19071rm -f conftest.err conftest.$ac_ext
19072fi
19073echo "$as_me:19073: result: `eval echo '${'$as_ac_Header'}'`" >&5
19074echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
19075if test `eval echo '${'$as_ac_Header'}'` = yes; then
19076  cat >>confdefs.h <<EOF
19077#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
19078EOF
19079
19080fi
19081done
19082
19083		fi
19084
19085fi
19086
19087fi
19088
19089CFLAGS="$cf_save_CFLAGS"
19090LIBS="$cf_save_LIBS"
19091
19092cf_canlock_cppflags="$cf_pkgconfig_incs"
19093cf_canlock_libs="$cf_pkgconfig_libs"
19094
19095if test "$cf_find_CANLOCK" = yes; then
19096
19097			CANDIR_MAKE='#'
19098			CANLIBS="$cf_canlock_libs"
19099			CAN_CPPFLAGS="$cf_canlock_cppflags"
19100			test -n "$verbose" && echo "	using installed canlock" 1>&6
19101
19102echo "${as_me:-configure}:19102: testing using installed canlock ..." 1>&5
19103
19104else
19105
19106			test -n "$verbose" && echo "	using bundled canlock because no installed canlock was found" 1>&6
19107
19108echo "${as_me:-configure}:19108: testing using bundled canlock because no installed canlock was found ..." 1>&5
19109
19110			CANLIBS='-L../libcanlock -lcanlock'
19111			CAN_CPPFLAGS='-I$(top_builddir)/libcanlock/include -I$(top_srcdir)/libcanlock/include'
19112			CAN_MAKEFILE='libcanlock/Makefile'
19113
19114fi
19115
19116	;;
19117.*)
19118
19119if test "x$prefix" != xNONE; then
19120	cf_path_syntax="$prefix"
19121else
19122	cf_path_syntax="$ac_default_prefix"
19123fi
19124
19125case ".$cf_canlock_home" in
19126.\$\(*\)*|.\'*\'*)
19127	;;
19128..|./*|.\\*)
19129	;;
19130.[a-zA-Z]:[\\/]*) # OS/2 EMX
19131	;;
19132.\${*prefix}*|.\${*dir}*)
19133	eval cf_canlock_home="$cf_canlock_home"
19134	case ".$cf_canlock_home" in
19135	.NONE/*)
19136		cf_canlock_home=`echo $cf_canlock_home | sed -e s%NONE%$cf_path_syntax%`
19137		;;
19138	esac
19139	;;
19140.no|.NONE/*)
19141	cf_canlock_home=`echo $cf_canlock_home | sed -e s%NONE%$cf_path_syntax%`
19142	;;
19143*)
19144	{ { echo "$as_me:19144: error: expected a pathname, not \"$cf_canlock_home\"" >&5
19145echo "$as_me: error: expected a pathname, not \"$cf_canlock_home\"" >&2;}
19146   { (exit 1); exit 1; }; }
19147	;;
19148esac
19149
19150	CANDIR_MAKE='#'
19151	CANLIBS="-L${cf_canlock_home}/lib -lcanlock"
19152	CAN_CPPFLAGS="-I${cf_canlock_home}/include"
19153	test -n "$verbose" && echo "	using installed canlock $cf_canlock_home" 1>&6
19154
19155echo "${as_me:-configure}:19155: testing using installed canlock $cf_canlock_home ..." 1>&5
19156
19157	;;
19158esac
19159
19160cat >>confdefs.h <<\EOF
19161#define USE_CANLOCK 1
19162EOF
19163
19164else
19165	CANDIR_MAKE='#'
19166fi
19167
19168## gsasl - used for AUTH SASL PLAIN
19169gsasl=no
19170echo "$as_me:19170: checking for gsasl.h" >&5
19171echo $ECHO_N "checking for gsasl.h... $ECHO_C" >&6
19172if test "${ac_cv_header_gsasl_h+set}" = set; then
19173  echo $ECHO_N "(cached) $ECHO_C" >&6
19174else
19175  cat >conftest.$ac_ext <<_ACEOF
19176#line 19176 "configure"
19177#include "confdefs.h"
19178#include <gsasl.h>
19179_ACEOF
19180if { (eval echo "$as_me:19180: \"$ac_cpp conftest.$ac_ext\"") >&5
19181  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
19182  ac_status=$?
19183  egrep -v '^ *\+' conftest.er1 >conftest.err
19184  rm -f conftest.er1
19185  cat conftest.err >&5
19186  echo "$as_me:19186: \$? = $ac_status" >&5
19187  (exit $ac_status); } >/dev/null; then
19188  if test -s conftest.err; then
19189    ac_cpp_err=$ac_c_preproc_warn_flag
19190  else
19191    ac_cpp_err=
19192  fi
19193else
19194  ac_cpp_err=yes
19195fi
19196if test -z "$ac_cpp_err"; then
19197  ac_cv_header_gsasl_h=yes
19198else
19199  echo "$as_me: failed program was:" >&5
19200  cat conftest.$ac_ext >&5
19201  ac_cv_header_gsasl_h=no
19202fi
19203rm -f conftest.err conftest.$ac_ext
19204fi
19205echo "$as_me:19205: result: $ac_cv_header_gsasl_h" >&5
19206echo "${ECHO_T}$ac_cv_header_gsasl_h" >&6
19207if test $ac_cv_header_gsasl_h = yes; then
19208  echo "$as_me:19208: checking for gsasl_check_version in -lgsasl" >&5
19209echo $ECHO_N "checking for gsasl_check_version in -lgsasl... $ECHO_C" >&6
19210if test "${ac_cv_lib_gsasl_gsasl_check_version+set}" = set; then
19211  echo $ECHO_N "(cached) $ECHO_C" >&6
19212else
19213  ac_check_lib_save_LIBS=$LIBS
19214LIBS="-lgsasl  $LIBS"
19215cat >conftest.$ac_ext <<_ACEOF
19216#line 19216 "configure"
19217#include "confdefs.h"
19218
19219/* Override any gcc2 internal prototype to avoid an error.  */
19220#ifdef __cplusplus
19221extern "C"
19222#endif
19223/* We use char because int might match the return type of a gcc2
19224   builtin and then its argument prototype would still apply.  */
19225char gsasl_check_version ();
19226int
19227main (void)
19228{
19229gsasl_check_version ();
19230  ;
19231  return 0;
19232}
19233_ACEOF
19234rm -f conftest.$ac_objext conftest$ac_exeext
19235if { (eval echo "$as_me:19235: \"$ac_link\"") >&5
19236  (eval $ac_link) 2>&5
19237  ac_status=$?
19238  echo "$as_me:19238: \$? = $ac_status" >&5
19239  (exit $ac_status); } &&
19240         { ac_try='test -s conftest$ac_exeext'
19241  { (eval echo "$as_me:19241: \"$ac_try\"") >&5
19242  (eval $ac_try) 2>&5
19243  ac_status=$?
19244  echo "$as_me:19244: \$? = $ac_status" >&5
19245  (exit $ac_status); }; }; then
19246  ac_cv_lib_gsasl_gsasl_check_version=yes
19247else
19248  echo "$as_me: failed program was:" >&5
19249cat conftest.$ac_ext >&5
19250ac_cv_lib_gsasl_gsasl_check_version=no
19251fi
19252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
19253LIBS=$ac_check_lib_save_LIBS
19254fi
19255echo "$as_me:19255: result: $ac_cv_lib_gsasl_gsasl_check_version" >&5
19256echo "${ECHO_T}$ac_cv_lib_gsasl_gsasl_check_version" >&6
19257if test $ac_cv_lib_gsasl_gsasl_check_version = yes; then
19258  gsasl=yes
19259fi
19260
19261fi
19262
19263if test "$gsasl" = "yes"; then
19264
19265# Check whether --enable-gsasl or --disable-gsasl was given.
19266if test "${enable_gsasl+set}" = set; then
19267  enableval="$enable_gsasl"
19268  test "$enableval" != no && enableval=yes
19269	if test "$enableval" != "yes" ; then
19270    USE_SASL=no
19271	else
19272		USE_SASL=yes
19273
19274cat >>confdefs.h <<\EOF
19275#define USE_SASL 1
19276EOF
19277
19278		LIBS="$LIBS -lgsasl"
19279	fi
19280else
19281  enableval=yes
19282	USE_SASL=yes
19283
19284cat >>confdefs.h <<\EOF
19285#define USE_SASL 1
19286EOF
19287
19288		LIBS="$LIBS -lgsasl"
19289
19290fi;
19291fi
19292
19293echo "$as_me:19293: checking whether to enable 8-bit keycodes" >&5
19294echo $ECHO_N "checking whether to enable 8-bit keycodes... $ECHO_C" >&6
19295
19296# Check whether --enable-8bit-keys or --disable-8bit-keys was given.
19297if test "${enable_8bit_keys+set}" = set; then
19298  enableval="$enable_8bit_keys"
19299  test "$enableval" != no && enableval=yes
19300	if test "$enableval" != "yes" ; then
19301    :
19302	else
19303
19304cat >>confdefs.h <<\EOF
19305#define HAVE_KEY_PREFIX 1
19306EOF
19307
19308	fi
19309else
19310  enableval=yes
19311
19312cat >>confdefs.h <<\EOF
19313#define HAVE_KEY_PREFIX 1
19314EOF
19315
19316fi;
19317echo "$as_me:19317: result: $enableval" >&5
19318echo "${ECHO_T}$enableval" >&6
19319
19320echo "$as_me:19320: checking whether to enable ANSI-color" >&5
19321echo $ECHO_N "checking whether to enable ANSI-color... $ECHO_C" >&6
19322
19323# Check whether --enable-color or --disable-color was given.
19324if test "${enable_color+set}" = set; then
19325  enableval="$enable_color"
19326  test "$enableval" != no && enableval=yes
19327	if test "$enableval" != "yes" ; then
19328    :
19329	fi
19330else
19331  enableval=yes
19332fi;
19333use_color=$enableval
19334echo "$as_me:19334: result: $use_color" >&5
19335echo "${ECHO_T}$use_color" >&6
19336
19337echo "$as_me:19337: checking whether to enable posting-etiquette" >&5
19338echo $ECHO_N "checking whether to enable posting-etiquette... $ECHO_C" >&6
19339
19340# Check whether --enable-etiquette or --disable-etiquette was given.
19341if test "${enable_etiquette+set}" = set; then
19342  enableval="$enable_etiquette"
19343  test "$enableval" != no && enableval=yes
19344	if test "$enableval" != "yes" ; then
19345
19346cat >>confdefs.h <<\EOF
19347#define NO_ETIQUETTE 1
19348EOF
19349
19350	fi
19351else
19352  enableval=yes
19353fi;
19354echo "$as_me:19354: result: $enableval" >&5
19355echo "${ECHO_T}$enableval" >&6
19356
19357echo "$as_me:19357: checking whether to strictly observe RFC2047 and break long lines" >&5
19358echo $ECHO_N "checking whether to strictly observe RFC2047 and break long lines... $ECHO_C" >&6
19359
19360# Check whether --enable-break-long-lines or --disable-break-long-lines was given.
19361if test "${enable_break_long_lines+set}" = set; then
19362  enableval="$enable_break_long_lines"
19363  test "$enableval" != no && enableval=yes
19364	if test "$enableval" != "yes" ; then
19365    :
19366	else
19367
19368cat >>confdefs.h <<\EOF
19369#define MIME_BREAK_LONG_LINES 1
19370EOF
19371
19372	fi
19373else
19374  enableval=yes
19375
19376cat >>confdefs.h <<\EOF
19377#define MIME_BREAK_LONG_LINES 1
19378EOF
19379
19380fi;
19381echo "$as_me:19381: result: $enableval" >&5
19382echo "${ECHO_T}$enableval" >&6
19383
19384echo "$as_me:19384: checking whether to force MM_CHARSET obeyance when decoding mime" >&5
19385echo $ECHO_N "checking whether to force MM_CHARSET obeyance when decoding mime... $ECHO_C" >&6
19386
19387# Check whether --enable-mime-strict-charset or --disable-mime-strict-charset was given.
19388if test "${enable_mime_strict_charset+set}" = set; then
19389  enableval="$enable_mime_strict_charset"
19390  test "$enableval" != no && enableval=yes
19391	if test "$enableval" != "yes" ; then
19392    :
19393	else
19394
19395cat >>confdefs.h <<\EOF
19396#define MIME_STRICT_CHARSET 1
19397EOF
19398
19399	fi
19400else
19401  enableval=yes
19402
19403cat >>confdefs.h <<\EOF
19404#define MIME_STRICT_CHARSET 1
19405EOF
19406
19407fi;
19408echo "$as_me:19408: result: $enableval" >&5
19409echo "${ECHO_T}$enableval" >&6
19410
19411echo "$as_me:19411: checking for MIME character-set" >&5
19412echo $ECHO_N "checking for MIME character-set... $ECHO_C" >&6
19413
19414# Check whether --with-mime-default-charset or --without-mime-default-charset was given.
19415if test "${with_mime_default_charset+set}" = set; then
19416  withval="$with_mime_default_charset"
19417
19418else
19419  withval="${MM_CHARSET-US-ASCII}"
19420fi;
19421case "$withval" in #(vi
19422yes|no)
19423  { { echo "$as_me:19423: error: expected a value for --with-mime-default-charset" >&5
19424echo "$as_me: error: expected a value for --with-mime-default-charset" >&2;}
19425   { (exit 1); exit 1; }; }
19426  ;;
19427esac
19428MM_CHARSET="$withval"
19429
19430cat >>confdefs.h <<EOF
19431#define MM_CHARSET "$MM_CHARSET"
19432EOF
19433
19434echo "$as_me:19434: result: $MM_CHARSET" >&5
19435echo "${ECHO_T}$MM_CHARSET" >&6
19436
19437echo "$as_me:19437: checking for default ISO/ASCII table" >&5
19438echo $ECHO_N "checking for default ISO/ASCII table... $ECHO_C" >&6
19439
19440# Check whether --with-iso-to-ascii or --without-iso-to-ascii was given.
19441if test "${with_iso_to_ascii+set}" = set; then
19442  withval="$with_iso_to_ascii"
19443
19444else
19445  withval="${DEFAULT_ISO2ASC--1}"
19446fi;
19447case "$withval" in #(vi
19448yes|no)
19449  { { echo "$as_me:19449: error: expected a value for --with-iso-to-ascii" >&5
19450echo "$as_me: error: expected a value for --with-iso-to-ascii" >&2;}
19451   { (exit 1); exit 1; }; }
19452  ;;
19453esac
19454DEFAULT_ISO2ASC="$withval"
19455
19456cat >>confdefs.h <<EOF
19457#define DEFAULT_ISO2ASC "$DEFAULT_ISO2ASC"
19458EOF
19459
19460echo "$as_me:19460: result: $DEFAULT_ISO2ASC" >&5
19461echo "${ECHO_T}$DEFAULT_ISO2ASC" >&6
19462
19463echo "$as_me:19463: checking whether to enable locale support" >&5
19464echo $ECHO_N "checking whether to enable locale support... $ECHO_C" >&6
19465
19466# Check whether --enable-locale or --disable-locale was given.
19467if test "${enable_locale+set}" = set; then
19468  enableval="$enable_locale"
19469  test "$enableval" != no && enableval=yes
19470	if test "$enableval" != "yes" ; then
19471
19472cat >>confdefs.h <<\EOF
19473#define NO_LOCALE 1
19474EOF
19475
19476	fi
19477else
19478  enableval=yes
19479fi;
19480echo "$as_me:19480: result: $enableval" >&5
19481echo "${ECHO_T}$enableval" >&6
19482
19483echo "$as_me:19483: checking whether to enable posting" >&5
19484echo $ECHO_N "checking whether to enable posting... $ECHO_C" >&6
19485
19486# Check whether --enable-posting or --disable-posting was given.
19487if test "${enable_posting+set}" = set; then
19488  enableval="$enable_posting"
19489  test "$enableval" != no && enableval=yes
19490	if test "$enableval" != "yes" ; then
19491
19492cat >>confdefs.h <<\EOF
19493#define NO_POSTING 1
19494EOF
19495
19496	fi
19497else
19498  enableval=yes
19499fi;
19500echo "$as_me:19500: result: $enableval" >&5
19501echo "${ECHO_T}$enableval" >&6
19502
19503echo "$as_me:19503: checking whether to enable shell escape" >&5
19504echo $ECHO_N "checking whether to enable shell escape... $ECHO_C" >&6
19505
19506# Check whether --enable-shell-escape or --disable-shell-escape was given.
19507if test "${enable_shell_escape+set}" = set; then
19508  enableval="$enable_shell_escape"
19509  test "$enableval" != no && enableval=yes
19510	if test "$enableval" != "yes" ; then
19511
19512cat >>confdefs.h <<\EOF
19513#define NO_SHELL_ESCAPE 1
19514EOF
19515
19516	fi
19517else
19518  enableval=yes
19519fi;
19520echo "$as_me:19520: result: $enableval" >&5
19521echo "${ECHO_T}$enableval" >&6
19522
19523echo "$as_me:19523: checking whether to have fascist newsadmin" >&5
19524echo $ECHO_N "checking whether to have fascist newsadmin... $ECHO_C" >&6
19525
19526# Check whether --enable-fascist-newsadmin or --disable-fascist-newsadmin was given.
19527if test "${enable_fascist_newsadmin+set}" = set; then
19528  enableval="$enable_fascist_newsadmin"
19529  test "$enableval" != yes && enableval=no
19530	if test "$enableval" != "no" ; then
19531
19532cat >>confdefs.h <<\EOF
19533#define HAVE_FASCIST_NEWSADMIN 1
19534EOF
19535
19536	fi
19537else
19538  enableval=no
19539fi;
19540echo "$as_me:19540: result: $enableval" >&5
19541echo "${ECHO_T}$enableval" >&6
19542
19543echo "$as_me:19543: checking whether to enable inverse video and highlighting" >&5
19544echo $ECHO_N "checking whether to enable inverse video and highlighting... $ECHO_C" >&6
19545
19546# Check whether --enable-inverse-video or --disable-inverse-video was given.
19547if test "${enable_inverse_video+set}" = set; then
19548  enableval="$enable_inverse_video"
19549  test "$enableval" != no && enableval=yes
19550	if test "$enableval" != "yes" ; then
19551
19552cat >>confdefs.h <<\EOF
19553#define USE_INVERSE_HACK 1
19554EOF
19555
19556	fi
19557else
19558  enableval=yes
19559fi;
19560echo "$as_me:19560: result: $enableval" >&5
19561echo "${ECHO_T}$enableval" >&6
19562
19563echo "$as_me:19563: checking whether to enable piping support" >&5
19564echo $ECHO_N "checking whether to enable piping support... $ECHO_C" >&6
19565
19566# Check whether --enable-piping or --disable-piping was given.
19567if test "${enable_piping+set}" = set; then
19568  enableval="$enable_piping"
19569  test "$enableval" != no && enableval=yes
19570	if test "$enableval" != "yes" ; then
19571
19572cat >>confdefs.h <<\EOF
19573#define DONT_HAVE_PIPING 1
19574EOF
19575
19576	fi
19577else
19578  enableval=yes
19579fi;
19580echo "$as_me:19580: result: $enableval" >&5
19581echo "${ECHO_T}$enableval" >&6
19582
19583echo "$as_me:19583: checking whether to enable printer support" >&5
19584echo $ECHO_N "checking whether to enable printer support... $ECHO_C" >&6
19585
19586# Check whether --enable-printing or --disable-printing was given.
19587if test "${enable_printing+set}" = set; then
19588  enableval="$enable_printing"
19589  test "$enableval" != no && enableval=yes
19590	if test "$enableval" != "yes" ; then
19591
19592cat >>confdefs.h <<\EOF
19593#define DISABLE_PRINTING 1
19594EOF
19595
19596	fi
19597else
19598  enableval=yes
19599fi;
19600echo "$as_me:19600: result: $enableval" >&5
19601echo "${ECHO_T}$enableval" >&6
19602
19603echo "$as_me:19603: checking whether to unique tmp-files by appending .pid" >&5
19604echo $ECHO_N "checking whether to unique tmp-files by appending .pid... $ECHO_C" >&6
19605
19606# Check whether --enable-append-pid or --disable-append-pid was given.
19607if test "${enable_append_pid+set}" = set; then
19608  enableval="$enable_append_pid"
19609  test "$enableval" != no && enableval=yes
19610	if test "$enableval" != "yes" ; then
19611    :
19612	else
19613
19614cat >>confdefs.h <<\EOF
19615#define APPEND_PID 1
19616EOF
19617
19618	fi
19619else
19620  enableval=yes
19621
19622cat >>confdefs.h <<\EOF
19623#define APPEND_PID 1
19624EOF
19625
19626fi;
19627echo "$as_me:19627: result: $enableval" >&5
19628echo "${ECHO_T}$enableval" >&6
19629
19630echo "$as_me:19630: checking whether to fallback to XHDR XREF if XOVER isn't supported" >&5
19631echo $ECHO_N "checking whether to fallback to XHDR XREF if XOVER isn't supported... $ECHO_C" >&6
19632
19633# Check whether --enable-xhdr-xref or --disable-xhdr-xref was given.
19634if test "${enable_xhdr_xref+set}" = set; then
19635  enableval="$enable_xhdr_xref"
19636  test "$enableval" != no && enableval=yes
19637	if test "$enableval" != "yes" ; then
19638    :
19639	else
19640
19641cat >>confdefs.h <<\EOF
19642#define XHDR_XREF 1
19643EOF
19644
19645	fi
19646else
19647  enableval=yes
19648
19649cat >>confdefs.h <<\EOF
19650#define XHDR_XREF 1
19651EOF
19652
19653fi;
19654echo "$as_me:19654: result: $enableval" >&5
19655echo "${ECHO_T}$enableval" >&6
19656
19657### bypass a bug in old versions of leafnode & NNTPcache
19658echo "$as_me:19658: checking whether to send a GROUP command before a LISTGROUP" >&5
19659echo $ECHO_N "checking whether to send a GROUP command before a LISTGROUP... $ECHO_C" >&6
19660
19661# Check whether --enable-broken-listgroup-fix or --disable-broken-listgroup-fix was given.
19662if test "${enable_broken_listgroup_fix+set}" = set; then
19663  enableval="$enable_broken_listgroup_fix"
19664  test "$enableval" != yes && enableval=no
19665	if test "$enableval" != "no" ; then
19666
19667cat >>confdefs.h <<\EOF
19668#define BROKEN_LISTGROUP 1
19669EOF
19670
19671	fi
19672else
19673  enableval=no
19674fi;
19675echo "$as_me:19675: result: $enableval" >&5
19676echo "${ECHO_T}$enableval" >&6
19677
19678### on some old systems the WIFEXITED()/WEXITSTATUS() macros do not work
19679echo "$as_me:19679: checking whether to ignore system()s return value" >&5
19680echo $ECHO_N "checking whether to ignore system()s return value... $ECHO_C" >&6
19681
19682# Check whether --enable-broken-system-fix or --disable-broken-system-fix was given.
19683if test "${enable_broken_system_fix+set}" = set; then
19684  enableval="$enable_broken_system_fix"
19685  test "$enableval" != yes && enableval=no
19686	if test "$enableval" != "no" ; then
19687
19688cat >>confdefs.h <<\EOF
19689#define IGNORE_SYSTEM_STATUS 1
19690EOF
19691
19692	fi
19693else
19694  enableval=no
19695fi;
19696echo "$as_me:19696: result: $enableval" >&5
19697echo "${ECHO_T}$enableval" >&6
19698
19699### checks for the location of the system-wide default setting file
19700echo "$as_me:19700: checking for directory containing tin.defaults file" >&5
19701echo $ECHO_N "checking for directory containing tin.defaults file... $ECHO_C" >&6
19702
19703# Check whether --with-defaults-dir or --without-defaults-dir was given.
19704if test "${with_defaults_dir+set}" = set; then
19705  withval="$with_defaults_dir"
19706
19707else
19708  withval="${TIN_DEFAULTS_DIR:-/etc/tin}"
19709fi; if true ; then
19710
19711if test "x$prefix" != xNONE; then
19712	cf_path_syntax="$prefix"
19713else
19714	cf_path_syntax="$ac_default_prefix"
19715fi
19716
19717case ".$withval" in
19718.\$\(*\)*|.\'*\'*)
19719	;;
19720..|./*|.\\*)
19721	;;
19722.[a-zA-Z]:[\\/]*) # OS/2 EMX
19723	;;
19724.\${*prefix}*|.\${*dir}*)
19725	eval withval="$withval"
19726	case ".$withval" in
19727	.NONE/*)
19728		withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19729		;;
19730	esac
19731	;;
19732.no|.NONE/*)
19733	withval=`echo $withval | sed -e s%NONE%$cf_path_syntax%`
19734	;;
19735*)
19736	{ { echo "$as_me:19736: error: expected a pathname, not \"$withval\"" >&5
19737echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
19738   { (exit 1); exit 1; }; }
19739	;;
19740esac
19741
19742fi
19743eval TIN_DEFAULTS_DIR="$withval"
19744
19745echo "$as_me:19745: result: $TIN_DEFAULTS_DIR" >&5
19746echo "${ECHO_T}$TIN_DEFAULTS_DIR" >&6
19747
19748cat >>confdefs.h <<EOF
19749#define TIN_DEFAULTS_DIR "$TIN_DEFAULTS_DIR"
19750EOF
19751
19752### check for ipv6 support
19753echo "$as_me:19753: checking whether to enable IPv6" >&5
19754echo $ECHO_N "checking whether to enable IPv6... $ECHO_C" >&6
19755
19756# Check whether --enable-ipv6 or --disable-ipv6 was given.
19757if test "${enable_ipv6+set}" = set; then
19758  enableval="$enable_ipv6"
19759  test "$enableval" != no && enableval=yes
19760	if test "$enableval" != "yes" ; then
19761    :
19762	else
19763
19764cat >>confdefs.h <<\EOF
19765#define ENABLE_IPV6 1
19766EOF
19767
19768	fi
19769else
19770  enableval=yes
19771
19772cat >>confdefs.h <<\EOF
19773#define ENABLE_IPV6 1
19774EOF
19775
19776fi;
19777echo "$as_me:19777: result: $enableval" >&5
19778echo "${ECHO_T}$enableval" >&6
19779if test "$enableval" = "yes"; then
19780
19781echo "$as_me:19781: checking ipv6 stack type" >&5
19782echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
19783if test "${cf_cv_ipv6type+set}" = set; then
19784  echo $ECHO_N "(cached) $ECHO_C" >&6
19785else
19786
19787cf_cv_ipv6type=unknown
19788for i in solaris inria kame linux-glibc linux-libinet6 toshiba v6d zeta
19789do
19790	case $i in
19791	solaris)
19792		if test "SunOS" = "`uname -s`"
19793		then
19794		  if test -f /usr/include/netinet/ip6.h
19795		  then
19796			cf_cv_ipv6type=$i
19797		  fi
19798		fi
19799		;;
19800	inria)
19801				cat >conftest.$ac_ext <<_ACEOF
19802#line 19802 "configure"
19803#include "confdefs.h"
19804
19805#include <netinet/in.h>
19806#ifdef IPV6_INRIA_VERSION
19807yes
19808#endif
19809_ACEOF
19810if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19811  egrep "yes" >/dev/null 2>&1; then
19812  cf_cv_ipv6type=$i
19813fi
19814rm -rf conftest*
19815
19816		;;
19817	kame)
19818				cat >conftest.$ac_ext <<_ACEOF
19819#line 19819 "configure"
19820#include "confdefs.h"
19821
19822#include <netinet/in.h>
19823#ifdef __KAME__
19824yes
19825#endif
19826_ACEOF
19827if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19828  egrep "yes" >/dev/null 2>&1; then
19829  cf_cv_ipv6type=$i
19830fi
19831rm -rf conftest*
19832
19833		;;
19834	linux-glibc)
19835				cat >conftest.$ac_ext <<_ACEOF
19836#line 19836 "configure"
19837#include "confdefs.h"
19838
19839#include <features.h>
19840#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
19841yes
19842#endif
19843_ACEOF
19844if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19845  egrep "yes" >/dev/null 2>&1; then
19846  cf_cv_ipv6type=$i
19847fi
19848rm -rf conftest*
19849
19850		;;
19851	linux-libinet6)
19852				if test -d /usr/inet6
19853		then
19854			cf_cv_ipv6type=$i
19855		elif test -f /usr/include/netinet/ip6.h
19856		then
19857			cf_cv_ipv6type=$i
19858		fi
19859		;;
19860	toshiba)
19861		cat >conftest.$ac_ext <<_ACEOF
19862#line 19862 "configure"
19863#include "confdefs.h"
19864
19865#include <sys/param.h>
19866#ifdef _TOSHIBA_INET6
19867yes
19868#endif
19869_ACEOF
19870if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19871  egrep "yes" >/dev/null 2>&1; then
19872  cf_cv_ipv6type=$i
19873fi
19874rm -rf conftest*
19875
19876		;;
19877	v6d)
19878		cat >conftest.$ac_ext <<_ACEOF
19879#line 19879 "configure"
19880#include "confdefs.h"
19881
19882#include </usr/local/v6/include/sys/v6config.h>
19883#ifdef __V6D__
19884yes
19885#endif
19886_ACEOF
19887if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19888  egrep "yes" >/dev/null 2>&1; then
19889  cf_cv_ipv6type=$i
19890fi
19891rm -rf conftest*
19892
19893		;;
19894	zeta)
19895		cat >conftest.$ac_ext <<_ACEOF
19896#line 19896 "configure"
19897#include "confdefs.h"
19898
19899#include <sys/param.h>
19900#ifdef _ZETA_MINAMI_INET6
19901yes
19902#endif
19903_ACEOF
19904if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
19905  egrep "yes" >/dev/null 2>&1; then
19906  cf_cv_ipv6type=$i
19907fi
19908rm -rf conftest*
19909
19910		;;
19911	esac
19912	if test "$cf_cv_ipv6type" != "unknown"; then
19913		break
19914	fi
19915done
19916
19917fi
19918echo "$as_me:19918: result: $cf_cv_ipv6type" >&5
19919echo "${ECHO_T}$cf_cv_ipv6type" >&6
19920
19921cf_ipv6lib=none
19922cf_ipv6dir=none
19923
19924echo "$as_me:19924: checking for IPv6 library if required" >&5
19925echo $ECHO_N "checking for IPv6 library if required... $ECHO_C" >&6
19926case $cf_cv_ipv6type in
19927solaris)
19928	;;
19929inria)
19930	;;
19931kame)
19932		cf_ipv6lib=inet6
19933	cf_ipv6dir=v6
19934	;;
19935linux-glibc)
19936	;;
19937linux-libinet6)
19938		cf_ipv6lib=inet6
19939	cf_ipv6dir=inet6
19940	;;
19941toshiba)
19942	cf_ipv6lib=inet6
19943	cf_ipv6dir=v6
19944	;;
19945v6d)
19946	cf_ipv6lib=v6
19947	cf_ipv6dir=v6
19948	;;
19949zeta)
19950	cf_ipv6lib=inet6
19951	cf_ipv6dir=v6
19952	;;
19953esac
19954echo "$as_me:19954: result: $cf_ipv6lib" >&5
19955echo "${ECHO_T}$cf_ipv6lib" >&6
19956
19957if test "$cf_ipv6lib" != "none"; then
19958
19959	cat >conftest.$ac_ext <<_ACEOF
19960#line 19960 "configure"
19961#include "confdefs.h"
19962
19963#include <sys/types.h>
19964#include <netdb.h>
19965#include <netinet/in.h>
19966#include <netinet/ip6.h>
19967int
19968main (void)
19969{
19970getaddrinfo(0, 0, 0, 0)
19971  ;
19972  return 0;
19973}
19974_ACEOF
19975rm -f conftest.$ac_objext conftest$ac_exeext
19976if { (eval echo "$as_me:19976: \"$ac_link\"") >&5
19977  (eval $ac_link) 2>&5
19978  ac_status=$?
19979  echo "$as_me:19979: \$? = $ac_status" >&5
19980  (exit $ac_status); } &&
19981         { ac_try='test -s conftest$ac_exeext'
19982  { (eval echo "$as_me:19982: \"$ac_try\"") >&5
19983  (eval $ac_try) 2>&5
19984  ac_status=$?
19985  echo "$as_me:19985: \$? = $ac_status" >&5
19986  (exit $ac_status); }; }; then
19987  :
19988else
19989  echo "$as_me: failed program was:" >&5
19990cat conftest.$ac_ext >&5
19991
19992cf_search=
19993
19994# collect the current set of include-directories from compiler flags
19995cf_header_path_list=""
19996if test -n "${CFLAGS}${CPPFLAGS}" ; then
19997	for cf_header_path in $CPPFLAGS $CFLAGS
19998	do
19999		case $cf_header_path in
20000		-I*)
20001			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
20002
20003test "x$cf_header_path" != "xNONE" && \
20004test -d "$cf_header_path" && \
20005 {
20006	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
20007	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
20008	test -d $cf_header_path/include/$cf_ipv6dir &&       cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir"
20009	test -d $cf_header_path/include/$cf_ipv6dir/include &&    cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir/include"
20010	test -d $cf_header_path/$cf_ipv6dir/include &&       cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include"
20011	test -d $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir"
20012}
20013
20014			cf_header_path_list="$cf_header_path_list $cf_search"
20015			;;
20016		esac
20017	done
20018fi
20019
20020# add the variations for the package we are looking for
20021
20022cf_search=
20023
20024test "x$prefix" != "xNONE" && \
20025test -d "$prefix" && \
20026 {
20027	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
20028	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
20029	test -d $prefix/include/$cf_ipv6dir &&       cf_search="$cf_search $prefix/include/$cf_ipv6dir"
20030	test -d $prefix/include/$cf_ipv6dir/include &&    cf_search="$cf_search $prefix/include/$cf_ipv6dir/include"
20031	test -d $prefix/$cf_ipv6dir/include &&       cf_search="$cf_search $prefix/$cf_ipv6dir/include"
20032	test -d $prefix/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/include/$cf_ipv6dir"
20033}
20034
20035for cf_subdir_prefix in \
20036	/usr \
20037	/usr/local \
20038	/usr/pkg \
20039	/opt \
20040	/opt/local \
20041	$HOME
20042do
20043
20044test "x$cf_subdir_prefix" != "x$prefix" && \
20045test -d "$cf_subdir_prefix" && \
20046(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20047	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
20048	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
20049	test -d $cf_subdir_prefix/include/$cf_ipv6dir &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir"
20050	test -d $cf_subdir_prefix/include/$cf_ipv6dir/include &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir/include"
20051	test -d $cf_subdir_prefix/$cf_ipv6dir/include &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include"
20052	test -d $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir"
20053}
20054
20055done
20056
20057test "$includedir" != NONE && \
20058test "$includedir" != "/usr/include" && \
20059test -d "$includedir" && {
20060	test -d $includedir &&    cf_search="$cf_search $includedir"
20061	test -d $includedir/$cf_ipv6dir && cf_search="$cf_search $includedir/$cf_ipv6dir"
20062}
20063
20064test "$oldincludedir" != NONE && \
20065test "$oldincludedir" != "/usr/include" && \
20066test -d "$oldincludedir" && {
20067	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
20068	test -d $oldincludedir/$cf_ipv6dir && cf_search="$cf_search $oldincludedir/$cf_ipv6dir"
20069}
20070
20071cf_search="$cf_search $cf_header_path_list"
20072
20073	for cf_incdir in $cf_search
20074	do
20075		cf_header=$cf_incdir/netinet/ip6.h
20076		if test -f $cf_header
20077		then
20078
20079if test -n "$cf_incdir" ; then
20080  for cf_add_incdir in $cf_incdir
20081  do
20082	while test $cf_add_incdir != /usr/include
20083	do
20084	  if test -d $cf_add_incdir
20085	  then
20086		cf_have_incdir=no
20087		if test -n "$CFLAGS$CPPFLAGS" ; then
20088		  # a loop is needed to ensure we can add subdirs of existing dirs
20089		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20090			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20091			  cf_have_incdir=yes; break
20092			fi
20093		  done
20094		fi
20095
20096		if test "$cf_have_incdir" = no ; then
20097		  if test "$cf_add_incdir" = /usr/local/include ; then
20098			if test "$GCC" = yes
20099			then
20100			  cf_save_CPPFLAGS=$CPPFLAGS
20101
20102	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20103	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20104
20105			  cat >conftest.$ac_ext <<_ACEOF
20106#line 20106 "configure"
20107#include "confdefs.h"
20108#include <stdio.h>
20109int
20110main (void)
20111{
20112printf("Hello")
20113  ;
20114  return 0;
20115}
20116_ACEOF
20117rm -f conftest.$ac_objext
20118if { (eval echo "$as_me:20118: \"$ac_compile\"") >&5
20119  (eval $ac_compile) 2>&5
20120  ac_status=$?
20121  echo "$as_me:20121: \$? = $ac_status" >&5
20122  (exit $ac_status); } &&
20123         { ac_try='test -s conftest.$ac_objext'
20124  { (eval echo "$as_me:20124: \"$ac_try\"") >&5
20125  (eval $ac_try) 2>&5
20126  ac_status=$?
20127  echo "$as_me:20127: \$? = $ac_status" >&5
20128  (exit $ac_status); }; }; then
20129  :
20130else
20131  echo "$as_me: failed program was:" >&5
20132cat conftest.$ac_ext >&5
20133cf_have_incdir=yes
20134fi
20135rm -f conftest.$ac_objext conftest.$ac_ext
20136			  CPPFLAGS=$cf_save_CPPFLAGS
20137			fi
20138		  fi
20139		fi
20140
20141		if test "$cf_have_incdir" = no ; then
20142		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
20143
20144echo "${as_me:-configure}:20144: testing adding $cf_add_incdir to include-path ..." 1>&5
20145
20146		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20147
20148		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
20149		  test "$cf_top_incdir" = "$cf_add_incdir" && break
20150		  cf_add_incdir="$cf_top_incdir"
20151		else
20152		  break
20153		fi
20154	  else
20155		break
20156	  fi
20157	done
20158  done
20159fi
20160
20161			test -n "$verbose" && echo "	... found $cf_header" 1>&6
20162			break
20163		fi
20164		test -n "$verbose" && echo "	... tested $cf_header" 1>&6
20165	done
20166
20167fi
20168rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20169
20170	eval 'cf_cv_have_lib_'$cf_ipv6lib'=no'
20171	cf_libdir=""
20172	echo "$as_me:20172: checking for getaddrinfo" >&5
20173echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
20174if test "${ac_cv_func_getaddrinfo+set}" = set; then
20175  echo $ECHO_N "(cached) $ECHO_C" >&6
20176else
20177  cat >conftest.$ac_ext <<_ACEOF
20178#line 20178 "configure"
20179#include "confdefs.h"
20180#define getaddrinfo autoconf_temporary
20181#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20182#undef getaddrinfo
20183
20184#ifdef __cplusplus
20185extern "C"
20186#endif
20187
20188/* We use char because int might match the return type of a gcc2
20189   builtin and then its argument prototype would still apply.  */
20190char getaddrinfo (void);
20191
20192int
20193main (void)
20194{
20195
20196/* The GNU C library defines stubs for functions which it implements
20197    to always fail with ENOSYS.  Some functions are actually named
20198    something starting with __ and the normal name is an alias.  */
20199#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
20200#error found stub for getaddrinfo
20201#endif
20202
20203	return getaddrinfo ();
20204  ;
20205  return 0;
20206}
20207_ACEOF
20208rm -f conftest.$ac_objext conftest$ac_exeext
20209if { (eval echo "$as_me:20209: \"$ac_link\"") >&5
20210  (eval $ac_link) 2>&5
20211  ac_status=$?
20212  echo "$as_me:20212: \$? = $ac_status" >&5
20213  (exit $ac_status); } &&
20214         { ac_try='test -s conftest$ac_exeext'
20215  { (eval echo "$as_me:20215: \"$ac_try\"") >&5
20216  (eval $ac_try) 2>&5
20217  ac_status=$?
20218  echo "$as_me:20218: \$? = $ac_status" >&5
20219  (exit $ac_status); }; }; then
20220  ac_cv_func_getaddrinfo=yes
20221else
20222  echo "$as_me: failed program was:" >&5
20223cat conftest.$ac_ext >&5
20224ac_cv_func_getaddrinfo=no
20225fi
20226rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20227fi
20228echo "$as_me:20228: result: $ac_cv_func_getaddrinfo" >&5
20229echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
20230if test $ac_cv_func_getaddrinfo = yes; then
20231  eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
20232else
20233
20234		cf_save_LIBS="$LIBS"
20235		echo "$as_me:20235: checking for getaddrinfo in -l$cf_ipv6lib" >&5
20236echo $ECHO_N "checking for getaddrinfo in -l$cf_ipv6lib... $ECHO_C" >&6
20237		LIBS="-l$cf_ipv6lib $LIBS"
20238		cat >conftest.$ac_ext <<_ACEOF
20239#line 20239 "configure"
20240#include "confdefs.h"
20241
20242#include <sys/types.h>
20243#include <netdb.h>
20244#include <netinet/in.h>
20245#include <netinet/ip6.h>
20246int
20247main (void)
20248{
20249getaddrinfo(0, 0, 0, 0)
20250  ;
20251  return 0;
20252}
20253_ACEOF
20254rm -f conftest.$ac_objext conftest$ac_exeext
20255if { (eval echo "$as_me:20255: \"$ac_link\"") >&5
20256  (eval $ac_link) 2>&5
20257  ac_status=$?
20258  echo "$as_me:20258: \$? = $ac_status" >&5
20259  (exit $ac_status); } &&
20260         { ac_try='test -s conftest$ac_exeext'
20261  { (eval echo "$as_me:20261: \"$ac_try\"") >&5
20262  (eval $ac_try) 2>&5
20263  ac_status=$?
20264  echo "$as_me:20264: \$? = $ac_status" >&5
20265  (exit $ac_status); }; }; then
20266  echo "$as_me:20266: result: yes" >&5
20267echo "${ECHO_T}yes" >&6
20268			 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
20269
20270else
20271  echo "$as_me: failed program was:" >&5
20272cat conftest.$ac_ext >&5
20273echo "$as_me:20273: result: no" >&5
20274echo "${ECHO_T}no" >&6
20275
20276cf_search=
20277cf_library_path_list=""
20278if test -n "${LDFLAGS}${LIBS}" ; then
20279	for cf_library_path in $LDFLAGS $LIBS
20280	do
20281		case $cf_library_path in
20282		-L*)
20283			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
20284
20285test "x$cf_library_path" != "xNONE" && \
20286test -d "$cf_library_path" && \
20287 {
20288	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
20289	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
20290	test -d $cf_library_path/lib/$cf_ipv6dir &&       cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir"
20291	test -d $cf_library_path/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir/lib"
20292	test -d $cf_library_path/$cf_ipv6dir/lib &&       cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib"
20293	test -d $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir"
20294}
20295
20296			cf_library_path_list="$cf_library_path_list $cf_search"
20297			;;
20298		esac
20299	done
20300fi
20301
20302cf_search=
20303
20304test "x$prefix" != "xNONE" && \
20305test -d "$prefix" && \
20306 {
20307	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
20308	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
20309	test -d $prefix/lib/$cf_ipv6dir &&       cf_search="$cf_search $prefix/lib/$cf_ipv6dir"
20310	test -d $prefix/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $prefix/lib/$cf_ipv6dir/lib"
20311	test -d $prefix/$cf_ipv6dir/lib &&       cf_search="$cf_search $prefix/$cf_ipv6dir/lib"
20312	test -d $prefix/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
20313}
20314
20315for cf_subdir_prefix in \
20316	/usr \
20317	/usr/local \
20318	/usr/pkg \
20319	/opt \
20320	/opt/local \
20321	$HOME
20322do
20323
20324test "x$cf_subdir_prefix" != "x$prefix" && \
20325test -d "$cf_subdir_prefix" && \
20326(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
20327	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
20328	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
20329	test -d $cf_subdir_prefix/lib/$cf_ipv6dir &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir"
20330	test -d $cf_subdir_prefix/lib/$cf_ipv6dir/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir/lib"
20331	test -d $cf_subdir_prefix/$cf_ipv6dir/lib &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib"
20332	test -d $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
20333}
20334
20335done
20336
20337cf_search="$cf_library_path_list $cf_search"
20338
20339			for cf_libdir in $cf_search
20340			do
20341				echo "$as_me:20341: checking for -l$cf_ipv6lib in $cf_libdir" >&5
20342echo $ECHO_N "checking for -l$cf_ipv6lib in $cf_libdir... $ECHO_C" >&6
20343				LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS"
20344				cat >conftest.$ac_ext <<_ACEOF
20345#line 20345 "configure"
20346#include "confdefs.h"
20347
20348#include <sys/types.h>
20349#include <netdb.h>
20350#include <netinet/in.h>
20351#include <netinet/ip6.h>
20352int
20353main (void)
20354{
20355getaddrinfo(0, 0, 0, 0)
20356  ;
20357  return 0;
20358}
20359_ACEOF
20360rm -f conftest.$ac_objext conftest$ac_exeext
20361if { (eval echo "$as_me:20361: \"$ac_link\"") >&5
20362  (eval $ac_link) 2>&5
20363  ac_status=$?
20364  echo "$as_me:20364: \$? = $ac_status" >&5
20365  (exit $ac_status); } &&
20366         { ac_try='test -s conftest$ac_exeext'
20367  { (eval echo "$as_me:20367: \"$ac_try\"") >&5
20368  (eval $ac_try) 2>&5
20369  ac_status=$?
20370  echo "$as_me:20370: \$? = $ac_status" >&5
20371  (exit $ac_status); }; }; then
20372  echo "$as_me:20372: result: yes" >&5
20373echo "${ECHO_T}yes" >&6
20374			 		 eval 'cf_cv_have_lib_'$cf_ipv6lib'=yes'
20375					 break
20376else
20377  echo "$as_me: failed program was:" >&5
20378cat conftest.$ac_ext >&5
20379echo "$as_me:20379: result: no" >&5
20380echo "${ECHO_T}no" >&6
20381					 LIBS="$cf_save_LIBS"
20382fi
20383rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20384			done
20385
20386fi
20387rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20388
20389fi
20390
20391eval 'cf_found_library=$cf_cv_have_lib_'$cf_ipv6lib
20392
20393	if test $cf_found_library = no ; then
20394		{ { echo "$as_me:20394: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
20395from an appropriate IPv6 kit and compile beforehand." >&5
20396echo "$as_me: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
20397from an appropriate IPv6 kit and compile beforehand." >&2;}
20398   { (exit 1); exit 1; }; }
20399	fi
20400fi
20401
20402echo "$as_me:20402: checking working getaddrinfo" >&5
20403echo $ECHO_N "checking working getaddrinfo... $ECHO_C" >&6
20404if test "${cf_cv_getaddrinfo+set}" = set; then
20405  echo $ECHO_N "(cached) $ECHO_C" >&6
20406else
20407
20408if test "$cross_compiling" = yes; then
20409  cf_cv_getaddrinfo=unknown
20410else
20411  cat >conftest.$ac_ext <<_ACEOF
20412#line 20412 "configure"
20413#include "confdefs.h"
20414
20415#include <sys/types.h>
20416#include <netdb.h>
20417#include <string.h>
20418#include <sys/socket.h>
20419#include <netinet/in.h>
20420
20421#define expect(a,b) if (strcmp(a,b) != 0) goto bad
20422
20423int main(void)
20424{
20425   int passive, gaierr, inet4 = 0, inet6 = 0;
20426   struct addrinfo hints, *ai, *aitop;
20427   char straddr[INET6_ADDRSTRLEN], strport[16];
20428
20429   for (passive = 0; passive <= 1; passive++) {
20430     memset(&hints, 0, sizeof(hints));
20431     hints.ai_family = AF_UNSPEC;
20432     hints.ai_flags = passive ? AI_PASSIVE : 0;
20433     hints.ai_socktype = SOCK_STREAM;
20434     if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
20435       (void)gai_strerror(gaierr);
20436       goto bad;
20437     }
20438     for (ai = aitop; ai; ai = ai->ai_next) {
20439       if (ai->ai_addr == NULL ||
20440           ai->ai_addrlen == 0 ||
20441           getnameinfo(ai->ai_addr, ai->ai_addrlen,
20442                       straddr, sizeof(straddr), strport, sizeof(strport),
20443                       NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
20444         goto bad;
20445       }
20446       switch (ai->ai_family) {
20447       case AF_INET:
20448         expect(strport, "54321");
20449         if (passive) {
20450           expect(straddr, "0.0.0.0");
20451         } else {
20452           expect(straddr, "127.0.0.1");
20453         }
20454         inet4++;
20455         break;
20456       case AF_INET6:
20457         expect(strport, "54321");
20458         if (passive) {
20459           expect(straddr, "::");
20460         } else {
20461           expect(straddr, "::1");
20462         }
20463         inet6++;
20464         break;
20465       case AF_UNSPEC:
20466         goto bad;
20467         break;
20468       default:
20469         /* another family support? */
20470         break;
20471       }
20472     }
20473   }
20474
20475   if (!(inet4 == 0 || inet4 == 2))
20476     goto bad;
20477   if (!(inet6 == 0 || inet6 == 2))
20478     goto bad;
20479
20480   if (aitop)
20481     freeaddrinfo(aitop);
20482   ${cf_cv_main_return:-return}(0);
20483
20484  bad:
20485   if (aitop)
20486     freeaddrinfo(aitop);
20487   ${cf_cv_main_return:-return}(1);
20488}
20489
20490_ACEOF
20491rm -f conftest$ac_exeext
20492if { (eval echo "$as_me:20492: \"$ac_link\"") >&5
20493  (eval $ac_link) 2>&5
20494  ac_status=$?
20495  echo "$as_me:20495: \$? = $ac_status" >&5
20496  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
20497  { (eval echo "$as_me:20497: \"$ac_try\"") >&5
20498  (eval $ac_try) 2>&5
20499  ac_status=$?
20500  echo "$as_me:20500: \$? = $ac_status" >&5
20501  (exit $ac_status); }; }; then
20502  cf_cv_getaddrinfo=yes
20503else
20504  echo "$as_me: program exited with status $ac_status" >&5
20505echo "$as_me: failed program was:" >&5
20506cat conftest.$ac_ext >&5
20507cf_cv_getaddrinfo=no
20508fi
20509rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
20510fi
20511
20512fi
20513echo "$as_me:20513: result: $cf_cv_getaddrinfo" >&5
20514echo "${ECHO_T}$cf_cv_getaddrinfo" >&6
20515if test "$cf_cv_getaddrinfo" = yes ; then
20516
20517cat >>confdefs.h <<\EOF
20518#define HAVE_GAI_STRERROR 1
20519EOF
20520
20521cat >>confdefs.h <<\EOF
20522#define HAVE_GETADDRINFO 1
20523EOF
20524
20525fi
20526
20527if test "$cf_cv_getaddrinfo" != "yes"; then
20528	if test "$cf_cv_ipv6type" != "linux"; then
20529		{ echo "$as_me:20529: WARNING: You must get working getaddrinfo() function,
20530or you can specify \"--disable-ipv6\"" >&5
20531echo "$as_me: WARNING: You must get working getaddrinfo() function,
20532or you can specify \"--disable-ipv6\"" >&2;}
20533	else
20534		{ echo "$as_me:20534: WARNING: The getaddrinfo() implementation on your system seems be buggy.
20535You should upgrade your system library to the newest version
20536of GNU C library (aka glibc)." >&5
20537echo "$as_me: WARNING: The getaddrinfo() implementation on your system seems be buggy.
20538You should upgrade your system library to the newest version
20539of GNU C library (aka glibc)." >&2;}
20540	fi
20541fi
20542
20543fi
20544
20545for ac_func in getaddrinfo getnameinfo
20546do
20547as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
20548echo "$as_me:20548: checking for $ac_func" >&5
20549echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
20550if eval "test \"\${$as_ac_var+set}\" = set"; then
20551  echo $ECHO_N "(cached) $ECHO_C" >&6
20552else
20553  cat >conftest.$ac_ext <<_ACEOF
20554#line 20554 "configure"
20555#include "confdefs.h"
20556#define $ac_func autoconf_temporary
20557#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20558#undef $ac_func
20559
20560#ifdef __cplusplus
20561extern "C"
20562#endif
20563
20564/* We use char because int might match the return type of a gcc2
20565   builtin and then its argument prototype would still apply.  */
20566char $ac_func (void);
20567
20568int
20569main (void)
20570{
20571
20572/* The GNU C library defines stubs for functions which it implements
20573    to always fail with ENOSYS.  Some functions are actually named
20574    something starting with __ and the normal name is an alias.  */
20575#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
20576#error found stub for $ac_func
20577#endif
20578
20579	return $ac_func ();
20580  ;
20581  return 0;
20582}
20583_ACEOF
20584rm -f conftest.$ac_objext conftest$ac_exeext
20585if { (eval echo "$as_me:20585: \"$ac_link\"") >&5
20586  (eval $ac_link) 2>&5
20587  ac_status=$?
20588  echo "$as_me:20588: \$? = $ac_status" >&5
20589  (exit $ac_status); } &&
20590         { ac_try='test -s conftest$ac_exeext'
20591  { (eval echo "$as_me:20591: \"$ac_try\"") >&5
20592  (eval $ac_try) 2>&5
20593  ac_status=$?
20594  echo "$as_me:20594: \$? = $ac_status" >&5
20595  (exit $ac_status); }; }; then
20596  eval "$as_ac_var=yes"
20597else
20598  echo "$as_me: failed program was:" >&5
20599cat conftest.$ac_ext >&5
20600eval "$as_ac_var=no"
20601fi
20602rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
20603fi
20604echo "$as_me:20604: result: `eval echo '${'$as_ac_var'}'`" >&5
20605echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
20606if test `eval echo '${'$as_ac_var'}'` = yes; then
20607  cat >>confdefs.h <<EOF
20608#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
20609EOF
20610
20611else
20612  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
20613fi
20614done
20615
20616### should we use 64 bit article numbers if possible?
20617echo "$as_me:20617: checking whether to enable long article numbers" >&5
20618echo $ECHO_N "checking whether to enable long article numbers... $ECHO_C" >&6
20619
20620# Check whether --enable-long-article-numbers or --disable-long-article-numbers was given.
20621if test "${enable_long_article_numbers+set}" = set; then
20622  enableval="$enable_long_article_numbers"
20623  test "$enableval" != yes && enableval=no
20624	if test "$enableval" != "no" ; then
20625
20626cat >>confdefs.h <<\EOF
20627#define ENABLE_LONG_ARTICLE_NUMBERS 1
20628EOF
20629
20630	fi
20631else
20632  enableval=no
20633fi;
20634echo "$as_me:20634: result: $enableval" >&5
20635echo "${ECHO_T}$enableval" >&6
20636
20637### checks for operator characteristics (should be the last option)
20638echo "$as_me:20638: checking whether to make a coffee while compiling" >&5
20639echo $ECHO_N "checking whether to make a coffee while compiling... $ECHO_C" >&6
20640
20641# Check whether --with-coffee or --without-coffee was given.
20642if test "${with_coffee+set}" = set; then
20643  withval="$with_coffee"
20644   case "$withval" in
20645	yes)
20646	echo "$as_me:20646: result: yes - with milk - please!" >&5
20647echo "${ECHO_T}yes - with milk - please!" >&6
20648
20649cat >>confdefs.h <<\EOF
20650#define HAVE_COFFEE 1
20651EOF
20652
20653	;;
20654	*)
20655	echo "$as_me:20655: result: no" >&5
20656echo "${ECHO_T}no" >&6
20657	;;
20658	esac
20659else
20660  echo "$as_me:20660: result: no" >&5
20661echo "${ECHO_T}no" >&6
20662fi;
20663
20664### checks for compiler characteristics
20665
20666echo "$as_me:20666: checking for makeflags variable" >&5
20667echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
20668if test "${cf_cv_makeflags+set}" = set; then
20669  echo $ECHO_N "(cached) $ECHO_C" >&6
20670else
20671
20672	cf_cv_makeflags=''
20673	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
20674	do
20675		cat >cf_makeflags.tmp <<CF_EOF
20676SHELL = $SHELL
20677all :
20678	@ echo '.$cf_option'
20679CF_EOF
20680		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | fgrep -v "ing directory" | sed -e 's,[ 	]*$,,'`
20681		case "$cf_result" in
20682		.*k|.*kw)
20683			cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`
20684			case "$cf_result" in
20685			.*CC=*)	cf_cv_makeflags=
20686				;;
20687			*)	cf_cv_makeflags=$cf_option
20688				;;
20689			esac
20690			break
20691			;;
20692		.-)
20693			;;
20694		*)
20695
20696echo "${as_me:-configure}:20696: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
20697
20698			;;
20699		esac
20700	done
20701	rm -f cf_makeflags.tmp
20702
20703fi
20704echo "$as_me:20704: result: $cf_cv_makeflags" >&5
20705echo "${ECHO_T}$cf_cv_makeflags" >&6
20706
20707ac_ext=c
20708ac_cpp='$CPP $CPPFLAGS'
20709ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
20710ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
20711ac_compiler_gnu=$ac_cv_c_compiler_gnu
20712ac_main_return=return
20713
20714echo "$as_me:20714: checking for an ANSI C-conforming const" >&5
20715echo $ECHO_N "checking for an ANSI C-conforming const... $ECHO_C" >&6
20716if test "${ac_cv_c_const+set}" = set; then
20717  echo $ECHO_N "(cached) $ECHO_C" >&6
20718else
20719  cat >conftest.$ac_ext <<_ACEOF
20720#line 20720 "configure"
20721#include "confdefs.h"
20722
20723int
20724main (void)
20725{
20726/* FIXME: Include the comments suggested by Paul. */
20727#ifndef __cplusplus
20728  /* Ultrix mips cc rejects this.  */
20729  typedef int charset[2];
20730  const charset x;
20731  /* SunOS 4.1.1 cc rejects this.  */
20732  char const *const *ccp;
20733  char **p;
20734  /* NEC SVR4.0.2 mips cc rejects this.  */
20735  struct point {int x, y;};
20736  static struct point const zero = {0,0};
20737  /* AIX XL C 1.02.0.0 rejects this.
20738     It does not let you subtract one const X* pointer from another in
20739     an arm of an if-expression whose if-part is not a constant
20740     expression */
20741  const char *g = "string";
20742  ccp = &g + (g ? g-g : 0);
20743  /* HPUX 7.0 cc rejects these. */
20744  ++ccp;
20745  p = (char**) ccp;
20746  ccp = (char const *const *) p;
20747  { /* SCO 3.2v4 cc rejects this.  */
20748    char *t;
20749    char const *s = 0 ? (char *) 0 : (char const *) 0;
20750
20751    *t++ = 0;
20752  }
20753  { /* Someone thinks the Sun supposedly-ANSI compiler will reject this.  */
20754    int x[] = {25, 17};
20755    const int *foo = &x[0];
20756    ++foo;
20757  }
20758  { /* Sun SC1.0 ANSI compiler rejects this -- but not the above. */
20759    typedef const int *iptr;
20760    iptr p = 0;
20761    ++p;
20762  }
20763  { /* AIX XL C 1.02.0.0 rejects this saying
20764       "k.c", line 2.27: 1506-025 (S) Operand must be a modifiable lvalue. */
20765    struct s { int j; const int *ap[3]; };
20766    struct s *b; b->j = 5;
20767  }
20768  { /* ULTRIX-32 V3.1 (Rev 9) vcc rejects this */
20769    const int foo = 10;
20770  }
20771#endif
20772
20773  ;
20774  return 0;
20775}
20776_ACEOF
20777rm -f conftest.$ac_objext
20778if { (eval echo "$as_me:20778: \"$ac_compile\"") >&5
20779  (eval $ac_compile) 2>&5
20780  ac_status=$?
20781  echo "$as_me:20781: \$? = $ac_status" >&5
20782  (exit $ac_status); } &&
20783         { ac_try='test -s conftest.$ac_objext'
20784  { (eval echo "$as_me:20784: \"$ac_try\"") >&5
20785  (eval $ac_try) 2>&5
20786  ac_status=$?
20787  echo "$as_me:20787: \$? = $ac_status" >&5
20788  (exit $ac_status); }; }; then
20789  ac_cv_c_const=yes
20790else
20791  echo "$as_me: failed program was:" >&5
20792cat conftest.$ac_ext >&5
20793ac_cv_c_const=no
20794fi
20795rm -f conftest.$ac_objext conftest.$ac_ext
20796fi
20797echo "$as_me:20797: result: $ac_cv_c_const" >&5
20798echo "${ECHO_T}$ac_cv_c_const" >&6
20799if test $ac_cv_c_const = no; then
20800
20801cat >>confdefs.h <<\EOF
20802#define const
20803EOF
20804
20805fi
20806
20807echo "$as_me:20807: checking for inline" >&5
20808echo $ECHO_N "checking for inline... $ECHO_C" >&6
20809if test "${ac_cv_c_inline+set}" = set; then
20810  echo $ECHO_N "(cached) $ECHO_C" >&6
20811else
20812  ac_cv_c_inline=no
20813for ac_kw in inline __inline__ __inline; do
20814  cat >conftest.$ac_ext <<_ACEOF
20815#line 20815 "configure"
20816#include "confdefs.h"
20817#ifndef __cplusplus
20818static $ac_kw int static_foo () {return 0; }
20819$ac_kw int foo () {return 0; }
20820#endif
20821
20822_ACEOF
20823rm -f conftest.$ac_objext
20824if { (eval echo "$as_me:20824: \"$ac_compile\"") >&5
20825  (eval $ac_compile) 2>&5
20826  ac_status=$?
20827  echo "$as_me:20827: \$? = $ac_status" >&5
20828  (exit $ac_status); } &&
20829         { ac_try='test -s conftest.$ac_objext'
20830  { (eval echo "$as_me:20830: \"$ac_try\"") >&5
20831  (eval $ac_try) 2>&5
20832  ac_status=$?
20833  echo "$as_me:20833: \$? = $ac_status" >&5
20834  (exit $ac_status); }; }; then
20835  ac_cv_c_inline=$ac_kw; break
20836else
20837  echo "$as_me: failed program was:" >&5
20838cat conftest.$ac_ext >&5
20839fi
20840rm -f conftest.$ac_objext conftest.$ac_ext
20841done
20842
20843fi
20844echo "$as_me:20844: result: $ac_cv_c_inline" >&5
20845echo "${ECHO_T}$ac_cv_c_inline" >&6
20846case $ac_cv_c_inline in
20847  inline | yes) ;;
20848  no)
20849cat >>confdefs.h <<\EOF
20850#define inline
20851EOF
20852 ;;
20853  *)  cat >>confdefs.h <<EOF
20854#define inline $ac_cv_c_inline
20855EOF
20856 ;;
20857esac
20858
20859echo "$as_me:20859: checking for ansi token expansion/substitution" >&5
20860echo $ECHO_N "checking for ansi token expansion/substitution... $ECHO_C" >&6
20861if test "${cf_cv_cpp_expands+set}" = set; then
20862  echo $ECHO_N "(cached) $ECHO_C" >&6
20863else
20864
20865	cat >conftest.$ac_ext <<_ACEOF
20866#line 20866 "configure"
20867#include "confdefs.h"
20868
20869#define string(n) #n
20870int
20871main (void)
20872{
20873char *s = string(token)
20874  ;
20875  return 0;
20876}
20877_ACEOF
20878rm -f conftest.$ac_objext
20879if { (eval echo "$as_me:20879: \"$ac_compile\"") >&5
20880  (eval $ac_compile) 2>&5
20881  ac_status=$?
20882  echo "$as_me:20882: \$? = $ac_status" >&5
20883  (exit $ac_status); } &&
20884         { ac_try='test -s conftest.$ac_objext'
20885  { (eval echo "$as_me:20885: \"$ac_try\"") >&5
20886  (eval $ac_try) 2>&5
20887  ac_status=$?
20888  echo "$as_me:20888: \$? = $ac_status" >&5
20889  (exit $ac_status); }; }; then
20890  cf_cv_cpp_expands=yes
20891else
20892  echo "$as_me: failed program was:" >&5
20893cat conftest.$ac_ext >&5
20894cf_cv_cpp_expands=no
20895fi
20896rm -f conftest.$ac_objext conftest.$ac_ext
20897
20898fi
20899
20900echo "$as_me:20900: result: $cf_cv_cpp_expands" >&5
20901echo "${ECHO_T}$cf_cv_cpp_expands" >&6
20902test $cf_cv_cpp_expands = yes &&
20903cat >>confdefs.h <<\EOF
20904#define CPP_DOES_EXPAND 1
20905EOF
20906
20907echo "$as_me:20907: checking for ansi token concatenation" >&5
20908echo $ECHO_N "checking for ansi token concatenation... $ECHO_C" >&6
20909if test "${cf_cv_cpp_concats+set}" = set; then
20910  echo $ECHO_N "(cached) $ECHO_C" >&6
20911else
20912
20913	cat >conftest.$ac_ext <<_ACEOF
20914#line 20914 "configure"
20915#include "confdefs.h"
20916
20917#define concat(a,b) a ## b
20918int
20919main (void)
20920{
20921char *firstlast = "y", *s = concat(first,last)
20922  ;
20923  return 0;
20924}
20925_ACEOF
20926rm -f conftest.$ac_objext
20927if { (eval echo "$as_me:20927: \"$ac_compile\"") >&5
20928  (eval $ac_compile) 2>&5
20929  ac_status=$?
20930  echo "$as_me:20930: \$? = $ac_status" >&5
20931  (exit $ac_status); } &&
20932         { ac_try='test -s conftest.$ac_objext'
20933  { (eval echo "$as_me:20933: \"$ac_try\"") >&5
20934  (eval $ac_try) 2>&5
20935  ac_status=$?
20936  echo "$as_me:20936: \$? = $ac_status" >&5
20937  (exit $ac_status); }; }; then
20938  cf_cv_cpp_concats=yes
20939else
20940  echo "$as_me: failed program was:" >&5
20941cat conftest.$ac_ext >&5
20942cf_cv_cpp_concats=no
20943fi
20944rm -f conftest.$ac_objext conftest.$ac_ext
20945
20946fi
20947
20948echo "$as_me:20948: result: $cf_cv_cpp_concats" >&5
20949echo "${ECHO_T}$cf_cv_cpp_concats" >&6
20950test $cf_cv_cpp_concats = yes &&
20951cat >>confdefs.h <<\EOF
20952#define CPP_DOES_CONCAT 1
20953EOF
20954
20955echo "$as_me:20955: checking if nested parameters work" >&5
20956echo $ECHO_N "checking if nested parameters work... $ECHO_C" >&6
20957if test "${cf_cv_nested_params+set}" = set; then
20958  echo $ECHO_N "(cached) $ECHO_C" >&6
20959else
20960
20961	cat >conftest.$ac_ext <<_ACEOF
20962#line 20962 "configure"
20963#include "confdefs.h"
20964
20965int
20966main (void)
20967{
20968extern void (*sigdisp(int sig, void (*func)(int sig)))(int sig)
20969  ;
20970  return 0;
20971}
20972_ACEOF
20973rm -f conftest.$ac_objext
20974if { (eval echo "$as_me:20974: \"$ac_compile\"") >&5
20975  (eval $ac_compile) 2>&5
20976  ac_status=$?
20977  echo "$as_me:20977: \$? = $ac_status" >&5
20978  (exit $ac_status); } &&
20979         { ac_try='test -s conftest.$ac_objext'
20980  { (eval echo "$as_me:20980: \"$ac_try\"") >&5
20981  (eval $ac_try) 2>&5
20982  ac_status=$?
20983  echo "$as_me:20983: \$? = $ac_status" >&5
20984  (exit $ac_status); }; }; then
20985  cf_cv_nested_params=yes
20986else
20987  echo "$as_me: failed program was:" >&5
20988cat conftest.$ac_ext >&5
20989cf_cv_nested_params=no
20990fi
20991rm -f conftest.$ac_objext conftest.$ac_ext
20992
20993fi
20994
20995echo "$as_me:20995: result: $cf_cv_nested_params" >&5
20996echo "${ECHO_T}$cf_cv_nested_params" >&6
20997test $cf_cv_nested_params = yes &&
20998cat >>confdefs.h <<\EOF
20999#define HAVE_NESTED_PARAMS 1
21000EOF
21001
21002###	Checks for header files.
21003echo "$as_me:21003: checking for ANSI C header files" >&5
21004echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
21005if test "${ac_cv_header_stdc+set}" = set; then
21006  echo $ECHO_N "(cached) $ECHO_C" >&6
21007else
21008  cat >conftest.$ac_ext <<_ACEOF
21009#line 21009 "configure"
21010#include "confdefs.h"
21011#include <stdlib.h>
21012#include <stdarg.h>
21013#include <string.h>
21014#include <float.h>
21015
21016_ACEOF
21017if { (eval echo "$as_me:21017: \"$ac_cpp conftest.$ac_ext\"") >&5
21018  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21019  ac_status=$?
21020  egrep -v '^ *\+' conftest.er1 >conftest.err
21021  rm -f conftest.er1
21022  cat conftest.err >&5
21023  echo "$as_me:21023: \$? = $ac_status" >&5
21024  (exit $ac_status); } >/dev/null; then
21025  if test -s conftest.err; then
21026    ac_cpp_err=$ac_c_preproc_warn_flag
21027  else
21028    ac_cpp_err=
21029  fi
21030else
21031  ac_cpp_err=yes
21032fi
21033if test -z "$ac_cpp_err"; then
21034  ac_cv_header_stdc=yes
21035else
21036  echo "$as_me: failed program was:" >&5
21037  cat conftest.$ac_ext >&5
21038  ac_cv_header_stdc=no
21039fi
21040rm -f conftest.err conftest.$ac_ext
21041
21042if test $ac_cv_header_stdc = yes; then
21043  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
21044  cat >conftest.$ac_ext <<_ACEOF
21045#line 21045 "configure"
21046#include "confdefs.h"
21047#include <string.h>
21048
21049_ACEOF
21050if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21051  egrep "memchr" >/dev/null 2>&1; then
21052  :
21053else
21054  ac_cv_header_stdc=no
21055fi
21056rm -rf conftest*
21057
21058fi
21059
21060if test $ac_cv_header_stdc = yes; then
21061  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
21062  cat >conftest.$ac_ext <<_ACEOF
21063#line 21063 "configure"
21064#include "confdefs.h"
21065#include <stdlib.h>
21066
21067_ACEOF
21068if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
21069  egrep "free" >/dev/null 2>&1; then
21070  :
21071else
21072  ac_cv_header_stdc=no
21073fi
21074rm -rf conftest*
21075
21076fi
21077
21078if test $ac_cv_header_stdc = yes; then
21079  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
21080  if test "$cross_compiling" = yes; then
21081  :
21082else
21083  cat >conftest.$ac_ext <<_ACEOF
21084#line 21084 "configure"
21085#include "confdefs.h"
21086#include <ctype.h>
21087#if ((' ' & 0x0FF) == 0x020)
21088# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
21089# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
21090#else
21091# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
21092                     || ('j' <= (c) && (c) <= 'r') \
21093                     || ('s' <= (c) && (c) <= 'z'))
21094# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
21095#endif
21096
21097#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
21098int
21099main (void)
21100{
21101  int i;
21102  for (i = 0; i < 256; i++)
21103    if (XOR (islower (i), ISLOWER (i))
21104        || toupper (i) != TOUPPER (i))
21105      $ac_main_return(2);
21106  $ac_main_return (0);
21107}
21108_ACEOF
21109rm -f conftest$ac_exeext
21110if { (eval echo "$as_me:21110: \"$ac_link\"") >&5
21111  (eval $ac_link) 2>&5
21112  ac_status=$?
21113  echo "$as_me:21113: \$? = $ac_status" >&5
21114  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
21115  { (eval echo "$as_me:21115: \"$ac_try\"") >&5
21116  (eval $ac_try) 2>&5
21117  ac_status=$?
21118  echo "$as_me:21118: \$? = $ac_status" >&5
21119  (exit $ac_status); }; }; then
21120  :
21121else
21122  echo "$as_me: program exited with status $ac_status" >&5
21123echo "$as_me: failed program was:" >&5
21124cat conftest.$ac_ext >&5
21125ac_cv_header_stdc=no
21126fi
21127rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
21128fi
21129fi
21130fi
21131echo "$as_me:21131: result: $ac_cv_header_stdc" >&5
21132echo "${ECHO_T}$ac_cv_header_stdc" >&6
21133if test $ac_cv_header_stdc = yes; then
21134
21135cat >>confdefs.h <<\EOF
21136#define STDC_HEADERS 1
21137EOF
21138
21139fi
21140
21141ac_header_dirent=no
21142for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
21143  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
21144echo "$as_me:21144: checking for $ac_hdr that defines DIR" >&5
21145echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
21146if eval "test \"\${$as_ac_Header+set}\" = set"; then
21147  echo $ECHO_N "(cached) $ECHO_C" >&6
21148else
21149  cat >conftest.$ac_ext <<_ACEOF
21150#line 21150 "configure"
21151#include "confdefs.h"
21152#include <sys/types.h>
21153#include <$ac_hdr>
21154
21155int
21156main (void)
21157{
21158if ((DIR *) 0)
21159return 0;
21160  ;
21161  return 0;
21162}
21163_ACEOF
21164rm -f conftest.$ac_objext
21165if { (eval echo "$as_me:21165: \"$ac_compile\"") >&5
21166  (eval $ac_compile) 2>&5
21167  ac_status=$?
21168  echo "$as_me:21168: \$? = $ac_status" >&5
21169  (exit $ac_status); } &&
21170         { ac_try='test -s conftest.$ac_objext'
21171  { (eval echo "$as_me:21171: \"$ac_try\"") >&5
21172  (eval $ac_try) 2>&5
21173  ac_status=$?
21174  echo "$as_me:21174: \$? = $ac_status" >&5
21175  (exit $ac_status); }; }; then
21176  eval "$as_ac_Header=yes"
21177else
21178  echo "$as_me: failed program was:" >&5
21179cat conftest.$ac_ext >&5
21180eval "$as_ac_Header=no"
21181fi
21182rm -f conftest.$ac_objext conftest.$ac_ext
21183fi
21184echo "$as_me:21184: result: `eval echo '${'$as_ac_Header'}'`" >&5
21185echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21186if test `eval echo '${'$as_ac_Header'}'` = yes; then
21187  cat >>confdefs.h <<EOF
21188#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
21189EOF
21190
21191ac_header_dirent=$ac_hdr; break
21192fi
21193
21194done
21195# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
21196if test $ac_header_dirent = dirent.h; then
21197  echo "$as_me:21197: checking for opendir in -ldir" >&5
21198echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
21199if test "${ac_cv_lib_dir_opendir+set}" = set; then
21200  echo $ECHO_N "(cached) $ECHO_C" >&6
21201else
21202  ac_check_lib_save_LIBS=$LIBS
21203LIBS="-ldir  $LIBS"
21204cat >conftest.$ac_ext <<_ACEOF
21205#line 21205 "configure"
21206#include "confdefs.h"
21207
21208/* Override any gcc2 internal prototype to avoid an error.  */
21209#ifdef __cplusplus
21210extern "C"
21211#endif
21212/* We use char because int might match the return type of a gcc2
21213   builtin and then its argument prototype would still apply.  */
21214char opendir ();
21215int
21216main (void)
21217{
21218opendir ();
21219  ;
21220  return 0;
21221}
21222_ACEOF
21223rm -f conftest.$ac_objext conftest$ac_exeext
21224if { (eval echo "$as_me:21224: \"$ac_link\"") >&5
21225  (eval $ac_link) 2>&5
21226  ac_status=$?
21227  echo "$as_me:21227: \$? = $ac_status" >&5
21228  (exit $ac_status); } &&
21229         { ac_try='test -s conftest$ac_exeext'
21230  { (eval echo "$as_me:21230: \"$ac_try\"") >&5
21231  (eval $ac_try) 2>&5
21232  ac_status=$?
21233  echo "$as_me:21233: \$? = $ac_status" >&5
21234  (exit $ac_status); }; }; then
21235  ac_cv_lib_dir_opendir=yes
21236else
21237  echo "$as_me: failed program was:" >&5
21238cat conftest.$ac_ext >&5
21239ac_cv_lib_dir_opendir=no
21240fi
21241rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21242LIBS=$ac_check_lib_save_LIBS
21243fi
21244echo "$as_me:21244: result: $ac_cv_lib_dir_opendir" >&5
21245echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
21246if test $ac_cv_lib_dir_opendir = yes; then
21247  LIBS="$LIBS -ldir"
21248fi
21249
21250else
21251  echo "$as_me:21251: checking for opendir in -lx" >&5
21252echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
21253if test "${ac_cv_lib_x_opendir+set}" = set; then
21254  echo $ECHO_N "(cached) $ECHO_C" >&6
21255else
21256  ac_check_lib_save_LIBS=$LIBS
21257LIBS="-lx  $LIBS"
21258cat >conftest.$ac_ext <<_ACEOF
21259#line 21259 "configure"
21260#include "confdefs.h"
21261
21262/* Override any gcc2 internal prototype to avoid an error.  */
21263#ifdef __cplusplus
21264extern "C"
21265#endif
21266/* We use char because int might match the return type of a gcc2
21267   builtin and then its argument prototype would still apply.  */
21268char opendir ();
21269int
21270main (void)
21271{
21272opendir ();
21273  ;
21274  return 0;
21275}
21276_ACEOF
21277rm -f conftest.$ac_objext conftest$ac_exeext
21278if { (eval echo "$as_me:21278: \"$ac_link\"") >&5
21279  (eval $ac_link) 2>&5
21280  ac_status=$?
21281  echo "$as_me:21281: \$? = $ac_status" >&5
21282  (exit $ac_status); } &&
21283         { ac_try='test -s conftest$ac_exeext'
21284  { (eval echo "$as_me:21284: \"$ac_try\"") >&5
21285  (eval $ac_try) 2>&5
21286  ac_status=$?
21287  echo "$as_me:21287: \$? = $ac_status" >&5
21288  (exit $ac_status); }; }; then
21289  ac_cv_lib_x_opendir=yes
21290else
21291  echo "$as_me: failed program was:" >&5
21292cat conftest.$ac_ext >&5
21293ac_cv_lib_x_opendir=no
21294fi
21295rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21296LIBS=$ac_check_lib_save_LIBS
21297fi
21298echo "$as_me:21298: result: $ac_cv_lib_x_opendir" >&5
21299echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
21300if test $ac_cv_lib_x_opendir = yes; then
21301  LIBS="$LIBS -lx"
21302fi
21303
21304fi
21305
21306echo "$as_me:21306: checking whether time.h and sys/time.h may both be included" >&5
21307echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
21308if test "${ac_cv_header_time+set}" = set; then
21309  echo $ECHO_N "(cached) $ECHO_C" >&6
21310else
21311  cat >conftest.$ac_ext <<_ACEOF
21312#line 21312 "configure"
21313#include "confdefs.h"
21314#include <sys/types.h>
21315#include <sys/time.h>
21316#include <time.h>
21317
21318int
21319main (void)
21320{
21321if ((struct tm *) 0)
21322return 0;
21323  ;
21324  return 0;
21325}
21326_ACEOF
21327rm -f conftest.$ac_objext
21328if { (eval echo "$as_me:21328: \"$ac_compile\"") >&5
21329  (eval $ac_compile) 2>&5
21330  ac_status=$?
21331  echo "$as_me:21331: \$? = $ac_status" >&5
21332  (exit $ac_status); } &&
21333         { ac_try='test -s conftest.$ac_objext'
21334  { (eval echo "$as_me:21334: \"$ac_try\"") >&5
21335  (eval $ac_try) 2>&5
21336  ac_status=$?
21337  echo "$as_me:21337: \$? = $ac_status" >&5
21338  (exit $ac_status); }; }; then
21339  ac_cv_header_time=yes
21340else
21341  echo "$as_me: failed program was:" >&5
21342cat conftest.$ac_ext >&5
21343ac_cv_header_time=no
21344fi
21345rm -f conftest.$ac_objext conftest.$ac_ext
21346fi
21347echo "$as_me:21347: result: $ac_cv_header_time" >&5
21348echo "${ECHO_T}$ac_cv_header_time" >&6
21349if test $ac_cv_header_time = yes; then
21350
21351cat >>confdefs.h <<\EOF
21352#define TIME_WITH_SYS_TIME 1
21353EOF
21354
21355fi
21356
21357echo "$as_me:21357: checking for sys/wait.h that is POSIX.1 compatible" >&5
21358echo $ECHO_N "checking for sys/wait.h that is POSIX.1 compatible... $ECHO_C" >&6
21359if test "${ac_cv_header_sys_wait_h+set}" = set; then
21360  echo $ECHO_N "(cached) $ECHO_C" >&6
21361else
21362  cat >conftest.$ac_ext <<_ACEOF
21363#line 21363 "configure"
21364#include "confdefs.h"
21365#include <sys/types.h>
21366#include <sys/wait.h>
21367#ifndef WEXITSTATUS
21368# define WEXITSTATUS(stat_val) ((unsigned)(stat_val) >> 8)
21369#endif
21370#ifndef WIFEXITED
21371# define WIFEXITED(stat_val) (((stat_val) & 255) == 0)
21372#endif
21373
21374int
21375main (void)
21376{
21377  int s;
21378  wait (&s);
21379  s = WIFEXITED (s) ? WEXITSTATUS (s) : 1;
21380  ;
21381  return 0;
21382}
21383_ACEOF
21384rm -f conftest.$ac_objext
21385if { (eval echo "$as_me:21385: \"$ac_compile\"") >&5
21386  (eval $ac_compile) 2>&5
21387  ac_status=$?
21388  echo "$as_me:21388: \$? = $ac_status" >&5
21389  (exit $ac_status); } &&
21390         { ac_try='test -s conftest.$ac_objext'
21391  { (eval echo "$as_me:21391: \"$ac_try\"") >&5
21392  (eval $ac_try) 2>&5
21393  ac_status=$?
21394  echo "$as_me:21394: \$? = $ac_status" >&5
21395  (exit $ac_status); }; }; then
21396  ac_cv_header_sys_wait_h=yes
21397else
21398  echo "$as_me: failed program was:" >&5
21399cat conftest.$ac_ext >&5
21400ac_cv_header_sys_wait_h=no
21401fi
21402rm -f conftest.$ac_objext conftest.$ac_ext
21403fi
21404echo "$as_me:21404: result: $ac_cv_header_sys_wait_h" >&5
21405echo "${ECHO_T}$ac_cv_header_sys_wait_h" >&6
21406if test $ac_cv_header_sys_wait_h = yes; then
21407
21408cat >>confdefs.h <<\EOF
21409#define HAVE_SYS_WAIT_H 1
21410EOF
21411
21412fi
21413
21414for cf_hdr in \
21415	argz.h \
21416	arpa/inet.h \
21417	curses.h \
21418	errno.h \
21419	fcntl.h \
21420	getopt.h \
21421	ioctl.h \
21422	inttypes.h \
21423	langinfo.h \
21424	libc.h \
21425	locale.h \
21426	malloc.h \
21427	netdb.h \
21428	netinet/in.h \
21429	netlib.h \
21430	nl_types.h \
21431	nomacros.h \
21432	paths.h	\
21433	poll.h \
21434	prototypes.h \
21435	pwd.h \
21436	sgtty.h \
21437	socket.h \
21438	stdarg.h \
21439	stdbool.h \
21440	stddef.h \
21441	stdint.h \
21442	stdlib.h \
21443	string.h \
21444	strings.h \
21445	stropts.h \
21446	sys/bsdtypes.h \
21447	sys/errno.h \
21448	sys/file.h \
21449	sys/ioctl.h \
21450	sys/param.h \
21451	sys/poll.h \
21452	sys/ptem.h \
21453	sys/pty.h \
21454	sys/select.h \
21455	sys/stat.h \
21456	sys/stream.h \
21457	sys/socket.h \
21458	sys/time.h \
21459	sys/timeb.h \
21460	sys/times.h \
21461	sys/types.h \
21462	sys/utsname.h \
21463	term.h \
21464	termio.h \
21465	time.h \
21466	unistd.h \
21467	varargs.h \
21468	wchar.h \
21469	wctype.h \
21470
21471do
21472	echo "$as_me:21472: checking for $cf_hdr" >&5
21473echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
21474	cat >conftest.$ac_ext <<_ACEOF
21475#line 21475 "configure"
21476#include "confdefs.h"
21477
21478#include <sys/types.h>
21479#include <$cf_hdr>
21480
21481_ACEOF
21482if { (eval echo "$as_me:21482: \"$ac_cpp conftest.$ac_ext\"") >&5
21483  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21484  ac_status=$?
21485  egrep -v '^ *\+' conftest.er1 >conftest.err
21486  rm -f conftest.er1
21487  cat conftest.err >&5
21488  echo "$as_me:21488: \$? = $ac_status" >&5
21489  (exit $ac_status); } >/dev/null; then
21490  if test -s conftest.err; then
21491    ac_cpp_err=$ac_c_preproc_warn_flag
21492  else
21493    ac_cpp_err=
21494  fi
21495else
21496  ac_cpp_err=yes
21497fi
21498if test -z "$ac_cpp_err"; then
21499  cf_found=yes
21500else
21501  echo "$as_me: failed program was:" >&5
21502  cat conftest.$ac_ext >&5
21503  cf_found=no
21504fi
21505rm -f conftest.err conftest.$ac_ext
21506echo "$as_me:21506: result: $cf_found" >&5
21507echo "${ECHO_T}$cf_found" >&6
21508if test $cf_found = yes ; then
21509
21510cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
21511
21512	cat >>confdefs.h <<EOF
21513#define HAVE_${cf_tr_hdr} 1
21514EOF
21515
21516fi
21517done
21518
21519###	Checks that depend on existence-checks for headers
21520
21521for ac_header in \
21522termio.h \
21523termios.h \
21524unistd.h \
21525sys/ioctl.h \
21526sys/termio.h \
21527
21528do
21529as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21530echo "$as_me:21530: checking for $ac_header" >&5
21531echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21532if eval "test \"\${$as_ac_Header+set}\" = set"; then
21533  echo $ECHO_N "(cached) $ECHO_C" >&6
21534else
21535  cat >conftest.$ac_ext <<_ACEOF
21536#line 21536 "configure"
21537#include "confdefs.h"
21538#include <$ac_header>
21539_ACEOF
21540if { (eval echo "$as_me:21540: \"$ac_cpp conftest.$ac_ext\"") >&5
21541  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
21542  ac_status=$?
21543  egrep -v '^ *\+' conftest.er1 >conftest.err
21544  rm -f conftest.er1
21545  cat conftest.err >&5
21546  echo "$as_me:21546: \$? = $ac_status" >&5
21547  (exit $ac_status); } >/dev/null; then
21548  if test -s conftest.err; then
21549    ac_cpp_err=$ac_c_preproc_warn_flag
21550  else
21551    ac_cpp_err=
21552  fi
21553else
21554  ac_cpp_err=yes
21555fi
21556if test -z "$ac_cpp_err"; then
21557  eval "$as_ac_Header=yes"
21558else
21559  echo "$as_me: failed program was:" >&5
21560  cat conftest.$ac_ext >&5
21561  eval "$as_ac_Header=no"
21562fi
21563rm -f conftest.err conftest.$ac_ext
21564fi
21565echo "$as_me:21565: result: `eval echo '${'$as_ac_Header'}'`" >&5
21566echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
21567if test `eval echo '${'$as_ac_Header'}'` = yes; then
21568  cat >>confdefs.h <<EOF
21569#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21570EOF
21571
21572fi
21573done
21574
21575if test "$ac_cv_header_termios_h" = yes ; then
21576	case "$CFLAGS $CPPFLAGS" in
21577	*-D_POSIX_SOURCE*)
21578		termios_bad=dunno ;;
21579	*)	termios_bad=maybe ;;
21580	esac
21581	if test "$termios_bad" = maybe ; then
21582	echo "$as_me:21582: checking whether termios.h needs _POSIX_SOURCE" >&5
21583echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
21584	cat >conftest.$ac_ext <<_ACEOF
21585#line 21585 "configure"
21586#include "confdefs.h"
21587#include <termios.h>
21588int
21589main (void)
21590{
21591struct termios foo; int x = foo.c_iflag = 1; (void)x
21592  ;
21593  return 0;
21594}
21595_ACEOF
21596rm -f conftest.$ac_objext
21597if { (eval echo "$as_me:21597: \"$ac_compile\"") >&5
21598  (eval $ac_compile) 2>&5
21599  ac_status=$?
21600  echo "$as_me:21600: \$? = $ac_status" >&5
21601  (exit $ac_status); } &&
21602         { ac_try='test -s conftest.$ac_objext'
21603  { (eval echo "$as_me:21603: \"$ac_try\"") >&5
21604  (eval $ac_try) 2>&5
21605  ac_status=$?
21606  echo "$as_me:21606: \$? = $ac_status" >&5
21607  (exit $ac_status); }; }; then
21608  termios_bad=no
21609else
21610  echo "$as_me: failed program was:" >&5
21611cat conftest.$ac_ext >&5
21612
21613		cat >conftest.$ac_ext <<_ACEOF
21614#line 21614 "configure"
21615#include "confdefs.h"
21616
21617#define _POSIX_SOURCE
21618#include <termios.h>
21619int
21620main (void)
21621{
21622struct termios foo; int x = foo.c_iflag = 2; (void)x
21623  ;
21624  return 0;
21625}
21626_ACEOF
21627rm -f conftest.$ac_objext
21628if { (eval echo "$as_me:21628: \"$ac_compile\"") >&5
21629  (eval $ac_compile) 2>&5
21630  ac_status=$?
21631  echo "$as_me:21631: \$? = $ac_status" >&5
21632  (exit $ac_status); } &&
21633         { ac_try='test -s conftest.$ac_objext'
21634  { (eval echo "$as_me:21634: \"$ac_try\"") >&5
21635  (eval $ac_try) 2>&5
21636  ac_status=$?
21637  echo "$as_me:21637: \$? = $ac_status" >&5
21638  (exit $ac_status); }; }; then
21639  termios_bad=unknown
21640else
21641  echo "$as_me: failed program was:" >&5
21642cat conftest.$ac_ext >&5
21643termios_bad=yes
21644cat >>confdefs.h <<\EOF
21645#define _POSIX_SOURCE 1
21646EOF
21647
21648fi
21649rm -f conftest.$ac_objext conftest.$ac_ext
21650
21651fi
21652rm -f conftest.$ac_objext conftest.$ac_ext
21653	echo "$as_me:21653: result: $termios_bad" >&5
21654echo "${ECHO_T}$termios_bad" >&6
21655	fi
21656fi
21657
21658echo "$as_me:21658: checking declaration of size-change" >&5
21659echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
21660if test "${cf_cv_sizechange+set}" = set; then
21661  echo $ECHO_N "(cached) $ECHO_C" >&6
21662else
21663
21664	cf_cv_sizechange=unknown
21665	cf_save_CPPFLAGS="$CPPFLAGS"
21666
21667for cf_opts in "" "NEED_PTEM_H"
21668do
21669
21670	CPPFLAGS="$cf_save_CPPFLAGS"
21671	if test -n "$cf_opts"
21672	then
21673
21674	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21675	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
21676
21677	fi
21678	cat >conftest.$ac_ext <<_ACEOF
21679#line 21679 "configure"
21680#include "confdefs.h"
21681#include <sys/types.h>
21682#ifdef HAVE_TERMIOS_H
21683#include <termios.h>
21684#else
21685#ifdef HAVE_TERMIO_H
21686#include <termio.h>
21687#endif
21688#endif
21689
21690#ifdef NEED_PTEM_H
21691/* This is a workaround for SCO:  they neglected to define struct winsize in
21692 * termios.h -- it's only in termio.h and ptem.h
21693 */
21694#include <sys/stream.h>
21695#include <sys/ptem.h>
21696#endif
21697
21698#ifdef HAVE_SYS_IOCTL_H
21699#include <sys/ioctl.h>
21700#endif
21701
21702int
21703main (void)
21704{
21705
21706#ifdef TIOCGSIZE
21707	struct ttysize win;	/* SunOS 3.0... */
21708	int y = win.ts_lines = 2;
21709	int x = win.ts_cols = 1;
21710	(void)y;
21711	(void)x;
21712#else
21713#ifdef TIOCGWINSZ
21714	struct winsize win;	/* everything else */
21715	int y = win.ws_row = 2;
21716	int x = win.ws_col = 1;
21717	(void)y;
21718	(void)x;
21719#else
21720	no TIOCGSIZE or TIOCGWINSZ
21721#endif /* TIOCGWINSZ */
21722#endif /* TIOCGSIZE */
21723
21724  ;
21725  return 0;
21726}
21727_ACEOF
21728rm -f conftest.$ac_objext
21729if { (eval echo "$as_me:21729: \"$ac_compile\"") >&5
21730  (eval $ac_compile) 2>&5
21731  ac_status=$?
21732  echo "$as_me:21732: \$? = $ac_status" >&5
21733  (exit $ac_status); } &&
21734         { ac_try='test -s conftest.$ac_objext'
21735  { (eval echo "$as_me:21735: \"$ac_try\"") >&5
21736  (eval $ac_try) 2>&5
21737  ac_status=$?
21738  echo "$as_me:21738: \$? = $ac_status" >&5
21739  (exit $ac_status); }; }; then
21740  cf_cv_sizechange=yes
21741else
21742  echo "$as_me: failed program was:" >&5
21743cat conftest.$ac_ext >&5
21744cf_cv_sizechange=no
21745fi
21746rm -f conftest.$ac_objext conftest.$ac_ext
21747
21748	CPPFLAGS="$cf_save_CPPFLAGS"
21749	if test "$cf_cv_sizechange" = yes ; then
21750		echo "size-change succeeded ($cf_opts)" >&5
21751		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
21752		break
21753	fi
21754done
21755
21756fi
21757echo "$as_me:21757: result: $cf_cv_sizechange" >&5
21758echo "${ECHO_T}$cf_cv_sizechange" >&6
21759if test "$cf_cv_sizechange" != no ; then
21760
21761cat >>confdefs.h <<\EOF
21762#define HAVE_SIZECHANGE 1
21763EOF
21764
21765	case $cf_cv_sizechange in
21766	NEED*)
21767		cat >>confdefs.h <<EOF
21768#define $cf_cv_sizechange  1
21769EOF
21770
21771		;;
21772	esac
21773fi
21774
21775echo "$as_me:21775: checking if sys/time.h conflicts with sys/select.h" >&5
21776echo $ECHO_N "checking if sys/time.h conflicts with sys/select.h... $ECHO_C" >&6
21777if test "${cf_cv_sys_select_timeval+set}" = set; then
21778  echo $ECHO_N "(cached) $ECHO_C" >&6
21779else
21780
21781for cf_opts in no yes
21782do
21783cat >conftest.$ac_ext <<_ACEOF
21784#line 21784 "configure"
21785#include "confdefs.h"
21786
21787#define yes 1
21788#define no 0
21789#if $cf_opts
21790#define timeval fake_timeval
21791#endif
21792#include <sys/types.h>
21793#ifdef TIME_WITH_SYS_TIME
21794#	include <sys/time.h>
21795#	include <time.h>
21796#else
21797#	ifdef HAVE_SYS_TIME_H
21798#		include <sys/time.h>
21799#	else
21800#		include <time.h>
21801#	endif
21802#endif
21803#undef timeval
21804#ifdef HAVE_SYS_SELECT_H
21805#	include <sys/select.h>
21806#endif
21807
21808int
21809main (void)
21810{
21811struct timeval foo
21812  ;
21813  return 0;
21814}
21815_ACEOF
21816rm -f conftest.$ac_objext
21817if { (eval echo "$as_me:21817: \"$ac_compile\"") >&5
21818  (eval $ac_compile) 2>&5
21819  ac_status=$?
21820  echo "$as_me:21820: \$? = $ac_status" >&5
21821  (exit $ac_status); } &&
21822         { ac_try='test -s conftest.$ac_objext'
21823  { (eval echo "$as_me:21823: \"$ac_try\"") >&5
21824  (eval $ac_try) 2>&5
21825  ac_status=$?
21826  echo "$as_me:21826: \$? = $ac_status" >&5
21827  (exit $ac_status); }; }; then
21828  cf_cv_sys_select_timeval=$cf_opts
21829	 break
21830else
21831  echo "$as_me: failed program was:" >&5
21832cat conftest.$ac_ext >&5
21833cf_cv_sys_select_timeval=no
21834fi
21835rm -f conftest.$ac_objext conftest.$ac_ext
21836done
21837
21838fi
21839
21840echo "$as_me:21840: result: $cf_cv_sys_select_timeval" >&5
21841echo "${ECHO_T}$cf_cv_sys_select_timeval" >&6
21842test $cf_cv_sys_select_timeval = yes &&
21843cat >>confdefs.h <<\EOF
21844#define NEED_TIMEVAL_FIX 1
21845EOF
21846
21847echo "$as_me:21847: checking for va_copy" >&5
21848echo $ECHO_N "checking for va_copy... $ECHO_C" >&6
21849if test "${cf_cv_have_va_copy+set}" = set; then
21850  echo $ECHO_N "(cached) $ECHO_C" >&6
21851else
21852
21853cat >conftest.$ac_ext <<_ACEOF
21854#line 21854 "configure"
21855#include "confdefs.h"
21856
21857#include <stdarg.h>
21858
21859int
21860main (void)
21861{
21862
21863	static va_list dst;
21864	static va_list src;
21865	va_copy(dst, src)
21866  ;
21867  return 0;
21868}
21869_ACEOF
21870rm -f conftest.$ac_objext conftest$ac_exeext
21871if { (eval echo "$as_me:21871: \"$ac_link\"") >&5
21872  (eval $ac_link) 2>&5
21873  ac_status=$?
21874  echo "$as_me:21874: \$? = $ac_status" >&5
21875  (exit $ac_status); } &&
21876         { ac_try='test -s conftest$ac_exeext'
21877  { (eval echo "$as_me:21877: \"$ac_try\"") >&5
21878  (eval $ac_try) 2>&5
21879  ac_status=$?
21880  echo "$as_me:21880: \$? = $ac_status" >&5
21881  (exit $ac_status); }; }; then
21882  cf_cv_have_va_copy=yes
21883else
21884  echo "$as_me: failed program was:" >&5
21885cat conftest.$ac_ext >&5
21886cf_cv_have_va_copy=no
21887fi
21888rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21889fi
21890echo "$as_me:21890: result: $cf_cv_have_va_copy" >&5
21891echo "${ECHO_T}$cf_cv_have_va_copy" >&6
21892
21893if test "$cf_cv_have_va_copy" = yes;
21894then
21895
21896cat >>confdefs.h <<\EOF
21897#define HAVE_VA_COPY 1
21898EOF
21899
21900else # !cf_cv_have_va_copy
21901
21902echo "$as_me:21902: checking for __va_copy" >&5
21903echo $ECHO_N "checking for __va_copy... $ECHO_C" >&6
21904if test "${cf_cv_have___va_copy+set}" = set; then
21905  echo $ECHO_N "(cached) $ECHO_C" >&6
21906else
21907
21908cat >conftest.$ac_ext <<_ACEOF
21909#line 21909 "configure"
21910#include "confdefs.h"
21911
21912#include <stdarg.h>
21913
21914int
21915main (void)
21916{
21917
21918	static va_list dst;
21919	static va_list src;
21920	__va_copy(dst, src)
21921  ;
21922  return 0;
21923}
21924_ACEOF
21925rm -f conftest.$ac_objext conftest$ac_exeext
21926if { (eval echo "$as_me:21926: \"$ac_link\"") >&5
21927  (eval $ac_link) 2>&5
21928  ac_status=$?
21929  echo "$as_me:21929: \$? = $ac_status" >&5
21930  (exit $ac_status); } &&
21931         { ac_try='test -s conftest$ac_exeext'
21932  { (eval echo "$as_me:21932: \"$ac_try\"") >&5
21933  (eval $ac_try) 2>&5
21934  ac_status=$?
21935  echo "$as_me:21935: \$? = $ac_status" >&5
21936  (exit $ac_status); }; }; then
21937  cf_cv_have___va_copy=yes
21938else
21939  echo "$as_me: failed program was:" >&5
21940cat conftest.$ac_ext >&5
21941cf_cv_have___va_copy=no
21942fi
21943rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21944fi
21945echo "$as_me:21945: result: $cf_cv_have___va_copy" >&5
21946echo "${ECHO_T}$cf_cv_have___va_copy" >&6
21947
21948if test "$cf_cv_have___va_copy" = yes
21949then
21950
21951cat >>confdefs.h <<\EOF
21952#define HAVE___VA_COPY 1
21953EOF
21954
21955else # !cf_cv_have___va_copy
21956
21957echo "$as_me:21957: checking for __builtin_va_copy" >&5
21958echo $ECHO_N "checking for __builtin_va_copy... $ECHO_C" >&6
21959if test "${cf_cv_have___builtin_va_copy+set}" = set; then
21960  echo $ECHO_N "(cached) $ECHO_C" >&6
21961else
21962
21963cat >conftest.$ac_ext <<_ACEOF
21964#line 21964 "configure"
21965#include "confdefs.h"
21966
21967#include <stdarg.h>
21968
21969int
21970main (void)
21971{
21972
21973	static va_list dst;
21974	static va_list src;
21975	__builtin_va_copy(dst, src)
21976  ;
21977  return 0;
21978}
21979_ACEOF
21980rm -f conftest.$ac_objext conftest$ac_exeext
21981if { (eval echo "$as_me:21981: \"$ac_link\"") >&5
21982  (eval $ac_link) 2>&5
21983  ac_status=$?
21984  echo "$as_me:21984: \$? = $ac_status" >&5
21985  (exit $ac_status); } &&
21986         { ac_try='test -s conftest$ac_exeext'
21987  { (eval echo "$as_me:21987: \"$ac_try\"") >&5
21988  (eval $ac_try) 2>&5
21989  ac_status=$?
21990  echo "$as_me:21990: \$? = $ac_status" >&5
21991  (exit $ac_status); }; }; then
21992  cf_cv_have___builtin_va_copy=yes
21993else
21994  echo "$as_me: failed program was:" >&5
21995cat conftest.$ac_ext >&5
21996cf_cv_have___builtin_va_copy=no
21997fi
21998rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
21999fi
22000echo "$as_me:22000: result: $cf_cv_have___builtin_va_copy" >&5
22001echo "${ECHO_T}$cf_cv_have___builtin_va_copy" >&6
22002
22003test "$cf_cv_have___builtin_va_copy" = yes &&
22004
22005cat >>confdefs.h <<\EOF
22006#define HAVE___BUILTIN_VA_COPY 1
22007EOF
22008
22009fi # cf_cv_have___va_copy
22010
22011fi # cf_cv_have_va_copy
22012
22013case "${cf_cv_have_va_copy}${cf_cv_have___va_copy}${cf_cv_have___builtin_va_copy}" in
22014*yes*)
22015	;;
22016
22017*)
22018	echo "$as_me:22018: checking if we can simply copy va_list" >&5
22019echo $ECHO_N "checking if we can simply copy va_list... $ECHO_C" >&6
22020if test "${cf_cv_pointer_va_list+set}" = set; then
22021  echo $ECHO_N "(cached) $ECHO_C" >&6
22022else
22023
22024cat >conftest.$ac_ext <<_ACEOF
22025#line 22025 "configure"
22026#include "confdefs.h"
22027
22028#include <stdarg.h>
22029
22030int
22031main (void)
22032{
22033
22034	va_list dst;
22035	va_list src;
22036	dst = src
22037  ;
22038  return 0;
22039}
22040_ACEOF
22041rm -f conftest.$ac_objext conftest$ac_exeext
22042if { (eval echo "$as_me:22042: \"$ac_link\"") >&5
22043  (eval $ac_link) 2>&5
22044  ac_status=$?
22045  echo "$as_me:22045: \$? = $ac_status" >&5
22046  (exit $ac_status); } &&
22047         { ac_try='test -s conftest$ac_exeext'
22048  { (eval echo "$as_me:22048: \"$ac_try\"") >&5
22049  (eval $ac_try) 2>&5
22050  ac_status=$?
22051  echo "$as_me:22051: \$? = $ac_status" >&5
22052  (exit $ac_status); }; }; then
22053  cf_cv_pointer_va_list=yes
22054else
22055  echo "$as_me: failed program was:" >&5
22056cat conftest.$ac_ext >&5
22057cf_cv_pointer_va_list=no
22058fi
22059rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22060fi
22061echo "$as_me:22061: result: $cf_cv_pointer_va_list" >&5
22062echo "${ECHO_T}$cf_cv_pointer_va_list" >&6
22063
22064	if test "$cf_cv_pointer_va_list" = no
22065	then
22066		echo "$as_me:22066: checking if we can copy va_list indirectly" >&5
22067echo $ECHO_N "checking if we can copy va_list indirectly... $ECHO_C" >&6
22068if test "${cf_cv_array_va_list+set}" = set; then
22069  echo $ECHO_N "(cached) $ECHO_C" >&6
22070else
22071
22072cat >conftest.$ac_ext <<_ACEOF
22073#line 22073 "configure"
22074#include "confdefs.h"
22075
22076#include <stdarg.h>
22077
22078int
22079main (void)
22080{
22081
22082	va_list dst;
22083	va_list src;
22084	*dst = *src
22085  ;
22086  return 0;
22087}
22088_ACEOF
22089rm -f conftest.$ac_objext conftest$ac_exeext
22090if { (eval echo "$as_me:22090: \"$ac_link\"") >&5
22091  (eval $ac_link) 2>&5
22092  ac_status=$?
22093  echo "$as_me:22093: \$? = $ac_status" >&5
22094  (exit $ac_status); } &&
22095         { ac_try='test -s conftest$ac_exeext'
22096  { (eval echo "$as_me:22096: \"$ac_try\"") >&5
22097  (eval $ac_try) 2>&5
22098  ac_status=$?
22099  echo "$as_me:22099: \$? = $ac_status" >&5
22100  (exit $ac_status); }; }; then
22101  cf_cv_array_va_list=yes
22102else
22103  echo "$as_me: failed program was:" >&5
22104cat conftest.$ac_ext >&5
22105cf_cv_array_va_list=no
22106fi
22107rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22108fi
22109echo "$as_me:22109: result: $cf_cv_array_va_list" >&5
22110echo "${ECHO_T}$cf_cv_array_va_list" >&6
22111		test "$cf_cv_array_va_list" = yes &&
22112cat >>confdefs.h <<\EOF
22113#define ARRAY_VA_LIST 1
22114EOF
22115
22116	fi
22117	;;
22118esac
22119
22120###	Checks for Datatypes.
22121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
22122
22123for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
22124                  inttypes.h stdint.h unistd.h
22125do
22126as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22127echo "$as_me:22127: checking for $ac_header" >&5
22128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22129if eval "test \"\${$as_ac_Header+set}\" = set"; then
22130  echo $ECHO_N "(cached) $ECHO_C" >&6
22131else
22132  cat >conftest.$ac_ext <<_ACEOF
22133#line 22133 "configure"
22134#include "confdefs.h"
22135$ac_includes_default
22136#include <$ac_header>
22137_ACEOF
22138rm -f conftest.$ac_objext
22139if { (eval echo "$as_me:22139: \"$ac_compile\"") >&5
22140  (eval $ac_compile) 2>&5
22141  ac_status=$?
22142  echo "$as_me:22142: \$? = $ac_status" >&5
22143  (exit $ac_status); } &&
22144         { ac_try='test -s conftest.$ac_objext'
22145  { (eval echo "$as_me:22145: \"$ac_try\"") >&5
22146  (eval $ac_try) 2>&5
22147  ac_status=$?
22148  echo "$as_me:22148: \$? = $ac_status" >&5
22149  (exit $ac_status); }; }; then
22150  eval "$as_ac_Header=yes"
22151else
22152  echo "$as_me: failed program was:" >&5
22153cat conftest.$ac_ext >&5
22154eval "$as_ac_Header=no"
22155fi
22156rm -f conftest.$ac_objext conftest.$ac_ext
22157fi
22158echo "$as_me:22158: result: `eval echo '${'$as_ac_Header'}'`" >&5
22159echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
22160if test `eval echo '${'$as_ac_Header'}'` = yes; then
22161  cat >>confdefs.h <<EOF
22162#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22163EOF
22164
22165fi
22166done
22167
22168echo "$as_me:22168: checking for gid_t" >&5
22169echo $ECHO_N "checking for gid_t... $ECHO_C" >&6
22170if test "${ac_cv_type_gid_t+set}" = set; then
22171  echo $ECHO_N "(cached) $ECHO_C" >&6
22172else
22173  cat >conftest.$ac_ext <<_ACEOF
22174#line 22174 "configure"
22175#include "confdefs.h"
22176$ac_includes_default
22177int
22178main (void)
22179{
22180if ((gid_t *) 0)
22181  return 0;
22182if (sizeof (gid_t))
22183  return 0;
22184  ;
22185  return 0;
22186}
22187_ACEOF
22188rm -f conftest.$ac_objext
22189if { (eval echo "$as_me:22189: \"$ac_compile\"") >&5
22190  (eval $ac_compile) 2>&5
22191  ac_status=$?
22192  echo "$as_me:22192: \$? = $ac_status" >&5
22193  (exit $ac_status); } &&
22194         { ac_try='test -s conftest.$ac_objext'
22195  { (eval echo "$as_me:22195: \"$ac_try\"") >&5
22196  (eval $ac_try) 2>&5
22197  ac_status=$?
22198  echo "$as_me:22198: \$? = $ac_status" >&5
22199  (exit $ac_status); }; }; then
22200  ac_cv_type_gid_t=yes
22201else
22202  echo "$as_me: failed program was:" >&5
22203cat conftest.$ac_ext >&5
22204ac_cv_type_gid_t=no
22205fi
22206rm -f conftest.$ac_objext conftest.$ac_ext
22207fi
22208echo "$as_me:22208: result: $ac_cv_type_gid_t" >&5
22209echo "${ECHO_T}$ac_cv_type_gid_t" >&6
22210if test $ac_cv_type_gid_t = yes; then
22211  :
22212else
22213
22214cat >>confdefs.h <<EOF
22215#define gid_t int
22216EOF
22217
22218fi
22219
22220echo "$as_me:22220: checking for mode_t" >&5
22221echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
22222if test "${ac_cv_type_mode_t+set}" = set; then
22223  echo $ECHO_N "(cached) $ECHO_C" >&6
22224else
22225  cat >conftest.$ac_ext <<_ACEOF
22226#line 22226 "configure"
22227#include "confdefs.h"
22228$ac_includes_default
22229int
22230main (void)
22231{
22232if ((mode_t *) 0)
22233  return 0;
22234if (sizeof (mode_t))
22235  return 0;
22236  ;
22237  return 0;
22238}
22239_ACEOF
22240rm -f conftest.$ac_objext
22241if { (eval echo "$as_me:22241: \"$ac_compile\"") >&5
22242  (eval $ac_compile) 2>&5
22243  ac_status=$?
22244  echo "$as_me:22244: \$? = $ac_status" >&5
22245  (exit $ac_status); } &&
22246         { ac_try='test -s conftest.$ac_objext'
22247  { (eval echo "$as_me:22247: \"$ac_try\"") >&5
22248  (eval $ac_try) 2>&5
22249  ac_status=$?
22250  echo "$as_me:22250: \$? = $ac_status" >&5
22251  (exit $ac_status); }; }; then
22252  ac_cv_type_mode_t=yes
22253else
22254  echo "$as_me: failed program was:" >&5
22255cat conftest.$ac_ext >&5
22256ac_cv_type_mode_t=no
22257fi
22258rm -f conftest.$ac_objext conftest.$ac_ext
22259fi
22260echo "$as_me:22260: result: $ac_cv_type_mode_t" >&5
22261echo "${ECHO_T}$ac_cv_type_mode_t" >&6
22262if test $ac_cv_type_mode_t = yes; then
22263  :
22264else
22265
22266cat >>confdefs.h <<EOF
22267#define mode_t int
22268EOF
22269
22270fi
22271
22272echo "$as_me:22272: checking for off_t" >&5
22273echo $ECHO_N "checking for off_t... $ECHO_C" >&6
22274if test "${ac_cv_type_off_t+set}" = set; then
22275  echo $ECHO_N "(cached) $ECHO_C" >&6
22276else
22277  cat >conftest.$ac_ext <<_ACEOF
22278#line 22278 "configure"
22279#include "confdefs.h"
22280$ac_includes_default
22281int
22282main (void)
22283{
22284if ((off_t *) 0)
22285  return 0;
22286if (sizeof (off_t))
22287  return 0;
22288  ;
22289  return 0;
22290}
22291_ACEOF
22292rm -f conftest.$ac_objext
22293if { (eval echo "$as_me:22293: \"$ac_compile\"") >&5
22294  (eval $ac_compile) 2>&5
22295  ac_status=$?
22296  echo "$as_me:22296: \$? = $ac_status" >&5
22297  (exit $ac_status); } &&
22298         { ac_try='test -s conftest.$ac_objext'
22299  { (eval echo "$as_me:22299: \"$ac_try\"") >&5
22300  (eval $ac_try) 2>&5
22301  ac_status=$?
22302  echo "$as_me:22302: \$? = $ac_status" >&5
22303  (exit $ac_status); }; }; then
22304  ac_cv_type_off_t=yes
22305else
22306  echo "$as_me: failed program was:" >&5
22307cat conftest.$ac_ext >&5
22308ac_cv_type_off_t=no
22309fi
22310rm -f conftest.$ac_objext conftest.$ac_ext
22311fi
22312echo "$as_me:22312: result: $ac_cv_type_off_t" >&5
22313echo "${ECHO_T}$ac_cv_type_off_t" >&6
22314if test $ac_cv_type_off_t = yes; then
22315  :
22316else
22317
22318cat >>confdefs.h <<EOF
22319#define off_t long
22320EOF
22321
22322fi
22323
22324echo "$as_me:22324: checking for pid_t" >&5
22325echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
22326if test "${ac_cv_type_pid_t+set}" = set; then
22327  echo $ECHO_N "(cached) $ECHO_C" >&6
22328else
22329  cat >conftest.$ac_ext <<_ACEOF
22330#line 22330 "configure"
22331#include "confdefs.h"
22332$ac_includes_default
22333int
22334main (void)
22335{
22336if ((pid_t *) 0)
22337  return 0;
22338if (sizeof (pid_t))
22339  return 0;
22340  ;
22341  return 0;
22342}
22343_ACEOF
22344rm -f conftest.$ac_objext
22345if { (eval echo "$as_me:22345: \"$ac_compile\"") >&5
22346  (eval $ac_compile) 2>&5
22347  ac_status=$?
22348  echo "$as_me:22348: \$? = $ac_status" >&5
22349  (exit $ac_status); } &&
22350         { ac_try='test -s conftest.$ac_objext'
22351  { (eval echo "$as_me:22351: \"$ac_try\"") >&5
22352  (eval $ac_try) 2>&5
22353  ac_status=$?
22354  echo "$as_me:22354: \$? = $ac_status" >&5
22355  (exit $ac_status); }; }; then
22356  ac_cv_type_pid_t=yes
22357else
22358  echo "$as_me: failed program was:" >&5
22359cat conftest.$ac_ext >&5
22360ac_cv_type_pid_t=no
22361fi
22362rm -f conftest.$ac_objext conftest.$ac_ext
22363fi
22364echo "$as_me:22364: result: $ac_cv_type_pid_t" >&5
22365echo "${ECHO_T}$ac_cv_type_pid_t" >&6
22366if test $ac_cv_type_pid_t = yes; then
22367  :
22368else
22369
22370cat >>confdefs.h <<EOF
22371#define pid_t int
22372EOF
22373
22374fi
22375
22376echo "$as_me:22376: checking for size_t" >&5
22377echo $ECHO_N "checking for size_t... $ECHO_C" >&6
22378if test "${ac_cv_type_size_t+set}" = set; then
22379  echo $ECHO_N "(cached) $ECHO_C" >&6
22380else
22381  cat >conftest.$ac_ext <<_ACEOF
22382#line 22382 "configure"
22383#include "confdefs.h"
22384$ac_includes_default
22385int
22386main (void)
22387{
22388if ((size_t *) 0)
22389  return 0;
22390if (sizeof (size_t))
22391  return 0;
22392  ;
22393  return 0;
22394}
22395_ACEOF
22396rm -f conftest.$ac_objext
22397if { (eval echo "$as_me:22397: \"$ac_compile\"") >&5
22398  (eval $ac_compile) 2>&5
22399  ac_status=$?
22400  echo "$as_me:22400: \$? = $ac_status" >&5
22401  (exit $ac_status); } &&
22402         { ac_try='test -s conftest.$ac_objext'
22403  { (eval echo "$as_me:22403: \"$ac_try\"") >&5
22404  (eval $ac_try) 2>&5
22405  ac_status=$?
22406  echo "$as_me:22406: \$? = $ac_status" >&5
22407  (exit $ac_status); }; }; then
22408  ac_cv_type_size_t=yes
22409else
22410  echo "$as_me: failed program was:" >&5
22411cat conftest.$ac_ext >&5
22412ac_cv_type_size_t=no
22413fi
22414rm -f conftest.$ac_objext conftest.$ac_ext
22415fi
22416echo "$as_me:22416: result: $ac_cv_type_size_t" >&5
22417echo "${ECHO_T}$ac_cv_type_size_t" >&6
22418if test $ac_cv_type_size_t = yes; then
22419  :
22420else
22421
22422cat >>confdefs.h <<EOF
22423#define size_t unsigned
22424EOF
22425
22426fi
22427
22428echo "$as_me:22428: checking for ssize_t" >&5
22429echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
22430if test "${ac_cv_type_ssize_t+set}" = set; then
22431  echo $ECHO_N "(cached) $ECHO_C" >&6
22432else
22433  cat >conftest.$ac_ext <<_ACEOF
22434#line 22434 "configure"
22435#include "confdefs.h"
22436$ac_includes_default
22437int
22438main (void)
22439{
22440if ((ssize_t *) 0)
22441  return 0;
22442if (sizeof (ssize_t))
22443  return 0;
22444  ;
22445  return 0;
22446}
22447_ACEOF
22448rm -f conftest.$ac_objext
22449if { (eval echo "$as_me:22449: \"$ac_compile\"") >&5
22450  (eval $ac_compile) 2>&5
22451  ac_status=$?
22452  echo "$as_me:22452: \$? = $ac_status" >&5
22453  (exit $ac_status); } &&
22454         { ac_try='test -s conftest.$ac_objext'
22455  { (eval echo "$as_me:22455: \"$ac_try\"") >&5
22456  (eval $ac_try) 2>&5
22457  ac_status=$?
22458  echo "$as_me:22458: \$? = $ac_status" >&5
22459  (exit $ac_status); }; }; then
22460  ac_cv_type_ssize_t=yes
22461else
22462  echo "$as_me: failed program was:" >&5
22463cat conftest.$ac_ext >&5
22464ac_cv_type_ssize_t=no
22465fi
22466rm -f conftest.$ac_objext conftest.$ac_ext
22467fi
22468echo "$as_me:22468: result: $ac_cv_type_ssize_t" >&5
22469echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
22470if test $ac_cv_type_ssize_t = yes; then
22471  :
22472else
22473
22474cat >>confdefs.h <<EOF
22475#define ssize_t int
22476EOF
22477
22478fi
22479
22480echo "$as_me:22480: checking for time_t" >&5
22481echo $ECHO_N "checking for time_t... $ECHO_C" >&6
22482if test "${ac_cv_type_time_t+set}" = set; then
22483  echo $ECHO_N "(cached) $ECHO_C" >&6
22484else
22485  cat >conftest.$ac_ext <<_ACEOF
22486#line 22486 "configure"
22487#include "confdefs.h"
22488$ac_includes_default
22489int
22490main (void)
22491{
22492if ((time_t *) 0)
22493  return 0;
22494if (sizeof (time_t))
22495  return 0;
22496  ;
22497  return 0;
22498}
22499_ACEOF
22500rm -f conftest.$ac_objext
22501if { (eval echo "$as_me:22501: \"$ac_compile\"") >&5
22502  (eval $ac_compile) 2>&5
22503  ac_status=$?
22504  echo "$as_me:22504: \$? = $ac_status" >&5
22505  (exit $ac_status); } &&
22506         { ac_try='test -s conftest.$ac_objext'
22507  { (eval echo "$as_me:22507: \"$ac_try\"") >&5
22508  (eval $ac_try) 2>&5
22509  ac_status=$?
22510  echo "$as_me:22510: \$? = $ac_status" >&5
22511  (exit $ac_status); }; }; then
22512  ac_cv_type_time_t=yes
22513else
22514  echo "$as_me: failed program was:" >&5
22515cat conftest.$ac_ext >&5
22516ac_cv_type_time_t=no
22517fi
22518rm -f conftest.$ac_objext conftest.$ac_ext
22519fi
22520echo "$as_me:22520: result: $ac_cv_type_time_t" >&5
22521echo "${ECHO_T}$ac_cv_type_time_t" >&6
22522if test $ac_cv_type_time_t = yes; then
22523  :
22524else
22525
22526cat >>confdefs.h <<EOF
22527#define time_t long
22528EOF
22529
22530fi
22531
22532cat >conftest.$ac_ext <<_ACEOF
22533#line 22533 "configure"
22534#include "confdefs.h"
22535#include <netinet/in.h>
22536
22537_ACEOF
22538if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22539  egrep "in_addr_t" >/dev/null 2>&1; then
22540  :
22541else
22542
22543	cat >conftest.$ac_ext <<_ACEOF
22544#line 22544 "configure"
22545#include "confdefs.h"
22546#include <sys/endian.h>
22547
22548_ACEOF
22549if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22550  egrep "in_addr_t" >/dev/null 2>&1; then
22551  :
22552else
22553
22554		echo "$as_me:22554: checking for in_addr_t" >&5
22555echo $ECHO_N "checking for in_addr_t... $ECHO_C" >&6
22556if test "${ac_cv_type_in_addr_t+set}" = set; then
22557  echo $ECHO_N "(cached) $ECHO_C" >&6
22558else
22559  cat >conftest.$ac_ext <<_ACEOF
22560#line 22560 "configure"
22561#include "confdefs.h"
22562$ac_includes_default
22563int
22564main (void)
22565{
22566if ((in_addr_t *) 0)
22567  return 0;
22568if (sizeof (in_addr_t))
22569  return 0;
22570  ;
22571  return 0;
22572}
22573_ACEOF
22574rm -f conftest.$ac_objext
22575if { (eval echo "$as_me:22575: \"$ac_compile\"") >&5
22576  (eval $ac_compile) 2>&5
22577  ac_status=$?
22578  echo "$as_me:22578: \$? = $ac_status" >&5
22579  (exit $ac_status); } &&
22580         { ac_try='test -s conftest.$ac_objext'
22581  { (eval echo "$as_me:22581: \"$ac_try\"") >&5
22582  (eval $ac_try) 2>&5
22583  ac_status=$?
22584  echo "$as_me:22584: \$? = $ac_status" >&5
22585  (exit $ac_status); }; }; then
22586  ac_cv_type_in_addr_t=yes
22587else
22588  echo "$as_me: failed program was:" >&5
22589cat conftest.$ac_ext >&5
22590ac_cv_type_in_addr_t=no
22591fi
22592rm -f conftest.$ac_objext conftest.$ac_ext
22593fi
22594echo "$as_me:22594: result: $ac_cv_type_in_addr_t" >&5
22595echo "${ECHO_T}$ac_cv_type_in_addr_t" >&6
22596if test $ac_cv_type_in_addr_t = yes; then
22597  :
22598else
22599
22600cat >>confdefs.h <<EOF
22601#define in_addr_t unsigned long
22602EOF
22603
22604fi
22605
22606fi
22607rm -rf conftest*
22608
22609fi
22610rm -rf conftest*
22611
22612echo "$as_me:22612: checking for uid_t in sys/types.h" >&5
22613echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
22614if test "${ac_cv_type_uid_t+set}" = set; then
22615  echo $ECHO_N "(cached) $ECHO_C" >&6
22616else
22617  cat >conftest.$ac_ext <<_ACEOF
22618#line 22618 "configure"
22619#include "confdefs.h"
22620#include <sys/types.h>
22621
22622_ACEOF
22623if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
22624  egrep "uid_t" >/dev/null 2>&1; then
22625  ac_cv_type_uid_t=yes
22626else
22627  ac_cv_type_uid_t=no
22628fi
22629rm -rf conftest*
22630
22631fi
22632echo "$as_me:22632: result: $ac_cv_type_uid_t" >&5
22633echo "${ECHO_T}$ac_cv_type_uid_t" >&6
22634if test $ac_cv_type_uid_t = no; then
22635
22636cat >>confdefs.h <<\EOF
22637#define uid_t int
22638EOF
22639
22640cat >>confdefs.h <<\EOF
22641#define gid_t int
22642EOF
22643
22644fi
22645
22646echo "$as_me:22646: checking for quad_t" >&5
22647echo $ECHO_N "checking for quad_t... $ECHO_C" >&6
22648cat >conftest.$ac_ext <<_ACEOF
22649#line 22649 "configure"
22650#include "confdefs.h"
22651
22652#include <sys/types.h>
22653#if 0
22654#include <stdlib.h>
22655#include <stddef.h>
22656#endif /* 0 */
22657
22658int
22659main (void)
22660{
22661quad_t x; x = 0
22662  ;
22663  return 0;
22664}
22665_ACEOF
22666rm -f conftest.$ac_objext
22667if { (eval echo "$as_me:22667: \"$ac_compile\"") >&5
22668  (eval $ac_compile) 2>&5
22669  ac_status=$?
22670  echo "$as_me:22670: \$? = $ac_status" >&5
22671  (exit $ac_status); } &&
22672         { ac_try='test -s conftest.$ac_objext'
22673  { (eval echo "$as_me:22673: \"$ac_try\"") >&5
22674  (eval $ac_try) 2>&5
22675  ac_status=$?
22676  echo "$as_me:22676: \$? = $ac_status" >&5
22677  (exit $ac_status); }; }; then
22678  ac_cv_quad_t=yes
22679else
22680  echo "$as_me: failed program was:" >&5
22681cat conftest.$ac_ext >&5
22682ac_cv_quad_t=no
22683fi
22684rm -f conftest.$ac_objext conftest.$ac_ext
22685echo "$as_me:22685: result: $ac_cv_quad_t" >&5
22686echo "${ECHO_T}$ac_cv_quad_t" >&6
22687if test $ac_cv_quad_t = yes; then
22688
22689cat >>confdefs.h <<\EOF
22690#define HAVE_QUAD_T 1
22691EOF
22692
22693fi
22694
22695echo "$as_me:22695: checking for long long" >&5
22696echo $ECHO_N "checking for long long... $ECHO_C" >&6
22697cat >conftest.$ac_ext <<_ACEOF
22698#line 22698 "configure"
22699#include "confdefs.h"
22700
22701#include <sys/types.h>
22702
22703int
22704main (void)
22705{
22706long long x; x = 0
22707  ;
22708  return 0;
22709}
22710_ACEOF
22711rm -f conftest.$ac_objext
22712if { (eval echo "$as_me:22712: \"$ac_compile\"") >&5
22713  (eval $ac_compile) 2>&5
22714  ac_status=$?
22715  echo "$as_me:22715: \$? = $ac_status" >&5
22716  (exit $ac_status); } &&
22717         { ac_try='test -s conftest.$ac_objext'
22718  { (eval echo "$as_me:22718: \"$ac_try\"") >&5
22719  (eval $ac_try) 2>&5
22720  ac_status=$?
22721  echo "$as_me:22721: \$? = $ac_status" >&5
22722  (exit $ac_status); }; }; then
22723  ac_cv_long_long=yes
22724else
22725  echo "$as_me: failed program was:" >&5
22726cat conftest.$ac_ext >&5
22727ac_cv_long_long=no
22728fi
22729rm -f conftest.$ac_objext conftest.$ac_ext
22730echo "$as_me:22730: result: $ac_cv_long_long" >&5
22731echo "${ECHO_T}$ac_cv_long_long" >&6
22732if test $ac_cv_long_long = yes; then
22733
22734cat >>confdefs.h <<\EOF
22735#define HAVE_LONG_LONG 1
22736EOF
22737
22738fi
22739
22740echo "$as_me:22740: checking for int_least64_t" >&5
22741echo $ECHO_N "checking for int_least64_t... $ECHO_C" >&6
22742cat >conftest.$ac_ext <<_ACEOF
22743#line 22743 "configure"
22744#include "confdefs.h"
22745
22746#ifdef HAVE_STDINT_H
22747#include <stdint.h>
22748#endif
22749#ifdef HAVE_HAVE_INTTYPES_H
22750#include <inttypes.h>
22751#endif
22752
22753int
22754main (void)
22755{
22756int_least64_t x; x = 0
22757  ;
22758  return 0;
22759}
22760_ACEOF
22761rm -f conftest.$ac_objext
22762if { (eval echo "$as_me:22762: \"$ac_compile\"") >&5
22763  (eval $ac_compile) 2>&5
22764  ac_status=$?
22765  echo "$as_me:22765: \$? = $ac_status" >&5
22766  (exit $ac_status); } &&
22767         { ac_try='test -s conftest.$ac_objext'
22768  { (eval echo "$as_me:22768: \"$ac_try\"") >&5
22769  (eval $ac_try) 2>&5
22770  ac_status=$?
22771  echo "$as_me:22771: \$? = $ac_status" >&5
22772  (exit $ac_status); }; }; then
22773  ac_cv_int_least64_t=yes
22774else
22775  echo "$as_me: failed program was:" >&5
22776cat conftest.$ac_ext >&5
22777ac_cv_int_least64_t=no
22778fi
22779rm -f conftest.$ac_objext conftest.$ac_ext
22780echo "$as_me:22780: result: $ac_cv_int_least64_t" >&5
22781echo "${ECHO_T}$ac_cv_int_least64_t" >&6
22782if test $ac_cv_int_least64_t = yes; then
22783
22784cat >>confdefs.h <<\EOF
22785#define HAVE_INT_LEAST64_T 1
22786EOF
22787
22788	echo "$as_me:22788: checking for INT64_C" >&5
22789echo $ECHO_N "checking for INT64_C... $ECHO_C" >&6
22790	cat >conftest.$ac_ext <<_ACEOF
22791#line 22791 "configure"
22792#include "confdefs.h"
22793
22794#ifdef HAVE_STDINT_H
22795#include <stdint.h>
22796#endif
22797#ifdef HAVE_HAVE_INTTYPES_H
22798#include <inttypes.h>
22799#endif
22800
22801int
22802main (void)
22803{
22804int_least64_t x; x = INT64_C(0)
22805  ;
22806  return 0;
22807}
22808_ACEOF
22809rm -f conftest.$ac_objext
22810if { (eval echo "$as_me:22810: \"$ac_compile\"") >&5
22811  (eval $ac_compile) 2>&5
22812  ac_status=$?
22813  echo "$as_me:22813: \$? = $ac_status" >&5
22814  (exit $ac_status); } &&
22815         { ac_try='test -s conftest.$ac_objext'
22816  { (eval echo "$as_me:22816: \"$ac_try\"") >&5
22817  (eval $ac_try) 2>&5
22818  ac_status=$?
22819  echo "$as_me:22819: \$? = $ac_status" >&5
22820  (exit $ac_status); }; }; then
22821  ac_cv_int64_c=yes
22822else
22823  echo "$as_me: failed program was:" >&5
22824cat conftest.$ac_ext >&5
22825ac_cv_int64_c=no
22826fi
22827rm -f conftest.$ac_objext conftest.$ac_ext
22828	echo "$as_me:22828: result: $ac_cv_int64_c" >&5
22829echo "${ECHO_T}$ac_cv_int64_c" >&6
22830	if test $ac_cv_int64_c = yes; then
22831
22832cat >>confdefs.h <<\EOF
22833#define HAVE_INT64_C 1
22834EOF
22835
22836	fi
22837fi
22838
22839echo "$as_me:22839: checking for nl_item" >&5
22840echo $ECHO_N "checking for nl_item... $ECHO_C" >&6
22841cat >conftest.$ac_ext <<_ACEOF
22842#line 22842 "configure"
22843#include "confdefs.h"
22844
22845#ifdef HAVE_LANGINFO_H
22846#include <langinfo.h>
22847#else
22848#ifdef HAVE_NL_TYPES_H
22849#include <nl_types.h>
22850#endif
22851#endif
22852
22853int
22854main (void)
22855{
22856nl_item x; x = 0
22857  ;
22858  return 0;
22859}
22860_ACEOF
22861rm -f conftest.$ac_objext
22862if { (eval echo "$as_me:22862: \"$ac_compile\"") >&5
22863  (eval $ac_compile) 2>&5
22864  ac_status=$?
22865  echo "$as_me:22865: \$? = $ac_status" >&5
22866  (exit $ac_status); } &&
22867         { ac_try='test -s conftest.$ac_objext'
22868  { (eval echo "$as_me:22868: \"$ac_try\"") >&5
22869  (eval $ac_try) 2>&5
22870  ac_status=$?
22871  echo "$as_me:22871: \$? = $ac_status" >&5
22872  (exit $ac_status); }; }; then
22873  ac_cv_nl_item=yes
22874else
22875  echo "$as_me: failed program was:" >&5
22876cat conftest.$ac_ext >&5
22877ac_cv_nl_item=no
22878fi
22879rm -f conftest.$ac_objext conftest.$ac_ext
22880echo "$as_me:22880: result: $ac_cv_nl_item" >&5
22881echo "${ECHO_T}$ac_cv_nl_item" >&6
22882if test $ac_cv_nl_item = yes; then
22883
22884cat >>confdefs.h <<\EOF
22885#define HAVE_NL_ITEM 1
22886EOF
22887
22888fi
22889
22890###	Checks for libraries.
22891# libuu/uudeview
22892# only define HAVE_LIBUU and HAVE_UUDEVIEW_H if both are found
22893echo "$as_me:22893: checking for UUInitialize in -luu" >&5
22894echo $ECHO_N "checking for UUInitialize in -luu... $ECHO_C" >&6
22895if test "${ac_cv_lib_uu_UUInitialize+set}" = set; then
22896  echo $ECHO_N "(cached) $ECHO_C" >&6
22897else
22898  ac_check_lib_save_LIBS=$LIBS
22899LIBS="-luu  $LIBS"
22900cat >conftest.$ac_ext <<_ACEOF
22901#line 22901 "configure"
22902#include "confdefs.h"
22903
22904/* Override any gcc2 internal prototype to avoid an error.  */
22905#ifdef __cplusplus
22906extern "C"
22907#endif
22908/* We use char because int might match the return type of a gcc2
22909   builtin and then its argument prototype would still apply.  */
22910char UUInitialize ();
22911int
22912main (void)
22913{
22914UUInitialize ();
22915  ;
22916  return 0;
22917}
22918_ACEOF
22919rm -f conftest.$ac_objext conftest$ac_exeext
22920if { (eval echo "$as_me:22920: \"$ac_link\"") >&5
22921  (eval $ac_link) 2>&5
22922  ac_status=$?
22923  echo "$as_me:22923: \$? = $ac_status" >&5
22924  (exit $ac_status); } &&
22925         { ac_try='test -s conftest$ac_exeext'
22926  { (eval echo "$as_me:22926: \"$ac_try\"") >&5
22927  (eval $ac_try) 2>&5
22928  ac_status=$?
22929  echo "$as_me:22929: \$? = $ac_status" >&5
22930  (exit $ac_status); }; }; then
22931  ac_cv_lib_uu_UUInitialize=yes
22932else
22933  echo "$as_me: failed program was:" >&5
22934cat conftest.$ac_ext >&5
22935ac_cv_lib_uu_UUInitialize=no
22936fi
22937rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
22938LIBS=$ac_check_lib_save_LIBS
22939fi
22940echo "$as_me:22940: result: $ac_cv_lib_uu_UUInitialize" >&5
22941echo "${ECHO_T}$ac_cv_lib_uu_UUInitialize" >&6
22942if test $ac_cv_lib_uu_UUInitialize = yes; then
22943  echo "$as_me:22943: checking for uudeview.h" >&5
22944echo $ECHO_N "checking for uudeview.h... $ECHO_C" >&6
22945if test "${ac_cv_header_uudeview_h+set}" = set; then
22946  echo $ECHO_N "(cached) $ECHO_C" >&6
22947else
22948  cat >conftest.$ac_ext <<_ACEOF
22949#line 22949 "configure"
22950#include "confdefs.h"
22951#include <uudeview.h>
22952_ACEOF
22953if { (eval echo "$as_me:22953: \"$ac_cpp conftest.$ac_ext\"") >&5
22954  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
22955  ac_status=$?
22956  egrep -v '^ *\+' conftest.er1 >conftest.err
22957  rm -f conftest.er1
22958  cat conftest.err >&5
22959  echo "$as_me:22959: \$? = $ac_status" >&5
22960  (exit $ac_status); } >/dev/null; then
22961  if test -s conftest.err; then
22962    ac_cpp_err=$ac_c_preproc_warn_flag
22963  else
22964    ac_cpp_err=
22965  fi
22966else
22967  ac_cpp_err=yes
22968fi
22969if test -z "$ac_cpp_err"; then
22970  ac_cv_header_uudeview_h=yes
22971else
22972  echo "$as_me: failed program was:" >&5
22973  cat conftest.$ac_ext >&5
22974  ac_cv_header_uudeview_h=no
22975fi
22976rm -f conftest.err conftest.$ac_ext
22977fi
22978echo "$as_me:22978: result: $ac_cv_header_uudeview_h" >&5
22979echo "${ECHO_T}$ac_cv_header_uudeview_h" >&6
22980if test $ac_cv_header_uudeview_h = yes; then
22981
22982cat >>confdefs.h <<\EOF
22983#define HAVE_LIBUU 1
22984EOF
22985
22986cat >>confdefs.h <<\EOF
22987#define HAVE_UUDEVIEW_H 1
22988EOF
22989
22990		LIBS="$LIBS -luu"
22991
22992fi
22993
22994fi
22995
22996# ICU - International Components for Unicode
22997# TODO: do separate checks for
22998#  - unorm_normalize() # deprecated since ICU 56
22999#  - uidna_IDNToUnicode() # deprecated since ICU 56
23000#  - ubidi_open()
23001# and for IDNA2008
23002#  - uidna_openUTS46()
23003#  - uidna_nameToUnicode()
23004#  - unorm2_normalize()
23005# get $CFLAGS/$LDFLAGS from pkg-config icu-uc if possible
23006cf_try_icuuc="no"
23007cf_try_icuuc46="no"
23008echo "$as_me:23008: checking for unicode/unorm.h" >&5
23009echo $ECHO_N "checking for unicode/unorm.h... $ECHO_C" >&6
23010if test "${ac_cv_header_unicode_unorm_h+set}" = set; then
23011  echo $ECHO_N "(cached) $ECHO_C" >&6
23012else
23013  cat >conftest.$ac_ext <<_ACEOF
23014#line 23014 "configure"
23015#include "confdefs.h"
23016#include <unicode/unorm.h>
23017_ACEOF
23018if { (eval echo "$as_me:23018: \"$ac_cpp conftest.$ac_ext\"") >&5
23019  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23020  ac_status=$?
23021  egrep -v '^ *\+' conftest.er1 >conftest.err
23022  rm -f conftest.er1
23023  cat conftest.err >&5
23024  echo "$as_me:23024: \$? = $ac_status" >&5
23025  (exit $ac_status); } >/dev/null; then
23026  if test -s conftest.err; then
23027    ac_cpp_err=$ac_c_preproc_warn_flag
23028  else
23029    ac_cpp_err=
23030  fi
23031else
23032  ac_cpp_err=yes
23033fi
23034if test -z "$ac_cpp_err"; then
23035  ac_cv_header_unicode_unorm_h=yes
23036else
23037  echo "$as_me: failed program was:" >&5
23038  cat conftest.$ac_ext >&5
23039  ac_cv_header_unicode_unorm_h=no
23040fi
23041rm -f conftest.err conftest.$ac_ext
23042fi
23043echo "$as_me:23043: result: $ac_cv_header_unicode_unorm_h" >&5
23044echo "${ECHO_T}$ac_cv_header_unicode_unorm_h" >&6
23045if test $ac_cv_header_unicode_unorm_h = yes; then
23046
23047	echo "$as_me:23047: checking for unicode/ustring.h" >&5
23048echo $ECHO_N "checking for unicode/ustring.h... $ECHO_C" >&6
23049if test "${ac_cv_header_unicode_ustring_h+set}" = set; then
23050  echo $ECHO_N "(cached) $ECHO_C" >&6
23051else
23052  cat >conftest.$ac_ext <<_ACEOF
23053#line 23053 "configure"
23054#include "confdefs.h"
23055#include <unicode/ustring.h>
23056_ACEOF
23057if { (eval echo "$as_me:23057: \"$ac_cpp conftest.$ac_ext\"") >&5
23058  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23059  ac_status=$?
23060  egrep -v '^ *\+' conftest.er1 >conftest.err
23061  rm -f conftest.er1
23062  cat conftest.err >&5
23063  echo "$as_me:23063: \$? = $ac_status" >&5
23064  (exit $ac_status); } >/dev/null; then
23065  if test -s conftest.err; then
23066    ac_cpp_err=$ac_c_preproc_warn_flag
23067  else
23068    ac_cpp_err=
23069  fi
23070else
23071  ac_cpp_err=yes
23072fi
23073if test -z "$ac_cpp_err"; then
23074  ac_cv_header_unicode_ustring_h=yes
23075else
23076  echo "$as_me: failed program was:" >&5
23077  cat conftest.$ac_ext >&5
23078  ac_cv_header_unicode_ustring_h=no
23079fi
23080rm -f conftest.err conftest.$ac_ext
23081fi
23082echo "$as_me:23082: result: $ac_cv_header_unicode_ustring_h" >&5
23083echo "${ECHO_T}$ac_cv_header_unicode_ustring_h" >&6
23084if test $ac_cv_header_unicode_ustring_h = yes; then
23085
23086cat >>confdefs.h <<\EOF
23087#define HAVE_UNICODE_UNORM_H 1
23088EOF
23089
23090cat >>confdefs.h <<\EOF
23091#define HAVE_UNICODE_USTRING_H 1
23092EOF
23093
23094		echo "$as_me:23094: checking for unorm_normalize in libicuuc" >&5
23095echo $ECHO_N "checking for unorm_normalize in libicuuc... $ECHO_C" >&6
23096		cf_save_LIBS="$LIBS"
23097		cf_try_icuuc="no"
23098		LIBS="$LIBS -licuuc"
23099		cat >conftest.$ac_ext <<_ACEOF
23100#line 23100 "configure"
23101#include "confdefs.h"
23102#include <unicode/unorm.h>
23103int
23104main (void)
23105{
23106
23107			int32_t needed, ustr = NULL;
23108 			UErrorCode status;
23109			needed = unorm_normalize(ustr, -1, UNORM_DEFAULT, 0, NULL, 0, &status);
23110  ;
23111  return 0;
23112}
23113_ACEOF
23114rm -f conftest.$ac_objext conftest$ac_exeext
23115if { (eval echo "$as_me:23115: \"$ac_link\"") >&5
23116  (eval $ac_link) 2>&5
23117  ac_status=$?
23118  echo "$as_me:23118: \$? = $ac_status" >&5
23119  (exit $ac_status); } &&
23120         { ac_try='test -s conftest$ac_exeext'
23121  { (eval echo "$as_me:23121: \"$ac_try\"") >&5
23122  (eval $ac_try) 2>&5
23123  ac_status=$?
23124  echo "$as_me:23124: \$? = $ac_status" >&5
23125  (exit $ac_status); }; }; then
23126
23127cat >>confdefs.h <<\EOF
23128#define HAVE_LIBICUUC 1
23129EOF
23130
23131			cf_try_icuuc="yes"
23132else
23133  echo "$as_me: failed program was:" >&5
23134cat conftest.$ac_ext >&5
23135LIBS=$cf_save_LIBS
23136
23137fi
23138rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23139		echo "$as_me:23139: result: $cf_try_icuuc" >&5
23140echo "${ECHO_T}$cf_try_icuuc" >&6
23141		cf_save_LIBS="$LIBS"
23142		echo "$as_me:23142: checking for unicode/uidna.h" >&5
23143echo $ECHO_N "checking for unicode/uidna.h... $ECHO_C" >&6
23144if test "${ac_cv_header_unicode_uidna_h+set}" = set; then
23145  echo $ECHO_N "(cached) $ECHO_C" >&6
23146else
23147  cat >conftest.$ac_ext <<_ACEOF
23148#line 23148 "configure"
23149#include "confdefs.h"
23150#include <unicode/uidna.h>
23151_ACEOF
23152if { (eval echo "$as_me:23152: \"$ac_cpp conftest.$ac_ext\"") >&5
23153  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23154  ac_status=$?
23155  egrep -v '^ *\+' conftest.er1 >conftest.err
23156  rm -f conftest.er1
23157  cat conftest.err >&5
23158  echo "$as_me:23158: \$? = $ac_status" >&5
23159  (exit $ac_status); } >/dev/null; then
23160  if test -s conftest.err; then
23161    ac_cpp_err=$ac_c_preproc_warn_flag
23162  else
23163    ac_cpp_err=
23164  fi
23165else
23166  ac_cpp_err=yes
23167fi
23168if test -z "$ac_cpp_err"; then
23169  ac_cv_header_unicode_uidna_h=yes
23170else
23171  echo "$as_me: failed program was:" >&5
23172  cat conftest.$ac_ext >&5
23173  ac_cv_header_unicode_uidna_h=no
23174fi
23175rm -f conftest.err conftest.$ac_ext
23176fi
23177echo "$as_me:23177: result: $ac_cv_header_unicode_uidna_h" >&5
23178echo "${ECHO_T}$ac_cv_header_unicode_uidna_h" >&6
23179if test $ac_cv_header_unicode_uidna_h = yes; then
23180
23181cat >>confdefs.h <<\EOF
23182#define HAVE_UNICODE_UIDNA_H 1
23183EOF
23184
23185fi
23186
23187		echo "$as_me:23187: checking for uidna_nameToUnicode in libicuuc" >&5
23188echo $ECHO_N "checking for uidna_nameToUnicode in libicuuc... $ECHO_C" >&6
23189		cat >conftest.$ac_ext <<_ACEOF
23190#line 23190 "configure"
23191#include "confdefs.h"
23192#include <unicode/uidna.h>
23193			#include <unicode/unorm.h>
23194int
23195main (void)
23196{
23197
23198			UErrorCode status = U_ZERO_ERROR;
23199			UIDNAInfo info = UIDNA_INFO_INITIALIZER;
23200			UIDNA *uts46;
23201			uidna_openUTS46(UNORM_DEFAULT, &status);
23202			uidna_nameToUnicode(uts46, NULL, 0, NULL, 0, &info, &status);
23203			uidna_close(uts46);
23204  ;
23205  return 0;
23206}
23207_ACEOF
23208rm -f conftest.$ac_objext conftest$ac_exeext
23209if { (eval echo "$as_me:23209: \"$ac_link\"") >&5
23210  (eval $ac_link) 2>&5
23211  ac_status=$?
23212  echo "$as_me:23212: \$? = $ac_status" >&5
23213  (exit $ac_status); } &&
23214         { ac_try='test -s conftest$ac_exeext'
23215  { (eval echo "$as_me:23215: \"$ac_try\"") >&5
23216  (eval $ac_try) 2>&5
23217  ac_status=$?
23218  echo "$as_me:23218: \$? = $ac_status" >&5
23219  (exit $ac_status); }; }; then
23220
23221cat >>confdefs.h <<\EOF
23222#define HAVE_LIBICUUC_46_API 1
23223EOF
23224
23225			cf_try_icuuc46="yes"
23226else
23227  echo "$as_me: failed program was:" >&5
23228cat conftest.$ac_ext >&5
23229LIBS=$cf_save_LIBS
23230
23231fi
23232rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23233		echo "$as_me:23233: result: $cf_try_icuuc46" >&5
23234echo "${ECHO_T}$cf_try_icuuc46" >&6
23235		echo "$as_me:23235: checking for unicode/ubidi.h" >&5
23236echo $ECHO_N "checking for unicode/ubidi.h... $ECHO_C" >&6
23237if test "${ac_cv_header_unicode_ubidi_h+set}" = set; then
23238  echo $ECHO_N "(cached) $ECHO_C" >&6
23239else
23240  cat >conftest.$ac_ext <<_ACEOF
23241#line 23241 "configure"
23242#include "confdefs.h"
23243#include <unicode/ubidi.h>
23244_ACEOF
23245if { (eval echo "$as_me:23245: \"$ac_cpp conftest.$ac_ext\"") >&5
23246  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23247  ac_status=$?
23248  egrep -v '^ *\+' conftest.er1 >conftest.err
23249  rm -f conftest.er1
23250  cat conftest.err >&5
23251  echo "$as_me:23251: \$? = $ac_status" >&5
23252  (exit $ac_status); } >/dev/null; then
23253  if test -s conftest.err; then
23254    ac_cpp_err=$ac_c_preproc_warn_flag
23255  else
23256    ac_cpp_err=
23257  fi
23258else
23259  ac_cpp_err=yes
23260fi
23261if test -z "$ac_cpp_err"; then
23262  ac_cv_header_unicode_ubidi_h=yes
23263else
23264  echo "$as_me: failed program was:" >&5
23265  cat conftest.$ac_ext >&5
23266  ac_cv_header_unicode_ubidi_h=no
23267fi
23268rm -f conftest.err conftest.$ac_ext
23269fi
23270echo "$as_me:23270: result: $ac_cv_header_unicode_ubidi_h" >&5
23271echo "${ECHO_T}$ac_cv_header_unicode_ubidi_h" >&6
23272if test $ac_cv_header_unicode_ubidi_h = yes; then
23273
23274cat >>confdefs.h <<\EOF
23275#define HAVE_UNICODE_UBIDI_H 1
23276EOF
23277
23278fi
23279
23280fi
23281
23282fi
23283
23284# IDNA2008
23285echo "$as_me:23285: checking for unicode/unorm2.h" >&5
23286echo $ECHO_N "checking for unicode/unorm2.h... $ECHO_C" >&6
23287if test "${ac_cv_header_unicode_unorm2_h+set}" = set; then
23288  echo $ECHO_N "(cached) $ECHO_C" >&6
23289else
23290  cat >conftest.$ac_ext <<_ACEOF
23291#line 23291 "configure"
23292#include "confdefs.h"
23293#include <unicode/unorm2.h>
23294_ACEOF
23295if { (eval echo "$as_me:23295: \"$ac_cpp conftest.$ac_ext\"") >&5
23296  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23297  ac_status=$?
23298  egrep -v '^ *\+' conftest.er1 >conftest.err
23299  rm -f conftest.er1
23300  cat conftest.err >&5
23301  echo "$as_me:23301: \$? = $ac_status" >&5
23302  (exit $ac_status); } >/dev/null; then
23303  if test -s conftest.err; then
23304    ac_cpp_err=$ac_c_preproc_warn_flag
23305  else
23306    ac_cpp_err=
23307  fi
23308else
23309  ac_cpp_err=yes
23310fi
23311if test -z "$ac_cpp_err"; then
23312  ac_cv_header_unicode_unorm2_h=yes
23313else
23314  echo "$as_me: failed program was:" >&5
23315  cat conftest.$ac_ext >&5
23316  ac_cv_header_unicode_unorm2_h=no
23317fi
23318rm -f conftest.err conftest.$ac_ext
23319fi
23320echo "$as_me:23320: result: $ac_cv_header_unicode_unorm2_h" >&5
23321echo "${ECHO_T}$ac_cv_header_unicode_unorm2_h" >&6
23322if test $ac_cv_header_unicode_unorm2_h = yes; then
23323
23324cat >>confdefs.h <<\EOF
23325#define HAVE_UNICODE_UNORM2_H 1
23326EOF
23327
23328fi
23329
23330# without icuuc try GNU libunistring for normalization
23331if test $cf_try_icuuc = no ; then
23332	echo "$as_me:23332: checking for unitypes.h" >&5
23333echo $ECHO_N "checking for unitypes.h... $ECHO_C" >&6
23334if test "${ac_cv_header_unitypes_h+set}" = set; then
23335  echo $ECHO_N "(cached) $ECHO_C" >&6
23336else
23337  cat >conftest.$ac_ext <<_ACEOF
23338#line 23338 "configure"
23339#include "confdefs.h"
23340#include <unitypes.h>
23341_ACEOF
23342if { (eval echo "$as_me:23342: \"$ac_cpp conftest.$ac_ext\"") >&5
23343  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23344  ac_status=$?
23345  egrep -v '^ *\+' conftest.er1 >conftest.err
23346  rm -f conftest.er1
23347  cat conftest.err >&5
23348  echo "$as_me:23348: \$? = $ac_status" >&5
23349  (exit $ac_status); } >/dev/null; then
23350  if test -s conftest.err; then
23351    ac_cpp_err=$ac_c_preproc_warn_flag
23352  else
23353    ac_cpp_err=
23354  fi
23355else
23356  ac_cpp_err=yes
23357fi
23358if test -z "$ac_cpp_err"; then
23359  ac_cv_header_unitypes_h=yes
23360else
23361  echo "$as_me: failed program was:" >&5
23362  cat conftest.$ac_ext >&5
23363  ac_cv_header_unitypes_h=no
23364fi
23365rm -f conftest.err conftest.$ac_ext
23366fi
23367echo "$as_me:23367: result: $ac_cv_header_unitypes_h" >&5
23368echo "${ECHO_T}$ac_cv_header_unitypes_h" >&6
23369if test $ac_cv_header_unitypes_h = yes; then
23370
23371		echo "$as_me:23371: checking for uninorm.h" >&5
23372echo $ECHO_N "checking for uninorm.h... $ECHO_C" >&6
23373if test "${ac_cv_header_uninorm_h+set}" = set; then
23374  echo $ECHO_N "(cached) $ECHO_C" >&6
23375else
23376  cat >conftest.$ac_ext <<_ACEOF
23377#line 23377 "configure"
23378#include "confdefs.h"
23379#include <uninorm.h>
23380_ACEOF
23381if { (eval echo "$as_me:23381: \"$ac_cpp conftest.$ac_ext\"") >&5
23382  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23383  ac_status=$?
23384  egrep -v '^ *\+' conftest.er1 >conftest.err
23385  rm -f conftest.er1
23386  cat conftest.err >&5
23387  echo "$as_me:23387: \$? = $ac_status" >&5
23388  (exit $ac_status); } >/dev/null; then
23389  if test -s conftest.err; then
23390    ac_cpp_err=$ac_c_preproc_warn_flag
23391  else
23392    ac_cpp_err=
23393  fi
23394else
23395  ac_cpp_err=yes
23396fi
23397if test -z "$ac_cpp_err"; then
23398  ac_cv_header_uninorm_h=yes
23399else
23400  echo "$as_me: failed program was:" >&5
23401  cat conftest.$ac_ext >&5
23402  ac_cv_header_uninorm_h=no
23403fi
23404rm -f conftest.err conftest.$ac_ext
23405fi
23406echo "$as_me:23406: result: $ac_cv_header_uninorm_h" >&5
23407echo "${ECHO_T}$ac_cv_header_uninorm_h" >&6
23408if test $ac_cv_header_uninorm_h = yes; then
23409
23410cat >>confdefs.h <<\EOF
23411#define HAVE_UNITYPES_H 1
23412EOF
23413
23414cat >>confdefs.h <<\EOF
23415#define HAVE_UNINORM_H 1
23416EOF
23417
23418			echo "$as_me:23418: checking for u8_normalize in libunistring" >&5
23419echo $ECHO_N "checking for u8_normalize in libunistring... $ECHO_C" >&6
23420			cf_save_LIBS="$LIBS"
23421			cf_try_unistring="no"
23422			LIBS="$LIBS -lunistring"
23423			cat >conftest.$ac_ext <<_ACEOF
23424#line 23424 "configure"
23425#include "confdefs.h"
23426#include <unitypes.h>
23427				#include <uninorm.h>
23428int
23429main (void)
23430{
23431
23432				size_t ol = 0;
23433				u8_normalize(UNINORM_NFC, (uint8_t *) "x", 2, NULL, &ol);
23434  ;
23435  return 0;
23436}
23437_ACEOF
23438rm -f conftest.$ac_objext conftest$ac_exeext
23439if { (eval echo "$as_me:23439: \"$ac_link\"") >&5
23440  (eval $ac_link) 2>&5
23441  ac_status=$?
23442  echo "$as_me:23442: \$? = $ac_status" >&5
23443  (exit $ac_status); } &&
23444         { ac_try='test -s conftest$ac_exeext'
23445  { (eval echo "$as_me:23445: \"$ac_try\"") >&5
23446  (eval $ac_try) 2>&5
23447  ac_status=$?
23448  echo "$as_me:23448: \$? = $ac_status" >&5
23449  (exit $ac_status); }; }; then
23450
23451cat >>confdefs.h <<\EOF
23452#define HAVE_LIBUNISTRING 1
23453EOF
23454
23455				cf_try_unistring="yes"
23456else
23457  echo "$as_me: failed program was:" >&5
23458cat conftest.$ac_ext >&5
23459LIBS=$cf_save_LIBS
23460
23461fi
23462rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23463			echo "$as_me:23463: result: $cf_try_unistring" >&5
23464echo "${ECHO_T}$cf_try_unistring" >&6
23465
23466fi
23467
23468fi
23469
23470fi
23471
23472# without icuuc try libidn for Internationalized Domain Names / IDN 2003
23473# TODO: check for libidn2
23474#       get $CFLAGS/$LDFLAGS from pkg-config libidn[2] if possible
23475if test $cf_try_icuuc = no ; then
23476	echo "$as_me:23476: checking for stringprep_check_version in -lidn" >&5
23477echo $ECHO_N "checking for stringprep_check_version in -lidn... $ECHO_C" >&6
23478if test "${ac_cv_lib_idn_stringprep_check_version+set}" = set; then
23479  echo $ECHO_N "(cached) $ECHO_C" >&6
23480else
23481  ac_check_lib_save_LIBS=$LIBS
23482LIBS="-lidn  $LIBS"
23483cat >conftest.$ac_ext <<_ACEOF
23484#line 23484 "configure"
23485#include "confdefs.h"
23486
23487/* Override any gcc2 internal prototype to avoid an error.  */
23488#ifdef __cplusplus
23489extern "C"
23490#endif
23491/* We use char because int might match the return type of a gcc2
23492   builtin and then its argument prototype would still apply.  */
23493char stringprep_check_version ();
23494int
23495main (void)
23496{
23497stringprep_check_version ();
23498  ;
23499  return 0;
23500}
23501_ACEOF
23502rm -f conftest.$ac_objext conftest$ac_exeext
23503if { (eval echo "$as_me:23503: \"$ac_link\"") >&5
23504  (eval $ac_link) 2>&5
23505  ac_status=$?
23506  echo "$as_me:23506: \$? = $ac_status" >&5
23507  (exit $ac_status); } &&
23508         { ac_try='test -s conftest$ac_exeext'
23509  { (eval echo "$as_me:23509: \"$ac_try\"") >&5
23510  (eval $ac_try) 2>&5
23511  ac_status=$?
23512  echo "$as_me:23512: \$? = $ac_status" >&5
23513  (exit $ac_status); }; }; then
23514  ac_cv_lib_idn_stringprep_check_version=yes
23515else
23516  echo "$as_me: failed program was:" >&5
23517cat conftest.$ac_ext >&5
23518ac_cv_lib_idn_stringprep_check_version=no
23519fi
23520rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23521LIBS=$ac_check_lib_save_LIBS
23522fi
23523echo "$as_me:23523: result: $ac_cv_lib_idn_stringprep_check_version" >&5
23524echo "${ECHO_T}$ac_cv_lib_idn_stringprep_check_version" >&6
23525if test $ac_cv_lib_idn_stringprep_check_version = yes; then
23526  echo "$as_me:23526: checking for stringprep.h" >&5
23527echo $ECHO_N "checking for stringprep.h... $ECHO_C" >&6
23528if test "${ac_cv_header_stringprep_h+set}" = set; then
23529  echo $ECHO_N "(cached) $ECHO_C" >&6
23530else
23531  cat >conftest.$ac_ext <<_ACEOF
23532#line 23532 "configure"
23533#include "confdefs.h"
23534#include <stringprep.h>
23535_ACEOF
23536if { (eval echo "$as_me:23536: \"$ac_cpp conftest.$ac_ext\"") >&5
23537  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23538  ac_status=$?
23539  egrep -v '^ *\+' conftest.er1 >conftest.err
23540  rm -f conftest.er1
23541  cat conftest.err >&5
23542  echo "$as_me:23542: \$? = $ac_status" >&5
23543  (exit $ac_status); } >/dev/null; then
23544  if test -s conftest.err; then
23545    ac_cpp_err=$ac_c_preproc_warn_flag
23546  else
23547    ac_cpp_err=
23548  fi
23549else
23550  ac_cpp_err=yes
23551fi
23552if test -z "$ac_cpp_err"; then
23553  ac_cv_header_stringprep_h=yes
23554else
23555  echo "$as_me: failed program was:" >&5
23556  cat conftest.$ac_ext >&5
23557  ac_cv_header_stringprep_h=no
23558fi
23559rm -f conftest.err conftest.$ac_ext
23560fi
23561echo "$as_me:23561: result: $ac_cv_header_stringprep_h" >&5
23562echo "${ECHO_T}$ac_cv_header_stringprep_h" >&6
23563if test $ac_cv_header_stringprep_h = yes; then
23564
23565cat >>confdefs.h <<\EOF
23566#define HAVE_STRINGPREP_H 1
23567EOF
23568
23569			echo "$as_me:23569: checking for idna.h" >&5
23570echo $ECHO_N "checking for idna.h... $ECHO_C" >&6
23571if test "${ac_cv_header_idna_h+set}" = set; then
23572  echo $ECHO_N "(cached) $ECHO_C" >&6
23573else
23574  cat >conftest.$ac_ext <<_ACEOF
23575#line 23575 "configure"
23576#include "confdefs.h"
23577#include <idna.h>
23578_ACEOF
23579if { (eval echo "$as_me:23579: \"$ac_cpp conftest.$ac_ext\"") >&5
23580  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23581  ac_status=$?
23582  egrep -v '^ *\+' conftest.er1 >conftest.err
23583  rm -f conftest.er1
23584  cat conftest.err >&5
23585  echo "$as_me:23585: \$? = $ac_status" >&5
23586  (exit $ac_status); } >/dev/null; then
23587  if test -s conftest.err; then
23588    ac_cpp_err=$ac_c_preproc_warn_flag
23589  else
23590    ac_cpp_err=
23591  fi
23592else
23593  ac_cpp_err=yes
23594fi
23595if test -z "$ac_cpp_err"; then
23596  ac_cv_header_idna_h=yes
23597else
23598  echo "$as_me: failed program was:" >&5
23599  cat conftest.$ac_ext >&5
23600  ac_cv_header_idna_h=no
23601fi
23602rm -f conftest.err conftest.$ac_ext
23603fi
23604echo "$as_me:23604: result: $ac_cv_header_idna_h" >&5
23605echo "${ECHO_T}$ac_cv_header_idna_h" >&6
23606if test $ac_cv_header_idna_h = yes; then
23607
23608cat >>confdefs.h <<\EOF
23609#define HAVE_IDNA_H 1
23610EOF
23611
23612				echo "$as_me:23612: checking for idna_to_unicode_lzlz in -lidn" >&5
23613echo $ECHO_N "checking for idna_to_unicode_lzlz in -lidn... $ECHO_C" >&6
23614if test "${ac_cv_lib_idn_idna_to_unicode_lzlz+set}" = set; then
23615  echo $ECHO_N "(cached) $ECHO_C" >&6
23616else
23617  ac_check_lib_save_LIBS=$LIBS
23618LIBS="-lidn  $LIBS"
23619cat >conftest.$ac_ext <<_ACEOF
23620#line 23620 "configure"
23621#include "confdefs.h"
23622
23623/* Override any gcc2 internal prototype to avoid an error.  */
23624#ifdef __cplusplus
23625extern "C"
23626#endif
23627/* We use char because int might match the return type of a gcc2
23628   builtin and then its argument prototype would still apply.  */
23629char idna_to_unicode_lzlz ();
23630int
23631main (void)
23632{
23633idna_to_unicode_lzlz ();
23634  ;
23635  return 0;
23636}
23637_ACEOF
23638rm -f conftest.$ac_objext conftest$ac_exeext
23639if { (eval echo "$as_me:23639: \"$ac_link\"") >&5
23640  (eval $ac_link) 2>&5
23641  ac_status=$?
23642  echo "$as_me:23642: \$? = $ac_status" >&5
23643  (exit $ac_status); } &&
23644         { ac_try='test -s conftest$ac_exeext'
23645  { (eval echo "$as_me:23645: \"$ac_try\"") >&5
23646  (eval $ac_try) 2>&5
23647  ac_status=$?
23648  echo "$as_me:23648: \$? = $ac_status" >&5
23649  (exit $ac_status); }; }; then
23650  ac_cv_lib_idn_idna_to_unicode_lzlz=yes
23651else
23652  echo "$as_me: failed program was:" >&5
23653cat conftest.$ac_ext >&5
23654ac_cv_lib_idn_idna_to_unicode_lzlz=no
23655fi
23656rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23657LIBS=$ac_check_lib_save_LIBS
23658fi
23659echo "$as_me:23659: result: $ac_cv_lib_idn_idna_to_unicode_lzlz" >&5
23660echo "${ECHO_T}$ac_cv_lib_idn_idna_to_unicode_lzlz" >&6
23661if test $ac_cv_lib_idn_idna_to_unicode_lzlz = yes; then
23662
23663cat >>confdefs.h <<\EOF
23664#define HAVE_IDNA_TO_UNICODE_LZLZ 1
23665EOF
23666
23667					echo "$as_me:23667: checking for IDNA_USE_STD3_ASCII_RULES" >&5
23668echo $ECHO_N "checking for IDNA_USE_STD3_ASCII_RULES... $ECHO_C" >&6
23669					cat >conftest.$ac_ext <<_ACEOF
23670#line 23670 "configure"
23671#include "confdefs.h"
23672#include <idna.h>
23673
23674_ACEOF
23675if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
23676  egrep "IDNA_USE_STD3_ASCII_RULES" >/dev/null 2>&1; then
23677
23678cat >>confdefs.h <<\EOF
23679#define HAVE_IDNA_USE_STD3_ASCII_RULES 1
23680EOF
23681
23682						echo "$as_me:23682: result: yes" >&5
23683echo "${ECHO_T}yes" >&6
23684else
23685  echo "$as_me:23685: result: no" >&5
23686echo "${ECHO_T}no" >&6
23687
23688fi
23689rm -rf conftest*
23690
23691fi
23692
23693				echo "$as_me:23693: checking for idna_strerror in -lidn" >&5
23694echo $ECHO_N "checking for idna_strerror in -lidn... $ECHO_C" >&6
23695if test "${ac_cv_lib_idn_idna_strerror+set}" = set; then
23696  echo $ECHO_N "(cached) $ECHO_C" >&6
23697else
23698  ac_check_lib_save_LIBS=$LIBS
23699LIBS="-lidn  $LIBS"
23700cat >conftest.$ac_ext <<_ACEOF
23701#line 23701 "configure"
23702#include "confdefs.h"
23703
23704/* Override any gcc2 internal prototype to avoid an error.  */
23705#ifdef __cplusplus
23706extern "C"
23707#endif
23708/* We use char because int might match the return type of a gcc2
23709   builtin and then its argument prototype would still apply.  */
23710char idna_strerror ();
23711int
23712main (void)
23713{
23714idna_strerror ();
23715  ;
23716  return 0;
23717}
23718_ACEOF
23719rm -f conftest.$ac_objext conftest$ac_exeext
23720if { (eval echo "$as_me:23720: \"$ac_link\"") >&5
23721  (eval $ac_link) 2>&5
23722  ac_status=$?
23723  echo "$as_me:23723: \$? = $ac_status" >&5
23724  (exit $ac_status); } &&
23725         { ac_try='test -s conftest$ac_exeext'
23726  { (eval echo "$as_me:23726: \"$ac_try\"") >&5
23727  (eval $ac_try) 2>&5
23728  ac_status=$?
23729  echo "$as_me:23729: \$? = $ac_status" >&5
23730  (exit $ac_status); }; }; then
23731  ac_cv_lib_idn_idna_strerror=yes
23732else
23733  echo "$as_me: failed program was:" >&5
23734cat conftest.$ac_ext >&5
23735ac_cv_lib_idn_idna_strerror=no
23736fi
23737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23738LIBS=$ac_check_lib_save_LIBS
23739fi
23740echo "$as_me:23740: result: $ac_cv_lib_idn_idna_strerror" >&5
23741echo "${ECHO_T}$ac_cv_lib_idn_idna_strerror" >&6
23742if test $ac_cv_lib_idn_idna_strerror = yes; then
23743
23744cat >>confdefs.h <<\EOF
23745#define HAVE_IDNA_STRERROR 1
23746EOF
23747
23748fi
23749
23750fi
23751
23752cat >>confdefs.h <<\EOF
23753#define HAVE_LIBIDN 1
23754EOF
23755
23756			LIBS="$LIBS -lidn"
23757
23758fi
23759
23760fi
23761
23762fi
23763
23764# libidnkit - Internationalized Domain Names / IDN 2008
23765echo "$as_me:23765: checking for idn_decodename in -lidnkit" >&5
23766echo $ECHO_N "checking for idn_decodename in -lidnkit... $ECHO_C" >&6
23767if test "${ac_cv_lib_idnkit_idn_decodename+set}" = set; then
23768  echo $ECHO_N "(cached) $ECHO_C" >&6
23769else
23770  ac_check_lib_save_LIBS=$LIBS
23771LIBS="-lidnkit  $LIBS"
23772cat >conftest.$ac_ext <<_ACEOF
23773#line 23773 "configure"
23774#include "confdefs.h"
23775
23776/* Override any gcc2 internal prototype to avoid an error.  */
23777#ifdef __cplusplus
23778extern "C"
23779#endif
23780/* We use char because int might match the return type of a gcc2
23781   builtin and then its argument prototype would still apply.  */
23782char idn_decodename ();
23783int
23784main (void)
23785{
23786idn_decodename ();
23787  ;
23788  return 0;
23789}
23790_ACEOF
23791rm -f conftest.$ac_objext conftest$ac_exeext
23792if { (eval echo "$as_me:23792: \"$ac_link\"") >&5
23793  (eval $ac_link) 2>&5
23794  ac_status=$?
23795  echo "$as_me:23795: \$? = $ac_status" >&5
23796  (exit $ac_status); } &&
23797         { ac_try='test -s conftest$ac_exeext'
23798  { (eval echo "$as_me:23798: \"$ac_try\"") >&5
23799  (eval $ac_try) 2>&5
23800  ac_status=$?
23801  echo "$as_me:23801: \$? = $ac_status" >&5
23802  (exit $ac_status); }; }; then
23803  ac_cv_lib_idnkit_idn_decodename=yes
23804else
23805  echo "$as_me: failed program was:" >&5
23806cat conftest.$ac_ext >&5
23807ac_cv_lib_idnkit_idn_decodename=no
23808fi
23809rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23810LIBS=$ac_check_lib_save_LIBS
23811fi
23812echo "$as_me:23812: result: $ac_cv_lib_idnkit_idn_decodename" >&5
23813echo "${ECHO_T}$ac_cv_lib_idnkit_idn_decodename" >&6
23814if test $ac_cv_lib_idnkit_idn_decodename = yes; then
23815
23816	echo "$as_me:23816: checking for idn/api.h" >&5
23817echo $ECHO_N "checking for idn/api.h... $ECHO_C" >&6
23818if test "${ac_cv_header_idn_api_h+set}" = set; then
23819  echo $ECHO_N "(cached) $ECHO_C" >&6
23820else
23821  cat >conftest.$ac_ext <<_ACEOF
23822#line 23822 "configure"
23823#include "confdefs.h"
23824#include <idn/api.h>
23825_ACEOF
23826if { (eval echo "$as_me:23826: \"$ac_cpp conftest.$ac_ext\"") >&5
23827  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
23828  ac_status=$?
23829  egrep -v '^ *\+' conftest.er1 >conftest.err
23830  rm -f conftest.er1
23831  cat conftest.err >&5
23832  echo "$as_me:23832: \$? = $ac_status" >&5
23833  (exit $ac_status); } >/dev/null; then
23834  if test -s conftest.err; then
23835    ac_cpp_err=$ac_c_preproc_warn_flag
23836  else
23837    ac_cpp_err=
23838  fi
23839else
23840  ac_cpp_err=yes
23841fi
23842if test -z "$ac_cpp_err"; then
23843  ac_cv_header_idn_api_h=yes
23844else
23845  echo "$as_me: failed program was:" >&5
23846  cat conftest.$ac_ext >&5
23847  ac_cv_header_idn_api_h=no
23848fi
23849rm -f conftest.err conftest.$ac_ext
23850fi
23851echo "$as_me:23851: result: $ac_cv_header_idn_api_h" >&5
23852echo "${ECHO_T}$ac_cv_header_idn_api_h" >&6
23853if test $ac_cv_header_idn_api_h = yes; then
23854
23855		echo "$as_me:23855: checking for IDN_DECODE_LOOKUP" >&5
23856echo $ECHO_N "checking for IDN_DECODE_LOOKUP... $ECHO_C" >&6
23857		cf_save_LIBS="$LIBS"
23858		LIBS="$LIBS -lidnkit"
23859		cat >conftest.$ac_ext <<_ACEOF
23860#line 23860 "configure"
23861#include "confdefs.h"
23862#include <idn/api.h>
23863			#include <string.h>
23864int
23865main (void)
23866{
23867
23868			idn_result_t rs;
23869			char in[255], out[255];
23870			strcpy(in, "xn--brenfe-fta9a2q.de");
23871			rs = idn_decodename(IDN_DECODE_LOOKUP, &in, &out, 254);
23872			idn_result_tostring(rs);
23873  ;
23874  return 0;
23875}
23876_ACEOF
23877rm -f conftest.$ac_objext conftest$ac_exeext
23878if { (eval echo "$as_me:23878: \"$ac_link\"") >&5
23879  (eval $ac_link) 2>&5
23880  ac_status=$?
23881  echo "$as_me:23881: \$? = $ac_status" >&5
23882  (exit $ac_status); } &&
23883         { ac_try='test -s conftest$ac_exeext'
23884  { (eval echo "$as_me:23884: \"$ac_try\"") >&5
23885  (eval $ac_try) 2>&5
23886  ac_status=$?
23887  echo "$as_me:23887: \$? = $ac_status" >&5
23888  (exit $ac_status); }; }; then
23889
23890cat >>confdefs.h <<\EOF
23891#define HAVE_LIBIDNKIT 1
23892EOF
23893
23894cat >>confdefs.h <<\EOF
23895#define HAVE_IDN_API_H 1
23896EOF
23897
23898cat >>confdefs.h <<\EOF
23899#define HAVE_IDN_DECODENAME 1
23900EOF
23901
23902			echo "$as_me:23902: result: yes" >&5
23903echo "${ECHO_T}yes" >&6
23904else
23905  echo "$as_me: failed program was:" >&5
23906cat conftest.$ac_ext >&5
23907
23908			LIBS=$cf_save_LIBS
23909			echo "$as_me:23909: result: no" >&5
23910echo "${ECHO_T}no" >&6
23911
23912fi
23913rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23914
23915fi
23916
23917fi
23918
23919if test $use_curses != no ; then
23920	cf_cv_termlib=$cf_with_screen
23921else
23922
23923if test "${cf_cv_termlib+set}" = set; then
23924  echo $ECHO_N "(cached) $ECHO_C" >&6
23925else
23926
23927cf_cv_termlib=none
23928cat >conftest.$ac_ext <<_ACEOF
23929#line 23929 "configure"
23930#include "confdefs.h"
23931
23932int
23933main (void)
23934{
23935char *x=(char*)tgoto("",0,0)
23936  ;
23937  return 0;
23938}
23939_ACEOF
23940rm -f conftest.$ac_objext conftest$ac_exeext
23941if { (eval echo "$as_me:23941: \"$ac_link\"") >&5
23942  (eval $ac_link) 2>&5
23943  ac_status=$?
23944  echo "$as_me:23944: \$? = $ac_status" >&5
23945  (exit $ac_status); } &&
23946         { ac_try='test -s conftest$ac_exeext'
23947  { (eval echo "$as_me:23947: \"$ac_try\"") >&5
23948  (eval $ac_try) 2>&5
23949  ac_status=$?
23950  echo "$as_me:23950: \$? = $ac_status" >&5
23951  (exit $ac_status); }; }; then
23952  cat >conftest.$ac_ext <<_ACEOF
23953#line 23953 "configure"
23954#include "confdefs.h"
23955
23956int
23957main (void)
23958{
23959int x=tigetstr("")
23960  ;
23961  return 0;
23962}
23963_ACEOF
23964rm -f conftest.$ac_objext conftest$ac_exeext
23965if { (eval echo "$as_me:23965: \"$ac_link\"") >&5
23966  (eval $ac_link) 2>&5
23967  ac_status=$?
23968  echo "$as_me:23968: \$? = $ac_status" >&5
23969  (exit $ac_status); } &&
23970         { ac_try='test -s conftest$ac_exeext'
23971  { (eval echo "$as_me:23971: \"$ac_try\"") >&5
23972  (eval $ac_try) 2>&5
23973  ac_status=$?
23974  echo "$as_me:23974: \$? = $ac_status" >&5
23975  (exit $ac_status); }; }; then
23976  cf_cv_termlib=terminfo
23977else
23978  echo "$as_me: failed program was:" >&5
23979cat conftest.$ac_ext >&5
23980cf_cv_termlib=termcap
23981fi
23982rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
23983	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6
23984
23985echo "${as_me:-configure}:23985: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5
23986
23987else
23988  echo "$as_me: failed program was:" >&5
23989cat conftest.$ac_ext >&5
23990
23991if test "$cf_cv_termlib" = none; then
23992	# FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
23993	# tgetstr lives in -lcurses when it is only an unsatisfied extern.
23994	cf_save_LIBS="$LIBS"
23995	for cf_lib in tinfo curses ncurses termlib termcap
23996	do
23997		LIBS="-l$cf_lib $cf_save_LIBS"
23998		for cf_func in tigetstr tgetstr
23999		do
24000			echo "$as_me:24000: checking for $cf_func in -l$cf_lib" >&5
24001echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
24002			cat >conftest.$ac_ext <<_ACEOF
24003#line 24003 "configure"
24004#include "confdefs.h"
24005
24006int
24007main (void)
24008{
24009int x=$cf_func("")
24010  ;
24011  return 0;
24012}
24013_ACEOF
24014rm -f conftest.$ac_objext conftest$ac_exeext
24015if { (eval echo "$as_me:24015: \"$ac_link\"") >&5
24016  (eval $ac_link) 2>&5
24017  ac_status=$?
24018  echo "$as_me:24018: \$? = $ac_status" >&5
24019  (exit $ac_status); } &&
24020         { ac_try='test -s conftest$ac_exeext'
24021  { (eval echo "$as_me:24021: \"$ac_try\"") >&5
24022  (eval $ac_try) 2>&5
24023  ac_status=$?
24024  echo "$as_me:24024: \$? = $ac_status" >&5
24025  (exit $ac_status); }; }; then
24026  cf_result=yes
24027else
24028  echo "$as_me: failed program was:" >&5
24029cat conftest.$ac_ext >&5
24030cf_result=no
24031fi
24032rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24033			echo "$as_me:24033: result: $cf_result" >&5
24034echo "${ECHO_T}$cf_result" >&6
24035			if test "$cf_result" = yes ; then
24036				if test "$cf_func" = tigetstr ; then
24037					cf_cv_termlib=terminfo
24038				else
24039					cf_cv_termlib=termcap
24040				fi
24041				break
24042			fi
24043		done
24044		test "$cf_result" = yes && break
24045	done
24046	test "$cf_result" = no && LIBS="$cf_save_LIBS"
24047fi
24048if test "$cf_cv_termlib" = none; then
24049	# allow curses library for broken AIX system.
24050	echo "$as_me:24050: checking for initscr in -lcurses" >&5
24051echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
24052if test "${ac_cv_lib_curses_initscr+set}" = set; then
24053  echo $ECHO_N "(cached) $ECHO_C" >&6
24054else
24055  ac_check_lib_save_LIBS=$LIBS
24056LIBS="-lcurses  $LIBS"
24057cat >conftest.$ac_ext <<_ACEOF
24058#line 24058 "configure"
24059#include "confdefs.h"
24060
24061/* Override any gcc2 internal prototype to avoid an error.  */
24062#ifdef __cplusplus
24063extern "C"
24064#endif
24065/* We use char because int might match the return type of a gcc2
24066   builtin and then its argument prototype would still apply.  */
24067char initscr ();
24068int
24069main (void)
24070{
24071initscr ();
24072  ;
24073  return 0;
24074}
24075_ACEOF
24076rm -f conftest.$ac_objext conftest$ac_exeext
24077if { (eval echo "$as_me:24077: \"$ac_link\"") >&5
24078  (eval $ac_link) 2>&5
24079  ac_status=$?
24080  echo "$as_me:24080: \$? = $ac_status" >&5
24081  (exit $ac_status); } &&
24082         { ac_try='test -s conftest$ac_exeext'
24083  { (eval echo "$as_me:24083: \"$ac_try\"") >&5
24084  (eval $ac_try) 2>&5
24085  ac_status=$?
24086  echo "$as_me:24086: \$? = $ac_status" >&5
24087  (exit $ac_status); }; }; then
24088  ac_cv_lib_curses_initscr=yes
24089else
24090  echo "$as_me: failed program was:" >&5
24091cat conftest.$ac_ext >&5
24092ac_cv_lib_curses_initscr=no
24093fi
24094rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24095LIBS=$ac_check_lib_save_LIBS
24096fi
24097echo "$as_me:24097: result: $ac_cv_lib_curses_initscr" >&5
24098echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
24099if test $ac_cv_lib_curses_initscr = yes; then
24100
24101cf_add_libs="$LIBS"
24102# reverse order
24103cf_add_0lib=
24104for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24105# filter duplicates
24106for cf_add_1lib in $cf_add_0lib; do
24107	for cf_add_2lib in $cf_add_libs; do
24108		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24109			cf_add_1lib=
24110			break
24111		fi
24112	done
24113	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24114done
24115LIBS="$cf_add_libs"
24116
24117fi
24118
24119	echo "$as_me:24119: checking for tgoto in -ltermcap" >&5
24120echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
24121if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
24122  echo $ECHO_N "(cached) $ECHO_C" >&6
24123else
24124  ac_check_lib_save_LIBS=$LIBS
24125LIBS="-ltermcap  $LIBS"
24126cat >conftest.$ac_ext <<_ACEOF
24127#line 24127 "configure"
24128#include "confdefs.h"
24129
24130/* Override any gcc2 internal prototype to avoid an error.  */
24131#ifdef __cplusplus
24132extern "C"
24133#endif
24134/* We use char because int might match the return type of a gcc2
24135   builtin and then its argument prototype would still apply.  */
24136char tgoto ();
24137int
24138main (void)
24139{
24140tgoto ();
24141  ;
24142  return 0;
24143}
24144_ACEOF
24145rm -f conftest.$ac_objext conftest$ac_exeext
24146if { (eval echo "$as_me:24146: \"$ac_link\"") >&5
24147  (eval $ac_link) 2>&5
24148  ac_status=$?
24149  echo "$as_me:24149: \$? = $ac_status" >&5
24150  (exit $ac_status); } &&
24151         { ac_try='test -s conftest$ac_exeext'
24152  { (eval echo "$as_me:24152: \"$ac_try\"") >&5
24153  (eval $ac_try) 2>&5
24154  ac_status=$?
24155  echo "$as_me:24155: \$? = $ac_status" >&5
24156  (exit $ac_status); }; }; then
24157  ac_cv_lib_termcap_tgoto=yes
24158else
24159  echo "$as_me: failed program was:" >&5
24160cat conftest.$ac_ext >&5
24161ac_cv_lib_termcap_tgoto=no
24162fi
24163rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24164LIBS=$ac_check_lib_save_LIBS
24165fi
24166echo "$as_me:24166: result: $ac_cv_lib_termcap_tgoto" >&5
24167echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
24168if test $ac_cv_lib_termcap_tgoto = yes; then
24169
24170cf_add_libs="$LIBS"
24171# reverse order
24172cf_add_0lib=
24173for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24174# filter duplicates
24175for cf_add_1lib in $cf_add_0lib; do
24176	for cf_add_2lib in $cf_add_libs; do
24177		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24178			cf_add_1lib=
24179			break
24180		fi
24181	done
24182	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24183done
24184LIBS="$cf_add_libs"
24185 cf_cv_termlib=termcap
24186fi
24187
24188fi
24189
24190fi
24191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24192if test "$cf_cv_termlib" = none; then
24193	{ echo "$as_me:24193: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
24194echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
24195fi
24196
24197fi
24198
24199	# terminfo-based termcap interfaces may be prototyped in <curses.h>,
24200	# which may/may not be compatible with <termcap.h>
24201	echo "$as_me:24201: checking if we should include termcap.h" >&5
24202echo $ECHO_N "checking if we should include termcap.h... $ECHO_C" >&6
24203	cf_save_CFLAGS="$CFLAGS"
24204	CFLAGS="$CFLAGS -I$srcdir/include"
24205	cat >conftest.$ac_ext <<_ACEOF
24206#line 24206 "configure"
24207#include "confdefs.h"
24208
24209#define HAVE_TERMCAP_H 1
24210#include <tcurses.h>
24211int
24212main (void)
24213{
24214
24215#ifdef NCURSES_VERSION
24216make an error
24217#endif
24218
24219  ;
24220  return 0;
24221}
24222_ACEOF
24223rm -f conftest.$ac_objext
24224if { (eval echo "$as_me:24224: \"$ac_compile\"") >&5
24225  (eval $ac_compile) 2>&5
24226  ac_status=$?
24227  echo "$as_me:24227: \$? = $ac_status" >&5
24228  (exit $ac_status); } &&
24229         { ac_try='test -s conftest.$ac_objext'
24230  { (eval echo "$as_me:24230: \"$ac_try\"") >&5
24231  (eval $ac_try) 2>&5
24232  ac_status=$?
24233  echo "$as_me:24233: \$? = $ac_status" >&5
24234  (exit $ac_status); }; }; then
24235  cf_result=yes
24236else
24237  echo "$as_me: failed program was:" >&5
24238cat conftest.$ac_ext >&5
24239cf_result=no
24240fi
24241rm -f conftest.$ac_objext conftest.$ac_ext
24242	echo "$as_me:24242: result: $cf_result" >&5
24243echo "${ECHO_T}$cf_result" >&6
24244	CFLAGS="$cf_save_CFLAGS"
24245	test $cf_result = yes &&
24246cat >>confdefs.h <<\EOF
24247#define HAVE_TERMCAP_H 1
24248EOF
24249
24250echo "$as_me:24250: checking for term.h" >&5
24251echo $ECHO_N "checking for term.h... $ECHO_C" >&6
24252if test "${cf_cv_term_header+set}" = set; then
24253  echo $ECHO_N "(cached) $ECHO_C" >&6
24254else
24255
24256# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
24257# for <term.h> if we do not find the variant.
24258
24259cf_header_list="term.h ncurses/term.h ncursesw/term.h"
24260
24261case ${cf_cv_ncurses_header:-curses.h} in
24262*/*)
24263	cf_header_item=`echo ${cf_cv_ncurses_header:-curses.h} | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
24264	cf_header_list="$cf_header_item $cf_header_list"
24265	;;
24266esac
24267
24268for cf_header in $cf_header_list
24269do
24270	cat >conftest.$ac_ext <<_ACEOF
24271#line 24271 "configure"
24272#include "confdefs.h"
24273
24274#include <${cf_cv_ncurses_header:-curses.h}>
24275#include <${cf_header}>
24276int
24277main (void)
24278{
24279WINDOW *x; (void)x
24280  ;
24281  return 0;
24282}
24283_ACEOF
24284rm -f conftest.$ac_objext
24285if { (eval echo "$as_me:24285: \"$ac_compile\"") >&5
24286  (eval $ac_compile) 2>&5
24287  ac_status=$?
24288  echo "$as_me:24288: \$? = $ac_status" >&5
24289  (exit $ac_status); } &&
24290         { ac_try='test -s conftest.$ac_objext'
24291  { (eval echo "$as_me:24291: \"$ac_try\"") >&5
24292  (eval $ac_try) 2>&5
24293  ac_status=$?
24294  echo "$as_me:24294: \$? = $ac_status" >&5
24295  (exit $ac_status); }; }; then
24296  cf_cv_term_header=$cf_header
24297	 break
24298else
24299  echo "$as_me: failed program was:" >&5
24300cat conftest.$ac_ext >&5
24301cf_cv_term_header=no
24302fi
24303rm -f conftest.$ac_objext conftest.$ac_ext
24304done
24305
24306case $cf_cv_term_header in
24307no)
24308	# If curses is ncurses, some packagers still mess it up by trying to make
24309	# us use GNU termcap.  This handles the most common case.
24310	for cf_header in ncurses/term.h ncursesw/term.h
24311	do
24312		cat >conftest.$ac_ext <<_ACEOF
24313#line 24313 "configure"
24314#include "confdefs.h"
24315
24316#include <${cf_cv_ncurses_header:-curses.h}>
24317#ifdef NCURSES_VERSION
24318#include <${cf_header}>
24319#else
24320make an error
24321#endif
24322int
24323main (void)
24324{
24325WINDOW *x; (void)x
24326  ;
24327  return 0;
24328}
24329_ACEOF
24330rm -f conftest.$ac_objext
24331if { (eval echo "$as_me:24331: \"$ac_compile\"") >&5
24332  (eval $ac_compile) 2>&5
24333  ac_status=$?
24334  echo "$as_me:24334: \$? = $ac_status" >&5
24335  (exit $ac_status); } &&
24336         { ac_try='test -s conftest.$ac_objext'
24337  { (eval echo "$as_me:24337: \"$ac_try\"") >&5
24338  (eval $ac_try) 2>&5
24339  ac_status=$?
24340  echo "$as_me:24340: \$? = $ac_status" >&5
24341  (exit $ac_status); }; }; then
24342  cf_cv_term_header=$cf_header
24343			 break
24344else
24345  echo "$as_me: failed program was:" >&5
24346cat conftest.$ac_ext >&5
24347cf_cv_term_header=no
24348fi
24349rm -f conftest.$ac_objext conftest.$ac_ext
24350	done
24351	;;
24352esac
24353
24354fi
24355echo "$as_me:24355: result: $cf_cv_term_header" >&5
24356echo "${ECHO_T}$cf_cv_term_header" >&6
24357
24358case $cf_cv_term_header in
24359term.h)
24360
24361cat >>confdefs.h <<\EOF
24362#define HAVE_TERM_H 1
24363EOF
24364
24365	;;
24366ncurses/term.h)
24367
24368cat >>confdefs.h <<\EOF
24369#define HAVE_NCURSES_TERM_H 1
24370EOF
24371
24372	;;
24373ncursesw/term.h)
24374
24375cat >>confdefs.h <<\EOF
24376#define HAVE_NCURSESW_TERM_H 1
24377EOF
24378
24379	;;
24380esac
24381
24382echo "$as_me:24382: checking if we should include curses.h or termcap.h" >&5
24383echo $ECHO_N "checking if we should include curses.h or termcap.h... $ECHO_C" >&6
24384if test "${cf_cv_need_curses_h+set}" = set; then
24385  echo $ECHO_N "(cached) $ECHO_C" >&6
24386else
24387
24388cf_save_CPPFLAGS="$CPPFLAGS"
24389cf_cv_need_curses_h=no
24390
24391for cf_t_opts in "" "NEED_TERMCAP_H"
24392do
24393for cf_c_opts in "" "NEED_CURSES_H"
24394do
24395
24396    CPPFLAGS="$cf_save_CPPFLAGS $CHECK_DECL_FLAG"
24397    test -n "$cf_c_opts" && CPPFLAGS="$CPPFLAGS -D$cf_c_opts"
24398    test -n "$cf_t_opts" && CPPFLAGS="$CPPFLAGS -D$cf_t_opts"
24399
24400    cat >conftest.$ac_ext <<_ACEOF
24401#line 24401 "configure"
24402#include "confdefs.h"
24403/* $cf_c_opts $cf_t_opts */
24404$CHECK_DECL_HDRS
24405int
24406main (void)
24407{
24408char *x = (char *)tgoto("")
24409  ;
24410  return 0;
24411}
24412_ACEOF
24413rm -f conftest.$ac_objext conftest$ac_exeext
24414if { (eval echo "$as_me:24414: \"$ac_link\"") >&5
24415  (eval $ac_link) 2>&5
24416  ac_status=$?
24417  echo "$as_me:24417: \$? = $ac_status" >&5
24418  (exit $ac_status); } &&
24419         { ac_try='test -s conftest$ac_exeext'
24420  { (eval echo "$as_me:24420: \"$ac_try\"") >&5
24421  (eval $ac_try) 2>&5
24422  ac_status=$?
24423  echo "$as_me:24423: \$? = $ac_status" >&5
24424  (exit $ac_status); }; }; then
24425  test "$cf_cv_need_curses_h" = no && {
24426	     cf_cv_need_curses_h=maybe
24427	     cf_ok_c_opts=$cf_c_opts
24428	     cf_ok_t_opts=$cf_t_opts
24429	}
24430else
24431  echo "$as_me: failed program was:" >&5
24432cat conftest.$ac_ext >&5
24433echo "Recompiling with corrected call (C:$cf_c_opts, T:$cf_t_opts)" >&5
24434	cat >conftest.$ac_ext <<_ACEOF
24435#line 24435 "configure"
24436#include "confdefs.h"
24437
24438$CHECK_DECL_HDRS
24439int
24440main (void)
24441{
24442char *x = (char *)tgoto("",0,0)
24443  ;
24444  return 0;
24445}
24446_ACEOF
24447rm -f conftest.$ac_objext conftest$ac_exeext
24448if { (eval echo "$as_me:24448: \"$ac_link\"") >&5
24449  (eval $ac_link) 2>&5
24450  ac_status=$?
24451  echo "$as_me:24451: \$? = $ac_status" >&5
24452  (exit $ac_status); } &&
24453         { ac_try='test -s conftest$ac_exeext'
24454  { (eval echo "$as_me:24454: \"$ac_try\"") >&5
24455  (eval $ac_try) 2>&5
24456  ac_status=$?
24457  echo "$as_me:24457: \$? = $ac_status" >&5
24458  (exit $ac_status); }; }; then
24459  cf_cv_need_curses_h=yes
24460	 cf_ok_c_opts=$cf_c_opts
24461	 cf_ok_t_opts=$cf_t_opts
24462else
24463  echo "$as_me: failed program was:" >&5
24464cat conftest.$ac_ext >&5
24465fi
24466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24467fi
24468rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24469
24470	CPPFLAGS="$cf_save_CPPFLAGS"
24471	test "$cf_cv_need_curses_h" = yes && break
24472done
24473	test "$cf_cv_need_curses_h" = yes && break
24474done
24475
24476if test "$cf_cv_need_curses_h" != no ; then
24477	echo "Curses/termcap test = $cf_cv_need_curses_h (C:$cf_ok_c_opts, T:$cf_ok_t_opts)" >&5
24478	if test -n "$cf_ok_c_opts" ; then
24479		if test -n "$cf_ok_t_opts" ; then
24480			cf_cv_need_curses_h=both
24481		else
24482			cf_cv_need_curses_h=curses.h
24483		fi
24484	elif test -n "$cf_ok_t_opts" ; then
24485		cf_cv_need_curses_h=termcap.h
24486	elif test "$cf_cv_term_header" != no ; then
24487		cf_cv_need_curses_h=term.h
24488	else
24489		cf_cv_need_curses_h=no
24490	fi
24491fi
24492
24493fi
24494echo "$as_me:24494: result: $cf_cv_need_curses_h" >&5
24495echo "${ECHO_T}$cf_cv_need_curses_h" >&6
24496
24497case $cf_cv_need_curses_h in
24498both)
24499
24500cat >>confdefs.h <<EOF
24501#define NEED_CURSES_H 1
24502EOF
24503
24504cat >>confdefs.h <<EOF
24505#define NEED_TERMCAP_H 1
24506EOF
24507
24508	;;
24509curses.h)
24510
24511cat >>confdefs.h <<EOF
24512#define NEED_CURSES_H 1
24513EOF
24514
24515	;;
24516term.h)
24517
24518cat >>confdefs.h <<EOF
24519#define NEED_TERM_H 1
24520EOF
24521
24522	;;
24523termcap.h)
24524
24525cat >>confdefs.h <<EOF
24526#define NEED_TERMCAP_H 1
24527EOF
24528
24529	;;
24530esac
24531
24532echo "$as_me:24532: checking declaration of tputs 3rd param" >&5
24533echo $ECHO_N "checking declaration of tputs 3rd param... $ECHO_C" >&6
24534if test "${cf_cv_type_outchar+set}" = set; then
24535  echo $ECHO_N "(cached) $ECHO_C" >&6
24536else
24537
24538cf_cv_type_outchar="int OutChar(int)"
24539cf_cv_found=no
24540cf_save_CPPFLAGS="$CPPFLAGS"
24541CPPFLAGS="$CPPFLAGS $CHECK_DECL_FLAG"
24542
24543for P in int void; do
24544for Q in int void; do
24545for R in int char; do
24546for S in "" const; do
24547
24548echo "${as_me:-configure}:24548: testing loop variables P:$P, Q:$Q, R:$R, S:$S ..." 1>&5
24549
24550	cat >conftest.$ac_ext <<_ACEOF
24551#line 24551 "configure"
24552#include "confdefs.h"
24553$CHECK_DECL_HDRS
24554int
24555main (void)
24556{
24557extern $Q OutChar($R);
24558	extern $P tputs ($S char *string, int nlines, $Q (*_f)($R));
24559	tputs("", 1, OutChar)
24560  ;
24561  return 0;
24562}
24563_ACEOF
24564rm -f conftest.$ac_objext
24565if { (eval echo "$as_me:24565: \"$ac_compile\"") >&5
24566  (eval $ac_compile) 2>&5
24567  ac_status=$?
24568  echo "$as_me:24568: \$? = $ac_status" >&5
24569  (exit $ac_status); } &&
24570         { ac_try='test -s conftest.$ac_objext'
24571  { (eval echo "$as_me:24571: \"$ac_try\"") >&5
24572  (eval $ac_try) 2>&5
24573  ac_status=$?
24574  echo "$as_me:24574: \$? = $ac_status" >&5
24575  (exit $ac_status); }; }; then
24576  cf_cv_type_outchar="$Q OutChar($R)"
24577	 cf_cv_found=yes
24578	 break
24579else
24580  echo "$as_me: failed program was:" >&5
24581cat conftest.$ac_ext >&5
24582fi
24583rm -f conftest.$ac_objext conftest.$ac_ext
24584done
24585	test $cf_cv_found = yes && break
24586done
24587	test $cf_cv_found = yes && break
24588done
24589	test $cf_cv_found = yes && break
24590done
24591
24592fi
24593echo "$as_me:24593: result: $cf_cv_type_outchar" >&5
24594echo "${ECHO_T}$cf_cv_type_outchar" >&6
24595
24596case $cf_cv_type_outchar in
24597int*)
24598
24599cat >>confdefs.h <<\EOF
24600#define OUTC_RETURN 1
24601EOF
24602
24603	;;
24604esac
24605case $cf_cv_type_outchar in
24606*char*)
24607
24608cat >>confdefs.h <<\EOF
24609#define OUTC_ARGS char c
24610EOF
24611
24612	;;
24613esac
24614
24615CPPFLAGS="$cf_save_CPPFLAGS"
24616
24617fi
24618
24619cf_tc_funcs=
24620cf_tc_externs=
24621if test ".$cf_cv_termlib" = .terminfo ; then
24622
24623cat >>confdefs.h <<\EOF
24624#define USE_TERMINFO 1
24625EOF
24626
24627	cf_tc_funcs="tigetint tigetnum tparam tparm"
24628	cf_tc_externs="$cf_tc_funcs tgoto tigetstr tputs tigetflag"
24629elif test ".$cf_cv_termlib" = .termcap ; then
24630	# BSD 'tputs()' may need 'PC' to be set.
24631	cat >conftest.$ac_ext <<_ACEOF
24632#line 24632 "configure"
24633#include "confdefs.h"
24634
24635int
24636main (void)
24637{
24638extern char PC; PC = 0
24639  ;
24640  return 0;
24641}
24642_ACEOF
24643rm -f conftest.$ac_objext conftest$ac_exeext
24644if { (eval echo "$as_me:24644: \"$ac_link\"") >&5
24645  (eval $ac_link) 2>&5
24646  ac_status=$?
24647  echo "$as_me:24647: \$? = $ac_status" >&5
24648  (exit $ac_status); } &&
24649         { ac_try='test -s conftest$ac_exeext'
24650  { (eval echo "$as_me:24650: \"$ac_try\"") >&5
24651  (eval $ac_try) 2>&5
24652  ac_status=$?
24653  echo "$as_me:24653: \$? = $ac_status" >&5
24654  (exit $ac_status); }; }; then
24655
24656cat >>confdefs.h <<\EOF
24657#define HAVE_EXTERN_TCAP_PC 1
24658EOF
24659
24660else
24661  echo "$as_me: failed program was:" >&5
24662cat conftest.$ac_ext >&5
24663fi
24664rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24665	cf_tc_funcs="tgetint tgetnum tparam tparm"
24666	cf_tc_externs="$cf_tc_funcs tgoto tgetstr tputs tgetent tgetflag"
24667fi
24668
24669###	Checks for external-data
24670
24671echo "$as_me:24671: checking if external errno is declared" >&5
24672echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
24673if test "${cf_cv_dcl_errno+set}" = set; then
24674  echo $ECHO_N "(cached) $ECHO_C" >&6
24675else
24676
24677	cat >conftest.$ac_ext <<_ACEOF
24678#line 24678 "configure"
24679#include "confdefs.h"
24680
24681#ifdef HAVE_STDLIB_H
24682#include <stdlib.h>
24683#endif
24684#include <stdio.h>
24685#include <sys/types.h>
24686#include <errno.h>
24687int
24688main (void)
24689{
24690int x = (int) errno; (void)x
24691  ;
24692  return 0;
24693}
24694_ACEOF
24695rm -f conftest.$ac_objext
24696if { (eval echo "$as_me:24696: \"$ac_compile\"") >&5
24697  (eval $ac_compile) 2>&5
24698  ac_status=$?
24699  echo "$as_me:24699: \$? = $ac_status" >&5
24700  (exit $ac_status); } &&
24701         { ac_try='test -s conftest.$ac_objext'
24702  { (eval echo "$as_me:24702: \"$ac_try\"") >&5
24703  (eval $ac_try) 2>&5
24704  ac_status=$?
24705  echo "$as_me:24705: \$? = $ac_status" >&5
24706  (exit $ac_status); }; }; then
24707  cf_cv_dcl_errno=yes
24708else
24709  echo "$as_me: failed program was:" >&5
24710cat conftest.$ac_ext >&5
24711cf_cv_dcl_errno=no
24712fi
24713rm -f conftest.$ac_objext conftest.$ac_ext
24714
24715fi
24716echo "$as_me:24716: result: $cf_cv_dcl_errno" >&5
24717echo "${ECHO_T}$cf_cv_dcl_errno" >&6
24718
24719if test "$cf_cv_dcl_errno" = no ; then
24720
24721cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24722
24723	cat >>confdefs.h <<EOF
24724#define $cf_result 1
24725EOF
24726
24727fi
24728
24729# It's possible (for near-UNIX clones) that the data doesn't exist
24730
24731echo "$as_me:24731: checking if external errno exists" >&5
24732echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
24733if test "${cf_cv_have_errno+set}" = set; then
24734  echo $ECHO_N "(cached) $ECHO_C" >&6
24735else
24736
24737	cat >conftest.$ac_ext <<_ACEOF
24738#line 24738 "configure"
24739#include "confdefs.h"
24740
24741#undef errno
24742extern int errno;
24743
24744int
24745main (void)
24746{
24747errno = 2
24748  ;
24749  return 0;
24750}
24751_ACEOF
24752rm -f conftest.$ac_objext conftest$ac_exeext
24753if { (eval echo "$as_me:24753: \"$ac_link\"") >&5
24754  (eval $ac_link) 2>&5
24755  ac_status=$?
24756  echo "$as_me:24756: \$? = $ac_status" >&5
24757  (exit $ac_status); } &&
24758         { ac_try='test -s conftest$ac_exeext'
24759  { (eval echo "$as_me:24759: \"$ac_try\"") >&5
24760  (eval $ac_try) 2>&5
24761  ac_status=$?
24762  echo "$as_me:24762: \$? = $ac_status" >&5
24763  (exit $ac_status); }; }; then
24764  cf_cv_have_errno=yes
24765else
24766  echo "$as_me: failed program was:" >&5
24767cat conftest.$ac_ext >&5
24768cf_cv_have_errno=no
24769fi
24770rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24771
24772fi
24773echo "$as_me:24773: result: $cf_cv_have_errno" >&5
24774echo "${ECHO_T}$cf_cv_have_errno" >&6
24775
24776if test "$cf_cv_have_errno" = yes ; then
24777
24778cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24779
24780	cat >>confdefs.h <<EOF
24781#define $cf_result 1
24782EOF
24783
24784fi
24785
24786for ac_func in strerror
24787do
24788as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
24789echo "$as_me:24789: checking for $ac_func" >&5
24790echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
24791if eval "test \"\${$as_ac_var+set}\" = set"; then
24792  echo $ECHO_N "(cached) $ECHO_C" >&6
24793else
24794  cat >conftest.$ac_ext <<_ACEOF
24795#line 24795 "configure"
24796#include "confdefs.h"
24797#define $ac_func autoconf_temporary
24798#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
24799#undef $ac_func
24800
24801#ifdef __cplusplus
24802extern "C"
24803#endif
24804
24805/* We use char because int might match the return type of a gcc2
24806   builtin and then its argument prototype would still apply.  */
24807char $ac_func (void);
24808
24809int
24810main (void)
24811{
24812
24813/* The GNU C library defines stubs for functions which it implements
24814    to always fail with ENOSYS.  Some functions are actually named
24815    something starting with __ and the normal name is an alias.  */
24816#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
24817#error found stub for $ac_func
24818#endif
24819
24820	return $ac_func ();
24821  ;
24822  return 0;
24823}
24824_ACEOF
24825rm -f conftest.$ac_objext conftest$ac_exeext
24826if { (eval echo "$as_me:24826: \"$ac_link\"") >&5
24827  (eval $ac_link) 2>&5
24828  ac_status=$?
24829  echo "$as_me:24829: \$? = $ac_status" >&5
24830  (exit $ac_status); } &&
24831         { ac_try='test -s conftest$ac_exeext'
24832  { (eval echo "$as_me:24832: \"$ac_try\"") >&5
24833  (eval $ac_try) 2>&5
24834  ac_status=$?
24835  echo "$as_me:24835: \$? = $ac_status" >&5
24836  (exit $ac_status); }; }; then
24837  eval "$as_ac_var=yes"
24838else
24839  echo "$as_me: failed program was:" >&5
24840cat conftest.$ac_ext >&5
24841eval "$as_ac_var=no"
24842fi
24843rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24844fi
24845echo "$as_me:24845: result: `eval echo '${'$as_ac_var'}'`" >&5
24846echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
24847if test `eval echo '${'$as_ac_var'}'` = yes; then
24848  cat >>confdefs.h <<EOF
24849#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
24850EOF
24851 cat >>confdefs.h <<\EOF
24852#define HAVE_STRERROR 1
24853EOF
24854
24855else
24856
24857echo "$as_me:24857: checking if external sys_nerr is declared" >&5
24858echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
24859if test "${cf_cv_dcl_sys_nerr+set}" = set; then
24860  echo $ECHO_N "(cached) $ECHO_C" >&6
24861else
24862
24863	cat >conftest.$ac_ext <<_ACEOF
24864#line 24864 "configure"
24865#include "confdefs.h"
24866
24867#ifdef HAVE_STDLIB_H
24868#include <stdlib.h>
24869#endif
24870#include <stdio.h>
24871#include <sys/types.h>
24872#include <errno.h>
24873int
24874main (void)
24875{
24876int x = (int) sys_nerr; (void)x
24877  ;
24878  return 0;
24879}
24880_ACEOF
24881rm -f conftest.$ac_objext
24882if { (eval echo "$as_me:24882: \"$ac_compile\"") >&5
24883  (eval $ac_compile) 2>&5
24884  ac_status=$?
24885  echo "$as_me:24885: \$? = $ac_status" >&5
24886  (exit $ac_status); } &&
24887         { ac_try='test -s conftest.$ac_objext'
24888  { (eval echo "$as_me:24888: \"$ac_try\"") >&5
24889  (eval $ac_try) 2>&5
24890  ac_status=$?
24891  echo "$as_me:24891: \$? = $ac_status" >&5
24892  (exit $ac_status); }; }; then
24893  cf_cv_dcl_sys_nerr=yes
24894else
24895  echo "$as_me: failed program was:" >&5
24896cat conftest.$ac_ext >&5
24897cf_cv_dcl_sys_nerr=no
24898fi
24899rm -f conftest.$ac_objext conftest.$ac_ext
24900
24901fi
24902echo "$as_me:24902: result: $cf_cv_dcl_sys_nerr" >&5
24903echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
24904
24905if test "$cf_cv_dcl_sys_nerr" = no ; then
24906
24907cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24908
24909	cat >>confdefs.h <<EOF
24910#define $cf_result 1
24911EOF
24912
24913fi
24914
24915# It's possible (for near-UNIX clones) that the data doesn't exist
24916
24917echo "$as_me:24917: checking if external sys_nerr exists" >&5
24918echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
24919if test "${cf_cv_have_sys_nerr+set}" = set; then
24920  echo $ECHO_N "(cached) $ECHO_C" >&6
24921else
24922
24923	cat >conftest.$ac_ext <<_ACEOF
24924#line 24924 "configure"
24925#include "confdefs.h"
24926
24927#undef sys_nerr
24928extern int sys_nerr;
24929
24930int
24931main (void)
24932{
24933sys_nerr = 2
24934  ;
24935  return 0;
24936}
24937_ACEOF
24938rm -f conftest.$ac_objext conftest$ac_exeext
24939if { (eval echo "$as_me:24939: \"$ac_link\"") >&5
24940  (eval $ac_link) 2>&5
24941  ac_status=$?
24942  echo "$as_me:24942: \$? = $ac_status" >&5
24943  (exit $ac_status); } &&
24944         { ac_try='test -s conftest$ac_exeext'
24945  { (eval echo "$as_me:24945: \"$ac_try\"") >&5
24946  (eval $ac_try) 2>&5
24947  ac_status=$?
24948  echo "$as_me:24948: \$? = $ac_status" >&5
24949  (exit $ac_status); }; }; then
24950  cf_cv_have_sys_nerr=yes
24951else
24952  echo "$as_me: failed program was:" >&5
24953cat conftest.$ac_ext >&5
24954cf_cv_have_sys_nerr=no
24955fi
24956rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
24957
24958fi
24959echo "$as_me:24959: result: $cf_cv_have_sys_nerr" >&5
24960echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
24961
24962if test "$cf_cv_have_sys_nerr" = yes ; then
24963
24964cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24965
24966	cat >>confdefs.h <<EOF
24967#define $cf_result 1
24968EOF
24969
24970fi
24971
24972echo "$as_me:24972: checking if external sys_errlist is declared" >&5
24973echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
24974if test "${cf_cv_dcl_sys_errlist+set}" = set; then
24975  echo $ECHO_N "(cached) $ECHO_C" >&6
24976else
24977
24978	cat >conftest.$ac_ext <<_ACEOF
24979#line 24979 "configure"
24980#include "confdefs.h"
24981
24982#ifdef HAVE_STDLIB_H
24983#include <stdlib.h>
24984#endif
24985#include <stdio.h>
24986#include <sys/types.h>
24987#include <errno.h>
24988int
24989main (void)
24990{
24991int x = (int) sys_errlist; (void)x
24992  ;
24993  return 0;
24994}
24995_ACEOF
24996rm -f conftest.$ac_objext
24997if { (eval echo "$as_me:24997: \"$ac_compile\"") >&5
24998  (eval $ac_compile) 2>&5
24999  ac_status=$?
25000  echo "$as_me:25000: \$? = $ac_status" >&5
25001  (exit $ac_status); } &&
25002         { ac_try='test -s conftest.$ac_objext'
25003  { (eval echo "$as_me:25003: \"$ac_try\"") >&5
25004  (eval $ac_try) 2>&5
25005  ac_status=$?
25006  echo "$as_me:25006: \$? = $ac_status" >&5
25007  (exit $ac_status); }; }; then
25008  cf_cv_dcl_sys_errlist=yes
25009else
25010  echo "$as_me: failed program was:" >&5
25011cat conftest.$ac_ext >&5
25012cf_cv_dcl_sys_errlist=no
25013fi
25014rm -f conftest.$ac_objext conftest.$ac_ext
25015
25016fi
25017echo "$as_me:25017: result: $cf_cv_dcl_sys_errlist" >&5
25018echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
25019
25020if test "$cf_cv_dcl_sys_errlist" = no ; then
25021
25022cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25023
25024	cat >>confdefs.h <<EOF
25025#define $cf_result 1
25026EOF
25027
25028fi
25029
25030# It's possible (for near-UNIX clones) that the data doesn't exist
25031
25032echo "$as_me:25032: checking if external sys_errlist exists" >&5
25033echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
25034if test "${cf_cv_have_sys_errlist+set}" = set; then
25035  echo $ECHO_N "(cached) $ECHO_C" >&6
25036else
25037
25038	cat >conftest.$ac_ext <<_ACEOF
25039#line 25039 "configure"
25040#include "confdefs.h"
25041
25042#undef sys_errlist
25043extern int sys_errlist;
25044
25045int
25046main (void)
25047{
25048sys_errlist = 2
25049  ;
25050  return 0;
25051}
25052_ACEOF
25053rm -f conftest.$ac_objext conftest$ac_exeext
25054if { (eval echo "$as_me:25054: \"$ac_link\"") >&5
25055  (eval $ac_link) 2>&5
25056  ac_status=$?
25057  echo "$as_me:25057: \$? = $ac_status" >&5
25058  (exit $ac_status); } &&
25059         { ac_try='test -s conftest$ac_exeext'
25060  { (eval echo "$as_me:25060: \"$ac_try\"") >&5
25061  (eval $ac_try) 2>&5
25062  ac_status=$?
25063  echo "$as_me:25063: \$? = $ac_status" >&5
25064  (exit $ac_status); }; }; then
25065  cf_cv_have_sys_errlist=yes
25066else
25067  echo "$as_me: failed program was:" >&5
25068cat conftest.$ac_ext >&5
25069cf_cv_have_sys_errlist=no
25070fi
25071rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25072
25073fi
25074echo "$as_me:25074: result: $cf_cv_have_sys_errlist" >&5
25075echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
25076
25077if test "$cf_cv_have_sys_errlist" = yes ; then
25078
25079cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25080
25081	cat >>confdefs.h <<EOF
25082#define $cf_result 1
25083EOF
25084
25085fi
25086
25087fi
25088done
25089
25090###	Checks for library functions.
25091
25092for ac_func in \
25093	alarm \
25094	atoi \
25095	atol \
25096	atoll \
25097	atoq \
25098	bcopy \
25099	chmod \
25100	execlp \
25101	explicit_bzero \
25102	explicit_memset \
25103	fchmod \
25104	fcntl \
25105	fdopen \
25106	fork \
25107	ftime \
25108	ftruncate \
25109	fsync \
25110	getcwd \
25111	gettimeofday \
25112	getwd \
25113	inet_aton \
25114	is_xterm \
25115	isascii \
25116	lockf \
25117	memcmp \
25118	memcpy \
25119	memmove \
25120	memset \
25121	mkdir \
25122	mkfifo \
25123	mktemp \
25124	mkstemp \
25125	nl_langinfo \
25126	poll \
25127	putenv \
25128	rewinddir \
25129	resizeterm \
25130	select \
25131	setenv \
25132	setlocale \
25133	settz \
25134	setvbuf \
25135	sigaction \
25136	snprintf \
25137	stpcpy \
25138	strchr \
25139	strcasecmp \
25140	strcasestr \
25141	strdup \
25142	strftime \
25143	strpbrk \
25144	strrchr \
25145	strrstr \
25146	strsep \
25147	strstr \
25148	strtol \
25149	strtoll \
25150	tmpfile \
25151	tzset \
25152	uname \
25153	unlink \
25154	use_default_colors \
25155	usleep \
25156	vsnprintf \
25157	waitpid \
25158$cf_tc_funcs
25159do
25160as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
25161echo "$as_me:25161: checking for $ac_func" >&5
25162echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
25163if eval "test \"\${$as_ac_var+set}\" = set"; then
25164  echo $ECHO_N "(cached) $ECHO_C" >&6
25165else
25166  cat >conftest.$ac_ext <<_ACEOF
25167#line 25167 "configure"
25168#include "confdefs.h"
25169#define $ac_func autoconf_temporary
25170#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
25171#undef $ac_func
25172
25173#ifdef __cplusplus
25174extern "C"
25175#endif
25176
25177/* We use char because int might match the return type of a gcc2
25178   builtin and then its argument prototype would still apply.  */
25179char $ac_func (void);
25180
25181int
25182main (void)
25183{
25184
25185/* The GNU C library defines stubs for functions which it implements
25186    to always fail with ENOSYS.  Some functions are actually named
25187    something starting with __ and the normal name is an alias.  */
25188#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
25189#error found stub for $ac_func
25190#endif
25191
25192	return $ac_func ();
25193  ;
25194  return 0;
25195}
25196_ACEOF
25197rm -f conftest.$ac_objext conftest$ac_exeext
25198if { (eval echo "$as_me:25198: \"$ac_link\"") >&5
25199  (eval $ac_link) 2>&5
25200  ac_status=$?
25201  echo "$as_me:25201: \$? = $ac_status" >&5
25202  (exit $ac_status); } &&
25203         { ac_try='test -s conftest$ac_exeext'
25204  { (eval echo "$as_me:25204: \"$ac_try\"") >&5
25205  (eval $ac_try) 2>&5
25206  ac_status=$?
25207  echo "$as_me:25207: \$? = $ac_status" >&5
25208  (exit $ac_status); }; }; then
25209  eval "$as_ac_var=yes"
25210else
25211  echo "$as_me: failed program was:" >&5
25212cat conftest.$ac_ext >&5
25213eval "$as_ac_var=no"
25214fi
25215rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25216fi
25217echo "$as_me:25217: result: `eval echo '${'$as_ac_var'}'`" >&5
25218echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
25219if test `eval echo '${'$as_ac_var'}'` = yes; then
25220  cat >>confdefs.h <<EOF
25221#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
25222EOF
25223
25224fi
25225done
25226
25227echo "$as_me:25227: checking for flock" >&5
25228echo $ECHO_N "checking for flock... $ECHO_C" >&6
25229if test "${ac_cv_func_flock+set}" = set; then
25230  echo $ECHO_N "(cached) $ECHO_C" >&6
25231else
25232  cat >conftest.$ac_ext <<_ACEOF
25233#line 25233 "configure"
25234#include "confdefs.h"
25235#define flock autoconf_temporary
25236#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
25237#undef flock
25238
25239#ifdef __cplusplus
25240extern "C"
25241#endif
25242
25243/* We use char because int might match the return type of a gcc2
25244   builtin and then its argument prototype would still apply.  */
25245char flock (void);
25246
25247int
25248main (void)
25249{
25250
25251/* The GNU C library defines stubs for functions which it implements
25252    to always fail with ENOSYS.  Some functions are actually named
25253    something starting with __ and the normal name is an alias.  */
25254#if defined (__stub_flock) || defined (__stub___flock)
25255#error found stub for flock
25256#endif
25257
25258	return flock ();
25259  ;
25260  return 0;
25261}
25262_ACEOF
25263rm -f conftest.$ac_objext conftest$ac_exeext
25264if { (eval echo "$as_me:25264: \"$ac_link\"") >&5
25265  (eval $ac_link) 2>&5
25266  ac_status=$?
25267  echo "$as_me:25267: \$? = $ac_status" >&5
25268  (exit $ac_status); } &&
25269         { ac_try='test -s conftest$ac_exeext'
25270  { (eval echo "$as_me:25270: \"$ac_try\"") >&5
25271  (eval $ac_try) 2>&5
25272  ac_status=$?
25273  echo "$as_me:25273: \$? = $ac_status" >&5
25274  (exit $ac_status); }; }; then
25275  ac_cv_func_flock=yes
25276else
25277  echo "$as_me: failed program was:" >&5
25278cat conftest.$ac_ext >&5
25279ac_cv_func_flock=no
25280fi
25281rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25282fi
25283echo "$as_me:25283: result: $ac_cv_func_flock" >&5
25284echo "${ECHO_T}$ac_cv_func_flock" >&6
25285if test $ac_cv_func_flock = yes; then
25286
25287cat >>confdefs.h <<\EOF
25288#define HAVE_FLOCK 1
25289EOF
25290
25291else
25292
25293	echo "$as_me:25293: checking for flock in -lbsd" >&5
25294echo $ECHO_N "checking for flock in -lbsd... $ECHO_C" >&6
25295if test "${ac_cv_lib_bsd_flock+set}" = set; then
25296  echo $ECHO_N "(cached) $ECHO_C" >&6
25297else
25298  ac_check_lib_save_LIBS=$LIBS
25299LIBS="-lbsd  $LIBS"
25300cat >conftest.$ac_ext <<_ACEOF
25301#line 25301 "configure"
25302#include "confdefs.h"
25303
25304/* Override any gcc2 internal prototype to avoid an error.  */
25305#ifdef __cplusplus
25306extern "C"
25307#endif
25308/* We use char because int might match the return type of a gcc2
25309   builtin and then its argument prototype would still apply.  */
25310char flock ();
25311int
25312main (void)
25313{
25314flock ();
25315  ;
25316  return 0;
25317}
25318_ACEOF
25319rm -f conftest.$ac_objext conftest$ac_exeext
25320if { (eval echo "$as_me:25320: \"$ac_link\"") >&5
25321  (eval $ac_link) 2>&5
25322  ac_status=$?
25323  echo "$as_me:25323: \$? = $ac_status" >&5
25324  (exit $ac_status); } &&
25325         { ac_try='test -s conftest$ac_exeext'
25326  { (eval echo "$as_me:25326: \"$ac_try\"") >&5
25327  (eval $ac_try) 2>&5
25328  ac_status=$?
25329  echo "$as_me:25329: \$? = $ac_status" >&5
25330  (exit $ac_status); }; }; then
25331  ac_cv_lib_bsd_flock=yes
25332else
25333  echo "$as_me: failed program was:" >&5
25334cat conftest.$ac_ext >&5
25335ac_cv_lib_bsd_flock=no
25336fi
25337rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25338LIBS=$ac_check_lib_save_LIBS
25339fi
25340echo "$as_me:25340: result: $ac_cv_lib_bsd_flock" >&5
25341echo "${ECHO_T}$ac_cv_lib_bsd_flock" >&6
25342if test $ac_cv_lib_bsd_flock = yes; then
25343  cat >>confdefs.h <<\EOF
25344#define HAVE_FLOCK 1
25345EOF
25346
25347		LIBS="$LIBS -lbsd"
25348fi
25349
25350fi
25351
25352# clock_gettime() / librt
25353echo "$as_me:25353: checking for clock_gettime" >&5
25354echo $ECHO_N "checking for clock_gettime... $ECHO_C" >&6
25355if test "${ac_cv_func_clock_gettime+set}" = set; then
25356  echo $ECHO_N "(cached) $ECHO_C" >&6
25357else
25358  cat >conftest.$ac_ext <<_ACEOF
25359#line 25359 "configure"
25360#include "confdefs.h"
25361#define clock_gettime autoconf_temporary
25362#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
25363#undef clock_gettime
25364
25365#ifdef __cplusplus
25366extern "C"
25367#endif
25368
25369/* We use char because int might match the return type of a gcc2
25370   builtin and then its argument prototype would still apply.  */
25371char clock_gettime (void);
25372
25373int
25374main (void)
25375{
25376
25377/* The GNU C library defines stubs for functions which it implements
25378    to always fail with ENOSYS.  Some functions are actually named
25379    something starting with __ and the normal name is an alias.  */
25380#if defined (__stub_clock_gettime) || defined (__stub___clock_gettime)
25381#error found stub for clock_gettime
25382#endif
25383
25384	return clock_gettime ();
25385  ;
25386  return 0;
25387}
25388_ACEOF
25389rm -f conftest.$ac_objext conftest$ac_exeext
25390if { (eval echo "$as_me:25390: \"$ac_link\"") >&5
25391  (eval $ac_link) 2>&5
25392  ac_status=$?
25393  echo "$as_me:25393: \$? = $ac_status" >&5
25394  (exit $ac_status); } &&
25395         { ac_try='test -s conftest$ac_exeext'
25396  { (eval echo "$as_me:25396: \"$ac_try\"") >&5
25397  (eval $ac_try) 2>&5
25398  ac_status=$?
25399  echo "$as_me:25399: \$? = $ac_status" >&5
25400  (exit $ac_status); }; }; then
25401  ac_cv_func_clock_gettime=yes
25402else
25403  echo "$as_me: failed program was:" >&5
25404cat conftest.$ac_ext >&5
25405ac_cv_func_clock_gettime=no
25406fi
25407rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25408fi
25409echo "$as_me:25409: result: $ac_cv_func_clock_gettime" >&5
25410echo "${ECHO_T}$ac_cv_func_clock_gettime" >&6
25411if test $ac_cv_func_clock_gettime = yes; then
25412
25413cat >>confdefs.h <<\EOF
25414#define HAVE_CLOCK_GETTIME 1
25415EOF
25416
25417else
25418
25419		echo "$as_me:25419: checking for clock_gettime in -lrt" >&5
25420echo $ECHO_N "checking for clock_gettime in -lrt... $ECHO_C" >&6
25421if test "${ac_cv_lib_rt_clock_gettime+set}" = set; then
25422  echo $ECHO_N "(cached) $ECHO_C" >&6
25423else
25424  ac_check_lib_save_LIBS=$LIBS
25425LIBS="-lrt  $LIBS"
25426cat >conftest.$ac_ext <<_ACEOF
25427#line 25427 "configure"
25428#include "confdefs.h"
25429
25430/* Override any gcc2 internal prototype to avoid an error.  */
25431#ifdef __cplusplus
25432extern "C"
25433#endif
25434/* We use char because int might match the return type of a gcc2
25435   builtin and then its argument prototype would still apply.  */
25436char clock_gettime ();
25437int
25438main (void)
25439{
25440clock_gettime ();
25441  ;
25442  return 0;
25443}
25444_ACEOF
25445rm -f conftest.$ac_objext conftest$ac_exeext
25446if { (eval echo "$as_me:25446: \"$ac_link\"") >&5
25447  (eval $ac_link) 2>&5
25448  ac_status=$?
25449  echo "$as_me:25449: \$? = $ac_status" >&5
25450  (exit $ac_status); } &&
25451         { ac_try='test -s conftest$ac_exeext'
25452  { (eval echo "$as_me:25452: \"$ac_try\"") >&5
25453  (eval $ac_try) 2>&5
25454  ac_status=$?
25455  echo "$as_me:25455: \$? = $ac_status" >&5
25456  (exit $ac_status); }; }; then
25457  ac_cv_lib_rt_clock_gettime=yes
25458else
25459  echo "$as_me: failed program was:" >&5
25460cat conftest.$ac_ext >&5
25461ac_cv_lib_rt_clock_gettime=no
25462fi
25463rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25464LIBS=$ac_check_lib_save_LIBS
25465fi
25466echo "$as_me:25466: result: $ac_cv_lib_rt_clock_gettime" >&5
25467echo "${ECHO_T}$ac_cv_lib_rt_clock_gettime" >&6
25468if test $ac_cv_lib_rt_clock_gettime = yes; then
25469  cat >>confdefs.h <<\EOF
25470#define HAVE_CLOCK_GETTIME 1
25471EOF
25472
25473			LIBS="$LIBS -lrt"
25474
25475fi
25476
25477fi
25478
25479echo "$as_me:25479: checking for memset_s" >&5
25480echo $ECHO_N "checking for memset_s... $ECHO_C" >&6
25481if test "$cross_compiling" = yes; then
25482  echo "$as_me:25482: result: unknown" >&5
25483echo "${ECHO_T}unknown" >&6
25484
25485else
25486  cat >conftest.$ac_ext <<_ACEOF
25487#line 25487 "configure"
25488#include "confdefs.h"
25489
25490/* Request C11 Annex K */
25491#define __STDC_WANT_LIB_EXT1__ 1
25492#include <string.h>
25493#include <stddef.h>
25494int main()
25495{
25496	char buf[10] = { 1 };
25497	if (memset_s((void*) buf, (size_t) 100, 0, (size_t) 1))
25498		return(-1);
25499}
25500_ACEOF
25501rm -f conftest$ac_exeext
25502if { (eval echo "$as_me:25502: \"$ac_link\"") >&5
25503  (eval $ac_link) 2>&5
25504  ac_status=$?
25505  echo "$as_me:25505: \$? = $ac_status" >&5
25506  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25507  { (eval echo "$as_me:25507: \"$ac_try\"") >&5
25508  (eval $ac_try) 2>&5
25509  ac_status=$?
25510  echo "$as_me:25510: \$? = $ac_status" >&5
25511  (exit $ac_status); }; }; then
25512
25513		echo "$as_me:25513: result: yes" >&5
25514echo "${ECHO_T}yes" >&6
25515
25516cat >>confdefs.h <<\EOF
25517#define HAVE_MEMSET_S 1
25518EOF
25519
25520else
25521  echo "$as_me: program exited with status $ac_status" >&5
25522echo "$as_me: failed program was:" >&5
25523cat conftest.$ac_ext >&5
25524echo "$as_me:25524: result: no" >&5
25525echo "${ECHO_T}no" >&6
25526fi
25527rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
25528fi
25529
25530  echo "$as_me:25530: checking for wide char and multibyte support" >&5
25531echo $ECHO_N "checking for wide char and multibyte support... $ECHO_C" >&6
25532if test "${am_cv_multibyte_able+set}" = set; then
25533  echo $ECHO_N "(cached) $ECHO_C" >&6
25534else
25535  cat >conftest.$ac_ext <<_ACEOF
25536#line 25536 "configure"
25537#include "confdefs.h"
25538#include <stdio.h>
25539#ifdef HAVE_STDLIB_H
25540#	include <stdlib.h>
25541#endif /* HAVE_STDLIB_H */
25542#ifdef HAVE_WCHAR_H
25543#	include <wchar.h>
25544#endif /* HAVE_WCHAR_H */
25545#ifdef HAVE_WCTYPE_H
25546#	include <wctype.h>
25547#endif /* HAVE_WCTYPE_H */
25548
25549int
25550main (void)
25551{
25552const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
25553      char ocb[5];
25554      wchar_t wcb[5];
25555      wchar_t wcb2[5];
25556      wchar_t format[3];
25557
25558      putwc(0, 0);
25559      fputwc(0, 0);
25560      fwide(0, 0);
25561      mbtowc(wcb, icb, MB_CUR_MAX);
25562      mbstowcs(wcb, icb, 5);
25563      (void) iswalnum((wint_t) wcb[0]);
25564      (void) iswcntrl((wint_t) wcb[0]);
25565      (void) iswdigit((wint_t) wcb[0]);
25566      (void) iswgraph((wint_t) wcb[0]);
25567      (void) iswprint((wint_t) wcb[0]);
25568      (void) iswspace((wint_t) wcb[0]);
25569      (void) towupper((wint_t) wcb[0]);
25570      /* (void) iswupper((wint_t) wcb[0]); */
25571      /* (void) towlower((wint_t) wcb[0]); */
25572      /* (void) iswlower((wint_t) wcb[0]); */
25573      (void) iswalpha((wint_t) wcb[0]);
25574      /* (void) iswblank((wint_t) wcb[0]); */
25575      /* (void) iswpunct((wint_t) wcb[0]); */
25576      /* (void) iswxdigit((wint_t) wcb[0]); */
25577      /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
25578      /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
25579      (void) wcslen(wcb);
25580      /* (void) wcsnlen(wcb, 4); */
25581      wcwidth((wint_t) wcb[0]);
25582      wcswidth(wcb, 5);
25583      wcstombs(ocb, wcb, 5);
25584      wctomb(ocb, wcb[0]);
25585      wcscat(wcb2, wcb);
25586      wcscpy(wcb2, wcb);
25587      mbstowcs(format, "%s", 2);
25588      swprintf(wcb, 5, format, "test");
25589      wcsncat(wcb2, wcb, 5);
25590  ;
25591  return 0;
25592}
25593_ACEOF
25594rm -f conftest.$ac_objext conftest$ac_exeext
25595if { (eval echo "$as_me:25595: \"$ac_link\"") >&5
25596  (eval $ac_link) 2>&5
25597  ac_status=$?
25598  echo "$as_me:25598: \$? = $ac_status" >&5
25599  (exit $ac_status); } &&
25600         { ac_try='test -s conftest$ac_exeext'
25601  { (eval echo "$as_me:25601: \"$ac_try\"") >&5
25602  (eval $ac_try) 2>&5
25603  ac_status=$?
25604  echo "$as_me:25604: \$? = $ac_status" >&5
25605  (exit $ac_status); }; }; then
25606  am_cv_multibyte_able=yes
25607else
25608  echo "$as_me: failed program was:" >&5
25609cat conftest.$ac_ext >&5
25610cf_save_LIBS="$LIBS"
25611      LIBS="-lutf8 $LIBS"
25612      cat >conftest.$ac_ext <<_ACEOF
25613#line 25613 "configure"
25614#include "confdefs.h"
25615#include <libutf8.h>
25616int
25617main (void)
25618{
25619const char icb[5] = {0xa4, 0xa4, 0xa4, 0xe5, 0x00};
25620        char ocb[5];
25621        wchar_t wcb[5];
25622        wchar_t wcb2[5];
25623        wchar_t format[3];
25624
25625        putwc(0, 0);
25626        fputwc(0, 0);
25627        fwide(0, 0);
25628        mbtowc(wcb, icb, MB_CUR_MAX);
25629        mbstowcs(wcb, icb, 5);
25630        (void) iswalnum((wint_t) wcb[0]);
25631        (void) iswcntrl((wint_t) wcb[0]);
25632        (void) iswdigit((wint_t) wcb[0]);
25633        (void) iswgraph((wint_t) wcb[0]);
25634        (void) iswprint((wint_t) wcb[0]);
25635        (void) iswspace((wint_t) wcb[0]);
25636        (void) towupper((wint_t) wcb[0]);
25637        /* (void) iswupper((wint_t) wcb[0]); */
25638        /* (void) towlower((wint_t) wcb[0]); */
25639        /* (void) iswlower((wint_t) wcb[0]); */
25640        (void) iswalpha((wint_t) wcb[0]);
25641        /* (void) iswblank((wint_t) wcb[0]); */
25642        /* (void) iswpunct((wint_t) wcb[0]); */
25643        /* (void) iswxdigit((wint_t) wcb[0]); */
25644        /* (void) iswctype((wint_t) wcb[0], wctype("print")); */
25645        /* (void) towctranse((wint_t) wcb[0], wctrans("toupper")); */
25646        (void) wcslen(wcb);
25647        /* (void) wcsnlen(wcb, 4); */
25648        wcwidth((wint_t) wcb[0]);
25649        wcswidth(wcb, 5);
25650        wcstombs(ocb, wcb, 5);
25651        wctomb(ocb, wcb[0]);
25652        wcscat(wcb2, wcb);
25653        wcscpy(wcb2, wcb);
25654        mbstowcs(format, "%s", 2);
25655        swprintf(wcb, 5, format, "test");
25656        wcsncat(wcb2, wcb, 5);
25657  ;
25658  return 0;
25659}
25660_ACEOF
25661rm -f conftest.$ac_objext conftest$ac_exeext
25662if { (eval echo "$as_me:25662: \"$ac_link\"") >&5
25663  (eval $ac_link) 2>&5
25664  ac_status=$?
25665  echo "$as_me:25665: \$? = $ac_status" >&5
25666  (exit $ac_status); } &&
25667         { ac_try='test -s conftest$ac_exeext'
25668  { (eval echo "$as_me:25668: \"$ac_try\"") >&5
25669  (eval $ac_try) 2>&5
25670  ac_status=$?
25671  echo "$as_me:25671: \$? = $ac_status" >&5
25672  (exit $ac_status); }; }; then
25673  am_cv_multibyte_able=libutf8
25674else
25675  echo "$as_me: failed program was:" >&5
25676cat conftest.$ac_ext >&5
25677am_cv_multibyte_able=no
25678fi
25679rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25680      LIBS="$cf_save_LIBS"
25681
25682fi
25683rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25684
25685fi
25686echo "$as_me:25686: result: $am_cv_multibyte_able" >&5
25687echo "${ECHO_T}$am_cv_multibyte_able" >&6
25688  if test "$am_cv_multibyte_able" != no; then
25689    if test "$am_cv_multibyte_able" = libutf8; then
25690
25691cat >>confdefs.h <<\EOF
25692#define HAVE_LIBUTF8_H 1
25693EOF
25694
25695      LIBS="-lutf8 $LIBS"
25696    fi
25697
25698cat >>confdefs.h <<\EOF
25699#define MULTIBYTE_ABLE 1
25700EOF
25701
25702  fi
25703
25704echo "$as_me:25704: checking if gettimeofday takes two arguments" >&5
25705echo $ECHO_N "checking if gettimeofday takes two arguments... $ECHO_C" >&6
25706cat >conftest.$ac_ext <<_ACEOF
25707#line 25707 "configure"
25708#include "confdefs.h"
25709
25710#if HAVE_SYS_TIME_H
25711#include <sys/time.h>
25712#endif
25713int
25714main (void)
25715{
25716struct timeval *tv;
25717struct timezone *tz;
25718gettimeofday(&tv, &tz);
25719  ;
25720  return 0;
25721}
25722_ACEOF
25723rm -f conftest.$ac_objext
25724if { (eval echo "$as_me:25724: \"$ac_compile\"") >&5
25725  (eval $ac_compile) 2>&5
25726  ac_status=$?
25727  echo "$as_me:25727: \$? = $ac_status" >&5
25728  (exit $ac_status); } &&
25729         { ac_try='test -s conftest.$ac_objext'
25730  { (eval echo "$as_me:25730: \"$ac_try\"") >&5
25731  (eval $ac_try) 2>&5
25732  ac_status=$?
25733  echo "$as_me:25733: \$? = $ac_status" >&5
25734  (exit $ac_status); }; }; then
25735  ac_cv_func_gettimeofday_2args=yes
25736else
25737  echo "$as_me: failed program was:" >&5
25738cat conftest.$ac_ext >&5
25739ac_cv_func_gettimeofday_2args=no
25740fi
25741rm -f conftest.$ac_objext conftest.$ac_ext
25742echo "$as_me:25742: result: $ac_cv_func_gettimeofday_2args" >&5
25743echo "${ECHO_T}$ac_cv_func_gettimeofday_2args" >&6
25744if test $ac_cv_func_gettimeofday_2args = yes; then
25745
25746cat >>confdefs.h <<\EOF
25747#define GETTIMEOFDAY_2ARGS 1
25748EOF
25749
25750fi
25751
25752echo "$as_me:25752: checking return type of signal handlers" >&5
25753echo $ECHO_N "checking return type of signal handlers... $ECHO_C" >&6
25754if test "${ac_cv_type_signal+set}" = set; then
25755  echo $ECHO_N "(cached) $ECHO_C" >&6
25756else
25757  cat >conftest.$ac_ext <<_ACEOF
25758#line 25758 "configure"
25759#include "confdefs.h"
25760#include <sys/types.h>
25761#include <signal.h>
25762#ifdef signal
25763# undef signal
25764#endif
25765#ifdef __cplusplus
25766extern "C" void (*signal (int, void (*)(int)))(int);
25767#else
25768void (*signal ()) ();
25769#endif
25770
25771int
25772main (void)
25773{
25774int i;
25775  ;
25776  return 0;
25777}
25778_ACEOF
25779rm -f conftest.$ac_objext
25780if { (eval echo "$as_me:25780: \"$ac_compile\"") >&5
25781  (eval $ac_compile) 2>&5
25782  ac_status=$?
25783  echo "$as_me:25783: \$? = $ac_status" >&5
25784  (exit $ac_status); } &&
25785         { ac_try='test -s conftest.$ac_objext'
25786  { (eval echo "$as_me:25786: \"$ac_try\"") >&5
25787  (eval $ac_try) 2>&5
25788  ac_status=$?
25789  echo "$as_me:25789: \$? = $ac_status" >&5
25790  (exit $ac_status); }; }; then
25791  ac_cv_type_signal=void
25792else
25793  echo "$as_me: failed program was:" >&5
25794cat conftest.$ac_ext >&5
25795ac_cv_type_signal=int
25796fi
25797rm -f conftest.$ac_objext conftest.$ac_ext
25798fi
25799echo "$as_me:25799: result: $ac_cv_type_signal" >&5
25800echo "${ECHO_T}$ac_cv_type_signal" >&6
25801
25802cat >>confdefs.h <<EOF
25803#define RETSIGTYPE $ac_cv_type_signal
25804EOF
25805
25806echo "$as_me:25806: checking declaration of signal arguments" >&5
25807echo $ECHO_N "checking declaration of signal arguments... $ECHO_C" >&6
25808if test "${cf_cv_sig_args+set}" = set; then
25809  echo $ECHO_N "(cached) $ECHO_C" >&6
25810else
25811
25812cf_cv_sig_args=
25813for cf_test in "int sig" "int sig, ..."
25814do
25815	cat >conftest.$ac_ext <<_ACEOF
25816#line 25816 "configure"
25817#include "confdefs.h"
25818
25819#include <signal.h>
25820int
25821main (void)
25822{
25823extern RETSIGTYPE catch($cf_test); signal(SIGINT, catch)
25824  ;
25825  return 0;
25826}
25827_ACEOF
25828rm -f conftest.$ac_objext
25829if { (eval echo "$as_me:25829: \"$ac_compile\"") >&5
25830  (eval $ac_compile) 2>&5
25831  ac_status=$?
25832  echo "$as_me:25832: \$? = $ac_status" >&5
25833  (exit $ac_status); } &&
25834         { ac_try='test -s conftest.$ac_objext'
25835  { (eval echo "$as_me:25835: \"$ac_try\"") >&5
25836  (eval $ac_try) 2>&5
25837  ac_status=$?
25838  echo "$as_me:25838: \$? = $ac_status" >&5
25839  (exit $ac_status); }; }; then
25840  cf_cv_sig_args="$cf_test";break
25841else
25842  echo "$as_me: failed program was:" >&5
25843cat conftest.$ac_ext >&5
25844fi
25845rm -f conftest.$ac_objext conftest.$ac_ext
25846done
25847
25848fi
25849
25850echo "$as_me:25850: result: $cf_cv_sig_args" >&5
25851echo "${ECHO_T}$cf_cv_sig_args" >&6
25852
25853cat >>confdefs.h <<EOF
25854#define SIG_ARGS $cf_cv_sig_args
25855EOF
25856
25857if test "$ac_cv_func_sigaction" = yes; then
25858
25859echo "$as_me:25859: checking whether sigaction needs _POSIX_SOURCE" >&5
25860echo $ECHO_N "checking whether sigaction needs _POSIX_SOURCE... $ECHO_C" >&6
25861if test "${cf_cv_sigact_bad+set}" = set; then
25862  echo $ECHO_N "(cached) $ECHO_C" >&6
25863else
25864
25865cat >conftest.$ac_ext <<_ACEOF
25866#line 25866 "configure"
25867#include "confdefs.h"
25868
25869#include <sys/types.h>
25870#include <signal.h>
25871int
25872main (void)
25873{
25874struct sigaction act
25875  ;
25876  return 0;
25877}
25878_ACEOF
25879rm -f conftest.$ac_objext
25880if { (eval echo "$as_me:25880: \"$ac_compile\"") >&5
25881  (eval $ac_compile) 2>&5
25882  ac_status=$?
25883  echo "$as_me:25883: \$? = $ac_status" >&5
25884  (exit $ac_status); } &&
25885         { ac_try='test -s conftest.$ac_objext'
25886  { (eval echo "$as_me:25886: \"$ac_try\"") >&5
25887  (eval $ac_try) 2>&5
25888  ac_status=$?
25889  echo "$as_me:25889: \$? = $ac_status" >&5
25890  (exit $ac_status); }; }; then
25891  cf_cv_sigact_bad=no
25892else
25893  echo "$as_me: failed program was:" >&5
25894cat conftest.$ac_ext >&5
25895cf_cv_sigact_bad=yes
25896fi
25897rm -f conftest.$ac_objext conftest.$ac_ext
25898
25899fi
25900echo "$as_me:25900: result: $cf_cv_sigact_bad" >&5
25901echo "${ECHO_T}$cf_cv_sigact_bad" >&6
25902
25903test "$cf_cv_sigact_bad" = yes &&
25904cat >>confdefs.h <<\EOF
25905#define SVR4_ACTION 1
25906EOF
25907
25908echo "$as_me:25908: checking if we have sigaction/related functions" >&5
25909echo $ECHO_N "checking if we have sigaction/related functions... $ECHO_C" >&6
25910if test "${cf_cv_sigaction_funcs+set}" = set; then
25911  echo $ECHO_N "(cached) $ECHO_C" >&6
25912else
25913
25914cat >conftest.$ac_ext <<_ACEOF
25915#line 25915 "configure"
25916#include "confdefs.h"
25917
25918#ifdef SVR4_ACTION
25919#define _POSIX_SOURCE
25920#endif
25921#include <sys/types.h>
25922#include <signal.h>
25923int
25924main (void)
25925{
25926
25927    RETSIGTYPE (*func)(SIG_ARGS) = SIG_IGN;
25928    struct sigaction sa, osa;
25929    sa.sa_handler = func;
25930    sa.sa_flags = 0;
25931    sigemptyset (&sa.sa_mask);
25932    sigaction (SIGBUS,&sa,&osa);
25933  ;
25934  return 0;
25935}
25936_ACEOF
25937rm -f conftest.$ac_objext conftest$ac_exeext
25938if { (eval echo "$as_me:25938: \"$ac_link\"") >&5
25939  (eval $ac_link) 2>&5
25940  ac_status=$?
25941  echo "$as_me:25941: \$? = $ac_status" >&5
25942  (exit $ac_status); } &&
25943         { ac_try='test -s conftest$ac_exeext'
25944  { (eval echo "$as_me:25944: \"$ac_try\"") >&5
25945  (eval $ac_try) 2>&5
25946  ac_status=$?
25947  echo "$as_me:25947: \$? = $ac_status" >&5
25948  (exit $ac_status); }; }; then
25949  cf_cv_sigaction_funcs=yes
25950else
25951  echo "$as_me: failed program was:" >&5
25952cat conftest.$ac_ext >&5
25953cf_cv_sigaction_funcs=no
25954fi
25955rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
25956fi
25957echo "$as_me:25957: result: $cf_cv_sigaction_funcs" >&5
25958echo "${ECHO_T}$cf_cv_sigaction_funcs" >&6
25959
25960test "$cf_cv_sigaction_funcs" = yes &&
25961cat >>confdefs.h <<\EOF
25962#define HAVE_POSIX_JC 1
25963EOF
25964
25965fi
25966
25967echo "$as_me:25967: checking for fork" >&5
25968echo $ECHO_N "checking for fork... $ECHO_C" >&6
25969if test "${cf_cv_func_fork+set}" = set; then
25970  echo $ECHO_N "(cached) $ECHO_C" >&6
25971else
25972
25973if test "$cross_compiling" = yes; then
25974  cf_cv_func_fork=unknown
25975else
25976  cat >conftest.$ac_ext <<_ACEOF
25977#line 25977 "configure"
25978#include "confdefs.h"
25979
25980int main()
25981{
25982	if (fork() < 0)
25983		${cf_cv_main_return:-return}(1);
25984	${cf_cv_main_return:-return}(0);
25985}
25986_ACEOF
25987rm -f conftest$ac_exeext
25988if { (eval echo "$as_me:25988: \"$ac_link\"") >&5
25989  (eval $ac_link) 2>&5
25990  ac_status=$?
25991  echo "$as_me:25991: \$? = $ac_status" >&5
25992  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
25993  { (eval echo "$as_me:25993: \"$ac_try\"") >&5
25994  (eval $ac_try) 2>&5
25995  ac_status=$?
25996  echo "$as_me:25996: \$? = $ac_status" >&5
25997  (exit $ac_status); }; }; then
25998  cf_cv_func_fork=yes
25999else
26000  echo "$as_me: program exited with status $ac_status" >&5
26001echo "$as_me: failed program was:" >&5
26002cat conftest.$ac_ext >&5
26003cf_cv_func_fork=no
26004fi
26005rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26006fi
26007
26008fi
26009echo "$as_me:26009: result: $cf_cv_func_fork" >&5
26010echo "${ECHO_T}$cf_cv_func_fork" >&6
26011test $cf_cv_func_fork = yes && cat >>confdefs.h <<\EOF
26012#define HAVE_FORK 1
26013EOF
26014
26015echo "$as_me:26015: checking for memmove" >&5
26016echo $ECHO_N "checking for memmove... $ECHO_C" >&6
26017if test "${ac_cv_func_memmove+set}" = set; then
26018  echo $ECHO_N "(cached) $ECHO_C" >&6
26019else
26020  cat >conftest.$ac_ext <<_ACEOF
26021#line 26021 "configure"
26022#include "confdefs.h"
26023#define memmove autoconf_temporary
26024#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
26025#undef memmove
26026
26027#ifdef __cplusplus
26028extern "C"
26029#endif
26030
26031/* We use char because int might match the return type of a gcc2
26032   builtin and then its argument prototype would still apply.  */
26033char memmove (void);
26034
26035int
26036main (void)
26037{
26038
26039/* The GNU C library defines stubs for functions which it implements
26040    to always fail with ENOSYS.  Some functions are actually named
26041    something starting with __ and the normal name is an alias.  */
26042#if defined (__stub_memmove) || defined (__stub___memmove)
26043#error found stub for memmove
26044#endif
26045
26046	return memmove ();
26047  ;
26048  return 0;
26049}
26050_ACEOF
26051rm -f conftest.$ac_objext conftest$ac_exeext
26052if { (eval echo "$as_me:26052: \"$ac_link\"") >&5
26053  (eval $ac_link) 2>&5
26054  ac_status=$?
26055  echo "$as_me:26055: \$? = $ac_status" >&5
26056  (exit $ac_status); } &&
26057         { ac_try='test -s conftest$ac_exeext'
26058  { (eval echo "$as_me:26058: \"$ac_try\"") >&5
26059  (eval $ac_try) 2>&5
26060  ac_status=$?
26061  echo "$as_me:26061: \$? = $ac_status" >&5
26062  (exit $ac_status); }; }; then
26063  ac_cv_func_memmove=yes
26064else
26065  echo "$as_me: failed program was:" >&5
26066cat conftest.$ac_ext >&5
26067ac_cv_func_memmove=no
26068fi
26069rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26070fi
26071echo "$as_me:26071: result: $ac_cv_func_memmove" >&5
26072echo "${ECHO_T}$ac_cv_func_memmove" >&6
26073if test $ac_cv_func_memmove = yes; then
26074  :
26075else
26076
26077echo "$as_me:26077: checking for bcopy" >&5
26078echo $ECHO_N "checking for bcopy... $ECHO_C" >&6
26079if test "${ac_cv_func_bcopy+set}" = set; then
26080  echo $ECHO_N "(cached) $ECHO_C" >&6
26081else
26082  cat >conftest.$ac_ext <<_ACEOF
26083#line 26083 "configure"
26084#include "confdefs.h"
26085#define bcopy autoconf_temporary
26086#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
26087#undef bcopy
26088
26089#ifdef __cplusplus
26090extern "C"
26091#endif
26092
26093/* We use char because int might match the return type of a gcc2
26094   builtin and then its argument prototype would still apply.  */
26095char bcopy (void);
26096
26097int
26098main (void)
26099{
26100
26101/* The GNU C library defines stubs for functions which it implements
26102    to always fail with ENOSYS.  Some functions are actually named
26103    something starting with __ and the normal name is an alias.  */
26104#if defined (__stub_bcopy) || defined (__stub___bcopy)
26105#error found stub for bcopy
26106#endif
26107
26108	return bcopy ();
26109  ;
26110  return 0;
26111}
26112_ACEOF
26113rm -f conftest.$ac_objext conftest$ac_exeext
26114if { (eval echo "$as_me:26114: \"$ac_link\"") >&5
26115  (eval $ac_link) 2>&5
26116  ac_status=$?
26117  echo "$as_me:26117: \$? = $ac_status" >&5
26118  (exit $ac_status); } &&
26119         { ac_try='test -s conftest$ac_exeext'
26120  { (eval echo "$as_me:26120: \"$ac_try\"") >&5
26121  (eval $ac_try) 2>&5
26122  ac_status=$?
26123  echo "$as_me:26123: \$? = $ac_status" >&5
26124  (exit $ac_status); }; }; then
26125  ac_cv_func_bcopy=yes
26126else
26127  echo "$as_me: failed program was:" >&5
26128cat conftest.$ac_ext >&5
26129ac_cv_func_bcopy=no
26130fi
26131rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26132fi
26133echo "$as_me:26133: result: $ac_cv_func_bcopy" >&5
26134echo "${ECHO_T}$ac_cv_func_bcopy" >&6
26135if test $ac_cv_func_bcopy = yes; then
26136
26137	echo "$as_me:26137: checking if bcopy does overlapping moves" >&5
26138echo $ECHO_N "checking if bcopy does overlapping moves... $ECHO_C" >&6
26139if test "${cf_cv_good_bcopy+set}" = set; then
26140  echo $ECHO_N "(cached) $ECHO_C" >&6
26141else
26142
26143		if test "$cross_compiling" = yes; then
26144  cf_cv_good_bcopy=unknown
26145else
26146  cat >conftest.$ac_ext <<_ACEOF
26147#line 26147 "configure"
26148#include "confdefs.h"
26149
26150int main(void) {
26151	static char data[] = "abcdefghijklmnopqrstuwwxyz";
26152	char temp[40];
26153	bcopy(data, temp, sizeof(data));
26154	bcopy(temp+10, temp, 15);
26155	bcopy(temp+5, temp+15, 10);
26156	${cf_cv_main_return:-return} (strcmp(temp, "klmnopqrstuwwxypqrstuwwxyz"));
26157}
26158
26159_ACEOF
26160rm -f conftest$ac_exeext
26161if { (eval echo "$as_me:26161: \"$ac_link\"") >&5
26162  (eval $ac_link) 2>&5
26163  ac_status=$?
26164  echo "$as_me:26164: \$? = $ac_status" >&5
26165  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26166  { (eval echo "$as_me:26166: \"$ac_try\"") >&5
26167  (eval $ac_try) 2>&5
26168  ac_status=$?
26169  echo "$as_me:26169: \$? = $ac_status" >&5
26170  (exit $ac_status); }; }; then
26171  cf_cv_good_bcopy=yes
26172else
26173  echo "$as_me: program exited with status $ac_status" >&5
26174echo "$as_me: failed program was:" >&5
26175cat conftest.$ac_ext >&5
26176cf_cv_good_bcopy=no
26177fi
26178rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26179fi
26180
26181fi
26182echo "$as_me:26182: result: $cf_cv_good_bcopy" >&5
26183echo "${ECHO_T}$cf_cv_good_bcopy" >&6
26184
26185else
26186  cf_cv_good_bcopy=no
26187fi
26188
26189	if test "$cf_cv_good_bcopy" = yes ; then
26190
26191cat >>confdefs.h <<\EOF
26192#define USE_OK_BCOPY 1
26193EOF
26194
26195	else
26196
26197cat >>confdefs.h <<\EOF
26198#define USE_MY_MEMMOVE 1
26199EOF
26200
26201	fi
26202
26203fi
26204
26205echo "$as_me:26205: checking if select expects int * arguments" >&5
26206echo $ECHO_N "checking if select expects int * arguments... $ECHO_C" >&6
26207cat >conftest.$ac_ext <<_ACEOF
26208#line 26208 "configure"
26209#include "confdefs.h"
26210#include <time.h>
26211
26212_ACEOF
26213if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
26214  egrep "select\(.*, *int *\*," >/dev/null 2>&1; then
26215
26216cat >>confdefs.h <<\EOF
26217#define HAVE_SELECT_INTP 1
26218EOF
26219 echo "$as_me:26219: result: yes" >&5
26220echo "${ECHO_T}yes" >&6
26221else
26222  echo "$as_me:26222: result: no" >&5
26223echo "${ECHO_T}no" >&6
26224
26225fi
26226rm -rf conftest*
26227
26228echo "$as_me:26228: checking whether closedir returns void" >&5
26229echo $ECHO_N "checking whether closedir returns void... $ECHO_C" >&6
26230if test "${ac_cv_func_closedir_void+set}" = set; then
26231  echo $ECHO_N "(cached) $ECHO_C" >&6
26232else
26233  if test "$cross_compiling" = yes; then
26234  ac_cv_func_closedir_void=yes
26235else
26236  cat >conftest.$ac_ext <<_ACEOF
26237#line 26237 "configure"
26238#include "confdefs.h"
26239$ac_includes_default
26240#include <$ac_header_dirent>
26241#ifndef __cplusplus
26242int closedir ();
26243#endif
26244
26245int
26246main (void)
26247{
26248$ac_main_return (closedir (opendir (".")) != 0);
26249  ;
26250  return 0;
26251}
26252_ACEOF
26253rm -f conftest$ac_exeext
26254if { (eval echo "$as_me:26254: \"$ac_link\"") >&5
26255  (eval $ac_link) 2>&5
26256  ac_status=$?
26257  echo "$as_me:26257: \$? = $ac_status" >&5
26258  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26259  { (eval echo "$as_me:26259: \"$ac_try\"") >&5
26260  (eval $ac_try) 2>&5
26261  ac_status=$?
26262  echo "$as_me:26262: \$? = $ac_status" >&5
26263  (exit $ac_status); }; }; then
26264  ac_cv_func_closedir_void=no
26265else
26266  echo "$as_me: program exited with status $ac_status" >&5
26267echo "$as_me: failed program was:" >&5
26268cat conftest.$ac_ext >&5
26269ac_cv_func_closedir_void=yes
26270fi
26271rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26272fi
26273fi
26274echo "$as_me:26274: result: $ac_cv_func_closedir_void" >&5
26275echo "${ECHO_T}$ac_cv_func_closedir_void" >&6
26276if test $ac_cv_func_closedir_void = yes; then
26277
26278cat >>confdefs.h <<\EOF
26279#define CLOSEDIR_VOID 1
26280EOF
26281
26282fi
26283
26284# autoconf 2.5x assumes setvbuf is not reversed when cross-compiling
26285if test "$cross_compiling" != yes ; then
26286	echo "$as_me:26286: checking whether setvbuf arguments are reversed" >&5
26287echo $ECHO_N "checking whether setvbuf arguments are reversed... $ECHO_C" >&6
26288if test "${ac_cv_func_setvbuf_reversed+set}" = set; then
26289  echo $ECHO_N "(cached) $ECHO_C" >&6
26290else
26291  if test "$cross_compiling" = yes; then
26292  { { echo "$as_me:26292: error: cannot run test program while cross compiling" >&5
26293echo "$as_me: error: cannot run test program while cross compiling" >&2;}
26294   { (exit 1); exit 1; }; }
26295else
26296  cat >conftest.$ac_ext <<_ACEOF
26297#line 26297 "configure"
26298#include "confdefs.h"
26299#include <stdio.h>
26300/* If setvbuf has the reversed format, exit 0. */
26301int
26302main (void)
26303{
26304  /* This call has the arguments reversed.
26305     A reversed system may check and see that the address of main
26306     is not _IOLBF, _IONBF, or _IOFBF, and return nonzero.  */
26307  if (setvbuf(stdout, _IOLBF, (char *) main, BUFSIZ) != 0)
26308    $ac_main_return(1);
26309  putc('\r', stdout);
26310  $ac_main_return(0);			/* Non-reversed systems segv here.  */
26311}
26312_ACEOF
26313rm -f conftest$ac_exeext
26314if { (eval echo "$as_me:26314: \"$ac_link\"") >&5
26315  (eval $ac_link) 2>&5
26316  ac_status=$?
26317  echo "$as_me:26317: \$? = $ac_status" >&5
26318  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
26319  { (eval echo "$as_me:26319: \"$ac_try\"") >&5
26320  (eval $ac_try) 2>&5
26321  ac_status=$?
26322  echo "$as_me:26322: \$? = $ac_status" >&5
26323  (exit $ac_status); }; }; then
26324  ac_cv_func_setvbuf_reversed=yes
26325else
26326  echo "$as_me: program exited with status $ac_status" >&5
26327echo "$as_me: failed program was:" >&5
26328cat conftest.$ac_ext >&5
26329ac_cv_func_setvbuf_reversed=no
26330fi
26331rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
26332fi
26333rm -f core core.* *.core
26334fi
26335echo "$as_me:26335: result: $ac_cv_func_setvbuf_reversed" >&5
26336echo "${ECHO_T}$ac_cv_func_setvbuf_reversed" >&6
26337if test $ac_cv_func_setvbuf_reversed = yes; then
26338
26339cat >>confdefs.h <<\EOF
26340#define SETVBUF_REVERSED 1
26341EOF
26342
26343fi
26344
26345fi
26346
26347###	Checks for network library functions.
26348
26349for ac_func in \
26350	gai_strerror \
26351	getaddrinfo \
26352	gethostname \
26353	gethostbyname \
26354	getservbyname \
26355	inet_addr \
26356	inet_ntoa \
26357	strncasecmp \
26358
26359do
26360as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
26361echo "$as_me:26361: checking for $ac_func" >&5
26362echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
26363if eval "test \"\${$as_ac_var+set}\" = set"; then
26364  echo $ECHO_N "(cached) $ECHO_C" >&6
26365else
26366  cat >conftest.$ac_ext <<_ACEOF
26367#line 26367 "configure"
26368#include "confdefs.h"
26369#define $ac_func autoconf_temporary
26370#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
26371#undef $ac_func
26372
26373#ifdef __cplusplus
26374extern "C"
26375#endif
26376
26377/* We use char because int might match the return type of a gcc2
26378   builtin and then its argument prototype would still apply.  */
26379char $ac_func (void);
26380
26381int
26382main (void)
26383{
26384
26385/* The GNU C library defines stubs for functions which it implements
26386    to always fail with ENOSYS.  Some functions are actually named
26387    something starting with __ and the normal name is an alias.  */
26388#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
26389#error found stub for $ac_func
26390#endif
26391
26392	return $ac_func ();
26393  ;
26394  return 0;
26395}
26396_ACEOF
26397rm -f conftest.$ac_objext conftest$ac_exeext
26398if { (eval echo "$as_me:26398: \"$ac_link\"") >&5
26399  (eval $ac_link) 2>&5
26400  ac_status=$?
26401  echo "$as_me:26401: \$? = $ac_status" >&5
26402  (exit $ac_status); } &&
26403         { ac_try='test -s conftest$ac_exeext'
26404  { (eval echo "$as_me:26404: \"$ac_try\"") >&5
26405  (eval $ac_try) 2>&5
26406  ac_status=$?
26407  echo "$as_me:26407: \$? = $ac_status" >&5
26408  (exit $ac_status); }; }; then
26409  eval "$as_ac_var=yes"
26410else
26411  echo "$as_me: failed program was:" >&5
26412cat conftest.$ac_ext >&5
26413eval "$as_ac_var=no"
26414fi
26415rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26416fi
26417echo "$as_me:26417: result: `eval echo '${'$as_ac_var'}'`" >&5
26418echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
26419if test `eval echo '${'$as_ac_var'}'` = yes; then
26420  cat >>confdefs.h <<EOF
26421#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
26422EOF
26423
26424fi
26425done
26426
26427echo "$as_me:26427: checking for type sigaction_t" >&5
26428echo $ECHO_N "checking for type sigaction_t... $ECHO_C" >&6
26429if test "${cf_cv_type_sigaction+set}" = set; then
26430  echo $ECHO_N "(cached) $ECHO_C" >&6
26431else
26432
26433	cat >conftest.$ac_ext <<_ACEOF
26434#line 26434 "configure"
26435#include "confdefs.h"
26436
26437#include <signal.h>
26438int
26439main (void)
26440{
26441sigaction_t x
26442  ;
26443  return 0;
26444}
26445_ACEOF
26446rm -f conftest.$ac_objext
26447if { (eval echo "$as_me:26447: \"$ac_compile\"") >&5
26448  (eval $ac_compile) 2>&5
26449  ac_status=$?
26450  echo "$as_me:26450: \$? = $ac_status" >&5
26451  (exit $ac_status); } &&
26452         { ac_try='test -s conftest.$ac_objext'
26453  { (eval echo "$as_me:26453: \"$ac_try\"") >&5
26454  (eval $ac_try) 2>&5
26455  ac_status=$?
26456  echo "$as_me:26456: \$? = $ac_status" >&5
26457  (exit $ac_status); }; }; then
26458  cf_cv_type_sigaction=yes
26459else
26460  echo "$as_me: failed program was:" >&5
26461cat conftest.$ac_ext >&5
26462cf_cv_type_sigaction=no
26463fi
26464rm -f conftest.$ac_objext conftest.$ac_ext
26465fi
26466
26467echo "$as_me:26467: result: $cf_cv_type_sigaction" >&5
26468echo "${ECHO_T}$cf_cv_type_sigaction" >&6
26469test "$cf_cv_type_sigaction" = yes &&
26470cat >>confdefs.h <<\EOF
26471#define HAVE_TYPE_SIGACTION 1
26472EOF
26473
26474echo "$as_me:26474: checking for nonconflicting termios.h" >&5
26475echo $ECHO_N "checking for nonconflicting termios.h... $ECHO_C" >&6
26476if test "${cf_cv_use_termios_h+set}" = set; then
26477  echo $ECHO_N "(cached) $ECHO_C" >&6
26478else
26479
26480	cat >conftest.$ac_ext <<_ACEOF
26481#line 26481 "configure"
26482#include "confdefs.h"
26483
26484#ifdef HAVE_IOCTL_H
26485#	include <ioctl.h>
26486#else
26487#	ifdef HAVE_SYS_IOCTL_H
26488#		include <sys/ioctl.h>
26489#	endif
26490#endif
26491
26492#if !defined(sun) || !defined(NL0)
26493#include <termios.h>
26494#endif
26495
26496int
26497main (void)
26498{
26499
26500	struct termios save_tty;
26501	(void) tcsetattr (0, TCSANOW, &save_tty);
26502	(void) tcgetattr (0, &save_tty)
26503  ;
26504  return 0;
26505}
26506_ACEOF
26507rm -f conftest.$ac_objext conftest$ac_exeext
26508if { (eval echo "$as_me:26508: \"$ac_link\"") >&5
26509  (eval $ac_link) 2>&5
26510  ac_status=$?
26511  echo "$as_me:26511: \$? = $ac_status" >&5
26512  (exit $ac_status); } &&
26513         { ac_try='test -s conftest$ac_exeext'
26514  { (eval echo "$as_me:26514: \"$ac_try\"") >&5
26515  (eval $ac_try) 2>&5
26516  ac_status=$?
26517  echo "$as_me:26517: \$? = $ac_status" >&5
26518  (exit $ac_status); }; }; then
26519  cf_cv_use_termios_h=yes
26520else
26521  echo "$as_me: failed program was:" >&5
26522cat conftest.$ac_ext >&5
26523cf_cv_use_termios_h=no
26524fi
26525rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26526
26527fi
26528
26529echo "$as_me:26529: result: $cf_cv_use_termios_h" >&5
26530echo "${ECHO_T}$cf_cv_use_termios_h" >&6
26531if test $cf_cv_use_termios_h = yes; then
26532
26533cat >>confdefs.h <<\EOF
26534#define HAVE_TERMIOS_H 1
26535EOF
26536
26537cat >>confdefs.h <<\EOF
26538#define HAVE_TCGETATTR 1
26539EOF
26540
26541cat >>confdefs.h <<\EOF
26542#define HAVE_TCSETATTR 1
26543EOF
26544
26545fi
26546
26547echo "$as_me:26547: checking for passwd.pw_gecos" >&5
26548echo $ECHO_N "checking for passwd.pw_gecos... $ECHO_C" >&6
26549if test "${cf_cv_pw_gecos+set}" = set; then
26550  echo $ECHO_N "(cached) $ECHO_C" >&6
26551else
26552
26553	cat >conftest.$ac_ext <<_ACEOF
26554#line 26554 "configure"
26555#include "confdefs.h"
26556
26557#include <pwd.h>
26558
26559int
26560main (void)
26561{
26562
26563	struct passwd foo;
26564	char bar = foo.pw_gecos
26565  ;
26566  return 0;
26567}
26568_ACEOF
26569rm -f conftest.$ac_objext
26570if { (eval echo "$as_me:26570: \"$ac_compile\"") >&5
26571  (eval $ac_compile) 2>&5
26572  ac_status=$?
26573  echo "$as_me:26573: \$? = $ac_status" >&5
26574  (exit $ac_status); } &&
26575         { ac_try='test -s conftest.$ac_objext'
26576  { (eval echo "$as_me:26576: \"$ac_try\"") >&5
26577  (eval $ac_try) 2>&5
26578  ac_status=$?
26579  echo "$as_me:26579: \$? = $ac_status" >&5
26580  (exit $ac_status); }; }; then
26581  cf_cv_pw_gecos=yes
26582else
26583  echo "$as_me: failed program was:" >&5
26584cat conftest.$ac_ext >&5
26585cf_cv_pw_gecos=no
26586fi
26587rm -f conftest.$ac_objext conftest.$ac_ext
26588fi
26589echo "$as_me:26589: result: $cf_cv_pw_gecos" >&5
26590echo "${ECHO_T}$cf_cv_pw_gecos" >&6
26591test $cf_cv_pw_gecos = no &&
26592cat >>confdefs.h <<\EOF
26593#define DONT_HAVE_PW_GECOS 1
26594EOF
26595
26596echo "$as_me:26596: checking for tm.tm_gmtoff" >&5
26597echo $ECHO_N "checking for tm.tm_gmtoff... $ECHO_C" >&6
26598if test "${cf_cv_tm_gmtoff+set}" = set; then
26599  echo $ECHO_N "(cached) $ECHO_C" >&6
26600else
26601
26602	cat >conftest.$ac_ext <<_ACEOF
26603#line 26603 "configure"
26604#include "confdefs.h"
26605
26606#ifdef TIME_WITH_SYS_TIME
26607#	include <sys/time.h>
26608#	include <time.h>
26609#else
26610#	ifdef HAVE_SYS_TIME_H
26611#		include <sys/time.h>
26612#	else
26613#		include <time.h>
26614#	endif
26615#endif
26616
26617int
26618main (void)
26619{
26620
26621	struct tm foo;
26622	long bar = foo.tm_gmtoff
26623  ;
26624  return 0;
26625}
26626_ACEOF
26627rm -f conftest.$ac_objext
26628if { (eval echo "$as_me:26628: \"$ac_compile\"") >&5
26629  (eval $ac_compile) 2>&5
26630  ac_status=$?
26631  echo "$as_me:26631: \$? = $ac_status" >&5
26632  (exit $ac_status); } &&
26633         { ac_try='test -s conftest.$ac_objext'
26634  { (eval echo "$as_me:26634: \"$ac_try\"") >&5
26635  (eval $ac_try) 2>&5
26636  ac_status=$?
26637  echo "$as_me:26637: \$? = $ac_status" >&5
26638  (exit $ac_status); }; }; then
26639  cf_cv_tm_gmtoff=yes
26640else
26641  echo "$as_me: failed program was:" >&5
26642cat conftest.$ac_ext >&5
26643cf_cv_tm_gmtoff=no
26644fi
26645rm -f conftest.$ac_objext conftest.$ac_ext
26646fi
26647
26648echo "$as_me:26648: result: $cf_cv_tm_gmtoff" >&5
26649echo "${ECHO_T}$cf_cv_tm_gmtoff" >&6
26650test $cf_cv_tm_gmtoff = no &&
26651cat >>confdefs.h <<\EOF
26652#define DONT_HAVE_TM_GMTOFF 1
26653EOF
26654
26655echo "$as_me:26655: checking for long file names" >&5
26656echo $ECHO_N "checking for long file names... $ECHO_C" >&6
26657if test "${ac_cv_sys_long_file_names+set}" = set; then
26658  echo $ECHO_N "(cached) $ECHO_C" >&6
26659else
26660  ac_cv_sys_long_file_names=yes
26661# Test for long file names in all the places we know might matter:
26662#      .		the current directory, where building will happen
26663#      $prefix/lib	where we will be installing things
26664#      $exec_prefix/lib	likewise
26665# eval it to expand exec_prefix.
26666#      $TMPDIR		if set, where it might want to write temporary files
26667# if $TMPDIR is not set:
26668#      /tmp		where it might want to write temporary files
26669#      /var/tmp		likewise
26670#      /usr/tmp		likewise
26671if test -n "$TMPDIR" && test -d "$TMPDIR" && test -w "$TMPDIR"; then
26672  ac_tmpdirs=$TMPDIR
26673else
26674  ac_tmpdirs='/tmp /var/tmp /usr/tmp'
26675fi
26676for ac_dir in  . $ac_tmpdirs `eval echo $prefix/lib $exec_prefix/lib` ; do
26677  test -d $ac_dir || continue
26678  test -w $ac_dir || continue # It is less confusing to not echo anything here.
26679  ac_xdir=$ac_dir/cf$$
26680  (umask 077 && mkdir $ac_xdir 2>/dev/null) || continue
26681  ac_tf1=$ac_xdir/conftest9012345
26682  ac_tf2=$ac_xdir/conftest9012346
26683  (echo 1 >$ac_tf1) 2>/dev/null
26684  (echo 2 >$ac_tf2) 2>/dev/null
26685  ac_val=`cat $ac_tf1 2>/dev/null`
26686  if test ! -f $ac_tf1 || test "$ac_val" != 1; then
26687    ac_cv_sys_long_file_names=no
26688    rm -rf $ac_xdir 2>/dev/null
26689    break
26690  fi
26691  rm -rf $ac_xdir 2>/dev/null
26692done
26693fi
26694echo "$as_me:26694: result: $ac_cv_sys_long_file_names" >&5
26695echo "${ECHO_T}$ac_cv_sys_long_file_names" >&6
26696if test $ac_cv_sys_long_file_names = yes; then
26697
26698cat >>confdefs.h <<\EOF
26699#define HAVE_LONG_FILE_NAMES 1
26700EOF
26701
26702fi
26703
26704for ac_header in sys/wait.h
26705do
26706as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26707echo "$as_me:26707: checking for $ac_header" >&5
26708echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26709if eval "test \"\${$as_ac_Header+set}\" = set"; then
26710  echo $ECHO_N "(cached) $ECHO_C" >&6
26711else
26712  cat >conftest.$ac_ext <<_ACEOF
26713#line 26713 "configure"
26714#include "confdefs.h"
26715#include <$ac_header>
26716_ACEOF
26717if { (eval echo "$as_me:26717: \"$ac_cpp conftest.$ac_ext\"") >&5
26718  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26719  ac_status=$?
26720  egrep -v '^ *\+' conftest.er1 >conftest.err
26721  rm -f conftest.er1
26722  cat conftest.err >&5
26723  echo "$as_me:26723: \$? = $ac_status" >&5
26724  (exit $ac_status); } >/dev/null; then
26725  if test -s conftest.err; then
26726    ac_cpp_err=$ac_c_preproc_warn_flag
26727  else
26728    ac_cpp_err=
26729  fi
26730else
26731  ac_cpp_err=yes
26732fi
26733if test -z "$ac_cpp_err"; then
26734  eval "$as_ac_Header=yes"
26735else
26736  echo "$as_me: failed program was:" >&5
26737  cat conftest.$ac_ext >&5
26738  eval "$as_ac_Header=no"
26739fi
26740rm -f conftest.err conftest.$ac_ext
26741fi
26742echo "$as_me:26742: result: `eval echo '${'$as_ac_Header'}'`" >&5
26743echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26744if test `eval echo '${'$as_ac_Header'}'` = yes; then
26745  cat >>confdefs.h <<EOF
26746#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26747EOF
26748
26749fi
26750done
26751
26752cf_wait_headers="#include <sys/types.h>
26753"
26754if test $ac_cv_header_sys_wait_h = yes; then
26755cf_wait_headers="$cf_wait_headers
26756#include <sys/wait.h>
26757"
26758else
26759
26760for ac_header in wait.h
26761do
26762as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26763echo "$as_me:26763: checking for $ac_header" >&5
26764echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26765if eval "test \"\${$as_ac_Header+set}\" = set"; then
26766  echo $ECHO_N "(cached) $ECHO_C" >&6
26767else
26768  cat >conftest.$ac_ext <<_ACEOF
26769#line 26769 "configure"
26770#include "confdefs.h"
26771#include <$ac_header>
26772_ACEOF
26773if { (eval echo "$as_me:26773: \"$ac_cpp conftest.$ac_ext\"") >&5
26774  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26775  ac_status=$?
26776  egrep -v '^ *\+' conftest.er1 >conftest.err
26777  rm -f conftest.er1
26778  cat conftest.err >&5
26779  echo "$as_me:26779: \$? = $ac_status" >&5
26780  (exit $ac_status); } >/dev/null; then
26781  if test -s conftest.err; then
26782    ac_cpp_err=$ac_c_preproc_warn_flag
26783  else
26784    ac_cpp_err=
26785  fi
26786else
26787  ac_cpp_err=yes
26788fi
26789if test -z "$ac_cpp_err"; then
26790  eval "$as_ac_Header=yes"
26791else
26792  echo "$as_me: failed program was:" >&5
26793  cat conftest.$ac_ext >&5
26794  eval "$as_ac_Header=no"
26795fi
26796rm -f conftest.err conftest.$ac_ext
26797fi
26798echo "$as_me:26798: result: `eval echo '${'$as_ac_Header'}'`" >&5
26799echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26800if test `eval echo '${'$as_ac_Header'}'` = yes; then
26801  cat >>confdefs.h <<EOF
26802#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26803EOF
26804
26805fi
26806done
26807
26808for ac_header in waitstatus.h
26809do
26810as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26811echo "$as_me:26811: checking for $ac_header" >&5
26812echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26813if eval "test \"\${$as_ac_Header+set}\" = set"; then
26814  echo $ECHO_N "(cached) $ECHO_C" >&6
26815else
26816  cat >conftest.$ac_ext <<_ACEOF
26817#line 26817 "configure"
26818#include "confdefs.h"
26819#include <$ac_header>
26820_ACEOF
26821if { (eval echo "$as_me:26821: \"$ac_cpp conftest.$ac_ext\"") >&5
26822  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
26823  ac_status=$?
26824  egrep -v '^ *\+' conftest.er1 >conftest.err
26825  rm -f conftest.er1
26826  cat conftest.err >&5
26827  echo "$as_me:26827: \$? = $ac_status" >&5
26828  (exit $ac_status); } >/dev/null; then
26829  if test -s conftest.err; then
26830    ac_cpp_err=$ac_c_preproc_warn_flag
26831  else
26832    ac_cpp_err=
26833  fi
26834else
26835  ac_cpp_err=yes
26836fi
26837if test -z "$ac_cpp_err"; then
26838  eval "$as_ac_Header=yes"
26839else
26840  echo "$as_me: failed program was:" >&5
26841  cat conftest.$ac_ext >&5
26842  eval "$as_ac_Header=no"
26843fi
26844rm -f conftest.err conftest.$ac_ext
26845fi
26846echo "$as_me:26846: result: `eval echo '${'$as_ac_Header'}'`" >&5
26847echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
26848if test `eval echo '${'$as_ac_Header'}'` = yes; then
26849  cat >>confdefs.h <<EOF
26850#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26851EOF
26852
26853fi
26854done
26855
26856if test $ac_cv_header_wait_h = yes; then
26857cf_wait_headers="$cf_wait_headers
26858#include <wait.h>
26859"
26860fi
26861if test $ac_cv_header_waitstatus_h = yes; then
26862cf_wait_headers="$cf_wait_headers
26863#include <waitstatus.h>
26864"
26865fi
26866fi
26867
26868echo "$as_me:26868: checking for union wait" >&5
26869echo $ECHO_N "checking for union wait... $ECHO_C" >&6
26870if test "${cf_cv_type_unionwait+set}" = set; then
26871  echo $ECHO_N "(cached) $ECHO_C" >&6
26872else
26873
26874	cat >conftest.$ac_ext <<_ACEOF
26875#line 26875 "configure"
26876#include "confdefs.h"
26877$cf_wait_headers
26878int
26879main (void)
26880{
26881int x;
26882	 int y = WEXITSTATUS(x);
26883	 int z = WTERMSIG(x);
26884	 wait(&x);
26885	 (void)x;
26886	 (void)y;
26887	 (void)z;
26888
26889  ;
26890  return 0;
26891}
26892_ACEOF
26893rm -f conftest.$ac_objext conftest$ac_exeext
26894if { (eval echo "$as_me:26894: \"$ac_link\"") >&5
26895  (eval $ac_link) 2>&5
26896  ac_status=$?
26897  echo "$as_me:26897: \$? = $ac_status" >&5
26898  (exit $ac_status); } &&
26899         { ac_try='test -s conftest$ac_exeext'
26900  { (eval echo "$as_me:26900: \"$ac_try\"") >&5
26901  (eval $ac_try) 2>&5
26902  ac_status=$?
26903  echo "$as_me:26903: \$? = $ac_status" >&5
26904  (exit $ac_status); }; }; then
26905  cf_cv_type_unionwait=no
26906	 echo compiles ok w/o union wait 1>&5
26907
26908else
26909  echo "$as_me: failed program was:" >&5
26910cat conftest.$ac_ext >&5
26911
26912	cat >conftest.$ac_ext <<_ACEOF
26913#line 26913 "configure"
26914#include "confdefs.h"
26915$cf_wait_headers
26916int
26917main (void)
26918{
26919union wait x;
26920#ifdef WEXITSTATUS
26921	 int y = WEXITSTATUS(x);
26922#endif
26923#ifdef WTERMSIG
26924	 int z = WTERMSIG(x);
26925#endif
26926	 wait(&x);
26927	 (void)x;
26928#ifdef WEXITSTATUS
26929	 (void)y;
26930#endif
26931#ifdef WTERMSIG
26932	 (void)z;
26933#endif
26934
26935  ;
26936  return 0;
26937}
26938_ACEOF
26939rm -f conftest.$ac_objext conftest$ac_exeext
26940if { (eval echo "$as_me:26940: \"$ac_link\"") >&5
26941  (eval $ac_link) 2>&5
26942  ac_status=$?
26943  echo "$as_me:26943: \$? = $ac_status" >&5
26944  (exit $ac_status); } &&
26945         { ac_try='test -s conftest$ac_exeext'
26946  { (eval echo "$as_me:26946: \"$ac_try\"") >&5
26947  (eval $ac_try) 2>&5
26948  ac_status=$?
26949  echo "$as_me:26949: \$? = $ac_status" >&5
26950  (exit $ac_status); }; }; then
26951  cf_cv_type_unionwait=yes
26952	 echo compiles ok with union wait and possibly macros too 1>&5
26953
26954else
26955  echo "$as_me: failed program was:" >&5
26956cat conftest.$ac_ext >&5
26957cf_cv_type_unionwait=no
26958fi
26959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26960fi
26961rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
26962fi
26963
26964echo "$as_me:26964: result: $cf_cv_type_unionwait" >&5
26965echo "${ECHO_T}$cf_cv_type_unionwait" >&6
26966test $cf_cv_type_unionwait = yes &&
26967cat >>confdefs.h <<\EOF
26968#define HAVE_TYPE_UNIONWAIT 1
26969EOF
26970
26971echo "$as_me:26971: checking if the system function returns usable child-status" >&5
26972echo $ECHO_N "checking if the system function returns usable child-status... $ECHO_C" >&6
26973if test "${cf_cv_system_status+set}" = set; then
26974  echo $ECHO_N "(cached) $ECHO_C" >&6
26975else
26976
26977	if test "$cross_compiling" = yes; then
26978  cf_cv_system_status=unknown
26979else
26980  cat >conftest.$ac_ext <<_ACEOF
26981#line 26981 "configure"
26982#include "confdefs.h"
26983
26984#include <stdio.h>
26985#include <signal.h>
26986#if HAVE_SYS_WAIT_H
26987#include <sys/wait.h>
26988#endif
26989
26990RETSIGTYPE signal_handler (int sig)
26991{
26992#if HAVE_TYPE_UNIONWAIT
26993	union wait wait_status;
26994#else
26995	int wait_status = 1;
26996#endif
26997	int system_status;
26998	wait (&wait_status);
26999	system_status = WEXITSTATUS(wait_status); /* should be nonzero */
27000	${cf_cv_main_return:-return}(system_status != 23);
27001}
27002
27003int main()
27004{
27005	/* this looks weird, but apparently the SIGCHLD gets there first on
27006	 * machines where 'system()' doesn't return a usable code, so ...
27007	 */
27008	signal (SIGCHLD, signal_handler);
27009	system("exit 23");
27010	${cf_cv_main_return:-return}(1);
27011}
27012
27013_ACEOF
27014rm -f conftest$ac_exeext
27015if { (eval echo "$as_me:27015: \"$ac_link\"") >&5
27016  (eval $ac_link) 2>&5
27017  ac_status=$?
27018  echo "$as_me:27018: \$? = $ac_status" >&5
27019  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27020  { (eval echo "$as_me:27020: \"$ac_try\"") >&5
27021  (eval $ac_try) 2>&5
27022  ac_status=$?
27023  echo "$as_me:27023: \$? = $ac_status" >&5
27024  (exit $ac_status); }; }; then
27025  cf_cv_system_status=no
27026else
27027  echo "$as_me: program exited with status $ac_status" >&5
27028echo "$as_me: failed program was:" >&5
27029cat conftest.$ac_ext >&5
27030if test "$cross_compiling" = yes; then
27031  cf_cv_system_status=unknown
27032else
27033  cat >conftest.$ac_ext <<_ACEOF
27034#line 27034 "configure"
27035#include "confdefs.h"
27036int main() { ${cf_cv_main_return:-return}(system("exit 23") != (23 << 8)); }
27037_ACEOF
27038rm -f conftest$ac_exeext
27039if { (eval echo "$as_me:27039: \"$ac_link\"") >&5
27040  (eval $ac_link) 2>&5
27041  ac_status=$?
27042  echo "$as_me:27042: \$? = $ac_status" >&5
27043  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27044  { (eval echo "$as_me:27044: \"$ac_try\"") >&5
27045  (eval $ac_try) 2>&5
27046  ac_status=$?
27047  echo "$as_me:27047: \$? = $ac_status" >&5
27048  (exit $ac_status); }; }; then
27049  cf_cv_system_status=yes
27050else
27051  echo "$as_me: program exited with status $ac_status" >&5
27052echo "$as_me: failed program was:" >&5
27053cat conftest.$ac_ext >&5
27054cf_cv_system_status=unknown
27055fi
27056rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27057fi
27058fi
27059rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27060fi
27061
27062fi
27063
27064echo "$as_me:27064: result: $cf_cv_system_status" >&5
27065echo "${ECHO_T}$cf_cv_system_status" >&6
27066test $cf_cv_system_status = no &&
27067cat >>confdefs.h <<\EOF
27068#define USE_SYSTEM_STATUS 1
27069EOF
27070
27071# Check if we are trying to use curses+color, but cannot
27072if test $use_color = yes ; then
27073	if test $use_curses = no ; then
27074
27075cat >>confdefs.h <<\EOF
27076#define HAVE_COLOR 1
27077EOF
27078
27079	elif test $cf_with_screen = pdcurses ; then
27080		cat >>confdefs.h <<\EOF
27081#define HAVE_COLOR 1
27082EOF
27083
27084	else
27085
27086if test "$cf_cv_ncurses_version" != no ; then
27087echo "$as_me:27087: checking for obsolete/broken version of ncurses" >&5
27088echo $ECHO_N "checking for obsolete/broken version of ncurses... $ECHO_C" >&6
27089if test "${cf_cv_ncurses_broken+set}" = set; then
27090  echo $ECHO_N "(cached) $ECHO_C" >&6
27091else
27092
27093cat >conftest.$ac_ext <<_ACEOF
27094#line 27094 "configure"
27095#include "confdefs.h"
27096
27097#include <${cf_cv_ncurses_header:-curses.h}>
27098int
27099main (void)
27100{
27101
27102#if defined(NCURSES_VERSION) && defined(wgetbkgd)
27103	make an error
27104#else
27105	int x = 1
27106#endif
27107
27108  ;
27109  return 0;
27110}
27111_ACEOF
27112rm -f conftest.$ac_objext
27113if { (eval echo "$as_me:27113: \"$ac_compile\"") >&5
27114  (eval $ac_compile) 2>&5
27115  ac_status=$?
27116  echo "$as_me:27116: \$? = $ac_status" >&5
27117  (exit $ac_status); } &&
27118         { ac_try='test -s conftest.$ac_objext'
27119  { (eval echo "$as_me:27119: \"$ac_try\"") >&5
27120  (eval $ac_try) 2>&5
27121  ac_status=$?
27122  echo "$as_me:27122: \$? = $ac_status" >&5
27123  (exit $ac_status); }; }; then
27124  cf_cv_ncurses_broken=no
27125else
27126  echo "$as_me: failed program was:" >&5
27127cat conftest.$ac_ext >&5
27128cf_cv_ncurses_broken=yes
27129fi
27130rm -f conftest.$ac_objext conftest.$ac_ext
27131
27132fi
27133
27134echo "$as_me:27134: result: $cf_cv_ncurses_broken" >&5
27135echo "${ECHO_T}$cf_cv_ncurses_broken" >&6
27136if test "$cf_cv_ncurses_broken" = yes ; then
27137	{ echo "$as_me:27137: WARNING: hmm... you should get an up-to-date version of ncurses" >&5
27138echo "$as_me: WARNING: hmm... you should get an up-to-date version of ncurses" >&2;}
27139
27140cat >>confdefs.h <<\EOF
27141#define NCURSES_BROKEN 1
27142EOF
27143
27144fi
27145fi
27146
27147echo "$as_me:27147: checking if curses supports color attributes" >&5
27148echo $ECHO_N "checking if curses supports color attributes... $ECHO_C" >&6
27149if test "${cf_cv_color_curses+set}" = set; then
27150  echo $ECHO_N "(cached) $ECHO_C" >&6
27151else
27152
27153	cat >conftest.$ac_ext <<_ACEOF
27154#line 27154 "configure"
27155#include "confdefs.h"
27156
27157#include <${cf_cv_ncurses_header:-curses.h}>
27158
27159int
27160main (void)
27161{
27162chtype x = COLOR_BLUE;
27163	 has_colors();
27164	 start_color();
27165#ifndef NCURSES_BROKEN
27166	 wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
27167#endif
27168
27169  ;
27170  return 0;
27171}
27172_ACEOF
27173rm -f conftest.$ac_objext conftest$ac_exeext
27174if { (eval echo "$as_me:27174: \"$ac_link\"") >&5
27175  (eval $ac_link) 2>&5
27176  ac_status=$?
27177  echo "$as_me:27177: \$? = $ac_status" >&5
27178  (exit $ac_status); } &&
27179         { ac_try='test -s conftest$ac_exeext'
27180  { (eval echo "$as_me:27180: \"$ac_try\"") >&5
27181  (eval $ac_try) 2>&5
27182  ac_status=$?
27183  echo "$as_me:27183: \$? = $ac_status" >&5
27184  (exit $ac_status); }; }; then
27185  cf_cv_color_curses=yes
27186else
27187  echo "$as_me: failed program was:" >&5
27188cat conftest.$ac_ext >&5
27189cf_cv_color_curses=no
27190fi
27191rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27192
27193fi
27194
27195echo "$as_me:27195: result: $cf_cv_color_curses" >&5
27196echo "${ECHO_T}$cf_cv_color_curses" >&6
27197if test $cf_cv_color_curses = yes ; then
27198
27199cat >>confdefs.h <<\EOF
27200#define COLOR_CURSES 1
27201EOF
27202
27203	test ".$cf_cv_ncurses_broken" != .yes &&
27204cat >>confdefs.h <<\EOF
27205#define HAVE_GETBKGD 1
27206EOF
27207
27208fi
27209
27210		if test $cf_cv_color_curses = yes ; then
27211			cat >>confdefs.h <<\EOF
27212#define HAVE_COLOR 1
27213EOF
27214
27215		else
27216			{ echo "$as_me:27216: WARNING: This curses library does not support color" >&5
27217echo "$as_me: WARNING: This curses library does not support color" >&2;}
27218		fi
27219	fi
27220fi
27221
27222# GCC and Apollo compilers are quite noisy about signal constants (quiet them).
27223if test -n "$GCC"; then
27224	check_sig_const=yes
27225elif test -f /sys/dm/dm ; then
27226	check_sig_const=yes
27227elif test -f /sys/dm/spm ; then
27228	check_sig_const=yes
27229else
27230	check_sig_const=no
27231fi
27232
27233if test $check_sig_const = yes ; then
27234
27235echo "$as_me:27235: checking for redefinable signal constants" >&5
27236echo $ECHO_N "checking for redefinable signal constants... $ECHO_C" >&6
27237if test "${cf_cv_sig_const+set}" = set; then
27238  echo $ECHO_N "(cached) $ECHO_C" >&6
27239else
27240
27241cf_cv_sig_const=no
27242if test -n "$cf_cv_sig_args"; then
27243	cf_test=`echo $cf_cv_sig_args|sed -e s/sig//`
27244	if test "$cross_compiling" = yes; then
27245  cf_cv_sig_const=unknown
27246else
27247  cat >conftest.$ac_ext <<_ACEOF
27248#line 27248 "configure"
27249#include "confdefs.h"
27250
27251#define NEW_DFL	((RETSIGTYPE (*)($cf_test))0)
27252#define NEW_IGN	((RETSIGTYPE (*)($cf_test))1)
27253#define NEW_ERR	((RETSIGTYPE (*)($cf_test))-1)
27254
27255#include <signal.h>
27256
27257int main()
27258{
27259	if (NEW_DFL != SIG_DFL
27260	 || NEW_IGN != SIG_IGN
27261	 || NEW_ERR != SIG_ERR
27262	 /* at least one system won't let me redefine these! */
27263#undef SIG_DFL
27264#undef SIG_IGN
27265#undef SIG_ERR
27266#define SIG_DFL NEW_DFL
27267#define SIG_IGN NEW_IGN
27268#define SIG_ERR NEW_ERR
27269	 || NEW_DFL != SIG_DFL)
27270	 	${cf_cv_main_return:-return}(1);
27271	signal(SIGINT, SIG_DFL);
27272	${cf_cv_main_return:-return}(0);
27273}
27274_ACEOF
27275rm -f conftest$ac_exeext
27276if { (eval echo "$as_me:27276: \"$ac_link\"") >&5
27277  (eval $ac_link) 2>&5
27278  ac_status=$?
27279  echo "$as_me:27279: \$? = $ac_status" >&5
27280  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27281  { (eval echo "$as_me:27281: \"$ac_try\"") >&5
27282  (eval $ac_try) 2>&5
27283  ac_status=$?
27284  echo "$as_me:27284: \$? = $ac_status" >&5
27285  (exit $ac_status); }; }; then
27286  cf_cv_sig_const=yes
27287else
27288  echo "$as_me: program exited with status $ac_status" >&5
27289echo "$as_me: failed program was:" >&5
27290cat conftest.$ac_ext >&5
27291cf_cv_sig_const=no
27292fi
27293rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27294fi
27295fi
27296
27297fi
27298
27299echo "$as_me:27299: result: $cf_cv_sig_const" >&5
27300echo "${ECHO_T}$cf_cv_sig_const" >&6
27301test "$cf_cv_sig_const" = yes &&
27302cat >>confdefs.h <<\EOF
27303#define DECL_SIG_CONST 1
27304EOF
27305
27306fi
27307
27308echo "$as_me:27308: checking for ANSI qsort" >&5
27309echo $ECHO_N "checking for ANSI qsort... $ECHO_C" >&6
27310if test "${cf_cv_comptype+set}" = set; then
27311  echo $ECHO_N "(cached) $ECHO_C" >&6
27312else
27313
27314	cat >conftest.$ac_ext <<_ACEOF
27315#line 27315 "configure"
27316#include "confdefs.h"
27317
27318#ifdef HAVE_STDLIB_H
27319#include <stdlib.h>
27320#endif
27321int
27322main (void)
27323{
27324extern int compare(const void *, const void *);
27325	 char *foo = "string";
27326	 qsort(foo, sizeof(foo)/sizeof(*foo), sizeof(*foo), compare)
27327  ;
27328  return 0;
27329}
27330_ACEOF
27331rm -f conftest.$ac_objext
27332if { (eval echo "$as_me:27332: \"$ac_compile\"") >&5
27333  (eval $ac_compile) 2>&5
27334  ac_status=$?
27335  echo "$as_me:27335: \$? = $ac_status" >&5
27336  (exit $ac_status); } &&
27337         { ac_try='test -s conftest.$ac_objext'
27338  { (eval echo "$as_me:27338: \"$ac_try\"") >&5
27339  (eval $ac_try) 2>&5
27340  ac_status=$?
27341  echo "$as_me:27341: \$? = $ac_status" >&5
27342  (exit $ac_status); }; }; then
27343  cf_cv_comptype=yes
27344else
27345  echo "$as_me: failed program was:" >&5
27346cat conftest.$ac_ext >&5
27347cf_cv_comptype=no
27348fi
27349rm -f conftest.$ac_objext conftest.$ac_ext
27350
27351fi
27352
27353echo "$as_me:27353: result: $cf_cv_comptype" >&5
27354echo "${ECHO_T}$cf_cv_comptype" >&6
27355if test $cf_cv_comptype = yes; then
27356
27357cat >>confdefs.h <<\EOF
27358#define HAVE_COMPTYPE_VOID 1
27359EOF
27360
27361else
27362
27363cat >>confdefs.h <<\EOF
27364#define HAVE_COMPTYPE_CHAR 1
27365EOF
27366
27367fi
27368
27369echo "$as_me:27369: checking if application can dump core" >&5
27370echo $ECHO_N "checking if application can dump core... $ECHO_C" >&6
27371if test "${cf_cv_corefile+set}" = set; then
27372  echo $ECHO_N "(cached) $ECHO_C" >&6
27373else
27374
27375	if test "$cross_compiling" = yes; then
27376  cf_cv_corefile=unknown
27377else
27378  cat >conftest.$ac_ext <<_ACEOF
27379#line 27379 "configure"
27380#include "confdefs.h"
27381
27382#include <signal.h>
27383#include <sys/types.h>
27384#include <sys/stat.h>
27385int found()
27386{
27387	struct stat sb;
27388	return ((stat("core", &sb) == 0			/* UNIX */
27389	   ||    stat("conftest.core", &sb) == 0	/* FreeBSD */
27390		)
27391		&& ((sb.st_mode & S_IFMT) == S_IFREG));
27392}
27393int main()
27394{
27395#ifdef __amiga__
27396/* Nicholas d'Alterio (nagd@ic.ac.uk) reports that the check for ability to
27397 * core dump causes the machine to crash - reason unknown (gcc 2.7.2)
27398 */
27399	${cf_cv_main_return:-return}(1);
27400#else
27401	int	pid, status;
27402	if (found())
27403		unlink("core");
27404	if (found())
27405		${cf_cv_main_return:-return}(1);
27406	if ((pid = fork()) != 0) {
27407		while (wait(&status) <= 0)
27408			;
27409	} else {
27410		abort();	/* this will dump core, if anything will */
27411	}
27412	if (found()) {
27413		unlink("core");
27414		${cf_cv_main_return:-return}(0);
27415	}
27416	${cf_cv_main_return:-return}(1);
27417#endif
27418}
27419_ACEOF
27420rm -f conftest$ac_exeext
27421if { (eval echo "$as_me:27421: \"$ac_link\"") >&5
27422  (eval $ac_link) 2>&5
27423  ac_status=$?
27424  echo "$as_me:27424: \$? = $ac_status" >&5
27425  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
27426  { (eval echo "$as_me:27426: \"$ac_try\"") >&5
27427  (eval $ac_try) 2>&5
27428  ac_status=$?
27429  echo "$as_me:27429: \$? = $ac_status" >&5
27430  (exit $ac_status); }; }; then
27431  cf_cv_corefile=yes
27432else
27433  echo "$as_me: program exited with status $ac_status" >&5
27434echo "$as_me: failed program was:" >&5
27435cat conftest.$ac_ext >&5
27436cf_cv_corefile=no
27437fi
27438rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
27439fi
27440fi
27441
27442echo "$as_me:27442: result: $cf_cv_corefile" >&5
27443echo "${ECHO_T}$cf_cv_corefile" >&6
27444test $cf_cv_corefile = yes &&
27445cat >>confdefs.h <<\EOF
27446#define HAVE_COREFILE 1
27447EOF
27448
27449### test this last, since it uses a partly-built autoconf.h
27450# Setup includes for test-program to verify declarations
27451CHECK_DECL_FLAG="-I$srcdir/include -I$srcdir/pcre"
27452CHECK_DECL_HDRS='
27453#define __CPROTO__
27454#define HAVE_CONFDEFS_H
27455#include <tin.h>'
27456TIN_DECL_HDRS="$CHECK_DECL_HDRS"
27457
27458for ac_func in \
27459	errno \
27460	getenv \
27461	getlogin \
27462	getpwnam \
27463	popen \
27464	strchr \
27465	strcasestr \
27466	strsep \
27467	tmpfile \
27468
27469do
27470
27471ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27472
27473echo "$as_me:27473: checking for missing \"${ac_func}\" extern" >&5
27474echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
27475if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
27476  echo $ECHO_N "(cached) $ECHO_C" >&6
27477else
27478
27479echo "${as_me:-configure}:27479: testing for missing "${ac_func}" external ..." 1>&5
27480
27481cf_save_CFLAGS="$CFLAGS"
27482CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
27483cat >conftest.$ac_ext <<_ACEOF
27484#line 27484 "configure"
27485#include "confdefs.h"
27486
27487$CHECK_DECL_HDRS
27488
27489#undef ${ac_func}
27490struct zowie { int a; double b; struct zowie *c; char d; };
27491extern struct zowie *${ac_func}();
27492
27493int
27494main (void)
27495{
27496
27497  ;
27498  return 0;
27499}
27500_ACEOF
27501rm -f conftest.$ac_objext conftest$ac_exeext
27502if { (eval echo "$as_me:27502: \"$ac_link\"") >&5
27503  (eval $ac_link) 2>&5
27504  ac_status=$?
27505  echo "$as_me:27505: \$? = $ac_status" >&5
27506  (exit $ac_status); } &&
27507         { ac_try='test -s conftest$ac_exeext'
27508  { (eval echo "$as_me:27508: \"$ac_try\"") >&5
27509  (eval $ac_try) 2>&5
27510  ac_status=$?
27511  echo "$as_me:27511: \$? = $ac_status" >&5
27512  (exit $ac_status); }; }; then
27513  if test -n "$CHECK_DECL_HDRS" ; then
27514# try to work around system headers which are infested with non-standard syntax
27515
27516cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27517
27518cat >conftest.$ac_ext <<_ACEOF
27519#line 27519 "configure"
27520#include "confdefs.h"
27521
27522#define DECL_${cf_1_up}
27523$CHECK_DECL_HDRS
27524
27525int
27526main (void)
27527{
27528long x = 0
27529  ;
27530  return 0;
27531}
27532_ACEOF
27533rm -f conftest.$ac_objext
27534if { (eval echo "$as_me:27534: \"$ac_compile\"") >&5
27535  (eval $ac_compile) 2>&5
27536  ac_status=$?
27537  echo "$as_me:27537: \$? = $ac_status" >&5
27538  (exit $ac_status); } &&
27539         { ac_try='test -s conftest.$ac_objext'
27540  { (eval echo "$as_me:27540: \"$ac_try\"") >&5
27541  (eval $ac_try) 2>&5
27542  ac_status=$?
27543  echo "$as_me:27543: \$? = $ac_status" >&5
27544  (exit $ac_status); }; }; then
27545  eval 'cf_cv_func_'${ac_func}'=yes'
27546else
27547  echo "$as_me: failed program was:" >&5
27548cat conftest.$ac_ext >&5
27549eval 'cf_cv_func_'${ac_func}'=no'
27550fi
27551rm -f conftest.$ac_objext conftest.$ac_ext
27552else
27553eval 'cf_cv_func_'${ac_func}'=yes'
27554fi
27555
27556else
27557  echo "$as_me: failed program was:" >&5
27558cat conftest.$ac_ext >&5
27559eval 'cf_cv_func_'${ac_func}'=no'
27560fi
27561rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27562CFLAGS="$cf_save_CFLAGS"
27563
27564fi
27565
27566eval 'cf_result=$cf_cv_func_'${ac_func}
27567echo "$as_me:27567: result: $cf_result" >&5
27568echo "${ECHO_T}$cf_result" >&6
27569test $cf_result = yes && cat >>confdefs.h <<EOF
27570#define DECL_${ac_tr_func} 1
27571EOF
27572
27573done
27574
27575CHECK_DECL_HDRS="$TIN_DECL_HDRS
27576#include <tnntp.h>"
27577for ac_func in \
27578	gethostbyname \
27579	getservbyname \
27580	inet_aton \
27581	inet_ntoa \
27582	socket \
27583
27584do
27585
27586ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27587
27588echo "$as_me:27588: checking for missing \"${ac_func}\" extern" >&5
27589echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
27590if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
27591  echo $ECHO_N "(cached) $ECHO_C" >&6
27592else
27593
27594echo "${as_me:-configure}:27594: testing for missing "${ac_func}" external ..." 1>&5
27595
27596cf_save_CFLAGS="$CFLAGS"
27597CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
27598cat >conftest.$ac_ext <<_ACEOF
27599#line 27599 "configure"
27600#include "confdefs.h"
27601
27602$CHECK_DECL_HDRS
27603
27604#undef ${ac_func}
27605struct zowie { int a; double b; struct zowie *c; char d; };
27606extern struct zowie *${ac_func}();
27607
27608int
27609main (void)
27610{
27611
27612  ;
27613  return 0;
27614}
27615_ACEOF
27616rm -f conftest.$ac_objext conftest$ac_exeext
27617if { (eval echo "$as_me:27617: \"$ac_link\"") >&5
27618  (eval $ac_link) 2>&5
27619  ac_status=$?
27620  echo "$as_me:27620: \$? = $ac_status" >&5
27621  (exit $ac_status); } &&
27622         { ac_try='test -s conftest$ac_exeext'
27623  { (eval echo "$as_me:27623: \"$ac_try\"") >&5
27624  (eval $ac_try) 2>&5
27625  ac_status=$?
27626  echo "$as_me:27626: \$? = $ac_status" >&5
27627  (exit $ac_status); }; }; then
27628  if test -n "$CHECK_DECL_HDRS" ; then
27629# try to work around system headers which are infested with non-standard syntax
27630
27631cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27632
27633cat >conftest.$ac_ext <<_ACEOF
27634#line 27634 "configure"
27635#include "confdefs.h"
27636
27637#define DECL_${cf_1_up}
27638$CHECK_DECL_HDRS
27639
27640int
27641main (void)
27642{
27643long x = 0
27644  ;
27645  return 0;
27646}
27647_ACEOF
27648rm -f conftest.$ac_objext
27649if { (eval echo "$as_me:27649: \"$ac_compile\"") >&5
27650  (eval $ac_compile) 2>&5
27651  ac_status=$?
27652  echo "$as_me:27652: \$? = $ac_status" >&5
27653  (exit $ac_status); } &&
27654         { ac_try='test -s conftest.$ac_objext'
27655  { (eval echo "$as_me:27655: \"$ac_try\"") >&5
27656  (eval $ac_try) 2>&5
27657  ac_status=$?
27658  echo "$as_me:27658: \$? = $ac_status" >&5
27659  (exit $ac_status); }; }; then
27660  eval 'cf_cv_func_'${ac_func}'=yes'
27661else
27662  echo "$as_me: failed program was:" >&5
27663cat conftest.$ac_ext >&5
27664eval 'cf_cv_func_'${ac_func}'=no'
27665fi
27666rm -f conftest.$ac_objext conftest.$ac_ext
27667else
27668eval 'cf_cv_func_'${ac_func}'=yes'
27669fi
27670
27671else
27672  echo "$as_me: failed program was:" >&5
27673cat conftest.$ac_ext >&5
27674eval 'cf_cv_func_'${ac_func}'=no'
27675fi
27676rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27677CFLAGS="$cf_save_CFLAGS"
27678
27679fi
27680
27681eval 'cf_result=$cf_cv_func_'${ac_func}
27682echo "$as_me:27682: result: $cf_result" >&5
27683echo "${ECHO_T}$cf_result" >&6
27684test $cf_result = yes && cat >>confdefs.h <<EOF
27685#define DECL_${ac_tr_func} 1
27686EOF
27687
27688done
27689
27690if test $use_curses = no ; then
27691CHECK_DECL_HDRS="$TIN_DECL_HDRS
27692#include <tcurses.h>"
27693for ac_func in \
27694	tgetstr \
27695	tgoto \
27696
27697do
27698
27699ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27700
27701echo "$as_me:27701: checking for missing \"${ac_func}\" extern" >&5
27702echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
27703if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
27704  echo $ECHO_N "(cached) $ECHO_C" >&6
27705else
27706
27707echo "${as_me:-configure}:27707: testing for missing "${ac_func}" external ..." 1>&5
27708
27709cf_save_CFLAGS="$CFLAGS"
27710CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
27711cat >conftest.$ac_ext <<_ACEOF
27712#line 27712 "configure"
27713#include "confdefs.h"
27714
27715$CHECK_DECL_HDRS
27716
27717#undef ${ac_func}
27718struct zowie { int a; double b; struct zowie *c; char d; };
27719extern struct zowie *${ac_func}();
27720
27721int
27722main (void)
27723{
27724
27725  ;
27726  return 0;
27727}
27728_ACEOF
27729rm -f conftest.$ac_objext conftest$ac_exeext
27730if { (eval echo "$as_me:27730: \"$ac_link\"") >&5
27731  (eval $ac_link) 2>&5
27732  ac_status=$?
27733  echo "$as_me:27733: \$? = $ac_status" >&5
27734  (exit $ac_status); } &&
27735         { ac_try='test -s conftest$ac_exeext'
27736  { (eval echo "$as_me:27736: \"$ac_try\"") >&5
27737  (eval $ac_try) 2>&5
27738  ac_status=$?
27739  echo "$as_me:27739: \$? = $ac_status" >&5
27740  (exit $ac_status); }; }; then
27741  if test -n "$CHECK_DECL_HDRS" ; then
27742# try to work around system headers which are infested with non-standard syntax
27743
27744cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27745
27746cat >conftest.$ac_ext <<_ACEOF
27747#line 27747 "configure"
27748#include "confdefs.h"
27749
27750#define DECL_${cf_1_up}
27751$CHECK_DECL_HDRS
27752
27753int
27754main (void)
27755{
27756long x = 0
27757  ;
27758  return 0;
27759}
27760_ACEOF
27761rm -f conftest.$ac_objext
27762if { (eval echo "$as_me:27762: \"$ac_compile\"") >&5
27763  (eval $ac_compile) 2>&5
27764  ac_status=$?
27765  echo "$as_me:27765: \$? = $ac_status" >&5
27766  (exit $ac_status); } &&
27767         { ac_try='test -s conftest.$ac_objext'
27768  { (eval echo "$as_me:27768: \"$ac_try\"") >&5
27769  (eval $ac_try) 2>&5
27770  ac_status=$?
27771  echo "$as_me:27771: \$? = $ac_status" >&5
27772  (exit $ac_status); }; }; then
27773  eval 'cf_cv_func_'${ac_func}'=yes'
27774else
27775  echo "$as_me: failed program was:" >&5
27776cat conftest.$ac_ext >&5
27777eval 'cf_cv_func_'${ac_func}'=no'
27778fi
27779rm -f conftest.$ac_objext conftest.$ac_ext
27780else
27781eval 'cf_cv_func_'${ac_func}'=yes'
27782fi
27783
27784else
27785  echo "$as_me: failed program was:" >&5
27786cat conftest.$ac_ext >&5
27787eval 'cf_cv_func_'${ac_func}'=no'
27788fi
27789rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27790CFLAGS="$cf_save_CFLAGS"
27791
27792fi
27793
27794eval 'cf_result=$cf_cv_func_'${ac_func}
27795echo "$as_me:27795: result: $cf_result" >&5
27796echo "${ECHO_T}$cf_result" >&6
27797test $cf_result = yes && cat >>confdefs.h <<EOF
27798#define DECL_${ac_tr_func} 1
27799EOF
27800
27801done
27802
27803fi
27804
27805if test $with_decl_check = yes; then
27806CHECK_DECL_HDRS="$TIN_DECL_HDRS"
27807for ac_func in \
27808	_flsbuf \
27809	alarm \
27810	atoi \
27811	atol \
27812	atoll \
27813	atoq \
27814	bcopy \
27815	bzero \
27816	calloc \
27817	fchmod \
27818	fclose \
27819	fdopen \
27820	fflush \
27821	fgetc \
27822	fileno \
27823	fprintf \
27824	fputc \
27825	fputs \
27826	fread \
27827	free \
27828	fseek \
27829	fwrite \
27830	getcwd \
27831	getopt \
27832	getwd \
27833	heapsort \
27834	ioctl \
27835	isascii \
27836	kill \
27837	malloc \
27838	memset \
27839	mkstemp \
27840	mktemp \
27841	pclose \
27842	perror \
27843	printf \
27844	putenv \
27845	qsort \
27846	realloc \
27847	rename \
27848	rewind \
27849	select \
27850	setenv \
27851	snprintf \
27852	sscanf \
27853	strcasecmp \
27854	strftime \
27855	strncasecmp \
27856	strtol \
27857	strtoll \
27858	system \
27859	time \
27860	tolower \
27861	toupper \
27862	ungetc \
27863	usleep \
27864	vsprintf \
27865	vsnprintf \
27866
27867do
27868
27869ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27870
27871echo "$as_me:27871: checking for missing \"${ac_func}\" extern" >&5
27872echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
27873if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
27874  echo $ECHO_N "(cached) $ECHO_C" >&6
27875else
27876
27877echo "${as_me:-configure}:27877: testing for missing "${ac_func}" external ..." 1>&5
27878
27879cf_save_CFLAGS="$CFLAGS"
27880CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
27881cat >conftest.$ac_ext <<_ACEOF
27882#line 27882 "configure"
27883#include "confdefs.h"
27884
27885$CHECK_DECL_HDRS
27886
27887#undef ${ac_func}
27888struct zowie { int a; double b; struct zowie *c; char d; };
27889extern struct zowie *${ac_func}();
27890
27891int
27892main (void)
27893{
27894
27895  ;
27896  return 0;
27897}
27898_ACEOF
27899rm -f conftest.$ac_objext conftest$ac_exeext
27900if { (eval echo "$as_me:27900: \"$ac_link\"") >&5
27901  (eval $ac_link) 2>&5
27902  ac_status=$?
27903  echo "$as_me:27903: \$? = $ac_status" >&5
27904  (exit $ac_status); } &&
27905         { ac_try='test -s conftest$ac_exeext'
27906  { (eval echo "$as_me:27906: \"$ac_try\"") >&5
27907  (eval $ac_try) 2>&5
27908  ac_status=$?
27909  echo "$as_me:27909: \$? = $ac_status" >&5
27910  (exit $ac_status); }; }; then
27911  if test -n "$CHECK_DECL_HDRS" ; then
27912# try to work around system headers which are infested with non-standard syntax
27913
27914cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27915
27916cat >conftest.$ac_ext <<_ACEOF
27917#line 27917 "configure"
27918#include "confdefs.h"
27919
27920#define DECL_${cf_1_up}
27921$CHECK_DECL_HDRS
27922
27923int
27924main (void)
27925{
27926long x = 0
27927  ;
27928  return 0;
27929}
27930_ACEOF
27931rm -f conftest.$ac_objext
27932if { (eval echo "$as_me:27932: \"$ac_compile\"") >&5
27933  (eval $ac_compile) 2>&5
27934  ac_status=$?
27935  echo "$as_me:27935: \$? = $ac_status" >&5
27936  (exit $ac_status); } &&
27937         { ac_try='test -s conftest.$ac_objext'
27938  { (eval echo "$as_me:27938: \"$ac_try\"") >&5
27939  (eval $ac_try) 2>&5
27940  ac_status=$?
27941  echo "$as_me:27941: \$? = $ac_status" >&5
27942  (exit $ac_status); }; }; then
27943  eval 'cf_cv_func_'${ac_func}'=yes'
27944else
27945  echo "$as_me: failed program was:" >&5
27946cat conftest.$ac_ext >&5
27947eval 'cf_cv_func_'${ac_func}'=no'
27948fi
27949rm -f conftest.$ac_objext conftest.$ac_ext
27950else
27951eval 'cf_cv_func_'${ac_func}'=yes'
27952fi
27953
27954else
27955  echo "$as_me: failed program was:" >&5
27956cat conftest.$ac_ext >&5
27957eval 'cf_cv_func_'${ac_func}'=no'
27958fi
27959rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
27960CFLAGS="$cf_save_CFLAGS"
27961
27962fi
27963
27964eval 'cf_result=$cf_cv_func_'${ac_func}
27965echo "$as_me:27965: result: $cf_result" >&5
27966echo "${ECHO_T}$cf_result" >&6
27967test $cf_result = yes && cat >>confdefs.h <<EOF
27968#define DECL_${ac_tr_func} 1
27969EOF
27970
27971done
27972
27973if test $use_curses = no ; then
27974CHECK_DECL_HDRS="$TIN_DECL_HDRS
27975#include <tcurses.h>"
27976for ac_func in $cf_tc_externs
27977do
27978
27979ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27980
27981echo "$as_me:27981: checking for missing \"${ac_func}\" extern" >&5
27982echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
27983if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
27984  echo $ECHO_N "(cached) $ECHO_C" >&6
27985else
27986
27987echo "${as_me:-configure}:27987: testing for missing "${ac_func}" external ..." 1>&5
27988
27989cf_save_CFLAGS="$CFLAGS"
27990CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
27991cat >conftest.$ac_ext <<_ACEOF
27992#line 27992 "configure"
27993#include "confdefs.h"
27994
27995$CHECK_DECL_HDRS
27996
27997#undef ${ac_func}
27998struct zowie { int a; double b; struct zowie *c; char d; };
27999extern struct zowie *${ac_func}();
28000
28001int
28002main (void)
28003{
28004
28005  ;
28006  return 0;
28007}
28008_ACEOF
28009rm -f conftest.$ac_objext conftest$ac_exeext
28010if { (eval echo "$as_me:28010: \"$ac_link\"") >&5
28011  (eval $ac_link) 2>&5
28012  ac_status=$?
28013  echo "$as_me:28013: \$? = $ac_status" >&5
28014  (exit $ac_status); } &&
28015         { ac_try='test -s conftest$ac_exeext'
28016  { (eval echo "$as_me:28016: \"$ac_try\"") >&5
28017  (eval $ac_try) 2>&5
28018  ac_status=$?
28019  echo "$as_me:28019: \$? = $ac_status" >&5
28020  (exit $ac_status); }; }; then
28021  if test -n "$CHECK_DECL_HDRS" ; then
28022# try to work around system headers which are infested with non-standard syntax
28023
28024cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28025
28026cat >conftest.$ac_ext <<_ACEOF
28027#line 28027 "configure"
28028#include "confdefs.h"
28029
28030#define DECL_${cf_1_up}
28031$CHECK_DECL_HDRS
28032
28033int
28034main (void)
28035{
28036long x = 0
28037  ;
28038  return 0;
28039}
28040_ACEOF
28041rm -f conftest.$ac_objext
28042if { (eval echo "$as_me:28042: \"$ac_compile\"") >&5
28043  (eval $ac_compile) 2>&5
28044  ac_status=$?
28045  echo "$as_me:28045: \$? = $ac_status" >&5
28046  (exit $ac_status); } &&
28047         { ac_try='test -s conftest.$ac_objext'
28048  { (eval echo "$as_me:28048: \"$ac_try\"") >&5
28049  (eval $ac_try) 2>&5
28050  ac_status=$?
28051  echo "$as_me:28051: \$? = $ac_status" >&5
28052  (exit $ac_status); }; }; then
28053  eval 'cf_cv_func_'${ac_func}'=yes'
28054else
28055  echo "$as_me: failed program was:" >&5
28056cat conftest.$ac_ext >&5
28057eval 'cf_cv_func_'${ac_func}'=no'
28058fi
28059rm -f conftest.$ac_objext conftest.$ac_ext
28060else
28061eval 'cf_cv_func_'${ac_func}'=yes'
28062fi
28063
28064else
28065  echo "$as_me: failed program was:" >&5
28066cat conftest.$ac_ext >&5
28067eval 'cf_cv_func_'${ac_func}'=no'
28068fi
28069rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28070CFLAGS="$cf_save_CFLAGS"
28071
28072fi
28073
28074eval 'cf_result=$cf_cv_func_'${ac_func}
28075echo "$as_me:28075: result: $cf_result" >&5
28076echo "${ECHO_T}$cf_result" >&6
28077test $cf_result = yes && cat >>confdefs.h <<EOF
28078#define DECL_${ac_tr_func} 1
28079EOF
28080
28081done
28082
28083fi
28084
28085CHECK_DECL_HDRS="$TIN_DECL_HDRS
28086#include <tnntp.h>"
28087for ac_func in \
28088	connect \
28089	gethostname \
28090
28091do
28092
28093ac_tr_func=`echo "$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28094
28095echo "$as_me:28095: checking for missing \"${ac_func}\" extern" >&5
28096echo $ECHO_N "checking for missing \"${ac_func}\" extern... $ECHO_C" >&6
28097if eval "test \"\${cf_cv_func_${ac_func}+set}\" = set"; then
28098  echo $ECHO_N "(cached) $ECHO_C" >&6
28099else
28100
28101echo "${as_me:-configure}:28101: testing for missing "${ac_func}" external ..." 1>&5
28102
28103cf_save_CFLAGS="$CFLAGS"
28104CFLAGS="$CFLAGS $CHECK_DECL_FLAG"
28105cat >conftest.$ac_ext <<_ACEOF
28106#line 28106 "configure"
28107#include "confdefs.h"
28108
28109$CHECK_DECL_HDRS
28110
28111#undef ${ac_func}
28112struct zowie { int a; double b; struct zowie *c; char d; };
28113extern struct zowie *${ac_func}();
28114
28115int
28116main (void)
28117{
28118
28119  ;
28120  return 0;
28121}
28122_ACEOF
28123rm -f conftest.$ac_objext conftest$ac_exeext
28124if { (eval echo "$as_me:28124: \"$ac_link\"") >&5
28125  (eval $ac_link) 2>&5
28126  ac_status=$?
28127  echo "$as_me:28127: \$? = $ac_status" >&5
28128  (exit $ac_status); } &&
28129         { ac_try='test -s conftest$ac_exeext'
28130  { (eval echo "$as_me:28130: \"$ac_try\"") >&5
28131  (eval $ac_try) 2>&5
28132  ac_status=$?
28133  echo "$as_me:28133: \$? = $ac_status" >&5
28134  (exit $ac_status); }; }; then
28135  if test -n "$CHECK_DECL_HDRS" ; then
28136# try to work around system headers which are infested with non-standard syntax
28137
28138cf_1_up=`echo "${ac_func}" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28139
28140cat >conftest.$ac_ext <<_ACEOF
28141#line 28141 "configure"
28142#include "confdefs.h"
28143
28144#define DECL_${cf_1_up}
28145$CHECK_DECL_HDRS
28146
28147int
28148main (void)
28149{
28150long x = 0
28151  ;
28152  return 0;
28153}
28154_ACEOF
28155rm -f conftest.$ac_objext
28156if { (eval echo "$as_me:28156: \"$ac_compile\"") >&5
28157  (eval $ac_compile) 2>&5
28158  ac_status=$?
28159  echo "$as_me:28159: \$? = $ac_status" >&5
28160  (exit $ac_status); } &&
28161         { ac_try='test -s conftest.$ac_objext'
28162  { (eval echo "$as_me:28162: \"$ac_try\"") >&5
28163  (eval $ac_try) 2>&5
28164  ac_status=$?
28165  echo "$as_me:28165: \$? = $ac_status" >&5
28166  (exit $ac_status); }; }; then
28167  eval 'cf_cv_func_'${ac_func}'=yes'
28168else
28169  echo "$as_me: failed program was:" >&5
28170cat conftest.$ac_ext >&5
28171eval 'cf_cv_func_'${ac_func}'=no'
28172fi
28173rm -f conftest.$ac_objext conftest.$ac_ext
28174else
28175eval 'cf_cv_func_'${ac_func}'=yes'
28176fi
28177
28178else
28179  echo "$as_me: failed program was:" >&5
28180cat conftest.$ac_ext >&5
28181eval 'cf_cv_func_'${ac_func}'=no'
28182fi
28183rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28184CFLAGS="$cf_save_CFLAGS"
28185
28186fi
28187
28188eval 'cf_result=$cf_cv_func_'${ac_func}
28189echo "$as_me:28189: result: $cf_result" >&5
28190echo "${ECHO_T}$cf_result" >&6
28191test $cf_result = yes && cat >>confdefs.h <<EOF
28192#define DECL_${ac_tr_func} 1
28193EOF
28194
28195done
28196
28197fi
28198
28199echo "$as_me:28199: checking for working TIOCGWINSZ" >&5
28200echo $ECHO_N "checking for working TIOCGWINSZ... $ECHO_C" >&6
28201if test "${cf_cv_use_tiocgwinsz+set}" = set; then
28202  echo $ECHO_N "(cached) $ECHO_C" >&6
28203else
28204
28205	cf_save_CFLAGS="$CFLAGS"
28206	CFLAGS="$CFLAGS -D__CPROTO__ $CHECK_DECL_FLAG"
28207	if test "$cross_compiling" = yes; then
28208  cf_cv_use_tiocgwinsz=unknown
28209else
28210  cat >conftest.$ac_ext <<_ACEOF
28211#line 28211 "configure"
28212#include "confdefs.h"
28213
28214$CHECK_DECL_HDRS
28215int main()
28216{
28217	int fd;
28218	for (fd = 0; fd <= 2; fd++) {	/* try in/out/err in case redirected */
28219#ifdef TIOCGSIZE
28220		struct ttysize size;
28221		if (ioctl (0, TIOCGSIZE, &size) == 0
28222		 && size.ts_lines > 0
28223		 && size.ts_cols > 0)
28224			${cf_cv_main_return:-return}(0);
28225#else
28226		struct winsize size;
28227		if (ioctl(0, TIOCGWINSZ, &size) == 0
28228		 && size.ws_row > 0
28229		 && size.ws_col > 0)
28230			${cf_cv_main_return:-return}(0);
28231#endif
28232	}
28233	${cf_cv_main_return:-return}(0);	/* we cannot guarantee this is run interactively */
28234}
28235_ACEOF
28236rm -f conftest$ac_exeext
28237if { (eval echo "$as_me:28237: \"$ac_link\"") >&5
28238  (eval $ac_link) 2>&5
28239  ac_status=$?
28240  echo "$as_me:28240: \$? = $ac_status" >&5
28241  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28242  { (eval echo "$as_me:28242: \"$ac_try\"") >&5
28243  (eval $ac_try) 2>&5
28244  ac_status=$?
28245  echo "$as_me:28245: \$? = $ac_status" >&5
28246  (exit $ac_status); }; }; then
28247  cf_cv_use_tiocgwinsz=yes
28248else
28249  echo "$as_me: program exited with status $ac_status" >&5
28250echo "$as_me: failed program was:" >&5
28251cat conftest.$ac_ext >&5
28252cf_cv_use_tiocgwinsz=no
28253fi
28254rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28255fi
28256		rm -f autoconf.h
28257		CFLAGS="$cf_save_CFLAGS"
28258fi
28259
28260echo "$as_me:28260: result: $cf_cv_use_tiocgwinsz" >&5
28261echo "${ECHO_T}$cf_cv_use_tiocgwinsz" >&6
28262test $cf_cv_use_tiocgwinsz != yes &&
28263cat >>confdefs.h <<\EOF
28264#define DONT_HAVE_SIGWINCH 1
28265EOF
28266
28267### append special libraries that get in the way of testing
28268case $debug_malloc in
28269DBMALLOC)
28270	cat >>confdefs.h <<\EOF
28271#define USE_DBMALLOC 1
28272EOF
28273
28274	LIBS="$LIBS -ldbmalloc"
28275	;;
28276DMALLOC)
28277	cat >>confdefs.h <<\EOF
28278#define USE_DMALLOC 1
28279EOF
28280
28281	LIBS="$LIBS -ldmalloc"
28282	;;
28283esac
28284
28285### Use gettext
28286### this also calls AM_LANGINFO_CODESET and AM_ICONV
28287### so we don't need to do the tests ourselves.
28288if test -n "$ac_tool_prefix"; then
28289  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
28290set dummy ${ac_tool_prefix}ranlib; ac_word=$2
28291echo "$as_me:28291: checking for $ac_word" >&5
28292echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
28293if test "${ac_cv_prog_RANLIB+set}" = set; then
28294  echo $ECHO_N "(cached) $ECHO_C" >&6
28295else
28296  if test -n "$RANLIB"; then
28297  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
28298else
28299  ac_save_IFS=$IFS; IFS=$ac_path_separator
28300ac_dummy="$PATH"
28301for ac_dir in $ac_dummy; do
28302  IFS=$ac_save_IFS
28303  test -z "$ac_dir" && ac_dir=.
28304  $as_executable_p "$ac_dir/$ac_word" || continue
28305ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
28306echo "$as_me:28306: found $ac_dir/$ac_word" >&5
28307break
28308done
28309
28310fi
28311fi
28312RANLIB=$ac_cv_prog_RANLIB
28313if test -n "$RANLIB"; then
28314  echo "$as_me:28314: result: $RANLIB" >&5
28315echo "${ECHO_T}$RANLIB" >&6
28316else
28317  echo "$as_me:28317: result: no" >&5
28318echo "${ECHO_T}no" >&6
28319fi
28320
28321fi
28322if test -z "$ac_cv_prog_RANLIB"; then
28323  ac_ct_RANLIB=$RANLIB
28324  # Extract the first word of "ranlib", so it can be a program name with args.
28325set dummy ranlib; ac_word=$2
28326echo "$as_me:28326: checking for $ac_word" >&5
28327echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
28328if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
28329  echo $ECHO_N "(cached) $ECHO_C" >&6
28330else
28331  if test -n "$ac_ct_RANLIB"; then
28332  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
28333else
28334  ac_save_IFS=$IFS; IFS=$ac_path_separator
28335ac_dummy="$PATH"
28336for ac_dir in $ac_dummy; do
28337  IFS=$ac_save_IFS
28338  test -z "$ac_dir" && ac_dir=.
28339  $as_executable_p "$ac_dir/$ac_word" || continue
28340ac_cv_prog_ac_ct_RANLIB="ranlib"
28341echo "$as_me:28341: found $ac_dir/$ac_word" >&5
28342break
28343done
28344
28345  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
28346fi
28347fi
28348ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
28349if test -n "$ac_ct_RANLIB"; then
28350  echo "$as_me:28350: result: $ac_ct_RANLIB" >&5
28351echo "${ECHO_T}$ac_ct_RANLIB" >&6
28352else
28353  echo "$as_me:28353: result: no" >&5
28354echo "${ECHO_T}no" >&6
28355fi
28356
28357  RANLIB=$ac_ct_RANLIB
28358else
28359  RANLIB="$ac_cv_prog_RANLIB"
28360fi
28361
28362# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
28363# for constant arguments.  Useless!
28364echo "$as_me:28364: checking for working alloca.h" >&5
28365echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
28366if test "${ac_cv_working_alloca_h+set}" = set; then
28367  echo $ECHO_N "(cached) $ECHO_C" >&6
28368else
28369  cat >conftest.$ac_ext <<_ACEOF
28370#line 28370 "configure"
28371#include "confdefs.h"
28372#include <alloca.h>
28373int
28374main (void)
28375{
28376char *p = (char *) alloca (2 * sizeof (int));
28377  ;
28378  return 0;
28379}
28380_ACEOF
28381rm -f conftest.$ac_objext conftest$ac_exeext
28382if { (eval echo "$as_me:28382: \"$ac_link\"") >&5
28383  (eval $ac_link) 2>&5
28384  ac_status=$?
28385  echo "$as_me:28385: \$? = $ac_status" >&5
28386  (exit $ac_status); } &&
28387         { ac_try='test -s conftest$ac_exeext'
28388  { (eval echo "$as_me:28388: \"$ac_try\"") >&5
28389  (eval $ac_try) 2>&5
28390  ac_status=$?
28391  echo "$as_me:28391: \$? = $ac_status" >&5
28392  (exit $ac_status); }; }; then
28393  ac_cv_working_alloca_h=yes
28394else
28395  echo "$as_me: failed program was:" >&5
28396cat conftest.$ac_ext >&5
28397ac_cv_working_alloca_h=no
28398fi
28399rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28400fi
28401echo "$as_me:28401: result: $ac_cv_working_alloca_h" >&5
28402echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
28403if test $ac_cv_working_alloca_h = yes; then
28404
28405cat >>confdefs.h <<\EOF
28406#define HAVE_ALLOCA_H 1
28407EOF
28408
28409fi
28410
28411echo "$as_me:28411: checking for alloca" >&5
28412echo $ECHO_N "checking for alloca... $ECHO_C" >&6
28413if test "${ac_cv_func_alloca_works+set}" = set; then
28414  echo $ECHO_N "(cached) $ECHO_C" >&6
28415else
28416  cat >conftest.$ac_ext <<_ACEOF
28417#line 28417 "configure"
28418#include "confdefs.h"
28419#ifdef __GNUC__
28420# define alloca __builtin_alloca
28421#else
28422# ifdef _MSC_VER
28423#  include <malloc.h>
28424#  define alloca _alloca
28425# else
28426#  if HAVE_ALLOCA_H
28427#   include <alloca.h>
28428#  else
28429#   ifdef _AIX
28430 #pragma alloca
28431#   else
28432#    ifndef alloca /* predefined by HP cc +Olibcalls */
28433char *alloca ();
28434#    endif
28435#   endif
28436#  endif
28437# endif
28438#endif
28439
28440int
28441main (void)
28442{
28443char *p = (char *) alloca (1);
28444  ;
28445  return 0;
28446}
28447_ACEOF
28448rm -f conftest.$ac_objext conftest$ac_exeext
28449if { (eval echo "$as_me:28449: \"$ac_link\"") >&5
28450  (eval $ac_link) 2>&5
28451  ac_status=$?
28452  echo "$as_me:28452: \$? = $ac_status" >&5
28453  (exit $ac_status); } &&
28454         { ac_try='test -s conftest$ac_exeext'
28455  { (eval echo "$as_me:28455: \"$ac_try\"") >&5
28456  (eval $ac_try) 2>&5
28457  ac_status=$?
28458  echo "$as_me:28458: \$? = $ac_status" >&5
28459  (exit $ac_status); }; }; then
28460  ac_cv_func_alloca_works=yes
28461else
28462  echo "$as_me: failed program was:" >&5
28463cat conftest.$ac_ext >&5
28464ac_cv_func_alloca_works=no
28465fi
28466rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28467fi
28468echo "$as_me:28468: result: $ac_cv_func_alloca_works" >&5
28469echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
28470
28471if test $ac_cv_func_alloca_works = yes; then
28472
28473cat >>confdefs.h <<\EOF
28474#define HAVE_ALLOCA 1
28475EOF
28476
28477else
28478  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
28479# that cause trouble.  Some versions do not even contain alloca or
28480# contain a buggy version.  If you still want to use their alloca,
28481# use ar to extract alloca.o from them instead of compiling alloca.c.
28482
28483ALLOCA=alloca.$ac_objext
28484
28485cat >>confdefs.h <<\EOF
28486#define C_ALLOCA 1
28487EOF
28488
28489echo "$as_me:28489: checking whether \`alloca.c' needs Cray hooks" >&5
28490echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
28491if test "${ac_cv_os_cray+set}" = set; then
28492  echo $ECHO_N "(cached) $ECHO_C" >&6
28493else
28494  cat >conftest.$ac_ext <<_ACEOF
28495#line 28495 "configure"
28496#include "confdefs.h"
28497#if defined(CRAY) && ! defined(CRAY2)
28498webecray
28499#else
28500wenotbecray
28501#endif
28502
28503_ACEOF
28504if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28505  egrep "webecray" >/dev/null 2>&1; then
28506  ac_cv_os_cray=yes
28507else
28508  ac_cv_os_cray=no
28509fi
28510rm -rf conftest*
28511
28512fi
28513echo "$as_me:28513: result: $ac_cv_os_cray" >&5
28514echo "${ECHO_T}$ac_cv_os_cray" >&6
28515if test $ac_cv_os_cray = yes; then
28516  for ac_func in _getb67 GETB67 getb67; do
28517    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
28518echo "$as_me:28518: checking for $ac_func" >&5
28519echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
28520if eval "test \"\${$as_ac_var+set}\" = set"; then
28521  echo $ECHO_N "(cached) $ECHO_C" >&6
28522else
28523  cat >conftest.$ac_ext <<_ACEOF
28524#line 28524 "configure"
28525#include "confdefs.h"
28526#define $ac_func autoconf_temporary
28527#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
28528#undef $ac_func
28529
28530#ifdef __cplusplus
28531extern "C"
28532#endif
28533
28534/* We use char because int might match the return type of a gcc2
28535   builtin and then its argument prototype would still apply.  */
28536char $ac_func (void);
28537
28538int
28539main (void)
28540{
28541
28542/* The GNU C library defines stubs for functions which it implements
28543    to always fail with ENOSYS.  Some functions are actually named
28544    something starting with __ and the normal name is an alias.  */
28545#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
28546#error found stub for $ac_func
28547#endif
28548
28549	return $ac_func ();
28550  ;
28551  return 0;
28552}
28553_ACEOF
28554rm -f conftest.$ac_objext conftest$ac_exeext
28555if { (eval echo "$as_me:28555: \"$ac_link\"") >&5
28556  (eval $ac_link) 2>&5
28557  ac_status=$?
28558  echo "$as_me:28558: \$? = $ac_status" >&5
28559  (exit $ac_status); } &&
28560         { ac_try='test -s conftest$ac_exeext'
28561  { (eval echo "$as_me:28561: \"$ac_try\"") >&5
28562  (eval $ac_try) 2>&5
28563  ac_status=$?
28564  echo "$as_me:28564: \$? = $ac_status" >&5
28565  (exit $ac_status); }; }; then
28566  eval "$as_ac_var=yes"
28567else
28568  echo "$as_me: failed program was:" >&5
28569cat conftest.$ac_ext >&5
28570eval "$as_ac_var=no"
28571fi
28572rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28573fi
28574echo "$as_me:28574: result: `eval echo '${'$as_ac_var'}'`" >&5
28575echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
28576if test `eval echo '${'$as_ac_var'}'` = yes; then
28577
28578cat >>confdefs.h <<EOF
28579#define CRAY_STACKSEG_END $ac_func
28580EOF
28581
28582    break
28583fi
28584
28585  done
28586fi
28587
28588echo "$as_me:28588: checking stack direction for C alloca" >&5
28589echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
28590if test "${ac_cv_c_stack_direction+set}" = set; then
28591  echo $ECHO_N "(cached) $ECHO_C" >&6
28592else
28593  if test "$cross_compiling" = yes; then
28594  ac_cv_c_stack_direction=0
28595else
28596  cat >conftest.$ac_ext <<_ACEOF
28597#line 28597 "configure"
28598#include "confdefs.h"
28599int
28600find_stack_direction (void)
28601{
28602  static char *addr = 0;
28603  auto char dummy;
28604  if (addr == 0)
28605    {
28606      addr = &dummy;
28607      return find_stack_direction ();
28608    }
28609  else
28610    return (&dummy > addr) ? 1 : -1;
28611}
28612
28613int
28614main (void)
28615{
28616  $ac_main_return (find_stack_direction () < 0);
28617}
28618_ACEOF
28619rm -f conftest$ac_exeext
28620if { (eval echo "$as_me:28620: \"$ac_link\"") >&5
28621  (eval $ac_link) 2>&5
28622  ac_status=$?
28623  echo "$as_me:28623: \$? = $ac_status" >&5
28624  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28625  { (eval echo "$as_me:28625: \"$ac_try\"") >&5
28626  (eval $ac_try) 2>&5
28627  ac_status=$?
28628  echo "$as_me:28628: \$? = $ac_status" >&5
28629  (exit $ac_status); }; }; then
28630  ac_cv_c_stack_direction=1
28631else
28632  echo "$as_me: program exited with status $ac_status" >&5
28633echo "$as_me: failed program was:" >&5
28634cat conftest.$ac_ext >&5
28635ac_cv_c_stack_direction=-1
28636fi
28637rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28638fi
28639fi
28640echo "$as_me:28640: result: $ac_cv_c_stack_direction" >&5
28641echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
28642
28643cat >>confdefs.h <<EOF
28644#define STACK_DIRECTION $ac_cv_c_stack_direction
28645EOF
28646
28647fi
28648
28649for ac_header in stdlib.h unistd.h
28650do
28651as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28652echo "$as_me:28652: checking for $ac_header" >&5
28653echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28654if eval "test \"\${$as_ac_Header+set}\" = set"; then
28655  echo $ECHO_N "(cached) $ECHO_C" >&6
28656else
28657  cat >conftest.$ac_ext <<_ACEOF
28658#line 28658 "configure"
28659#include "confdefs.h"
28660#include <$ac_header>
28661_ACEOF
28662if { (eval echo "$as_me:28662: \"$ac_cpp conftest.$ac_ext\"") >&5
28663  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
28664  ac_status=$?
28665  egrep -v '^ *\+' conftest.er1 >conftest.err
28666  rm -f conftest.er1
28667  cat conftest.err >&5
28668  echo "$as_me:28668: \$? = $ac_status" >&5
28669  (exit $ac_status); } >/dev/null; then
28670  if test -s conftest.err; then
28671    ac_cpp_err=$ac_c_preproc_warn_flag
28672  else
28673    ac_cpp_err=
28674  fi
28675else
28676  ac_cpp_err=yes
28677fi
28678if test -z "$ac_cpp_err"; then
28679  eval "$as_ac_Header=yes"
28680else
28681  echo "$as_me: failed program was:" >&5
28682  cat conftest.$ac_ext >&5
28683  eval "$as_ac_Header=no"
28684fi
28685rm -f conftest.err conftest.$ac_ext
28686fi
28687echo "$as_me:28687: result: `eval echo '${'$as_ac_Header'}'`" >&5
28688echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
28689if test `eval echo '${'$as_ac_Header'}'` = yes; then
28690  cat >>confdefs.h <<EOF
28691#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
28692EOF
28693
28694fi
28695done
28696
28697for ac_func in getpagesize
28698do
28699as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
28700echo "$as_me:28700: checking for $ac_func" >&5
28701echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
28702if eval "test \"\${$as_ac_var+set}\" = set"; then
28703  echo $ECHO_N "(cached) $ECHO_C" >&6
28704else
28705  cat >conftest.$ac_ext <<_ACEOF
28706#line 28706 "configure"
28707#include "confdefs.h"
28708#define $ac_func autoconf_temporary
28709#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
28710#undef $ac_func
28711
28712#ifdef __cplusplus
28713extern "C"
28714#endif
28715
28716/* We use char because int might match the return type of a gcc2
28717   builtin and then its argument prototype would still apply.  */
28718char $ac_func (void);
28719
28720int
28721main (void)
28722{
28723
28724/* The GNU C library defines stubs for functions which it implements
28725    to always fail with ENOSYS.  Some functions are actually named
28726    something starting with __ and the normal name is an alias.  */
28727#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
28728#error found stub for $ac_func
28729#endif
28730
28731	return $ac_func ();
28732  ;
28733  return 0;
28734}
28735_ACEOF
28736rm -f conftest.$ac_objext conftest$ac_exeext
28737if { (eval echo "$as_me:28737: \"$ac_link\"") >&5
28738  (eval $ac_link) 2>&5
28739  ac_status=$?
28740  echo "$as_me:28740: \$? = $ac_status" >&5
28741  (exit $ac_status); } &&
28742         { ac_try='test -s conftest$ac_exeext'
28743  { (eval echo "$as_me:28743: \"$ac_try\"") >&5
28744  (eval $ac_try) 2>&5
28745  ac_status=$?
28746  echo "$as_me:28746: \$? = $ac_status" >&5
28747  (exit $ac_status); }; }; then
28748  eval "$as_ac_var=yes"
28749else
28750  echo "$as_me: failed program was:" >&5
28751cat conftest.$ac_ext >&5
28752eval "$as_ac_var=no"
28753fi
28754rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
28755fi
28756echo "$as_me:28756: result: `eval echo '${'$as_ac_var'}'`" >&5
28757echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
28758if test `eval echo '${'$as_ac_var'}'` = yes; then
28759  cat >>confdefs.h <<EOF
28760#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
28761EOF
28762
28763fi
28764done
28765
28766echo "$as_me:28766: checking for working mmap" >&5
28767echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
28768if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
28769  echo $ECHO_N "(cached) $ECHO_C" >&6
28770else
28771  if test "$cross_compiling" = yes; then
28772  ac_cv_func_mmap_fixed_mapped=no
28773else
28774  cat >conftest.$ac_ext <<_ACEOF
28775#line 28775 "configure"
28776#include "confdefs.h"
28777$ac_includes_default
28778/* Thanks to Mike Haertel and Jim Avera for this test.
28779   Here is a matrix of mmap possibilities:
28780	mmap private not fixed
28781	mmap private fixed at somewhere currently unmapped
28782	mmap private fixed at somewhere already mapped
28783	mmap shared not fixed
28784	mmap shared fixed at somewhere currently unmapped
28785	mmap shared fixed at somewhere already mapped
28786   For private mappings, we should verify that changes cannot be read()
28787   back from the file, nor mmap's back from the file at a different
28788   address.  (There have been systems where private was not correctly
28789   implemented like the infamous i386 svr4.0, and systems where the
28790   VM page cache was not coherent with the file system buffer cache
28791   like early versions of FreeBSD and possibly contemporary NetBSD.)
28792   For shared mappings, we should conversely verify that changes get
28793   propagated back to all the places they're supposed to be.
28794
28795   Grep wants private fixed already mapped.
28796   The main things grep needs to know about mmap are:
28797   * does it exist and is it safe to write into the mmap'd area
28798   * how to use it (BSD variants)  */
28799
28800#include <fcntl.h>
28801#include <sys/mman.h>
28802
28803#if !STDC_HEADERS && !HAVE_STDLIB_H
28804char *malloc ();
28805#endif
28806
28807/* This mess was copied from the GNU getpagesize.h.  */
28808#if !HAVE_GETPAGESIZE
28809/* Assume that all systems that can run configure have sys/param.h.  */
28810# if !HAVE_SYS_PARAM_H
28811#  define HAVE_SYS_PARAM_H 1
28812# endif
28813
28814# ifdef _SC_PAGESIZE
28815#  define getpagesize() sysconf(_SC_PAGESIZE)
28816# else /* no _SC_PAGESIZE */
28817#  if HAVE_SYS_PARAM_H
28818#   include <sys/param.h>
28819#   ifdef EXEC_PAGESIZE
28820#    define getpagesize() EXEC_PAGESIZE
28821#   else /* no EXEC_PAGESIZE */
28822#    ifdef NBPG
28823#     define getpagesize() NBPG * CLSIZE
28824#     ifndef CLSIZE
28825#      define CLSIZE 1
28826#     endif /* no CLSIZE */
28827#    else /* no NBPG */
28828#     ifdef NBPC
28829#      define getpagesize() NBPC
28830#     else /* no NBPC */
28831#      ifdef PAGESIZE
28832#       define getpagesize() PAGESIZE
28833#      endif /* PAGESIZE */
28834#     endif /* no NBPC */
28835#    endif /* no NBPG */
28836#   endif /* no EXEC_PAGESIZE */
28837#  else /* no HAVE_SYS_PARAM_H */
28838#   define getpagesize() 8192	/* punt totally */
28839#  endif /* no HAVE_SYS_PARAM_H */
28840# endif /* no _SC_PAGESIZE */
28841
28842#endif /* no HAVE_GETPAGESIZE */
28843
28844int
28845main (void)
28846{
28847  char *data, *data2, *data3;
28848  int i, pagesize;
28849  int fd;
28850
28851  pagesize = getpagesize ();
28852
28853  /* First, make a file with some known garbage in it. */
28854  data = (char *) malloc (pagesize);
28855  if (!data)
28856    $ac_main_return (1);
28857  for (i = 0; i < pagesize; ++i)
28858    *(data + i) = rand ();
28859  umask (0);
28860  fd = creat ("conftest.mmap", 0600);
28861  if (fd < 0)
28862    $ac_main_return (1);
28863  if (write (fd, data, pagesize) != pagesize)
28864    $ac_main_return (1);
28865  close (fd);
28866
28867  /* Next, try to mmap the file at a fixed address which already has
28868     something else allocated at it.  If we can, also make sure that
28869     we see the same garbage.  */
28870  fd = open ("conftest.mmap", O_RDWR);
28871  if (fd < 0)
28872    $ac_main_return (1);
28873  data2 = (char *) malloc (2 * pagesize);
28874  if (!data2)
28875    $ac_main_return (1);
28876  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
28877  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
28878                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
28879    $ac_main_return (1);
28880  for (i = 0; i < pagesize; ++i)
28881    if (*(data + i) != *(data2 + i))
28882      $ac_main_return (1);
28883
28884  /* Finally, make sure that changes to the mapped area do not
28885     percolate back to the file as seen by read().  (This is a bug on
28886     some variants of i386 svr4.0.)  */
28887  for (i = 0; i < pagesize; ++i)
28888    *(data2 + i) = *(data2 + i) + 1;
28889  data3 = (char *) malloc (pagesize);
28890  if (!data3)
28891    $ac_main_return (1);
28892  if (read (fd, data3, pagesize) != pagesize)
28893    $ac_main_return (1);
28894  for (i = 0; i < pagesize; ++i)
28895    if (*(data + i) != *(data3 + i))
28896      $ac_main_return (1);
28897  close (fd);
28898  $ac_main_return (0);
28899}
28900_ACEOF
28901rm -f conftest$ac_exeext
28902if { (eval echo "$as_me:28902: \"$ac_link\"") >&5
28903  (eval $ac_link) 2>&5
28904  ac_status=$?
28905  echo "$as_me:28905: \$? = $ac_status" >&5
28906  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
28907  { (eval echo "$as_me:28907: \"$ac_try\"") >&5
28908  (eval $ac_try) 2>&5
28909  ac_status=$?
28910  echo "$as_me:28910: \$? = $ac_status" >&5
28911  (exit $ac_status); }; }; then
28912  ac_cv_func_mmap_fixed_mapped=yes
28913else
28914  echo "$as_me: program exited with status $ac_status" >&5
28915echo "$as_me: failed program was:" >&5
28916cat conftest.$ac_ext >&5
28917ac_cv_func_mmap_fixed_mapped=no
28918fi
28919rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
28920fi
28921fi
28922echo "$as_me:28922: result: $ac_cv_func_mmap_fixed_mapped" >&5
28923echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
28924if test $ac_cv_func_mmap_fixed_mapped = yes; then
28925
28926cat >>confdefs.h <<\EOF
28927#define HAVE_MMAP 1
28928EOF
28929
28930fi
28931rm -f conftest.mmap
28932
28933echo "$as_me:28933: checking whether we are using the GNU C Library 2.1 or newer" >&5
28934echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
28935if test "${ac_cv_gnu_library_2_1+set}" = set; then
28936  echo $ECHO_N "(cached) $ECHO_C" >&6
28937else
28938  cat >conftest.$ac_ext <<_ACEOF
28939#line 28939 "configure"
28940#include "confdefs.h"
28941
28942#include <features.h>
28943#ifdef __GNU_LIBRARY__
28944 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
28945  Lucky GNU user
28946 #endif
28947#endif
28948
28949_ACEOF
28950if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
28951  egrep "Lucky GNU user" >/dev/null 2>&1; then
28952  ac_cv_gnu_library_2_1=yes
28953else
28954  ac_cv_gnu_library_2_1=no
28955fi
28956rm -rf conftest*
28957
28958fi
28959echo "$as_me:28959: result: $ac_cv_gnu_library_2_1" >&5
28960echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
28961
28962	GLIBC21="$ac_cv_gnu_library_2_1"
28963
28964cf_makefile=Makefile
28965
28966test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d $srcdir/po && cd $srcdir/po && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
28967
28968# Allow override of "config.h" definition:
28969: ${CONFIG_H:=config.h}
28970
28971if test -z "$PACKAGE" ; then
28972	{ { echo "$as_me:28972: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
28973echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
28974   { (exit 1); exit 1; }; }
28975fi
28976
28977if test -z "$VERSION" ; then
28978if test -f $srcdir/VERSION ; then
28979	VERSION=`sed -e '2,$d' $srcdir/VERSION|cut -f1`
28980else
28981	VERSION=unknown
28982fi
28983fi
28984
28985for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
28986stdlib.h string.h unistd.h sys/param.h
28987do
28988as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
28989echo "$as_me:28989: checking for $ac_header" >&5
28990echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
28991if eval "test \"\${$as_ac_Header+set}\" = set"; then
28992  echo $ECHO_N "(cached) $ECHO_C" >&6
28993else
28994  cat >conftest.$ac_ext <<_ACEOF
28995#line 28995 "configure"
28996#include "confdefs.h"
28997#include <$ac_header>
28998_ACEOF
28999if { (eval echo "$as_me:28999: \"$ac_cpp conftest.$ac_ext\"") >&5
29000  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
29001  ac_status=$?
29002  egrep -v '^ *\+' conftest.er1 >conftest.err
29003  rm -f conftest.er1
29004  cat conftest.err >&5
29005  echo "$as_me:29005: \$? = $ac_status" >&5
29006  (exit $ac_status); } >/dev/null; then
29007  if test -s conftest.err; then
29008    ac_cpp_err=$ac_c_preproc_warn_flag
29009  else
29010    ac_cpp_err=
29011  fi
29012else
29013  ac_cpp_err=yes
29014fi
29015if test -z "$ac_cpp_err"; then
29016  eval "$as_ac_Header=yes"
29017else
29018  echo "$as_me: failed program was:" >&5
29019  cat conftest.$ac_ext >&5
29020  eval "$as_ac_Header=no"
29021fi
29022rm -f conftest.err conftest.$ac_ext
29023fi
29024echo "$as_me:29024: result: `eval echo '${'$as_ac_Header'}'`" >&5
29025echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
29026if test `eval echo '${'$as_ac_Header'}'` = yes; then
29027  cat >>confdefs.h <<EOF
29028#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
29029EOF
29030
29031fi
29032done
29033
29034for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
29035getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
29036strdup strtoul tsearch __argz_count __argz_stringify __argz_next
29037do
29038as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
29039echo "$as_me:29039: checking for $ac_func" >&5
29040echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
29041if eval "test \"\${$as_ac_var+set}\" = set"; then
29042  echo $ECHO_N "(cached) $ECHO_C" >&6
29043else
29044  cat >conftest.$ac_ext <<_ACEOF
29045#line 29045 "configure"
29046#include "confdefs.h"
29047#define $ac_func autoconf_temporary
29048#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
29049#undef $ac_func
29050
29051#ifdef __cplusplus
29052extern "C"
29053#endif
29054
29055/* We use char because int might match the return type of a gcc2
29056   builtin and then its argument prototype would still apply.  */
29057char $ac_func (void);
29058
29059int
29060main (void)
29061{
29062
29063/* The GNU C library defines stubs for functions which it implements
29064    to always fail with ENOSYS.  Some functions are actually named
29065    something starting with __ and the normal name is an alias.  */
29066#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
29067#error found stub for $ac_func
29068#endif
29069
29070	return $ac_func ();
29071  ;
29072  return 0;
29073}
29074_ACEOF
29075rm -f conftest.$ac_objext conftest$ac_exeext
29076if { (eval echo "$as_me:29076: \"$ac_link\"") >&5
29077  (eval $ac_link) 2>&5
29078  ac_status=$?
29079  echo "$as_me:29079: \$? = $ac_status" >&5
29080  (exit $ac_status); } &&
29081         { ac_try='test -s conftest$ac_exeext'
29082  { (eval echo "$as_me:29082: \"$ac_try\"") >&5
29083  (eval $ac_try) 2>&5
29084  ac_status=$?
29085  echo "$as_me:29085: \$? = $ac_status" >&5
29086  (exit $ac_status); }; }; then
29087  eval "$as_ac_var=yes"
29088else
29089  echo "$as_me: failed program was:" >&5
29090cat conftest.$ac_ext >&5
29091eval "$as_ac_var=no"
29092fi
29093rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29094fi
29095echo "$as_me:29095: result: `eval echo '${'$as_ac_var'}'`" >&5
29096echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
29097if test `eval echo '${'$as_ac_var'}'` = yes; then
29098  cat >>confdefs.h <<EOF
29099#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
29100EOF
29101
29102fi
29103done
29104
29105# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
29106if test "${with_libiconv_prefix+set}" = set; then
29107  withval="$with_libiconv_prefix"
29108
29109case "$withval" in
29110no)
29111	;;
29112yes)
29113	;;
29114*)
29115
29116for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
29117	if test -d $cf_searchpath/include; then
29118
29119if test -n "$cf_searchpath/include" ; then
29120  for cf_add_incdir in $cf_searchpath/include
29121  do
29122	while test $cf_add_incdir != /usr/include
29123	do
29124	  if test -d $cf_add_incdir
29125	  then
29126		cf_have_incdir=no
29127		if test -n "$CFLAGS$CPPFLAGS" ; then
29128		  # a loop is needed to ensure we can add subdirs of existing dirs
29129		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
29130			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
29131			  cf_have_incdir=yes; break
29132			fi
29133		  done
29134		fi
29135
29136		if test "$cf_have_incdir" = no ; then
29137		  if test "$cf_add_incdir" = /usr/local/include ; then
29138			if test "$GCC" = yes
29139			then
29140			  cf_save_CPPFLAGS=$CPPFLAGS
29141
29142	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
29143	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
29144
29145			  cat >conftest.$ac_ext <<_ACEOF
29146#line 29146 "configure"
29147#include "confdefs.h"
29148#include <stdio.h>
29149int
29150main (void)
29151{
29152printf("Hello")
29153  ;
29154  return 0;
29155}
29156_ACEOF
29157rm -f conftest.$ac_objext
29158if { (eval echo "$as_me:29158: \"$ac_compile\"") >&5
29159  (eval $ac_compile) 2>&5
29160  ac_status=$?
29161  echo "$as_me:29161: \$? = $ac_status" >&5
29162  (exit $ac_status); } &&
29163         { ac_try='test -s conftest.$ac_objext'
29164  { (eval echo "$as_me:29164: \"$ac_try\"") >&5
29165  (eval $ac_try) 2>&5
29166  ac_status=$?
29167  echo "$as_me:29167: \$? = $ac_status" >&5
29168  (exit $ac_status); }; }; then
29169  :
29170else
29171  echo "$as_me: failed program was:" >&5
29172cat conftest.$ac_ext >&5
29173cf_have_incdir=yes
29174fi
29175rm -f conftest.$ac_objext conftest.$ac_ext
29176			  CPPFLAGS=$cf_save_CPPFLAGS
29177			fi
29178		  fi
29179		fi
29180
29181		if test "$cf_have_incdir" = no ; then
29182		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
29183
29184echo "${as_me:-configure}:29184: testing adding $cf_add_incdir to include-path ..." 1>&5
29185
29186		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
29187
29188		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
29189		  test "$cf_top_incdir" = "$cf_add_incdir" && break
29190		  cf_add_incdir="$cf_top_incdir"
29191		else
29192		  break
29193		fi
29194	  else
29195		break
29196	  fi
29197	done
29198  done
29199fi
29200
29201	elif test -d $cf_searchpath/../include ; then
29202
29203if test -n "$cf_searchpath/../include" ; then
29204  for cf_add_incdir in $cf_searchpath/../include
29205  do
29206	while test $cf_add_incdir != /usr/include
29207	do
29208	  if test -d $cf_add_incdir
29209	  then
29210		cf_have_incdir=no
29211		if test -n "$CFLAGS$CPPFLAGS" ; then
29212		  # a loop is needed to ensure we can add subdirs of existing dirs
29213		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
29214			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
29215			  cf_have_incdir=yes; break
29216			fi
29217		  done
29218		fi
29219
29220		if test "$cf_have_incdir" = no ; then
29221		  if test "$cf_add_incdir" = /usr/local/include ; then
29222			if test "$GCC" = yes
29223			then
29224			  cf_save_CPPFLAGS=$CPPFLAGS
29225
29226	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
29227	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
29228
29229			  cat >conftest.$ac_ext <<_ACEOF
29230#line 29230 "configure"
29231#include "confdefs.h"
29232#include <stdio.h>
29233int
29234main (void)
29235{
29236printf("Hello")
29237  ;
29238  return 0;
29239}
29240_ACEOF
29241rm -f conftest.$ac_objext
29242if { (eval echo "$as_me:29242: \"$ac_compile\"") >&5
29243  (eval $ac_compile) 2>&5
29244  ac_status=$?
29245  echo "$as_me:29245: \$? = $ac_status" >&5
29246  (exit $ac_status); } &&
29247         { ac_try='test -s conftest.$ac_objext'
29248  { (eval echo "$as_me:29248: \"$ac_try\"") >&5
29249  (eval $ac_try) 2>&5
29250  ac_status=$?
29251  echo "$as_me:29251: \$? = $ac_status" >&5
29252  (exit $ac_status); }; }; then
29253  :
29254else
29255  echo "$as_me: failed program was:" >&5
29256cat conftest.$ac_ext >&5
29257cf_have_incdir=yes
29258fi
29259rm -f conftest.$ac_objext conftest.$ac_ext
29260			  CPPFLAGS=$cf_save_CPPFLAGS
29261			fi
29262		  fi
29263		fi
29264
29265		if test "$cf_have_incdir" = no ; then
29266		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
29267
29268echo "${as_me:-configure}:29268: testing adding $cf_add_incdir to include-path ..." 1>&5
29269
29270		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
29271
29272		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
29273		  test "$cf_top_incdir" = "$cf_add_incdir" && break
29274		  cf_add_incdir="$cf_top_incdir"
29275		else
29276		  break
29277		fi
29278	  else
29279		break
29280	  fi
29281	done
29282  done
29283fi
29284
29285	else
29286{ { echo "$as_me:29286: error: cannot find libiconv under $withval" >&5
29287echo "$as_me: error: cannot find libiconv under $withval" >&2;}
29288   { (exit 1); exit 1; }; }
29289	fi
29290	if test -d $cf_searchpath/lib; then
29291
29292if test -n "$cf_searchpath/lib" ; then
29293	for cf_add_libdir in $cf_searchpath/lib
29294	do
29295		if test $cf_add_libdir = /usr/lib ; then
29296			:
29297		elif test -d $cf_add_libdir
29298		then
29299			cf_have_libdir=no
29300			if test -n "$LDFLAGS$LIBS" ; then
29301				# a loop is needed to ensure we can add subdirs of existing dirs
29302				for cf_test_libdir in $LDFLAGS $LIBS ; do
29303					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
29304						cf_have_libdir=yes; break
29305					fi
29306				done
29307			fi
29308			if test "$cf_have_libdir" = no ; then
29309				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
29310
29311echo "${as_me:-configure}:29311: testing adding $cf_add_libdir to library-path ..." 1>&5
29312
29313				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
29314			fi
29315		fi
29316	done
29317fi
29318
29319	elif test -d $cf_searchpath ; then
29320
29321if test -n "$cf_searchpath" ; then
29322	for cf_add_libdir in $cf_searchpath
29323	do
29324		if test $cf_add_libdir = /usr/lib ; then
29325			:
29326		elif test -d $cf_add_libdir
29327		then
29328			cf_have_libdir=no
29329			if test -n "$LDFLAGS$LIBS" ; then
29330				# a loop is needed to ensure we can add subdirs of existing dirs
29331				for cf_test_libdir in $LDFLAGS $LIBS ; do
29332					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
29333						cf_have_libdir=yes; break
29334					fi
29335				done
29336			fi
29337			if test "$cf_have_libdir" = no ; then
29338				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
29339
29340echo "${as_me:-configure}:29340: testing adding $cf_add_libdir to library-path ..." 1>&5
29341
29342				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
29343			fi
29344		fi
29345	done
29346fi
29347
29348	else
29349{ { echo "$as_me:29349: error: cannot find libiconv under $withval" >&5
29350echo "$as_me: error: cannot find libiconv under $withval" >&2;}
29351   { (exit 1); exit 1; }; }
29352	fi
29353done
29354
29355	;;
29356esac
29357
29358fi;
29359
29360  echo "$as_me:29360: checking for iconv" >&5
29361echo $ECHO_N "checking for iconv... $ECHO_C" >&6
29362if test "${am_cv_func_iconv+set}" = set; then
29363  echo $ECHO_N "(cached) $ECHO_C" >&6
29364else
29365
29366# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
29367# will be set on completion of the AC_TRY_LINK below.
29368cf_cv_header_path_iconv=
29369cf_cv_library_path_iconv=
29370
29371echo "${as_me:-configure}:29371: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
29372
29373cf_save_LIBS="$LIBS"
29374
29375cat >conftest.$ac_ext <<_ACEOF
29376#line 29376 "configure"
29377#include "confdefs.h"
29378
29379#include <stdlib.h>
29380#include <iconv.h>
29381
29382int
29383main (void)
29384{
29385
29386	iconv_t cd = iconv_open("","");
29387	iconv(cd,NULL,NULL,NULL,NULL);
29388	iconv_close(cd);
29389
29390  ;
29391  return 0;
29392}
29393_ACEOF
29394rm -f conftest.$ac_objext conftest$ac_exeext
29395if { (eval echo "$as_me:29395: \"$ac_link\"") >&5
29396  (eval $ac_link) 2>&5
29397  ac_status=$?
29398  echo "$as_me:29398: \$? = $ac_status" >&5
29399  (exit $ac_status); } &&
29400         { ac_try='test -s conftest$ac_exeext'
29401  { (eval echo "$as_me:29401: \"$ac_try\"") >&5
29402  (eval $ac_try) 2>&5
29403  ac_status=$?
29404  echo "$as_me:29404: \$? = $ac_status" >&5
29405  (exit $ac_status); }; }; then
29406
29407	cf_cv_find_linkage_iconv=yes
29408	cf_cv_header_path_iconv=/usr/include
29409	cf_cv_library_path_iconv=/usr/lib
29410
29411else
29412  echo "$as_me: failed program was:" >&5
29413cat conftest.$ac_ext >&5
29414
29415LIBS="-liconv  $cf_save_LIBS"
29416
29417cat >conftest.$ac_ext <<_ACEOF
29418#line 29418 "configure"
29419#include "confdefs.h"
29420
29421#include <stdlib.h>
29422#include <iconv.h>
29423
29424int
29425main (void)
29426{
29427
29428	iconv_t cd = iconv_open("","");
29429	iconv(cd,NULL,NULL,NULL,NULL);
29430	iconv_close(cd);
29431
29432  ;
29433  return 0;
29434}
29435_ACEOF
29436rm -f conftest.$ac_objext conftest$ac_exeext
29437if { (eval echo "$as_me:29437: \"$ac_link\"") >&5
29438  (eval $ac_link) 2>&5
29439  ac_status=$?
29440  echo "$as_me:29440: \$? = $ac_status" >&5
29441  (exit $ac_status); } &&
29442         { ac_try='test -s conftest$ac_exeext'
29443  { (eval echo "$as_me:29443: \"$ac_try\"") >&5
29444  (eval $ac_try) 2>&5
29445  ac_status=$?
29446  echo "$as_me:29446: \$? = $ac_status" >&5
29447  (exit $ac_status); }; }; then
29448
29449	cf_cv_find_linkage_iconv=yes
29450	cf_cv_header_path_iconv=/usr/include
29451	cf_cv_library_path_iconv=/usr/lib
29452	cf_cv_library_file_iconv="-liconv"
29453
29454else
29455  echo "$as_me: failed program was:" >&5
29456cat conftest.$ac_ext >&5
29457
29458	cf_cv_find_linkage_iconv=no
29459	LIBS="$cf_save_LIBS"
29460
29461	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
29462
29463echo "${as_me:-configure}:29463: testing find linkage for iconv library ..." 1>&5
29464
29465echo "${as_me:-configure}:29465: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
29466
29467	cf_save_CPPFLAGS="$CPPFLAGS"
29468	cf_test_CPPFLAGS="$CPPFLAGS"
29469
29470cf_search=
29471
29472# collect the current set of include-directories from compiler flags
29473cf_header_path_list=""
29474if test -n "${CFLAGS}${CPPFLAGS}" ; then
29475	for cf_header_path in $CPPFLAGS $CFLAGS
29476	do
29477		case $cf_header_path in
29478		-I*)
29479			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
29480
29481test "x$cf_header_path" != "xNONE" && \
29482test -d "$cf_header_path" && \
29483 {
29484	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
29485	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
29486	test -d $cf_header_path/include/iconv &&       cf_search="$cf_search $cf_header_path/include/iconv"
29487	test -d $cf_header_path/include/iconv/include &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
29488	test -d $cf_header_path/iconv/include &&       cf_search="$cf_search $cf_header_path/iconv/include"
29489	test -d $cf_header_path/iconv/include/iconv &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
29490}
29491
29492			cf_header_path_list="$cf_header_path_list $cf_search"
29493			;;
29494		esac
29495	done
29496fi
29497
29498# add the variations for the package we are looking for
29499
29500cf_search=
29501
29502test "x$prefix" != "xNONE" && \
29503test -d "$prefix" && \
29504 {
29505	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
29506	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
29507	test -d $prefix/include/iconv &&       cf_search="$cf_search $prefix/include/iconv"
29508	test -d $prefix/include/iconv/include &&    cf_search="$cf_search $prefix/include/iconv/include"
29509	test -d $prefix/iconv/include &&       cf_search="$cf_search $prefix/iconv/include"
29510	test -d $prefix/iconv/include/iconv &&    cf_search="$cf_search $prefix/iconv/include/iconv"
29511}
29512
29513for cf_subdir_prefix in \
29514	/usr \
29515	/usr/local \
29516	/usr/pkg \
29517	/opt \
29518	/opt/local \
29519	$HOME
29520do
29521
29522test "x$cf_subdir_prefix" != "x$prefix" && \
29523test -d "$cf_subdir_prefix" && \
29524(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
29525	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
29526	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
29527	test -d $cf_subdir_prefix/include/iconv &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
29528	test -d $cf_subdir_prefix/include/iconv/include &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
29529	test -d $cf_subdir_prefix/iconv/include &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
29530	test -d $cf_subdir_prefix/iconv/include/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
29531}
29532
29533done
29534
29535test "$includedir" != NONE && \
29536test "$includedir" != "/usr/include" && \
29537test -d "$includedir" && {
29538	test -d $includedir &&    cf_search="$cf_search $includedir"
29539	test -d $includedir/iconv && cf_search="$cf_search $includedir/iconv"
29540}
29541
29542test "$oldincludedir" != NONE && \
29543test "$oldincludedir" != "/usr/include" && \
29544test -d "$oldincludedir" && {
29545	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
29546	test -d $oldincludedir/iconv && cf_search="$cf_search $oldincludedir/iconv"
29547}
29548
29549cf_search="$cf_search $cf_header_path_list"
29550
29551	for cf_cv_header_path_iconv in $cf_search
29552	do
29553		if test -d $cf_cv_header_path_iconv ; then
29554			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
29555
29556echo "${as_me:-configure}:29556: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
29557
29558			CPPFLAGS="$cf_save_CPPFLAGS"
29559
29560	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
29561	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
29562
29563			cat >conftest.$ac_ext <<_ACEOF
29564#line 29564 "configure"
29565#include "confdefs.h"
29566
29567#include <stdlib.h>
29568#include <iconv.h>
29569
29570int
29571main (void)
29572{
29573
29574	iconv_t cd = iconv_open("","");
29575	iconv(cd,NULL,NULL,NULL,NULL);
29576	iconv_close(cd);
29577
29578  ;
29579  return 0;
29580}
29581_ACEOF
29582rm -f conftest.$ac_objext
29583if { (eval echo "$as_me:29583: \"$ac_compile\"") >&5
29584  (eval $ac_compile) 2>&5
29585  ac_status=$?
29586  echo "$as_me:29586: \$? = $ac_status" >&5
29587  (exit $ac_status); } &&
29588         { ac_try='test -s conftest.$ac_objext'
29589  { (eval echo "$as_me:29589: \"$ac_try\"") >&5
29590  (eval $ac_try) 2>&5
29591  ac_status=$?
29592  echo "$as_me:29592: \$? = $ac_status" >&5
29593  (exit $ac_status); }; }; then
29594
29595				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
29596
29597echo "${as_me:-configure}:29597: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
29598
29599				cf_cv_find_linkage_iconv=maybe
29600				cf_test_CPPFLAGS="$CPPFLAGS"
29601				break
29602else
29603  echo "$as_me: failed program was:" >&5
29604cat conftest.$ac_ext >&5
29605
29606				CPPFLAGS="$cf_save_CPPFLAGS"
29607
29608fi
29609rm -f conftest.$ac_objext conftest.$ac_ext
29610		fi
29611	done
29612
29613	if test "$cf_cv_find_linkage_iconv" = maybe ; then
29614
29615echo "${as_me:-configure}:29615: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
29616
29617		cf_save_LIBS="$LIBS"
29618		cf_save_LDFLAGS="$LDFLAGS"
29619
29620		if test "$cf_cv_find_linkage_iconv" != yes ; then
29621
29622cf_search=
29623cf_library_path_list=""
29624if test -n "${LDFLAGS}${LIBS}" ; then
29625	for cf_library_path in $LDFLAGS $LIBS
29626	do
29627		case $cf_library_path in
29628		-L*)
29629			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
29630
29631test "x$cf_library_path" != "xNONE" && \
29632test -d "$cf_library_path" && \
29633 {
29634	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
29635	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
29636	test -d $cf_library_path/lib/iconv &&       cf_search="$cf_search $cf_library_path/lib/iconv"
29637	test -d $cf_library_path/lib/iconv/lib &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
29638	test -d $cf_library_path/iconv/lib &&       cf_search="$cf_search $cf_library_path/iconv/lib"
29639	test -d $cf_library_path/iconv/lib/iconv &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
29640}
29641
29642			cf_library_path_list="$cf_library_path_list $cf_search"
29643			;;
29644		esac
29645	done
29646fi
29647
29648cf_search=
29649
29650test "x$prefix" != "xNONE" && \
29651test -d "$prefix" && \
29652 {
29653	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
29654	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
29655	test -d $prefix/lib/iconv &&       cf_search="$cf_search $prefix/lib/iconv"
29656	test -d $prefix/lib/iconv/lib &&    cf_search="$cf_search $prefix/lib/iconv/lib"
29657	test -d $prefix/iconv/lib &&       cf_search="$cf_search $prefix/iconv/lib"
29658	test -d $prefix/iconv/lib/iconv &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
29659}
29660
29661for cf_subdir_prefix in \
29662	/usr \
29663	/usr/local \
29664	/usr/pkg \
29665	/opt \
29666	/opt/local \
29667	$HOME
29668do
29669
29670test "x$cf_subdir_prefix" != "x$prefix" && \
29671test -d "$cf_subdir_prefix" && \
29672(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
29673	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
29674	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
29675	test -d $cf_subdir_prefix/lib/iconv &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
29676	test -d $cf_subdir_prefix/lib/iconv/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
29677	test -d $cf_subdir_prefix/iconv/lib &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
29678	test -d $cf_subdir_prefix/iconv/lib/iconv &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
29679}
29680
29681done
29682
29683cf_search="$cf_library_path_list $cf_search"
29684
29685			for cf_cv_library_path_iconv in $cf_search
29686			do
29687				if test -d $cf_cv_library_path_iconv ; then
29688					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
29689
29690echo "${as_me:-configure}:29690: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
29691
29692					CPPFLAGS="$cf_test_CPPFLAGS"
29693					LIBS="-liconv  $cf_save_LIBS"
29694					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
29695					cat >conftest.$ac_ext <<_ACEOF
29696#line 29696 "configure"
29697#include "confdefs.h"
29698
29699#include <stdlib.h>
29700#include <iconv.h>
29701
29702int
29703main (void)
29704{
29705
29706	iconv_t cd = iconv_open("","");
29707	iconv(cd,NULL,NULL,NULL,NULL);
29708	iconv_close(cd);
29709
29710  ;
29711  return 0;
29712}
29713_ACEOF
29714rm -f conftest.$ac_objext conftest$ac_exeext
29715if { (eval echo "$as_me:29715: \"$ac_link\"") >&5
29716  (eval $ac_link) 2>&5
29717  ac_status=$?
29718  echo "$as_me:29718: \$? = $ac_status" >&5
29719  (exit $ac_status); } &&
29720         { ac_try='test -s conftest$ac_exeext'
29721  { (eval echo "$as_me:29721: \"$ac_try\"") >&5
29722  (eval $ac_try) 2>&5
29723  ac_status=$?
29724  echo "$as_me:29724: \$? = $ac_status" >&5
29725  (exit $ac_status); }; }; then
29726
29727					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
29728
29729echo "${as_me:-configure}:29729: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
29730
29731					cf_cv_find_linkage_iconv=yes
29732					cf_cv_library_file_iconv="-liconv"
29733					break
29734else
29735  echo "$as_me: failed program was:" >&5
29736cat conftest.$ac_ext >&5
29737
29738					CPPFLAGS="$cf_save_CPPFLAGS"
29739					LIBS="$cf_save_LIBS"
29740					LDFLAGS="$cf_save_LDFLAGS"
29741
29742fi
29743rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29744				fi
29745			done
29746			CPPFLAGS="$cf_save_CPPFLAGS"
29747			LDFLAGS="$cf_save_LDFLAGS"
29748		fi
29749
29750	else
29751		cf_cv_find_linkage_iconv=no
29752	fi
29753
29754fi
29755rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29756
29757fi
29758rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29759
29760LIBS="$cf_save_LIBS"
29761
29762if test "$cf_cv_find_linkage_iconv" = yes ; then
29763am_cv_func_iconv=yes
29764else
29765am_cv_func_iconv="no, consider installing GNU libiconv"
29766fi
29767
29768fi
29769echo "$as_me:29769: result: $am_cv_func_iconv" >&5
29770echo "${ECHO_T}$am_cv_func_iconv" >&6
29771
29772  if test "$am_cv_func_iconv" = yes; then
29773
29774cat >>confdefs.h <<\EOF
29775#define HAVE_ICONV 1
29776EOF
29777
29778    echo "$as_me:29778: checking if the declaration of iconv() needs const." >&5
29779echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
29780if test "${am_cv_proto_iconv_const+set}" = set; then
29781  echo $ECHO_N "(cached) $ECHO_C" >&6
29782else
29783
29784      cat >conftest.$ac_ext <<_ACEOF
29785#line 29785 "configure"
29786#include "confdefs.h"
29787
29788#include <stdlib.h>
29789#include <iconv.h>
29790
29791extern
29792#ifdef __cplusplus
29793"C"
29794#endif
29795#if defined(__STDC__) || defined(__cplusplus)
29796size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
29797#else
29798size_t iconv();
29799#endif
29800
29801int
29802main (void)
29803{
29804
29805  ;
29806  return 0;
29807}
29808_ACEOF
29809rm -f conftest.$ac_objext
29810if { (eval echo "$as_me:29810: \"$ac_compile\"") >&5
29811  (eval $ac_compile) 2>&5
29812  ac_status=$?
29813  echo "$as_me:29813: \$? = $ac_status" >&5
29814  (exit $ac_status); } &&
29815         { ac_try='test -s conftest.$ac_objext'
29816  { (eval echo "$as_me:29816: \"$ac_try\"") >&5
29817  (eval $ac_try) 2>&5
29818  ac_status=$?
29819  echo "$as_me:29819: \$? = $ac_status" >&5
29820  (exit $ac_status); }; }; then
29821  am_cv_proto_iconv_const=no
29822else
29823  echo "$as_me: failed program was:" >&5
29824cat conftest.$ac_ext >&5
29825am_cv_proto_iconv_const=yes
29826fi
29827rm -f conftest.$ac_objext conftest.$ac_ext
29828fi
29829echo "$as_me:29829: result: $am_cv_proto_iconv_const" >&5
29830echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
29831
29832    if test "$am_cv_proto_iconv_const" = yes ; then
29833      am_cv_proto_iconv_arg1="const"
29834    else
29835      am_cv_proto_iconv_arg1=""
29836    fi
29837
29838cat >>confdefs.h <<EOF
29839#define ICONV_CONST $am_cv_proto_iconv_arg1
29840EOF
29841
29842  fi
29843
29844  LIBICONV=
29845  if test "$cf_cv_find_linkage_iconv" = yes; then
29846
29847if test -n "$cf_cv_header_path_iconv" ; then
29848  for cf_add_incdir in $cf_cv_header_path_iconv
29849  do
29850	while test $cf_add_incdir != /usr/include
29851	do
29852	  if test -d $cf_add_incdir
29853	  then
29854		cf_have_incdir=no
29855		if test -n "$CFLAGS$CPPFLAGS" ; then
29856		  # a loop is needed to ensure we can add subdirs of existing dirs
29857		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
29858			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
29859			  cf_have_incdir=yes; break
29860			fi
29861		  done
29862		fi
29863
29864		if test "$cf_have_incdir" = no ; then
29865		  if test "$cf_add_incdir" = /usr/local/include ; then
29866			if test "$GCC" = yes
29867			then
29868			  cf_save_CPPFLAGS=$CPPFLAGS
29869
29870	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
29871	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
29872
29873			  cat >conftest.$ac_ext <<_ACEOF
29874#line 29874 "configure"
29875#include "confdefs.h"
29876#include <stdio.h>
29877int
29878main (void)
29879{
29880printf("Hello")
29881  ;
29882  return 0;
29883}
29884_ACEOF
29885rm -f conftest.$ac_objext
29886if { (eval echo "$as_me:29886: \"$ac_compile\"") >&5
29887  (eval $ac_compile) 2>&5
29888  ac_status=$?
29889  echo "$as_me:29889: \$? = $ac_status" >&5
29890  (exit $ac_status); } &&
29891         { ac_try='test -s conftest.$ac_objext'
29892  { (eval echo "$as_me:29892: \"$ac_try\"") >&5
29893  (eval $ac_try) 2>&5
29894  ac_status=$?
29895  echo "$as_me:29895: \$? = $ac_status" >&5
29896  (exit $ac_status); }; }; then
29897  :
29898else
29899  echo "$as_me: failed program was:" >&5
29900cat conftest.$ac_ext >&5
29901cf_have_incdir=yes
29902fi
29903rm -f conftest.$ac_objext conftest.$ac_ext
29904			  CPPFLAGS=$cf_save_CPPFLAGS
29905			fi
29906		  fi
29907		fi
29908
29909		if test "$cf_have_incdir" = no ; then
29910		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
29911
29912echo "${as_me:-configure}:29912: testing adding $cf_add_incdir to include-path ..." 1>&5
29913
29914		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
29915
29916		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
29917		  test "$cf_top_incdir" = "$cf_add_incdir" && break
29918		  cf_add_incdir="$cf_top_incdir"
29919		else
29920		  break
29921		fi
29922	  else
29923		break
29924	  fi
29925	done
29926  done
29927fi
29928
29929    if test -n "$cf_cv_library_file_iconv" ; then
29930      LIBICONV="-liconv"
29931
29932if test -n "$cf_cv_library_path_iconv" ; then
29933	for cf_add_libdir in $cf_cv_library_path_iconv
29934	do
29935		if test $cf_add_libdir = /usr/lib ; then
29936			:
29937		elif test -d $cf_add_libdir
29938		then
29939			cf_have_libdir=no
29940			if test -n "$LDFLAGS$LIBS" ; then
29941				# a loop is needed to ensure we can add subdirs of existing dirs
29942				for cf_test_libdir in $LDFLAGS $LIBS ; do
29943					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
29944						cf_have_libdir=yes; break
29945					fi
29946				done
29947			fi
29948			if test "$cf_have_libdir" = no ; then
29949				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
29950
29951echo "${as_me:-configure}:29951: testing adding $cf_add_libdir to library-path ..." 1>&5
29952
29953				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
29954			fi
29955		fi
29956	done
29957fi
29958
29959    fi
29960  fi
29961
29962echo "$as_me:29962: checking for nl_langinfo and CODESET" >&5
29963echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
29964if test "${am_cv_langinfo_codeset+set}" = set; then
29965  echo $ECHO_N "(cached) $ECHO_C" >&6
29966else
29967  cat >conftest.$ac_ext <<_ACEOF
29968#line 29968 "configure"
29969#include "confdefs.h"
29970#include <langinfo.h>
29971int
29972main (void)
29973{
29974char* cs = nl_langinfo(CODESET); (void)cs
29975  ;
29976  return 0;
29977}
29978_ACEOF
29979rm -f conftest.$ac_objext conftest$ac_exeext
29980if { (eval echo "$as_me:29980: \"$ac_link\"") >&5
29981  (eval $ac_link) 2>&5
29982  ac_status=$?
29983  echo "$as_me:29983: \$? = $ac_status" >&5
29984  (exit $ac_status); } &&
29985         { ac_try='test -s conftest$ac_exeext'
29986  { (eval echo "$as_me:29986: \"$ac_try\"") >&5
29987  (eval $ac_try) 2>&5
29988  ac_status=$?
29989  echo "$as_me:29989: \$? = $ac_status" >&5
29990  (exit $ac_status); }; }; then
29991  am_cv_langinfo_codeset=yes
29992else
29993  echo "$as_me: failed program was:" >&5
29994cat conftest.$ac_ext >&5
29995am_cv_langinfo_codeset=no
29996fi
29997rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
29998
29999fi
30000echo "$as_me:30000: result: $am_cv_langinfo_codeset" >&5
30001echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
30002	if test $am_cv_langinfo_codeset = yes; then
30003
30004cat >>confdefs.h <<\EOF
30005#define HAVE_LANGINFO_CODESET 1
30006EOF
30007
30008	fi
30009
30010   if test $ac_cv_header_locale_h = yes; then
30011	echo "$as_me:30011: checking for LC_MESSAGES" >&5
30012echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
30013if test "${am_cv_val_LC_MESSAGES+set}" = set; then
30014  echo $ECHO_N "(cached) $ECHO_C" >&6
30015else
30016  cat >conftest.$ac_ext <<_ACEOF
30017#line 30017 "configure"
30018#include "confdefs.h"
30019#include <locale.h>
30020int
30021main (void)
30022{
30023return LC_MESSAGES
30024  ;
30025  return 0;
30026}
30027_ACEOF
30028rm -f conftest.$ac_objext conftest$ac_exeext
30029if { (eval echo "$as_me:30029: \"$ac_link\"") >&5
30030  (eval $ac_link) 2>&5
30031  ac_status=$?
30032  echo "$as_me:30032: \$? = $ac_status" >&5
30033  (exit $ac_status); } &&
30034         { ac_try='test -s conftest$ac_exeext'
30035  { (eval echo "$as_me:30035: \"$ac_try\"") >&5
30036  (eval $ac_try) 2>&5
30037  ac_status=$?
30038  echo "$as_me:30038: \$? = $ac_status" >&5
30039  (exit $ac_status); }; }; then
30040  am_cv_val_LC_MESSAGES=yes
30041else
30042  echo "$as_me: failed program was:" >&5
30043cat conftest.$ac_ext >&5
30044am_cv_val_LC_MESSAGES=no
30045fi
30046rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
30047fi
30048echo "$as_me:30048: result: $am_cv_val_LC_MESSAGES" >&5
30049echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
30050	if test $am_cv_val_LC_MESSAGES = yes; then
30051
30052cat >>confdefs.h <<\EOF
30053#define HAVE_LC_MESSAGES 1
30054EOF
30055
30056	fi
30057fi
30058   echo "$as_me:30058: checking whether NLS is requested" >&5
30059echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
30060
30061# Check whether --enable-nls or --disable-nls was given.
30062if test "${enable_nls+set}" = set; then
30063  enableval="$enable_nls"
30064  USE_NLS=$enableval
30065else
30066  USE_NLS=yes
30067fi;
30068  echo "$as_me:30068: result: $USE_NLS" >&5
30069echo "${ECHO_T}$USE_NLS" >&6
30070
30071  BUILD_INCLUDED_LIBINTL=no
30072  USE_INCLUDED_LIBINTL=no
30073  INTLLIBS=
30074
30075    if test "$USE_NLS" = "yes"; then
30076        POSUB=po
30077
30078cat >>confdefs.h <<\EOF
30079#define ENABLE_NLS 1
30080EOF
30081
30082    echo "$as_me:30082: checking whether included gettext is requested" >&5
30083echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
30084
30085# Check whether --with-included-gettext or --without-included-gettext was given.
30086if test "${with_included_gettext+set}" = set; then
30087  withval="$with_included_gettext"
30088  nls_cv_force_use_gnu_gettext=$withval
30089else
30090  nls_cv_force_use_gnu_gettext=no
30091fi;
30092    echo "$as_me:30092: result: $nls_cv_force_use_gnu_gettext" >&5
30093echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
30094
30095    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
30096    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
30097                        CATOBJEXT=NONE
30098
30099                                          cf_save_msgfmt_path="$MSGFMT"
30100      cf_save_xgettext_path="$XGETTEXT"
30101
30102            # Extract the first word of "msgfmt", so it can be a program name with args.
30103
30104set dummy msgfmt; ac_word=$2
30105echo "$as_me:30105: checking for $ac_word" >&5
30106echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
30107if test "${ac_cv_path_MSGFMT+set}" = set; then
30108  echo $ECHO_N "(cached) $ECHO_C" >&6
30109else
30110  case "$MSGFMT" in
30111  [\\/]*|?:[\\/]*)
30112  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
30113  ;;
30114  *)
30115  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
30116  for ac_dir in $PATH; do
30117    test -z "$ac_dir" && ac_dir=.
30118    if test -f $ac_dir/$ac_word$ac_exeext; then
30119      if $ac_dir/$ac_word --statistics /dev/null >/dev/null 2>&1; then
30120	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
30121	break
30122      fi
30123    fi
30124  done
30125  IFS="$ac_save_ifs"
30126  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
30127  ;;
30128esac
30129fi
30130MSGFMT="$ac_cv_path_MSGFMT"
30131if test "$MSGFMT" != ":"; then
30132  echo "$as_me:30132: result: $MSGFMT" >&5
30133echo "${ECHO_T}$MSGFMT" >&6
30134else
30135  echo "$as_me:30135: result: no" >&5
30136echo "${ECHO_T}no" >&6
30137fi
30138
30139      # Extract the first word of "gmsgfmt", so it can be a program name with args.
30140set dummy gmsgfmt; ac_word=$2
30141echo "$as_me:30141: checking for $ac_word" >&5
30142echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
30143if test "${ac_cv_path_GMSGFMT+set}" = set; then
30144  echo $ECHO_N "(cached) $ECHO_C" >&6
30145else
30146  case $GMSGFMT in
30147  [\\/]* | ?:[\\/]*)
30148  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
30149  ;;
30150  *)
30151  ac_save_IFS=$IFS; IFS=$ac_path_separator
30152ac_dummy="$PATH"
30153for ac_dir in $ac_dummy; do
30154  IFS=$ac_save_IFS
30155  test -z "$ac_dir" && ac_dir=.
30156  if $as_executable_p "$ac_dir/$ac_word"; then
30157   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
30158   echo "$as_me:30158: found $ac_dir/$ac_word" >&5
30159   break
30160fi
30161done
30162
30163  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
30164  ;;
30165esac
30166fi
30167GMSGFMT=$ac_cv_path_GMSGFMT
30168
30169if test -n "$GMSGFMT"; then
30170  echo "$as_me:30170: result: $GMSGFMT" >&5
30171echo "${ECHO_T}$GMSGFMT" >&6
30172else
30173  echo "$as_me:30173: result: no" >&5
30174echo "${ECHO_T}no" >&6
30175fi
30176
30177            # Extract the first word of "xgettext", so it can be a program name with args.
30178
30179set dummy xgettext; ac_word=$2
30180echo "$as_me:30180: checking for $ac_word" >&5
30181echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
30182if test "${ac_cv_path_XGETTEXT+set}" = set; then
30183  echo $ECHO_N "(cached) $ECHO_C" >&6
30184else
30185  case "$XGETTEXT" in
30186  [\\/]*|?:[\\/]*)
30187  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
30188  ;;
30189  *)
30190  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
30191  for ac_dir in $PATH; do
30192    test -z "$ac_dir" && ac_dir=.
30193    if test -f $ac_dir/$ac_word$ac_exeext; then
30194      if $ac_dir/$ac_word --omit-header /dev/null >/dev/null 2>&1; then
30195	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
30196	break
30197      fi
30198    fi
30199  done
30200  IFS="$ac_save_ifs"
30201  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
30202  ;;
30203esac
30204fi
30205XGETTEXT="$ac_cv_path_XGETTEXT"
30206if test "$XGETTEXT" != ":"; then
30207  echo "$as_me:30207: result: $XGETTEXT" >&5
30208echo "${ECHO_T}$XGETTEXT" >&6
30209else
30210  echo "$as_me:30210: result: no" >&5
30211echo "${ECHO_T}no" >&6
30212fi
30213
30214      cf_save_OPTS_1="$CPPFLAGS"
30215      if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
30216         test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
30217
30218cf_fix_cppflags=no
30219cf_new_cflags=
30220cf_new_cppflags=
30221cf_new_extra_cppflags=
30222
30223for cf_add_cflags in -DIGNORE_MSGFMT_HACK
30224do
30225case $cf_fix_cppflags in
30226no)
30227	case $cf_add_cflags in
30228	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
30229		case $cf_add_cflags in
30230		-D*)
30231			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
30232
30233			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
30234				&& test -z "${cf_tst_cflags}" \
30235				&& cf_fix_cppflags=yes
30236
30237			if test $cf_fix_cppflags = yes ; then
30238
30239	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
30240	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
30241
30242				continue
30243			elif test "${cf_tst_cflags}" = "\"'" ; then
30244
30245	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
30246	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
30247
30248				continue
30249			fi
30250			;;
30251		esac
30252		case "$CPPFLAGS" in
30253		*$cf_add_cflags)
30254			;;
30255		*)
30256			case $cf_add_cflags in
30257			-D*)
30258				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
30259
30260CPPFLAGS=`echo "$CPPFLAGS" | \
30261	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
30262		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
30263
30264				;;
30265			esac
30266
30267	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
30268	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
30269
30270			;;
30271		esac
30272		;;
30273	*)
30274
30275	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
30276	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
30277
30278		;;
30279	esac
30280	;;
30281yes)
30282
30283	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
30284	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
30285
30286	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
30287
30288	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
30289		&& test -z "${cf_tst_cflags}" \
30290		&& cf_fix_cppflags=no
30291	;;
30292esac
30293done
30294
30295if test -n "$cf_new_cflags" ; then
30296
30297	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
30298	CFLAGS="${CFLAGS}$cf_new_cflags"
30299
30300fi
30301
30302if test -n "$cf_new_cppflags" ; then
30303
30304	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
30305	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
30306
30307fi
30308
30309if test -n "$cf_new_extra_cppflags" ; then
30310
30311	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
30312	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
30313
30314fi
30315
30316      fi
30317
30318      cf_save_LIBS_1="$LIBS"
30319
30320cf_add_libs="$LIBS"
30321# reverse order
30322cf_add_0lib=
30323for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
30324# filter duplicates
30325for cf_add_1lib in $cf_add_0lib; do
30326	for cf_add_2lib in $cf_add_libs; do
30327		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
30328			cf_add_1lib=
30329			break
30330		fi
30331	done
30332	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
30333done
30334LIBS="$cf_add_libs"
30335
30336# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
30337# will be set on completion of the AC_TRY_LINK below.
30338cf_cv_header_path_intl=
30339cf_cv_library_path_intl=
30340
30341echo "${as_me:-configure}:30341: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
30342
30343cf_save_LIBS="$LIBS"
30344
30345cat >conftest.$ac_ext <<_ACEOF
30346#line 30346 "configure"
30347#include "confdefs.h"
30348
30349#include <libintl.h>
30350extern int _nl_msg_cat_cntr;
30351
30352int
30353main (void)
30354{
30355
30356	bindtextdomain ("", "");
30357	return (int) gettext ("")
30358
30359#ifndef IGNORE_MSGFMT_HACK
30360			 + _nl_msg_cat_cntr
30361#endif
30362
30363  ;
30364  return 0;
30365}
30366_ACEOF
30367rm -f conftest.$ac_objext conftest$ac_exeext
30368if { (eval echo "$as_me:30368: \"$ac_link\"") >&5
30369  (eval $ac_link) 2>&5
30370  ac_status=$?
30371  echo "$as_me:30371: \$? = $ac_status" >&5
30372  (exit $ac_status); } &&
30373         { ac_try='test -s conftest$ac_exeext'
30374  { (eval echo "$as_me:30374: \"$ac_try\"") >&5
30375  (eval $ac_try) 2>&5
30376  ac_status=$?
30377  echo "$as_me:30377: \$? = $ac_status" >&5
30378  (exit $ac_status); }; }; then
30379
30380	cf_cv_find_linkage_intl=yes
30381	cf_cv_header_path_intl=/usr/include
30382	cf_cv_library_path_intl=/usr/lib
30383
30384else
30385  echo "$as_me: failed program was:" >&5
30386cat conftest.$ac_ext >&5
30387
30388LIBS="-lintl  $cf_save_LIBS"
30389
30390cat >conftest.$ac_ext <<_ACEOF
30391#line 30391 "configure"
30392#include "confdefs.h"
30393
30394#include <libintl.h>
30395extern int _nl_msg_cat_cntr;
30396
30397int
30398main (void)
30399{
30400
30401	bindtextdomain ("", "");
30402	return (int) gettext ("")
30403
30404#ifndef IGNORE_MSGFMT_HACK
30405			 + _nl_msg_cat_cntr
30406#endif
30407
30408  ;
30409  return 0;
30410}
30411_ACEOF
30412rm -f conftest.$ac_objext conftest$ac_exeext
30413if { (eval echo "$as_me:30413: \"$ac_link\"") >&5
30414  (eval $ac_link) 2>&5
30415  ac_status=$?
30416  echo "$as_me:30416: \$? = $ac_status" >&5
30417  (exit $ac_status); } &&
30418         { ac_try='test -s conftest$ac_exeext'
30419  { (eval echo "$as_me:30419: \"$ac_try\"") >&5
30420  (eval $ac_try) 2>&5
30421  ac_status=$?
30422  echo "$as_me:30422: \$? = $ac_status" >&5
30423  (exit $ac_status); }; }; then
30424
30425	cf_cv_find_linkage_intl=yes
30426	cf_cv_header_path_intl=/usr/include
30427	cf_cv_library_path_intl=/usr/lib
30428	cf_cv_library_file_intl="-lintl"
30429
30430else
30431  echo "$as_me: failed program was:" >&5
30432cat conftest.$ac_ext >&5
30433
30434	cf_cv_find_linkage_intl=no
30435	LIBS="$cf_save_LIBS"
30436
30437	test -n "$verbose" && echo "	find linkage for intl library" 1>&6
30438
30439echo "${as_me:-configure}:30439: testing find linkage for intl library ..." 1>&5
30440
30441echo "${as_me:-configure}:30441: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
30442
30443	cf_save_CPPFLAGS="$CPPFLAGS"
30444	cf_test_CPPFLAGS="$CPPFLAGS"
30445
30446cf_search=
30447
30448# collect the current set of include-directories from compiler flags
30449cf_header_path_list=""
30450if test -n "${CFLAGS}${CPPFLAGS}" ; then
30451	for cf_header_path in $CPPFLAGS $CFLAGS
30452	do
30453		case $cf_header_path in
30454		-I*)
30455			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
30456
30457test "x$cf_header_path" != "xNONE" && \
30458test -d "$cf_header_path" && \
30459 {
30460	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
30461	test -d $cf_header_path/include &&          cf_search="$cf_search $cf_header_path/include"
30462	test -d $cf_header_path/include/intl &&       cf_search="$cf_search $cf_header_path/include/intl"
30463	test -d $cf_header_path/include/intl/include &&    cf_search="$cf_search $cf_header_path/include/intl/include"
30464	test -d $cf_header_path/intl/include &&       cf_search="$cf_search $cf_header_path/intl/include"
30465	test -d $cf_header_path/intl/include/intl &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
30466}
30467
30468			cf_header_path_list="$cf_header_path_list $cf_search"
30469			;;
30470		esac
30471	done
30472fi
30473
30474# add the variations for the package we are looking for
30475
30476cf_search=
30477
30478test "x$prefix" != "xNONE" && \
30479test -d "$prefix" && \
30480 {
30481	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
30482	test -d $prefix/include &&          cf_search="$cf_search $prefix/include"
30483	test -d $prefix/include/intl &&       cf_search="$cf_search $prefix/include/intl"
30484	test -d $prefix/include/intl/include &&    cf_search="$cf_search $prefix/include/intl/include"
30485	test -d $prefix/intl/include &&       cf_search="$cf_search $prefix/intl/include"
30486	test -d $prefix/intl/include/intl &&    cf_search="$cf_search $prefix/intl/include/intl"
30487}
30488
30489for cf_subdir_prefix in \
30490	/usr \
30491	/usr/local \
30492	/usr/pkg \
30493	/opt \
30494	/opt/local \
30495	$HOME
30496do
30497
30498test "x$cf_subdir_prefix" != "x$prefix" && \
30499test -d "$cf_subdir_prefix" && \
30500(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
30501	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
30502	test -d $cf_subdir_prefix/include &&          cf_search="$cf_search $cf_subdir_prefix/include"
30503	test -d $cf_subdir_prefix/include/intl &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
30504	test -d $cf_subdir_prefix/include/intl/include &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
30505	test -d $cf_subdir_prefix/intl/include &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
30506	test -d $cf_subdir_prefix/intl/include/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
30507}
30508
30509done
30510
30511test "$includedir" != NONE && \
30512test "$includedir" != "/usr/include" && \
30513test -d "$includedir" && {
30514	test -d $includedir &&    cf_search="$cf_search $includedir"
30515	test -d $includedir/intl && cf_search="$cf_search $includedir/intl"
30516}
30517
30518test "$oldincludedir" != NONE && \
30519test "$oldincludedir" != "/usr/include" && \
30520test -d "$oldincludedir" && {
30521	test -d $oldincludedir    && cf_search="$cf_search $oldincludedir"
30522	test -d $oldincludedir/intl && cf_search="$cf_search $oldincludedir/intl"
30523}
30524
30525cf_search="$cf_search $cf_header_path_list"
30526
30527	for cf_cv_header_path_intl in $cf_search
30528	do
30529		if test -d $cf_cv_header_path_intl ; then
30530			test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
30531
30532echo "${as_me:-configure}:30532: testing ... testing $cf_cv_header_path_intl ..." 1>&5
30533
30534			CPPFLAGS="$cf_save_CPPFLAGS"
30535
30536	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
30537	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
30538
30539			cat >conftest.$ac_ext <<_ACEOF
30540#line 30540 "configure"
30541#include "confdefs.h"
30542
30543#include <libintl.h>
30544extern int _nl_msg_cat_cntr;
30545
30546int
30547main (void)
30548{
30549
30550	bindtextdomain ("", "");
30551	return (int) gettext ("")
30552
30553#ifndef IGNORE_MSGFMT_HACK
30554			 + _nl_msg_cat_cntr
30555#endif
30556
30557  ;
30558  return 0;
30559}
30560_ACEOF
30561rm -f conftest.$ac_objext
30562if { (eval echo "$as_me:30562: \"$ac_compile\"") >&5
30563  (eval $ac_compile) 2>&5
30564  ac_status=$?
30565  echo "$as_me:30565: \$? = $ac_status" >&5
30566  (exit $ac_status); } &&
30567         { ac_try='test -s conftest.$ac_objext'
30568  { (eval echo "$as_me:30568: \"$ac_try\"") >&5
30569  (eval $ac_try) 2>&5
30570  ac_status=$?
30571  echo "$as_me:30571: \$? = $ac_status" >&5
30572  (exit $ac_status); }; }; then
30573
30574				test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
30575
30576echo "${as_me:-configure}:30576: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
30577
30578				cf_cv_find_linkage_intl=maybe
30579				cf_test_CPPFLAGS="$CPPFLAGS"
30580				break
30581else
30582  echo "$as_me: failed program was:" >&5
30583cat conftest.$ac_ext >&5
30584
30585				CPPFLAGS="$cf_save_CPPFLAGS"
30586
30587fi
30588rm -f conftest.$ac_objext conftest.$ac_ext
30589		fi
30590	done
30591
30592	if test "$cf_cv_find_linkage_intl" = maybe ; then
30593
30594echo "${as_me:-configure}:30594: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
30595
30596		cf_save_LIBS="$LIBS"
30597		cf_save_LDFLAGS="$LDFLAGS"
30598
30599		if test "$cf_cv_find_linkage_intl" != yes ; then
30600
30601cf_search=
30602cf_library_path_list=""
30603if test -n "${LDFLAGS}${LIBS}" ; then
30604	for cf_library_path in $LDFLAGS $LIBS
30605	do
30606		case $cf_library_path in
30607		-L*)
30608			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
30609
30610test "x$cf_library_path" != "xNONE" && \
30611test -d "$cf_library_path" && \
30612 {
30613	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
30614	test -d $cf_library_path/lib &&          cf_search="$cf_search $cf_library_path/lib"
30615	test -d $cf_library_path/lib/intl &&       cf_search="$cf_search $cf_library_path/lib/intl"
30616	test -d $cf_library_path/lib/intl/lib &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
30617	test -d $cf_library_path/intl/lib &&       cf_search="$cf_search $cf_library_path/intl/lib"
30618	test -d $cf_library_path/intl/lib/intl &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
30619}
30620
30621			cf_library_path_list="$cf_library_path_list $cf_search"
30622			;;
30623		esac
30624	done
30625fi
30626
30627cf_search=
30628
30629test "x$prefix" != "xNONE" && \
30630test -d "$prefix" && \
30631 {
30632	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
30633	test -d $prefix/lib &&          cf_search="$cf_search $prefix/lib"
30634	test -d $prefix/lib/intl &&       cf_search="$cf_search $prefix/lib/intl"
30635	test -d $prefix/lib/intl/lib &&    cf_search="$cf_search $prefix/lib/intl/lib"
30636	test -d $prefix/intl/lib &&       cf_search="$cf_search $prefix/intl/lib"
30637	test -d $prefix/intl/lib/intl &&    cf_search="$cf_search $prefix/intl/lib/intl"
30638}
30639
30640for cf_subdir_prefix in \
30641	/usr \
30642	/usr/local \
30643	/usr/pkg \
30644	/opt \
30645	/opt/local \
30646	$HOME
30647do
30648
30649test "x$cf_subdir_prefix" != "x$prefix" && \
30650test -d "$cf_subdir_prefix" && \
30651(test -z "$prefix" || test x$prefix = xNONE || test "x$cf_subdir_prefix" != "x$prefix") && {
30652	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
30653	test -d $cf_subdir_prefix/lib &&          cf_search="$cf_search $cf_subdir_prefix/lib"
30654	test -d $cf_subdir_prefix/lib/intl &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
30655	test -d $cf_subdir_prefix/lib/intl/lib &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
30656	test -d $cf_subdir_prefix/intl/lib &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
30657	test -d $cf_subdir_prefix/intl/lib/intl &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
30658}
30659
30660done
30661
30662cf_search="$cf_library_path_list $cf_search"
30663
30664			for cf_cv_library_path_intl in $cf_search
30665			do
30666				if test -d $cf_cv_library_path_intl ; then
30667					test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
30668
30669echo "${as_me:-configure}:30669: testing ... testing $cf_cv_library_path_intl ..." 1>&5
30670
30671					CPPFLAGS="$cf_test_CPPFLAGS"
30672					LIBS="-lintl  $cf_save_LIBS"
30673					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
30674					cat >conftest.$ac_ext <<_ACEOF
30675#line 30675 "configure"
30676#include "confdefs.h"
30677
30678#include <libintl.h>
30679extern int _nl_msg_cat_cntr;
30680
30681int
30682main (void)
30683{
30684
30685	bindtextdomain ("", "");
30686	return (int) gettext ("")
30687
30688#ifndef IGNORE_MSGFMT_HACK
30689			 + _nl_msg_cat_cntr
30690#endif
30691
30692  ;
30693  return 0;
30694}
30695_ACEOF
30696rm -f conftest.$ac_objext conftest$ac_exeext
30697if { (eval echo "$as_me:30697: \"$ac_link\"") >&5
30698  (eval $ac_link) 2>&5
30699  ac_status=$?
30700  echo "$as_me:30700: \$? = $ac_status" >&5
30701  (exit $ac_status); } &&
30702         { ac_try='test -s conftest$ac_exeext'
30703  { (eval echo "$as_me:30703: \"$ac_try\"") >&5
30704  (eval $ac_try) 2>&5
30705  ac_status=$?
30706  echo "$as_me:30706: \$? = $ac_status" >&5
30707  (exit $ac_status); }; }; then
30708
30709					test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
30710
30711echo "${as_me:-configure}:30711: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
30712
30713					cf_cv_find_linkage_intl=yes
30714					cf_cv_library_file_intl="-lintl"
30715					break
30716else
30717  echo "$as_me: failed program was:" >&5
30718cat conftest.$ac_ext >&5
30719
30720					CPPFLAGS="$cf_save_CPPFLAGS"
30721					LIBS="$cf_save_LIBS"
30722					LDFLAGS="$cf_save_LDFLAGS"
30723
30724fi
30725rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
30726				fi
30727			done
30728			CPPFLAGS="$cf_save_CPPFLAGS"
30729			LDFLAGS="$cf_save_LDFLAGS"
30730		fi
30731
30732	else
30733		cf_cv_find_linkage_intl=no
30734	fi
30735
30736fi
30737rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
30738
30739fi
30740rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
30741
30742LIBS="$cf_save_LIBS"
30743
30744if test "$cf_cv_find_linkage_intl" = yes ; then
30745cf_cv_func_gettext=yes
30746else
30747cf_cv_func_gettext=no
30748fi
30749
30750      echo "$as_me:30750: checking for libintl.h and gettext()" >&5
30751echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
30752      echo "$as_me:30752: result: $cf_cv_func_gettext" >&5
30753echo "${ECHO_T}$cf_cv_func_gettext" >&6
30754
30755      LIBS="$cf_save_LIBS_1"
30756      CPPFLAGS="$cf_save_OPTS_1"
30757
30758      if test "$cf_cv_func_gettext" = yes ; then
30759
30760cat >>confdefs.h <<\EOF
30761#define HAVE_LIBINTL_H 1
30762EOF
30763
30764                                        if test "$PACKAGE" != gettext; then
30765
30766cat >>confdefs.h <<\EOF
30767#define HAVE_GETTEXT 1
30768EOF
30769
30770if test -n "$cf_cv_header_path_intl" ; then
30771  for cf_add_incdir in $cf_cv_header_path_intl
30772  do
30773	while test $cf_add_incdir != /usr/include
30774	do
30775	  if test -d $cf_add_incdir
30776	  then
30777		cf_have_incdir=no
30778		if test -n "$CFLAGS$CPPFLAGS" ; then
30779		  # a loop is needed to ensure we can add subdirs of existing dirs
30780		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
30781			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
30782			  cf_have_incdir=yes; break
30783			fi
30784		  done
30785		fi
30786
30787		if test "$cf_have_incdir" = no ; then
30788		  if test "$cf_add_incdir" = /usr/local/include ; then
30789			if test "$GCC" = yes
30790			then
30791			  cf_save_CPPFLAGS=$CPPFLAGS
30792
30793	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
30794	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
30795
30796			  cat >conftest.$ac_ext <<_ACEOF
30797#line 30797 "configure"
30798#include "confdefs.h"
30799#include <stdio.h>
30800int
30801main (void)
30802{
30803printf("Hello")
30804  ;
30805  return 0;
30806}
30807_ACEOF
30808rm -f conftest.$ac_objext
30809if { (eval echo "$as_me:30809: \"$ac_compile\"") >&5
30810  (eval $ac_compile) 2>&5
30811  ac_status=$?
30812  echo "$as_me:30812: \$? = $ac_status" >&5
30813  (exit $ac_status); } &&
30814         { ac_try='test -s conftest.$ac_objext'
30815  { (eval echo "$as_me:30815: \"$ac_try\"") >&5
30816  (eval $ac_try) 2>&5
30817  ac_status=$?
30818  echo "$as_me:30818: \$? = $ac_status" >&5
30819  (exit $ac_status); }; }; then
30820  :
30821else
30822  echo "$as_me: failed program was:" >&5
30823cat conftest.$ac_ext >&5
30824cf_have_incdir=yes
30825fi
30826rm -f conftest.$ac_objext conftest.$ac_ext
30827			  CPPFLAGS=$cf_save_CPPFLAGS
30828			fi
30829		  fi
30830		fi
30831
30832		if test "$cf_have_incdir" = no ; then
30833		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
30834
30835echo "${as_me:-configure}:30835: testing adding $cf_add_incdir to include-path ..." 1>&5
30836
30837		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
30838
30839		  cf_top_incdir=`echo $cf_add_incdir | sed -e 's%/include/.*$%/include%'`
30840		  test "$cf_top_incdir" = "$cf_add_incdir" && break
30841		  cf_add_incdir="$cf_top_incdir"
30842		else
30843		  break
30844		fi
30845	  else
30846		break
30847	  fi
30848	done
30849  done
30850fi
30851
30852          if test -n "$cf_cv_library_file_intl" ; then
30853                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
30854
30855if test -n "$cf_cv_library_path_intl" ; then
30856	for cf_add_libdir in $cf_cv_library_path_intl
30857	do
30858		if test $cf_add_libdir = /usr/lib ; then
30859			:
30860		elif test -d $cf_add_libdir
30861		then
30862			cf_have_libdir=no
30863			if test -n "$LDFLAGS$LIBS" ; then
30864				# a loop is needed to ensure we can add subdirs of existing dirs
30865				for cf_test_libdir in $LDFLAGS $LIBS ; do
30866					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
30867						cf_have_libdir=yes; break
30868					fi
30869				done
30870			fi
30871			if test "$cf_have_libdir" = no ; then
30872				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
30873
30874echo "${as_me:-configure}:30874: testing adding $cf_add_libdir to library-path ..." 1>&5
30875
30876				INTLLIBS="-L$cf_add_libdir $INTLLIBS"
30877			fi
30878		fi
30879	done
30880fi
30881
30882          fi
30883
30884          gt_save_LIBS="$LIBS"
30885          LIBS="$LIBS $INTLLIBS"
30886
30887for ac_func in dcgettext
30888do
30889as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
30890echo "$as_me:30890: checking for $ac_func" >&5
30891echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
30892if eval "test \"\${$as_ac_var+set}\" = set"; then
30893  echo $ECHO_N "(cached) $ECHO_C" >&6
30894else
30895  cat >conftest.$ac_ext <<_ACEOF
30896#line 30896 "configure"
30897#include "confdefs.h"
30898#define $ac_func autoconf_temporary
30899#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
30900#undef $ac_func
30901
30902#ifdef __cplusplus
30903extern "C"
30904#endif
30905
30906/* We use char because int might match the return type of a gcc2
30907   builtin and then its argument prototype would still apply.  */
30908char $ac_func (void);
30909
30910int
30911main (void)
30912{
30913
30914/* The GNU C library defines stubs for functions which it implements
30915    to always fail with ENOSYS.  Some functions are actually named
30916    something starting with __ and the normal name is an alias.  */
30917#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
30918#error found stub for $ac_func
30919#endif
30920
30921	return $ac_func ();
30922  ;
30923  return 0;
30924}
30925_ACEOF
30926rm -f conftest.$ac_objext conftest$ac_exeext
30927if { (eval echo "$as_me:30927: \"$ac_link\"") >&5
30928  (eval $ac_link) 2>&5
30929  ac_status=$?
30930  echo "$as_me:30930: \$? = $ac_status" >&5
30931  (exit $ac_status); } &&
30932         { ac_try='test -s conftest$ac_exeext'
30933  { (eval echo "$as_me:30933: \"$ac_try\"") >&5
30934  (eval $ac_try) 2>&5
30935  ac_status=$?
30936  echo "$as_me:30936: \$? = $ac_status" >&5
30937  (exit $ac_status); }; }; then
30938  eval "$as_ac_var=yes"
30939else
30940  echo "$as_me: failed program was:" >&5
30941cat conftest.$ac_ext >&5
30942eval "$as_ac_var=no"
30943fi
30944rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
30945fi
30946echo "$as_me:30946: result: `eval echo '${'$as_ac_var'}'`" >&5
30947echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
30948if test `eval echo '${'$as_ac_var'}'` = yes; then
30949  cat >>confdefs.h <<EOF
30950#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
30951EOF
30952
30953fi
30954done
30955
30956          LIBS="$gt_save_LIBS"
30957
30958          CATOBJEXT=.gmo
30959        fi
30960      elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
30961        { echo "$as_me:30961: WARNING: disabling NLS feature" >&5
30962echo "$as_me: WARNING: disabling NLS feature" >&2;}
30963        sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
30964        mv confdefs.tmp confdefs.h
30965        ALL_LINGUAS=
30966        CATOBJEXT=.ignored
30967        MSGFMT=":"
30968        GMSGFMT=":"
30969        XGETTEXT=":"
30970        POSUB=
30971        BUILD_INCLUDED_LIBINTL=no
30972        USE_INCLUDED_LIBINTL=no
30973        USE_NLS=no
30974        nls_cv_use_gnu_gettext=no
30975      fi
30976
30977      if test "$CATOBJEXT" = "NONE"; then
30978                        nls_cv_use_gnu_gettext=maybe
30979      fi
30980    fi
30981
30982    if test "$nls_cv_use_gnu_gettext" != "no"; then
30983      CATOBJEXT=.gmo
30984      if test -f $srcdir/intl/libintl.h ; then
30985                INTLOBJS="\$(GETTOBJS)"
30986        BUILD_INCLUDED_LIBINTL=yes
30987        USE_INCLUDED_LIBINTL=yes
30988        INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
30989        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
30990      elif test "$nls_cv_use_gnu_gettext" = "yes"; then
30991        nls_cv_use_gnu_gettext=no
30992        { echo "$as_me:30992: WARNING: no NLS library is packaged with this application" >&5
30993echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
30994      fi
30995    fi
30996
30997        if test "$GMSGFMT" != ":"; then
30998      if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
30999        : ;
31000      else
31001        { echo "$as_me:31001: WARNING: found msgfmt program is not GNU msgfmt" >&5
31002echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
31003      fi
31004    fi
31005
31006        if test "$XGETTEXT" != ":"; then
31007      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
31008        : ;
31009      else
31010        { echo "$as_me:31010: WARNING: found xgettext program is not GNU xgettext" >&5
31011echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
31012      fi
31013    fi
31014  fi
31015
31016  if test "$XGETTEXT" != ":"; then
31017    ac_config_commands="$ac_config_commands default-1"
31018
31019            if test "$PACKAGE" = gettext; then
31020      BUILD_INCLUDED_LIBINTL=yes
31021    fi
31022
31023                                            if test "$nls_cv_use_gnu_gettext" = "yes"; then
31024      for ac_prog in bison
31025do
31026  # Extract the first word of "$ac_prog", so it can be a program name with args.
31027set dummy $ac_prog; ac_word=$2
31028echo "$as_me:31028: checking for $ac_word" >&5
31029echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
31030if test "${ac_cv_prog_INTLBISON+set}" = set; then
31031  echo $ECHO_N "(cached) $ECHO_C" >&6
31032else
31033  if test -n "$INTLBISON"; then
31034  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
31035else
31036  ac_save_IFS=$IFS; IFS=$ac_path_separator
31037ac_dummy="$PATH"
31038for ac_dir in $ac_dummy; do
31039  IFS=$ac_save_IFS
31040  test -z "$ac_dir" && ac_dir=.
31041  $as_executable_p "$ac_dir/$ac_word" || continue
31042ac_cv_prog_INTLBISON="$ac_prog"
31043echo "$as_me:31043: found $ac_dir/$ac_word" >&5
31044break
31045done
31046
31047fi
31048fi
31049INTLBISON=$ac_cv_prog_INTLBISON
31050if test -n "$INTLBISON"; then
31051  echo "$as_me:31051: result: $INTLBISON" >&5
31052echo "${ECHO_T}$INTLBISON" >&6
31053else
31054  echo "$as_me:31054: result: no" >&5
31055echo "${ECHO_T}no" >&6
31056fi
31057
31058  test -n "$INTLBISON" && break
31059done
31060
31061      if test -z "$INTLBISON"; then
31062        ac_verc_fail=yes
31063      else
31064                echo "$as_me:31064: checking version of bison" >&5
31065echo $ECHO_N "checking version of bison... $ECHO_C" >&6
31066        ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
31067        case $ac_prog_version in
31068          '') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
31069          1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
31070             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
31071          *) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
31072        esac
31073      echo "$as_me:31073: result: $ac_prog_version" >&5
31074echo "${ECHO_T}$ac_prog_version" >&6
31075      fi
31076      if test $ac_verc_fail = yes; then
31077        INTLBISON=:
31078      fi
31079    fi
31080
31081                for lang in $ALL_LINGUAS; do
31082      GMOFILES="$GMOFILES $lang.gmo"
31083      POFILES="$POFILES $lang.po"
31084    done
31085  fi
31086
31087    nls_cv_header_intl=
31088  nls_cv_header_libgt=
31089
31090    DATADIRNAME=share
31091
31092    INSTOBJEXT=.mo
31093
31094    GENCAT=gencat
31095
31096   if test "x$CATOBJEXT" != "x"; then
31097     if test "x$ALL_LINGUAS" = "x"; then
31098       LINGUAS=
31099     else
31100       echo "$as_me:31100: checking for catalogs to be installed" >&5
31101echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
31102       NEW_LINGUAS=
31103       for presentlang in $ALL_LINGUAS; do
31104         useit=no
31105         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
31106           # Use the presentlang catalog if desiredlang is
31107           #   a. equal to presentlang, or
31108           #   b. a variant of presentlang (because in this case,
31109           #      presentlang can be used as a fallback for messages
31110           #      which are not translated in the desiredlang catalog).
31111           case "$desiredlang" in
31112             "$presentlang"*) useit=yes;;
31113           esac
31114         done
31115         if test $useit = yes; then
31116           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
31117         fi
31118       done
31119       LINGUAS=$NEW_LINGUAS
31120       echo "$as_me:31120: result: $LINGUAS" >&5
31121echo "${ECHO_T}$LINGUAS" >&6
31122     fi
31123
31124          if test -n "$LINGUAS"; then
31125       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
31126     fi
31127   fi
31128
31129      INTL_LIBTOOL_SUFFIX_PREFIX=
31130
31131if test "$USE_NLS" = yes ; then
31132
31133# Check whether --with-textdomain or --without-textdomain was given.
31134if test "${with_textdomain+set}" = set; then
31135  withval="$with_textdomain"
31136  NLS_TEXTDOMAIN=$withval
31137else
31138  NLS_TEXTDOMAIN=$PACKAGE
31139fi;
31140
31141cat >>confdefs.h <<EOF
31142#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
31143EOF
31144
31145fi
31146
31147INTLDIR_MAKE=
31148MSG_DIR_MAKE=
31149SUB_MAKEFILE=
31150
31151cf_makefile=Makefile
31152
31153use_our_messages=no
31154if test "$USE_NLS" = yes ; then
31155if test -d $srcdir/po ; then
31156echo "$as_me:31156: checking if we should use included message-library" >&5
31157echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
31158
31159# Check whether --enable-included-msgs or --disable-included-msgs was given.
31160if test "${enable_included_msgs+set}" = set; then
31161  enableval="$enable_included_msgs"
31162  use_our_messages=$enableval
31163else
31164  use_our_messages=yes
31165fi;
31166fi
31167echo "$as_me:31167: result: $use_our_messages" >&5
31168echo "${ECHO_T}$use_our_messages" >&6
31169fi
31170
31171MSG_DIR_MAKE="#"
31172if test "$use_our_messages" = yes
31173then
31174	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
31175	MSG_DIR_MAKE=
31176fi
31177
31178if test "$USE_INCLUDED_LIBINTL" = yes ; then
31179	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
31180		:
31181	elif test "$nls_cv_use_gnu_gettext" = yes ; then
31182		:
31183	else
31184		INTLDIR_MAKE="#"
31185	fi
31186	if test -z "$INTLDIR_MAKE"; then
31187
31188cat >>confdefs.h <<\EOF
31189#define HAVE_LIBGETTEXT_H 1
31190EOF
31191
31192		for cf_makefile in \
31193			$srcdir/intl/Makefile.in \
31194			$srcdir/intl/makefile.in
31195		do
31196			if test -f "$cf_makefile" ; then
31197				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
31198				break
31199			fi
31200		done
31201	fi
31202else
31203	INTLDIR_MAKE="#"
31204	if test "$USE_NLS" = yes ; then
31205
31206for ac_header in libintl.h
31207do
31208as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31209echo "$as_me:31209: checking for $ac_header" >&5
31210echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31211if eval "test \"\${$as_ac_Header+set}\" = set"; then
31212  echo $ECHO_N "(cached) $ECHO_C" >&6
31213else
31214  cat >conftest.$ac_ext <<_ACEOF
31215#line 31215 "configure"
31216#include "confdefs.h"
31217#include <$ac_header>
31218_ACEOF
31219if { (eval echo "$as_me:31219: \"$ac_cpp conftest.$ac_ext\"") >&5
31220  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31221  ac_status=$?
31222  egrep -v '^ *\+' conftest.er1 >conftest.err
31223  rm -f conftest.er1
31224  cat conftest.err >&5
31225  echo "$as_me:31225: \$? = $ac_status" >&5
31226  (exit $ac_status); } >/dev/null; then
31227  if test -s conftest.err; then
31228    ac_cpp_err=$ac_c_preproc_warn_flag
31229  else
31230    ac_cpp_err=
31231  fi
31232else
31233  ac_cpp_err=yes
31234fi
31235if test -z "$ac_cpp_err"; then
31236  eval "$as_ac_Header=yes"
31237else
31238  echo "$as_me: failed program was:" >&5
31239  cat conftest.$ac_ext >&5
31240  eval "$as_ac_Header=no"
31241fi
31242rm -f conftest.err conftest.$ac_ext
31243fi
31244echo "$as_me:31244: result: `eval echo '${'$as_ac_Header'}'`" >&5
31245echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31246if test `eval echo '${'$as_ac_Header'}'` = yes; then
31247  cat >>confdefs.h <<EOF
31248#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31249EOF
31250
31251fi
31252done
31253
31254	fi
31255fi
31256
31257if test -z "$INTLDIR_MAKE" ; then
31258
31259	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
31260	CPPFLAGS="${CPPFLAGS}-I../intl"
31261
31262fi
31263
31264if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
31265	GT_YES="#"
31266	GT_NO=
31267else
31268	GT_YES=
31269	GT_NO="#"
31270fi
31271
31272if test "$USE_INCLUDED_LIBINTL" = yes ; then
31273	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
31274
31275cat >>confdefs.h <<\EOF
31276#define HAVE_GETTEXT 1
31277EOF
31278
31279	elif test "$nls_cv_use_gnu_gettext" = yes ; then
31280
31281cat >>confdefs.h <<\EOF
31282#define HAVE_GETTEXT 1
31283EOF
31284
31285	fi
31286	if test -n "$nls_cv_header_intl" ; then
31287
31288cat >>confdefs.h <<\EOF
31289#define HAVE_LIBINTL_H 1
31290EOF
31291
31292	fi
31293fi
31294
31295LIBS="$LIBS $LIBICONV"
31296
31297### check for alloca (required for bison and/or intl/*)
31298case "$YACC" in
31299bison*)
31300	use_alloca=yes
31301	;;
31302*)
31303	use_alloca=$USE_INCLUDED_LIBINTL
31304	;;
31305esac
31306
31307if test ".$use_alloca" = .yes ; then
31308
31309# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
31310# for constant arguments.  Useless!
31311echo "$as_me:31311: checking for working alloca.h" >&5
31312echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
31313if test "${ac_cv_working_alloca_h+set}" = set; then
31314  echo $ECHO_N "(cached) $ECHO_C" >&6
31315else
31316  cat >conftest.$ac_ext <<_ACEOF
31317#line 31317 "configure"
31318#include "confdefs.h"
31319#include <alloca.h>
31320int
31321main (void)
31322{
31323char *p = (char *) alloca (2 * sizeof (int));
31324  ;
31325  return 0;
31326}
31327_ACEOF
31328rm -f conftest.$ac_objext conftest$ac_exeext
31329if { (eval echo "$as_me:31329: \"$ac_link\"") >&5
31330  (eval $ac_link) 2>&5
31331  ac_status=$?
31332  echo "$as_me:31332: \$? = $ac_status" >&5
31333  (exit $ac_status); } &&
31334         { ac_try='test -s conftest$ac_exeext'
31335  { (eval echo "$as_me:31335: \"$ac_try\"") >&5
31336  (eval $ac_try) 2>&5
31337  ac_status=$?
31338  echo "$as_me:31338: \$? = $ac_status" >&5
31339  (exit $ac_status); }; }; then
31340  ac_cv_working_alloca_h=yes
31341else
31342  echo "$as_me: failed program was:" >&5
31343cat conftest.$ac_ext >&5
31344ac_cv_working_alloca_h=no
31345fi
31346rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31347fi
31348echo "$as_me:31348: result: $ac_cv_working_alloca_h" >&5
31349echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
31350if test $ac_cv_working_alloca_h = yes; then
31351
31352cat >>confdefs.h <<\EOF
31353#define HAVE_ALLOCA_H 1
31354EOF
31355
31356fi
31357
31358echo "$as_me:31358: checking for alloca" >&5
31359echo $ECHO_N "checking for alloca... $ECHO_C" >&6
31360if test "${ac_cv_func_alloca_works+set}" = set; then
31361  echo $ECHO_N "(cached) $ECHO_C" >&6
31362else
31363  cat >conftest.$ac_ext <<_ACEOF
31364#line 31364 "configure"
31365#include "confdefs.h"
31366#ifdef __GNUC__
31367# define alloca __builtin_alloca
31368#else
31369# ifdef _MSC_VER
31370#  include <malloc.h>
31371#  define alloca _alloca
31372# else
31373#  if HAVE_ALLOCA_H
31374#   include <alloca.h>
31375#  else
31376#   ifdef _AIX
31377 #pragma alloca
31378#   else
31379#    ifndef alloca /* predefined by HP cc +Olibcalls */
31380char *alloca ();
31381#    endif
31382#   endif
31383#  endif
31384# endif
31385#endif
31386
31387int
31388main (void)
31389{
31390char *p = (char *) alloca (1);
31391  ;
31392  return 0;
31393}
31394_ACEOF
31395rm -f conftest.$ac_objext conftest$ac_exeext
31396if { (eval echo "$as_me:31396: \"$ac_link\"") >&5
31397  (eval $ac_link) 2>&5
31398  ac_status=$?
31399  echo "$as_me:31399: \$? = $ac_status" >&5
31400  (exit $ac_status); } &&
31401         { ac_try='test -s conftest$ac_exeext'
31402  { (eval echo "$as_me:31402: \"$ac_try\"") >&5
31403  (eval $ac_try) 2>&5
31404  ac_status=$?
31405  echo "$as_me:31405: \$? = $ac_status" >&5
31406  (exit $ac_status); }; }; then
31407  ac_cv_func_alloca_works=yes
31408else
31409  echo "$as_me: failed program was:" >&5
31410cat conftest.$ac_ext >&5
31411ac_cv_func_alloca_works=no
31412fi
31413rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31414fi
31415echo "$as_me:31415: result: $ac_cv_func_alloca_works" >&5
31416echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
31417
31418if test $ac_cv_func_alloca_works = yes; then
31419
31420cat >>confdefs.h <<\EOF
31421#define HAVE_ALLOCA 1
31422EOF
31423
31424else
31425  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
31426# that cause trouble.  Some versions do not even contain alloca or
31427# contain a buggy version.  If you still want to use their alloca,
31428# use ar to extract alloca.o from them instead of compiling alloca.c.
31429
31430ALLOCA=alloca.$ac_objext
31431
31432cat >>confdefs.h <<\EOF
31433#define C_ALLOCA 1
31434EOF
31435
31436echo "$as_me:31436: checking whether \`alloca.c' needs Cray hooks" >&5
31437echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
31438if test "${ac_cv_os_cray+set}" = set; then
31439  echo $ECHO_N "(cached) $ECHO_C" >&6
31440else
31441  cat >conftest.$ac_ext <<_ACEOF
31442#line 31442 "configure"
31443#include "confdefs.h"
31444#if defined(CRAY) && ! defined(CRAY2)
31445webecray
31446#else
31447wenotbecray
31448#endif
31449
31450_ACEOF
31451if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31452  egrep "webecray" >/dev/null 2>&1; then
31453  ac_cv_os_cray=yes
31454else
31455  ac_cv_os_cray=no
31456fi
31457rm -rf conftest*
31458
31459fi
31460echo "$as_me:31460: result: $ac_cv_os_cray" >&5
31461echo "${ECHO_T}$ac_cv_os_cray" >&6
31462if test $ac_cv_os_cray = yes; then
31463  for ac_func in _getb67 GETB67 getb67; do
31464    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
31465echo "$as_me:31465: checking for $ac_func" >&5
31466echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
31467if eval "test \"\${$as_ac_var+set}\" = set"; then
31468  echo $ECHO_N "(cached) $ECHO_C" >&6
31469else
31470  cat >conftest.$ac_ext <<_ACEOF
31471#line 31471 "configure"
31472#include "confdefs.h"
31473#define $ac_func autoconf_temporary
31474#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
31475#undef $ac_func
31476
31477#ifdef __cplusplus
31478extern "C"
31479#endif
31480
31481/* We use char because int might match the return type of a gcc2
31482   builtin and then its argument prototype would still apply.  */
31483char $ac_func (void);
31484
31485int
31486main (void)
31487{
31488
31489/* The GNU C library defines stubs for functions which it implements
31490    to always fail with ENOSYS.  Some functions are actually named
31491    something starting with __ and the normal name is an alias.  */
31492#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
31493#error found stub for $ac_func
31494#endif
31495
31496	return $ac_func ();
31497  ;
31498  return 0;
31499}
31500_ACEOF
31501rm -f conftest.$ac_objext conftest$ac_exeext
31502if { (eval echo "$as_me:31502: \"$ac_link\"") >&5
31503  (eval $ac_link) 2>&5
31504  ac_status=$?
31505  echo "$as_me:31505: \$? = $ac_status" >&5
31506  (exit $ac_status); } &&
31507         { ac_try='test -s conftest$ac_exeext'
31508  { (eval echo "$as_me:31508: \"$ac_try\"") >&5
31509  (eval $ac_try) 2>&5
31510  ac_status=$?
31511  echo "$as_me:31511: \$? = $ac_status" >&5
31512  (exit $ac_status); }; }; then
31513  eval "$as_ac_var=yes"
31514else
31515  echo "$as_me: failed program was:" >&5
31516cat conftest.$ac_ext >&5
31517eval "$as_ac_var=no"
31518fi
31519rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
31520fi
31521echo "$as_me:31521: result: `eval echo '${'$as_ac_var'}'`" >&5
31522echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
31523if test `eval echo '${'$as_ac_var'}'` = yes; then
31524
31525cat >>confdefs.h <<EOF
31526#define CRAY_STACKSEG_END $ac_func
31527EOF
31528
31529    break
31530fi
31531
31532  done
31533fi
31534
31535echo "$as_me:31535: checking stack direction for C alloca" >&5
31536echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
31537if test "${ac_cv_c_stack_direction+set}" = set; then
31538  echo $ECHO_N "(cached) $ECHO_C" >&6
31539else
31540  if test "$cross_compiling" = yes; then
31541  ac_cv_c_stack_direction=0
31542else
31543  cat >conftest.$ac_ext <<_ACEOF
31544#line 31544 "configure"
31545#include "confdefs.h"
31546int
31547find_stack_direction (void)
31548{
31549  static char *addr = 0;
31550  auto char dummy;
31551  if (addr == 0)
31552    {
31553      addr = &dummy;
31554      return find_stack_direction ();
31555    }
31556  else
31557    return (&dummy > addr) ? 1 : -1;
31558}
31559
31560int
31561main (void)
31562{
31563  $ac_main_return (find_stack_direction () < 0);
31564}
31565_ACEOF
31566rm -f conftest$ac_exeext
31567if { (eval echo "$as_me:31567: \"$ac_link\"") >&5
31568  (eval $ac_link) 2>&5
31569  ac_status=$?
31570  echo "$as_me:31570: \$? = $ac_status" >&5
31571  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31572  { (eval echo "$as_me:31572: \"$ac_try\"") >&5
31573  (eval $ac_try) 2>&5
31574  ac_status=$?
31575  echo "$as_me:31575: \$? = $ac_status" >&5
31576  (exit $ac_status); }; }; then
31577  ac_cv_c_stack_direction=1
31578else
31579  echo "$as_me: program exited with status $ac_status" >&5
31580echo "$as_me: failed program was:" >&5
31581cat conftest.$ac_ext >&5
31582ac_cv_c_stack_direction=-1
31583fi
31584rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31585fi
31586fi
31587echo "$as_me:31587: result: $ac_cv_c_stack_direction" >&5
31588echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
31589
31590cat >>confdefs.h <<EOF
31591#define STACK_DIRECTION $ac_cv_c_stack_direction
31592EOF
31593
31594fi
31595
31596case $host_os in
31597linux*|gnu*)
31598	# workaround for bison 1.875c (compound breakage in Linux stdlib.h
31599	# and bison's output make bison try to use alloca()).
31600	if test -z "$GCC" ; then
31601		CPPFLAGS="$CPPFLAGS -DYYSTACK_USE_ALLOCA=0"
31602		ALLOCA=""
31603	elif test "$INTEL_COMPILER" = yes ; then
31604		CPPFLAGS="$CPPFLAGS -DYYSTACK_USE_ALLOCA=0"
31605		ALLOCA=""
31606	fi
31607	;;
31608esac
31609
31610else
31611	ALLOCA=""
31612
31613fi
31614
31615# if struct hostent contains h_addr_list or not (SunOS-3.5)
31616echo "$as_me:31616: checking for h_addr_list in struct hostent" >&5
31617echo $ECHO_N "checking for h_addr_list in struct hostent... $ECHO_C" >&6
31618cat >conftest.$ac_ext <<_ACEOF
31619#line 31619 "configure"
31620#include "confdefs.h"
31621
31622#ifdef HAVE_NETDB_H
31623#include <netdb.h>
31624#endif
31625
31626int
31627main (void)
31628{
31629
31630struct hostent h;
31631h.h_addr_list[0]=0;
31632
31633  ;
31634  return 0;
31635}
31636_ACEOF
31637rm -f conftest.$ac_objext
31638if { (eval echo "$as_me:31638: \"$ac_compile\"") >&5
31639  (eval $ac_compile) 2>&5
31640  ac_status=$?
31641  echo "$as_me:31641: \$? = $ac_status" >&5
31642  (exit $ac_status); } &&
31643         { ac_try='test -s conftest.$ac_objext'
31644  { (eval echo "$as_me:31644: \"$ac_try\"") >&5
31645  (eval $ac_try) 2>&5
31646  ac_status=$?
31647  echo "$as_me:31647: \$? = $ac_status" >&5
31648  (exit $ac_status); }; }; then
31649  ac_cv_hostent_h_addr_list=yes
31650else
31651  echo "$as_me: failed program was:" >&5
31652cat conftest.$ac_ext >&5
31653ac_cv_hostent_h_addr_list=no
31654fi
31655rm -f conftest.$ac_objext conftest.$ac_ext
31656echo "$as_me:31656: result: $ac_cv_hostent_h_addr_list" >&5
31657echo "${ECHO_T}$ac_cv_hostent_h_addr_list" >&6
31658if test $ac_cv_hostent_h_addr_list = yes; then
31659
31660cat >>confdefs.h <<\EOF
31661#define HAVE_HOSTENT_H_ADDR_LIST 1
31662EOF
31663
31664fi
31665
31666for ac_header in X11/Xpoll.h
31667do
31668as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31669echo "$as_me:31669: checking for $ac_header" >&5
31670echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31671if eval "test \"\${$as_ac_Header+set}\" = set"; then
31672  echo $ECHO_N "(cached) $ECHO_C" >&6
31673else
31674  cat >conftest.$ac_ext <<_ACEOF
31675#line 31675 "configure"
31676#include "confdefs.h"
31677#include <$ac_header>
31678_ACEOF
31679if { (eval echo "$as_me:31679: \"$ac_cpp conftest.$ac_ext\"") >&5
31680  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
31681  ac_status=$?
31682  egrep -v '^ *\+' conftest.er1 >conftest.err
31683  rm -f conftest.er1
31684  cat conftest.err >&5
31685  echo "$as_me:31685: \$? = $ac_status" >&5
31686  (exit $ac_status); } >/dev/null; then
31687  if test -s conftest.err; then
31688    ac_cpp_err=$ac_c_preproc_warn_flag
31689  else
31690    ac_cpp_err=
31691  fi
31692else
31693  ac_cpp_err=yes
31694fi
31695if test -z "$ac_cpp_err"; then
31696  eval "$as_ac_Header=yes"
31697else
31698  echo "$as_me: failed program was:" >&5
31699  cat conftest.$ac_ext >&5
31700  eval "$as_ac_Header=no"
31701fi
31702rm -f conftest.err conftest.$ac_ext
31703fi
31704echo "$as_me:31704: result: `eval echo '${'$as_ac_Header'}'`" >&5
31705echo "${ECHO_T}`eval echo '${'$as_ac_Header'}'`" >&6
31706if test `eval echo '${'$as_ac_Header'}'` = yes; then
31707  cat >>confdefs.h <<EOF
31708#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31709EOF
31710
31711fi
31712done
31713
31714echo "$as_me:31714: checking for declaration of fd_set" >&5
31715echo $ECHO_N "checking for declaration of fd_set... $ECHO_C" >&6
31716if test "${cf_cv_type_fd_set+set}" = set; then
31717  echo $ECHO_N "(cached) $ECHO_C" >&6
31718else
31719
31720echo "${as_me:-configure}:31720: testing sys/types alone ..." 1>&5
31721
31722cat >conftest.$ac_ext <<_ACEOF
31723#line 31723 "configure"
31724#include "confdefs.h"
31725
31726#include <sys/types.h>
31727int
31728main (void)
31729{
31730fd_set x; (void)x
31731  ;
31732  return 0;
31733}
31734_ACEOF
31735rm -f conftest.$ac_objext
31736if { (eval echo "$as_me:31736: \"$ac_compile\"") >&5
31737  (eval $ac_compile) 2>&5
31738  ac_status=$?
31739  echo "$as_me:31739: \$? = $ac_status" >&5
31740  (exit $ac_status); } &&
31741         { ac_try='test -s conftest.$ac_objext'
31742  { (eval echo "$as_me:31742: \"$ac_try\"") >&5
31743  (eval $ac_try) 2>&5
31744  ac_status=$?
31745  echo "$as_me:31745: \$? = $ac_status" >&5
31746  (exit $ac_status); }; }; then
31747  cf_cv_type_fd_set=sys/types.h
31748else
31749  echo "$as_me: failed program was:" >&5
31750cat conftest.$ac_ext >&5
31751
31752echo "${as_me:-configure}:31752: testing X11/Xpoll.h ..." 1>&5
31753
31754cat >conftest.$ac_ext <<_ACEOF
31755#line 31755 "configure"
31756#include "confdefs.h"
31757
31758#ifdef HAVE_X11_XPOLL_H
31759#include <X11/Xpoll.h>
31760#endif
31761int
31762main (void)
31763{
31764fd_set x; (void)x
31765  ;
31766  return 0;
31767}
31768_ACEOF
31769rm -f conftest.$ac_objext
31770if { (eval echo "$as_me:31770: \"$ac_compile\"") >&5
31771  (eval $ac_compile) 2>&5
31772  ac_status=$?
31773  echo "$as_me:31773: \$? = $ac_status" >&5
31774  (exit $ac_status); } &&
31775         { ac_try='test -s conftest.$ac_objext'
31776  { (eval echo "$as_me:31776: \"$ac_try\"") >&5
31777  (eval $ac_try) 2>&5
31778  ac_status=$?
31779  echo "$as_me:31779: \$? = $ac_status" >&5
31780  (exit $ac_status); }; }; then
31781  cf_cv_type_fd_set=X11/Xpoll.h
31782else
31783  echo "$as_me: failed program was:" >&5
31784cat conftest.$ac_ext >&5
31785
31786echo "${as_me:-configure}:31786: testing sys/select.h ..." 1>&5
31787
31788cat >conftest.$ac_ext <<_ACEOF
31789#line 31789 "configure"
31790#include "confdefs.h"
31791
31792#include <sys/types.h>
31793#include <sys/select.h>
31794int
31795main (void)
31796{
31797fd_set x; (void)x
31798  ;
31799  return 0;
31800}
31801_ACEOF
31802rm -f conftest.$ac_objext
31803if { (eval echo "$as_me:31803: \"$ac_compile\"") >&5
31804  (eval $ac_compile) 2>&5
31805  ac_status=$?
31806  echo "$as_me:31806: \$? = $ac_status" >&5
31807  (exit $ac_status); } &&
31808         { ac_try='test -s conftest.$ac_objext'
31809  { (eval echo "$as_me:31809: \"$ac_try\"") >&5
31810  (eval $ac_try) 2>&5
31811  ac_status=$?
31812  echo "$as_me:31812: \$? = $ac_status" >&5
31813  (exit $ac_status); }; }; then
31814  cf_cv_type_fd_set=sys/select.h
31815else
31816  echo "$as_me: failed program was:" >&5
31817cat conftest.$ac_ext >&5
31818cf_cv_type_fd_set=unknown
31819fi
31820rm -f conftest.$ac_objext conftest.$ac_ext
31821fi
31822rm -f conftest.$ac_objext conftest.$ac_ext
31823fi
31824rm -f conftest.$ac_objext conftest.$ac_ext
31825fi
31826echo "$as_me:31826: result: $cf_cv_type_fd_set" >&5
31827echo "${ECHO_T}$cf_cv_type_fd_set" >&6
31828if test $cf_cv_type_fd_set = sys/select.h ; then
31829
31830cat >>confdefs.h <<\EOF
31831#define USE_SYS_SELECT_H 1
31832EOF
31833
31834fi
31835
31836echo "$as_me:31836: checking for fd_set macros" >&5
31837echo $ECHO_N "checking for fd_set macros... $ECHO_C" >&6
31838if test "${cf_cv_macros_fd_set+set}" = set; then
31839  echo $ECHO_N "(cached) $ECHO_C" >&6
31840else
31841
31842cat >conftest.$ac_ext <<_ACEOF
31843#line 31843 "configure"
31844#include "confdefs.h"
31845
31846#include <sys/types.h>
31847#if USE_SYS_SELECT_H
31848# include <sys/select.h>
31849#else
31850# ifdef HAVE_SYS_TIME_H
31851#  include <sys/time.h>
31852#  ifdef TIME_WITH_SYS_TIME
31853#   include <time.h>
31854#  endif
31855# else
31856#  include <time.h>
31857# endif
31858#endif
31859
31860int
31861main (void)
31862{
31863
31864	fd_set read_bits;
31865	FD_ZERO(&read_bits);
31866	FD_SET(0, &read_bits);
31867  ;
31868  return 0;
31869}
31870_ACEOF
31871rm -f conftest.$ac_objext
31872if { (eval echo "$as_me:31872: \"$ac_compile\"") >&5
31873  (eval $ac_compile) 2>&5
31874  ac_status=$?
31875  echo "$as_me:31875: \$? = $ac_status" >&5
31876  (exit $ac_status); } &&
31877         { ac_try='test -s conftest.$ac_objext'
31878  { (eval echo "$as_me:31878: \"$ac_try\"") >&5
31879  (eval $ac_try) 2>&5
31880  ac_status=$?
31881  echo "$as_me:31881: \$? = $ac_status" >&5
31882  (exit $ac_status); }; }; then
31883  cf_cv_macros_fd_set=yes
31884else
31885  echo "$as_me: failed program was:" >&5
31886cat conftest.$ac_ext >&5
31887cf_cv_macros_fd_set=no
31888fi
31889rm -f conftest.$ac_objext conftest.$ac_ext
31890fi
31891echo "$as_me:31891: result: $cf_cv_macros_fd_set" >&5
31892echo "${ECHO_T}$cf_cv_macros_fd_set" >&6
31893test $cf_cv_macros_fd_set = yes &&
31894cat >>confdefs.h <<\EOF
31895#define HAVE_TYPE_FD_SET 1
31896EOF
31897
31898# tolower() is known to be broken on 4.2BSD by
31899# not checking if input is an uppercase letter
31900# /* #define tolower(c)	((c)-'A'+'a') */
31901echo "$as_me:31901: checking for working tolower()" >&5
31902echo $ECHO_N "checking for working tolower()... $ECHO_C" >&6
31903if test "$cross_compiling" = yes; then
31904
31905                echo "$as_me:31905: result: unknown" >&5
31906echo "${ECHO_T}unknown" >&6
31907
31908else
31909  cat >conftest.$ac_ext <<_ACEOF
31910#line 31910 "configure"
31911#include "confdefs.h"
31912
31913#include <ctype.h>
31914int main() {
31915	unsigned char str;
31916
31917	for (str = 1; str < 127; str++) {
31918	        if ((char) tolower(str) != ((str >= 'A' && str <= 'Z') ? ((unsigned char) (str - 'A' + 'a')) : str))
31919			return 1;
31920	}
31921	return 0;
31922}
31923_ACEOF
31924rm -f conftest$ac_exeext
31925if { (eval echo "$as_me:31925: \"$ac_link\"") >&5
31926  (eval $ac_link) 2>&5
31927  ac_status=$?
31928  echo "$as_me:31928: \$? = $ac_status" >&5
31929  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31930  { (eval echo "$as_me:31930: \"$ac_try\"") >&5
31931  (eval $ac_try) 2>&5
31932  ac_status=$?
31933  echo "$as_me:31933: \$? = $ac_status" >&5
31934  (exit $ac_status); }; }; then
31935
31936                echo "$as_me:31936: result: yes" >&5
31937echo "${ECHO_T}yes" >&6
31938
31939else
31940  echo "$as_me: program exited with status $ac_status" >&5
31941echo "$as_me: failed program was:" >&5
31942cat conftest.$ac_ext >&5
31943
31944cat >>confdefs.h <<\EOF
31945#define TOLOWER_BROKEN 1
31946EOF
31947
31948                echo "$as_me:31948: result: no" >&5
31949echo "${ECHO_T}no" >&6
31950
31951fi
31952rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
31953fi
31954
31955# toupper is known to be broken on 4.2BSD by
31956# not checking if input is an lowercase letter
31957# /* #define toupper(c)	((c)-'a'+'A') */
31958echo "$as_me:31958: checking for working toupper()" >&5
31959echo $ECHO_N "checking for working toupper()... $ECHO_C" >&6
31960if test "$cross_compiling" = yes; then
31961
31962                echo "$as_me:31962: result: unknown" >&5
31963echo "${ECHO_T}unknown" >&6
31964
31965else
31966  cat >conftest.$ac_ext <<_ACEOF
31967#line 31967 "configure"
31968#include "confdefs.h"
31969
31970#include <ctype.h>
31971int main() {
31972	unsigned char str;
31973
31974	for (str = 1; str < 127; str++) {
31975	        if ((char) toupper(str) != ((str >= 'a' && str <= 'z') ? ((unsigned char) (str - 'a' + 'A')) : str))
31976			return 1;
31977	}
31978	return 0;
31979}
31980_ACEOF
31981rm -f conftest$ac_exeext
31982if { (eval echo "$as_me:31982: \"$ac_link\"") >&5
31983  (eval $ac_link) 2>&5
31984  ac_status=$?
31985  echo "$as_me:31985: \$? = $ac_status" >&5
31986  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
31987  { (eval echo "$as_me:31987: \"$ac_try\"") >&5
31988  (eval $ac_try) 2>&5
31989  ac_status=$?
31990  echo "$as_me:31990: \$? = $ac_status" >&5
31991  (exit $ac_status); }; }; then
31992
31993                echo "$as_me:31993: result: yes" >&5
31994echo "${ECHO_T}yes" >&6
31995
31996else
31997  echo "$as_me: program exited with status $ac_status" >&5
31998echo "$as_me: failed program was:" >&5
31999cat conftest.$ac_ext >&5
32000
32001cat >>confdefs.h <<\EOF
32002#define TOUPPER_BROKEN 1
32003EOF
32004
32005                echo "$as_me:32005: result: no" >&5
32006echo "${ECHO_T}no" >&6
32007
32008fi
32009rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
32010fi
32011
32012for cf_hdr in iconv.h
32013do
32014	echo "$as_me:32014: checking for $cf_hdr" >&5
32015echo $ECHO_N "checking for $cf_hdr... $ECHO_C" >&6
32016	cat >conftest.$ac_ext <<_ACEOF
32017#line 32017 "configure"
32018#include "confdefs.h"
32019
32020#include <sys/types.h>
32021#include <$cf_hdr>
32022
32023_ACEOF
32024if { (eval echo "$as_me:32024: \"$ac_cpp conftest.$ac_ext\"") >&5
32025  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
32026  ac_status=$?
32027  egrep -v '^ *\+' conftest.er1 >conftest.err
32028  rm -f conftest.er1
32029  cat conftest.err >&5
32030  echo "$as_me:32030: \$? = $ac_status" >&5
32031  (exit $ac_status); } >/dev/null; then
32032  if test -s conftest.err; then
32033    ac_cpp_err=$ac_c_preproc_warn_flag
32034  else
32035    ac_cpp_err=
32036  fi
32037else
32038  ac_cpp_err=yes
32039fi
32040if test -z "$ac_cpp_err"; then
32041  cf_found=yes
32042else
32043  echo "$as_me: failed program was:" >&5
32044  cat conftest.$ac_ext >&5
32045  cf_found=no
32046fi
32047rm -f conftest.err conftest.$ac_ext
32048echo "$as_me:32048: result: $cf_found" >&5
32049echo "${ECHO_T}$cf_found" >&6
32050if test $cf_found = yes ; then
32051
32052cf_tr_hdr=`echo "$cf_hdr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
32053
32054	cat >>confdefs.h <<EOF
32055#define HAVE_${cf_tr_hdr} 1
32056EOF
32057
32058fi
32059done
32060
32061echo "$as_me:32061: checking for iconv_open() //TRANSLIT extension" >&5
32062echo $ECHO_N "checking for iconv_open() //TRANSLIT extension... $ECHO_C" >&6
32063if test "$cross_compiling" = yes; then
32064
32065		echo "$as_me:32065: result: unknown" >&5
32066echo "${ECHO_T}unknown" >&6
32067
32068else
32069  cat >conftest.$ac_ext <<_ACEOF
32070#line 32070 "configure"
32071#include "confdefs.h"
32072
32073#ifdef HAVE_ICONV_H
32074#	include <iconv.h>
32075#endif /* HAVE_ICONV_H */
32076#ifdef HAVE_STDLIB_H
32077#	include <stdlib.h>
32078#endif /* HAVE_STDLIB_H */
32079int main() {
32080	iconv_t cd;
32081
32082	if ((cd = iconv_open("US-ASCII//TRANSLIT", "ISO-8859-1")) == (iconv_t) (-1))
32083		exit(1);
32084	exit(0);
32085}
32086_ACEOF
32087rm -f conftest$ac_exeext
32088if { (eval echo "$as_me:32088: \"$ac_link\"") >&5
32089  (eval $ac_link) 2>&5
32090  ac_status=$?
32091  echo "$as_me:32091: \$? = $ac_status" >&5
32092  (exit $ac_status); } && { ac_try='./conftest$ac_exeext'
32093  { (eval echo "$as_me:32093: \"$ac_try\"") >&5
32094  (eval $ac_try) 2>&5
32095  ac_status=$?
32096  echo "$as_me:32096: \$? = $ac_status" >&5
32097  (exit $ac_status); }; }; then
32098
32099cat >>confdefs.h <<\EOF
32100#define HAVE_ICONV_OPEN_TRANSLIT 1
32101EOF
32102
32103		echo "$as_me:32103: result: yes" >&5
32104echo "${ECHO_T}yes" >&6
32105
32106else
32107  echo "$as_me: program exited with status $ac_status" >&5
32108echo "$as_me: failed program was:" >&5
32109cat conftest.$ac_ext >&5
32110
32111		echo "$as_me:32111: result: no" >&5
32112echo "${ECHO_T}no" >&6
32113
32114fi
32115rm -f core core.* *.core conftest$ac_exeext conftest.$ac_objext conftest.$ac_ext
32116fi
32117
32118# FIXME / TESTME
32119# locale is broken on cygwin < 1.7.0
32120# group/other bits don't work on cygwin < 1.7.0
32121# locking doesn't work on cygwin < 2.0 as link(2) is detected but doesn't work
32122case "$host_os" in
32123	*cygwin*)
32124		case `uname -r | sed 's,(.*,,'` in
32125			B*|1.0-6].*)
32126				# multiple defects
32127
32128cat >>confdefs.h <<\EOF
32129#define NO_LOCALE 1
32130EOF
32131
32132cat >>confdefs.h <<\EOF
32133#define NO_LOCKING 1
32134EOF
32135
32136cat >>confdefs.h <<\EOF
32137#define FILE_MODE_BROKEN 1
32138EOF
32139
32140				;;
32141			1.7.*)
32142				# link does not work
32143				cat >>confdefs.h <<\EOF
32144#define NO_LOCKING 1
32145EOF
32146
32147				;;
32148			*)
32149				echo "$as_me:32149: checking for link" >&5
32150echo $ECHO_N "checking for link... $ECHO_C" >&6
32151if test "${ac_cv_func_link+set}" = set; then
32152  echo $ECHO_N "(cached) $ECHO_C" >&6
32153else
32154  cat >conftest.$ac_ext <<_ACEOF
32155#line 32155 "configure"
32156#include "confdefs.h"
32157#define link autoconf_temporary
32158#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
32159#undef link
32160
32161#ifdef __cplusplus
32162extern "C"
32163#endif
32164
32165/* We use char because int might match the return type of a gcc2
32166   builtin and then its argument prototype would still apply.  */
32167char link (void);
32168
32169int
32170main (void)
32171{
32172
32173/* The GNU C library defines stubs for functions which it implements
32174    to always fail with ENOSYS.  Some functions are actually named
32175    something starting with __ and the normal name is an alias.  */
32176#if defined (__stub_link) || defined (__stub___link)
32177#error found stub for link
32178#endif
32179
32180	return link ();
32181  ;
32182  return 0;
32183}
32184_ACEOF
32185rm -f conftest.$ac_objext conftest$ac_exeext
32186if { (eval echo "$as_me:32186: \"$ac_link\"") >&5
32187  (eval $ac_link) 2>&5
32188  ac_status=$?
32189  echo "$as_me:32189: \$? = $ac_status" >&5
32190  (exit $ac_status); } &&
32191         { ac_try='test -s conftest$ac_exeext'
32192  { (eval echo "$as_me:32192: \"$ac_try\"") >&5
32193  (eval $ac_try) 2>&5
32194  ac_status=$?
32195  echo "$as_me:32195: \$? = $ac_status" >&5
32196  (exit $ac_status); }; }; then
32197  ac_cv_func_link=yes
32198else
32199  echo "$as_me: failed program was:" >&5
32200cat conftest.$ac_ext >&5
32201ac_cv_func_link=no
32202fi
32203rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32204fi
32205echo "$as_me:32205: result: $ac_cv_func_link" >&5
32206echo "${ECHO_T}$ac_cv_func_link" >&6
32207if test $ac_cv_func_link = yes; then
32208
32209cat >>confdefs.h <<\EOF
32210#define HAVE_LINK 1
32211EOF
32212
32213fi
32214
32215				;;
32216			esac
32217		;;
32218	*haiku*)
32219		# link does not work
32220		cat >>confdefs.h <<\EOF
32221#define NO_LOCKING 1
32222EOF
32223
32224		;;
32225	*)
32226		echo "$as_me:32226: checking for link" >&5
32227echo $ECHO_N "checking for link... $ECHO_C" >&6
32228if test "${ac_cv_func_link+set}" = set; then
32229  echo $ECHO_N "(cached) $ECHO_C" >&6
32230else
32231  cat >conftest.$ac_ext <<_ACEOF
32232#line 32232 "configure"
32233#include "confdefs.h"
32234#define link autoconf_temporary
32235#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
32236#undef link
32237
32238#ifdef __cplusplus
32239extern "C"
32240#endif
32241
32242/* We use char because int might match the return type of a gcc2
32243   builtin and then its argument prototype would still apply.  */
32244char link (void);
32245
32246int
32247main (void)
32248{
32249
32250/* The GNU C library defines stubs for functions which it implements
32251    to always fail with ENOSYS.  Some functions are actually named
32252    something starting with __ and the normal name is an alias.  */
32253#if defined (__stub_link) || defined (__stub___link)
32254#error found stub for link
32255#endif
32256
32257	return link ();
32258  ;
32259  return 0;
32260}
32261_ACEOF
32262rm -f conftest.$ac_objext conftest$ac_exeext
32263if { (eval echo "$as_me:32263: \"$ac_link\"") >&5
32264  (eval $ac_link) 2>&5
32265  ac_status=$?
32266  echo "$as_me:32266: \$? = $ac_status" >&5
32267  (exit $ac_status); } &&
32268         { ac_try='test -s conftest$ac_exeext'
32269  { (eval echo "$as_me:32269: \"$ac_try\"") >&5
32270  (eval $ac_try) 2>&5
32271  ac_status=$?
32272  echo "$as_me:32272: \$? = $ac_status" >&5
32273  (exit $ac_status); }; }; then
32274  ac_cv_func_link=yes
32275else
32276  echo "$as_me: failed program was:" >&5
32277cat conftest.$ac_ext >&5
32278ac_cv_func_link=no
32279fi
32280rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32281fi
32282echo "$as_me:32282: result: $ac_cv_func_link" >&5
32283echo "${ECHO_T}$ac_cv_func_link" >&6
32284if test $ac_cv_func_link = yes; then
32285  cat >>confdefs.h <<\EOF
32286#define HAVE_LINK 1
32287EOF
32288
32289fi
32290
32291esac
32292
32293if test "$cf_cv_termlib" = pdcurses ; then
32294
32295cf_x_athena=${cf_x_athena:-Xaw}
32296
32297echo "$as_me:32297: checking if you want to link with Xaw 3d library" >&5
32298echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
32299withval=
32300
32301# Check whether --with-Xaw3d or --without-Xaw3d was given.
32302if test "${with_Xaw3d+set}" = set; then
32303  withval="$with_Xaw3d"
32304
32305fi;
32306if test "$withval" = yes ; then
32307	cf_x_athena=Xaw3d
32308	echo "$as_me:32308: result: yes" >&5
32309echo "${ECHO_T}yes" >&6
32310else
32311	echo "$as_me:32311: result: no" >&5
32312echo "${ECHO_T}no" >&6
32313fi
32314
32315echo "$as_me:32315: checking if you want to link with Xaw 3d xft library" >&5
32316echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
32317withval=
32318
32319# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
32320if test "${with_Xaw3dxft+set}" = set; then
32321  withval="$with_Xaw3dxft"
32322
32323fi;
32324if test "$withval" = yes ; then
32325	cf_x_athena=Xaw3dxft
32326	echo "$as_me:32326: result: yes" >&5
32327echo "${ECHO_T}yes" >&6
32328else
32329	echo "$as_me:32329: result: no" >&5
32330echo "${ECHO_T}no" >&6
32331fi
32332
32333echo "$as_me:32333: checking if you want to link with neXT Athena library" >&5
32334echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
32335withval=
32336
32337# Check whether --with-neXtaw or --without-neXtaw was given.
32338if test "${with_neXtaw+set}" = set; then
32339  withval="$with_neXtaw"
32340
32341fi;
32342if test "$withval" = yes ; then
32343	cf_x_athena=neXtaw
32344	echo "$as_me:32344: result: yes" >&5
32345echo "${ECHO_T}yes" >&6
32346else
32347	echo "$as_me:32347: result: no" >&5
32348echo "${ECHO_T}no" >&6
32349fi
32350
32351echo "$as_me:32351: checking if you want to link with Athena-Plus library" >&5
32352echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
32353withval=
32354
32355# Check whether --with-XawPlus or --without-XawPlus was given.
32356if test "${with_XawPlus+set}" = set; then
32357  withval="$with_XawPlus"
32358
32359fi;
32360if test "$withval" = yes ; then
32361	cf_x_athena=XawPlus
32362	echo "$as_me:32362: result: yes" >&5
32363echo "${ECHO_T}yes" >&6
32364else
32365	echo "$as_me:32365: result: no" >&5
32366echo "${ECHO_T}no" >&6
32367fi
32368
32369cf_x_athena_lib=""
32370
32371if test "$PKG_CONFIG" != none ; then
32372	cf_athena_list=
32373	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
32374	for cf_athena_pkg in \
32375		$cf_athena_list \
32376		${cf_x_athena} \
32377		${cf_x_athena}-devel \
32378		lib${cf_x_athena} \
32379		lib${cf_x_athena}-devel
32380	do
32381
32382if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists $cf_athena_pkg; then
32383	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
32384
32385echo "${as_me:-configure}:32385: testing found package $cf_athena_pkg ..." 1>&5
32386
32387	cf_pkgconfig_incs="`$PKG_CONFIG --cflags $cf_athena_pkg 2>/dev/null`"
32388	cf_pkgconfig_libs="`$PKG_CONFIG --libs   $cf_athena_pkg 2>/dev/null`"
32389	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
32390
32391echo "${as_me:-configure}:32391: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
32392
32393	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
32394
32395echo "${as_me:-configure}:32395: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
32396
32397cf_fix_cppflags=no
32398cf_new_cflags=
32399cf_new_cppflags=
32400cf_new_extra_cppflags=
32401
32402for cf_add_cflags in $cf_pkgconfig_incs
32403do
32404case $cf_fix_cppflags in
32405no)
32406	case $cf_add_cflags in
32407	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
32408		case $cf_add_cflags in
32409		-D*)
32410			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
32411
32412			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32413				&& test -z "${cf_tst_cflags}" \
32414				&& cf_fix_cppflags=yes
32415
32416			if test $cf_fix_cppflags = yes ; then
32417
32418	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32419	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32420
32421				continue
32422			elif test "${cf_tst_cflags}" = "\"'" ; then
32423
32424	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32425	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32426
32427				continue
32428			fi
32429			;;
32430		esac
32431		case "$CPPFLAGS" in
32432		*$cf_add_cflags)
32433			;;
32434		*)
32435			case $cf_add_cflags in
32436			-D*)
32437				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
32438
32439CPPFLAGS=`echo "$CPPFLAGS" | \
32440	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
32441		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
32442
32443				;;
32444			esac
32445
32446	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
32447	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
32448
32449			;;
32450		esac
32451		;;
32452	*)
32453
32454	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
32455	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
32456
32457		;;
32458	esac
32459	;;
32460yes)
32461
32462	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32463	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32464
32465	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
32466
32467	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32468		&& test -z "${cf_tst_cflags}" \
32469		&& cf_fix_cppflags=no
32470	;;
32471esac
32472done
32473
32474if test -n "$cf_new_cflags" ; then
32475
32476	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
32477	CFLAGS="${CFLAGS}$cf_new_cflags"
32478
32479fi
32480
32481if test -n "$cf_new_cppflags" ; then
32482
32483	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
32484	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
32485
32486fi
32487
32488if test -n "$cf_new_extra_cppflags" ; then
32489
32490	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
32491	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
32492
32493fi
32494
32495cf_add_libs="$LIBS"
32496# reverse order
32497cf_add_0lib=
32498for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
32499# filter duplicates
32500for cf_add_1lib in $cf_add_0lib; do
32501	for cf_add_2lib in $cf_add_libs; do
32502		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
32503			cf_add_1lib=
32504			break
32505		fi
32506	done
32507	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
32508done
32509LIBS="$cf_add_libs"
32510
32511			cf_x_athena_lib="$cf_pkgconfig_libs"
32512
32513cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
32514
32515			cat >>confdefs.h <<EOF
32516#define $cf_x_athena_LIBS 1
32517EOF
32518
32519	for cf_trim_lib in Xmu Xt X11
32520	do
32521		case "$LIBS" in
32522		*-l$cf_trim_lib\ *-l$cf_trim_lib*)
32523			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
32524			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
32525
32526echo "${as_me:-configure}:32526: testing ..trimmed $LIBS ..." 1>&5
32527
32528			;;
32529		esac
32530	done
32531
32532echo "$as_me:32532: checking for usable $cf_x_athena/Xmu package" >&5
32533echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
32534if test "${cf_cv_xaw_compat+set}" = set; then
32535  echo $ECHO_N "(cached) $ECHO_C" >&6
32536else
32537
32538cat >conftest.$ac_ext <<_ACEOF
32539#line 32539 "configure"
32540#include "confdefs.h"
32541
32542#include <X11/Xmu/CharSet.h>
32543
32544int
32545main (void)
32546{
32547
32548int check = XmuCompareISOLatin1("big", "small");
32549(void)check;
32550
32551  ;
32552  return 0;
32553}
32554_ACEOF
32555rm -f conftest.$ac_objext conftest$ac_exeext
32556if { (eval echo "$as_me:32556: \"$ac_link\"") >&5
32557  (eval $ac_link) 2>&5
32558  ac_status=$?
32559  echo "$as_me:32559: \$? = $ac_status" >&5
32560  (exit $ac_status); } &&
32561         { ac_try='test -s conftest$ac_exeext'
32562  { (eval echo "$as_me:32562: \"$ac_try\"") >&5
32563  (eval $ac_try) 2>&5
32564  ac_status=$?
32565  echo "$as_me:32565: \$? = $ac_status" >&5
32566  (exit $ac_status); }; }; then
32567  cf_cv_xaw_compat=yes
32568else
32569  echo "$as_me: failed program was:" >&5
32570cat conftest.$ac_ext >&5
32571cf_cv_xaw_compat=no
32572fi
32573rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32574fi
32575echo "$as_me:32575: result: $cf_cv_xaw_compat" >&5
32576echo "${ECHO_T}$cf_cv_xaw_compat" >&6
32577
32578			if test "$cf_cv_xaw_compat" = no
32579			then
32580				# workaround for broken ".pc" files...
32581				case "$cf_x_athena_lib" in
32582				*-lXmu*)
32583					;;
32584				*)
32585					test -n "$verbose" && echo "	work around broken package" 1>&6
32586
32587echo "${as_me:-configure}:32587: testing work around broken package ..." 1>&5
32588
32589					cf_save_xmu="$LIBS"
32590					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
32591
32592if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xmu; then
32593	test -n "$verbose" && echo "	found package xmu" 1>&6
32594
32595echo "${as_me:-configure}:32595: testing found package xmu ..." 1>&5
32596
32597	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xmu 2>/dev/null`"
32598	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xmu 2>/dev/null`"
32599	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
32600
32601echo "${as_me:-configure}:32601: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
32602
32603	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
32604
32605echo "${as_me:-configure}:32605: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
32606
32607cf_fix_cppflags=no
32608cf_new_cflags=
32609cf_new_cppflags=
32610cf_new_extra_cppflags=
32611
32612for cf_add_cflags in $cf_pkgconfig_incs
32613do
32614case $cf_fix_cppflags in
32615no)
32616	case $cf_add_cflags in
32617	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
32618		case $cf_add_cflags in
32619		-D*)
32620			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
32621
32622			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32623				&& test -z "${cf_tst_cflags}" \
32624				&& cf_fix_cppflags=yes
32625
32626			if test $cf_fix_cppflags = yes ; then
32627
32628	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32629	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32630
32631				continue
32632			elif test "${cf_tst_cflags}" = "\"'" ; then
32633
32634	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32635	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32636
32637				continue
32638			fi
32639			;;
32640		esac
32641		case "$CPPFLAGS" in
32642		*$cf_add_cflags)
32643			;;
32644		*)
32645			case $cf_add_cflags in
32646			-D*)
32647				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
32648
32649CPPFLAGS=`echo "$CPPFLAGS" | \
32650	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
32651		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
32652
32653				;;
32654			esac
32655
32656	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
32657	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
32658
32659			;;
32660		esac
32661		;;
32662	*)
32663
32664	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
32665	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
32666
32667		;;
32668	esac
32669	;;
32670yes)
32671
32672	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32673	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32674
32675	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
32676
32677	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32678		&& test -z "${cf_tst_cflags}" \
32679		&& cf_fix_cppflags=no
32680	;;
32681esac
32682done
32683
32684if test -n "$cf_new_cflags" ; then
32685
32686	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
32687	CFLAGS="${CFLAGS}$cf_new_cflags"
32688
32689fi
32690
32691if test -n "$cf_new_cppflags" ; then
32692
32693	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
32694	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
32695
32696fi
32697
32698if test -n "$cf_new_extra_cppflags" ; then
32699
32700	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
32701	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
32702
32703fi
32704
32705cf_add_libs="$LIBS"
32706# reverse order
32707cf_add_0lib=
32708for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
32709# filter duplicates
32710for cf_add_1lib in $cf_add_0lib; do
32711	for cf_add_2lib in $cf_add_libs; do
32712		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
32713			cf_add_1lib=
32714			break
32715		fi
32716	done
32717	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
32718done
32719LIBS="$cf_add_libs"
32720
32721							LIBS="$cf_save_xmu"
32722
32723test -n "$verbose" && echo "	...before $LIBS" 1>&6
32724
32725echo "${as_me:-configure}:32725: testing ...before $LIBS ..." 1>&5
32726
32727LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
32728test -n "$verbose" && echo "	...after  $LIBS" 1>&6
32729
32730echo "${as_me:-configure}:32730: testing ...after  $LIBS ..." 1>&5
32731
32732else
32733	cf_pkgconfig_incs=
32734	cf_pkgconfig_libs=
32735
32736test -n "$verbose" && echo "	...before $LIBS" 1>&6
32737
32738echo "${as_me:-configure}:32738: testing ...before $LIBS ..." 1>&5
32739
32740LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
32741test -n "$verbose" && echo "	...after  $LIBS" 1>&6
32742
32743echo "${as_me:-configure}:32743: testing ...after  $LIBS ..." 1>&5
32744
32745fi
32746
32747	for cf_trim_lib in Xmu Xt X11
32748	do
32749		case "$LIBS" in
32750		*-l$cf_trim_lib\ *-l$cf_trim_lib*)
32751			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
32752			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
32753
32754echo "${as_me:-configure}:32754: testing ..trimmed $LIBS ..." 1>&5
32755
32756			;;
32757		esac
32758	done
32759
32760					;;
32761				esac
32762			fi
32763
32764			break
32765else
32766	cf_pkgconfig_incs=
32767	cf_pkgconfig_libs=
32768	:
32769fi
32770
32771	done
32772fi
32773
32774if test -z "$cf_x_athena_lib" ; then
32775
32776if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists Xext; then
32777	test -n "$verbose" && echo "	found package Xext" 1>&6
32778
32779echo "${as_me:-configure}:32779: testing found package Xext ..." 1>&5
32780
32781	cf_pkgconfig_incs="`$PKG_CONFIG --cflags Xext 2>/dev/null`"
32782	cf_pkgconfig_libs="`$PKG_CONFIG --libs   Xext 2>/dev/null`"
32783	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
32784
32785echo "${as_me:-configure}:32785: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
32786
32787	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
32788
32789echo "${as_me:-configure}:32789: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
32790
32791cf_fix_cppflags=no
32792cf_new_cflags=
32793cf_new_cppflags=
32794cf_new_extra_cppflags=
32795
32796for cf_add_cflags in $cf_pkgconfig_incs
32797do
32798case $cf_fix_cppflags in
32799no)
32800	case $cf_add_cflags in
32801	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
32802		case $cf_add_cflags in
32803		-D*)
32804			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
32805
32806			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32807				&& test -z "${cf_tst_cflags}" \
32808				&& cf_fix_cppflags=yes
32809
32810			if test $cf_fix_cppflags = yes ; then
32811
32812	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32813	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32814
32815				continue
32816			elif test "${cf_tst_cflags}" = "\"'" ; then
32817
32818	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32819	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32820
32821				continue
32822			fi
32823			;;
32824		esac
32825		case "$CPPFLAGS" in
32826		*$cf_add_cflags)
32827			;;
32828		*)
32829			case $cf_add_cflags in
32830			-D*)
32831				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
32832
32833CPPFLAGS=`echo "$CPPFLAGS" | \
32834	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
32835		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
32836
32837				;;
32838			esac
32839
32840	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
32841	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
32842
32843			;;
32844		esac
32845		;;
32846	*)
32847
32848	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
32849	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
32850
32851		;;
32852	esac
32853	;;
32854yes)
32855
32856	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
32857	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
32858
32859	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
32860
32861	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
32862		&& test -z "${cf_tst_cflags}" \
32863		&& cf_fix_cppflags=no
32864	;;
32865esac
32866done
32867
32868if test -n "$cf_new_cflags" ; then
32869
32870	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
32871	CFLAGS="${CFLAGS}$cf_new_cflags"
32872
32873fi
32874
32875if test -n "$cf_new_cppflags" ; then
32876
32877	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
32878	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
32879
32880fi
32881
32882if test -n "$cf_new_extra_cppflags" ; then
32883
32884	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
32885	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
32886
32887fi
32888
32889cf_add_libs="$LIBS"
32890# reverse order
32891cf_add_0lib=
32892for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
32893# filter duplicates
32894for cf_add_1lib in $cf_add_0lib; do
32895	for cf_add_2lib in $cf_add_libs; do
32896		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
32897			cf_add_1lib=
32898			break
32899		fi
32900	done
32901	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
32902done
32903LIBS="$cf_add_libs"
32904
32905	:
32906else
32907	cf_pkgconfig_incs=
32908	cf_pkgconfig_libs=
32909
32910	echo "$as_me:32910: checking for XextCreateExtension in -lXext" >&5
32911echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
32912if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
32913  echo $ECHO_N "(cached) $ECHO_C" >&6
32914else
32915  ac_check_lib_save_LIBS=$LIBS
32916LIBS="-lXext  $LIBS"
32917cat >conftest.$ac_ext <<_ACEOF
32918#line 32918 "configure"
32919#include "confdefs.h"
32920
32921/* Override any gcc2 internal prototype to avoid an error.  */
32922#ifdef __cplusplus
32923extern "C"
32924#endif
32925/* We use char because int might match the return type of a gcc2
32926   builtin and then its argument prototype would still apply.  */
32927char XextCreateExtension ();
32928int
32929main (void)
32930{
32931XextCreateExtension ();
32932  ;
32933  return 0;
32934}
32935_ACEOF
32936rm -f conftest.$ac_objext conftest$ac_exeext
32937if { (eval echo "$as_me:32937: \"$ac_link\"") >&5
32938  (eval $ac_link) 2>&5
32939  ac_status=$?
32940  echo "$as_me:32940: \$? = $ac_status" >&5
32941  (exit $ac_status); } &&
32942         { ac_try='test -s conftest$ac_exeext'
32943  { (eval echo "$as_me:32943: \"$ac_try\"") >&5
32944  (eval $ac_try) 2>&5
32945  ac_status=$?
32946  echo "$as_me:32946: \$? = $ac_status" >&5
32947  (exit $ac_status); }; }; then
32948  ac_cv_lib_Xext_XextCreateExtension=yes
32949else
32950  echo "$as_me: failed program was:" >&5
32951cat conftest.$ac_ext >&5
32952ac_cv_lib_Xext_XextCreateExtension=no
32953fi
32954rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
32955LIBS=$ac_check_lib_save_LIBS
32956fi
32957echo "$as_me:32957: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
32958echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
32959if test $ac_cv_lib_Xext_XextCreateExtension = yes; then
32960
32961cf_add_libs="$LIBS"
32962# reverse order
32963cf_add_0lib=
32964for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
32965# filter duplicates
32966for cf_add_1lib in $cf_add_0lib; do
32967	for cf_add_2lib in $cf_add_libs; do
32968		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
32969			cf_add_1lib=
32970			break
32971		fi
32972	done
32973	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
32974done
32975LIBS="$cf_add_libs"
32976
32977fi
32978
32979fi
32980
32981# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
32982# in some cases has installed dummy files in the former, other cases replaced
32983# it with a link to the new location).  This complicates the configure script.
32984# Check for that pitfall, and recover using pkg-config
32985#
32986# If none of these are set, the configuration is almost certainly broken.
32987if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
32988then
32989
32990if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
32991	test -n "$verbose" && echo "	found package x11" 1>&6
32992
32993echo "${as_me:-configure}:32993: testing found package x11 ..." 1>&5
32994
32995	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
32996	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
32997	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
32998
32999echo "${as_me:-configure}:32999: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33000
33001	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
33002
33003echo "${as_me:-configure}:33003: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
33004
33005cf_fix_cppflags=no
33006cf_new_cflags=
33007cf_new_cppflags=
33008cf_new_extra_cppflags=
33009
33010for cf_add_cflags in $cf_pkgconfig_incs
33011do
33012case $cf_fix_cppflags in
33013no)
33014	case $cf_add_cflags in
33015	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33016		case $cf_add_cflags in
33017		-D*)
33018			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33019
33020			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33021				&& test -z "${cf_tst_cflags}" \
33022				&& cf_fix_cppflags=yes
33023
33024			if test $cf_fix_cppflags = yes ; then
33025
33026	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33027	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33028
33029				continue
33030			elif test "${cf_tst_cflags}" = "\"'" ; then
33031
33032	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33033	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33034
33035				continue
33036			fi
33037			;;
33038		esac
33039		case "$CPPFLAGS" in
33040		*$cf_add_cflags)
33041			;;
33042		*)
33043			case $cf_add_cflags in
33044			-D*)
33045				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33046
33047CPPFLAGS=`echo "$CPPFLAGS" | \
33048	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33049		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33050
33051				;;
33052			esac
33053
33054	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33055	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33056
33057			;;
33058		esac
33059		;;
33060	*)
33061
33062	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33063	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33064
33065		;;
33066	esac
33067	;;
33068yes)
33069
33070	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33071	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33072
33073	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33074
33075	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33076		&& test -z "${cf_tst_cflags}" \
33077		&& cf_fix_cppflags=no
33078	;;
33079esac
33080done
33081
33082if test -n "$cf_new_cflags" ; then
33083
33084	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33085	CFLAGS="${CFLAGS}$cf_new_cflags"
33086
33087fi
33088
33089if test -n "$cf_new_cppflags" ; then
33090
33091	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33092	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33093
33094fi
33095
33096if test -n "$cf_new_extra_cppflags" ; then
33097
33098	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33099	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33100
33101fi
33102
33103cf_add_libs="$LIBS"
33104# reverse order
33105cf_add_0lib=
33106for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33107# filter duplicates
33108for cf_add_1lib in $cf_add_0lib; do
33109	for cf_add_2lib in $cf_add_libs; do
33110		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33111			cf_add_1lib=
33112			break
33113		fi
33114	done
33115	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33116done
33117LIBS="$cf_add_libs"
33118
33119	:
33120else
33121	cf_pkgconfig_incs=
33122	cf_pkgconfig_libs=
33123	{ echo "$as_me:33123: WARNING: unable to find X11 library" >&5
33124echo "$as_me: WARNING: unable to find X11 library" >&2;}
33125fi
33126
33127if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
33128	test -n "$verbose" && echo "	found package ice" 1>&6
33129
33130echo "${as_me:-configure}:33130: testing found package ice ..." 1>&5
33131
33132	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
33133	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
33134	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
33135
33136echo "${as_me:-configure}:33136: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33137
33138	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
33139
33140echo "${as_me:-configure}:33140: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
33141
33142cf_fix_cppflags=no
33143cf_new_cflags=
33144cf_new_cppflags=
33145cf_new_extra_cppflags=
33146
33147for cf_add_cflags in $cf_pkgconfig_incs
33148do
33149case $cf_fix_cppflags in
33150no)
33151	case $cf_add_cflags in
33152	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33153		case $cf_add_cflags in
33154		-D*)
33155			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33156
33157			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33158				&& test -z "${cf_tst_cflags}" \
33159				&& cf_fix_cppflags=yes
33160
33161			if test $cf_fix_cppflags = yes ; then
33162
33163	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33164	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33165
33166				continue
33167			elif test "${cf_tst_cflags}" = "\"'" ; then
33168
33169	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33170	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33171
33172				continue
33173			fi
33174			;;
33175		esac
33176		case "$CPPFLAGS" in
33177		*$cf_add_cflags)
33178			;;
33179		*)
33180			case $cf_add_cflags in
33181			-D*)
33182				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33183
33184CPPFLAGS=`echo "$CPPFLAGS" | \
33185	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33186		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33187
33188				;;
33189			esac
33190
33191	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33192	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33193
33194			;;
33195		esac
33196		;;
33197	*)
33198
33199	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33200	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33201
33202		;;
33203	esac
33204	;;
33205yes)
33206
33207	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33208	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33209
33210	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33211
33212	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33213		&& test -z "${cf_tst_cflags}" \
33214		&& cf_fix_cppflags=no
33215	;;
33216esac
33217done
33218
33219if test -n "$cf_new_cflags" ; then
33220
33221	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33222	CFLAGS="${CFLAGS}$cf_new_cflags"
33223
33224fi
33225
33226if test -n "$cf_new_cppflags" ; then
33227
33228	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33229	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33230
33231fi
33232
33233if test -n "$cf_new_extra_cppflags" ; then
33234
33235	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33236	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33237
33238fi
33239
33240cf_add_libs="$LIBS"
33241# reverse order
33242cf_add_0lib=
33243for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33244# filter duplicates
33245for cf_add_1lib in $cf_add_0lib; do
33246	for cf_add_2lib in $cf_add_libs; do
33247		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33248			cf_add_1lib=
33249			break
33250		fi
33251	done
33252	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33253done
33254LIBS="$cf_add_libs"
33255
33256	:
33257else
33258	cf_pkgconfig_incs=
33259	cf_pkgconfig_libs=
33260	{ echo "$as_me:33260: WARNING: unable to find ICE library" >&5
33261echo "$as_me: WARNING: unable to find ICE library" >&2;}
33262fi
33263
33264if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
33265	test -n "$verbose" && echo "	found package sm" 1>&6
33266
33267echo "${as_me:-configure}:33267: testing found package sm ..." 1>&5
33268
33269	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
33270	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
33271	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
33272
33273echo "${as_me:-configure}:33273: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33274
33275	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
33276
33277echo "${as_me:-configure}:33277: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
33278
33279cf_fix_cppflags=no
33280cf_new_cflags=
33281cf_new_cppflags=
33282cf_new_extra_cppflags=
33283
33284for cf_add_cflags in $cf_pkgconfig_incs
33285do
33286case $cf_fix_cppflags in
33287no)
33288	case $cf_add_cflags in
33289	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33290		case $cf_add_cflags in
33291		-D*)
33292			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33293
33294			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33295				&& test -z "${cf_tst_cflags}" \
33296				&& cf_fix_cppflags=yes
33297
33298			if test $cf_fix_cppflags = yes ; then
33299
33300	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33301	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33302
33303				continue
33304			elif test "${cf_tst_cflags}" = "\"'" ; then
33305
33306	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33307	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33308
33309				continue
33310			fi
33311			;;
33312		esac
33313		case "$CPPFLAGS" in
33314		*$cf_add_cflags)
33315			;;
33316		*)
33317			case $cf_add_cflags in
33318			-D*)
33319				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33320
33321CPPFLAGS=`echo "$CPPFLAGS" | \
33322	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33323		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33324
33325				;;
33326			esac
33327
33328	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33329	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33330
33331			;;
33332		esac
33333		;;
33334	*)
33335
33336	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33337	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33338
33339		;;
33340	esac
33341	;;
33342yes)
33343
33344	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33345	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33346
33347	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33348
33349	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33350		&& test -z "${cf_tst_cflags}" \
33351		&& cf_fix_cppflags=no
33352	;;
33353esac
33354done
33355
33356if test -n "$cf_new_cflags" ; then
33357
33358	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33359	CFLAGS="${CFLAGS}$cf_new_cflags"
33360
33361fi
33362
33363if test -n "$cf_new_cppflags" ; then
33364
33365	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33366	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33367
33368fi
33369
33370if test -n "$cf_new_extra_cppflags" ; then
33371
33372	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33373	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33374
33375fi
33376
33377cf_add_libs="$LIBS"
33378# reverse order
33379cf_add_0lib=
33380for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33381# filter duplicates
33382for cf_add_1lib in $cf_add_0lib; do
33383	for cf_add_2lib in $cf_add_libs; do
33384		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33385			cf_add_1lib=
33386			break
33387		fi
33388	done
33389	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33390done
33391LIBS="$cf_add_libs"
33392
33393	:
33394else
33395	cf_pkgconfig_incs=
33396	cf_pkgconfig_libs=
33397	{ echo "$as_me:33397: WARNING: unable to find SM library" >&5
33398echo "$as_me: WARNING: unable to find SM library" >&2;}
33399fi
33400
33401if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
33402	test -n "$verbose" && echo "	found package xt" 1>&6
33403
33404echo "${as_me:-configure}:33404: testing found package xt ..." 1>&5
33405
33406	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
33407	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
33408	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
33409
33410echo "${as_me:-configure}:33410: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33411
33412	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
33413
33414echo "${as_me:-configure}:33414: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
33415
33416cf_fix_cppflags=no
33417cf_new_cflags=
33418cf_new_cppflags=
33419cf_new_extra_cppflags=
33420
33421for cf_add_cflags in $cf_pkgconfig_incs
33422do
33423case $cf_fix_cppflags in
33424no)
33425	case $cf_add_cflags in
33426	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33427		case $cf_add_cflags in
33428		-D*)
33429			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33430
33431			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33432				&& test -z "${cf_tst_cflags}" \
33433				&& cf_fix_cppflags=yes
33434
33435			if test $cf_fix_cppflags = yes ; then
33436
33437	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33438	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33439
33440				continue
33441			elif test "${cf_tst_cflags}" = "\"'" ; then
33442
33443	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33444	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33445
33446				continue
33447			fi
33448			;;
33449		esac
33450		case "$CPPFLAGS" in
33451		*$cf_add_cflags)
33452			;;
33453		*)
33454			case $cf_add_cflags in
33455			-D*)
33456				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33457
33458CPPFLAGS=`echo "$CPPFLAGS" | \
33459	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33460		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33461
33462				;;
33463			esac
33464
33465	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33466	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33467
33468			;;
33469		esac
33470		;;
33471	*)
33472
33473	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33474	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33475
33476		;;
33477	esac
33478	;;
33479yes)
33480
33481	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33482	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33483
33484	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33485
33486	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33487		&& test -z "${cf_tst_cflags}" \
33488		&& cf_fix_cppflags=no
33489	;;
33490esac
33491done
33492
33493if test -n "$cf_new_cflags" ; then
33494
33495	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33496	CFLAGS="${CFLAGS}$cf_new_cflags"
33497
33498fi
33499
33500if test -n "$cf_new_cppflags" ; then
33501
33502	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33503	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33504
33505fi
33506
33507if test -n "$cf_new_extra_cppflags" ; then
33508
33509	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33510	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33511
33512fi
33513
33514cf_add_libs="$LIBS"
33515# reverse order
33516cf_add_0lib=
33517for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33518# filter duplicates
33519for cf_add_1lib in $cf_add_0lib; do
33520	for cf_add_2lib in $cf_add_libs; do
33521		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33522			cf_add_1lib=
33523			break
33524		fi
33525	done
33526	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33527done
33528LIBS="$cf_add_libs"
33529
33530	:
33531else
33532	cf_pkgconfig_incs=
33533	cf_pkgconfig_libs=
33534	{ echo "$as_me:33534: WARNING: unable to find Xt library" >&5
33535echo "$as_me: WARNING: unable to find Xt library" >&2;}
33536fi
33537
33538else
33539	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
33540fi
33541
33542cf_have_X_LIBS=no
33543
33544if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists xt; then
33545	test -n "$verbose" && echo "	found package xt" 1>&6
33546
33547echo "${as_me:-configure}:33547: testing found package xt ..." 1>&5
33548
33549	cf_pkgconfig_incs="`$PKG_CONFIG --cflags xt 2>/dev/null`"
33550	cf_pkgconfig_libs="`$PKG_CONFIG --libs   xt 2>/dev/null`"
33551	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
33552
33553echo "${as_me:-configure}:33553: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33554
33555	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
33556
33557echo "${as_me:-configure}:33557: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
33558
33559cf_fix_cppflags=no
33560cf_new_cflags=
33561cf_new_cppflags=
33562cf_new_extra_cppflags=
33563
33564for cf_add_cflags in $cf_pkgconfig_incs
33565do
33566case $cf_fix_cppflags in
33567no)
33568	case $cf_add_cflags in
33569	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33570		case $cf_add_cflags in
33571		-D*)
33572			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33573
33574			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33575				&& test -z "${cf_tst_cflags}" \
33576				&& cf_fix_cppflags=yes
33577
33578			if test $cf_fix_cppflags = yes ; then
33579
33580	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33581	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33582
33583				continue
33584			elif test "${cf_tst_cflags}" = "\"'" ; then
33585
33586	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33587	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33588
33589				continue
33590			fi
33591			;;
33592		esac
33593		case "$CPPFLAGS" in
33594		*$cf_add_cflags)
33595			;;
33596		*)
33597			case $cf_add_cflags in
33598			-D*)
33599				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33600
33601CPPFLAGS=`echo "$CPPFLAGS" | \
33602	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33603		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33604
33605				;;
33606			esac
33607
33608	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33609	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33610
33611			;;
33612		esac
33613		;;
33614	*)
33615
33616	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33617	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33618
33619		;;
33620	esac
33621	;;
33622yes)
33623
33624	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33625	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33626
33627	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33628
33629	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33630		&& test -z "${cf_tst_cflags}" \
33631		&& cf_fix_cppflags=no
33632	;;
33633esac
33634done
33635
33636if test -n "$cf_new_cflags" ; then
33637
33638	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33639	CFLAGS="${CFLAGS}$cf_new_cflags"
33640
33641fi
33642
33643if test -n "$cf_new_cppflags" ; then
33644
33645	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33646	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33647
33648fi
33649
33650if test -n "$cf_new_extra_cppflags" ; then
33651
33652	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33653	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33654
33655fi
33656
33657cf_add_libs="$LIBS"
33658# reverse order
33659cf_add_0lib=
33660for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33661# filter duplicates
33662for cf_add_1lib in $cf_add_0lib; do
33663	for cf_add_2lib in $cf_add_libs; do
33664		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33665			cf_add_1lib=
33666			break
33667		fi
33668	done
33669	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33670done
33671LIBS="$cf_add_libs"
33672
33673	case "x$LIBS" in
33674	*-lX11*)
33675		;;
33676	*)
33677# we have an "xt" package, but it may omit Xt's dependency on X11
33678echo "$as_me:33678: checking for usable X dependency" >&5
33679echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
33680if test "${cf_cv_xt_x11_compat+set}" = set; then
33681  echo $ECHO_N "(cached) $ECHO_C" >&6
33682else
33683
33684cat >conftest.$ac_ext <<_ACEOF
33685#line 33685 "configure"
33686#include "confdefs.h"
33687
33688#include <X11/Xlib.h>
33689
33690int
33691main (void)
33692{
33693
33694	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
33695	int rc2 = XClearWindow((Display*) 0, (Window) 0);
33696	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
33697	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
33698
33699  ;
33700  return 0;
33701}
33702_ACEOF
33703rm -f conftest.$ac_objext conftest$ac_exeext
33704if { (eval echo "$as_me:33704: \"$ac_link\"") >&5
33705  (eval $ac_link) 2>&5
33706  ac_status=$?
33707  echo "$as_me:33707: \$? = $ac_status" >&5
33708  (exit $ac_status); } &&
33709         { ac_try='test -s conftest$ac_exeext'
33710  { (eval echo "$as_me:33710: \"$ac_try\"") >&5
33711  (eval $ac_try) 2>&5
33712  ac_status=$?
33713  echo "$as_me:33713: \$? = $ac_status" >&5
33714  (exit $ac_status); }; }; then
33715  cf_cv_xt_x11_compat=yes
33716else
33717  echo "$as_me: failed program was:" >&5
33718cat conftest.$ac_ext >&5
33719cf_cv_xt_x11_compat=no
33720fi
33721rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
33722fi
33723echo "$as_me:33723: result: $cf_cv_xt_x11_compat" >&5
33724echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
33725		if test "$cf_cv_xt_x11_compat" = no
33726		then
33727			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
33728
33729echo "${as_me:-configure}:33729: testing work around broken X11 dependency ..." 1>&5
33730
33731			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
33732
33733if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists x11; then
33734	test -n "$verbose" && echo "	found package x11" 1>&6
33735
33736echo "${as_me:-configure}:33736: testing found package x11 ..." 1>&5
33737
33738	cf_pkgconfig_incs="`$PKG_CONFIG --cflags x11 2>/dev/null`"
33739	cf_pkgconfig_libs="`$PKG_CONFIG --libs   x11 2>/dev/null`"
33740	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
33741
33742echo "${as_me:-configure}:33742: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33743
33744	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
33745
33746echo "${as_me:-configure}:33746: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
33747
33748cf_fix_cppflags=no
33749cf_new_cflags=
33750cf_new_cppflags=
33751cf_new_extra_cppflags=
33752
33753for cf_add_cflags in $cf_pkgconfig_incs
33754do
33755case $cf_fix_cppflags in
33756no)
33757	case $cf_add_cflags in
33758	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33759		case $cf_add_cflags in
33760		-D*)
33761			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33762
33763			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33764				&& test -z "${cf_tst_cflags}" \
33765				&& cf_fix_cppflags=yes
33766
33767			if test $cf_fix_cppflags = yes ; then
33768
33769	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33770	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33771
33772				continue
33773			elif test "${cf_tst_cflags}" = "\"'" ; then
33774
33775	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33776	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33777
33778				continue
33779			fi
33780			;;
33781		esac
33782		case "$CPPFLAGS" in
33783		*$cf_add_cflags)
33784			;;
33785		*)
33786			case $cf_add_cflags in
33787			-D*)
33788				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33789
33790CPPFLAGS=`echo "$CPPFLAGS" | \
33791	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33792		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33793
33794				;;
33795			esac
33796
33797	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
33798	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
33799
33800			;;
33801		esac
33802		;;
33803	*)
33804
33805	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
33806	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
33807
33808		;;
33809	esac
33810	;;
33811yes)
33812
33813	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33814	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33815
33816	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
33817
33818	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33819		&& test -z "${cf_tst_cflags}" \
33820		&& cf_fix_cppflags=no
33821	;;
33822esac
33823done
33824
33825if test -n "$cf_new_cflags" ; then
33826
33827	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
33828	CFLAGS="${CFLAGS}$cf_new_cflags"
33829
33830fi
33831
33832if test -n "$cf_new_cppflags" ; then
33833
33834	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
33835	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
33836
33837fi
33838
33839if test -n "$cf_new_extra_cppflags" ; then
33840
33841	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
33842	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
33843
33844fi
33845
33846cf_add_libs="$LIBS"
33847# reverse order
33848cf_add_0lib=
33849for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
33850# filter duplicates
33851for cf_add_1lib in $cf_add_0lib; do
33852	for cf_add_2lib in $cf_add_libs; do
33853		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
33854			cf_add_1lib=
33855			break
33856		fi
33857	done
33858	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
33859done
33860LIBS="$cf_add_libs"
33861
33862	:
33863else
33864	cf_pkgconfig_incs=
33865	cf_pkgconfig_libs=
33866
33867test -n "$verbose" && echo "	...before $LIBS" 1>&6
33868
33869echo "${as_me:-configure}:33869: testing ...before $LIBS ..." 1>&5
33870
33871LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
33872test -n "$verbose" && echo "	...after  $LIBS" 1>&6
33873
33874echo "${as_me:-configure}:33874: testing ...after  $LIBS ..." 1>&5
33875
33876fi
33877
33878		fi
33879		;;
33880	esac
33881
33882echo "$as_me:33882: checking for usable X Toolkit package" >&5
33883echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
33884if test "${cf_cv_xt_ice_compat+set}" = set; then
33885  echo $ECHO_N "(cached) $ECHO_C" >&6
33886else
33887
33888cat >conftest.$ac_ext <<_ACEOF
33889#line 33889 "configure"
33890#include "confdefs.h"
33891
33892#include <X11/Shell.h>
33893
33894int
33895main (void)
33896{
33897int num = IceConnectionNumber(0); (void) num
33898
33899  ;
33900  return 0;
33901}
33902_ACEOF
33903rm -f conftest.$ac_objext conftest$ac_exeext
33904if { (eval echo "$as_me:33904: \"$ac_link\"") >&5
33905  (eval $ac_link) 2>&5
33906  ac_status=$?
33907  echo "$as_me:33907: \$? = $ac_status" >&5
33908  (exit $ac_status); } &&
33909         { ac_try='test -s conftest$ac_exeext'
33910  { (eval echo "$as_me:33910: \"$ac_try\"") >&5
33911  (eval $ac_try) 2>&5
33912  ac_status=$?
33913  echo "$as_me:33913: \$? = $ac_status" >&5
33914  (exit $ac_status); }; }; then
33915  cf_cv_xt_ice_compat=yes
33916else
33917  echo "$as_me: failed program was:" >&5
33918cat conftest.$ac_ext >&5
33919cf_cv_xt_ice_compat=no
33920fi
33921rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
33922fi
33923echo "$as_me:33923: result: $cf_cv_xt_ice_compat" >&5
33924echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
33925
33926	if test "$cf_cv_xt_ice_compat" = no
33927	then
33928		# workaround for broken ".pc" files used for X Toolkit.
33929		case "x$X_PRE_LIBS" in
33930		*-lICE*)
33931			case "x$LIBS" in
33932			*-lICE*)
33933				;;
33934			*)
33935				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
33936
33937echo "${as_me:-configure}:33937: testing work around broken ICE dependency ..." 1>&5
33938
33939if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists ice; then
33940	test -n "$verbose" && echo "	found package ice" 1>&6
33941
33942echo "${as_me:-configure}:33942: testing found package ice ..." 1>&5
33943
33944	cf_pkgconfig_incs="`$PKG_CONFIG --cflags ice 2>/dev/null`"
33945	cf_pkgconfig_libs="`$PKG_CONFIG --libs   ice 2>/dev/null`"
33946	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
33947
33948echo "${as_me:-configure}:33948: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
33949
33950	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
33951
33952echo "${as_me:-configure}:33952: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
33953
33954cf_fix_cppflags=no
33955cf_new_cflags=
33956cf_new_cppflags=
33957cf_new_extra_cppflags=
33958
33959for cf_add_cflags in $cf_pkgconfig_incs
33960do
33961case $cf_fix_cppflags in
33962no)
33963	case $cf_add_cflags in
33964	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
33965		case $cf_add_cflags in
33966		-D*)
33967			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
33968
33969			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
33970				&& test -z "${cf_tst_cflags}" \
33971				&& cf_fix_cppflags=yes
33972
33973			if test $cf_fix_cppflags = yes ; then
33974
33975	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33976	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33977
33978				continue
33979			elif test "${cf_tst_cflags}" = "\"'" ; then
33980
33981	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
33982	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
33983
33984				continue
33985			fi
33986			;;
33987		esac
33988		case "$CPPFLAGS" in
33989		*$cf_add_cflags)
33990			;;
33991		*)
33992			case $cf_add_cflags in
33993			-D*)
33994				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
33995
33996CPPFLAGS=`echo "$CPPFLAGS" | \
33997	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
33998		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
33999
34000				;;
34001			esac
34002
34003	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
34004	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
34005
34006			;;
34007		esac
34008		;;
34009	*)
34010
34011	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
34012	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
34013
34014		;;
34015	esac
34016	;;
34017yes)
34018
34019	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34020	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34021
34022	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
34023
34024	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34025		&& test -z "${cf_tst_cflags}" \
34026		&& cf_fix_cppflags=no
34027	;;
34028esac
34029done
34030
34031if test -n "$cf_new_cflags" ; then
34032
34033	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
34034	CFLAGS="${CFLAGS}$cf_new_cflags"
34035
34036fi
34037
34038if test -n "$cf_new_cppflags" ; then
34039
34040	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34041	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
34042
34043fi
34044
34045if test -n "$cf_new_extra_cppflags" ; then
34046
34047	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
34048	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
34049
34050fi
34051
34052cf_add_libs="$LIBS"
34053# reverse order
34054cf_add_0lib=
34055for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
34056# filter duplicates
34057for cf_add_1lib in $cf_add_0lib; do
34058	for cf_add_2lib in $cf_add_libs; do
34059		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
34060			cf_add_1lib=
34061			break
34062		fi
34063	done
34064	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
34065done
34066LIBS="$cf_add_libs"
34067
34068if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists sm; then
34069	test -n "$verbose" && echo "	found package sm" 1>&6
34070
34071echo "${as_me:-configure}:34071: testing found package sm ..." 1>&5
34072
34073	cf_pkgconfig_incs="`$PKG_CONFIG --cflags sm 2>/dev/null`"
34074	cf_pkgconfig_libs="`$PKG_CONFIG --libs   sm 2>/dev/null`"
34075	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
34076
34077echo "${as_me:-configure}:34077: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
34078
34079	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
34080
34081echo "${as_me:-configure}:34081: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
34082
34083cf_fix_cppflags=no
34084cf_new_cflags=
34085cf_new_cppflags=
34086cf_new_extra_cppflags=
34087
34088for cf_add_cflags in $cf_pkgconfig_incs
34089do
34090case $cf_fix_cppflags in
34091no)
34092	case $cf_add_cflags in
34093	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
34094		case $cf_add_cflags in
34095		-D*)
34096			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
34097
34098			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34099				&& test -z "${cf_tst_cflags}" \
34100				&& cf_fix_cppflags=yes
34101
34102			if test $cf_fix_cppflags = yes ; then
34103
34104	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34105	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34106
34107				continue
34108			elif test "${cf_tst_cflags}" = "\"'" ; then
34109
34110	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34111	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34112
34113				continue
34114			fi
34115			;;
34116		esac
34117		case "$CPPFLAGS" in
34118		*$cf_add_cflags)
34119			;;
34120		*)
34121			case $cf_add_cflags in
34122			-D*)
34123				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
34124
34125CPPFLAGS=`echo "$CPPFLAGS" | \
34126	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
34127		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
34128
34129				;;
34130			esac
34131
34132	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
34133	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
34134
34135			;;
34136		esac
34137		;;
34138	*)
34139
34140	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
34141	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
34142
34143		;;
34144	esac
34145	;;
34146yes)
34147
34148	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34149	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34150
34151	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
34152
34153	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34154		&& test -z "${cf_tst_cflags}" \
34155		&& cf_fix_cppflags=no
34156	;;
34157esac
34158done
34159
34160if test -n "$cf_new_cflags" ; then
34161
34162	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
34163	CFLAGS="${CFLAGS}$cf_new_cflags"
34164
34165fi
34166
34167if test -n "$cf_new_cppflags" ; then
34168
34169	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34170	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
34171
34172fi
34173
34174if test -n "$cf_new_extra_cppflags" ; then
34175
34176	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
34177	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
34178
34179fi
34180
34181cf_add_libs="$LIBS"
34182# reverse order
34183cf_add_0lib=
34184for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
34185# filter duplicates
34186for cf_add_1lib in $cf_add_0lib; do
34187	for cf_add_2lib in $cf_add_libs; do
34188		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
34189			cf_add_1lib=
34190			break
34191		fi
34192	done
34193	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
34194done
34195LIBS="$cf_add_libs"
34196
34197	:
34198else
34199	cf_pkgconfig_incs=
34200	cf_pkgconfig_libs=
34201	:
34202fi
34203
34204else
34205	cf_pkgconfig_incs=
34206	cf_pkgconfig_libs=
34207
34208test -n "$verbose" && echo "	...before $LIBS" 1>&6
34209
34210echo "${as_me:-configure}:34210: testing ...before $LIBS ..." 1>&5
34211
34212LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
34213test -n "$verbose" && echo "	...after  $LIBS" 1>&6
34214
34215echo "${as_me:-configure}:34215: testing ...after  $LIBS ..." 1>&5
34216
34217fi
34218
34219				;;
34220			esac
34221			;;
34222		esac
34223	fi
34224
34225	cf_have_X_LIBS=yes
34226
34227else
34228	cf_pkgconfig_incs=
34229	cf_pkgconfig_libs=
34230
34231	LDFLAGS="$X_LIBS $LDFLAGS"
34232
34233test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
34234
34235echo "${as_me:-configure}:34235: testing checking additions to CFLAGS ..." 1>&5
34236
34237cf_check_cflags="$CFLAGS"
34238cf_check_cppflags="$CPPFLAGS"
34239
34240cf_fix_cppflags=no
34241cf_new_cflags=
34242cf_new_cppflags=
34243cf_new_extra_cppflags=
34244
34245for cf_add_cflags in $X_CFLAGS
34246do
34247case $cf_fix_cppflags in
34248no)
34249	case $cf_add_cflags in
34250	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
34251		case $cf_add_cflags in
34252		-D*)
34253			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
34254
34255			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34256				&& test -z "${cf_tst_cflags}" \
34257				&& cf_fix_cppflags=yes
34258
34259			if test $cf_fix_cppflags = yes ; then
34260
34261	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34262	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34263
34264				continue
34265			elif test "${cf_tst_cflags}" = "\"'" ; then
34266
34267	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34268	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34269
34270				continue
34271			fi
34272			;;
34273		esac
34274		case "$CPPFLAGS" in
34275		*$cf_add_cflags)
34276			;;
34277		*)
34278			case $cf_add_cflags in
34279			-D*)
34280				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
34281
34282CPPFLAGS=`echo "$CPPFLAGS" | \
34283	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
34284		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
34285
34286				;;
34287			esac
34288
34289	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
34290	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
34291
34292			;;
34293		esac
34294		;;
34295	*)
34296
34297	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
34298	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
34299
34300		;;
34301	esac
34302	;;
34303yes)
34304
34305	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34306	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
34307
34308	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
34309
34310	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34311		&& test -z "${cf_tst_cflags}" \
34312		&& cf_fix_cppflags=no
34313	;;
34314esac
34315done
34316
34317if test -n "$cf_new_cflags" ; then
34318	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
34319
34320echo "${as_me:-configure}:34320: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
34321
34322	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
34323	CFLAGS="${CFLAGS}$cf_new_cflags"
34324
34325fi
34326
34327if test -n "$cf_new_cppflags" ; then
34328	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
34329
34330echo "${as_me:-configure}:34330: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
34331
34332	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34333	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
34334
34335fi
34336
34337if test -n "$cf_new_extra_cppflags" ; then
34338	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
34339
34340echo "${as_me:-configure}:34340: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
34341
34342	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
34343	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
34344
34345fi
34346
34347if test "x$cf_check_cflags" != "x$CFLAGS" ; then
34348cat >conftest.$ac_ext <<_ACEOF
34349#line 34349 "configure"
34350#include "confdefs.h"
34351#include <stdio.h>
34352int
34353main (void)
34354{
34355printf("Hello world");
34356  ;
34357  return 0;
34358}
34359_ACEOF
34360rm -f conftest.$ac_objext conftest$ac_exeext
34361if { (eval echo "$as_me:34361: \"$ac_link\"") >&5
34362  (eval $ac_link) 2>&5
34363  ac_status=$?
34364  echo "$as_me:34364: \$? = $ac_status" >&5
34365  (exit $ac_status); } &&
34366         { ac_try='test -s conftest$ac_exeext'
34367  { (eval echo "$as_me:34367: \"$ac_try\"") >&5
34368  (eval $ac_try) 2>&5
34369  ac_status=$?
34370  echo "$as_me:34370: \$? = $ac_status" >&5
34371  (exit $ac_status); }; }; then
34372  :
34373else
34374  echo "$as_me: failed program was:" >&5
34375cat conftest.$ac_ext >&5
34376test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
34377
34378echo "${as_me:-configure}:34378: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
34379
34380	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
34381		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
34382
34383echo "${as_me:-configure}:34383: testing but keeping change to \$CPPFLAGS ..." 1>&5
34384
34385	 fi
34386	 CFLAGS="$cf_check_flags"
34387fi
34388rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34389fi
34390
34391	echo "$as_me:34391: checking for XOpenDisplay" >&5
34392echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
34393if test "${ac_cv_func_XOpenDisplay+set}" = set; then
34394  echo $ECHO_N "(cached) $ECHO_C" >&6
34395else
34396  cat >conftest.$ac_ext <<_ACEOF
34397#line 34397 "configure"
34398#include "confdefs.h"
34399#define XOpenDisplay autoconf_temporary
34400#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34401#undef XOpenDisplay
34402
34403#ifdef __cplusplus
34404extern "C"
34405#endif
34406
34407/* We use char because int might match the return type of a gcc2
34408   builtin and then its argument prototype would still apply.  */
34409char XOpenDisplay (void);
34410
34411int
34412main (void)
34413{
34414
34415/* The GNU C library defines stubs for functions which it implements
34416    to always fail with ENOSYS.  Some functions are actually named
34417    something starting with __ and the normal name is an alias.  */
34418#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
34419#error found stub for XOpenDisplay
34420#endif
34421
34422	return XOpenDisplay ();
34423  ;
34424  return 0;
34425}
34426_ACEOF
34427rm -f conftest.$ac_objext conftest$ac_exeext
34428if { (eval echo "$as_me:34428: \"$ac_link\"") >&5
34429  (eval $ac_link) 2>&5
34430  ac_status=$?
34431  echo "$as_me:34431: \$? = $ac_status" >&5
34432  (exit $ac_status); } &&
34433         { ac_try='test -s conftest$ac_exeext'
34434  { (eval echo "$as_me:34434: \"$ac_try\"") >&5
34435  (eval $ac_try) 2>&5
34436  ac_status=$?
34437  echo "$as_me:34437: \$? = $ac_status" >&5
34438  (exit $ac_status); }; }; then
34439  ac_cv_func_XOpenDisplay=yes
34440else
34441  echo "$as_me: failed program was:" >&5
34442cat conftest.$ac_ext >&5
34443ac_cv_func_XOpenDisplay=no
34444fi
34445rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34446fi
34447echo "$as_me:34447: result: $ac_cv_func_XOpenDisplay" >&5
34448echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
34449if test $ac_cv_func_XOpenDisplay = yes; then
34450  :
34451else
34452
34453	echo "$as_me:34453: checking for XOpenDisplay in -lX11" >&5
34454echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
34455if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
34456  echo $ECHO_N "(cached) $ECHO_C" >&6
34457else
34458  ac_check_lib_save_LIBS=$LIBS
34459LIBS="-lX11  $LIBS"
34460cat >conftest.$ac_ext <<_ACEOF
34461#line 34461 "configure"
34462#include "confdefs.h"
34463
34464/* Override any gcc2 internal prototype to avoid an error.  */
34465#ifdef __cplusplus
34466extern "C"
34467#endif
34468/* We use char because int might match the return type of a gcc2
34469   builtin and then its argument prototype would still apply.  */
34470char XOpenDisplay ();
34471int
34472main (void)
34473{
34474XOpenDisplay ();
34475  ;
34476  return 0;
34477}
34478_ACEOF
34479rm -f conftest.$ac_objext conftest$ac_exeext
34480if { (eval echo "$as_me:34480: \"$ac_link\"") >&5
34481  (eval $ac_link) 2>&5
34482  ac_status=$?
34483  echo "$as_me:34483: \$? = $ac_status" >&5
34484  (exit $ac_status); } &&
34485         { ac_try='test -s conftest$ac_exeext'
34486  { (eval echo "$as_me:34486: \"$ac_try\"") >&5
34487  (eval $ac_try) 2>&5
34488  ac_status=$?
34489  echo "$as_me:34489: \$? = $ac_status" >&5
34490  (exit $ac_status); }; }; then
34491  ac_cv_lib_X11_XOpenDisplay=yes
34492else
34493  echo "$as_me: failed program was:" >&5
34494cat conftest.$ac_ext >&5
34495ac_cv_lib_X11_XOpenDisplay=no
34496fi
34497rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34498LIBS=$ac_check_lib_save_LIBS
34499fi
34500echo "$as_me:34500: result: $ac_cv_lib_X11_XOpenDisplay" >&5
34501echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
34502if test $ac_cv_lib_X11_XOpenDisplay = yes; then
34503
34504cf_add_libs="$LIBS"
34505# reverse order
34506cf_add_0lib=
34507for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
34508# filter duplicates
34509for cf_add_1lib in $cf_add_0lib; do
34510	for cf_add_2lib in $cf_add_libs; do
34511		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
34512			cf_add_1lib=
34513			break
34514		fi
34515	done
34516	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
34517done
34518LIBS="$cf_add_libs"
34519
34520fi
34521
34522fi
34523
34524	echo "$as_me:34524: checking for XtAppInitialize" >&5
34525echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
34526if test "${ac_cv_func_XtAppInitialize+set}" = set; then
34527  echo $ECHO_N "(cached) $ECHO_C" >&6
34528else
34529  cat >conftest.$ac_ext <<_ACEOF
34530#line 34530 "configure"
34531#include "confdefs.h"
34532#define XtAppInitialize autoconf_temporary
34533#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34534#undef XtAppInitialize
34535
34536#ifdef __cplusplus
34537extern "C"
34538#endif
34539
34540/* We use char because int might match the return type of a gcc2
34541   builtin and then its argument prototype would still apply.  */
34542char XtAppInitialize (void);
34543
34544int
34545main (void)
34546{
34547
34548/* The GNU C library defines stubs for functions which it implements
34549    to always fail with ENOSYS.  Some functions are actually named
34550    something starting with __ and the normal name is an alias.  */
34551#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
34552#error found stub for XtAppInitialize
34553#endif
34554
34555	return XtAppInitialize ();
34556  ;
34557  return 0;
34558}
34559_ACEOF
34560rm -f conftest.$ac_objext conftest$ac_exeext
34561if { (eval echo "$as_me:34561: \"$ac_link\"") >&5
34562  (eval $ac_link) 2>&5
34563  ac_status=$?
34564  echo "$as_me:34564: \$? = $ac_status" >&5
34565  (exit $ac_status); } &&
34566         { ac_try='test -s conftest$ac_exeext'
34567  { (eval echo "$as_me:34567: \"$ac_try\"") >&5
34568  (eval $ac_try) 2>&5
34569  ac_status=$?
34570  echo "$as_me:34570: \$? = $ac_status" >&5
34571  (exit $ac_status); }; }; then
34572  ac_cv_func_XtAppInitialize=yes
34573else
34574  echo "$as_me: failed program was:" >&5
34575cat conftest.$ac_ext >&5
34576ac_cv_func_XtAppInitialize=no
34577fi
34578rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34579fi
34580echo "$as_me:34580: result: $ac_cv_func_XtAppInitialize" >&5
34581echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
34582if test $ac_cv_func_XtAppInitialize = yes; then
34583  :
34584else
34585
34586	echo "$as_me:34586: checking for XtAppInitialize in -lXt" >&5
34587echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
34588if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
34589  echo $ECHO_N "(cached) $ECHO_C" >&6
34590else
34591  ac_check_lib_save_LIBS=$LIBS
34592LIBS="-lXt  $LIBS"
34593cat >conftest.$ac_ext <<_ACEOF
34594#line 34594 "configure"
34595#include "confdefs.h"
34596
34597/* Override any gcc2 internal prototype to avoid an error.  */
34598#ifdef __cplusplus
34599extern "C"
34600#endif
34601/* We use char because int might match the return type of a gcc2
34602   builtin and then its argument prototype would still apply.  */
34603char XtAppInitialize ();
34604int
34605main (void)
34606{
34607XtAppInitialize ();
34608  ;
34609  return 0;
34610}
34611_ACEOF
34612rm -f conftest.$ac_objext conftest$ac_exeext
34613if { (eval echo "$as_me:34613: \"$ac_link\"") >&5
34614  (eval $ac_link) 2>&5
34615  ac_status=$?
34616  echo "$as_me:34616: \$? = $ac_status" >&5
34617  (exit $ac_status); } &&
34618         { ac_try='test -s conftest$ac_exeext'
34619  { (eval echo "$as_me:34619: \"$ac_try\"") >&5
34620  (eval $ac_try) 2>&5
34621  ac_status=$?
34622  echo "$as_me:34622: \$? = $ac_status" >&5
34623  (exit $ac_status); }; }; then
34624  ac_cv_lib_Xt_XtAppInitialize=yes
34625else
34626  echo "$as_me: failed program was:" >&5
34627cat conftest.$ac_ext >&5
34628ac_cv_lib_Xt_XtAppInitialize=no
34629fi
34630rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34631LIBS=$ac_check_lib_save_LIBS
34632fi
34633echo "$as_me:34633: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
34634echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
34635if test $ac_cv_lib_Xt_XtAppInitialize = yes; then
34636
34637cat >>confdefs.h <<\EOF
34638#define HAVE_LIBXT 1
34639EOF
34640
34641		 cf_have_X_LIBS=Xt
34642		 LIBS="-lXt $LIBS"
34643fi
34644
34645fi
34646
34647fi
34648
34649if test $cf_have_X_LIBS = no ; then
34650	{ echo "$as_me:34650: WARNING: Unable to successfully link X Toolkit library (-lXt) with
34651test program.  You will have to check and add the proper libraries by hand
34652to makefile." >&5
34653echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
34654test program.  You will have to check and add the proper libraries by hand
34655to makefile." >&2;}
34656fi
34657
34658cf_x_athena_root=$cf_x_athena
34659cf_x_athena_inc=""
34660
34661for cf_path in default \
34662	/usr/contrib/X11R6 \
34663	/usr/contrib/X11R5 \
34664	/usr/lib/X11R5 \
34665	/usr/local
34666do
34667	if test -z "$cf_x_athena_inc" ; then
34668
34669cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
34670cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
34671cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
34672LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
34673for cf_X_CFLAGS in $X_CFLAGS
34674do
34675	case "x$cf_X_CFLAGS" in
34676	x-[IUD]*)
34677		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
34678		;;
34679	*)
34680		CFLAGS="$CFLAGS $cf_X_CFLAGS"
34681		;;
34682	esac
34683done
34684
34685		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
34686		if test $cf_path != default ; then
34687
34688	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34689	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
34690
34691			echo "$as_me:34691: checking for $cf_test in $cf_path" >&5
34692echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
34693		else
34694			echo "$as_me:34694: checking for $cf_test" >&5
34695echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
34696		fi
34697		cat >conftest.$ac_ext <<_ACEOF
34698#line 34698 "configure"
34699#include "confdefs.h"
34700
34701#include <X11/Intrinsic.h>
34702#include <$cf_test>
34703int
34704main (void)
34705{
34706
34707  ;
34708  return 0;
34709}
34710_ACEOF
34711rm -f conftest.$ac_objext
34712if { (eval echo "$as_me:34712: \"$ac_compile\"") >&5
34713  (eval $ac_compile) 2>&5
34714  ac_status=$?
34715  echo "$as_me:34715: \$? = $ac_status" >&5
34716  (exit $ac_status); } &&
34717         { ac_try='test -s conftest.$ac_objext'
34718  { (eval echo "$as_me:34718: \"$ac_try\"") >&5
34719  (eval $ac_try) 2>&5
34720  ac_status=$?
34721  echo "$as_me:34721: \$? = $ac_status" >&5
34722  (exit $ac_status); }; }; then
34723  cf_result=yes
34724else
34725  echo "$as_me: failed program was:" >&5
34726cat conftest.$ac_ext >&5
34727cf_result=no
34728fi
34729rm -f conftest.$ac_objext conftest.$ac_ext
34730		echo "$as_me:34730: result: $cf_result" >&5
34731echo "${ECHO_T}$cf_result" >&6
34732
34733LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
34734CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
34735CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
34736
34737		if test "$cf_result" = yes ; then
34738			test "$cf_path"  = default && cf_x_athena_inc=default
34739			test "$cf_path" != default && cf_x_athena_inc=$cf_path/include
34740			break
34741		fi
34742	fi
34743done
34744
34745if test -z "$cf_x_athena_inc" ; then
34746	{ echo "$as_me:34746: WARNING: Unable to find Athena header files" >&5
34747echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
34748elif test "$cf_x_athena_inc" != default ; then
34749
34750	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34751	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
34752
34753fi
34754
34755cf_x_athena_root=$cf_x_athena
34756cf_x_athena_lib=""
34757
34758for cf_path in default \
34759	/usr/contrib/X11R6 \
34760	/usr/contrib/X11R5 \
34761	/usr/lib/X11R5 \
34762	/usr/local
34763do
34764	for cf_lib in \
34765		${cf_x_athena_root} \
34766		${cf_x_athena_root}7 \
34767		${cf_x_athena_root}6
34768	do
34769	for cf_libs in \
34770		"-l$cf_lib -lXmu" \
34771		"-l$cf_lib -lXpm -lXmu" \
34772		"-l${cf_lib}_s -lXmu_s"
34773	do
34774		test -n "$cf_x_athena_lib" && break
34775
34776cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
34777cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
34778cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
34779LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
34780for cf_X_CFLAGS in $X_CFLAGS
34781do
34782	case "x$cf_X_CFLAGS" in
34783	x-[IUD]*)
34784		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
34785		;;
34786	*)
34787		CFLAGS="$CFLAGS $cf_X_CFLAGS"
34788		;;
34789	esac
34790done
34791
34792		cf_test=XawSimpleMenuAddGlobalActions
34793		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
34794
34795cf_add_libs="$LIBS"
34796# reverse order
34797cf_add_0lib=
34798for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
34799# filter duplicates
34800for cf_add_1lib in $cf_add_0lib; do
34801	for cf_add_2lib in $cf_add_libs; do
34802		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
34803			cf_add_1lib=
34804			break
34805		fi
34806	done
34807	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
34808done
34809LIBS="$cf_add_libs"
34810
34811		echo "$as_me:34811: checking for $cf_test in $cf_libs" >&5
34812echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
34813		cat >conftest.$ac_ext <<_ACEOF
34814#line 34814 "configure"
34815#include "confdefs.h"
34816
34817#include <X11/Intrinsic.h>
34818#include <X11/$cf_x_athena_root/SimpleMenu.h>
34819
34820int
34821main (void)
34822{
34823
34824$cf_test((XtAppContext) 0)
34825  ;
34826  return 0;
34827}
34828_ACEOF
34829rm -f conftest.$ac_objext conftest$ac_exeext
34830if { (eval echo "$as_me:34830: \"$ac_link\"") >&5
34831  (eval $ac_link) 2>&5
34832  ac_status=$?
34833  echo "$as_me:34833: \$? = $ac_status" >&5
34834  (exit $ac_status); } &&
34835         { ac_try='test -s conftest$ac_exeext'
34836  { (eval echo "$as_me:34836: \"$ac_try\"") >&5
34837  (eval $ac_try) 2>&5
34838  ac_status=$?
34839  echo "$as_me:34839: \$? = $ac_status" >&5
34840  (exit $ac_status); }; }; then
34841  cf_result=yes
34842else
34843  echo "$as_me: failed program was:" >&5
34844cat conftest.$ac_ext >&5
34845cf_result=no
34846fi
34847rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
34848		echo "$as_me:34848: result: $cf_result" >&5
34849echo "${ECHO_T}$cf_result" >&6
34850
34851LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
34852CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
34853CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
34854
34855		if test "$cf_result" = yes ; then
34856			cf_x_athena_lib="$cf_libs"
34857			break
34858		fi
34859	done # cf_libs
34860		test -n "$cf_x_athena_lib" && break
34861	done # cf_lib
34862done
34863
34864if test -z "$cf_x_athena_lib" ; then
34865	{ { echo "$as_me:34865: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
34866echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
34867   { (exit 1); exit 1; }; }
34868fi
34869
34870cf_add_libs="$LIBS"
34871# reverse order
34872cf_add_0lib=
34873for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
34874# filter duplicates
34875for cf_add_1lib in $cf_add_0lib; do
34876	for cf_add_2lib in $cf_add_libs; do
34877		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
34878			cf_add_1lib=
34879			break
34880		fi
34881	done
34882	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
34883done
34884LIBS="$cf_add_libs"
34885
34886cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
34887
34888cat >>confdefs.h <<EOF
34889#define $cf_x_athena_LIBS 1
34890EOF
34891
34892fi
34893
34894if test -n "$ac_tool_prefix"; then
34895  for ac_prog in xcurses-config
34896  do
34897    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
34898set dummy $ac_tool_prefix$ac_prog; ac_word=$2
34899echo "$as_me:34899: checking for $ac_word" >&5
34900echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
34901if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
34902  echo $ECHO_N "(cached) $ECHO_C" >&6
34903else
34904  if test -n "$XCURSES_CONFIG"; then
34905  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
34906else
34907  ac_save_IFS=$IFS; IFS=$ac_path_separator
34908ac_dummy="$PATH"
34909for ac_dir in $ac_dummy; do
34910  IFS=$ac_save_IFS
34911  test -z "$ac_dir" && ac_dir=.
34912  $as_executable_p "$ac_dir/$ac_word" || continue
34913ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
34914echo "$as_me:34914: found $ac_dir/$ac_word" >&5
34915break
34916done
34917
34918fi
34919fi
34920XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
34921if test -n "$XCURSES_CONFIG"; then
34922  echo "$as_me:34922: result: $XCURSES_CONFIG" >&5
34923echo "${ECHO_T}$XCURSES_CONFIG" >&6
34924else
34925  echo "$as_me:34925: result: no" >&5
34926echo "${ECHO_T}no" >&6
34927fi
34928
34929    test -n "$XCURSES_CONFIG" && break
34930  done
34931fi
34932if test -z "$XCURSES_CONFIG"; then
34933  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
34934  for ac_prog in xcurses-config
34935do
34936  # Extract the first word of "$ac_prog", so it can be a program name with args.
34937set dummy $ac_prog; ac_word=$2
34938echo "$as_me:34938: checking for $ac_word" >&5
34939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
34940if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
34941  echo $ECHO_N "(cached) $ECHO_C" >&6
34942else
34943  if test -n "$ac_ct_XCURSES_CONFIG"; then
34944  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
34945else
34946  ac_save_IFS=$IFS; IFS=$ac_path_separator
34947ac_dummy="$PATH"
34948for ac_dir in $ac_dummy; do
34949  IFS=$ac_save_IFS
34950  test -z "$ac_dir" && ac_dir=.
34951  $as_executable_p "$ac_dir/$ac_word" || continue
34952ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
34953echo "$as_me:34953: found $ac_dir/$ac_word" >&5
34954break
34955done
34956
34957fi
34958fi
34959ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
34960if test -n "$ac_ct_XCURSES_CONFIG"; then
34961  echo "$as_me:34961: result: $ac_ct_XCURSES_CONFIG" >&5
34962echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
34963else
34964  echo "$as_me:34964: result: no" >&5
34965echo "${ECHO_T}no" >&6
34966fi
34967
34968  test -n "$ac_ct_XCURSES_CONFIG" && break
34969done
34970test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
34971
34972  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
34973fi
34974
34975if test "$XCURSES_CONFIG" != none ; then
34976
34977cf_fix_cppflags=no
34978cf_new_cflags=
34979cf_new_cppflags=
34980cf_new_extra_cppflags=
34981
34982for cf_add_cflags in `$XCURSES_CONFIG --cflags`
34983do
34984case $cf_fix_cppflags in
34985no)
34986	case $cf_add_cflags in
34987	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
34988		case $cf_add_cflags in
34989		-D*)
34990			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
34991
34992			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
34993				&& test -z "${cf_tst_cflags}" \
34994				&& cf_fix_cppflags=yes
34995
34996			if test $cf_fix_cppflags = yes ; then
34997
34998	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
34999	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35000
35001				continue
35002			elif test "${cf_tst_cflags}" = "\"'" ; then
35003
35004	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
35005	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35006
35007				continue
35008			fi
35009			;;
35010		esac
35011		case "$CPPFLAGS" in
35012		*$cf_add_cflags)
35013			;;
35014		*)
35015			case $cf_add_cflags in
35016			-D*)
35017				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
35018
35019CPPFLAGS=`echo "$CPPFLAGS" | \
35020	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
35021		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
35022
35023				;;
35024			esac
35025
35026	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
35027	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
35028
35029			;;
35030		esac
35031		;;
35032	*)
35033
35034	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
35035	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
35036
35037		;;
35038	esac
35039	;;
35040yes)
35041
35042	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
35043	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35044
35045	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
35046
35047	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
35048		&& test -z "${cf_tst_cflags}" \
35049		&& cf_fix_cppflags=no
35050	;;
35051esac
35052done
35053
35054if test -n "$cf_new_cflags" ; then
35055
35056	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
35057	CFLAGS="${CFLAGS}$cf_new_cflags"
35058
35059fi
35060
35061if test -n "$cf_new_cppflags" ; then
35062
35063	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
35064	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
35065
35066fi
35067
35068if test -n "$cf_new_extra_cppflags" ; then
35069
35070	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
35071	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
35072
35073fi
35074
35075cf_add_libs="$LIBS"
35076# reverse order
35077cf_add_0lib=
35078for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
35079# filter duplicates
35080for cf_add_1lib in $cf_add_0lib; do
35081	for cf_add_2lib in $cf_add_libs; do
35082		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
35083			cf_add_1lib=
35084			break
35085		fi
35086	done
35087	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
35088done
35089LIBS="$cf_add_libs"
35090
35091cf_cv_lib_XCurses=yes
35092
35093else
35094
35095LDFLAGS="$LDFLAGS $X_LIBS"
35096
35097test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
35098
35099echo "${as_me:-configure}:35099: testing checking additions to CFLAGS ..." 1>&5
35100
35101cf_check_cflags="$CFLAGS"
35102cf_check_cppflags="$CPPFLAGS"
35103
35104cf_fix_cppflags=no
35105cf_new_cflags=
35106cf_new_cppflags=
35107cf_new_extra_cppflags=
35108
35109for cf_add_cflags in $X_CFLAGS
35110do
35111case $cf_fix_cppflags in
35112no)
35113	case $cf_add_cflags in
35114	-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
35115		case $cf_add_cflags in
35116		-D*)
35117			cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
35118
35119			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
35120				&& test -z "${cf_tst_cflags}" \
35121				&& cf_fix_cppflags=yes
35122
35123			if test $cf_fix_cppflags = yes ; then
35124
35125	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
35126	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35127
35128				continue
35129			elif test "${cf_tst_cflags}" = "\"'" ; then
35130
35131	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
35132	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35133
35134				continue
35135			fi
35136			;;
35137		esac
35138		case "$CPPFLAGS" in
35139		*$cf_add_cflags)
35140			;;
35141		*)
35142			case $cf_add_cflags in
35143			-D*)
35144				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
35145
35146CPPFLAGS=`echo "$CPPFLAGS" | \
35147	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
35148		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
35149
35150				;;
35151			esac
35152
35153	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
35154	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
35155
35156			;;
35157		esac
35158		;;
35159	*)
35160
35161	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
35162	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
35163
35164		;;
35165	esac
35166	;;
35167yes)
35168
35169	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
35170	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
35171
35172	cf_tst_cflags=`echo ${cf_add_cflags} |sed -e 's/^[^"]*"'\''//'`
35173
35174	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
35175		&& test -z "${cf_tst_cflags}" \
35176		&& cf_fix_cppflags=no
35177	;;
35178esac
35179done
35180
35181if test -n "$cf_new_cflags" ; then
35182	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
35183
35184echo "${as_me:-configure}:35184: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
35185
35186	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
35187	CFLAGS="${CFLAGS}$cf_new_cflags"
35188
35189fi
35190
35191if test -n "$cf_new_cppflags" ; then
35192	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
35193
35194echo "${as_me:-configure}:35194: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
35195
35196	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
35197	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
35198
35199fi
35200
35201if test -n "$cf_new_extra_cppflags" ; then
35202	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
35203
35204echo "${as_me:-configure}:35204: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
35205
35206	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
35207	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
35208
35209fi
35210
35211if test "x$cf_check_cflags" != "x$CFLAGS" ; then
35212cat >conftest.$ac_ext <<_ACEOF
35213#line 35213 "configure"
35214#include "confdefs.h"
35215#include <stdio.h>
35216int
35217main (void)
35218{
35219printf("Hello world");
35220  ;
35221  return 0;
35222}
35223_ACEOF
35224rm -f conftest.$ac_objext conftest$ac_exeext
35225if { (eval echo "$as_me:35225: \"$ac_link\"") >&5
35226  (eval $ac_link) 2>&5
35227  ac_status=$?
35228  echo "$as_me:35228: \$? = $ac_status" >&5
35229  (exit $ac_status); } &&
35230         { ac_try='test -s conftest$ac_exeext'
35231  { (eval echo "$as_me:35231: \"$ac_try\"") >&5
35232  (eval $ac_try) 2>&5
35233  ac_status=$?
35234  echo "$as_me:35234: \$? = $ac_status" >&5
35235  (exit $ac_status); }; }; then
35236  :
35237else
35238  echo "$as_me: failed program was:" >&5
35239cat conftest.$ac_ext >&5
35240test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
35241
35242echo "${as_me:-configure}:35242: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
35243
35244	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
35245		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
35246
35247echo "${as_me:-configure}:35247: testing but keeping change to \$CPPFLAGS ..." 1>&5
35248
35249	 fi
35250	 CFLAGS="$cf_check_flags"
35251fi
35252rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
35253fi
35254
35255echo "$as_me:35255: checking for XOpenDisplay in -lX11" >&5
35256echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
35257if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
35258  echo $ECHO_N "(cached) $ECHO_C" >&6
35259else
35260  ac_check_lib_save_LIBS=$LIBS
35261LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
35262cat >conftest.$ac_ext <<_ACEOF
35263#line 35263 "configure"
35264#include "confdefs.h"
35265
35266/* Override any gcc2 internal prototype to avoid an error.  */
35267#ifdef __cplusplus
35268extern "C"
35269#endif
35270/* We use char because int might match the return type of a gcc2
35271   builtin and then its argument prototype would still apply.  */
35272char XOpenDisplay ();
35273int
35274main (void)
35275{
35276XOpenDisplay ();
35277  ;
35278  return 0;
35279}
35280_ACEOF
35281rm -f conftest.$ac_objext conftest$ac_exeext
35282if { (eval echo "$as_me:35282: \"$ac_link\"") >&5
35283  (eval $ac_link) 2>&5
35284  ac_status=$?
35285  echo "$as_me:35285: \$? = $ac_status" >&5
35286  (exit $ac_status); } &&
35287         { ac_try='test -s conftest$ac_exeext'
35288  { (eval echo "$as_me:35288: \"$ac_try\"") >&5
35289  (eval $ac_try) 2>&5
35290  ac_status=$?
35291  echo "$as_me:35291: \$? = $ac_status" >&5
35292  (exit $ac_status); }; }; then
35293  ac_cv_lib_X11_XOpenDisplay=yes
35294else
35295  echo "$as_me: failed program was:" >&5
35296cat conftest.$ac_ext >&5
35297ac_cv_lib_X11_XOpenDisplay=no
35298fi
35299rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
35300LIBS=$ac_check_lib_save_LIBS
35301fi
35302echo "$as_me:35302: result: $ac_cv_lib_X11_XOpenDisplay" >&5
35303echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
35304if test $ac_cv_lib_X11_XOpenDisplay = yes; then
35305
35306cf_add_libs="$LIBS"
35307# reverse order
35308cf_add_0lib=
35309for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
35310# filter duplicates
35311for cf_add_1lib in $cf_add_0lib; do
35312	for cf_add_2lib in $cf_add_libs; do
35313		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
35314			cf_add_1lib=
35315			break
35316		fi
35317	done
35318	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
35319done
35320LIBS="$cf_add_libs"
35321
35322fi
35323
35324echo "$as_me:35324: checking for XCurses library" >&5
35325echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
35326if test "${cf_cv_lib_XCurses+set}" = set; then
35327  echo $ECHO_N "(cached) $ECHO_C" >&6
35328else
35329
35330cf_add_libs="$LIBS"
35331# reverse order
35332cf_add_0lib=
35333for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
35334# filter duplicates
35335for cf_add_1lib in $cf_add_0lib; do
35336	for cf_add_2lib in $cf_add_libs; do
35337		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
35338			cf_add_1lib=
35339			break
35340		fi
35341	done
35342	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
35343done
35344LIBS="$cf_add_libs"
35345
35346cat >conftest.$ac_ext <<_ACEOF
35347#line 35347 "configure"
35348#include "confdefs.h"
35349
35350#include <xcurses.h>
35351char *XCursesProgramName = "test";
35352
35353int
35354main (void)
35355{
35356XCursesExit();
35357  ;
35358  return 0;
35359}
35360_ACEOF
35361rm -f conftest.$ac_objext conftest$ac_exeext
35362if { (eval echo "$as_me:35362: \"$ac_link\"") >&5
35363  (eval $ac_link) 2>&5
35364  ac_status=$?
35365  echo "$as_me:35365: \$? = $ac_status" >&5
35366  (exit $ac_status); } &&
35367         { ac_try='test -s conftest$ac_exeext'
35368  { (eval echo "$as_me:35368: \"$ac_try\"") >&5
35369  (eval $ac_try) 2>&5
35370  ac_status=$?
35371  echo "$as_me:35371: \$? = $ac_status" >&5
35372  (exit $ac_status); }; }; then
35373  cf_cv_lib_XCurses=yes
35374else
35375  echo "$as_me: failed program was:" >&5
35376cat conftest.$ac_ext >&5
35377cf_cv_lib_XCurses=no
35378fi
35379rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
35380
35381fi
35382echo "$as_me:35382: result: $cf_cv_lib_XCurses" >&5
35383echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
35384
35385fi
35386
35387if test $cf_cv_lib_XCurses = yes ; then
35388
35389cat >>confdefs.h <<\EOF
35390#define UNIX 1
35391EOF
35392
35393cat >>confdefs.h <<\EOF
35394#define XCURSES 1
35395EOF
35396
35397	echo "$as_me:35397: checking for xcurses.h" >&5
35398echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
35399if test "${ac_cv_header_xcurses_h+set}" = set; then
35400  echo $ECHO_N "(cached) $ECHO_C" >&6
35401else
35402  cat >conftest.$ac_ext <<_ACEOF
35403#line 35403 "configure"
35404#include "confdefs.h"
35405#include <xcurses.h>
35406_ACEOF
35407if { (eval echo "$as_me:35407: \"$ac_cpp conftest.$ac_ext\"") >&5
35408  (eval $ac_cpp conftest.$ac_ext) 2>conftest.er1
35409  ac_status=$?
35410  egrep -v '^ *\+' conftest.er1 >conftest.err
35411  rm -f conftest.er1
35412  cat conftest.err >&5
35413  echo "$as_me:35413: \$? = $ac_status" >&5
35414  (exit $ac_status); } >/dev/null; then
35415  if test -s conftest.err; then
35416    ac_cpp_err=$ac_c_preproc_warn_flag
35417  else
35418    ac_cpp_err=
35419  fi
35420else
35421  ac_cpp_err=yes
35422fi
35423if test -z "$ac_cpp_err"; then
35424  ac_cv_header_xcurses_h=yes
35425else
35426  echo "$as_me: failed program was:" >&5
35427  cat conftest.$ac_ext >&5
35428  ac_cv_header_xcurses_h=no
35429fi
35430rm -f conftest.err conftest.$ac_ext
35431fi
35432echo "$as_me:35432: result: $ac_cv_header_xcurses_h" >&5
35433echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
35434if test $ac_cv_header_xcurses_h = yes; then
35435
35436cat >>confdefs.h <<\EOF
35437#define HAVE_XCURSES 1
35438EOF
35439
35440fi
35441
35442else
35443	{ { echo "$as_me:35443: error: Cannot link with XCurses" >&5
35444echo "$as_me: error: Cannot link with XCurses" >&2;}
35445   { (exit 1); exit 1; }; }
35446fi
35447
35448fi
35449
35450for ac_func in vw_printw
35451do
35452as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
35453echo "$as_me:35453: checking for $ac_func" >&5
35454echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
35455if eval "test \"\${$as_ac_var+set}\" = set"; then
35456  echo $ECHO_N "(cached) $ECHO_C" >&6
35457else
35458  cat >conftest.$ac_ext <<_ACEOF
35459#line 35459 "configure"
35460#include "confdefs.h"
35461#define $ac_func autoconf_temporary
35462#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
35463#undef $ac_func
35464
35465#ifdef __cplusplus
35466extern "C"
35467#endif
35468
35469/* We use char because int might match the return type of a gcc2
35470   builtin and then its argument prototype would still apply.  */
35471char $ac_func (void);
35472
35473int
35474main (void)
35475{
35476
35477/* The GNU C library defines stubs for functions which it implements
35478    to always fail with ENOSYS.  Some functions are actually named
35479    something starting with __ and the normal name is an alias.  */
35480#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
35481#error found stub for $ac_func
35482#endif
35483
35484	return $ac_func ();
35485  ;
35486  return 0;
35487}
35488_ACEOF
35489rm -f conftest.$ac_objext conftest$ac_exeext
35490if { (eval echo "$as_me:35490: \"$ac_link\"") >&5
35491  (eval $ac_link) 2>&5
35492  ac_status=$?
35493  echo "$as_me:35493: \$? = $ac_status" >&5
35494  (exit $ac_status); } &&
35495         { ac_try='test -s conftest$ac_exeext'
35496  { (eval echo "$as_me:35496: \"$ac_try\"") >&5
35497  (eval $ac_try) 2>&5
35498  ac_status=$?
35499  echo "$as_me:35499: \$? = $ac_status" >&5
35500  (exit $ac_status); }; }; then
35501  eval "$as_ac_var=yes"
35502else
35503  echo "$as_me: failed program was:" >&5
35504cat conftest.$ac_ext >&5
35505eval "$as_ac_var=no"
35506fi
35507rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
35508fi
35509echo "$as_me:35509: result: `eval echo '${'$as_ac_var'}'`" >&5
35510echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
35511if test `eval echo '${'$as_ac_var'}'` = yes; then
35512  cat >>confdefs.h <<EOF
35513#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
35514EOF
35515
35516fi
35517done
35518
35519### sum up warnings
35520if test "$cf_cv_termlib" = none ; then
35521	{ echo "$as_me:35521: WARNING: no term-lib found, you might run into trouble later." >&5
35522echo "$as_me: WARNING: no term-lib found, you might run into trouble later." >&2;}
35523fi
35524if test "$YACC" = "" ; then
35525	{ echo "$as_me:35525: WARNING: no yacc-parser found, you might run into trouble later." >&5
35526echo "$as_me: WARNING: no yacc-parser found, you might run into trouble later." >&2;}
35527fi
35528if test "$RANLIB" = "" ; then
35529	{ echo "$as_me:35529: WARNING: no library archive builder found, you might run into trouble later." >&5
35530echo "$as_me: WARNING: no library archive builder found, you might run into trouble later." >&2;}
35531fi
35532
35533### Finally, build autoconf.h and the makefiles
35534CFLAGS="$CFLAGS $EXTRA_CFLAGS"
35535
35536LINTFLAGS=$LINTFLAGS
35537
35538cf_define=`echo "$CC"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35539
35540cat >>confdefs.h <<EOF
35541#define TIN_CC "$cf_define"
35542EOF
35543
35544cf_define=`echo "$CFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35545
35546cat >>confdefs.h <<EOF
35547#define TIN_CFLAGS "$cf_define"
35548EOF
35549
35550cf_define=`echo "$CPP"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35551
35552cat >>confdefs.h <<EOF
35553#define TIN_CPP "$cf_define"
35554EOF
35555
35556cf_define=`echo "$CPPFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35557
35558cat >>confdefs.h <<EOF
35559#define TIN_CPPFLAGS "$cf_define"
35560EOF
35561
35562cf_define=`echo "$CC"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35563
35564cat >>confdefs.h <<EOF
35565#define TIN_LD "$cf_define"
35566EOF
35567
35568cf_define=`echo "$LDFLAGS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35569
35570cat >>confdefs.h <<EOF
35571#define TIN_LDFLAGS "$cf_define"
35572EOF
35573
35574cf_define=`echo "$PCREDIR_LIBS $CANLIBS $LIBS"|sed -e 's/\\\\/\\\\134/g' -e 's/^[ 	]\\+//' -e 's/[ 	]\\+$//' -e 's/"/\\\\042/g'`
35575
35576cat >>confdefs.h <<EOF
35577#define TIN_LIBS "$cf_define"
35578EOF
35579
35580ac_config_files="$ac_config_files $PCRE_MAKEFILE $SUB_MAKEFILE $CAN_MAKEFILE src/Makefile"
35581cat >confcache <<\_ACEOF
35582# This file is a shell script that caches the results of configure
35583# tests run on this system so they can be shared between configure
35584# scripts and configure runs, see configure's option --config-cache.
35585# It is not useful on other systems.  If it contains results you don't
35586# want to keep, you may remove or edit it.
35587#
35588# config.status only pays attention to the cache file if you give it
35589# the --recheck option to rerun configure.
35590#
35591# `ac_cv_env_foo' variables (set or unset) will be overridden when
35592# loading this file, other *unset* `ac_cv_foo' will be assigned the
35593# following values.
35594
35595_ACEOF
35596
35597# The following way of writing the cache mishandles newlines in values,
35598# but we know of no workaround that is simple, portable, and efficient.
35599# So, don't put newlines in cache variables' values.
35600# Ultrix sh set writes to stderr and can't be redirected directly,
35601# and sets the high bit in the cache file unless we assign to the vars.
35602{
35603  (set) 2>&1 |
35604    case `(ac_space=' '; set | grep ac_space) 2>&1` in
35605    *ac_space=\ *)
35606      # `set' does not quote correctly, so add quotes (double-quote
35607      # substitution turns \\\\ into \\, and sed turns \\ into \).
35608      sed -n \
35609        "s/'/'\\\\''/g;
35610    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
35611      ;;
35612    *)
35613      # `set' quotes correctly as required by POSIX, so do not add quotes.
35614      sed -n \
35615        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
35616      ;;
35617    esac;
35618} |
35619  sed '
35620     t clear
35621     : clear
35622     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
35623     t end
35624     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
35625     : end' >>confcache
35626if cmp -s $cache_file confcache; then :; else
35627  if test -w $cache_file; then
35628    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
35629    cat confcache >$cache_file
35630  else
35631    echo "not updating unwritable cache $cache_file"
35632  fi
35633fi
35634rm -f confcache
35635test "x$prefix" = xNONE && prefix=$ac_default_prefix
35636# Let make expand exec_prefix.
35637test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
35638
35639# VPATH may cause trouble with some makes, so we remove $(srcdir),
35640# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
35641# trailing colons and then remove the whole line if VPATH becomes empty
35642# (actually we leave an empty line to preserve line numbers).
35643if test "x$srcdir" = x.; then
35644  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
35645s/:*\$(srcdir):*/:/;
35646s/:*\${srcdir}:*/:/;
35647s/:*@srcdir@:*/:/;
35648s/^\([^=]*=[ 	]*\):*/\1/;
35649s/:*$//;
35650s/^[^=]*=[ 	]*$//;
35651}'
35652fi
35653
35654DEFS=-DHAVE_CONFIG_H
35655
35656: ${CONFIG_STATUS=./config.status}
35657ac_clean_files_save=$ac_clean_files
35658ac_clean_files="$ac_clean_files $CONFIG_STATUS"
35659{ echo "$as_me:35659: creating $CONFIG_STATUS" >&5
35660echo "$as_me: creating $CONFIG_STATUS" >&6;}
35661cat >$CONFIG_STATUS <<_ACEOF
35662#! $SHELL
35663# Generated automatically by configure.
35664# Run this file to recreate the current configuration.
35665# Compiler output produced by configure, useful for debugging
35666# configure, is in config.log if it exists.
35667
35668debug=false
35669SHELL=\${CONFIG_SHELL-$SHELL}
35670ac_cs_invocation="\$0 \$@"
35671
35672CLICOLOR_FORCE= GREP_OPTIONS=
35673unset CLICOLOR_FORCE GREP_OPTIONS
35674_ACEOF
35675
35676cat >>$CONFIG_STATUS <<\_ACEOF
35677# Be Bourne compatible
35678if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
35679  emulate sh
35680  NULLCMD=:
35681elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
35682  set -o posix
35683fi
35684
35685# Name of the executable.
35686as_me=`echo "$0" |sed 's,.*[\\/],,'`
35687
35688if expr a : '\(a\)' >/dev/null 2>&1; then
35689  as_expr=expr
35690else
35691  as_expr=false
35692fi
35693
35694rm -f conf$$ conf$$.exe conf$$.file
35695echo >conf$$.file
35696if ln -s conf$$.file conf$$ 2>/dev/null; then
35697  # We could just check for DJGPP; but this test a) works b) is more generic
35698  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
35699  if test -f conf$$.exe; then
35700    # Don't use ln at all; we don't have any links
35701    as_ln_s='cp -p'
35702  else
35703    as_ln_s='ln -s'
35704  fi
35705elif ln conf$$.file conf$$ 2>/dev/null; then
35706  as_ln_s=ln
35707else
35708  as_ln_s='cp -p'
35709fi
35710rm -f conf$$ conf$$.exe conf$$.file
35711
35712as_executable_p="test -f"
35713
35714# Support unset when possible.
35715if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
35716  as_unset=unset
35717else
35718  as_unset=false
35719fi
35720
35721# NLS nuisances.
35722$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
35723$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
35724$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
35725$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
35726$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
35727$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
35728$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
35729$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
35730
35731# IFS
35732# We need space, tab and new line, in precisely that order.
35733as_nl='
35734'
35735IFS=" 	$as_nl"
35736
35737# CDPATH.
35738$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
35739
35740exec 6>&1
35741
35742_ACEOF
35743
35744# Files that config.status was made for.
35745if test -n "$ac_config_files"; then
35746  echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
35747fi
35748
35749if test -n "$ac_config_headers"; then
35750  echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
35751fi
35752
35753if test -n "$ac_config_links"; then
35754  echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
35755fi
35756
35757if test -n "$ac_config_commands"; then
35758  echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
35759fi
35760
35761cat >>$CONFIG_STATUS <<\EOF
35762
35763ac_cs_usage="\
35764\`$as_me' instantiates files from templates according to the
35765current configuration.
35766
35767Usage: $0 [OPTIONS] [FILE]...
35768
35769  -h, --help       print this help, then exit
35770  -V, --version    print version number, then exit
35771  -d, --debug      don't remove temporary files
35772      --recheck    update $as_me by reconfiguring in the same conditions
35773  --file=FILE[:TEMPLATE]
35774                   instantiate the configuration file FILE
35775  --header=FILE[:TEMPLATE]
35776                   instantiate the configuration header FILE
35777
35778Configuration files:
35779$config_files
35780
35781Configuration headers:
35782$config_headers
35783
35784Configuration commands:
35785$config_commands
35786
35787Report bugs to <dickey@invisible-island.net>."
35788EOF
35789
35790cat >>$CONFIG_STATUS <<EOF
35791ac_cs_version="\\
35792config.status
35793configured by $0, generated by GNU Autoconf 2.52.20200802,
35794  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
35795
35796Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
35797Free Software Foundation, Inc.
35798This config.status script is free software; the Free Software Foundation
35799gives unlimited permission to copy, distribute and modify it."
35800srcdir=$srcdir
35801INSTALL="$INSTALL"
35802EOF
35803
35804cat >>$CONFIG_STATUS <<\EOF
35805# If no file are specified by the user, then we need to provide default
35806# value.  By we need to know if files were specified by the user.
35807ac_need_defaults=:
35808while test $# != 0
35809do
35810  case $1 in
35811  --*=*)
35812    ac_option=`expr "x$1" : 'x\([^=]*\)='`
35813    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
35814    shift
35815    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
35816    shift
35817    ;;
35818  -*);;
35819  *) # This is not an option, so the user has probably given explicit
35820     # arguments.
35821     ac_need_defaults=false;;
35822  esac
35823
35824  case $1 in
35825  # Handling of the options.
35826EOF
35827cat >>$CONFIG_STATUS <<EOF
35828  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
35829    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
35830    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
35831EOF
35832cat >>$CONFIG_STATUS <<\EOF
35833  --version | --vers* | -V )
35834    echo "$ac_cs_version"; exit 0 ;;
35835  --he | --h)
35836    # Conflict between --help and --header
35837    { { echo "$as_me:35837: error: ambiguous option: $1
35838Try \`$0 --help' for more information." >&5
35839echo "$as_me: error: ambiguous option: $1
35840Try \`$0 --help' for more information." >&2;}
35841   { (exit 1); exit 1; }; };;
35842  --help | --hel | -h )
35843    echo "$ac_cs_usage"; exit 0 ;;
35844  --debug | --d* | -d )
35845    debug=: ;;
35846  --file | --fil | --fi | --f )
35847    shift
35848    CONFIG_FILES="$CONFIG_FILES $1"
35849    ac_need_defaults=false;;
35850  --header | --heade | --head | --hea )
35851    shift
35852    CONFIG_HEADERS="$CONFIG_HEADERS $1"
35853    ac_need_defaults=false;;
35854
35855  # This is an error.
35856  -*) { { echo "$as_me:35856: error: unrecognized option: $1
35857Try \`$0 --help' for more information." >&5
35858echo "$as_me: error: unrecognized option: $1
35859Try \`$0 --help' for more information." >&2;}
35860   { (exit 1); exit 1; }; } ;;
35861
35862  *) ac_config_targets="$ac_config_targets $1" ;;
35863
35864  esac
35865  shift
35866done
35867
35868exec 5>>config.log
35869cat >&5 << _ACEOF
35870
35871## ----------------------- ##
35872## Running config.status.  ##
35873## ----------------------- ##
35874
35875This file was extended by $as_me 2.52.20200802, executed with
35876  CONFIG_FILES    = $CONFIG_FILES
35877  CONFIG_HEADERS  = $CONFIG_HEADERS
35878  CONFIG_LINKS    = $CONFIG_LINKS
35879  CONFIG_COMMANDS = $CONFIG_COMMANDS
35880  > $ac_cs_invocation
35881on `(hostname || uname -n) 2>/dev/null | sed 1q`
35882
35883_ACEOF
35884EOF
35885
35886cat >>$CONFIG_STATUS <<EOF
35887#
35888# INIT-COMMANDS section.
35889#
35890
35891EOF
35892
35893cat >>$CONFIG_STATUS <<\EOF
35894for ac_config_target in $ac_config_targets
35895do
35896  case "$ac_config_target" in
35897  # Handling of arguments.
35898  "$PCRE_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $PCRE_MAKEFILE" ;;
35899  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
35900  "$CAN_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $CAN_MAKEFILE" ;;
35901  "src/Makefile" ) CONFIG_FILES="$CONFIG_FILES src/Makefile" ;;
35902  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
35903  "include/autoconf.h" ) CONFIG_HEADERS="$CONFIG_HEADERS include/autoconf.h:include/autoconf.hin" ;;
35904  *) { { echo "$as_me:35904: error: invalid argument: $ac_config_target" >&5
35905echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
35906   { (exit 1); exit 1; }; };;
35907  esac
35908done
35909
35910# If the user did not use the arguments to specify the items to instantiate,
35911# then the envvar interface is used.  Set only those that are not.
35912# We use the long form for the default assignment because of an extremely
35913# bizarre bug on SunOS 4.1.3.
35914if $ac_need_defaults; then
35915  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
35916  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
35917  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
35918fi
35919
35920# Create a temporary directory, and hook for its removal unless debugging.
35921$debug ||
35922{
35923  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
35924  trap '{ (exit 1); exit 1; }' 1 2 13 15
35925}
35926
35927# Create a (secure) tmp directory for tmp files.
35928: ${TMPDIR=/tmp}
35929{
35930  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
35931  test -n "$tmp" && test -d "$tmp"
35932}  ||
35933{
35934  tmp=$TMPDIR/cs$$-$RANDOM
35935  (umask 077 && mkdir $tmp)
35936} ||
35937{
35938   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
35939   { (exit 1); exit 1; }
35940}
35941
35942EOF
35943
35944cat >>$CONFIG_STATUS <<EOF
35945
35946#
35947# CONFIG_FILES section.
35948#
35949
35950# No need to generate the scripts if there are no CONFIG_FILES.
35951# This happens for instance when ./config.status config.h
35952if test -n "\$CONFIG_FILES"; then
35953  # Protect against being on the right side of a sed subst in config.status.
35954  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
35955   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
35956s,@SHELL@,$SHELL,;t t
35957s,@exec_prefix@,$exec_prefix,;t t
35958s,@prefix@,$prefix,;t t
35959s,@program_transform_name@,$program_transform_name,;t t
35960s,@bindir@,$bindir,;t t
35961s,@sbindir@,$sbindir,;t t
35962s,@libexecdir@,$libexecdir,;t t
35963s,@datarootdir@,$datarootdir,;t t
35964s,@datadir@,$datadir,;t t
35965s,@sysconfdir@,$sysconfdir,;t t
35966s,@sharedstatedir@,$sharedstatedir,;t t
35967s,@localstatedir@,$localstatedir,;t t
35968s,@runstatedir@,$runstatedir,;t t
35969s,@libdir@,$libdir,;t t
35970s,@includedir@,$includedir,;t t
35971s,@oldincludedir@,$oldincludedir,;t t
35972s,@infodir@,$infodir,;t t
35973s,@mandir@,$mandir,;t t
35974s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
35975s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
35976s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
35977s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
35978s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
35979s,@build_alias@,$build_alias,;t t
35980s,@host_alias@,$host_alias,;t t
35981s,@target_alias@,$target_alias,;t t
35982s,@ECHO_C@,$ECHO_C,;t t
35983s,@ECHO_N@,$ECHO_N,;t t
35984s,@ECHO_T@,$ECHO_T,;t t
35985s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
35986s,@DEFS@,$DEFS,;t t
35987s,@LIBS@,$LIBS,;t t
35988s,@PACKAGE@,$PACKAGE,;t t
35989s,@VERSION@,$VERSION,;t t
35990s,@build@,$build,;t t
35991s,@build_cpu@,$build_cpu,;t t
35992s,@build_vendor@,$build_vendor,;t t
35993s,@build_os@,$build_os,;t t
35994s,@host@,$host,;t t
35995s,@host_cpu@,$host_cpu,;t t
35996s,@host_vendor@,$host_vendor,;t t
35997s,@host_os@,$host_os,;t t
35998s,@DESTDIR@,$DESTDIR,;t t
35999s,@XLC@,$XLC,;t t
36000s,@CC@,$CC,;t t
36001s,@CFLAGS@,$CFLAGS,;t t
36002s,@LDFLAGS@,$LDFLAGS,;t t
36003s,@CPPFLAGS@,$CPPFLAGS,;t t
36004s,@ac_ct_CC@,$ac_ct_CC,;t t
36005s,@EXEEXT@,$EXEEXT,;t t
36006s,@OBJEXT@,$OBJEXT,;t t
36007s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
36008s,@CPP@,$CPP,;t t
36009s,@SET_MAKE@,$SET_MAKE,;t t
36010s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
36011s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
36012s,@INSTALL_DATA@,$INSTALL_DATA,;t t
36013s,@YACC@,$YACC,;t t
36014s,@LINT@,$LINT,;t t
36015s,@PROG_EXT@,$PROG_EXT,;t t
36016s,@LIB_PREFIX@,$LIB_PREFIX,;t t
36017s,@LN_S@,$LN_S,;t t
36018s,@BUILD_CC@,$BUILD_CC,;t t
36019s,@BUILD_CPP@,$BUILD_CPP,;t t
36020s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
36021s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
36022s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
36023s,@BUILD_LIBS@,$BUILD_LIBS,;t t
36024s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
36025s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
36026s,@RANLIB@,$RANLIB,;t t
36027s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
36028s,@LD@,$LD,;t t
36029s,@ac_ct_LD@,$ac_ct_LD,;t t
36030s,@AR@,$AR,;t t
36031s,@ac_ct_AR@,$ac_ct_AR,;t t
36032s,@ARFLAGS@,$ARFLAGS,;t t
36033s,@PATH_ISPELL@,$PATH_ISPELL,;t t
36034s,@PATH_METAMAIL@,$PATH_METAMAIL,;t t
36035s,@PATH_SUM@,$PATH_SUM,;t t
36036s,@DEFAULT_EDITOR@,$DEFAULT_EDITOR,;t t
36037s,@DEFAULT_MAILER@,$DEFAULT_MAILER,;t t
36038s,@PKG_CONFIG@,$PKG_CONFIG,;t t
36039s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
36040s,@PATH_PGP@,$PATH_PGP,;t t
36041s,@PATH_PGPK@,$PATH_PGPK,;t t
36042s,@PATH_GPG@,$PATH_GPG,;t t
36043s,@PATH_SLRNFACE@,$PATH_SLRNFACE,;t t
36044s,@DEFAULT_SHELL@,$DEFAULT_SHELL,;t t
36045s,@ENABLE_DEBUG@,$ENABLE_DEBUG,;t t
36046s,@ECHO_LT@,$ECHO_LT,;t t
36047s,@ECHO_LD@,$ECHO_LD,;t t
36048s,@RULE_CC@,$RULE_CC,;t t
36049s,@SHOW_CC@,$SHOW_CC,;t t
36050s,@ECHO_CC@,$ECHO_CC,;t t
36051s,@X_CFLAGS@,$X_CFLAGS,;t t
36052s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
36053s,@X_LIBS@,$X_LIBS,;t t
36054s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
36055s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
36056s,@NEWSLIBDIR@,$NEWSLIBDIR,;t t
36057s,@SPOOLDIR@,$SPOOLDIR,;t t
36058s,@NOVROOTDIR@,$NOVROOTDIR,;t t
36059s,@INEWSDIR@,$INEWSDIR,;t t
36060s,@INEWS@,$INEWS,;t t
36061s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
36062s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
36063s,@PCRE_MAJOR@,$PCRE_MAJOR,;t t
36064s,@PCRE_MINOR@,$PCRE_MINOR,;t t
36065s,@PCRE_DATE@,$PCRE_DATE,;t t
36066s,@PCRE_DEFINES@,$PCRE_DEFINES,;t t
36067s,@PCREDIR_MAKE@,$PCREDIR_MAKE,;t t
36068s,@PCREDIR_LIBS@,$PCREDIR_LIBS,;t t
36069s,@PCREDIR_CPPFLAGS@,$PCREDIR_CPPFLAGS,;t t
36070s,@LINK_SIZE@,$LINK_SIZE,;t t
36071s,@UTF8@,$UTF8,;t t
36072s,@UCP@,$UCP,;t t
36073s,@EXTRAOBJS@,$EXTRAOBJS,;t t
36074s,@EXTRAO_DEP@,$EXTRAO_DEP,;t t
36075s,@CANDIR_MAKE@,$CANDIR_MAKE,;t t
36076s,@CANLIBS@,$CANLIBS,;t t
36077s,@CAN_CPPFLAGS@,$CAN_CPPFLAGS,;t t
36078s,@CAN_MAKEFILE@,$CAN_MAKEFILE,;t t
36079s,@TIN_DEFAULTS_DIR@,$TIN_DEFAULTS_DIR,;t t
36080s,@LIBOBJS@,$LIBOBJS,;t t
36081s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
36082s,@CONFIG_H@,$CONFIG_H,;t t
36083s,@ALLOCA@,$ALLOCA,;t t
36084s,@GLIBC21@,$GLIBC21,;t t
36085s,@LIBICONV@,$LIBICONV,;t t
36086s,@USE_NLS@,$USE_NLS,;t t
36087s,@MSGFMT@,$MSGFMT,;t t
36088s,@GMSGFMT@,$GMSGFMT,;t t
36089s,@XGETTEXT@,$XGETTEXT,;t t
36090s,@INTLBISON@,$INTLBISON,;t t
36091s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
36092s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
36093s,@CATALOGS@,$CATALOGS,;t t
36094s,@CATOBJEXT@,$CATOBJEXT,;t t
36095s,@GMOFILES@,$GMOFILES,;t t
36096s,@INTLLIBS@,$INTLLIBS,;t t
36097s,@INTLOBJS@,$INTLOBJS,;t t
36098s,@POFILES@,$POFILES,;t t
36099s,@POSUB@,$POSUB,;t t
36100s,@DATADIRNAME@,$DATADIRNAME,;t t
36101s,@INSTOBJEXT@,$INSTOBJEXT,;t t
36102s,@GENCAT@,$GENCAT,;t t
36103s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
36104s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
36105s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
36106s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
36107s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
36108s,@GT_YES@,$GT_YES,;t t
36109s,@GT_NO@,$GT_NO,;t t
36110s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
36111s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
36112s,@LINTFLAGS@,$LINTFLAGS,;t t
36113CEOF
36114
36115EOF
36116
36117  cat >>$CONFIG_STATUS <<\EOF
36118  # Split the substitutions into bite-sized pieces for seds with
36119  # small command number limits, like on Digital OSF/1 and HP-UX.
36120  ac_max_sed_lines=48
36121  ac_sed_frag=1 # Number of current file.
36122  ac_beg=1 # First line for current file.
36123  ac_end=$ac_max_sed_lines # Line after last line for current file.
36124  ac_more_lines=:
36125  ac_sed_cmds=
36126  while $ac_more_lines; do
36127    if test $ac_beg -gt 1; then
36128      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
36129    else
36130      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
36131    fi
36132    if test ! -s $tmp/subs.frag; then
36133      ac_more_lines=false
36134    else
36135      # The purpose of the label and of the branching condition is to
36136      # speed up the sed processing (if there are no `@' at all, there
36137      # is no need to browse any of the substitutions).
36138      # These are the two extra sed commands mentioned above.
36139      (echo ':t
36140  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
36141      # It is possible to make a multiline substitution using escaped newlines.
36142      # Ensure that we do not split the substitution between script fragments.
36143      ac_BEG=$ac_end
36144      ac_END=`expr $ac_end + $ac_max_sed_lines`
36145      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
36146      if test -s $tmp/subs.next; then
36147        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
36148        if test ! -s $tmp/subs.edit; then
36149          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
36150          if test ! -s $tmp/subs.edit; then
36151            if test $ac_beg -gt 1; then
36152              ac_end=`expr $ac_end - 1`
36153              continue
36154            fi
36155          fi
36156        fi
36157      fi
36158
36159      if test -z "$ac_sed_cmds"; then
36160        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
36161      else
36162        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
36163      fi
36164      ac_sed_frag=`expr $ac_sed_frag + 1`
36165      ac_beg=$ac_end
36166      ac_end=`expr $ac_end + $ac_max_sed_lines`
36167    fi
36168  done
36169  if test -z "$ac_sed_cmds"; then
36170    ac_sed_cmds=cat
36171  fi
36172fi # test -n "$CONFIG_FILES"
36173
36174EOF
36175cat >>$CONFIG_STATUS <<\EOF
36176for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
36177  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
36178  case $ac_file in
36179  - | *:- | *:-:* ) # input from stdin
36180        cat >$tmp/stdin
36181        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
36182        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
36183  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
36184        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
36185  * )   ac_file_in=$ac_file.in ;;
36186  esac
36187
36188  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
36189  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36190         X"$ac_file" : 'X\(//\)[^/]' \| \
36191         X"$ac_file" : 'X\(//\)$' \| \
36192         X"$ac_file" : 'X\(/\)' \| \
36193         .     : '\(.\)' 2>/dev/null ||
36194echo X"$ac_file" |
36195    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
36196  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
36197  	  /^X\(\/\/\)$/{ s//\1/; q; }
36198  	  /^X\(\/\).*/{ s//\1/; q; }
36199  	  s/.*/./; q'`
36200  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
36201    { case "$ac_dir" in
36202  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
36203  *)                      as_incr_dir=.;;
36204esac
36205as_dummy="$ac_dir"
36206for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
36207  case $as_mkdir_dir in
36208    # Skip DOS drivespec
36209    ?:) as_incr_dir=$as_mkdir_dir ;;
36210    *)
36211      as_incr_dir=$as_incr_dir/$as_mkdir_dir
36212      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
36213    ;;
36214  esac
36215done; }
36216
36217    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
36218    # A "../" for each directory in $ac_dir_suffix.
36219    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
36220  else
36221    ac_dir_suffix= ac_dots=
36222  fi
36223
36224  case $srcdir in
36225  .)  ac_srcdir=.
36226      if test -z "$ac_dots"; then
36227         ac_top_srcdir=.
36228      else
36229         ac_top_srcdir=`echo $ac_dots | sed 's,/$,,'`
36230      fi ;;
36231  [\\/]* | ?:[\\/]* )
36232      ac_srcdir=$srcdir$ac_dir_suffix;
36233      ac_top_srcdir=$srcdir ;;
36234  *) # Relative path.
36235    ac_srcdir=$ac_dots$srcdir$ac_dir_suffix
36236    ac_top_srcdir=$ac_dots$srcdir ;;
36237  esac
36238
36239  case $INSTALL in
36240  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
36241  *) ac_INSTALL=$ac_dots$INSTALL ;;
36242  esac
36243
36244  if test x"$ac_file" != x-; then
36245    { echo "$as_me:36245: creating $ac_file" >&5
36246echo "$as_me: creating $ac_file" >&6;}
36247    rm -f "$ac_file"
36248  fi
36249  # Let's still pretend it is `configure' which instantiates (i.e., don't
36250  # use $as_me), people would be surprised to read:
36251  #    /* config.h.  Generated automatically by config.status.  */
36252  configure_input="Generated automatically from `echo $ac_file_in |
36253                                                 sed 's,.*/,,'` by configure."
36254
36255  # First look for the input files in the build tree, otherwise in the
36256  # src tree.
36257  ac_file_inputs=`IFS=:
36258    for f in $ac_file_in; do
36259      case $f in
36260      -) echo $tmp/stdin ;;
36261      [\\/$]*)
36262         # Absolute (can't be DOS-style, as IFS=:)
36263         test -f "$f" || { { echo "$as_me:36263: error: cannot find input file: $f" >&5
36264echo "$as_me: error: cannot find input file: $f" >&2;}
36265   { (exit 1); exit 1; }; }
36266         echo $f;;
36267      *) # Relative
36268         if test -f "$f"; then
36269           # Build tree
36270           echo $f
36271         elif test -f "$srcdir/$f"; then
36272           # Source tree
36273           echo $srcdir/$f
36274         else
36275           # /dev/null tree
36276           { { echo "$as_me:36276: error: cannot find input file: $f" >&5
36277echo "$as_me: error: cannot find input file: $f" >&2;}
36278   { (exit 1); exit 1; }; }
36279         fi;;
36280      esac
36281    done` || { (exit 1); exit 1; }
36282EOF
36283cat >>$CONFIG_STATUS <<\EOF
36284  ac_warn_datarootdir=no
36285  if test x"$ac_file" != x-; then
36286    for ac_item in $ac_file_inputs
36287    do
36288      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' $ac_item`
36289      if test -n "$ac_seen"; then
36290        ac_used=`grep '@datarootdir@' $ac_item`
36291        if test -z "$ac_used"; then
36292          { echo "$as_me:36292: WARNING: datarootdir was used implicitly but not set:
36293$ac_seen" >&5
36294echo "$as_me: WARNING: datarootdir was used implicitly but not set:
36295$ac_seen" >&2;}
36296          ac_warn_datarootdir=yes
36297        fi
36298      fi
36299      ac_seen=`grep '${datarootdir}' $ac_item`
36300      if test -n "$ac_seen"; then
36301        { echo "$as_me:36301: WARNING: datarootdir was used explicitly but not set:
36302$ac_seen" >&5
36303echo "$as_me: WARNING: datarootdir was used explicitly but not set:
36304$ac_seen" >&2;}
36305        ac_warn_datarootdir=yes
36306      fi
36307    done
36308  fi
36309
36310if test "x$ac_warn_datarootdir" = xyes; then
36311  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
36312fi
36313
36314EOF
36315cat >>$CONFIG_STATUS <<EOF
36316  sed "$ac_vpsub
36317$extrasub
36318EOF
36319cat >>$CONFIG_STATUS <<\EOF
36320:t
36321/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
36322s,@configure_input@,$configure_input,;t t
36323s,@srcdir@,$ac_srcdir,;t t
36324s,@top_srcdir@,$ac_top_srcdir,;t t
36325s,@INSTALL@,$ac_INSTALL,;t t
36326" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
36327  rm -f $tmp/stdin
36328  if test x"$ac_file" != x-; then
36329    cp $tmp/out $ac_file
36330
36331    for ac_name in prefix exec_prefix datarootdir
36332    do
36333        ac_seen=`fgrep -n '${'$ac_name'[:=].*}' $ac_file`
36334        if test -n "$ac_seen"; then
36335            ac_init=`egrep '[ 	]*'$ac_name'[ 	]*=' $ac_file`
36336            if test -z "$ac_init"; then
36337              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
36338              { echo "$as_me:36338: WARNING: Variable $ac_name is used but was not set:
36339$ac_seen" >&5
36340echo "$as_me: WARNING: Variable $ac_name is used but was not set:
36341$ac_seen" >&2;}
36342            fi
36343        fi
36344    done
36345    egrep -n '@[a-z_][a-z_0-9]+@' $ac_file >$tmp/out
36346    egrep -n '@[A-Z_][A-Z_0-9]+@' $ac_file >>$tmp/out
36347    if test -s $tmp/out; then
36348      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
36349      { echo "$as_me:36349: WARNING: Some variables may not be substituted:
36350$ac_seen" >&5
36351echo "$as_me: WARNING: Some variables may not be substituted:
36352$ac_seen" >&2;}
36353    fi
36354  else
36355    cat $tmp/out
36356  fi
36357  rm -f $tmp/out
36358
36359done
36360EOF
36361cat >>$CONFIG_STATUS <<\EOF
36362
36363#
36364# CONFIG_HEADER section.
36365#
36366
36367# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
36368# NAME is the cpp macro being defined and VALUE is the value it is being given.
36369#
36370# ac_d sets the value in "#define NAME VALUE" lines.
36371ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
36372ac_dB='[ 	].*$,\1#\2'
36373ac_dC=' '
36374ac_dD=',;t'
36375# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
36376ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
36377ac_iB='\([ 	]\),\1#\2define\3'
36378ac_iC=' '
36379ac_iD='\4,;t'
36380# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
36381ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
36382ac_uB='$,\1#\2define\3'
36383ac_uC=' '
36384ac_uD=',;t'
36385
36386for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
36387  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
36388  case $ac_file in
36389  - | *:- | *:-:* ) # input from stdin
36390        cat >$tmp/stdin
36391        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
36392        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
36393  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
36394        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
36395  * )   ac_file_in=$ac_file.in ;;
36396  esac
36397
36398  test x"$ac_file" != x- && { echo "$as_me:36398: creating $ac_file" >&5
36399echo "$as_me: creating $ac_file" >&6;}
36400
36401  # First look for the input files in the build tree, otherwise in the
36402  # src tree.
36403  ac_file_inputs=`IFS=:
36404    for f in $ac_file_in; do
36405      case $f in
36406      -) echo $tmp/stdin ;;
36407      [\\/$]*)
36408         # Absolute (can't be DOS-style, as IFS=:)
36409         test -f "$f" || { { echo "$as_me:36409: error: cannot find input file: $f" >&5
36410echo "$as_me: error: cannot find input file: $f" >&2;}
36411   { (exit 1); exit 1; }; }
36412         echo $f;;
36413      *) # Relative
36414         if test -f "$f"; then
36415           # Build tree
36416           echo $f
36417         elif test -f "$srcdir/$f"; then
36418           # Source tree
36419           echo $srcdir/$f
36420         else
36421           # /dev/null tree
36422           { { echo "$as_me:36422: error: cannot find input file: $f" >&5
36423echo "$as_me: error: cannot find input file: $f" >&2;}
36424   { (exit 1); exit 1; }; }
36425         fi;;
36426      esac
36427    done` || { (exit 1); exit 1; }
36428  # Remove the trailing spaces.
36429  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
36430
36431EOF
36432
36433# Transform confdefs.h into two sed scripts, `conftest.defines' and
36434# `conftest.undefs', that substitutes the proper values into
36435# config.h.in to produce config.h.  The first handles `#define'
36436# templates, and the second `#undef' templates.
36437# And first: Protect against being on the right side of a sed subst in
36438# config.status.  Protect against being in an unquoted here document
36439# in config.status.
36440rm -f conftest.defines conftest.undefs
36441# Using a here document instead of a string reduces the quoting nightmare.
36442# Putting comments in sed scripts is not portable.
36443#
36444# `end' is used to avoid that the second main sed command (meant for
36445# 0-ary CPP macros) applies to n-ary macro definitions.
36446# See the Autoconf documentation for `clear'.
36447cat >confdef2sed.sed <<\EOF
36448s/[\\&,]/\\&/g
36449s,[\\$`],\\&,g
36450t clear
36451: clear
36452s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
36453t end
36454s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
36455: end
36456EOF
36457# If some macros were called several times there might be several times
36458# the same #defines, which is useless.  Nevertheless, we may not want to
36459# sort them, since we want the *last* AC-DEFINE to be honored.
36460uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
36461sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
36462sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
36463rm -f confdef2sed.sed
36464
36465# This sed command replaces #undef with comments.  This is necessary, for
36466# example, in the case of _POSIX_SOURCE, which is predefined and required
36467# on some systems where configure will not decide to define it.
36468cat >>conftest.undefs <<\EOF
36469s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
36470EOF
36471
36472# Break up conftest.defines because some shells have a limit on the size
36473# of here documents, and old seds have small limits too (100 cmds).
36474echo '  # Handle all the #define templates only if necessary.' >>$CONFIG_STATUS
36475echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>$CONFIG_STATUS
36476echo '  # If there are no defines, we may have an empty if/fi' >>$CONFIG_STATUS
36477echo '  :' >>$CONFIG_STATUS
36478rm -f conftest.tail
36479while grep . conftest.defines >/dev/null
36480do
36481  # Write a limited-size here document to $tmp/defines.sed.
36482  echo '  cat >$tmp/defines.sed <<CEOF' >>$CONFIG_STATUS
36483  # Speed up: don't consider the non `#define' lines.
36484  echo '/^[ 	]*#[ 	]*define/!b' >>$CONFIG_STATUS
36485  # Work around the forget-to-reset-the-flag bug.
36486  echo 't clr' >>$CONFIG_STATUS
36487  echo ': clr' >>$CONFIG_STATUS
36488  sed ${ac_max_here_lines}q conftest.defines >>$CONFIG_STATUS
36489  echo 'CEOF
36490  sed -f $tmp/defines.sed $tmp/in >$tmp/out
36491  rm -f $tmp/in
36492  mv $tmp/out $tmp/in
36493' >>$CONFIG_STATUS
36494  sed 1,${ac_max_here_lines}d conftest.defines >conftest.tail
36495  rm -f conftest.defines
36496  mv conftest.tail conftest.defines
36497done
36498rm -f conftest.defines
36499echo '  fi # egrep' >>$CONFIG_STATUS
36500echo >>$CONFIG_STATUS
36501
36502# Break up conftest.undefs because some shells have a limit on the size
36503# of here documents, and old seds have small limits too (100 cmds).
36504echo '  # Handle all the #undef templates' >>$CONFIG_STATUS
36505rm -f conftest.tail
36506while grep . conftest.undefs >/dev/null
36507do
36508  # Write a limited-size here document to $tmp/undefs.sed.
36509  echo '  cat >$tmp/undefs.sed <<CEOF' >>$CONFIG_STATUS
36510  # Speed up: don't consider the non `#undef'
36511  echo '/^[ 	]*#[ 	]*undef/!b' >>$CONFIG_STATUS
36512  # Work around the forget-to-reset-the-flag bug.
36513  echo 't clr' >>$CONFIG_STATUS
36514  echo ': clr' >>$CONFIG_STATUS
36515  sed ${ac_max_here_lines}q conftest.undefs >>$CONFIG_STATUS
36516  echo 'CEOF
36517  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
36518  rm -f $tmp/in
36519  mv $tmp/out $tmp/in
36520' >>$CONFIG_STATUS
36521  sed 1,${ac_max_here_lines}d conftest.undefs >conftest.tail
36522  rm -f conftest.undefs
36523  mv conftest.tail conftest.undefs
36524done
36525rm -f conftest.undefs
36526
36527cat >>$CONFIG_STATUS <<\EOF
36528  # Let's still pretend it is `configure' which instantiates (i.e., don't
36529  # use $as_me), people would be surprised to read:
36530  #    /* config.h.  Generated automatically by config.status.  */
36531  if test x"$ac_file" = x-; then
36532    echo "/* Generated automatically by configure.  */" >$tmp/config.h
36533  else
36534    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
36535  fi
36536  cat $tmp/in >>$tmp/config.h
36537  rm -f $tmp/in
36538  if test x"$ac_file" != x-; then
36539    if cmp -s $ac_file $tmp/config.h 2>/dev/null; then
36540      { echo "$as_me:36540: $ac_file is unchanged" >&5
36541echo "$as_me: $ac_file is unchanged" >&6;}
36542    else
36543      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
36544         X"$ac_file" : 'X\(//\)[^/]' \| \
36545         X"$ac_file" : 'X\(//\)$' \| \
36546         X"$ac_file" : 'X\(/\)' \| \
36547         .     : '\(.\)' 2>/dev/null ||
36548echo X"$ac_file" |
36549    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
36550  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
36551  	  /^X\(\/\/\)$/{ s//\1/; q; }
36552  	  /^X\(\/\).*/{ s//\1/; q; }
36553  	  s/.*/./; q'`
36554      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
36555        { case "$ac_dir" in
36556  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
36557  *)                      as_incr_dir=.;;
36558esac
36559as_dummy="$ac_dir"
36560for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
36561  case $as_mkdir_dir in
36562    # Skip DOS drivespec
36563    ?:) as_incr_dir=$as_mkdir_dir ;;
36564    *)
36565      as_incr_dir=$as_incr_dir/$as_mkdir_dir
36566      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
36567    ;;
36568  esac
36569done; }
36570
36571      fi
36572      rm -f $ac_file
36573      mv $tmp/config.h $ac_file
36574    fi
36575  else
36576    cat $tmp/config.h
36577    rm -f $tmp/config.h
36578  fi
36579done
36580EOF
36581cat >>$CONFIG_STATUS <<\EOF
36582#
36583# CONFIG_COMMANDS section.
36584#
36585for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
36586  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
36587  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
36588
36589  case $ac_dest in
36590    default-1 ) for ac_file in $CONFIG_FILES; do
36591
36592        # Support "outfile[:infile[:infile...]]"
36593        case "$ac_file" in
36594          *:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
36595        esac
36596
36597        # PO directories have a Makefile.in generated from Makefile.inn.
36598        case "$ac_file" in
36599        */[Mm]akefile.in)
36600          # Adjust a relative srcdir.
36601          ac_dir=`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`
36602          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
36603          ac_dots=`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`
36604          ac_base=`basename $ac_file .in`
36605          # In autoconf-2.13 it is called $ac_given_srcdir.
36606          # In autoconf-2.50 it is called $srcdir.
36607          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
36608
36609          case "$ac_given_srcdir" in
36610            .)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
36611            /*) top_srcdir="$ac_given_srcdir" ;;
36612            *)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
36613          esac
36614
36615          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
36616            rm -f "$ac_dir/POTFILES"
36617            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
36618            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
36619            test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
36620            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
36621          fi
36622          ;;
36623        esac
36624      done ;;
36625  esac
36626done
36627EOF
36628
36629cat >>$CONFIG_STATUS <<\EOF
36630
36631{ (exit 0); exit 0; }
36632EOF
36633chmod +x $CONFIG_STATUS
36634ac_clean_files=$ac_clean_files_save
36635
36636# configure is writing to config.log, and then calls config.status.
36637# config.status does its own redirection, appending to config.log.
36638# Unfortunately, on DOS this fails, as config.log is still kept open
36639# by configure, so config.status won't be able to write to it; its
36640# output is simply discarded.  So we exec the FD to /dev/null,
36641# effectively closing config.log, so it can be properly (re)opened and
36642# appended to by config.status.  When coming back to configure, we
36643# need to make the FD available again.
36644if test "$no_create" != yes; then
36645  ac_cs_success=:
36646  exec 5>/dev/null
36647  $SHELL $CONFIG_STATUS || ac_cs_success=false
36648  exec 5>>config.log
36649  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
36650  # would make configure fail if this is the last instruction.
36651  $ac_cs_success || { (exit 1); exit 1; }
36652fi
36653
36654