1#! /bin/sh
2# From configure.in 2.9.0dev.9.
3# Guess values for system-dependent variables and create Makefiles.
4# Generated by Autoconf 2.52.20210509.
5#
6# Copyright 2003-2020,2021	Thomas E. Dickey
7# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
8# Free Software Foundation, Inc.
9# This configure script is free software; the Free Software Foundation
10# gives unlimited permission to copy, distribute and modify it.
11
12# Avoid depending upon Character Ranges.
13as_cr_letters='abcdefghijklmnopqrstuvwxyz'
14as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
15as_cr_Letters=$as_cr_letters$as_cr_LETTERS
16as_cr_digits='0123456789'
17as_cr_alnum=$as_cr_Letters$as_cr_digits
18
19# Sed expression to map a string onto a valid variable name.
20as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
21
22# Sed expression to map a string onto a valid CPP name.
23as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
24
25# Be Bourne compatible
26if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
27  emulate sh
28  NULLCMD=:
29elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
30  set -o posix
31fi
32
33# Name of the executable.
34as_me=`echo "$0" |sed 's,.*[\\/],,'`
35
36if expr a : '\(a\)' >/dev/null 2>&1; then
37  as_expr=expr
38else
39  as_expr=false
40fi
41
42rm -f conf$$ conf$$.exe conf$$.file
43echo >conf$$.file
44if ln -s conf$$.file conf$$ 2>/dev/null; then
45  # We could just check for DJGPP; but this test a) works b) is more generic
46  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
47  if test -f conf$$.exe; then
48    # Don't use ln at all; we don't have any links
49    as_ln_s='cp -p'
50  else
51    as_ln_s='ln -s'
52  fi
53elif ln conf$$.file conf$$ 2>/dev/null; then
54  as_ln_s=ln
55else
56  as_ln_s='cp -p'
57fi
58rm -f conf$$ conf$$.exe conf$$.file
59
60as_executable_p="test -f"
61
62# Support unset when possible.
63if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
64  as_unset="unset"
65else
66  as_unset="false"
67fi
68
69# NLS nuisances.
70$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
71$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
72$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
73$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
74$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
75$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
76$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
77$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
78
79# IFS
80# We need space, tab and new line, in precisely that order.
81as_nl='
82'
83IFS=" 	$as_nl"
84
85# CDPATH.
86$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
87
88# Name of the host.
89# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
90# so uname gets run too.
91ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
92
93exec 6>&1
94
95#
96# Initializations.
97#
98ac_default_prefix=/usr/local
99cross_compiling=no
100subdirs=
101MFLAGS=
102MAKEFLAGS=
103SHELL=${CONFIG_SHELL-/bin/sh}
104
105# Maximum number of lines to put in a shell here document.
106# This variable seems obsolete.  It should probably be removed, and
107# only ac_max_sed_lines should be used.
108: "${ac_max_here_lines=38}"
109
110ac_unique_file="userdefs.h"
111ac_default_prefix=/usr/local
112# Factoring default headers for most tests.
113ac_includes_default="\
114#include <stdio.h>
115#if HAVE_SYS_TYPES_H
116# include <sys/types.h>
117#endif
118#if HAVE_SYS_STAT_H
119# include <sys/stat.h>
120#endif
121#if STDC_HEADERS
122# include <stdlib.h>
123# include <stddef.h>
124#else
125# if HAVE_STDLIB_H
126#  include <stdlib.h>
127# endif
128#endif
129#if HAVE_STRING_H
130# if !STDC_HEADERS && HAVE_MEMORY_H
131#  include <memory.h>
132# endif
133# include <string.h>
134#endif
135#if HAVE_STRINGS_H
136# include <strings.h>
137#endif
138#if HAVE_INTTYPES_H
139# include <inttypes.h>
140#else
141# if HAVE_STDINT_H
142#  include <stdint.h>
143# endif
144#endif
145#if HAVE_UNISTD_H
146# include <unistd.h>
147#endif"
148
149# Initialize some variables set by options.
150ac_init_help=
151ac_init_version=false
152# The variables have the same names as the options, with
153# dashes changed to underlines.
154cache_file=/dev/null
155exec_prefix=NONE
156no_create=
157no_recursion=
158prefix=NONE
159program_prefix=NONE
160program_suffix=NONE
161program_transform_name=s,x,x,
162silent=
163site=
164srcdir=
165verbose=
166x_includes=NONE
167x_libraries=NONE
168
169# Installation directory options.
170# These are left unexpanded so users can "make install exec_prefix=/foo"
171# and all the variables that are supposed to be based on exec_prefix
172# by default will actually change.
173# Use braces instead of parens because sh, perl, etc. also accept them.
174bindir='${exec_prefix}/bin'
175sbindir='${exec_prefix}/sbin'
176libexecdir='${exec_prefix}/libexec'
177datarootdir='${prefix}/share'
178datadir='${datarootdir}'
179sysconfdir='${prefix}/etc'
180sharedstatedir='${prefix}/com'
181localstatedir='${prefix}/var'
182runstatedir='${localstatedir}/run'
183libdir='${exec_prefix}/lib'
184includedir='${prefix}/include'
185oldincludedir='/usr/include'
186infodir='${datarootdir}/info'
187mandir='${datarootdir}/man'
188
189# Identity of this package.
190PACKAGE_NAME=
191PACKAGE_TARNAME=
192PACKAGE_VERSION=
193PACKAGE_STRING=
194PACKAGE_BUGREPORT=
195
196ac_prev=
197for ac_option
198do
199  # If the previous option needs an argument, assign it.
200  if test -n "$ac_prev"; then
201    eval "$ac_prev=\$ac_option"
202    ac_prev=
203    continue
204  fi
205
206  ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
207
208  # Accept the important Cygnus configure options, so we can diagnose typos.
209
210  case "$ac_option" in
211
212  -bindir | --bindir | --bindi | --bind | --bin | --bi)
213    ac_prev=bindir ;;
214  -bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
215    bindir=$ac_optarg ;;
216
217  -build | --build | --buil | --bui | --bu)
218    ac_prev=build_alias ;;
219  -build=* | --build=* | --buil=* | --bui=* | --bu=*)
220    build_alias=$ac_optarg ;;
221
222  -cache-file | --cache-file | --cache-fil | --cache-fi \
223  | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
224    ac_prev=cache_file ;;
225  -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
226  | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
227    cache_file=$ac_optarg ;;
228
229  --config-cache | -C)
230    cache_file=config.cache ;;
231
232  -datadir | --datadir | --datadi | --datad | --data | --dat | --da)
233    ac_prev=datadir ;;
234  -datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
235  | --da=*)
236    datadir=$ac_optarg ;;
237
238  -datarootdir | --datarootdir | --datarootdi | --datarootd | --dataroot \
239  | --dataroo | --dataro | --datar)
240    ac_prev=datarootdir ;;
241  -datarootdir=* | --datarootdir=* | --datarootdi=* | --datarootd=* \
242  | --dataroot=* | --dataroo=* | --dataro=* | --datar=*)
243    datarootdir=$ac_optarg ;;
244
245  -disable-* | --disable-*)
246    ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
247    # Reject names that are not valid shell variable names.
248    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
249      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
250   { (exit 1); exit 1; }; }
251    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
252    eval "enable_$ac_feature=no" ;;
253
254  -enable-* | --enable-*)
255    ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
256    # Reject names that are not valid shell variable names.
257    expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
258      { echo "$as_me: error: invalid feature name: $ac_feature" >&2
259   { (exit 1); exit 1; }; }
260    ac_feature=`echo "$ac_feature" | sed 's/-/_/g'`
261    case "$ac_option" in
262      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
263      *) ac_optarg=yes ;;
264    esac
265    eval "enable_$ac_feature='$ac_optarg'" ;;
266
267  -exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
268  | --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
269  | --exec | --exe | --ex)
270    ac_prev=exec_prefix ;;
271  -exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
272  | --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
273  | --exec=* | --exe=* | --ex=*)
274    exec_prefix=$ac_optarg ;;
275
276  -gas | --gas | --ga | --g)
277    # Obsolete; use --with-gas.
278    with_gas=yes ;;
279
280  -help | --help | --hel | --he | -h)
281    ac_init_help=long ;;
282  -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
283    ac_init_help=recursive ;;
284  -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
285    ac_init_help=short ;;
286
287  -host | --host | --hos | --ho)
288    ac_prev=host_alias ;;
289  -host=* | --host=* | --hos=* | --ho=*)
290    host_alias=$ac_optarg ;;
291
292  -includedir | --includedir | --includedi | --included | --include \
293  | --includ | --inclu | --incl | --inc)
294    ac_prev=includedir ;;
295  -includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
296  | --includ=* | --inclu=* | --incl=* | --inc=*)
297    includedir=$ac_optarg ;;
298
299  -infodir | --infodir | --infodi | --infod | --info | --inf)
300    ac_prev=infodir ;;
301  -infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
302    infodir=$ac_optarg ;;
303
304  -libdir | --libdir | --libdi | --libd)
305    ac_prev=libdir ;;
306  -libdir=* | --libdir=* | --libdi=* | --libd=*)
307    libdir=$ac_optarg ;;
308
309  -libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
310  | --libexe | --libex | --libe)
311    ac_prev=libexecdir ;;
312  -libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
313  | --libexe=* | --libex=* | --libe=*)
314    libexecdir=$ac_optarg ;;
315
316  -localstatedir | --localstatedir | --localstatedi | --localstated \
317  | --localstate | --localstat | --localsta | --localst \
318  | --locals | --local | --loca | --loc | --lo)
319    ac_prev=localstatedir ;;
320  -localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
321  | --localstate=* | --localstat=* | --localsta=* | --localst=* \
322  | --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
323    localstatedir=$ac_optarg ;;
324
325  -runstatedir | --runstatedir | --runstatedi | --runstated \
326  | --runstate | --runstat | --runsta | --runst \
327  | --runs | --run | --ru)
328    ac_prev=runstatedir ;;
329  -runstatedir=* | --runstatedir=* | --runstatedi=* | --runstated=* \
330  | --runstate=* | --runstat=* | --runsta=* | --runst=* \
331  | --runs=* | --run=* | --ru=*)
332    runstatedir=$ac_optarg ;;
333
334  -mandir | --mandir | --mandi | --mand | --man | --ma | --m)
335    ac_prev=mandir ;;
336  -mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
337    mandir=$ac_optarg ;;
338
339  -nfp | --nfp | --nf)
340    # Obsolete; use --without-fp.
341    with_fp=no ;;
342
343  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
344  | --no-cr | --no-c)
345    no_create=yes ;;
346
347  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
348  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
349    no_recursion=yes ;;
350
351  -oldincludedir | --oldincludedir | --oldincludedi | --oldincluded \
352  | --oldinclude | --oldinclud | --oldinclu | --oldincl | --oldinc \
353  | --oldin | --oldi | --old | --ol | --o)
354    ac_prev=oldincludedir ;;
355  -oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
356  | --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
357  | --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
358    oldincludedir=$ac_optarg ;;
359
360  -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
361    ac_prev=prefix ;;
362  -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
363    prefix=$ac_optarg ;;
364
365  -program-prefix | --program-prefix | --program-prefi | --program-pref \
366  | --program-pre | --program-pr | --program-p)
367    ac_prev=program_prefix ;;
368  -program-prefix=* | --program-prefix=* | --program-prefi=* \
369  | --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
370    program_prefix=$ac_optarg ;;
371
372  -program-suffix | --program-suffix | --program-suffi | --program-suff \
373  | --program-suf | --program-su | --program-s)
374    ac_prev=program_suffix ;;
375  -program-suffix=* | --program-suffix=* | --program-suffi=* \
376  | --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
377    program_suffix=$ac_optarg ;;
378
379  -program-transform-name | --program-transform-name \
380  | --program-transform-nam | --program-transform-na \
381  | --program-transform-n | --program-transform- \
382  | --program-transform | --program-transfor \
383  | --program-transfo | --program-transf \
384  | --program-trans | --program-tran \
385  | --progr-tra | --program-tr | --program-t)
386    ac_prev=program_transform_name ;;
387  -program-transform-name=* | --program-transform-name=* \
388  | --program-transform-nam=* | --program-transform-na=* \
389  | --program-transform-n=* | --program-transform-=* \
390  | --program-transform=* | --program-transfor=* \
391  | --program-transfo=* | --program-transf=* \
392  | --program-trans=* | --program-tran=* \
393  | --progr-tra=* | --program-tr=* | --program-t=*)
394    program_transform_name=$ac_optarg ;;
395
396  -q | -quiet | --quiet | --quie | --qui | --qu | --q \
397  | -silent | --silent | --silen | --sile | --sil)
398    silent=yes ;;
399
400  -sbindir | --sbindir | --sbindi | --sbind | --sbin | --sbi | --sb)
401    ac_prev=sbindir ;;
402  -sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
403  | --sbi=* | --sb=*)
404    sbindir=$ac_optarg ;;
405
406  -sharedstatedir | --sharedstatedir | --sharedstatedi \
407  | --sharedstated | --sharedstate | --sharedstat | --sharedsta \
408  | --sharedst | --shareds | --shared | --share | --shar \
409  | --sha | --sh)
410    ac_prev=sharedstatedir ;;
411  -sharedstatedir=* | --sharedstatedir=* | --sharedstatedi=* \
412  | --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
413  | --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
414  | --sha=* | --sh=*)
415    sharedstatedir=$ac_optarg ;;
416
417  -site | --site | --sit)
418    ac_prev=site ;;
419  -site=* | --site=* | --sit=*)
420    site=$ac_optarg ;;
421
422  -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
423    ac_prev=srcdir ;;
424  -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
425    srcdir=$ac_optarg ;;
426
427  -sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
428  | --syscon | --sysco | --sysc | --sys | --sy)
429    ac_prev=sysconfdir ;;
430  -sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
431  | --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
432    sysconfdir=$ac_optarg ;;
433
434  -target | --target | --targe | --targ | --tar | --ta | --t)
435    ac_prev=target_alias ;;
436  -target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
437    target_alias=$ac_optarg ;;
438
439  -v | -verbose | --verbose | --verbos | --verbo | --verb)
440    verbose=yes ;;
441
442  -version | --version | --versio | --versi | --vers | -V)
443    ac_init_version=: ;;
444
445  -with-* | --with-*)
446    ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
447    # Reject names that are not valid shell variable names.
448    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
449      { echo "$as_me: error: invalid package name: $ac_package" >&2
450   { (exit 1); exit 1; }; }
451    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
452    case "$ac_option" in
453      *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
454      *) ac_optarg=yes ;;
455    esac
456    eval "with_$ac_package='$ac_optarg'" ;;
457
458  -without-* | --without-*)
459    ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
460    # Reject names that are not valid shell variable names.
461    expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
462      { echo "$as_me: error: invalid package name: $ac_package" >&2
463   { (exit 1); exit 1; }; }
464    ac_package=`echo "$ac_package" | sed 's/-/_/g'`
465    eval "with_$ac_package=no" ;;
466
467  --x)
468    # Obsolete; use --with-x.
469    with_x=yes ;;
470
471  -x-includes | --x-includes | --x-include | --x-includ | --x-inclu \
472  | --x-incl | --x-inc | --x-in | --x-i)
473    ac_prev=x_includes ;;
474  -x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
475  | --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
476    x_includes=$ac_optarg ;;
477
478  -x-libraries | --x-libraries | --x-librarie | --x-librari \
479  | --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
480    ac_prev=x_libraries ;;
481  -x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
482  | --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
483    x_libraries=$ac_optarg ;;
484
485  -*) { echo "$as_me: error: unrecognized option: $ac_option
486Try \`$0 --help' for more information." >&2
487   { (exit 1); exit 1; }; }
488    ;;
489
490  *=*)
491    ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
492    # Reject names that are not valid shell variable names.
493    expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
494      { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
495   { (exit 1); exit 1; }; }
496    ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
497    eval "$ac_envvar='$ac_optarg'"
498    export "$ac_envvar" ;;
499
500  *)
501    # FIXME: should be removed in autoconf 3.0.
502    echo "$as_me: WARNING: you should use --build, --host, --target" >&2
503    expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
504      echo "$as_me: WARNING: invalid host type: $ac_option" >&2
505    : "${build_alias=$ac_option}" "${host_alias=$ac_option}" "${target_alias=$ac_option}"
506    ;;
507
508  esac
509done
510
511if test -n "$ac_prev"; then
512  ac_option=--`echo "$ac_prev" | sed 's/_/-/g'`
513  { echo "$as_me: error: missing argument to $ac_option" >&2
514   { (exit 1); exit 1; }; }
515fi
516
517# Be sure to have absolute paths.
518for ac_var in exec_prefix prefix
519do
520  eval ac_val=$`echo "$ac_var"`
521  case "$ac_val" in
522    [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
523    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
524   { (exit 1); exit 1; }; };;
525  esac
526done
527
528# Be sure to have absolute paths.
529for ac_var in bindir sbindir libexecdir datarootdir datadir sysconfdir sharedstatedir \
530              localstatedir libdir includedir oldincludedir infodir mandir
531do
532  eval ac_val=$`echo "$ac_var"`
533  case "$ac_val" in
534    [\\/$]* | ?:[\\/]* ) ;;
535    *)  { echo "$as_me: error: expected an absolute path for --$ac_var: $ac_val" >&2
536   { (exit 1); exit 1; }; };;
537  esac
538done
539
540# There might be people who depend on the old broken behavior: `$host'
541# used to hold the argument of --host etc.
542build=$build_alias
543host=$host_alias
544target=$target_alias
545
546# FIXME: should be removed in autoconf 3.0.
547if test "x$host_alias" != x; then
548  if test "x$build_alias" = x; then
549    cross_compiling=maybe
550    echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
551    If a cross compiler is detected then cross compile mode will be used." >&2
552  elif test "x$build_alias" != "x$host_alias"; then
553    cross_compiling=yes
554  fi
555fi
556
557ac_tool_prefix=
558test -n "$host_alias" && ac_tool_prefix=$host_alias-
559
560test "$silent" = yes && exec 6>/dev/null
561
562# Find the source files, if location was not specified.
563if test -z "$srcdir"; then
564  ac_srcdir_defaulted=yes
565  # Try the directory containing this script, then its parent.
566  ac_prog=$0
567  ac_confdir=`echo "$ac_prog" | sed 's%[\\/][^\\/][^\\/]*$%%'`
568  test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
569  srcdir=$ac_confdir
570  if test ! -r "$srcdir/$ac_unique_file"; then
571    srcdir=..
572  fi
573else
574  ac_srcdir_defaulted=no
575fi
576if test ! -r "$srcdir/$ac_unique_file"; then
577  if test "$ac_srcdir_defaulted" = yes; then
578    { echo "$as_me: error: cannot find sources in $ac_confdir or .." >&2
579   { (exit 1); exit 1; }; }
580  else
581    { echo "$as_me: error: cannot find sources in $srcdir" >&2
582   { (exit 1); exit 1; }; }
583  fi
584fi
585srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
586ac_env_build_alias_set=${build_alias+set}
587ac_env_build_alias_value=$build_alias
588ac_cv_env_build_alias_set=${build_alias+set}
589ac_cv_env_build_alias_value=$build_alias
590ac_env_host_alias_set=${host_alias+set}
591ac_env_host_alias_value=$host_alias
592ac_cv_env_host_alias_set=${host_alias+set}
593ac_cv_env_host_alias_value=$host_alias
594ac_env_target_alias_set=${target_alias+set}
595ac_env_target_alias_value=$target_alias
596ac_cv_env_target_alias_set=${target_alias+set}
597ac_cv_env_target_alias_value=$target_alias
598ac_env_CC_set=${CC+set}
599ac_env_CC_value=$CC
600ac_cv_env_CC_set=${CC+set}
601ac_cv_env_CC_value=$CC
602ac_env_CFLAGS_set=${CFLAGS+set}
603ac_env_CFLAGS_value=$CFLAGS
604ac_cv_env_CFLAGS_set=${CFLAGS+set}
605ac_cv_env_CFLAGS_value=$CFLAGS
606ac_env_LDFLAGS_set=${LDFLAGS+set}
607ac_env_LDFLAGS_value=$LDFLAGS
608ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
609ac_cv_env_LDFLAGS_value=$LDFLAGS
610ac_env_CPPFLAGS_set=${CPPFLAGS+set}
611ac_env_CPPFLAGS_value=$CPPFLAGS
612ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
613ac_cv_env_CPPFLAGS_value=$CPPFLAGS
614ac_env_CPP_set=${CPP+set}
615ac_env_CPP_value=$CPP
616ac_cv_env_CPP_set=${CPP+set}
617ac_cv_env_CPP_value=$CPP
618
619#
620# Report the --help message.
621#
622if test "$ac_init_help" = "long"; then
623  # Omit some internal or obsolete options to make the list less imposing.
624  # This message is too long to be a string in the A/UX 3.1 sh.
625  cat <<EOF
626\`configure' configures this package to adapt to many kinds of systems.
627
628Usage: $0 [OPTION]... [VAR=VALUE]...
629
630To assign environment variables (e.g., CC, CFLAGS...), specify them as
631VAR=VALUE.  See below for descriptions of some of the useful variables.
632
633Defaults for the options are specified in brackets.
634
635Configuration:
636  -h, --help              display this help and exit
637      --help=short        display options specific to this package
638      --help=recursive    display the short help of all the included packages
639  -V, --version           display version information and exit
640  -q, --quiet, --silent   do not print \`checking...' messages
641      --cache-file=FILE   cache test results in FILE [disabled]
642  -C, --config-cache      alias for \`--cache-file=config.cache'
643  -n, --no-create         do not create output files
644      --srcdir=DIR        find the sources in DIR [configure dir or \`..']
645
646EOF
647
648  cat <<EOF
649Installation directories:
650  --prefix=PREFIX         install architecture-independent files in PREFIX
651                          [$ac_default_prefix]
652  --exec-prefix=EPREFIX   install architecture-dependent files in EPREFIX
653                          [PREFIX]
654
655By default, \`make install' will install all the files in
656\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc.  You can specify
657an installation prefix other than \`$ac_default_prefix' using \`--prefix',
658for instance \`--prefix=\$HOME'.
659
660For better control, use the options below.
661
662Fine tuning of the installation directories:
663  --bindir=DIR            user executables [EPREFIX/bin]
664  --sbindir=DIR           system admin executables [EPREFIX/sbin]
665  --libexecdir=DIR        program executables [EPREFIX/libexec]
666  --datarootdir=DIR       read-only architecture-independent data [PREFIX/share]
667  --datadir=DIR           read-only architecture-independent data [DATAROOTDIR]
668  --sysconfdir=DIR        read-only single-machine data [PREFIX/etc]
669  --sharedstatedir=DIR    modifiable architecture-independent data [PREFIX/com]
670  --localstatedir=DIR     modifiable single-machine data [PREFIX/var]
671  --runstatedir=DIR       extra definition of runtime data [LOCALSTATEDIR/run]
672  --libdir=DIR            object code libraries [EPREFIX/lib]
673  --includedir=DIR        C header files [PREFIX/include]
674  --oldincludedir=DIR     C header files for non-gcc [/usr/include]
675  --infodir=DIR           info documentation [DATAROOTDIR/info]
676  --mandir=DIR            man documentation [DATAROOTDIR/man]
677EOF
678
679  cat <<\EOF
680
681Program names:
682  --program-prefix=PREFIX            prepend PREFIX to installed program names
683  --program-suffix=SUFFIX            append SUFFIX to installed program names
684  --program-transform-name=PROGRAM   run sed PROGRAM on installed program names
685
686X features:
687  --x-includes=DIR    X include files are in DIR
688  --x-libraries=DIR   X library files are in DIR
689
690System types:
691  --build=BUILD           configure for building on BUILD [guessed]
692  --host=HOST       build programs to run on HOST [BUILD]
693  --target=TARGET   configure for building compilers for TARGET [HOST]
694EOF
695fi
696
697if test -n "$ac_init_help"; then
698
699  cat <<\EOF
700
701Optional Packages:
702  --with-PACKAGE[=ARG]    use PACKAGE [ARG=yes]
703  --without-PACKAGE       do not use PACKAGE (same as --with-PACKAGE=no)
704
705Optional Features:
706  --disable-FEATURE       do not include FEATURE (same as --enable-FEATURE=no)
707  --enable-FEATURE[=ARG]  include FEATURE [ARG=yes]
708
709  --with-system-type=XXX  test: override derived host system-type
710  --with-destdir=XXX      set DESTDIR destination for install (default: $DESTDIR)
711  --with-build-cc=XXX     the build C compiler ($BUILD_CC)
712  --with-build-cpp=XXX    the build C preprocessor ($BUILD_CPP)
713  --with-build-cflags=XXX the build C compiler-flags ($BUILD_CFLAGS)
714  --with-build-cppflags=XXX the build C preprocessor-flags ($BUILD_CPPFLAGS)
715  --with-build-ldflags=XXX the build linker-flags ($BUILD_LDFLAGS)
716  --with-build-libs=XXX   the build libraries (${BUILD_LIBS})
717Development Options:
718  --disable-echo          do not display "compiling" commands
719  --enable-find-leaks     logic for testing memory leaks
720  --enable-debug          compile w/ debugging (if \$CFLAGS is set, add -g there, too)
721  --disable-trace         disable logic for trace code
722  --enable-vertrace       verbose trace code
723  --with-x                use the X Window System
724  --enable-warnings       test: turn on gcc compiler warnings
725  --enable-stdnoreturn    enable C11 _Noreturn feature for diagnostics
726  --with-dbmalloc         test: use Conor Cahill's dbmalloc library
727  --with-dmalloc          test: use Gray Watson's dmalloc library
728Basic Configuration Options:
729  --disable-largefile     omit support for large files
730  --with-libiconv-prefix=DIR
731                          search for libiconv in DIR/include and DIR/lib
732  --enable-nls            use Native Language Support
733  --with-included-gettext use the GNU gettext library included here
734  --with-textdomain=PKG   NLS text-domain (default is package name)
735  --disable-included-msgs use included messages, for i18n support
736  --with-nls-datadir=DIR  NLS data, parent of locale (default: PREFIX/DATADIR)
737  --disable-full-paths    control whether full utility pathnames are used
738  --with-nss-compat{=path}       link with nss_compat library if available
739  --with-ssl{=path}       link with ssl library if available
740  --with-gnutls{=path}    link with gnutls support
741  --enable-gnutls-compat  link with gnutls-openssl compat
742  --with-socks{=path}     link with socks library if available
743  --with-socks5{=path}    link with socks5 library if available
744  --with-pkg-config{=path} enable/disable use of pkg-config
745  --enable-ipv6           use ipv6 (with ipv4) support
746  --with-screen=XXX       select screen type (XXX is curses (default),
747                          ncurses, ncursesw, pdcurses or slang)
748  --with-curses-dir=DIR   directory in which (n)curses is installed
749  --enable-widec          enable wide-curses features
750  --disable-color-style   use color style (ncurses/curses)
751  --with-lss-file{=path}  specify the default style-sheet file
752                          (default: SYSCONFDIR/lynx.lss)
753  --with-cfg-file{=path}  specify the default configuration file
754                          (default: SYSCONFDIR/lynx.cfg)
755  --with-cfg-path{=path}  specify the default configuration directories
756                          (default: SYSCONFDIR)
757  --enable-htmlized-cfg   build htmlized lynx.cfg
758  --enable-local-docs     link local doc-directory to help-page
759  --with-mime-libdir=DIR  MIME data, mime.types and mailcap (default: /etc)
760  --disable-locale-charset use locale-charset selection logic
761  --with-charsets=list    limit charsets to given list of MIME names
762Experimental Options:
763  --disable-bibp-urls     disable support for bibp: URLs
764  --disable-config-info   disable browsable configuration-info
765  --disable-forms-options disable forms-based options
766  --disable-menu-options  disable old-style option menu
767  --disable-sessions      use sessions code
768  --disable-session-cache use session-caching code
769  --disable-addrlist-page disable address-list page
770  --disable-cjk           do not use CJK logic
771  --enable-chinese-utf8   use Chinese UTF-8 logic
772  --disable-japanese-utf8 do not use Japanese UTF-8 logic
773  --enable-wcwidth-support use experimental wcwidth/UTF-8 logic
774  --enable-default-colors enable use of default-colors (ncurses/slang)
775  --enable-kbd-layout     use experimental keyboard-layout support
776  --enable-nested-tables  use experimental nested-table support
777Miscellaneous Options:
778  --disable-alt-bindings  disable alternative line-edit bindings
779  --disable-ascii-ctypes  disable use of ascii case-conversion
780  --disable-extended-dtd  disable extended HTML DTD logic
781  --disable-file-upload   disable file-upload support
782  --disable-idna          disable IDNA support
783  --disable-justify-elts  disable element-justification logic
784  --disable-partial       disable partial-display logic
785  --disable-persistent-cookies  disable persistent-cookie support
786  --disable-prettysrc     disable colorization of HTML source
787  --disable-progressbar   disable progress-bar
788  --disable-read-eta      disable read-progress message shows ETA
789  --disable-source-cache  do not cache HTML source for parse mode changes
790  --disable-scrollbar     disable scrollbar with mouse
791  --enable-charset-choice use charset-selection logic
792  --enable-externs        use external commands
793  --enable-font-switch    use Linux setfont for character-translation
794  --enable-cgi-links      support cgi links w/o a http daemon
795  --enable-change-exec    allow users to change exec options
796  --enable-exec-links     allow lynx to execute programs accessed via a link
797  --enable-exec-scripts   allow lynx to execute programs inferred from a link
798  --enable-internal-links handle following links to same doc differently
799  --enable-nsl-fork       fork NSL requests, allowing them to be aborted
800  --enable-syslog         log URL requests via syslog
801  --enable-underlines     underline links rather than using boldface
802  --enable-gzip-help      install gzip'ed help files
803  --with-bzlib            use libbz2 for decompression of some bzip2 files
804  --with-zlib             use zlib for decompression of some gzip files
805Other Network Services:
806  --disable-finger        disable FINGER logic
807  --disable-gopher        disable GOPHER logic
808  --disable-news          disable NEWS logic
809  --disable-ftp           disable FTP logic
810  --enable-wais           enable WAIS logic
811Directory Editor Options:
812  --disable-dired          disable optional directory-editor, DirEd
813  --disable-dired-dearchive disable dearchiving commands
814  --disable-dired-override disable DirEd override keymap
815  --disable-dired-permit  disable chmod/attrib commands
816  --disable-dired-xpermit disable chmod/attrib commands
817  --disable-dired-tar     disable "tar" command
818  --disable-dired-uudecode disable "uudecode" command
819  --disable-dired-zip     disable "zip", "unzip"  commands
820  --disable-dired-gzip    disable "gzip", "gunzip" commands
821  --disable-long-list     disable long "ls -l" directory listings
822  --disable-parent-dir-refs
823                          disable "Up-to" links in directory listings
824Special Libraries for PDCurses X11:
825  --with-Xaw3d            link with Xaw 3d library
826  --with-Xaw3dxft         link with Xaw 3d xft library
827  --with-neXtaw           link with neXT Athena library
828  --with-XawPlus          link with Athena-Plus library
829  --disable-rpath-hack    don't add rpath options for additional libraries
830
831Some influential environment variables:
832  CC          C compiler command
833  CFLAGS      C compiler flags
834  LDFLAGS     linker flags, e.g. -L<lib dir> if you have libraries in a
835              nonstandard directory <lib dir>
836  CPPFLAGS    C/C++ preprocessor flags, e.g. -I<include dir> if you have
837              headers in a nonstandard directory <include dir>
838  CPP         C preprocessor
839
840Use these variables to override the choices made by `configure' or to help
841it to find libraries and programs with nonstandard names/locations.
842
843EOF
844fi
845
846if test "$ac_init_help" = "recursive"; then
847  # If there are subdirs, report their specific --help.
848  ac_popdir=`pwd`
849  for ac_subdir in : $ac_subdirs_all; do test "x$ac_subdir" = x: && continue
850    cd "$ac_subdir"
851    # A "../" for each directory in /$ac_subdir.
852    ac_dots=`echo "$ac_subdir" |
853             sed 's,^\./,,;s,[^/]$,&/,;s,[^/]*/,../,g'`
854
855    case "$srcdir" in
856    .) # No --srcdir option.  We are building in place.
857      ac_sub_srcdir="$srcdir" ;;
858    [\\/]* | ?:[\\/]* ) # Absolute path.
859      ac_sub_srcdir="$srcdir/$ac_subdir" ;;
860    *) # Relative path.
861      ac_sub_srcdir="$ac_dots$srcdir/$ac_subdir" ;;
862    esac
863
864    # Check for guested configure; otherwise get Cygnus style configure.
865    if test -f "$ac_sub_srcdir/configure.gnu"; then
866      echo
867      $SHELL "$ac_sub_srcdir/configure.gnu" --help=recursive
868    elif test -f "$ac_sub_srcdir/configure"; then
869      echo
870      $SHELL "$ac_sub_srcdir/configure" --help=recursive
871    elif test -f "$ac_sub_srcdir/configure.ac" ||
872           test -f "$ac_sub_srcdir/configure.in"; then
873      echo
874      "$ac_configure" --help
875    else
876      echo "$as_me: WARNING: no configuration information is in $ac_subdir" >&2
877    fi
878    cd "$ac_popdir"
879  done
880fi
881
882test -n "$ac_init_help" && exit 0
883if "$ac_init_version"; then
884  cat <<\EOF
885
886Copyright 2003-2020,2021	Thomas E. Dickey
887Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
888Free Software Foundation, Inc.
889This configure script is free software; the Free Software Foundation
890gives unlimited permission to copy, distribute and modify it.
891EOF
892  exit 0
893fi
894exec 5>config.log
895cat >&5 <<EOF
896This file contains any messages produced by compilers while
897running configure, to aid debugging if configure makes a mistake.
898
899It was created by $as_me, which was
900generated by GNU Autoconf 2.52.20210509.  Invocation command line was
901
902  $ $0 $@
903
904EOF
905{
906cat <<_ASUNAME
907## ---------- ##
908## Platform.  ##
909## ---------- ##
910
911hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
912uname -m = `(uname -m) 2>/dev/null || echo unknown`
913uname -r = `(uname -r) 2>/dev/null || echo unknown`
914uname -s = `(uname -s) 2>/dev/null || echo unknown`
915uname -v = `(uname -v) 2>/dev/null || echo unknown`
916
917/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
918/bin/uname -X     = `(/bin/uname -X) 2>/dev/null     || echo unknown`
919
920/bin/arch              = `(/bin/arch) 2>/dev/null              || echo unknown`
921/usr/bin/arch -k       = `(/usr/bin/arch -k) 2>/dev/null       || echo unknown`
922/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
923hostinfo               = `(hostinfo) 2>/dev/null               || echo unknown`
924/bin/machine           = `(/bin/machine) 2>/dev/null           || echo unknown`
925/usr/bin/oslevel       = `(/usr/bin/oslevel) 2>/dev/null       || echo unknown`
926/bin/universe          = `(/bin/universe) 2>/dev/null          || echo unknown`
927
928PATH = $PATH
929
930_ASUNAME
931} >&5
932
933cat >&5 <<EOF
934## ------------ ##
935## Core tests.  ##
936## ------------ ##
937
938EOF
939
940# Keep a trace of the command line.
941# Strip out --no-create and --no-recursion so they do not pile up.
942# Also quote any args containing shell meta-characters.
943ac_configure_args=
944ac_sep=
945for ac_arg
946do
947  case "$ac_arg" in
948  -no-create | --no-create | --no-creat | --no-crea | --no-cre \
949  | --no-cr | --no-c) ;;
950  -no-recursion | --no-recursion | --no-recursio | --no-recursi \
951  | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
952  *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
953    ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"`
954    ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
955    ac_sep=" " ;;
956  *) ac_configure_args="$ac_configure_args$ac_sep$ac_arg"
957     ac_sep=" " ;;
958  esac
959  # Get rid of the leading space.
960done
961
962# When interrupted or exit'd, cleanup temporary files, and complete
963# config.log.  We remove comments because anyway the quotes in there
964# would cause problems or look ugly.
965trap 'exit_status=$?
966  # Save into config.log some information that might help in debugging.
967  echo >&5
968  echo "## ----------------- ##" >&5
969  echo "## Cache variables.  ##" >&5
970  echo "## ----------------- ##" >&5
971  echo >&5
972  # The following way of writing the cache mishandles newlines in values,
973{
974  (set) 2>&1 |
975    case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
976    *ac_space=\ *)
977      sed -n \
978        "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
979    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
980      ;;
981    *)
982      sed -n \
983        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
984      ;;
985    esac;
986} >&5
987  sed "/^$/d" confdefs.h >conftest.log
988  if test -s conftest.log; then
989    echo >&5
990    echo "## ------------ ##" >&5
991    echo "## confdefs.h.  ##" >&5
992    echo "## ------------ ##" >&5
993    echo >&5
994    cat conftest.log >&5
995  fi
996  (echo; echo) >&5
997  test "$ac_signal" != 0 &&
998    echo "$as_me: caught signal $ac_signal" >&5
999  echo "$as_me: exit $exit_status" >&5
1000  rm -rf conftest* confdefs* core core.* *.core conf$$* $ac_clean_files &&
1001    exit $exit_status
1002     ' 0
1003for ac_signal in 1 2 13 15; do
1004  trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' "$ac_signal"
1005done
1006ac_signal=0
1007
1008# confdefs.h avoids OS command line length limits that DEFS can exceed.
1009rm -rf conftest* confdefs.h
1010# AIX cpp loses on an empty file, so make sure it contains at least a newline.
1011echo >confdefs.h
1012
1013# Let the site file select an alternate cache file if it wants to.
1014# Prefer explicitly selected file to automatically selected ones.
1015if test -z "$CONFIG_SITE"; then
1016  if test "x$prefix" != xNONE; then
1017    CONFIG_SITE="$prefix/share/config.site $prefix/etc/config.site"
1018  else
1019    CONFIG_SITE="$ac_default_prefix/share/config.site $ac_default_prefix/etc/config.site"
1020  fi
1021fi
1022for ac_site_file in $CONFIG_SITE; do
1023  if test -r "$ac_site_file"; then
1024    { echo "$as_me:1024: loading site script $ac_site_file" >&5
1025echo "$as_me: loading site script $ac_site_file" >&6;}
1026    cat "$ac_site_file" >&5
1027    . "$ac_site_file"
1028  fi
1029done
1030
1031if test -r "$cache_file"; then
1032  # Some versions of bash will fail to source /dev/null (special
1033  # files actually), so we avoid doing that.
1034  if test -f "$cache_file"; then
1035    { echo "$as_me:1035: loading cache $cache_file" >&5
1036echo "$as_me: loading cache $cache_file" >&6;}
1037    case $cache_file in
1038      [\\/]* | ?:[\\/]* ) . $cache_file;;
1039      *)                      . ./$cache_file;;
1040    esac
1041  fi
1042else
1043  { echo "$as_me:1043: creating cache $cache_file" >&5
1044echo "$as_me: creating cache $cache_file" >&6;}
1045  >$cache_file
1046fi
1047
1048# Check that the precious variables saved in the cache have kept the same
1049# value.
1050ac_cache_corrupted=false
1051for ac_var in `(set) 2>&1 |
1052               sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
1053  eval ac_old_set=\$ac_cv_env_${ac_var}_set
1054  eval ac_new_set=\$ac_env_${ac_var}_set
1055  eval ac_old_val="\$ac_cv_env_${ac_var}_value"
1056  eval ac_new_val="\$ac_env_${ac_var}_value"
1057  case "$ac_old_set,$ac_new_set" in
1058    set,)
1059      { echo "$as_me:1059: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
1060echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
1061      ac_cache_corrupted=: ;;
1062    ,set)
1063      { echo "$as_me:1063: error: \`$ac_var' was not set in the previous run" >&5
1064echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
1065      ac_cache_corrupted=: ;;
1066    ,);;
1067    *)
1068      if test "x$ac_old_val" != "x$ac_new_val"; then
1069        { echo "$as_me:1069: error: \`$ac_var' has changed since the previous run:" >&5
1070echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
1071        { echo "$as_me:1071:   former value:  $ac_old_val" >&5
1072echo "$as_me:   former value:  $ac_old_val" >&2;}
1073        { echo "$as_me:1073:   current value: $ac_new_val" >&5
1074echo "$as_me:   current value: $ac_new_val" >&2;}
1075        ac_cache_corrupted=:
1076      fi;;
1077  esac
1078  # Pass precious variables to config.status.  It doesn't matter if
1079  # we pass some twice (in addition to the command line arguments).
1080  if test "$ac_new_set" = set; then
1081    case "$ac_new_val" in
1082    *" "*|*"	"*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
1083      ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"`
1084      ac_configure_args="$ac_configure_args '$ac_arg'"
1085      ;;
1086    *) ac_configure_args="$ac_configure_args $ac_var=$ac_new_val"
1087       ;;
1088    esac
1089  fi
1090done
1091if "$ac_cache_corrupted"; then
1092  { echo "$as_me:1092: error: changes in the environment can compromise the build" >&5
1093echo "$as_me: error: changes in the environment can compromise the build" >&2;}
1094  { { echo "$as_me:1094: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
1095echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
1096   { (exit 1); exit 1; }; }
1097fi
1098
1099ac_ext=c
1100ac_cpp='$CPP $CPPFLAGS'
1101ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1102ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1103ac_compiler_gnu=$ac_cv_c_compiler_gnu
1104ac_main_return="return"
1105
1106case `echo "testing\c" 2>/dev/null; echo 1,2,3`,`echo -n testing 2>/dev/null; echo 1,2,3` in
1107  *c*,-n*) ECHO_N=
1108           ECHO_C=      # newlines do not sed ;-) only broken shells would use this case anyway
1109           ECHO_T='	'
1110           ;;
1111  *c*,*  ) ECHO_N=-n
1112           ECHO_C=
1113           ECHO_T=
1114           ;;
1115  *)       ECHO_N=
1116           ECHO_C='\c'
1117           ECHO_T=
1118           ;;
1119esac
1120echo "#! $SHELL" >conftest.sh
1121echo  "exit 0"   >>conftest.sh
1122chmod +x conftest.sh
1123if { (echo "$as_me:1123: PATH=\".;.\"; conftest.sh") >&5
1124  (PATH=".;."; conftest.sh) 2>&5
1125  ac_status=$?
1126  echo "$as_me:1126: \$? = $ac_status" >&5
1127  (exit "$ac_status"); }; then
1128  ac_path_separator=';'
1129else
1130  ac_path_separator=:
1131fi
1132PATH_SEPARATOR="$ac_path_separator"
1133rm -f conftest.sh
1134
1135# autoconf 2.5x defaults to no cache file; we need the cache file's information
1136# for building the config page.  But start with it empty to avoid confusion by
1137# people who don't do a "make distclean" after applying patches.
1138cache_file=config.cache
1139rm -f config.cache; touch config.cache
1140
1141CONFIG_H=lynx_cfg.h
1142ac_config_headers="$ac_config_headers $CONFIG_H:config.hin"
1143
1144ac_aux_dir=
1145for ac_dir in $srcdir $srcdir/.. $srcdir/../..; do
1146  if test -f "$ac_dir/install-sh"; then
1147    ac_aux_dir=$ac_dir
1148    ac_install_sh="$ac_aux_dir/install-sh -c"
1149    break
1150  elif test -f "$ac_dir/install.sh"; then
1151    ac_aux_dir=$ac_dir
1152    ac_install_sh="$ac_aux_dir/install.sh -c"
1153    break
1154  elif test -f "$ac_dir/shtool"; then
1155    ac_aux_dir=$ac_dir
1156    ac_install_sh="$ac_aux_dir/shtool install -c"
1157    break
1158  fi
1159done
1160if test -z "$ac_aux_dir"; then
1161  { { echo "$as_me:1161: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&5
1162echo "$as_me: error: cannot find install-sh or install.sh in $srcdir $srcdir/.. $srcdir/../.." >&2;}
1163   { (exit 1); exit 1; }; }
1164fi
1165ac_config_guess="$SHELL $ac_aux_dir/config.guess"
1166ac_config_sub="$SHELL $ac_aux_dir/config.sub"
1167ac_configure="$SHELL $ac_aux_dir/configure" # This should be Cygnus configure.
1168
1169# Make sure we can run config.sub.
1170$ac_config_sub sun4 >/dev/null 2>&1 ||
1171  { { echo "$as_me:1171: error: cannot run $ac_config_sub" >&5
1172echo "$as_me: error: cannot run $ac_config_sub" >&2;}
1173   { (exit 1); exit 1; }; }
1174
1175echo "$as_me:1175: checking build system type" >&5
1176echo $ECHO_N "checking build system type... $ECHO_C" >&6
1177if test "${ac_cv_build+set}" = set; then
1178  echo $ECHO_N "(cached) $ECHO_C" >&6
1179else
1180  ac_cv_build_alias=$build_alias
1181test -z "$ac_cv_build_alias" &&
1182  ac_cv_build_alias=`$ac_config_guess`
1183test -z "$ac_cv_build_alias" &&
1184  { { echo "$as_me:1184: error: cannot guess build type; you must specify one" >&5
1185echo "$as_me: error: cannot guess build type; you must specify one" >&2;}
1186   { (exit 1); exit 1; }; }
1187ac_cv_build=`$ac_config_sub "$ac_cv_build_alias"` ||
1188  { { echo "$as_me:1188: error: $ac_config_sub $ac_cv_build_alias failed." >&5
1189echo "$as_me: error: $ac_config_sub $ac_cv_build_alias failed." >&2;}
1190   { (exit 1); exit 1; }; }
1191
1192fi
1193echo "$as_me:1193: result: $ac_cv_build" >&5
1194echo "${ECHO_T}$ac_cv_build" >&6
1195build=$ac_cv_build
1196build_cpu=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1197build_vendor=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1198build_os=`echo "$ac_cv_build" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1199
1200echo "$as_me:1200: checking host system type" >&5
1201echo $ECHO_N "checking host system type... $ECHO_C" >&6
1202if test "${ac_cv_host+set}" = set; then
1203  echo $ECHO_N "(cached) $ECHO_C" >&6
1204else
1205  ac_cv_host_alias=$host_alias
1206test -z "$ac_cv_host_alias" &&
1207  ac_cv_host_alias=$ac_cv_build_alias
1208ac_cv_host=`$ac_config_sub "$ac_cv_host_alias"` ||
1209  { { echo "$as_me:1209: error: $ac_config_sub $ac_cv_host_alias failed" >&5
1210echo "$as_me: error: $ac_config_sub $ac_cv_host_alias failed" >&2;}
1211   { (exit 1); exit 1; }; }
1212
1213fi
1214echo "$as_me:1214: result: $ac_cv_host" >&5
1215echo "${ECHO_T}$ac_cv_host" >&6
1216host=$ac_cv_host
1217host_cpu=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1218host_vendor=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1219host_os=`echo "$ac_cv_host" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1220
1221if test -f "$srcdir/config.guess" || test -f "$ac_aux_dir/config.guess" ; then
1222	echo "$as_me:1222: checking target system type" >&5
1223echo $ECHO_N "checking target system type... $ECHO_C" >&6
1224if test "${ac_cv_target+set}" = set; then
1225  echo $ECHO_N "(cached) $ECHO_C" >&6
1226else
1227  ac_cv_target_alias=$target_alias
1228test "x$ac_cv_target_alias" = "x" &&
1229  ac_cv_target_alias=$ac_cv_host_alias
1230ac_cv_target=`$ac_config_sub "$ac_cv_target_alias"` ||
1231  { { echo "$as_me:1231: error: $ac_config_sub $ac_cv_target_alias failed" >&5
1232echo "$as_me: error: $ac_config_sub $ac_cv_target_alias failed" >&2;}
1233   { (exit 1); exit 1; }; }
1234
1235fi
1236echo "$as_me:1236: result: $ac_cv_target" >&5
1237echo "${ECHO_T}$ac_cv_target" >&6
1238target=$ac_cv_target
1239target_cpu=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\1/'`
1240target_vendor=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\2/'`
1241target_os=`echo "$ac_cv_target" | sed 's/^\([^-]*\)-\([^-]*\)-\(.*\)$/\3/'`
1242
1243# The aliases save the names the user supplied, while $host etc.
1244# will get canonicalized.
1245test -n "$target_alias" &&
1246  test "$program_prefix$program_suffix$program_transform_name" = \
1247    NONENONEs,x,x, &&
1248  program_prefix=${target_alias}-
1249	system_name="$host_os"
1250else
1251	system_name="`(uname -s -r) 2>/dev/null`"
1252	if test -z "$system_name" ; then
1253		system_name="`(hostname) 2>/dev/null`"
1254	fi
1255fi
1256test -n "$system_name" &&
1257cat >>confdefs.h <<EOF
1258#define SYSTEM_NAME "$system_name"
1259EOF
1260
1261if test "${cf_cv_system_name+set}" = set; then
1262  echo $ECHO_N "(cached) $ECHO_C" >&6
1263else
1264  cf_cv_system_name="$system_name"
1265fi
1266
1267test -z "$system_name" && system_name="$cf_cv_system_name"
1268test -n "$cf_cv_system_name" && echo "$as_me:1268: result: Configuring for $cf_cv_system_name" >&5
1269echo "${ECHO_T}Configuring for $cf_cv_system_name" >&6
1270
1271if test ".$system_name" != ".$cf_cv_system_name" ; then
1272	echo "$as_me:1272: result: Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&5
1273echo "${ECHO_T}Cached system name ($system_name) does not agree with actual ($cf_cv_system_name)" >&6
1274	{ { echo "$as_me:1274: error: \"Please remove config.cache and try again.\"" >&5
1275echo "$as_me: error: \"Please remove config.cache and try again.\"" >&2;}
1276   { (exit 1); exit 1; }; }
1277fi
1278
1279# Check whether --with-system-type or --without-system-type was given.
1280if test "${with_system_type+set}" = set; then
1281  withval="$with_system_type"
1282  { echo "$as_me:1282: WARNING: overriding system type $host_os to $withval" >&5
1283echo "$as_me: WARNING: overriding system type $host_os to $withval" >&2;}
1284 host_os=$withval
1285fi;
1286
1287test "$program_prefix" != NONE &&
1288  program_transform_name="s,^,$program_prefix,;$program_transform_name"
1289# Use a double $ so make ignores it.
1290test "$program_suffix" != NONE &&
1291  program_transform_name="s,\$,$program_suffix,;$program_transform_name"
1292# Double any \ or $.  echo might interpret backslashes.
1293# By default was `s,x,x', remove it if useless.
1294cat <<\_ACEOF >conftest.sed
1295s/[\\$]/&&/g;s/;s,x,x,$//
1296_ACEOF
1297program_transform_name=`echo $program_transform_name | sed -f conftest.sed`
1298rm conftest.sed
1299
1300PACKAGE=lynx
1301# $Format: "VERSION=$ProjectVersion$"$
1302VERSION=2.9.0dev.9
1303
1304echo "$as_me:1304: checking for DESTDIR" >&5
1305echo $ECHO_N "checking for DESTDIR... $ECHO_C" >&6
1306
1307# Check whether --with-destdir or --without-destdir was given.
1308if test "${with_destdir+set}" = set; then
1309  withval="$with_destdir"
1310
1311else
1312  withval="${DESTDIR:-$DESTDIR}"
1313fi; if test -n "$DESTDIR" ; then
1314
1315if test "x$prefix" != xNONE; then
1316	cf_path_syntax="$prefix"
1317else
1318	cf_path_syntax="$ac_default_prefix"
1319fi
1320
1321case ".$withval" in
1322(.\$\(*\)*|.\'*\'*)
1323	;;
1324(..|./*|.\\*)
1325	;;
1326(.[a-zA-Z]:[\\/]*) # OS/2 EMX
1327	;;
1328(.\$\{*prefix\}*|.\$\{*dir\}*)
1329	eval withval="$withval"
1330	case ".$withval" in
1331	(.NONE/*)
1332		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
1333		;;
1334	esac
1335	;;
1336(.no|.NONE/*)
1337	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
1338	;;
1339(*)
1340	{ { echo "$as_me:1340: error: expected a pathname, not \"$withval\"" >&5
1341echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
1342   { (exit 1); exit 1; }; }
1343	;;
1344esac
1345
1346fi
1347eval DESTDIR="$withval"
1348
1349echo "$as_me:1349: result: $DESTDIR" >&5
1350echo "${ECHO_T}$DESTDIR" >&6
1351
1352case "$host_os" in
1353(openedition)
1354	: ${CFLAGS="-D_ALL_SOURCE -Wl,EDIT=NO"}
1355	: ${CC=c89}
1356	;;
1357esac
1358
1359ac_ext=c
1360ac_cpp='$CPP $CPPFLAGS'
1361ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
1362ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
1363ac_compiler_gnu=$ac_cv_c_compiler_gnu
1364ac_main_return="return"
1365if test -n "$ac_tool_prefix"; then
1366  # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
1367set dummy ${ac_tool_prefix}gcc; ac_word=$2
1368echo "$as_me:1368: checking for $ac_word" >&5
1369echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1370if test "${ac_cv_prog_CC+set}" = set; then
1371  echo $ECHO_N "(cached) $ECHO_C" >&6
1372else
1373  if test -n "$CC"; then
1374  ac_cv_prog_CC="$CC" # Let the user override the test.
1375else
1376  ac_save_IFS=$IFS; IFS=$ac_path_separator
1377ac_dummy="$PATH"
1378for ac_dir in $ac_dummy; do
1379  IFS=$ac_save_IFS
1380  test -z "$ac_dir" && ac_dir=.
1381  $as_executable_p "$ac_dir/$ac_word" || continue
1382ac_cv_prog_CC="${ac_tool_prefix}gcc"
1383echo "$as_me:1383: found $ac_dir/$ac_word" >&5
1384break
1385done
1386
1387fi
1388fi
1389CC=$ac_cv_prog_CC
1390if test -n "$CC"; then
1391  echo "$as_me:1391: result: $CC" >&5
1392echo "${ECHO_T}$CC" >&6
1393else
1394  echo "$as_me:1394: result: no" >&5
1395echo "${ECHO_T}no" >&6
1396fi
1397
1398fi
1399if test -z "$ac_cv_prog_CC"; then
1400  ac_ct_CC=$CC
1401  # Extract the first word of "gcc", so it can be a program name with args.
1402set dummy gcc; ac_word=$2
1403echo "$as_me:1403: checking for $ac_word" >&5
1404echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1405if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1406  echo $ECHO_N "(cached) $ECHO_C" >&6
1407else
1408  if test -n "$ac_ct_CC"; then
1409  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1410else
1411  ac_save_IFS=$IFS; IFS=$ac_path_separator
1412ac_dummy="$PATH"
1413for ac_dir in $ac_dummy; do
1414  IFS=$ac_save_IFS
1415  test -z "$ac_dir" && ac_dir=.
1416  $as_executable_p "$ac_dir/$ac_word" || continue
1417ac_cv_prog_ac_ct_CC="gcc"
1418echo "$as_me:1418: found $ac_dir/$ac_word" >&5
1419break
1420done
1421
1422fi
1423fi
1424ac_ct_CC=$ac_cv_prog_ac_ct_CC
1425if test -n "$ac_ct_CC"; then
1426  echo "$as_me:1426: result: $ac_ct_CC" >&5
1427echo "${ECHO_T}$ac_ct_CC" >&6
1428else
1429  echo "$as_me:1429: result: no" >&5
1430echo "${ECHO_T}no" >&6
1431fi
1432
1433  CC=$ac_ct_CC
1434else
1435  CC="$ac_cv_prog_CC"
1436fi
1437
1438if test -z "$CC"; then
1439  if test -n "$ac_tool_prefix"; then
1440  # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
1441set dummy ${ac_tool_prefix}cc; ac_word=$2
1442echo "$as_me:1442: checking for $ac_word" >&5
1443echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1444if test "${ac_cv_prog_CC+set}" = set; then
1445  echo $ECHO_N "(cached) $ECHO_C" >&6
1446else
1447  if test -n "$CC"; then
1448  ac_cv_prog_CC="$CC" # Let the user override the test.
1449else
1450  ac_save_IFS=$IFS; IFS=$ac_path_separator
1451ac_dummy="$PATH"
1452for ac_dir in $ac_dummy; do
1453  IFS=$ac_save_IFS
1454  test -z "$ac_dir" && ac_dir=.
1455  $as_executable_p "$ac_dir/$ac_word" || continue
1456ac_cv_prog_CC="${ac_tool_prefix}cc"
1457echo "$as_me:1457: found $ac_dir/$ac_word" >&5
1458break
1459done
1460
1461fi
1462fi
1463CC=$ac_cv_prog_CC
1464if test -n "$CC"; then
1465  echo "$as_me:1465: result: $CC" >&5
1466echo "${ECHO_T}$CC" >&6
1467else
1468  echo "$as_me:1468: result: no" >&5
1469echo "${ECHO_T}no" >&6
1470fi
1471
1472fi
1473if test -z "$ac_cv_prog_CC"; then
1474  ac_ct_CC=$CC
1475  # Extract the first word of "cc", so it can be a program name with args.
1476set dummy cc; ac_word=$2
1477echo "$as_me:1477: checking for $ac_word" >&5
1478echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1479if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1480  echo $ECHO_N "(cached) $ECHO_C" >&6
1481else
1482  if test -n "$ac_ct_CC"; then
1483  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1484else
1485  ac_save_IFS=$IFS; IFS=$ac_path_separator
1486ac_dummy="$PATH"
1487for ac_dir in $ac_dummy; do
1488  IFS=$ac_save_IFS
1489  test -z "$ac_dir" && ac_dir=.
1490  $as_executable_p "$ac_dir/$ac_word" || continue
1491ac_cv_prog_ac_ct_CC="cc"
1492echo "$as_me:1492: found $ac_dir/$ac_word" >&5
1493break
1494done
1495
1496fi
1497fi
1498ac_ct_CC=$ac_cv_prog_ac_ct_CC
1499if test -n "$ac_ct_CC"; then
1500  echo "$as_me:1500: result: $ac_ct_CC" >&5
1501echo "${ECHO_T}$ac_ct_CC" >&6
1502else
1503  echo "$as_me:1503: result: no" >&5
1504echo "${ECHO_T}no" >&6
1505fi
1506
1507  CC=$ac_ct_CC
1508else
1509  CC="$ac_cv_prog_CC"
1510fi
1511
1512fi
1513if test -z "$CC"; then
1514  # Extract the first word of "cc", so it can be a program name with args.
1515set dummy cc; ac_word=$2
1516echo "$as_me:1516: checking for $ac_word" >&5
1517echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1518if test "${ac_cv_prog_CC+set}" = set; then
1519  echo $ECHO_N "(cached) $ECHO_C" >&6
1520else
1521  if test -n "$CC"; then
1522  ac_cv_prog_CC="$CC" # Let the user override the test.
1523else
1524  ac_prog_rejected=no
1525  ac_save_IFS=$IFS; IFS=$ac_path_separator
1526ac_dummy="$PATH"
1527for ac_dir in $ac_dummy; do
1528  IFS=$ac_save_IFS
1529  test -z "$ac_dir" && ac_dir=.
1530  $as_executable_p "$ac_dir/$ac_word" || continue
1531if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
1532  ac_prog_rejected=yes
1533  continue
1534fi
1535ac_cv_prog_CC="cc"
1536echo "$as_me:1536: found $ac_dir/$ac_word" >&5
1537break
1538done
1539
1540if test "$ac_prog_rejected" = yes; then
1541  # We found a bogon in the path, so make sure we never use it.
1542  set dummy $ac_cv_prog_CC
1543  shift
1544  if test $# != 0; then
1545    # We chose a different compiler from the bogus one.
1546    # However, it has the same basename, so the bogon will be chosen
1547    # first if we set CC to just the basename; use the full file name.
1548    shift
1549    set dummy "$ac_dir/$ac_word" ${1+"$@"}
1550    shift
1551    ac_cv_prog_CC="$@"
1552  fi
1553fi
1554fi
1555fi
1556CC=$ac_cv_prog_CC
1557if test -n "$CC"; then
1558  echo "$as_me:1558: result: $CC" >&5
1559echo "${ECHO_T}$CC" >&6
1560else
1561  echo "$as_me:1561: result: no" >&5
1562echo "${ECHO_T}no" >&6
1563fi
1564
1565fi
1566if test -z "$CC"; then
1567  if test -n "$ac_tool_prefix"; then
1568  for ac_prog in cl
1569  do
1570    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
1571set dummy $ac_tool_prefix$ac_prog; ac_word=$2
1572echo "$as_me:1572: checking for $ac_word" >&5
1573echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1574if test "${ac_cv_prog_CC+set}" = set; then
1575  echo $ECHO_N "(cached) $ECHO_C" >&6
1576else
1577  if test -n "$CC"; then
1578  ac_cv_prog_CC="$CC" # Let the user override the test.
1579else
1580  ac_save_IFS=$IFS; IFS=$ac_path_separator
1581ac_dummy="$PATH"
1582for ac_dir in $ac_dummy; do
1583  IFS=$ac_save_IFS
1584  test -z "$ac_dir" && ac_dir=.
1585  $as_executable_p "$ac_dir/$ac_word" || continue
1586ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
1587echo "$as_me:1587: found $ac_dir/$ac_word" >&5
1588break
1589done
1590
1591fi
1592fi
1593CC=$ac_cv_prog_CC
1594if test -n "$CC"; then
1595  echo "$as_me:1595: result: $CC" >&5
1596echo "${ECHO_T}$CC" >&6
1597else
1598  echo "$as_me:1598: result: no" >&5
1599echo "${ECHO_T}no" >&6
1600fi
1601
1602    test -n "$CC" && break
1603  done
1604fi
1605if test -z "$CC"; then
1606  ac_ct_CC=$CC
1607  for ac_prog in cl
1608do
1609  # Extract the first word of "$ac_prog", so it can be a program name with args.
1610set dummy $ac_prog; ac_word=$2
1611echo "$as_me:1611: checking for $ac_word" >&5
1612echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
1613if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
1614  echo $ECHO_N "(cached) $ECHO_C" >&6
1615else
1616  if test -n "$ac_ct_CC"; then
1617  ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
1618else
1619  ac_save_IFS=$IFS; IFS=$ac_path_separator
1620ac_dummy="$PATH"
1621for ac_dir in $ac_dummy; do
1622  IFS=$ac_save_IFS
1623  test -z "$ac_dir" && ac_dir=.
1624  $as_executable_p "$ac_dir/$ac_word" || continue
1625ac_cv_prog_ac_ct_CC="$ac_prog"
1626echo "$as_me:1626: found $ac_dir/$ac_word" >&5
1627break
1628done
1629
1630fi
1631fi
1632ac_ct_CC=$ac_cv_prog_ac_ct_CC
1633if test -n "$ac_ct_CC"; then
1634  echo "$as_me:1634: result: $ac_ct_CC" >&5
1635echo "${ECHO_T}$ac_ct_CC" >&6
1636else
1637  echo "$as_me:1637: result: no" >&5
1638echo "${ECHO_T}no" >&6
1639fi
1640
1641  test -n "$ac_ct_CC" && break
1642done
1643
1644  CC=$ac_ct_CC
1645fi
1646
1647fi
1648
1649test -z "$CC" && { { echo "$as_me:1649: error: no acceptable cc found in \$PATH" >&5
1650echo "$as_me: error: no acceptable cc found in \$PATH" >&2;}
1651   { (exit 1); exit 1; }; }
1652
1653# Provide some information about the compiler.
1654echo "$as_me:1654:" \
1655     "checking for C compiler version" >&5
1656ac_compiler=`set X $ac_compile; echo "$2"`
1657{ (eval echo "$as_me:1657: \"$ac_compiler --version </dev/null >&5\"") >&5
1658  (eval $ac_compiler --version </dev/null >&5) 2>&5
1659  ac_status=$?
1660  echo "$as_me:1660: \$? = $ac_status" >&5
1661  (exit "$ac_status"); }
1662{ (eval echo "$as_me:1662: \"$ac_compiler -v </dev/null >&5\"") >&5
1663  (eval $ac_compiler -v </dev/null >&5) 2>&5
1664  ac_status=$?
1665  echo "$as_me:1665: \$? = $ac_status" >&5
1666  (exit "$ac_status"); }
1667{ (eval echo "$as_me:1667: \"$ac_compiler -V </dev/null >&5\"") >&5
1668  (eval $ac_compiler -V </dev/null >&5) 2>&5
1669  ac_status=$?
1670  echo "$as_me:1670: \$? = $ac_status" >&5
1671  (exit "$ac_status"); }
1672
1673cat >"conftest.$ac_ext" <<_ACEOF
1674#line 1674 "configure"
1675#include "confdefs.h"
1676
1677int
1678main (void)
1679{
1680
1681  ;
1682  return 0;
1683}
1684_ACEOF
1685ac_clean_files_save=$ac_clean_files
1686ac_clean_files="$ac_clean_files a.out a.exe"
1687# Try to create an executable without -o first, disregard a.out.
1688# It will help us diagnose broken compilers, and finding out an intuition
1689# of exeext.
1690echo "$as_me:1690: checking for C compiler default output" >&5
1691echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
1692ac_link_default=`echo "$ac_link" | sed 's/ -o *"conftest[^"]*"//'`
1693if { (eval echo "$as_me:1693: \"$ac_link_default\"") >&5
1694  (eval $ac_link_default) 2>&5
1695  ac_status=$?
1696  echo "$as_me:1696: \$? = $ac_status" >&5
1697  (exit "$ac_status"); }; then
1698  # Find the output, starting from the most likely.  This scheme is
1699# not robust to junk in `.', hence go to wildcards (a.*) only as a last
1700# resort.
1701for ac_file in `ls a.exe conftest.exe 2>/dev/null;
1702                ls a.out conftest 2>/dev/null;
1703                ls a.* conftest.* 2>/dev/null`; do
1704  case $ac_file in
1705    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1706    a.out ) # We found the default executable, but exeext='' is most
1707            # certainly right.
1708            break;;
1709    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1710          # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
1711          export ac_cv_exeext
1712          break;;
1713    * ) break;;
1714  esac
1715done
1716else
1717  echo "$as_me: failed program was:" >&5
1718cat "conftest.$ac_ext" >&5
1719{ { echo "$as_me:1719: error: C compiler cannot create executables" >&5
1720echo "$as_me: error: C compiler cannot create executables" >&2;}
1721   { (exit 77); exit 77; }; }
1722fi
1723
1724ac_exeext=$ac_cv_exeext
1725echo "$as_me:1725: result: $ac_file" >&5
1726echo "${ECHO_T}$ac_file" >&6
1727
1728# Check the compiler produces executables we can run.  If not, either
1729# the compiler is broken, or we cross compile.
1730echo "$as_me:1730: checking whether the C compiler works" >&5
1731echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
1732# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
1733# If not cross compiling, check that we can run a simple program.
1734if test "$cross_compiling" != yes; then
1735  if { ac_try='./$ac_file'
1736  { (eval echo "$as_me:1736: \"$ac_try\"") >&5
1737  (eval $ac_try) 2>&5
1738  ac_status=$?
1739  echo "$as_me:1739: \$? = $ac_status" >&5
1740  (exit "$ac_status"); }; }; then
1741    cross_compiling=no
1742  else
1743    if test "$cross_compiling" = maybe; then
1744	cross_compiling=yes
1745    else
1746	{ { echo "$as_me:1746: error: cannot run C compiled programs.
1747If you meant to cross compile, use \`--host'." >&5
1748echo "$as_me: error: cannot run C compiled programs.
1749If you meant to cross compile, use \`--host'." >&2;}
1750   { (exit 1); exit 1; }; }
1751    fi
1752  fi
1753fi
1754echo "$as_me:1754: result: yes" >&5
1755echo "${ECHO_T}yes" >&6
1756
1757rm -f a.out a.exe "conftest$ac_cv_exeext"
1758ac_clean_files=$ac_clean_files_save
1759# Check the compiler produces executables we can run.  If not, either
1760# the compiler is broken, or we cross compile.
1761echo "$as_me:1761: checking whether we are cross compiling" >&5
1762echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
1763echo "$as_me:1763: result: $cross_compiling" >&5
1764echo "${ECHO_T}$cross_compiling" >&6
1765
1766echo "$as_me:1766: checking for executable suffix" >&5
1767echo $ECHO_N "checking for executable suffix... $ECHO_C" >&6
1768if { (eval echo "$as_me:1768: \"$ac_link\"") >&5
1769  (eval $ac_link) 2>&5
1770  ac_status=$?
1771  echo "$as_me:1771: \$? = $ac_status" >&5
1772  (exit "$ac_status"); }; then
1773  # If both `conftest.exe' and `conftest' are `present' (well, observable)
1774# catch `conftest.exe'.  For instance with Cygwin, `ls conftest' will
1775# work properly (i.e., refer to `conftest.exe'), while it won't with
1776# `rm'.
1777for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
1778  case $ac_file in
1779    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.bb | *.bbg | *.map | *.inf | *.o | *.obj ) ;;
1780    *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
1781          export ac_cv_exeext
1782          break;;
1783    * ) break;;
1784  esac
1785done
1786else
1787  { { echo "$as_me:1787: error: cannot compute EXEEXT: cannot compile and link" >&5
1788echo "$as_me: error: cannot compute EXEEXT: cannot compile and link" >&2;}
1789   { (exit 1); exit 1; }; }
1790fi
1791
1792rm -f "conftest$ac_cv_exeext"
1793echo "$as_me:1793: result: $ac_cv_exeext" >&5
1794echo "${ECHO_T}$ac_cv_exeext" >&6
1795
1796rm -f "conftest.$ac_ext"
1797EXEEXT=$ac_cv_exeext
1798ac_exeext=$EXEEXT
1799echo "$as_me:1799: checking for object suffix" >&5
1800echo $ECHO_N "checking for object suffix... $ECHO_C" >&6
1801if test "${ac_cv_objext+set}" = set; then
1802  echo $ECHO_N "(cached) $ECHO_C" >&6
1803else
1804  cat >"conftest.$ac_ext" <<_ACEOF
1805#line 1805 "configure"
1806#include "confdefs.h"
1807
1808int
1809main (void)
1810{
1811
1812  ;
1813  return 0;
1814}
1815_ACEOF
1816rm -f conftest.o conftest.obj
1817if { (eval echo "$as_me:1817: \"$ac_compile\"") >&5
1818  (eval $ac_compile) 2>&5
1819  ac_status=$?
1820  echo "$as_me:1820: \$? = $ac_status" >&5
1821  (exit "$ac_status"); }; then
1822  for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
1823  case $ac_file in
1824    *.$ac_ext | *.xcoff | *.tds | *.d | *.dbg | *.pdb | *.xSYM | *.map | *.inf ) ;;
1825    *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
1826       break;;
1827  esac
1828done
1829else
1830  echo "$as_me: failed program was:" >&5
1831cat "conftest.$ac_ext" >&5
1832{ { echo "$as_me:1832: error: cannot compute OBJEXT: cannot compile" >&5
1833echo "$as_me: error: cannot compute OBJEXT: cannot compile" >&2;}
1834   { (exit 1); exit 1; }; }
1835fi
1836
1837rm -f "conftest.$ac_cv_objext" "conftest.$ac_ext"
1838fi
1839echo "$as_me:1839: result: $ac_cv_objext" >&5
1840echo "${ECHO_T}$ac_cv_objext" >&6
1841OBJEXT=$ac_cv_objext
1842ac_objext=$OBJEXT
1843echo "$as_me:1843: checking whether we are using the GNU C compiler" >&5
1844echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
1845if test "${ac_cv_c_compiler_gnu+set}" = set; then
1846  echo $ECHO_N "(cached) $ECHO_C" >&6
1847else
1848  cat >"conftest.$ac_ext" <<_ACEOF
1849#line 1849 "configure"
1850#include "confdefs.h"
1851
1852int
1853main (void)
1854{
1855#ifndef __GNUC__
1856       choke me
1857#endif
1858
1859  ;
1860  return 0;
1861}
1862_ACEOF
1863rm -f "conftest.$ac_objext"
1864if { (eval echo "$as_me:1864: \"$ac_compile\"") >&5
1865  (eval $ac_compile) 2>&5
1866  ac_status=$?
1867  echo "$as_me:1867: \$? = $ac_status" >&5
1868  (exit "$ac_status"); } &&
1869         { ac_try='test -s "conftest.$ac_objext"'
1870  { (eval echo "$as_me:1870: \"$ac_try\"") >&5
1871  (eval $ac_try) 2>&5
1872  ac_status=$?
1873  echo "$as_me:1873: \$? = $ac_status" >&5
1874  (exit "$ac_status"); }; }; then
1875  ac_compiler_gnu=yes
1876else
1877  echo "$as_me: failed program was:" >&5
1878cat "conftest.$ac_ext" >&5
1879ac_compiler_gnu=no
1880fi
1881rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1882ac_cv_c_compiler_gnu=$ac_compiler_gnu
1883
1884fi
1885echo "$as_me:1885: result: $ac_cv_c_compiler_gnu" >&5
1886echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
1887GCC=`test $ac_compiler_gnu = yes && echo yes`
1888ac_test_CFLAGS=${CFLAGS+set}
1889ac_save_CFLAGS=$CFLAGS
1890CFLAGS="-g"
1891echo "$as_me:1891: checking whether $CC accepts -g" >&5
1892echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
1893if test "${ac_cv_prog_cc_g+set}" = set; then
1894  echo $ECHO_N "(cached) $ECHO_C" >&6
1895else
1896  cat >"conftest.$ac_ext" <<_ACEOF
1897#line 1897 "configure"
1898#include "confdefs.h"
1899
1900int
1901main (void)
1902{
1903
1904  ;
1905  return 0;
1906}
1907_ACEOF
1908rm -f "conftest.$ac_objext"
1909if { (eval echo "$as_me:1909: \"$ac_compile\"") >&5
1910  (eval $ac_compile) 2>&5
1911  ac_status=$?
1912  echo "$as_me:1912: \$? = $ac_status" >&5
1913  (exit "$ac_status"); } &&
1914         { ac_try='test -s "conftest.$ac_objext"'
1915  { (eval echo "$as_me:1915: \"$ac_try\"") >&5
1916  (eval $ac_try) 2>&5
1917  ac_status=$?
1918  echo "$as_me:1918: \$? = $ac_status" >&5
1919  (exit "$ac_status"); }; }; then
1920  ac_cv_prog_cc_g=yes
1921else
1922  echo "$as_me: failed program was:" >&5
1923cat "conftest.$ac_ext" >&5
1924ac_cv_prog_cc_g=no
1925fi
1926rm -f "conftest.$ac_objext" "conftest.$ac_ext"
1927fi
1928echo "$as_me:1928: result: $ac_cv_prog_cc_g" >&5
1929echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
1930if test "$ac_test_CFLAGS" = set; then
1931  CFLAGS=$ac_save_CFLAGS
1932elif test $ac_cv_prog_cc_g = yes; then
1933  if test "$GCC" = yes; then
1934    CFLAGS="-g -O2"
1935  else
1936    CFLAGS="-g"
1937  fi
1938else
1939  if test "$GCC" = yes; then
1940    CFLAGS="-O2"
1941  else
1942    CFLAGS=
1943  fi
1944fi
1945# Some people use a C++ compiler to compile C.  Since we use `exit',
1946# in C++ we need to declare it.  In case someone uses the same compiler
1947# for both compiling C and C++ we need to have the C++ compiler decide
1948# the declaration of exit, since it's the most demanding environment.
1949cat >"conftest.$ac_ext" <<_ACEOF
1950#ifndef __cplusplus
1951  choke me
1952#endif
1953_ACEOF
1954rm -f "conftest.$ac_objext"
1955if { (eval echo "$as_me:1955: \"$ac_compile\"") >&5
1956  (eval $ac_compile) 2>&5
1957  ac_status=$?
1958  echo "$as_me:1958: \$? = $ac_status" >&5
1959  (exit "$ac_status"); } &&
1960         { ac_try='test -s "conftest.$ac_objext"'
1961  { (eval echo "$as_me:1961: \"$ac_try\"") >&5
1962  (eval $ac_try) 2>&5
1963  ac_status=$?
1964  echo "$as_me:1964: \$? = $ac_status" >&5
1965  (exit "$ac_status"); }; }; then
1966  for ac_declaration in \
1967   ''\
1968   '#include <stdlib.h>' \
1969   'extern "C" void std::exit (int) throw (); using std::exit;' \
1970   'extern "C" void std::exit (int); using std::exit;' \
1971   'extern "C" void exit (int) throw ();' \
1972   'extern "C" void exit (int);' \
1973   'void exit (int);'
1974do
1975  cat >"conftest.$ac_ext" <<_ACEOF
1976#line 1976 "configure"
1977#include "confdefs.h"
1978#include <stdlib.h>
1979$ac_declaration
1980int
1981main (void)
1982{
1983exit (42);
1984  ;
1985  return 0;
1986}
1987_ACEOF
1988rm -f "conftest.$ac_objext"
1989if { (eval echo "$as_me:1989: \"$ac_compile\"") >&5
1990  (eval $ac_compile) 2>&5
1991  ac_status=$?
1992  echo "$as_me:1992: \$? = $ac_status" >&5
1993  (exit "$ac_status"); } &&
1994         { ac_try='test -s "conftest.$ac_objext"'
1995  { (eval echo "$as_me:1995: \"$ac_try\"") >&5
1996  (eval $ac_try) 2>&5
1997  ac_status=$?
1998  echo "$as_me:1998: \$? = $ac_status" >&5
1999  (exit "$ac_status"); }; }; then
2000  :
2001else
2002  echo "$as_me: failed program was:" >&5
2003cat "conftest.$ac_ext" >&5
2004continue
2005fi
2006rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2007  cat >"conftest.$ac_ext" <<_ACEOF
2008#line 2008 "configure"
2009#include "confdefs.h"
2010$ac_declaration
2011int
2012main (void)
2013{
2014exit (42);
2015  ;
2016  return 0;
2017}
2018_ACEOF
2019rm -f "conftest.$ac_objext"
2020if { (eval echo "$as_me:2020: \"$ac_compile\"") >&5
2021  (eval $ac_compile) 2>&5
2022  ac_status=$?
2023  echo "$as_me:2023: \$? = $ac_status" >&5
2024  (exit "$ac_status"); } &&
2025         { ac_try='test -s "conftest.$ac_objext"'
2026  { (eval echo "$as_me:2026: \"$ac_try\"") >&5
2027  (eval $ac_try) 2>&5
2028  ac_status=$?
2029  echo "$as_me:2029: \$? = $ac_status" >&5
2030  (exit "$ac_status"); }; }; then
2031  break
2032else
2033  echo "$as_me: failed program was:" >&5
2034cat "conftest.$ac_ext" >&5
2035fi
2036rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2037done
2038rm -rf conftest*
2039if test -n "$ac_declaration"; then
2040  echo '#ifdef __cplusplus' >>confdefs.h
2041  echo "$ac_declaration"    >>confdefs.h
2042  echo '#endif'             >>confdefs.h
2043fi
2044
2045else
2046  echo "$as_me: failed program was:" >&5
2047cat "conftest.$ac_ext" >&5
2048fi
2049rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2050ac_ext=c
2051ac_cpp='$CPP $CPPFLAGS'
2052ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2053ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2054ac_compiler_gnu=$ac_cv_c_compiler_gnu
2055ac_main_return="return"
2056
2057GCC_VERSION=none
2058if test "$GCC" = yes ; then
2059	echo "$as_me:2059: checking version of $CC" >&5
2060echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2061	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.].*//'`"
2062	test -z "$GCC_VERSION" && GCC_VERSION=unknown
2063	echo "$as_me:2063: result: $GCC_VERSION" >&5
2064echo "${ECHO_T}$GCC_VERSION" >&6
2065fi
2066
2067INTEL_COMPILER=no
2068
2069if test "$GCC" = yes ; then
2070	case "$host_os" in
2071	(linux*|gnu*)
2072		echo "$as_me:2072: checking if this is really Intel C compiler" >&5
2073echo $ECHO_N "checking if this is really Intel C compiler... $ECHO_C" >&6
2074		cf_save_CFLAGS="$CFLAGS"
2075		CFLAGS="$CFLAGS -no-gcc"
2076		cat >"conftest.$ac_ext" <<_ACEOF
2077#line 2077 "configure"
2078#include "confdefs.h"
2079
2080int
2081main (void)
2082{
2083
2084#ifdef __INTEL_COMPILER
2085#else
2086make an error
2087#endif
2088
2089  ;
2090  return 0;
2091}
2092_ACEOF
2093rm -f "conftest.$ac_objext"
2094if { (eval echo "$as_me:2094: \"$ac_compile\"") >&5
2095  (eval $ac_compile) 2>&5
2096  ac_status=$?
2097  echo "$as_me:2097: \$? = $ac_status" >&5
2098  (exit "$ac_status"); } &&
2099         { ac_try='test -s "conftest.$ac_objext"'
2100  { (eval echo "$as_me:2100: \"$ac_try\"") >&5
2101  (eval $ac_try) 2>&5
2102  ac_status=$?
2103  echo "$as_me:2103: \$? = $ac_status" >&5
2104  (exit "$ac_status"); }; }; then
2105  INTEL_COMPILER=yes
2106cf_save_CFLAGS="$cf_save_CFLAGS -we147"
2107
2108else
2109  echo "$as_me: failed program was:" >&5
2110cat "conftest.$ac_ext" >&5
2111fi
2112rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2113		CFLAGS="$cf_save_CFLAGS"
2114		echo "$as_me:2114: result: $INTEL_COMPILER" >&5
2115echo "${ECHO_T}$INTEL_COMPILER" >&6
2116		;;
2117	esac
2118fi
2119
2120CLANG_COMPILER=no
2121
2122if test "$GCC" = yes ; then
2123	echo "$as_me:2123: checking if this is really Clang C compiler" >&5
2124echo $ECHO_N "checking if this is really Clang C compiler... $ECHO_C" >&6
2125	cf_save_CFLAGS="$CFLAGS"
2126	cat >"conftest.$ac_ext" <<_ACEOF
2127#line 2127 "configure"
2128#include "confdefs.h"
2129
2130int
2131main (void)
2132{
2133
2134#ifdef __clang__
2135#else
2136make an error
2137#endif
2138
2139  ;
2140  return 0;
2141}
2142_ACEOF
2143rm -f "conftest.$ac_objext"
2144if { (eval echo "$as_me:2144: \"$ac_compile\"") >&5
2145  (eval $ac_compile) 2>&5
2146  ac_status=$?
2147  echo "$as_me:2147: \$? = $ac_status" >&5
2148  (exit "$ac_status"); } &&
2149         { ac_try='test -s "conftest.$ac_objext"'
2150  { (eval echo "$as_me:2150: \"$ac_try\"") >&5
2151  (eval $ac_try) 2>&5
2152  ac_status=$?
2153  echo "$as_me:2153: \$? = $ac_status" >&5
2154  (exit "$ac_status"); }; }; then
2155  CLANG_COMPILER=yes
2156
2157else
2158  echo "$as_me: failed program was:" >&5
2159cat "conftest.$ac_ext" >&5
2160fi
2161rm -f "conftest.$ac_objext" "conftest.$ac_ext"
2162	CFLAGS="$cf_save_CFLAGS"
2163	echo "$as_me:2163: result: $CLANG_COMPILER" >&5
2164echo "${ECHO_T}$CLANG_COMPILER" >&6
2165fi
2166
2167CLANG_VERSION=none
2168
2169if test "x$CLANG_COMPILER" = "xyes" ; then
2170	case "$CC" in
2171	(c[1-9][0-9]|*/c[1-9][0-9])
2172		{ echo "$as_me:2172: WARNING: replacing broken compiler alias $CC" >&5
2173echo "$as_me: WARNING: replacing broken compiler alias $CC" >&2;}
2174		CFLAGS="$CFLAGS -std=`echo "$CC" | sed -e 's%.*/%%'`"
2175		CC=clang
2176		;;
2177	esac
2178
2179	echo "$as_me:2179: checking version of $CC" >&5
2180echo $ECHO_N "checking version of $CC... $ECHO_C" >&6
2181	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.].*//'`"
2182	test -z "$CLANG_VERSION" && CLANG_VERSION=unknown
2183	echo "$as_me:2183: result: $CLANG_VERSION" >&5
2184echo "${ECHO_T}$CLANG_VERSION" >&6
2185
2186	for cf_clang_opt in \
2187		-Qunused-arguments \
2188		-Wno-error=implicit-function-declaration
2189	do
2190		echo "$as_me:2190: checking if option $cf_clang_opt works" >&5
2191echo $ECHO_N "checking if option $cf_clang_opt works... $ECHO_C" >&6
2192		cf_save_CFLAGS="$CFLAGS"
2193		CFLAGS="$CFLAGS $cf_clang_opt"
2194		cat >"conftest.$ac_ext" <<_ACEOF
2195#line 2195 "configure"
2196#include "confdefs.h"
2197
2198			#include <stdio.h>
2199int
2200main (void)
2201{
2202
2203			printf("hello!\\n");
2204  ;
2205  return 0;
2206}
2207_ACEOF
2208rm -f "conftest.$ac_objext" "conftest$ac_exeext"
2209if { (eval echo "$as_me:2209: \"$ac_link\"") >&5
2210  (eval $ac_link) 2>&5
2211  ac_status=$?
2212  echo "$as_me:2212: \$? = $ac_status" >&5
2213  (exit "$ac_status"); } &&
2214         { ac_try='test -s "conftest$ac_exeext"'
2215  { (eval echo "$as_me:2215: \"$ac_try\"") >&5
2216  (eval $ac_try) 2>&5
2217  ac_status=$?
2218  echo "$as_me:2218: \$? = $ac_status" >&5
2219  (exit "$ac_status"); }; }; then
2220
2221			cf_clang_optok=yes
2222else
2223  echo "$as_me: failed program was:" >&5
2224cat "conftest.$ac_ext" >&5
2225
2226			cf_clang_optok=no
2227fi
2228rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
2229		echo "$as_me:2229: result: $cf_clang_optok" >&5
2230echo "${ECHO_T}$cf_clang_optok" >&6
2231		CFLAGS="$cf_save_CFLAGS"
2232		if test "$cf_clang_optok" = yes; then
2233			test -n "$verbose" && echo "	adding option $cf_clang_opt" 1>&6
2234
2235echo "${as_me:-configure}:2235: testing adding option $cf_clang_opt ..." 1>&5
2236
2237	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2238	CFLAGS="${CFLAGS}$cf_clang_opt"
2239
2240		fi
2241	done
2242fi
2243
2244echo "$as_me:2244: checking for $CC option to accept ANSI C" >&5
2245echo $ECHO_N "checking for $CC option to accept ANSI C... $ECHO_C" >&6
2246if test "${ac_cv_prog_cc_stdc+set}" = set; then
2247  echo $ECHO_N "(cached) $ECHO_C" >&6
2248else
2249  ac_cv_prog_cc_stdc=no
2250ac_save_CC=$CC
2251cat >"conftest.$ac_ext" <<_ACEOF
2252#line 2252 "configure"
2253#include "confdefs.h"
2254#include <stdarg.h>
2255#include <stdio.h>
2256#include <sys/types.h>
2257#include <sys/stat.h>
2258/* Most of the following tests are stolen from RCS 5.7's src/conf.sh.  */
2259struct buf { int x; };
2260FILE * (*rcsopen) (struct buf *, struct stat *, int);
2261static char *e (p, i)
2262     char **p;
2263     int i;
2264{
2265  return p[i];
2266}
2267static char *f (char * (*g) (char **, int), char **p, ...)
2268{
2269  char *s;
2270  va_list v;
2271  va_start (v,p);
2272  s = g (p, va_arg (v,int));
2273  va_end (v);
2274  return s;
2275}
2276int test (int i, double x);
2277struct s1 {int (*f) (int a);};
2278struct s2 {int (*f) (double a);};
2279int pairnames (int, char **, FILE *(*)(struct buf *, struct stat *, int), int, int);
2280int argc;
2281char **argv;
2282int
2283main (void)
2284{
2285return f (e, argv, 0) != argv[0]  ||  f (e, argv, 1) != argv[1];
2286  ;
2287  return 0;
2288}
2289_ACEOF
2290# Don't try gcc -ansi; that turns off useful extensions and
2291# breaks some systems' header files.
2292# AIX			-qlanglvl=ansi
2293# Ultrix and OSF/1	-std1
2294# HP-UX 10.20 and later	-Ae
2295# HP-UX older versions	-Aa -D_HPUX_SOURCE
2296# SVR4			-Xc -D__EXTENSIONS__
2297for ac_arg in "" -qlanglvl=ansi -std1 -Ae "-Aa -D_HPUX_SOURCE" "-Xc -D__EXTENSIONS__"
2298do
2299  CC="$ac_save_CC $ac_arg"
2300  rm -f "conftest.$ac_objext"
2301if { (eval echo "$as_me:2301: \"$ac_compile\"") >&5
2302  (eval $ac_compile) 2>&5
2303  ac_status=$?
2304  echo "$as_me:2304: \$? = $ac_status" >&5
2305  (exit "$ac_status"); } &&
2306         { ac_try='test -s "conftest.$ac_objext"'
2307  { (eval echo "$as_me:2307: \"$ac_try\"") >&5
2308  (eval $ac_try) 2>&5
2309  ac_status=$?
2310  echo "$as_me:2310: \$? = $ac_status" >&5
2311  (exit "$ac_status"); }; }; then
2312  ac_cv_prog_cc_stdc=$ac_arg
2313break
2314else
2315  echo "$as_me: failed program was:" >&5
2316cat "conftest.$ac_ext" >&5
2317fi
2318rm -f "conftest.$ac_objext"
2319done
2320rm -f "conftest.$ac_ext" "conftest.$ac_objext"
2321CC=$ac_save_CC
2322
2323fi
2324
2325case "x$ac_cv_prog_cc_stdc" in
2326  x|xno)
2327    echo "$as_me:2327: result: none needed" >&5
2328echo "${ECHO_T}none needed" >&6 ;;
2329  *)
2330    echo "$as_me:2330: result: $ac_cv_prog_cc_stdc" >&5
2331echo "${ECHO_T}$ac_cv_prog_cc_stdc" >&6
2332    CC="$CC $ac_cv_prog_cc_stdc" ;;
2333esac
2334
2335# This should have been defined by AC_PROG_CC
2336: "${CC:=cc}"
2337
2338echo "$as_me:2338: checking \$CFLAGS variable" >&5
2339echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
2340case "x$CFLAGS" in
2341(*-[IUD]*)
2342	echo "$as_me:2342: result: broken" >&5
2343echo "${ECHO_T}broken" >&6
2344	{ echo "$as_me:2344: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
2345echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
2346	cf_flags="$CFLAGS"
2347	CFLAGS=
2348	for cf_arg in $cf_flags
2349	do
2350
2351cf_fix_cppflags=no
2352cf_new_cflags=
2353cf_new_cppflags=
2354cf_new_extra_cppflags=
2355
2356for cf_add_cflags in $cf_arg
2357do
2358case "$cf_fix_cppflags" in
2359(no)
2360	case "$cf_add_cflags" in
2361	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2362		case "$cf_add_cflags" in
2363		(-D*)
2364			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2365
2366			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2367				&& test -z "${cf_tst_cflags}" \
2368				&& cf_fix_cppflags=yes
2369
2370			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
2377
2378	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2379	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2380
2381				continue
2382			fi
2383			;;
2384		esac
2385		case "$CPPFLAGS" in
2386		(*$cf_add_cflags)
2387			;;
2388		(*)
2389			case "$cf_add_cflags" in
2390			(-D*)
2391				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2392
2393CPPFLAGS=`echo "$CPPFLAGS" | \
2394	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2395		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2396
2397				;;
2398			esac
2399
2400	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2401	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2402
2403			;;
2404		esac
2405		;;
2406	(*)
2407
2408	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2409	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2410
2411		;;
2412	esac
2413	;;
2414(yes)
2415
2416	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2417	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2418
2419	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2420
2421	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2422		&& test -z "${cf_tst_cflags}" \
2423		&& cf_fix_cppflags=no
2424	;;
2425esac
2426done
2427
2428if test -n "$cf_new_cflags" ; then
2429
2430	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2431	CFLAGS="${CFLAGS}$cf_new_cflags"
2432
2433fi
2434
2435if test -n "$cf_new_cppflags" ; then
2436
2437	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2438	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2439
2440fi
2441
2442if test -n "$cf_new_extra_cppflags" ; then
2443
2444	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2445	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2446
2447fi
2448
2449	done
2450	;;
2451(*)
2452	echo "$as_me:2452: result: ok" >&5
2453echo "${ECHO_T}ok" >&6
2454	;;
2455esac
2456
2457echo "$as_me:2457: checking \$CC variable" >&5
2458echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
2459case "$CC" in
2460(*[\ \	]-*)
2461	echo "$as_me:2461: result: broken" >&5
2462echo "${ECHO_T}broken" >&6
2463	{ echo "$as_me:2463: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
2464echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
2465	# humor him...
2466	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
2467	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
2468	CC="$cf_prog"
2469	for cf_arg in $cf_flags
2470	do
2471		case "x$cf_arg" in
2472		(x-[IUDfgOW]*)
2473
2474cf_fix_cppflags=no
2475cf_new_cflags=
2476cf_new_cppflags=
2477cf_new_extra_cppflags=
2478
2479for cf_add_cflags in $cf_arg
2480do
2481case "$cf_fix_cppflags" in
2482(no)
2483	case "$cf_add_cflags" in
2484	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
2485		case "$cf_add_cflags" in
2486		(-D*)
2487			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
2488
2489			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2490				&& test -z "${cf_tst_cflags}" \
2491				&& cf_fix_cppflags=yes
2492
2493			if test "$cf_fix_cppflags" = yes ; 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			elif test "${cf_tst_cflags}" = "\"'" ; then
2500
2501	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2502	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2503
2504				continue
2505			fi
2506			;;
2507		esac
2508		case "$CPPFLAGS" in
2509		(*$cf_add_cflags)
2510			;;
2511		(*)
2512			case "$cf_add_cflags" in
2513			(-D*)
2514				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
2515
2516CPPFLAGS=`echo "$CPPFLAGS" | \
2517	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
2518		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
2519
2520				;;
2521			esac
2522
2523	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
2524	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
2525
2526			;;
2527		esac
2528		;;
2529	(*)
2530
2531	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
2532	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
2533
2534		;;
2535	esac
2536	;;
2537(yes)
2538
2539	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
2540	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
2541
2542	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
2543
2544	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
2545		&& test -z "${cf_tst_cflags}" \
2546		&& cf_fix_cppflags=no
2547	;;
2548esac
2549done
2550
2551if test -n "$cf_new_cflags" ; then
2552
2553	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
2554	CFLAGS="${CFLAGS}$cf_new_cflags"
2555
2556fi
2557
2558if test -n "$cf_new_cppflags" ; then
2559
2560	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
2561	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
2562
2563fi
2564
2565if test -n "$cf_new_extra_cppflags" ; then
2566
2567	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
2568	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
2569
2570fi
2571
2572			;;
2573		(*)
2574			CC="$CC $cf_arg"
2575			;;
2576		esac
2577	done
2578	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
2579
2580echo "${as_me:-configure}:2580: testing resulting CC: '$CC' ..." 1>&5
2581
2582	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
2583
2584echo "${as_me:-configure}:2584: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
2585
2586	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
2587
2588echo "${as_me:-configure}:2588: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
2589
2590	;;
2591(*)
2592	echo "$as_me:2592: result: ok" >&5
2593echo "${ECHO_T}ok" >&6
2594	;;
2595esac
2596
2597for ac_prog in ggrep grep
2598do
2599  # Extract the first word of "$ac_prog", so it can be a program name with args.
2600set dummy $ac_prog; ac_word=$2
2601echo "$as_me:2601: checking for $ac_word" >&5
2602echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2603if test "${ac_cv_prog_GREP+set}" = set; then
2604  echo $ECHO_N "(cached) $ECHO_C" >&6
2605else
2606  if test -n "$GREP"; then
2607  ac_cv_prog_GREP="$GREP" # Let the user override the test.
2608else
2609  ac_save_IFS=$IFS; IFS=$ac_path_separator
2610ac_dummy="$PATH"
2611for ac_dir in $ac_dummy; do
2612  IFS=$ac_save_IFS
2613  test -z "$ac_dir" && ac_dir=.
2614  $as_executable_p "$ac_dir/$ac_word" || continue
2615ac_cv_prog_GREP="$ac_prog"
2616echo "$as_me:2616: found $ac_dir/$ac_word" >&5
2617break
2618done
2619
2620fi
2621fi
2622GREP=$ac_cv_prog_GREP
2623if test -n "$GREP"; then
2624  echo "$as_me:2624: result: $GREP" >&5
2625echo "${ECHO_T}$GREP" >&6
2626else
2627  echo "$as_me:2627: result: no" >&5
2628echo "${ECHO_T}no" >&6
2629fi
2630
2631  test -n "$GREP" && break
2632done
2633test -n "$GREP" || GREP=": "
2634
2635echo "$as_me:2635: checking for egrep" >&5
2636echo $ECHO_N "checking for egrep... $ECHO_C" >&6
2637if test "${ac_cv_path_EGREP+set}" = set; then
2638  echo $ECHO_N "(cached) $ECHO_C" >&6
2639else
2640  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
2641   then ac_cv_path_EGREP="$GREP -E"
2642   else
2643     for ac_prog in gegrep egrep
2644do
2645  # Extract the first word of "$ac_prog", so it can be a program name with args.
2646set dummy $ac_prog; ac_word=$2
2647echo "$as_me:2647: checking for $ac_word" >&5
2648echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
2649if test "${ac_cv_path_EGREP+set}" = set; then
2650  echo $ECHO_N "(cached) $ECHO_C" >&6
2651else
2652  case $EGREP in
2653  [\\/]* | ?:[\\/]*)
2654  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
2655  ;;
2656  *)
2657  ac_save_IFS=$IFS; IFS=$ac_path_separator
2658ac_dummy="$PATH"
2659for ac_dir in $ac_dummy; do
2660  IFS=$ac_save_IFS
2661  test -z "$ac_dir" && ac_dir=.
2662  if $as_executable_p "$ac_dir/$ac_word"; then
2663   ac_cv_path_EGREP="$ac_dir/$ac_word"
2664   echo "$as_me:2664: found $ac_dir/$ac_word" >&5
2665   break
2666fi
2667done
2668
2669  ;;
2670esac
2671fi
2672EGREP=$ac_cv_path_EGREP
2673
2674if test -n "$EGREP"; then
2675  echo "$as_me:2675: result: $EGREP" >&5
2676echo "${ECHO_T}$EGREP" >&6
2677else
2678  echo "$as_me:2678: result: no" >&5
2679echo "${ECHO_T}no" >&6
2680fi
2681
2682  test -n "$EGREP" && break
2683done
2684test -n "$EGREP" || EGREP=": "
2685
2686     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:2686: error: cannot find workable egrep" >&5
2687echo "$as_me: error: cannot find workable egrep" >&2;}
2688   { (exit 1); exit 1; }; }
2689   fi
2690fi
2691echo "$as_me:2691: result: $ac_cv_path_EGREP" >&5
2692echo "${ECHO_T}$ac_cv_path_EGREP" >&6
2693 EGREP="$ac_cv_path_EGREP"
2694
2695ac_ext=c
2696ac_cpp='$CPP $CPPFLAGS'
2697ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2698ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2699ac_compiler_gnu=$ac_cv_c_compiler_gnu
2700ac_main_return="return"
2701echo "$as_me:2701: checking how to run the C preprocessor" >&5
2702echo $ECHO_N "checking how to run the C preprocessor... $ECHO_C" >&6
2703# On Suns, sometimes $CPP names a directory.
2704if test -n "$CPP" && test -d "$CPP"; then
2705  CPP=
2706fi
2707if test -z "$CPP"; then
2708  if test "${ac_cv_prog_CPP+set}" = set; then
2709  echo $ECHO_N "(cached) $ECHO_C" >&6
2710else
2711      # Double quotes because CPP needs to be expanded
2712    for CPP in "$CC -E" "$CC -E -traditional-cpp" "/lib/cpp"
2713    do
2714      ac_preproc_ok=false
2715for ac_c_preproc_warn_flag in '' yes
2716do
2717  # Use a header file that comes with gcc, so configuring glibc
2718  # with a fresh cross-compiler works.
2719  # On the NeXT, cc -E runs the code through the compiler's parser,
2720  # not just through cpp. "Syntax error" is here to catch this case.
2721  cat >"conftest.$ac_ext" <<_ACEOF
2722#line 2722 "configure"
2723#include "confdefs.h"
2724#include <assert.h>
2725                     Syntax error
2726_ACEOF
2727if { (eval echo "$as_me:2727: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2728  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2729  ac_status=$?
2730  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2731  rm -f conftest.er1
2732  cat conftest.err >&5
2733  echo "$as_me:2733: \$? = $ac_status" >&5
2734  (exit "$ac_status"); } >/dev/null; then
2735  if test -s conftest.err; then
2736    ac_cpp_err=$ac_c_preproc_warn_flag
2737  else
2738    ac_cpp_err=
2739  fi
2740else
2741  ac_cpp_err=yes
2742fi
2743if test -z "$ac_cpp_err"; then
2744  :
2745else
2746  echo "$as_me: failed program was:" >&5
2747  cat "conftest.$ac_ext" >&5
2748  # Broken: fails on valid input.
2749continue
2750fi
2751rm -f conftest.err "conftest.$ac_ext"
2752
2753  # OK, works on sane cases.  Now check whether non-existent headers
2754  # can be detected and how.
2755  cat >"conftest.$ac_ext" <<_ACEOF
2756#line 2756 "configure"
2757#include "confdefs.h"
2758#include <ac_nonexistent.h>
2759_ACEOF
2760if { (eval echo "$as_me:2760: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2761  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2762  ac_status=$?
2763  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2764  rm -f conftest.er1
2765  cat conftest.err >&5
2766  echo "$as_me:2766: \$? = $ac_status" >&5
2767  (exit "$ac_status"); } >/dev/null; then
2768  if test -s conftest.err; then
2769    ac_cpp_err=$ac_c_preproc_warn_flag
2770  else
2771    ac_cpp_err=
2772  fi
2773else
2774  ac_cpp_err=yes
2775fi
2776if test -z "$ac_cpp_err"; then
2777  # Broken: success on invalid input.
2778continue
2779else
2780  echo "$as_me: failed program was:" >&5
2781  cat "conftest.$ac_ext" >&5
2782  # Passes both tests.
2783ac_preproc_ok=:
2784break
2785fi
2786rm -f conftest.err "conftest.$ac_ext"
2787
2788done
2789# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2790rm -f conftest.err "conftest.$ac_ext"
2791if $ac_preproc_ok; then
2792  break
2793fi
2794
2795    done
2796    ac_cv_prog_CPP=$CPP
2797
2798fi
2799  CPP=$ac_cv_prog_CPP
2800else
2801  ac_cv_prog_CPP=$CPP
2802fi
2803echo "$as_me:2803: result: $CPP" >&5
2804echo "${ECHO_T}$CPP" >&6
2805ac_preproc_ok=false
2806for ac_c_preproc_warn_flag in '' yes
2807do
2808  # Use a header file that comes with gcc, so configuring glibc
2809  # with a fresh cross-compiler works.
2810  # On the NeXT, cc -E runs the code through the compiler's parser,
2811  # not just through cpp. "Syntax error" is here to catch this case.
2812  cat >"conftest.$ac_ext" <<_ACEOF
2813#line 2813 "configure"
2814#include "confdefs.h"
2815#include <assert.h>
2816                     Syntax error
2817_ACEOF
2818if { (eval echo "$as_me:2818: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2819  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2820  ac_status=$?
2821  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2822  rm -f conftest.er1
2823  cat conftest.err >&5
2824  echo "$as_me:2824: \$? = $ac_status" >&5
2825  (exit "$ac_status"); } >/dev/null; then
2826  if test -s conftest.err; then
2827    ac_cpp_err=$ac_c_preproc_warn_flag
2828  else
2829    ac_cpp_err=
2830  fi
2831else
2832  ac_cpp_err=yes
2833fi
2834if test -z "$ac_cpp_err"; then
2835  :
2836else
2837  echo "$as_me: failed program was:" >&5
2838  cat "conftest.$ac_ext" >&5
2839  # Broken: fails on valid input.
2840continue
2841fi
2842rm -f conftest.err "conftest.$ac_ext"
2843
2844  # OK, works on sane cases.  Now check whether non-existent headers
2845  # can be detected and how.
2846  cat >"conftest.$ac_ext" <<_ACEOF
2847#line 2847 "configure"
2848#include "confdefs.h"
2849#include <ac_nonexistent.h>
2850_ACEOF
2851if { (eval echo "$as_me:2851: \"$ac_cpp "conftest.$ac_ext"\"") >&5
2852  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
2853  ac_status=$?
2854  $EGREP -v '^ *\+' conftest.er1 >conftest.err
2855  rm -f conftest.er1
2856  cat conftest.err >&5
2857  echo "$as_me:2857: \$? = $ac_status" >&5
2858  (exit "$ac_status"); } >/dev/null; then
2859  if test -s conftest.err; then
2860    ac_cpp_err=$ac_c_preproc_warn_flag
2861  else
2862    ac_cpp_err=
2863  fi
2864else
2865  ac_cpp_err=yes
2866fi
2867if test -z "$ac_cpp_err"; then
2868  # Broken: success on invalid input.
2869continue
2870else
2871  echo "$as_me: failed program was:" >&5
2872  cat "conftest.$ac_ext" >&5
2873  # Passes both tests.
2874ac_preproc_ok=:
2875break
2876fi
2877rm -f conftest.err "conftest.$ac_ext"
2878
2879done
2880# Because of `break', _AC_PREPROC_IFELSE's cleaning code was skipped.
2881rm -f conftest.err "conftest.$ac_ext"
2882if $ac_preproc_ok; then
2883  :
2884else
2885  { { echo "$as_me:2885: error: C preprocessor \"$CPP\" fails sanity check" >&5
2886echo "$as_me: error: C preprocessor \"$CPP\" fails sanity check" >&2;}
2887   { (exit 1); exit 1; }; }
2888fi
2889
2890ac_ext=c
2891ac_cpp='$CPP $CPPFLAGS'
2892ac_compile='$CC -c $CFLAGS $CPPFLAGS "conftest.$ac_ext" >&5'
2893ac_link='$CC -o "conftest$ac_exeext" $CFLAGS $CPPFLAGS $LDFLAGS "conftest.$ac_ext" $LIBS >&5'
2894ac_compiler_gnu=$ac_cv_c_compiler_gnu
2895ac_main_return="return"
2896
2897echo "$as_me:2897: checking if preprocessor -C option works" >&5
2898echo $ECHO_N "checking if preprocessor -C option works... $ECHO_C" >&6
2899if test "${cf_cv_prog_cpp_comments+set}" = set; then
2900  echo $ECHO_N "(cached) $ECHO_C" >&6
2901else
2902
2903cf_cv_prog_cpp_comments=no
2904cat >conftest.c <<CF_EOF
2905int main(void)
2906{
2907	/* COMMENT */
2908	return 0;
2909}
2910CF_EOF
2911if ( $CPP -C conftest.c >conftest.i 2>/dev/null )
2912then
2913	if ( grep COMMENT conftest.i >/dev/null 2>/dev/null )
2914	then
2915		cf_cv_prog_cpp_comments=yes
2916	fi
2917fi
2918rm -f conftest.[ci]
2919
2920fi
2921
2922echo "$as_me:2922: result: $cf_cv_prog_cpp_comments" >&5
2923echo "${ECHO_T}$cf_cv_prog_cpp_comments" >&6
2924if test x$cf_cv_prog_cpp_comments = xyes
2925then
2926	CPP="$CPP -C"
2927fi
2928
2929echo "$as_me:2929: checking whether ln -s works" >&5
2930echo $ECHO_N "checking whether ln -s works... $ECHO_C" >&6
2931LN_S=$as_ln_s
2932if test "$LN_S" = "ln -s"; then
2933  echo "$as_me:2933: result: yes" >&5
2934echo "${ECHO_T}yes" >&6
2935else
2936  echo "$as_me:2936: result: no, using $LN_S" >&5
2937echo "${ECHO_T}no, using $LN_S" >&6
2938fi
2939
2940case "$host_os" in
2941(mingw*)
2942LN_S="cp -p"
2943echo "$as_me:2943: result: Override: No symbolic links in mingw." >&5
2944echo "${ECHO_T}Override: No symbolic links in mingw." >&6
2945	;;
2946(*)
2947	;;
2948esac
2949echo "$as_me:2949: checking whether ${MAKE-make} sets \${MAKE}" >&5
2950echo $ECHO_N "checking whether ${MAKE-make} sets \${MAKE}... $ECHO_C" >&6
2951set dummy ${MAKE-make}; ac_make=`echo "$2" | sed 'y,./+-,__p_,'`
2952if eval "test \"\${ac_cv_prog_make_${ac_make}_set+set}\" = set"; then
2953  echo $ECHO_N "(cached) $ECHO_C" >&6
2954else
2955  cat >conftest.make <<\EOF
2956all:
2957	@echo 'ac_maketemp="${MAKE}"'
2958EOF
2959# GNU make sometimes prints "make[1]: Entering...", which would confuse us.
2960eval `${MAKE-make} -f conftest.make 2>/dev/null | grep temp=`
2961if test -n "$ac_maketemp"; then
2962  eval ac_cv_prog_make_${ac_make}_set=yes
2963else
2964  eval ac_cv_prog_make_${ac_make}_set=no
2965fi
2966rm -f conftest.make
2967fi
2968if eval "test \"`echo '$ac_cv_prog_make_'${ac_make}_set`\" = yes"; then
2969  echo "$as_me:2969: result: yes" >&5
2970echo "${ECHO_T}yes" >&6
2971  SET_MAKE=
2972else
2973  echo "$as_me:2973: result: no" >&5
2974echo "${ECHO_T}no" >&6
2975  SET_MAKE="MAKE=${MAKE-make}"
2976fi
2977
2978# Find a good install program.  We prefer a C program (faster),
2979# so one script is as good as another.  But avoid the broken or
2980# incompatible versions:
2981# SysV /etc/install, /usr/sbin/install
2982# SunOS /usr/etc/install
2983# IRIX /sbin/install
2984# AIX /bin/install
2985# AmigaOS /C/install, which installs bootblocks on floppy discs
2986# AIX 4 /usr/bin/installbsd, which doesn't work without a -g flag
2987# AFS /usr/afsws/bin/install, which mishandles nonexistent args
2988# SVR4 /usr/ucb/install, which tries to use the nonexistent group "staff"
2989# ./install, which can be erroneously created by make from ./install.sh.
2990echo "$as_me:2990: checking for a BSD compatible install" >&5
2991echo $ECHO_N "checking for a BSD compatible install... $ECHO_C" >&6
2992if test -z "$INSTALL"; then
2993if test "${ac_cv_path_install+set}" = set; then
2994  echo $ECHO_N "(cached) $ECHO_C" >&6
2995else
2996    ac_save_IFS=$IFS; IFS=$ac_path_separator
2997  for ac_dir in $PATH; do
2998    IFS=$ac_save_IFS
2999    # Account for people who put trailing slashes in PATH elements.
3000    case $ac_dir/ in
3001    / | ./ | .// | /cC/* \
3002    | /etc/* | /usr/sbin/* | /usr/etc/* | /sbin/* | /usr/afsws/bin/* \
3003    | /usr/ucb/* ) ;;
3004    *)
3005      # OSF1 and SCO ODT 3.0 have their own names for install.
3006      # Don't use installbsd from OSF since it installs stuff as root
3007      # by default.
3008      for ac_prog in ginstall scoinst install; do
3009        if $as_executable_p "$ac_dir/$ac_prog"; then
3010	  if test $ac_prog = install &&
3011            grep dspmsg "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3012	    # AIX install.  It has an incompatible calling convention.
3013	    :
3014	  elif test $ac_prog = install &&
3015	    grep pwplus "$ac_dir/$ac_prog" >/dev/null 2>&1; then
3016	    # program-specific install script used by HP pwplus--don't use.
3017	    :
3018	  else
3019	    ac_cv_path_install="$ac_dir/$ac_prog -c"
3020	    break 2
3021	  fi
3022	fi
3023      done
3024      ;;
3025    esac
3026  done
3027
3028fi
3029  if test "${ac_cv_path_install+set}" = set; then
3030    INSTALL=$ac_cv_path_install
3031  else
3032    # As a last resort, use the slow shell script.  We don't cache a
3033    # path for INSTALL within a source directory, because that will
3034    # break other packages using the cache if that directory is
3035    # removed, or if the path is relative.
3036    INSTALL=$ac_install_sh
3037  fi
3038fi
3039echo "$as_me:3039: result: $INSTALL" >&5
3040echo "${ECHO_T}$INSTALL" >&6
3041
3042# Use test -z because SunOS4 sh mishandles braces in ${var-val}.
3043# It thinks the first close brace ends the variable substitution.
3044test -z "$INSTALL_PROGRAM" && INSTALL_PROGRAM='${INSTALL}'
3045
3046test -z "$INSTALL_SCRIPT" && INSTALL_SCRIPT='${INSTALL}'
3047
3048test -z "$INSTALL_DATA" && INSTALL_DATA='${INSTALL} -m 644'
3049
3050for ac_prog in byacc 'bison -y'
3051do
3052  # Extract the first word of "$ac_prog", so it can be a program name with args.
3053set dummy $ac_prog; ac_word=$2
3054echo "$as_me:3054: checking for $ac_word" >&5
3055echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3056if test "${ac_cv_prog_YACC+set}" = set; then
3057  echo $ECHO_N "(cached) $ECHO_C" >&6
3058else
3059  if test -n "$YACC"; then
3060  ac_cv_prog_YACC="$YACC" # Let the user override the test.
3061else
3062  ac_save_IFS=$IFS; IFS=$ac_path_separator
3063ac_dummy="$PATH"
3064for ac_dir in $ac_dummy; do
3065  IFS=$ac_save_IFS
3066  test -z "$ac_dir" && ac_dir=.
3067  $as_executable_p "$ac_dir/$ac_word" || continue
3068ac_cv_prog_YACC="$ac_prog"
3069echo "$as_me:3069: found $ac_dir/$ac_word" >&5
3070break
3071done
3072
3073fi
3074fi
3075YACC=$ac_cv_prog_YACC
3076if test -n "$YACC"; then
3077  echo "$as_me:3077: result: $YACC" >&5
3078echo "${ECHO_T}$YACC" >&6
3079else
3080  echo "$as_me:3080: result: no" >&5
3081echo "${ECHO_T}no" >&6
3082fi
3083
3084  test -n "$YACC" && break
3085done
3086test -n "$YACC" || YACC="yacc"
3087
3088echo "$as_me:3088: checking for egrep" >&5
3089echo $ECHO_N "checking for egrep... $ECHO_C" >&6
3090if test "${ac_cv_path_EGREP+set}" = set; then
3091  echo $ECHO_N "(cached) $ECHO_C" >&6
3092else
3093  if echo a | $GREP -E '(a|b)' >/dev/null 2>&1
3094   then ac_cv_path_EGREP="$GREP -E"
3095   else
3096     for ac_prog in gegrep egrep
3097do
3098  # Extract the first word of "$ac_prog", so it can be a program name with args.
3099set dummy $ac_prog; ac_word=$2
3100echo "$as_me:3100: checking for $ac_word" >&5
3101echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3102if test "${ac_cv_path_EGREP+set}" = set; then
3103  echo $ECHO_N "(cached) $ECHO_C" >&6
3104else
3105  case $EGREP in
3106  [\\/]* | ?:[\\/]*)
3107  ac_cv_path_EGREP="$EGREP" # Let the user override the test with a path.
3108  ;;
3109  *)
3110  ac_save_IFS=$IFS; IFS=$ac_path_separator
3111ac_dummy="$PATH"
3112for ac_dir in $ac_dummy; do
3113  IFS=$ac_save_IFS
3114  test -z "$ac_dir" && ac_dir=.
3115  if $as_executable_p "$ac_dir/$ac_word"; then
3116   ac_cv_path_EGREP="$ac_dir/$ac_word"
3117   echo "$as_me:3117: found $ac_dir/$ac_word" >&5
3118   break
3119fi
3120done
3121
3122  ;;
3123esac
3124fi
3125EGREP=$ac_cv_path_EGREP
3126
3127if test -n "$EGREP"; then
3128  echo "$as_me:3128: result: $EGREP" >&5
3129echo "${ECHO_T}$EGREP" >&6
3130else
3131  echo "$as_me:3131: result: no" >&5
3132echo "${ECHO_T}no" >&6
3133fi
3134
3135  test -n "$EGREP" && break
3136done
3137test -n "$EGREP" || EGREP=": "
3138
3139     test "x$ac_cv_path_EGREP" = "x:" && { { echo "$as_me:3139: error: cannot find workable egrep" >&5
3140echo "$as_me: error: cannot find workable egrep" >&2;}
3141   { (exit 1); exit 1; }; }
3142   fi
3143fi
3144echo "$as_me:3144: result: $ac_cv_path_EGREP" >&5
3145echo "${ECHO_T}$ac_cv_path_EGREP" >&6
3146 EGREP="$ac_cv_path_EGREP"
3147
3148for ac_prog in lint cppcheck splint
3149do
3150  # Extract the first word of "$ac_prog", so it can be a program name with args.
3151set dummy $ac_prog; ac_word=$2
3152echo "$as_me:3152: checking for $ac_word" >&5
3153echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3154if test "${ac_cv_prog_LINT+set}" = set; then
3155  echo $ECHO_N "(cached) $ECHO_C" >&6
3156else
3157  if test -n "$LINT"; then
3158  ac_cv_prog_LINT="$LINT" # Let the user override the test.
3159else
3160  ac_save_IFS=$IFS; IFS=$ac_path_separator
3161ac_dummy="$PATH"
3162for ac_dir in $ac_dummy; do
3163  IFS=$ac_save_IFS
3164  test -z "$ac_dir" && ac_dir=.
3165  $as_executable_p "$ac_dir/$ac_word" || continue
3166ac_cv_prog_LINT="$ac_prog"
3167echo "$as_me:3167: found $ac_dir/$ac_word" >&5
3168break
3169done
3170
3171fi
3172fi
3173LINT=$ac_cv_prog_LINT
3174if test -n "$LINT"; then
3175  echo "$as_me:3175: result: $LINT" >&5
3176echo "${ECHO_T}$LINT" >&6
3177else
3178  echo "$as_me:3178: result: no" >&5
3179echo "${ECHO_T}no" >&6
3180fi
3181
3182  test -n "$LINT" && break
3183done
3184
3185case "x$LINT" in
3186(xcppcheck|x*/cppcheck)
3187	test -z "$LINT_OPTS" && LINT_OPTS="--enable=all"
3188	;;
3189esac
3190
3191echo "$as_me:3191: checking for fgrep" >&5
3192echo $ECHO_N "checking for fgrep... $ECHO_C" >&6
3193if test "${ac_cv_path_FGREP+set}" = set; then
3194  echo $ECHO_N "(cached) $ECHO_C" >&6
3195else
3196  if echo 'ab*c' | $GREP -F 'ab*c' >/dev/null 2>&1
3197   then ac_cv_path_FGREP="$GREP -F"
3198   else
3199     for ac_prog in gfgrep fgrep
3200do
3201  # Extract the first word of "$ac_prog", so it can be a program name with args.
3202set dummy $ac_prog; ac_word=$2
3203echo "$as_me:3203: checking for $ac_word" >&5
3204echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3205if test "${ac_cv_path_FGREP+set}" = set; then
3206  echo $ECHO_N "(cached) $ECHO_C" >&6
3207else
3208  case $FGREP in
3209  [\\/]* | ?:[\\/]*)
3210  ac_cv_path_FGREP="$FGREP" # Let the user override the test with a path.
3211  ;;
3212  *)
3213  ac_save_IFS=$IFS; IFS=$ac_path_separator
3214ac_dummy="$PATH"
3215for ac_dir in $ac_dummy; do
3216  IFS=$ac_save_IFS
3217  test -z "$ac_dir" && ac_dir=.
3218  if $as_executable_p "$ac_dir/$ac_word"; then
3219   ac_cv_path_FGREP="$ac_dir/$ac_word"
3220   echo "$as_me:3220: found $ac_dir/$ac_word" >&5
3221   break
3222fi
3223done
3224
3225  ;;
3226esac
3227fi
3228FGREP=$ac_cv_path_FGREP
3229
3230if test -n "$FGREP"; then
3231  echo "$as_me:3231: result: $FGREP" >&5
3232echo "${ECHO_T}$FGREP" >&6
3233else
3234  echo "$as_me:3234: result: no" >&5
3235echo "${ECHO_T}no" >&6
3236fi
3237
3238  test -n "$FGREP" && break
3239done
3240test -n "$FGREP" || FGREP=": "
3241
3242     test "x$ac_cv_path_FGREP" = "x:" && { { echo "$as_me:3242: error: cannot find workable fgrep" >&5
3243echo "$as_me: error: cannot find workable fgrep" >&2;}
3244   { (exit 1); exit 1; }; }
3245   fi
3246fi
3247echo "$as_me:3247: result: $ac_cv_path_FGREP" >&5
3248echo "${ECHO_T}$ac_cv_path_FGREP" >&6
3249 FGREP="$ac_cv_path_FGREP"
3250
3251echo "$as_me:3251: checking for makeflags variable" >&5
3252echo $ECHO_N "checking for makeflags variable... $ECHO_C" >&6
3253if test "${cf_cv_makeflags+set}" = set; then
3254  echo $ECHO_N "(cached) $ECHO_C" >&6
3255else
3256
3257	cf_cv_makeflags=''
3258	for cf_option in '-${MAKEFLAGS}' '${MFLAGS}'
3259	do
3260		cat >cf_makeflags.tmp <<CF_EOF
3261SHELL = $SHELL
3262all :
3263	@ echo '.$cf_option'
3264CF_EOF
3265		cf_result=`${MAKE:-make} -k -f cf_makeflags.tmp 2>/dev/null | ${FGREP-fgrep} -v "ing directory" | sed -e 's,[ 	]*$,,'`
3266		case "$cf_result" in
3267		(.*k|.*kw)
3268			cf_result="`${MAKE:-make} -k -f cf_makeflags.tmp CC=cc 2>/dev/null`"
3269			case "$cf_result" in
3270			(.*CC=*)	cf_cv_makeflags=
3271				;;
3272			(*)	cf_cv_makeflags=$cf_option
3273				;;
3274			esac
3275			break
3276			;;
3277		(.-)
3278			;;
3279		(*)
3280
3281echo "${as_me:-configure}:3281: testing given option \"$cf_option\",no match \"$cf_result\" ..." 1>&5
3282
3283			;;
3284		esac
3285	done
3286	rm -f cf_makeflags.tmp
3287
3288fi
3289echo "$as_me:3289: result: $cf_cv_makeflags" >&5
3290echo "${ECHO_T}$cf_cv_makeflags" >&6
3291
3292echo "$as_me:3292: checking for \".PHONY\" make-support" >&5
3293echo $ECHO_N "checking for \".PHONY\" make-support... $ECHO_C" >&6
3294if test "${cf_cv_make_PHONY+set}" = set; then
3295  echo $ECHO_N "(cached) $ECHO_C" >&6
3296else
3297
3298	rm -rf conftest*
3299	(
3300		mkdir conftest || exit 1
3301		cd conftest
3302		cat >makefile <<'CF_EOF'
3303.PHONY: always
3304DATA=0
3305always:	always.out
3306	@echo "** making $@ $(DATA)"
3307once: once.out
3308	@echo "** making $@ $(DATA)"
3309always.out:
3310	@echo "** making $@ $(DATA)"
3311	echo $(DATA) > $@
3312once.out:
3313	@echo "** making $@ $(DATA)"
3314	echo $(DATA) > $@
3315CF_EOF
3316		for cf_data in 1 2 3
3317		do
3318			${MAKE:-make} always DATA=$cf_data
3319			${MAKE:-make} once   DATA=$cf_data
3320			${MAKE:-make} -t always once
3321			if test -f always ; then
3322				echo "no (case 1)" > ../conftest.tmp
3323			elif test ! -f always.out ; then
3324				echo "no (case 2)" > ../conftest.tmp
3325			elif test ! -f once.out ; then
3326				echo "no (case 3)" > ../conftest.tmp
3327			elif ! cmp -s always.out once.out ; then
3328				echo "no (case 4)" > ../conftest.tmp
3329				diff always.out once.out
3330			else
3331				cf_check="`cat always.out`"
3332				if test "x$cf_check" != "x$cf_data" ; then
3333					echo "no (case 5)" > ../conftest.tmp
3334				else
3335					echo yes > ../conftest.tmp
3336					rm -f ./*.out
3337					continue
3338				fi
3339			fi
3340			break
3341		done
3342	) >&5 2>&1
3343	cf_cv_make_PHONY="`cat conftest.tmp`"
3344	rm -rf conftest*
3345
3346fi
3347echo "$as_me:3347: result: $cf_cv_make_PHONY" >&5
3348echo "${ECHO_T}$cf_cv_make_PHONY" >&6
3349MAKE_NO_PHONY="#"
3350MAKE_PHONY="#"
3351test "x$cf_cv_make_PHONY" = xyes && MAKE_PHONY=
3352test "x$cf_cv_make_PHONY" != xyes && MAKE_NO_PHONY=
3353
3354echo "$as_me:3354: checking if filesystem supports mixed-case filenames" >&5
3355echo $ECHO_N "checking if filesystem supports mixed-case filenames... $ECHO_C" >&6
3356if test "${cf_cv_mixedcase+set}" = set; then
3357  echo $ECHO_N "(cached) $ECHO_C" >&6
3358else
3359
3360if test "$cross_compiling" = yes ; then
3361	case "$target_alias" in
3362	(*-os2-emx*|*-msdosdjgpp*|*-cygwin*|*-msys*|*-mingw*|*-uwin*|darwin*)
3363		cf_cv_mixedcase=no
3364		;;
3365	(*)
3366		cf_cv_mixedcase=yes
3367		;;
3368	esac
3369else
3370	rm -f conftest CONFTEST
3371	echo test >conftest
3372	if test -f CONFTEST ; then
3373		cf_cv_mixedcase=no
3374	else
3375		cf_cv_mixedcase=yes
3376	fi
3377	rm -f conftest CONFTEST
3378fi
3379
3380fi
3381echo "$as_me:3381: result: $cf_cv_mixedcase" >&5
3382echo "${ECHO_T}$cf_cv_mixedcase" >&6
3383test "$cf_cv_mixedcase" = yes &&
3384cat >>confdefs.h <<\EOF
3385#define MIXEDCASE_FILENAMES 1
3386EOF
3387
3388for ac_prog in exctags ctags
3389do
3390  # Extract the first word of "$ac_prog", so it can be a program name with args.
3391set dummy $ac_prog; ac_word=$2
3392echo "$as_me:3392: checking for $ac_word" >&5
3393echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3394if test "${ac_cv_prog_CTAGS+set}" = set; then
3395  echo $ECHO_N "(cached) $ECHO_C" >&6
3396else
3397  if test -n "$CTAGS"; then
3398  ac_cv_prog_CTAGS="$CTAGS" # Let the user override the test.
3399else
3400  ac_save_IFS=$IFS; IFS=$ac_path_separator
3401ac_dummy="$PATH"
3402for ac_dir in $ac_dummy; do
3403  IFS=$ac_save_IFS
3404  test -z "$ac_dir" && ac_dir=.
3405  $as_executable_p "$ac_dir/$ac_word" || continue
3406ac_cv_prog_CTAGS="$ac_prog"
3407echo "$as_me:3407: found $ac_dir/$ac_word" >&5
3408break
3409done
3410
3411fi
3412fi
3413CTAGS=$ac_cv_prog_CTAGS
3414if test -n "$CTAGS"; then
3415  echo "$as_me:3415: result: $CTAGS" >&5
3416echo "${ECHO_T}$CTAGS" >&6
3417else
3418  echo "$as_me:3418: result: no" >&5
3419echo "${ECHO_T}no" >&6
3420fi
3421
3422  test -n "$CTAGS" && break
3423done
3424
3425for ac_prog in exetags etags
3426do
3427  # Extract the first word of "$ac_prog", so it can be a program name with args.
3428set dummy $ac_prog; ac_word=$2
3429echo "$as_me:3429: checking for $ac_word" >&5
3430echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3431if test "${ac_cv_prog_ETAGS+set}" = set; then
3432  echo $ECHO_N "(cached) $ECHO_C" >&6
3433else
3434  if test -n "$ETAGS"; then
3435  ac_cv_prog_ETAGS="$ETAGS" # Let the user override the test.
3436else
3437  ac_save_IFS=$IFS; IFS=$ac_path_separator
3438ac_dummy="$PATH"
3439for ac_dir in $ac_dummy; do
3440  IFS=$ac_save_IFS
3441  test -z "$ac_dir" && ac_dir=.
3442  $as_executable_p "$ac_dir/$ac_word" || continue
3443ac_cv_prog_ETAGS="$ac_prog"
3444echo "$as_me:3444: found $ac_dir/$ac_word" >&5
3445break
3446done
3447
3448fi
3449fi
3450ETAGS=$ac_cv_prog_ETAGS
3451if test -n "$ETAGS"; then
3452  echo "$as_me:3452: result: $ETAGS" >&5
3453echo "${ECHO_T}$ETAGS" >&6
3454else
3455  echo "$as_me:3455: result: no" >&5
3456echo "${ECHO_T}no" >&6
3457fi
3458
3459  test -n "$ETAGS" && break
3460done
3461
3462# Extract the first word of "${CTAGS:-ctags}", so it can be a program name with args.
3463set dummy ${CTAGS:-ctags}; ac_word=$2
3464echo "$as_me:3464: checking for $ac_word" >&5
3465echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3466if test "${ac_cv_prog_MAKE_LOWER_TAGS+set}" = set; then
3467  echo $ECHO_N "(cached) $ECHO_C" >&6
3468else
3469  if test -n "$MAKE_LOWER_TAGS"; then
3470  ac_cv_prog_MAKE_LOWER_TAGS="$MAKE_LOWER_TAGS" # Let the user override the test.
3471else
3472  ac_save_IFS=$IFS; IFS=$ac_path_separator
3473ac_dummy="$PATH"
3474for ac_dir in $ac_dummy; do
3475  IFS=$ac_save_IFS
3476  test -z "$ac_dir" && ac_dir=.
3477  $as_executable_p "$ac_dir/$ac_word" || continue
3478ac_cv_prog_MAKE_LOWER_TAGS="yes"
3479echo "$as_me:3479: found $ac_dir/$ac_word" >&5
3480break
3481done
3482
3483  test -z "$ac_cv_prog_MAKE_LOWER_TAGS" && ac_cv_prog_MAKE_LOWER_TAGS="no"
3484fi
3485fi
3486MAKE_LOWER_TAGS=$ac_cv_prog_MAKE_LOWER_TAGS
3487if test -n "$MAKE_LOWER_TAGS"; then
3488  echo "$as_me:3488: result: $MAKE_LOWER_TAGS" >&5
3489echo "${ECHO_T}$MAKE_LOWER_TAGS" >&6
3490else
3491  echo "$as_me:3491: result: no" >&5
3492echo "${ECHO_T}no" >&6
3493fi
3494
3495if test "$cf_cv_mixedcase" = yes ; then
3496	# Extract the first word of "${ETAGS:-etags}", so it can be a program name with args.
3497set dummy ${ETAGS:-etags}; ac_word=$2
3498echo "$as_me:3498: checking for $ac_word" >&5
3499echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3500if test "${ac_cv_prog_MAKE_UPPER_TAGS+set}" = set; then
3501  echo $ECHO_N "(cached) $ECHO_C" >&6
3502else
3503  if test -n "$MAKE_UPPER_TAGS"; then
3504  ac_cv_prog_MAKE_UPPER_TAGS="$MAKE_UPPER_TAGS" # Let the user override the test.
3505else
3506  ac_save_IFS=$IFS; IFS=$ac_path_separator
3507ac_dummy="$PATH"
3508for ac_dir in $ac_dummy; do
3509  IFS=$ac_save_IFS
3510  test -z "$ac_dir" && ac_dir=.
3511  $as_executable_p "$ac_dir/$ac_word" || continue
3512ac_cv_prog_MAKE_UPPER_TAGS="yes"
3513echo "$as_me:3513: found $ac_dir/$ac_word" >&5
3514break
3515done
3516
3517  test -z "$ac_cv_prog_MAKE_UPPER_TAGS" && ac_cv_prog_MAKE_UPPER_TAGS="no"
3518fi
3519fi
3520MAKE_UPPER_TAGS=$ac_cv_prog_MAKE_UPPER_TAGS
3521if test -n "$MAKE_UPPER_TAGS"; then
3522  echo "$as_me:3522: result: $MAKE_UPPER_TAGS" >&5
3523echo "${ECHO_T}$MAKE_UPPER_TAGS" >&6
3524else
3525  echo "$as_me:3525: result: no" >&5
3526echo "${ECHO_T}no" >&6
3527fi
3528
3529else
3530	MAKE_UPPER_TAGS=no
3531fi
3532
3533if test "$MAKE_UPPER_TAGS" = yes ; then
3534	MAKE_UPPER_TAGS=
3535else
3536	MAKE_UPPER_TAGS="#"
3537fi
3538
3539if test "$MAKE_LOWER_TAGS" = yes ; then
3540	MAKE_LOWER_TAGS=
3541else
3542	MAKE_LOWER_TAGS="#"
3543fi
3544
3545if test -n "$ac_tool_prefix"; then
3546  # Extract the first word of "${ac_tool_prefix}windres", so it can be a program name with args.
3547set dummy ${ac_tool_prefix}windres; ac_word=$2
3548echo "$as_me:3548: checking for $ac_word" >&5
3549echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3550if test "${ac_cv_path_WINDRES+set}" = set; then
3551  echo $ECHO_N "(cached) $ECHO_C" >&6
3552else
3553  case $WINDRES in
3554  [\\/]* | ?:[\\/]*)
3555  ac_cv_path_WINDRES="$WINDRES" # Let the user override the test with a path.
3556  ;;
3557  *)
3558  ac_save_IFS=$IFS; IFS=$ac_path_separator
3559ac_dummy="$PATH"
3560for ac_dir in $ac_dummy; do
3561  IFS=$ac_save_IFS
3562  test -z "$ac_dir" && ac_dir=.
3563  if $as_executable_p "$ac_dir/$ac_word"; then
3564   ac_cv_path_WINDRES="$ac_dir/$ac_word"
3565   echo "$as_me:3565: found $ac_dir/$ac_word" >&5
3566   break
3567fi
3568done
3569
3570  ;;
3571esac
3572fi
3573WINDRES=$ac_cv_path_WINDRES
3574
3575if test -n "$WINDRES"; then
3576  echo "$as_me:3576: result: $WINDRES" >&5
3577echo "${ECHO_T}$WINDRES" >&6
3578else
3579  echo "$as_me:3579: result: no" >&5
3580echo "${ECHO_T}no" >&6
3581fi
3582
3583fi
3584if test -z "$ac_cv_path_WINDRES"; then
3585  ac_pt_WINDRES=$WINDRES
3586  # Extract the first word of "windres", so it can be a program name with args.
3587set dummy windres; ac_word=$2
3588echo "$as_me:3588: checking for $ac_word" >&5
3589echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3590if test "${ac_cv_path_ac_pt_WINDRES+set}" = set; then
3591  echo $ECHO_N "(cached) $ECHO_C" >&6
3592else
3593  case $ac_pt_WINDRES in
3594  [\\/]* | ?:[\\/]*)
3595  ac_cv_path_ac_pt_WINDRES="$ac_pt_WINDRES" # Let the user override the test with a path.
3596  ;;
3597  *)
3598  ac_save_IFS=$IFS; IFS=$ac_path_separator
3599ac_dummy="$PATH"
3600for ac_dir in $ac_dummy; do
3601  IFS=$ac_save_IFS
3602  test -z "$ac_dir" && ac_dir=.
3603  if $as_executable_p "$ac_dir/$ac_word"; then
3604   ac_cv_path_ac_pt_WINDRES="$ac_dir/$ac_word"
3605   echo "$as_me:3605: found $ac_dir/$ac_word" >&5
3606   break
3607fi
3608done
3609
3610  test -z "$ac_cv_path_ac_pt_WINDRES" && ac_cv_path_ac_pt_WINDRES="none"
3611  ;;
3612esac
3613fi
3614ac_pt_WINDRES=$ac_cv_path_ac_pt_WINDRES
3615
3616if test -n "$ac_pt_WINDRES"; then
3617  echo "$as_me:3617: result: $ac_pt_WINDRES" >&5
3618echo "${ECHO_T}$ac_pt_WINDRES" >&6
3619else
3620  echo "$as_me:3620: result: no" >&5
3621echo "${ECHO_T}no" >&6
3622fi
3623
3624  WINDRES=$ac_pt_WINDRES
3625else
3626  WINDRES="$ac_cv_path_WINDRES"
3627fi
3628
3629if test "$cross_compiling" = yes ; then
3630
3631	# defaults that we might want to override
3632	: ${BUILD_CFLAGS:=''}
3633	: ${BUILD_CPPFLAGS:='#'}
3634	: ${BUILD_LDFLAGS:=''}
3635	: ${BUILD_LIBS:=''}
3636	: ${BUILD_EXEEXT:='$x'}
3637	: ${BUILD_OBJEXT:='o'}
3638
3639# Check whether --with-build-cc or --without-build-cc was given.
3640if test "${with_build_cc+set}" = set; then
3641  withval="$with_build_cc"
3642  BUILD_CC="$withval"
3643else
3644  for ac_prog in gcc clang c99 c89 cc cl
3645do
3646  # Extract the first word of "$ac_prog", so it can be a program name with args.
3647set dummy $ac_prog; ac_word=$2
3648echo "$as_me:3648: checking for $ac_word" >&5
3649echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3650if test "${ac_cv_prog_BUILD_CC+set}" = set; then
3651  echo $ECHO_N "(cached) $ECHO_C" >&6
3652else
3653  if test -n "$BUILD_CC"; then
3654  ac_cv_prog_BUILD_CC="$BUILD_CC" # Let the user override the test.
3655else
3656  ac_save_IFS=$IFS; IFS=$ac_path_separator
3657ac_dummy="$PATH"
3658for ac_dir in $ac_dummy; do
3659  IFS=$ac_save_IFS
3660  test -z "$ac_dir" && ac_dir=.
3661  $as_executable_p "$ac_dir/$ac_word" || continue
3662ac_cv_prog_BUILD_CC="$ac_prog"
3663echo "$as_me:3663: found $ac_dir/$ac_word" >&5
3664break
3665done
3666
3667fi
3668fi
3669BUILD_CC=$ac_cv_prog_BUILD_CC
3670if test -n "$BUILD_CC"; then
3671  echo "$as_me:3671: result: $BUILD_CC" >&5
3672echo "${ECHO_T}$BUILD_CC" >&6
3673else
3674  echo "$as_me:3674: result: no" >&5
3675echo "${ECHO_T}no" >&6
3676fi
3677
3678  test -n "$BUILD_CC" && break
3679done
3680test -n "$BUILD_CC" || BUILD_CC="none"
3681
3682fi;
3683	echo "$as_me:3683: checking for native build C compiler" >&5
3684echo $ECHO_N "checking for native build C compiler... $ECHO_C" >&6
3685	echo "$as_me:3685: result: $BUILD_CC" >&5
3686echo "${ECHO_T}$BUILD_CC" >&6
3687
3688	echo "$as_me:3688: checking for native build C preprocessor" >&5
3689echo $ECHO_N "checking for native build C preprocessor... $ECHO_C" >&6
3690
3691# Check whether --with-build-cpp or --without-build-cpp was given.
3692if test "${with_build_cpp+set}" = set; then
3693  withval="$with_build_cpp"
3694  BUILD_CPP="$withval"
3695else
3696  BUILD_CPP='${BUILD_CC} -E'
3697fi;
3698	echo "$as_me:3698: result: $BUILD_CPP" >&5
3699echo "${ECHO_T}$BUILD_CPP" >&6
3700
3701	echo "$as_me:3701: checking for native build C flags" >&5
3702echo $ECHO_N "checking for native build C flags... $ECHO_C" >&6
3703
3704# Check whether --with-build-cflags or --without-build-cflags was given.
3705if test "${with_build_cflags+set}" = set; then
3706  withval="$with_build_cflags"
3707  BUILD_CFLAGS="$withval"
3708fi;
3709	echo "$as_me:3709: result: $BUILD_CFLAGS" >&5
3710echo "${ECHO_T}$BUILD_CFLAGS" >&6
3711
3712	echo "$as_me:3712: checking for native build C preprocessor-flags" >&5
3713echo $ECHO_N "checking for native build C preprocessor-flags... $ECHO_C" >&6
3714
3715# Check whether --with-build-cppflags or --without-build-cppflags was given.
3716if test "${with_build_cppflags+set}" = set; then
3717  withval="$with_build_cppflags"
3718  BUILD_CPPFLAGS="$withval"
3719fi;
3720	echo "$as_me:3720: result: $BUILD_CPPFLAGS" >&5
3721echo "${ECHO_T}$BUILD_CPPFLAGS" >&6
3722
3723	echo "$as_me:3723: checking for native build linker-flags" >&5
3724echo $ECHO_N "checking for native build linker-flags... $ECHO_C" >&6
3725
3726# Check whether --with-build-ldflags or --without-build-ldflags was given.
3727if test "${with_build_ldflags+set}" = set; then
3728  withval="$with_build_ldflags"
3729  BUILD_LDFLAGS="$withval"
3730fi;
3731	echo "$as_me:3731: result: $BUILD_LDFLAGS" >&5
3732echo "${ECHO_T}$BUILD_LDFLAGS" >&6
3733
3734	echo "$as_me:3734: checking for native build linker-libraries" >&5
3735echo $ECHO_N "checking for native build linker-libraries... $ECHO_C" >&6
3736
3737# Check whether --with-build-libs or --without-build-libs was given.
3738if test "${with_build_libs+set}" = set; then
3739  withval="$with_build_libs"
3740  BUILD_LIBS="$withval"
3741fi;
3742	echo "$as_me:3742: result: $BUILD_LIBS" >&5
3743echo "${ECHO_T}$BUILD_LIBS" >&6
3744
3745	# this assumes we're on Unix.
3746	BUILD_EXEEXT=
3747	BUILD_OBJEXT=o
3748
3749	: ${BUILD_CC:='${CC}'}
3750
3751	if { test "$BUILD_CC" = "$CC" || test "$BUILD_CC" = '${CC}'; } ; then
3752		{ { echo "$as_me:3752: error: Cross-build requires two compilers.
3753Use --with-build-cc to specify the native compiler." >&5
3754echo "$as_me: error: Cross-build requires two compilers.
3755Use --with-build-cc to specify the native compiler." >&2;}
3756   { (exit 1); exit 1; }; }
3757	fi
3758
3759else
3760	: ${BUILD_CC:='${CC}'}
3761	: ${BUILD_CPP:='${CPP}'}
3762	: ${BUILD_CFLAGS:='${CFLAGS}'}
3763	: ${BUILD_CPPFLAGS:='${CPPFLAGS}'}
3764	: ${BUILD_LDFLAGS:='${LDFLAGS}'}
3765	: ${BUILD_LIBS:='${LIBS}'}
3766	: ${BUILD_EXEEXT:='$x'}
3767	: ${BUILD_OBJEXT:='o'}
3768fi
3769
3770if test -n "$ac_tool_prefix"; then
3771  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
3772set dummy ${ac_tool_prefix}ranlib; ac_word=$2
3773echo "$as_me:3773: checking for $ac_word" >&5
3774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3775if test "${ac_cv_prog_RANLIB+set}" = set; then
3776  echo $ECHO_N "(cached) $ECHO_C" >&6
3777else
3778  if test -n "$RANLIB"; then
3779  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
3780else
3781  ac_save_IFS=$IFS; IFS=$ac_path_separator
3782ac_dummy="$PATH"
3783for ac_dir in $ac_dummy; do
3784  IFS=$ac_save_IFS
3785  test -z "$ac_dir" && ac_dir=.
3786  $as_executable_p "$ac_dir/$ac_word" || continue
3787ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
3788echo "$as_me:3788: found $ac_dir/$ac_word" >&5
3789break
3790done
3791
3792fi
3793fi
3794RANLIB=$ac_cv_prog_RANLIB
3795if test -n "$RANLIB"; then
3796  echo "$as_me:3796: result: $RANLIB" >&5
3797echo "${ECHO_T}$RANLIB" >&6
3798else
3799  echo "$as_me:3799: result: no" >&5
3800echo "${ECHO_T}no" >&6
3801fi
3802
3803fi
3804if test -z "$ac_cv_prog_RANLIB"; then
3805  ac_ct_RANLIB=$RANLIB
3806  # Extract the first word of "ranlib", so it can be a program name with args.
3807set dummy ranlib; ac_word=$2
3808echo "$as_me:3808: checking for $ac_word" >&5
3809echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3810if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
3811  echo $ECHO_N "(cached) $ECHO_C" >&6
3812else
3813  if test -n "$ac_ct_RANLIB"; then
3814  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
3815else
3816  ac_save_IFS=$IFS; IFS=$ac_path_separator
3817ac_dummy="$PATH"
3818for ac_dir in $ac_dummy; do
3819  IFS=$ac_save_IFS
3820  test -z "$ac_dir" && ac_dir=.
3821  $as_executable_p "$ac_dir/$ac_word" || continue
3822ac_cv_prog_ac_ct_RANLIB="ranlib"
3823echo "$as_me:3823: found $ac_dir/$ac_word" >&5
3824break
3825done
3826
3827  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB="':'"
3828fi
3829fi
3830ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
3831if test -n "$ac_ct_RANLIB"; then
3832  echo "$as_me:3832: result: $ac_ct_RANLIB" >&5
3833echo "${ECHO_T}$ac_ct_RANLIB" >&6
3834else
3835  echo "$as_me:3835: result: no" >&5
3836echo "${ECHO_T}no" >&6
3837fi
3838
3839  RANLIB=$ac_ct_RANLIB
3840else
3841  RANLIB="$ac_cv_prog_RANLIB"
3842fi
3843
3844if test -n "$ac_tool_prefix"; then
3845  # Extract the first word of "${ac_tool_prefix}ar", so it can be a program name with args.
3846set dummy ${ac_tool_prefix}ar; ac_word=$2
3847echo "$as_me:3847: checking for $ac_word" >&5
3848echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3849if test "${ac_cv_prog_AR+set}" = set; then
3850  echo $ECHO_N "(cached) $ECHO_C" >&6
3851else
3852  if test -n "$AR"; then
3853  ac_cv_prog_AR="$AR" # Let the user override the test.
3854else
3855  ac_save_IFS=$IFS; IFS=$ac_path_separator
3856ac_dummy="$PATH"
3857for ac_dir in $ac_dummy; do
3858  IFS=$ac_save_IFS
3859  test -z "$ac_dir" && ac_dir=.
3860  $as_executable_p "$ac_dir/$ac_word" || continue
3861ac_cv_prog_AR="${ac_tool_prefix}ar"
3862echo "$as_me:3862: found $ac_dir/$ac_word" >&5
3863break
3864done
3865
3866fi
3867fi
3868AR=$ac_cv_prog_AR
3869if test -n "$AR"; then
3870  echo "$as_me:3870: result: $AR" >&5
3871echo "${ECHO_T}$AR" >&6
3872else
3873  echo "$as_me:3873: result: no" >&5
3874echo "${ECHO_T}no" >&6
3875fi
3876
3877fi
3878if test -z "$ac_cv_prog_AR"; then
3879  ac_ct_AR=$AR
3880  # Extract the first word of "ar", so it can be a program name with args.
3881set dummy ar; ac_word=$2
3882echo "$as_me:3882: checking for $ac_word" >&5
3883echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
3884if test "${ac_cv_prog_ac_ct_AR+set}" = set; then
3885  echo $ECHO_N "(cached) $ECHO_C" >&6
3886else
3887  if test -n "$ac_ct_AR"; then
3888  ac_cv_prog_ac_ct_AR="$ac_ct_AR" # Let the user override the test.
3889else
3890  ac_save_IFS=$IFS; IFS=$ac_path_separator
3891ac_dummy="$PATH"
3892for ac_dir in $ac_dummy; do
3893  IFS=$ac_save_IFS
3894  test -z "$ac_dir" && ac_dir=.
3895  $as_executable_p "$ac_dir/$ac_word" || continue
3896ac_cv_prog_ac_ct_AR="ar"
3897echo "$as_me:3897: found $ac_dir/$ac_word" >&5
3898break
3899done
3900
3901  test -z "$ac_cv_prog_ac_ct_AR" && ac_cv_prog_ac_ct_AR="ar"
3902fi
3903fi
3904ac_ct_AR=$ac_cv_prog_ac_ct_AR
3905if test -n "$ac_ct_AR"; then
3906  echo "$as_me:3906: result: $ac_ct_AR" >&5
3907echo "${ECHO_T}$ac_ct_AR" >&6
3908else
3909  echo "$as_me:3909: result: no" >&5
3910echo "${ECHO_T}no" >&6
3911fi
3912
3913  AR=$ac_ct_AR
3914else
3915  AR="$ac_cv_prog_AR"
3916fi
3917
3918echo "$as_me:3918: checking for options to update archives" >&5
3919echo $ECHO_N "checking for options to update archives... $ECHO_C" >&6
3920if test "${cf_cv_ar_flags+set}" = set; then
3921  echo $ECHO_N "(cached) $ECHO_C" >&6
3922else
3923
3924	case "$cf_cv_system_name" in
3925	(*-msvc*)
3926		cf_cv_ar_flags=''
3927		cat >mk_static_lib.sh <<-EOF
3928		#!$SHELL
3929		MSVC_BIN="$AR"
3930		out="\$1"
3931		shift
3932		exec \$MSVC_BIN -out:"\$out" \$@
3933		EOF
3934		chmod +x mk_static_lib.sh
3935		AR=`pwd`/mk_static_lib.sh
3936		;;
3937	(*)
3938		cf_cv_ar_flags=unknown
3939		for cf_ar_flags in -curvU -curv curv -crv crv -cqv cqv -rv rv
3940		do
3941
3942			# check if $ARFLAGS already contains this choice
3943			if test "x$ARFLAGS" != "x" ; then
3944				cf_check_ar_flags=`echo "x$ARFLAGS" | sed -e "s/$cf_ar_flags\$//" -e "s/$cf_ar_flags / /"`
3945				if test "x$ARFLAGS" != "$cf_check_ar_flags" ; then
3946					cf_cv_ar_flags=
3947					break
3948				fi
3949			fi
3950
3951			rm -f "conftest.$ac_cv_objext"
3952			rm -f conftest.a
3953
3954			cat >"conftest.$ac_ext" <<EOF
3955#line 3955 "configure"
3956int	testdata[3] = { 123, 456, 789 };
3957EOF
3958			if { (eval echo "$as_me:3958: \"$ac_compile\"") >&5
3959  (eval $ac_compile) 2>&5
3960  ac_status=$?
3961  echo "$as_me:3961: \$? = $ac_status" >&5
3962  (exit "$ac_status"); } ; then
3963				echo "$AR $ARFLAGS $cf_ar_flags conftest.a conftest.$ac_cv_objext" >&5
3964				$AR $ARFLAGS "$cf_ar_flags" conftest.a "conftest.$ac_cv_objext" 2>&5 1>/dev/null
3965				if test -f conftest.a ; then
3966					cf_cv_ar_flags="$cf_ar_flags"
3967					break
3968				fi
3969			else
3970				test -n "$verbose" && echo "	cannot compile test-program" 1>&6
3971
3972echo "${as_me:-configure}:3972: testing cannot compile test-program ..." 1>&5
3973
3974				break
3975			fi
3976		done
3977		rm -f conftest.a "conftest.$ac_ext" "conftest.$ac_cv_objext"
3978		;;
3979	esac
3980
3981fi
3982echo "$as_me:3982: result: $cf_cv_ar_flags" >&5
3983echo "${ECHO_T}$cf_cv_ar_flags" >&6
3984
3985if test -n "$ARFLAGS" ; then
3986	if test -n "$cf_cv_ar_flags" ; then
3987		ARFLAGS="$ARFLAGS $cf_cv_ar_flags"
3988	fi
3989else
3990	ARFLAGS=$cf_cv_ar_flags
3991fi
3992
3993echo "$as_me:3993: checking if you want to see long compiling messages" >&5
3994echo $ECHO_N "checking if you want to see long compiling messages... $ECHO_C" >&6
3995
3996# Check whether --enable-echo or --disable-echo was given.
3997if test "${enable_echo+set}" = set; then
3998  enableval="$enable_echo"
3999  test "$enableval" != no && enableval=yes
4000	if test "$enableval" != "yes" ; then
4001
4002	ECHO_LT='--silent'
4003	ECHO_LD='@echo linking $@;'
4004	RULE_CC='@echo compiling $<'
4005	SHOW_CC='@echo compiling $@'
4006	ECHO_CC='@'
4007
4008	else
4009
4010	ECHO_LT=''
4011	ECHO_LD=''
4012	RULE_CC=''
4013	SHOW_CC=''
4014	ECHO_CC=''
4015
4016	fi
4017else
4018  enableval=yes
4019
4020	ECHO_LT=''
4021	ECHO_LD=''
4022	RULE_CC=''
4023	SHOW_CC=''
4024	ECHO_CC=''
4025
4026fi;
4027echo "$as_me:4027: result: $enableval" >&5
4028echo "${ECHO_T}$enableval" >&6
4029
4030# special case for WWW/*
4031if test -n "$ECHO_CC" ; then
4032	DONT_ECHO_CC="$SHOW_CC ;"
4033else
4034	DONT_ECHO_CC=''
4035fi
4036
4037echo "$as_me:4037: checking if you want to check memory-leaks" >&5
4038echo $ECHO_N "checking if you want to check memory-leaks... $ECHO_C" >&6
4039
4040# Check whether --enable-find-leaks or --disable-find-leaks was given.
4041if test "${enable_find_leaks+set}" = set; then
4042  enableval="$enable_find_leaks"
4043  test "$enableval" != yes && enableval=no
4044	if test "$enableval" != "no" ; then
4045    with_leak_checks=yes
4046	else
4047		with_leak_checks=no
4048	fi
4049else
4050  enableval=no
4051	with_leak_checks=no
4052
4053fi;
4054echo "$as_me:4054: result: $with_leak_checks" >&5
4055echo "${ECHO_T}$with_leak_checks" >&6
4056test "$with_leak_checks" = "yes" &&
4057cat >>confdefs.h <<\EOF
4058#define LY_FIND_LEAKS 1
4059EOF
4060
4061# The comment about adding -g to $CFLAGS is unclear.  Autoconf tries to add
4062# a -g flag; we remove it if the user's $CFLAGS was not set and debugging is
4063# disabled.
4064echo "$as_me:4064: checking if you want to enable debug-code" >&5
4065echo $ECHO_N "checking if you want to enable debug-code... $ECHO_C" >&6
4066
4067# Check whether --enable-debug or --disable-debug was given.
4068if test "${enable_debug+set}" = set; then
4069  enableval="$enable_debug"
4070  test "$enableval" != yes && enableval=no
4071	if test "$enableval" != "no" ; then
4072    with_debug=yes
4073	else
4074		with_debug=no
4075	fi
4076else
4077  enableval=no
4078	with_debug=no
4079
4080fi;
4081echo "$as_me:4081: result: $with_debug" >&5
4082echo "${ECHO_T}$with_debug" >&6
4083if test "$with_debug" = "yes" ; then
4084	case "$host_os" in
4085	(ultrix*|osf*)
4086		test -z "$ORIGINAL_CFLAGS" &&
4087CFLAGS=`echo "${CFLAGS}" | sed -e 's%-O1-9\? %%' -e 's%-O1-9\?$%%' -e 's%[	]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
4088
4089		if test -z "$GCC" ; then
4090			CFLAGS="$CFLAGS -g3"
4091		fi
4092		;;
4093	esac
4094else
4095	case "$host_os" in
4096	(osf*)
4097		test -z "$GCC" && CFLAGS="$CFLAGS -std1"
4098		test -z "$ORIGINAL_CFLAGS" && CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[	]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
4099		;;
4100	(*)
4101		test -z "$ORIGINAL_CFLAGS" && CFLAGS=`echo "${CFLAGS}" | sed -e 's%-g %%' -e 's%-g$%%' -e 's%[	]% %g' -e 's% [ ]*% %g' -e 's%^ %%' -e 's% $%%'`
4102		;;
4103	esac
4104fi
4105
4106echo "$as_me:4106: checking if you want to enable lynx trace code *recommended* " >&5
4107echo $ECHO_N "checking if you want to enable lynx trace code *recommended* ... $ECHO_C" >&6
4108
4109# Check whether --enable-trace or --disable-trace was given.
4110if test "${enable_trace+set}" = set; then
4111  enableval="$enable_trace"
4112  test "$enableval" != no && enableval=yes
4113	if test "$enableval" != "yes" ; then
4114    with_trace=$enableval
4115	else
4116		with_trace=yes
4117	fi
4118else
4119  enableval=yes
4120	with_trace=yes
4121
4122fi;
4123echo "$as_me:4123: result: $with_trace" >&5
4124echo "${ECHO_T}$with_trace" >&6
4125test "$with_trace" = no &&
4126cat >>confdefs.h <<\EOF
4127#define NO_LYNX_TRACE 1
4128EOF
4129
4130echo "$as_me:4130: checking if you want verbose trace code" >&5
4131echo $ECHO_N "checking if you want verbose trace code... $ECHO_C" >&6
4132
4133# Check whether --enable-vertrace or --disable-vertrace was given.
4134if test "${enable_vertrace+set}" = set; then
4135  enableval="$enable_vertrace"
4136  test "$enableval" != yes && enableval=no
4137	if test "$enableval" != "no" ; then
4138    with_vertrace=yes
4139	else
4140		with_vertrace=no
4141	fi
4142else
4143  enableval=no
4144	with_vertrace=no
4145
4146fi;
4147echo "$as_me:4147: result: $with_vertrace" >&5
4148echo "${ECHO_T}$with_vertrace" >&6
4149test "$with_vertrace" = yes &&
4150cat >>confdefs.h <<\EOF
4151#define LY_TRACELINE __LINE__
4152EOF
4153
4154if test -n "$with_screen" && test "x$with_screen" = "xpdcurses"
4155then
4156	echo "$as_me:4156: checking for X" >&5
4157echo $ECHO_N "checking for X... $ECHO_C" >&6
4158
4159# Check whether --with-x or --without-x was given.
4160if test "${with_x+set}" = set; then
4161  withval="$with_x"
4162
4163fi;
4164# $have_x is `yes', `no', `disabled', or empty when we do not yet know.
4165if test "x$with_x" = xno; then
4166  # The user explicitly disabled X.
4167  have_x=disabled
4168else
4169  if test "x$x_includes" != xNONE && test "x$x_libraries" != xNONE; then
4170    # Both variables are already set.
4171    have_x=yes
4172  else
4173    if test "${ac_cv_have_x+set}" = set; then
4174  echo $ECHO_N "(cached) $ECHO_C" >&6
4175else
4176  # One or both of the vars are not set, and there is no cached value.
4177ac_x_includes=no ac_x_libraries=no
4178rm -fr conftest.dir
4179if mkdir conftest.dir; then
4180  cd conftest.dir
4181  # Make sure to not put "make" in the Imakefile rules, since we grep it out.
4182  cat >Imakefile <<'EOF'
4183acfindx:
4184	@echo 'ac_im_incroot="${INCROOT}"; ac_im_usrlibdir="${USRLIBDIR}"; ac_im_libdir="${LIBDIR}"'
4185EOF
4186  if (xmkmf) >/dev/null 2>/dev/null && test -f Makefile; then
4187    # GNU make sometimes prints "make[1]: Entering...", which would confuse us.
4188    eval "`${MAKE-make} acfindx 2>/dev/null | grep -v make`"
4189    # Open Windows xmkmf reportedly sets LIBDIR instead of USRLIBDIR.
4190    for ac_extension in a so sl dylib dll; do
4191      if test ! -f "$ac_im_usrlibdir/libX11.$ac_extension" &&
4192         test -f "$ac_im_libdir/libX11.$ac_extension"; then
4193        ac_im_usrlibdir=$ac_im_libdir; break
4194      fi
4195    done
4196    # Screen out bogus values from the imake configuration.  They are
4197    # bogus both because they are the default anyway, and because
4198    # using them would break gcc on systems where it needs fixed includes.
4199    case $ac_im_incroot in
4200	/usr/include) ;;
4201	*) test -f "$ac_im_incroot/X11/Xos.h" && ac_x_includes=$ac_im_incroot;;
4202    esac
4203    case $ac_im_usrlibdir in
4204	/usr/lib | /lib) ;;
4205	*) test -d "$ac_im_usrlibdir" && ac_x_libraries=$ac_im_usrlibdir ;;
4206    esac
4207  fi
4208  cd ..
4209  rm -fr conftest.dir
4210fi
4211
4212# Standard set of common directories for X headers.
4213# Check X11 before X11Rn because it is often a symlink to the current release.
4214ac_x_header_dirs='
4215/usr/X11/include
4216/usr/X11R7/include
4217/usr/X11R6/include
4218/usr/X11R5/include
4219/usr/X11R4/include
4220
4221/opt/local/include
4222/opt/X11/include
4223
4224/usr/include/X11
4225/usr/include/X11R7
4226/usr/include/X11R6
4227/usr/include/X11R5
4228/usr/include/X11R4
4229
4230/usr/local/X11/include
4231/usr/local/X11R7/include
4232/usr/local/X11R6/include
4233/usr/local/X11R5/include
4234/usr/local/X11R4/include
4235
4236/usr/local/include/X11
4237/usr/local/include/X11R7
4238/usr/local/include/X11R6
4239/usr/local/include/X11R5
4240/usr/local/include/X11R4
4241
4242/usr/X386/include
4243/usr/x386/include
4244/usr/XFree86/include/X11
4245
4246/usr/include
4247/usr/local/include
4248/usr/unsupported/include
4249/usr/athena/include
4250/usr/local/x11r5/include
4251/usr/lpp/Xamples/include
4252
4253/usr/openwin/include
4254/usr/openwin/share/include'
4255
4256if test "$ac_x_includes" = no; then
4257  # Guess where to find include files, by looking for Intrinsic.h.
4258  # First, try using that file with no special directory specified.
4259  cat >"conftest.$ac_ext" <<_ACEOF
4260#line 4260 "configure"
4261#include "confdefs.h"
4262#include <X11/Intrinsic.h>
4263_ACEOF
4264if { (eval echo "$as_me:4264: \"$ac_cpp "conftest.$ac_ext"\"") >&5
4265  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
4266  ac_status=$?
4267  $EGREP -v '^ *\+' conftest.er1 >conftest.err
4268  rm -f conftest.er1
4269  cat conftest.err >&5
4270  echo "$as_me:4270: \$? = $ac_status" >&5
4271  (exit "$ac_status"); } >/dev/null; then
4272  if test -s conftest.err; then
4273    ac_cpp_err=$ac_c_preproc_warn_flag
4274  else
4275    ac_cpp_err=
4276  fi
4277else
4278  ac_cpp_err=yes
4279fi
4280if test -z "$ac_cpp_err"; then
4281  # We can compile using X headers with no special include directory.
4282ac_x_includes=
4283else
4284  echo "$as_me: failed program was:" >&5
4285  cat "conftest.$ac_ext" >&5
4286  for ac_dir in $ac_x_header_dirs; do
4287  if test -r "$ac_dir/X11/Intrinsic.h"; then
4288    ac_x_includes=$ac_dir
4289    break
4290  fi
4291done
4292fi
4293rm -f conftest.err "conftest.$ac_ext"
4294fi # $ac_x_includes = no
4295
4296if test "$ac_x_libraries" = no; then
4297  # Check for the libraries.
4298  # See if we find them without any special options.
4299  # Don't add to $LIBS permanently.
4300  ac_save_LIBS=$LIBS
4301  LIBS="-lXt $LIBS"
4302  cat >"conftest.$ac_ext" <<_ACEOF
4303#line 4303 "configure"
4304#include "confdefs.h"
4305#include <X11/Intrinsic.h>
4306int
4307main (void)
4308{
4309XtMalloc (0)
4310  ;
4311  return 0;
4312}
4313_ACEOF
4314rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4315if { (eval echo "$as_me:4315: \"$ac_link\"") >&5
4316  (eval $ac_link) 2>&5
4317  ac_status=$?
4318  echo "$as_me:4318: \$? = $ac_status" >&5
4319  (exit "$ac_status"); } &&
4320         { ac_try='test -s "conftest$ac_exeext"'
4321  { (eval echo "$as_me:4321: \"$ac_try\"") >&5
4322  (eval $ac_try) 2>&5
4323  ac_status=$?
4324  echo "$as_me:4324: \$? = $ac_status" >&5
4325  (exit "$ac_status"); }; }; then
4326  LIBS=$ac_save_LIBS
4327# We can link X programs with no special library path.
4328ac_x_libraries=
4329else
4330  echo "$as_me: failed program was:" >&5
4331cat "conftest.$ac_ext" >&5
4332LIBS=$ac_save_LIBS
4333for ac_dir in `echo "$ac_x_includes $ac_x_header_dirs" | sed s/include/lib/g`
4334do
4335  # Don't even attempt the hair of trying to link an X program!
4336  for ac_extension in a so sl dylib dll; do
4337    if test -r "$ac_dir/libXt.$ac_extension"; then
4338      ac_x_libraries=$ac_dir
4339      break 2
4340    fi
4341  done
4342done
4343fi
4344rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4345fi # $ac_x_libraries = no
4346
4347if test "$ac_x_includes" = no || test "$ac_x_libraries" = no; then
4348  # Didn't find X anywhere.  Cache the known absence of X.
4349  ac_cv_have_x="have_x=no"
4350else
4351  # Record where we found X for the cache.
4352  ac_cv_have_x="have_x=yes \
4353	        ac_x_includes=$ac_x_includes ac_x_libraries=$ac_x_libraries"
4354fi
4355fi
4356
4357  fi
4358  eval "$ac_cv_have_x"
4359fi # $with_x != no
4360
4361if test "$have_x" != yes; then
4362  echo "$as_me:4362: result: $have_x" >&5
4363echo "${ECHO_T}$have_x" >&6
4364  no_x=yes
4365else
4366  # If each of the values was on the command line, it overrides each guess.
4367  test "x$x_includes" = xNONE && x_includes=$ac_x_includes
4368  test "x$x_libraries" = xNONE && x_libraries=$ac_x_libraries
4369  # Update the cache value to reflect the command line values.
4370  ac_cv_have_x="have_x=yes \
4371		ac_x_includes=$x_includes ac_x_libraries=$x_libraries"
4372  echo "$as_me:4372: result: libraries $x_libraries, headers $x_includes" >&5
4373echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6
4374fi
4375
4376	if test "$no_x" = yes; then
4377  # Not all programs may use this symbol, but it does not hurt to define it.
4378
4379cat >>confdefs.h <<\EOF
4380#define X_DISPLAY_MISSING 1
4381EOF
4382
4383  X_CFLAGS=
4384  X_PRE_LIBS=
4385  X_LIBS=
4386  X_EXTRA_LIBS=
4387else
4388  if test -n "$x_includes"; then
4389    X_CFLAGS="$X_CFLAGS -I$x_includes"
4390  fi
4391
4392  # It would also be nice to do this for all -L options, not just this one.
4393  if test -n "$x_libraries"; then
4394    X_LIBS="$X_LIBS -L$x_libraries"
4395    # For Solaris; some versions of Sun CC require a space after -R and
4396    # others require no space.  Words are not sufficient . . . .
4397    case `(uname -sr) 2>/dev/null` in
4398    "SunOS 5"*)
4399      echo "$as_me:4399: checking whether -R must be followed by a space" >&5
4400echo $ECHO_N "checking whether -R must be followed by a space... $ECHO_C" >&6
4401      ac_xsave_LIBS=$LIBS; LIBS="$LIBS -R$x_libraries"
4402      cat >"conftest.$ac_ext" <<_ACEOF
4403#line 4403 "configure"
4404#include "confdefs.h"
4405
4406int
4407main (void)
4408{
4409
4410  ;
4411  return 0;
4412}
4413_ACEOF
4414rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4415if { (eval echo "$as_me:4415: \"$ac_link\"") >&5
4416  (eval $ac_link) 2>&5
4417  ac_status=$?
4418  echo "$as_me:4418: \$? = $ac_status" >&5
4419  (exit "$ac_status"); } &&
4420         { ac_try='test -s "conftest$ac_exeext"'
4421  { (eval echo "$as_me:4421: \"$ac_try\"") >&5
4422  (eval $ac_try) 2>&5
4423  ac_status=$?
4424  echo "$as_me:4424: \$? = $ac_status" >&5
4425  (exit "$ac_status"); }; }; then
4426  ac_R_nospace=yes
4427else
4428  echo "$as_me: failed program was:" >&5
4429cat "conftest.$ac_ext" >&5
4430ac_R_nospace=no
4431fi
4432rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4433      if test $ac_R_nospace = yes; then
4434	echo "$as_me:4434: result: no" >&5
4435echo "${ECHO_T}no" >&6
4436	X_LIBS="$X_LIBS -R$x_libraries"
4437      else
4438	LIBS="$ac_xsave_LIBS -R $x_libraries"
4439	cat >"conftest.$ac_ext" <<_ACEOF
4440#line 4440 "configure"
4441#include "confdefs.h"
4442
4443int
4444main (void)
4445{
4446
4447  ;
4448  return 0;
4449}
4450_ACEOF
4451rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4452if { (eval echo "$as_me:4452: \"$ac_link\"") >&5
4453  (eval $ac_link) 2>&5
4454  ac_status=$?
4455  echo "$as_me:4455: \$? = $ac_status" >&5
4456  (exit "$ac_status"); } &&
4457         { ac_try='test -s "conftest$ac_exeext"'
4458  { (eval echo "$as_me:4458: \"$ac_try\"") >&5
4459  (eval $ac_try) 2>&5
4460  ac_status=$?
4461  echo "$as_me:4461: \$? = $ac_status" >&5
4462  (exit "$ac_status"); }; }; then
4463  ac_R_space=yes
4464else
4465  echo "$as_me: failed program was:" >&5
4466cat "conftest.$ac_ext" >&5
4467ac_R_space=no
4468fi
4469rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4470	if test $ac_R_space = yes; then
4471	  echo "$as_me:4471: result: yes" >&5
4472echo "${ECHO_T}yes" >&6
4473	  X_LIBS="$X_LIBS -R $x_libraries"
4474	else
4475	  echo "$as_me:4475: result: neither works" >&5
4476echo "${ECHO_T}neither works" >&6
4477	fi
4478      fi
4479      LIBS=$ac_xsave_LIBS
4480    esac
4481  fi
4482
4483  # Check for system-dependent libraries X programs must link with.
4484  # Do this before checking for the system-independent R6 libraries
4485  # (-lICE), since we may need -lsocket or whatever for X linking.
4486
4487  if test "$ISC" = yes; then
4488    X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl_s -linet"
4489  else
4490    # Martyn Johnson says this is needed for Ultrix, if the X
4491    # libraries were built with DECnet support.  And Karl Berry says
4492    # the Alpha needs dnet_stub (dnet does not exist).
4493    ac_xsave_LIBS="$LIBS"; LIBS="$LIBS $X_LIBS -lX11"
4494    cat >"conftest.$ac_ext" <<_ACEOF
4495#line 4495 "configure"
4496#include "confdefs.h"
4497
4498/* Override any gcc2 internal prototype to avoid an error.  */
4499#ifdef __cplusplus
4500extern "C"
4501#endif
4502/* We use char because int might match the return type of a gcc2
4503   builtin and then its argument prototype would still apply.  */
4504char XOpenDisplay ();
4505int
4506main (void)
4507{
4508XOpenDisplay ();
4509  ;
4510  return 0;
4511}
4512_ACEOF
4513rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4514if { (eval echo "$as_me:4514: \"$ac_link\"") >&5
4515  (eval $ac_link) 2>&5
4516  ac_status=$?
4517  echo "$as_me:4517: \$? = $ac_status" >&5
4518  (exit "$ac_status"); } &&
4519         { ac_try='test -s "conftest$ac_exeext"'
4520  { (eval echo "$as_me:4520: \"$ac_try\"") >&5
4521  (eval $ac_try) 2>&5
4522  ac_status=$?
4523  echo "$as_me:4523: \$? = $ac_status" >&5
4524  (exit "$ac_status"); }; }; then
4525  :
4526else
4527  echo "$as_me: failed program was:" >&5
4528cat "conftest.$ac_ext" >&5
4529echo "$as_me:4529: checking for dnet_ntoa in -ldnet" >&5
4530echo $ECHO_N "checking for dnet_ntoa in -ldnet... $ECHO_C" >&6
4531if test "${ac_cv_lib_dnet_dnet_ntoa+set}" = set; then
4532  echo $ECHO_N "(cached) $ECHO_C" >&6
4533else
4534  ac_check_lib_save_LIBS=$LIBS
4535LIBS="-ldnet  $LIBS"
4536cat >"conftest.$ac_ext" <<_ACEOF
4537#line 4537 "configure"
4538#include "confdefs.h"
4539
4540/* Override any gcc2 internal prototype to avoid an error.  */
4541#ifdef __cplusplus
4542extern "C"
4543#endif
4544/* We use char because int might match the return type of a gcc2
4545   builtin and then its argument prototype would still apply.  */
4546char dnet_ntoa ();
4547int
4548main (void)
4549{
4550dnet_ntoa ();
4551  ;
4552  return 0;
4553}
4554_ACEOF
4555rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4556if { (eval echo "$as_me:4556: \"$ac_link\"") >&5
4557  (eval $ac_link) 2>&5
4558  ac_status=$?
4559  echo "$as_me:4559: \$? = $ac_status" >&5
4560  (exit "$ac_status"); } &&
4561         { ac_try='test -s "conftest$ac_exeext"'
4562  { (eval echo "$as_me:4562: \"$ac_try\"") >&5
4563  (eval $ac_try) 2>&5
4564  ac_status=$?
4565  echo "$as_me:4565: \$? = $ac_status" >&5
4566  (exit "$ac_status"); }; }; then
4567  ac_cv_lib_dnet_dnet_ntoa=yes
4568else
4569  echo "$as_me: failed program was:" >&5
4570cat "conftest.$ac_ext" >&5
4571ac_cv_lib_dnet_dnet_ntoa=no
4572fi
4573rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4574LIBS=$ac_check_lib_save_LIBS
4575fi
4576echo "$as_me:4576: result: $ac_cv_lib_dnet_dnet_ntoa" >&5
4577echo "${ECHO_T}$ac_cv_lib_dnet_dnet_ntoa" >&6
4578if test "$ac_cv_lib_dnet_dnet_ntoa" = yes; then
4579  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet"
4580fi
4581
4582    if test $ac_cv_lib_dnet_dnet_ntoa = no; then
4583      echo "$as_me:4583: checking for dnet_ntoa in -ldnet_stub" >&5
4584echo $ECHO_N "checking for dnet_ntoa in -ldnet_stub... $ECHO_C" >&6
4585if test "${ac_cv_lib_dnet_stub_dnet_ntoa+set}" = set; then
4586  echo $ECHO_N "(cached) $ECHO_C" >&6
4587else
4588  ac_check_lib_save_LIBS=$LIBS
4589LIBS="-ldnet_stub  $LIBS"
4590cat >"conftest.$ac_ext" <<_ACEOF
4591#line 4591 "configure"
4592#include "confdefs.h"
4593
4594/* Override any gcc2 internal prototype to avoid an error.  */
4595#ifdef __cplusplus
4596extern "C"
4597#endif
4598/* We use char because int might match the return type of a gcc2
4599   builtin and then its argument prototype would still apply.  */
4600char dnet_ntoa ();
4601int
4602main (void)
4603{
4604dnet_ntoa ();
4605  ;
4606  return 0;
4607}
4608_ACEOF
4609rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4610if { (eval echo "$as_me:4610: \"$ac_link\"") >&5
4611  (eval $ac_link) 2>&5
4612  ac_status=$?
4613  echo "$as_me:4613: \$? = $ac_status" >&5
4614  (exit "$ac_status"); } &&
4615         { ac_try='test -s "conftest$ac_exeext"'
4616  { (eval echo "$as_me:4616: \"$ac_try\"") >&5
4617  (eval $ac_try) 2>&5
4618  ac_status=$?
4619  echo "$as_me:4619: \$? = $ac_status" >&5
4620  (exit "$ac_status"); }; }; then
4621  ac_cv_lib_dnet_stub_dnet_ntoa=yes
4622else
4623  echo "$as_me: failed program was:" >&5
4624cat "conftest.$ac_ext" >&5
4625ac_cv_lib_dnet_stub_dnet_ntoa=no
4626fi
4627rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4628LIBS=$ac_check_lib_save_LIBS
4629fi
4630echo "$as_me:4630: result: $ac_cv_lib_dnet_stub_dnet_ntoa" >&5
4631echo "${ECHO_T}$ac_cv_lib_dnet_stub_dnet_ntoa" >&6
4632if test "$ac_cv_lib_dnet_stub_dnet_ntoa" = yes; then
4633  X_EXTRA_LIBS="$X_EXTRA_LIBS -ldnet_stub"
4634fi
4635
4636    fi
4637fi
4638rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4639    LIBS="$ac_xsave_LIBS"
4640
4641    # msh@cis.ufl.edu says -lnsl (and -lsocket) are needed for his 386/AT,
4642    # to get the SysV transport functions.
4643    # Chad R. Larson says the Pyramis MIS-ES running DC/OSx (SVR4)
4644    # needs -lnsl.
4645    # The nsl library prevents programs from opening the X display
4646    # on Irix 5.2, according to T.E. Dickey.
4647    # The functions gethostbyname, getservbyname, and inet_addr are
4648    # in -lbsd on LynxOS 3.0.1/i386, according to Lars Hecking.
4649    echo "$as_me:4649: checking for gethostbyname" >&5
4650echo $ECHO_N "checking for gethostbyname... $ECHO_C" >&6
4651if test "${ac_cv_func_gethostbyname+set}" = set; then
4652  echo $ECHO_N "(cached) $ECHO_C" >&6
4653else
4654  cat >"conftest.$ac_ext" <<_ACEOF
4655#line 4655 "configure"
4656#include "confdefs.h"
4657#define gethostbyname autoconf_temporary
4658#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
4659#undef gethostbyname
4660
4661#ifdef __cplusplus
4662extern "C"
4663#endif
4664
4665/* We use char because int might match the return type of a gcc2
4666   builtin and then its argument prototype would still apply.  */
4667char gethostbyname (void);
4668
4669int
4670main (void)
4671{
4672
4673/* The GNU C library defines stubs for functions which it implements
4674    to always fail with ENOSYS.  Some functions are actually named
4675    something starting with __ and the normal name is an alias.  */
4676#if defined (__stub_gethostbyname) || defined (__stub___gethostbyname)
4677#error found stub for gethostbyname
4678#endif
4679
4680	return gethostbyname ();
4681  ;
4682  return 0;
4683}
4684_ACEOF
4685rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4686if { (eval echo "$as_me:4686: \"$ac_link\"") >&5
4687  (eval $ac_link) 2>&5
4688  ac_status=$?
4689  echo "$as_me:4689: \$? = $ac_status" >&5
4690  (exit "$ac_status"); } &&
4691         { ac_try='test -s "conftest$ac_exeext"'
4692  { (eval echo "$as_me:4692: \"$ac_try\"") >&5
4693  (eval $ac_try) 2>&5
4694  ac_status=$?
4695  echo "$as_me:4695: \$? = $ac_status" >&5
4696  (exit "$ac_status"); }; }; then
4697  ac_cv_func_gethostbyname=yes
4698else
4699  echo "$as_me: failed program was:" >&5
4700cat "conftest.$ac_ext" >&5
4701ac_cv_func_gethostbyname=no
4702fi
4703rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4704fi
4705echo "$as_me:4705: result: $ac_cv_func_gethostbyname" >&5
4706echo "${ECHO_T}$ac_cv_func_gethostbyname" >&6
4707
4708    if test $ac_cv_func_gethostbyname = no; then
4709      echo "$as_me:4709: checking for gethostbyname in -lnsl" >&5
4710echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
4711if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
4712  echo $ECHO_N "(cached) $ECHO_C" >&6
4713else
4714  ac_check_lib_save_LIBS=$LIBS
4715LIBS="-lnsl  $LIBS"
4716cat >"conftest.$ac_ext" <<_ACEOF
4717#line 4717 "configure"
4718#include "confdefs.h"
4719
4720/* Override any gcc2 internal prototype to avoid an error.  */
4721#ifdef __cplusplus
4722extern "C"
4723#endif
4724/* We use char because int might match the return type of a gcc2
4725   builtin and then its argument prototype would still apply.  */
4726char gethostbyname ();
4727int
4728main (void)
4729{
4730gethostbyname ();
4731  ;
4732  return 0;
4733}
4734_ACEOF
4735rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4736if { (eval echo "$as_me:4736: \"$ac_link\"") >&5
4737  (eval $ac_link) 2>&5
4738  ac_status=$?
4739  echo "$as_me:4739: \$? = $ac_status" >&5
4740  (exit "$ac_status"); } &&
4741         { ac_try='test -s "conftest$ac_exeext"'
4742  { (eval echo "$as_me:4742: \"$ac_try\"") >&5
4743  (eval $ac_try) 2>&5
4744  ac_status=$?
4745  echo "$as_me:4745: \$? = $ac_status" >&5
4746  (exit "$ac_status"); }; }; then
4747  ac_cv_lib_nsl_gethostbyname=yes
4748else
4749  echo "$as_me: failed program was:" >&5
4750cat "conftest.$ac_ext" >&5
4751ac_cv_lib_nsl_gethostbyname=no
4752fi
4753rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4754LIBS=$ac_check_lib_save_LIBS
4755fi
4756echo "$as_me:4756: result: $ac_cv_lib_nsl_gethostbyname" >&5
4757echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
4758if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
4759  X_EXTRA_LIBS="$X_EXTRA_LIBS -lnsl"
4760fi
4761
4762      if test $ac_cv_lib_nsl_gethostbyname = no; then
4763        echo "$as_me:4763: checking for gethostbyname in -lbsd" >&5
4764echo $ECHO_N "checking for gethostbyname in -lbsd... $ECHO_C" >&6
4765if test "${ac_cv_lib_bsd_gethostbyname+set}" = set; then
4766  echo $ECHO_N "(cached) $ECHO_C" >&6
4767else
4768  ac_check_lib_save_LIBS=$LIBS
4769LIBS="-lbsd  $LIBS"
4770cat >"conftest.$ac_ext" <<_ACEOF
4771#line 4771 "configure"
4772#include "confdefs.h"
4773
4774/* Override any gcc2 internal prototype to avoid an error.  */
4775#ifdef __cplusplus
4776extern "C"
4777#endif
4778/* We use char because int might match the return type of a gcc2
4779   builtin and then its argument prototype would still apply.  */
4780char gethostbyname ();
4781int
4782main (void)
4783{
4784gethostbyname ();
4785  ;
4786  return 0;
4787}
4788_ACEOF
4789rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4790if { (eval echo "$as_me:4790: \"$ac_link\"") >&5
4791  (eval $ac_link) 2>&5
4792  ac_status=$?
4793  echo "$as_me:4793: \$? = $ac_status" >&5
4794  (exit "$ac_status"); } &&
4795         { ac_try='test -s "conftest$ac_exeext"'
4796  { (eval echo "$as_me:4796: \"$ac_try\"") >&5
4797  (eval $ac_try) 2>&5
4798  ac_status=$?
4799  echo "$as_me:4799: \$? = $ac_status" >&5
4800  (exit "$ac_status"); }; }; then
4801  ac_cv_lib_bsd_gethostbyname=yes
4802else
4803  echo "$as_me: failed program was:" >&5
4804cat "conftest.$ac_ext" >&5
4805ac_cv_lib_bsd_gethostbyname=no
4806fi
4807rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4808LIBS=$ac_check_lib_save_LIBS
4809fi
4810echo "$as_me:4810: result: $ac_cv_lib_bsd_gethostbyname" >&5
4811echo "${ECHO_T}$ac_cv_lib_bsd_gethostbyname" >&6
4812if test "$ac_cv_lib_bsd_gethostbyname" = yes; then
4813  X_EXTRA_LIBS="$X_EXTRA_LIBS -lbsd"
4814fi
4815
4816      fi
4817    fi
4818
4819    # lieder@skyler.mavd.honeywell.com says without -lsocket,
4820    # socket/setsockopt and other routines are undefined under SCO ODT
4821    # 2.0.  But -lsocket is broken on IRIX 5.2 (and is not necessary
4822    # on later versions), says Simon Leinen: it contains gethostby*
4823    # variants that don't use the nameserver (or something).  -lsocket
4824    # must be given before -lnsl if both are needed.  We assume that
4825    # if connect needs -lnsl, so does gethostbyname.
4826    echo "$as_me:4826: checking for connect" >&5
4827echo $ECHO_N "checking for connect... $ECHO_C" >&6
4828if test "${ac_cv_func_connect+set}" = set; then
4829  echo $ECHO_N "(cached) $ECHO_C" >&6
4830else
4831  cat >"conftest.$ac_ext" <<_ACEOF
4832#line 4832 "configure"
4833#include "confdefs.h"
4834#define connect autoconf_temporary
4835#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
4836#undef connect
4837
4838#ifdef __cplusplus
4839extern "C"
4840#endif
4841
4842/* We use char because int might match the return type of a gcc2
4843   builtin and then its argument prototype would still apply.  */
4844char connect (void);
4845
4846int
4847main (void)
4848{
4849
4850/* The GNU C library defines stubs for functions which it implements
4851    to always fail with ENOSYS.  Some functions are actually named
4852    something starting with __ and the normal name is an alias.  */
4853#if defined (__stub_connect) || defined (__stub___connect)
4854#error found stub for connect
4855#endif
4856
4857	return connect ();
4858  ;
4859  return 0;
4860}
4861_ACEOF
4862rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4863if { (eval echo "$as_me:4863: \"$ac_link\"") >&5
4864  (eval $ac_link) 2>&5
4865  ac_status=$?
4866  echo "$as_me:4866: \$? = $ac_status" >&5
4867  (exit "$ac_status"); } &&
4868         { ac_try='test -s "conftest$ac_exeext"'
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  ac_cv_func_connect=yes
4875else
4876  echo "$as_me: failed program was:" >&5
4877cat "conftest.$ac_ext" >&5
4878ac_cv_func_connect=no
4879fi
4880rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4881fi
4882echo "$as_me:4882: result: $ac_cv_func_connect" >&5
4883echo "${ECHO_T}$ac_cv_func_connect" >&6
4884
4885    if test $ac_cv_func_connect = no; then
4886      echo "$as_me:4886: checking for connect in -lsocket" >&5
4887echo $ECHO_N "checking for connect in -lsocket... $ECHO_C" >&6
4888if test "${ac_cv_lib_socket_connect+set}" = set; then
4889  echo $ECHO_N "(cached) $ECHO_C" >&6
4890else
4891  ac_check_lib_save_LIBS=$LIBS
4892LIBS="-lsocket $X_EXTRA_LIBS $LIBS"
4893cat >"conftest.$ac_ext" <<_ACEOF
4894#line 4894 "configure"
4895#include "confdefs.h"
4896
4897/* Override any gcc2 internal prototype to avoid an error.  */
4898#ifdef __cplusplus
4899extern "C"
4900#endif
4901/* We use char because int might match the return type of a gcc2
4902   builtin and then its argument prototype would still apply.  */
4903char connect ();
4904int
4905main (void)
4906{
4907connect ();
4908  ;
4909  return 0;
4910}
4911_ACEOF
4912rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4913if { (eval echo "$as_me:4913: \"$ac_link\"") >&5
4914  (eval $ac_link) 2>&5
4915  ac_status=$?
4916  echo "$as_me:4916: \$? = $ac_status" >&5
4917  (exit "$ac_status"); } &&
4918         { ac_try='test -s "conftest$ac_exeext"'
4919  { (eval echo "$as_me:4919: \"$ac_try\"") >&5
4920  (eval $ac_try) 2>&5
4921  ac_status=$?
4922  echo "$as_me:4922: \$? = $ac_status" >&5
4923  (exit "$ac_status"); }; }; then
4924  ac_cv_lib_socket_connect=yes
4925else
4926  echo "$as_me: failed program was:" >&5
4927cat "conftest.$ac_ext" >&5
4928ac_cv_lib_socket_connect=no
4929fi
4930rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4931LIBS=$ac_check_lib_save_LIBS
4932fi
4933echo "$as_me:4933: result: $ac_cv_lib_socket_connect" >&5
4934echo "${ECHO_T}$ac_cv_lib_socket_connect" >&6
4935if test "$ac_cv_lib_socket_connect" = yes; then
4936  X_EXTRA_LIBS="-lsocket $X_EXTRA_LIBS"
4937fi
4938
4939    fi
4940
4941    # Guillermo Gomez says -lposix is necessary on A/UX.
4942    echo "$as_me:4942: checking for remove" >&5
4943echo $ECHO_N "checking for remove... $ECHO_C" >&6
4944if test "${ac_cv_func_remove+set}" = set; then
4945  echo $ECHO_N "(cached) $ECHO_C" >&6
4946else
4947  cat >"conftest.$ac_ext" <<_ACEOF
4948#line 4948 "configure"
4949#include "confdefs.h"
4950#define remove autoconf_temporary
4951#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
4952#undef remove
4953
4954#ifdef __cplusplus
4955extern "C"
4956#endif
4957
4958/* We use char because int might match the return type of a gcc2
4959   builtin and then its argument prototype would still apply.  */
4960char remove (void);
4961
4962int
4963main (void)
4964{
4965
4966/* The GNU C library defines stubs for functions which it implements
4967    to always fail with ENOSYS.  Some functions are actually named
4968    something starting with __ and the normal name is an alias.  */
4969#if defined (__stub_remove) || defined (__stub___remove)
4970#error found stub for remove
4971#endif
4972
4973	return remove ();
4974  ;
4975  return 0;
4976}
4977_ACEOF
4978rm -f "conftest.$ac_objext" "conftest$ac_exeext"
4979if { (eval echo "$as_me:4979: \"$ac_link\"") >&5
4980  (eval $ac_link) 2>&5
4981  ac_status=$?
4982  echo "$as_me:4982: \$? = $ac_status" >&5
4983  (exit "$ac_status"); } &&
4984         { ac_try='test -s "conftest$ac_exeext"'
4985  { (eval echo "$as_me:4985: \"$ac_try\"") >&5
4986  (eval $ac_try) 2>&5
4987  ac_status=$?
4988  echo "$as_me:4988: \$? = $ac_status" >&5
4989  (exit "$ac_status"); }; }; then
4990  ac_cv_func_remove=yes
4991else
4992  echo "$as_me: failed program was:" >&5
4993cat "conftest.$ac_ext" >&5
4994ac_cv_func_remove=no
4995fi
4996rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
4997fi
4998echo "$as_me:4998: result: $ac_cv_func_remove" >&5
4999echo "${ECHO_T}$ac_cv_func_remove" >&6
5000
5001    if test $ac_cv_func_remove = no; then
5002      echo "$as_me:5002: checking for remove in -lposix" >&5
5003echo $ECHO_N "checking for remove in -lposix... $ECHO_C" >&6
5004if test "${ac_cv_lib_posix_remove+set}" = set; then
5005  echo $ECHO_N "(cached) $ECHO_C" >&6
5006else
5007  ac_check_lib_save_LIBS=$LIBS
5008LIBS="-lposix  $LIBS"
5009cat >"conftest.$ac_ext" <<_ACEOF
5010#line 5010 "configure"
5011#include "confdefs.h"
5012
5013/* Override any gcc2 internal prototype to avoid an error.  */
5014#ifdef __cplusplus
5015extern "C"
5016#endif
5017/* We use char because int might match the return type of a gcc2
5018   builtin and then its argument prototype would still apply.  */
5019char remove ();
5020int
5021main (void)
5022{
5023remove ();
5024  ;
5025  return 0;
5026}
5027_ACEOF
5028rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5029if { (eval echo "$as_me:5029: \"$ac_link\"") >&5
5030  (eval $ac_link) 2>&5
5031  ac_status=$?
5032  echo "$as_me:5032: \$? = $ac_status" >&5
5033  (exit "$ac_status"); } &&
5034         { ac_try='test -s "conftest$ac_exeext"'
5035  { (eval echo "$as_me:5035: \"$ac_try\"") >&5
5036  (eval $ac_try) 2>&5
5037  ac_status=$?
5038  echo "$as_me:5038: \$? = $ac_status" >&5
5039  (exit "$ac_status"); }; }; then
5040  ac_cv_lib_posix_remove=yes
5041else
5042  echo "$as_me: failed program was:" >&5
5043cat "conftest.$ac_ext" >&5
5044ac_cv_lib_posix_remove=no
5045fi
5046rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5047LIBS=$ac_check_lib_save_LIBS
5048fi
5049echo "$as_me:5049: result: $ac_cv_lib_posix_remove" >&5
5050echo "${ECHO_T}$ac_cv_lib_posix_remove" >&6
5051if test "$ac_cv_lib_posix_remove" = yes; then
5052  X_EXTRA_LIBS="$X_EXTRA_LIBS -lposix"
5053fi
5054
5055    fi
5056
5057    # BSDI BSD/OS 2.1 needs -lipc for XOpenDisplay.
5058    echo "$as_me:5058: checking for shmat" >&5
5059echo $ECHO_N "checking for shmat... $ECHO_C" >&6
5060if test "${ac_cv_func_shmat+set}" = set; then
5061  echo $ECHO_N "(cached) $ECHO_C" >&6
5062else
5063  cat >"conftest.$ac_ext" <<_ACEOF
5064#line 5064 "configure"
5065#include "confdefs.h"
5066#define shmat autoconf_temporary
5067#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
5068#undef shmat
5069
5070#ifdef __cplusplus
5071extern "C"
5072#endif
5073
5074/* We use char because int might match the return type of a gcc2
5075   builtin and then its argument prototype would still apply.  */
5076char shmat (void);
5077
5078int
5079main (void)
5080{
5081
5082/* The GNU C library defines stubs for functions which it implements
5083    to always fail with ENOSYS.  Some functions are actually named
5084    something starting with __ and the normal name is an alias.  */
5085#if defined (__stub_shmat) || defined (__stub___shmat)
5086#error found stub for shmat
5087#endif
5088
5089	return shmat ();
5090  ;
5091  return 0;
5092}
5093_ACEOF
5094rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5095if { (eval echo "$as_me:5095: \"$ac_link\"") >&5
5096  (eval $ac_link) 2>&5
5097  ac_status=$?
5098  echo "$as_me:5098: \$? = $ac_status" >&5
5099  (exit "$ac_status"); } &&
5100         { ac_try='test -s "conftest$ac_exeext"'
5101  { (eval echo "$as_me:5101: \"$ac_try\"") >&5
5102  (eval $ac_try) 2>&5
5103  ac_status=$?
5104  echo "$as_me:5104: \$? = $ac_status" >&5
5105  (exit "$ac_status"); }; }; then
5106  ac_cv_func_shmat=yes
5107else
5108  echo "$as_me: failed program was:" >&5
5109cat "conftest.$ac_ext" >&5
5110ac_cv_func_shmat=no
5111fi
5112rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5113fi
5114echo "$as_me:5114: result: $ac_cv_func_shmat" >&5
5115echo "${ECHO_T}$ac_cv_func_shmat" >&6
5116
5117    if test $ac_cv_func_shmat = no; then
5118      echo "$as_me:5118: checking for shmat in -lipc" >&5
5119echo $ECHO_N "checking for shmat in -lipc... $ECHO_C" >&6
5120if test "${ac_cv_lib_ipc_shmat+set}" = set; then
5121  echo $ECHO_N "(cached) $ECHO_C" >&6
5122else
5123  ac_check_lib_save_LIBS=$LIBS
5124LIBS="-lipc  $LIBS"
5125cat >"conftest.$ac_ext" <<_ACEOF
5126#line 5126 "configure"
5127#include "confdefs.h"
5128
5129/* Override any gcc2 internal prototype to avoid an error.  */
5130#ifdef __cplusplus
5131extern "C"
5132#endif
5133/* We use char because int might match the return type of a gcc2
5134   builtin and then its argument prototype would still apply.  */
5135char shmat ();
5136int
5137main (void)
5138{
5139shmat ();
5140  ;
5141  return 0;
5142}
5143_ACEOF
5144rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5145if { (eval echo "$as_me:5145: \"$ac_link\"") >&5
5146  (eval $ac_link) 2>&5
5147  ac_status=$?
5148  echo "$as_me:5148: \$? = $ac_status" >&5
5149  (exit "$ac_status"); } &&
5150         { ac_try='test -s "conftest$ac_exeext"'
5151  { (eval echo "$as_me:5151: \"$ac_try\"") >&5
5152  (eval $ac_try) 2>&5
5153  ac_status=$?
5154  echo "$as_me:5154: \$? = $ac_status" >&5
5155  (exit "$ac_status"); }; }; then
5156  ac_cv_lib_ipc_shmat=yes
5157else
5158  echo "$as_me: failed program was:" >&5
5159cat "conftest.$ac_ext" >&5
5160ac_cv_lib_ipc_shmat=no
5161fi
5162rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5163LIBS=$ac_check_lib_save_LIBS
5164fi
5165echo "$as_me:5165: result: $ac_cv_lib_ipc_shmat" >&5
5166echo "${ECHO_T}$ac_cv_lib_ipc_shmat" >&6
5167if test "$ac_cv_lib_ipc_shmat" = yes; then
5168  X_EXTRA_LIBS="$X_EXTRA_LIBS -lipc"
5169fi
5170
5171    fi
5172  fi
5173
5174  # Check for libraries that X11R6 Xt/Xaw programs need.
5175  ac_save_LDFLAGS=$LDFLAGS
5176  test -n "$x_libraries" && LDFLAGS="$LDFLAGS -L$x_libraries"
5177  # SM needs ICE to (dynamically) link under SunOS 4.x (so we have to
5178  # check for ICE first), but we must link in the order -lSM -lICE or
5179  # we get undefined symbols.  So assume we have SM if we have ICE.
5180  # These have to be linked with before -lX11, unlike the other
5181  # libraries we check for below, so use a different variable.
5182  # John Interrante, Karl Berry
5183  echo "$as_me:5183: checking for IceConnectionNumber in -lICE" >&5
5184echo $ECHO_N "checking for IceConnectionNumber in -lICE... $ECHO_C" >&6
5185if test "${ac_cv_lib_ICE_IceConnectionNumber+set}" = set; then
5186  echo $ECHO_N "(cached) $ECHO_C" >&6
5187else
5188  ac_check_lib_save_LIBS=$LIBS
5189LIBS="-lICE $X_EXTRA_LIBS $LIBS"
5190cat >"conftest.$ac_ext" <<_ACEOF
5191#line 5191 "configure"
5192#include "confdefs.h"
5193
5194/* Override any gcc2 internal prototype to avoid an error.  */
5195#ifdef __cplusplus
5196extern "C"
5197#endif
5198/* We use char because int might match the return type of a gcc2
5199   builtin and then its argument prototype would still apply.  */
5200char IceConnectionNumber ();
5201int
5202main (void)
5203{
5204IceConnectionNumber ();
5205  ;
5206  return 0;
5207}
5208_ACEOF
5209rm -f "conftest.$ac_objext" "conftest$ac_exeext"
5210if { (eval echo "$as_me:5210: \"$ac_link\"") >&5
5211  (eval $ac_link) 2>&5
5212  ac_status=$?
5213  echo "$as_me:5213: \$? = $ac_status" >&5
5214  (exit "$ac_status"); } &&
5215         { ac_try='test -s "conftest$ac_exeext"'
5216  { (eval echo "$as_me:5216: \"$ac_try\"") >&5
5217  (eval $ac_try) 2>&5
5218  ac_status=$?
5219  echo "$as_me:5219: \$? = $ac_status" >&5
5220  (exit "$ac_status"); }; }; then
5221  ac_cv_lib_ICE_IceConnectionNumber=yes
5222else
5223  echo "$as_me: failed program was:" >&5
5224cat "conftest.$ac_ext" >&5
5225ac_cv_lib_ICE_IceConnectionNumber=no
5226fi
5227rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
5228LIBS=$ac_check_lib_save_LIBS
5229fi
5230echo "$as_me:5230: result: $ac_cv_lib_ICE_IceConnectionNumber" >&5
5231echo "${ECHO_T}$ac_cv_lib_ICE_IceConnectionNumber" >&6
5232if test "$ac_cv_lib_ICE_IceConnectionNumber" = yes; then
5233  X_PRE_LIBS="$X_PRE_LIBS -lSM -lICE"
5234fi
5235
5236  LDFLAGS=$ac_save_LDFLAGS
5237
5238fi
5239
5240fi
5241
5242echo "$as_me:5242: checking if you want to use C11 _Noreturn feature" >&5
5243echo $ECHO_N "checking if you want to use C11 _Noreturn feature... $ECHO_C" >&6
5244
5245# Check whether --enable-stdnoreturn or --disable-stdnoreturn was given.
5246if test "${enable_stdnoreturn+set}" = set; then
5247  enableval="$enable_stdnoreturn"
5248  test "$enableval" != yes && enableval=no
5249	if test "$enableval" != "no" ; then
5250    enable_stdnoreturn=yes
5251	else
5252		enable_stdnoreturn=no
5253	fi
5254else
5255  enableval=no
5256	enable_stdnoreturn=no
5257
5258fi;
5259echo "$as_me:5259: result: $enable_stdnoreturn" >&5
5260echo "${ECHO_T}$enable_stdnoreturn" >&6
5261
5262if test $enable_stdnoreturn = yes; then
5263echo "$as_me:5263: checking for C11 _Noreturn feature" >&5
5264echo $ECHO_N "checking for C11 _Noreturn feature... $ECHO_C" >&6
5265if test "${cf_cv_c11_noreturn+set}" = set; then
5266  echo $ECHO_N "(cached) $ECHO_C" >&6
5267else
5268  cat >"conftest.$ac_ext" <<_ACEOF
5269#line 5269 "configure"
5270#include "confdefs.h"
5271
5272#include <stdio.h>
5273#include <stdlib.h>
5274#include <stdnoreturn.h>
5275static _Noreturn void giveup(void) { exit(0); }
5276
5277int
5278main (void)
5279{
5280if (feof(stdin)) giveup()
5281  ;
5282  return 0;
5283}
5284_ACEOF
5285rm -f "conftest.$ac_objext"
5286if { (eval echo "$as_me:5286: \"$ac_compile\"") >&5
5287  (eval $ac_compile) 2>&5
5288  ac_status=$?
5289  echo "$as_me:5289: \$? = $ac_status" >&5
5290  (exit "$ac_status"); } &&
5291         { ac_try='test -s "conftest.$ac_objext"'
5292  { (eval echo "$as_me:5292: \"$ac_try\"") >&5
5293  (eval $ac_try) 2>&5
5294  ac_status=$?
5295  echo "$as_me:5295: \$? = $ac_status" >&5
5296  (exit "$ac_status"); }; }; then
5297  cf_cv_c11_noreturn=yes
5298else
5299  echo "$as_me: failed program was:" >&5
5300cat "conftest.$ac_ext" >&5
5301cf_cv_c11_noreturn=no
5302fi
5303rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5304
5305fi
5306echo "$as_me:5306: result: $cf_cv_c11_noreturn" >&5
5307echo "${ECHO_T}$cf_cv_c11_noreturn" >&6
5308else
5309	cf_cv_c11_noreturn=no,
5310fi
5311
5312if test "$cf_cv_c11_noreturn" = yes; then
5313
5314cat >>confdefs.h <<\EOF
5315#define HAVE_STDNORETURN_H 1
5316EOF
5317
5318cat >>confdefs.h <<EOF
5319#define STDC_NORETURN _Noreturn
5320EOF
5321
5322	HAVE_STDNORETURN_H=1
5323else
5324	HAVE_STDNORETURN_H=0
5325fi
5326
5327if test "$GCC" = yes || test "$GXX" = yes
5328then
5329
5330if test "$GCC" = yes || test "$GXX" = yes
5331then
5332	case $CFLAGS in
5333	(*-Werror=*)
5334		test -n "$verbose" && echo "	repairing CFLAGS: $CFLAGS" 1>&6
5335
5336echo "${as_me:-configure}:5336: testing repairing CFLAGS: $CFLAGS ..." 1>&5
5337
5338		cf_temp_flags=
5339		for cf_temp_scan in $CFLAGS
5340		do
5341			case "x$cf_temp_scan" in
5342			(x-Werror=*)
5343
5344	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5345	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5346
5347				;;
5348			(*)
5349
5350	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5351	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5352
5353				;;
5354			esac
5355		done
5356		CFLAGS="$cf_temp_flags"
5357		test -n "$verbose" && echo "	... fixed $CFLAGS" 1>&6
5358
5359echo "${as_me:-configure}:5359: testing ... fixed $CFLAGS ..." 1>&5
5360
5361		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5362
5363echo "${as_me:-configure}:5363: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5364
5365		;;
5366	esac
5367fi
5368
5369if test "$GCC" = yes || test "$GXX" = yes
5370then
5371	case $CPPFLAGS in
5372	(*-Werror=*)
5373		test -n "$verbose" && echo "	repairing CPPFLAGS: $CPPFLAGS" 1>&6
5374
5375echo "${as_me:-configure}:5375: testing repairing CPPFLAGS: $CPPFLAGS ..." 1>&5
5376
5377		cf_temp_flags=
5378		for cf_temp_scan in $CPPFLAGS
5379		do
5380			case "x$cf_temp_scan" in
5381			(x-Werror=*)
5382
5383	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5384	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5385
5386				;;
5387			(*)
5388
5389	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5390	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5391
5392				;;
5393			esac
5394		done
5395		CPPFLAGS="$cf_temp_flags"
5396		test -n "$verbose" && echo "	... fixed $CPPFLAGS" 1>&6
5397
5398echo "${as_me:-configure}:5398: testing ... fixed $CPPFLAGS ..." 1>&5
5399
5400		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5401
5402echo "${as_me:-configure}:5402: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5403
5404		;;
5405	esac
5406fi
5407
5408if test "$GCC" = yes || test "$GXX" = yes
5409then
5410	case $LDFLAGS in
5411	(*-Werror=*)
5412		test -n "$verbose" && echo "	repairing LDFLAGS: $LDFLAGS" 1>&6
5413
5414echo "${as_me:-configure}:5414: testing repairing LDFLAGS: $LDFLAGS ..." 1>&5
5415
5416		cf_temp_flags=
5417		for cf_temp_scan in $LDFLAGS
5418		do
5419			case "x$cf_temp_scan" in
5420			(x-Werror=*)
5421
5422	test -n "$EXTRA_CFLAGS" && EXTRA_CFLAGS="$EXTRA_CFLAGS "
5423	EXTRA_CFLAGS="${EXTRA_CFLAGS}$cf_temp_scan"
5424
5425				;;
5426			(*)
5427
5428	test -n "$cf_temp_flags" && cf_temp_flags="$cf_temp_flags "
5429	cf_temp_flags="${cf_temp_flags}$cf_temp_scan"
5430
5431				;;
5432			esac
5433		done
5434		LDFLAGS="$cf_temp_flags"
5435		test -n "$verbose" && echo "	... fixed $LDFLAGS" 1>&6
5436
5437echo "${as_me:-configure}:5437: testing ... fixed $LDFLAGS ..." 1>&5
5438
5439		test -n "$verbose" && echo "	... extra $EXTRA_CFLAGS" 1>&6
5440
5441echo "${as_me:-configure}:5441: testing ... extra $EXTRA_CFLAGS ..." 1>&5
5442
5443		;;
5444	esac
5445fi
5446
5447echo "$as_me:5447: checking if you want to turn on gcc warnings" >&5
5448echo $ECHO_N "checking if you want to turn on gcc warnings... $ECHO_C" >&6
5449
5450# Check whether --enable-warnings or --disable-warnings was given.
5451if test "${enable_warnings+set}" = set; then
5452  enableval="$enable_warnings"
5453  test "$enableval" != yes && enableval=no
5454	if test "$enableval" != "no" ; then
5455    enable_warnings=yes
5456	else
5457		enable_warnings=no
5458	fi
5459else
5460  enableval=no
5461	enable_warnings=no
5462
5463fi;
5464echo "$as_me:5464: result: $enable_warnings" >&5
5465echo "${ECHO_T}$enable_warnings" >&6
5466if test "$enable_warnings" = "yes"
5467then
5468
5469if test "$GCC" = yes || test "$GXX" = yes
5470then
5471cat > conftest.i <<EOF
5472#ifndef GCC_PRINTF
5473#define GCC_PRINTF 0
5474#endif
5475#ifndef GCC_SCANF
5476#define GCC_SCANF 0
5477#endif
5478#ifndef GCC_NORETURN
5479#define GCC_NORETURN /* nothing */
5480#endif
5481#ifndef GCC_UNUSED
5482#define GCC_UNUSED /* nothing */
5483#endif
5484EOF
5485if test "$GCC" = yes
5486then
5487	{ echo "$as_me:5487: checking for $CC __attribute__ directives..." >&5
5488echo "$as_me: checking for $CC __attribute__ directives..." >&6;}
5489cat > "conftest.$ac_ext" <<EOF
5490#line 5490 "${as_me:-configure}"
5491#include "confdefs.h"
5492#include "conftest.h"
5493#include "conftest.i"
5494#if	GCC_PRINTF
5495#define GCC_PRINTFLIKE(fmt,var) __attribute__((format(printf,fmt,var)))
5496#else
5497#define GCC_PRINTFLIKE(fmt,var) /*nothing*/
5498#endif
5499#if	GCC_SCANF
5500#define GCC_SCANFLIKE(fmt,var)  __attribute__((format(scanf,fmt,var)))
5501#else
5502#define GCC_SCANFLIKE(fmt,var)  /*nothing*/
5503#endif
5504extern void wow(char *,...) GCC_SCANFLIKE(1,2);
5505extern GCC_NORETURN void oops(char *,...) GCC_PRINTFLIKE(1,2);
5506extern GCC_NORETURN void foo(void);
5507int main(int argc GCC_UNUSED, char *argv[] GCC_UNUSED) { (void)argc; (void)argv; return 0; }
5508EOF
5509	cf_printf_attribute=no
5510	cf_scanf_attribute=no
5511	for cf_attribute in scanf printf unused noreturn
5512	do
5513
5514cf_ATTRIBUTE=`echo "$cf_attribute" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
5515
5516		cf_directive="__attribute__(($cf_attribute))"
5517		echo "checking for $CC $cf_directive" 1>&5
5518
5519		case "$cf_attribute" in
5520		(printf)
5521			cf_printf_attribute=yes
5522			cat >conftest.h <<EOF
5523#define GCC_$cf_ATTRIBUTE 1
5524EOF
5525			;;
5526		(scanf)
5527			cf_scanf_attribute=yes
5528			cat >conftest.h <<EOF
5529#define GCC_$cf_ATTRIBUTE 1
5530EOF
5531			;;
5532		(*)
5533			cat >conftest.h <<EOF
5534#define GCC_$cf_ATTRIBUTE $cf_directive
5535EOF
5536			;;
5537		esac
5538
5539		if { (eval echo "$as_me:5539: \"$ac_compile\"") >&5
5540  (eval $ac_compile) 2>&5
5541  ac_status=$?
5542  echo "$as_me:5542: \$? = $ac_status" >&5
5543  (exit "$ac_status"); }; then
5544			test -n "$verbose" && echo "$as_me:5544: result: ... $cf_attribute" >&5
5545echo "${ECHO_T}... $cf_attribute" >&6
5546			cat conftest.h >>confdefs.h
5547			case "$cf_attribute" in
5548			(noreturn)
5549
5550cat >>confdefs.h <<EOF
5551#define GCC_NORETURN $cf_directive
5552EOF
5553
5554				;;
5555			(printf)
5556				cf_value='/* nothing */'
5557				if test "$cf_printf_attribute" != no ; then
5558					cf_value='__attribute__((format(printf,fmt,var)))'
5559
5560cat >>confdefs.h <<\EOF
5561#define GCC_PRINTF 1
5562EOF
5563
5564				fi
5565
5566cat >>confdefs.h <<EOF
5567#define GCC_PRINTFLIKE(fmt,var) $cf_value
5568EOF
5569
5570				;;
5571			(scanf)
5572				cf_value='/* nothing */'
5573				if test "$cf_scanf_attribute" != no ; then
5574					cf_value='__attribute__((format(scanf,fmt,var)))'
5575
5576cat >>confdefs.h <<\EOF
5577#define GCC_SCANF 1
5578EOF
5579
5580				fi
5581
5582cat >>confdefs.h <<EOF
5583#define GCC_SCANFLIKE(fmt,var) $cf_value
5584EOF
5585
5586				;;
5587			(unused)
5588
5589cat >>confdefs.h <<EOF
5590#define GCC_UNUSED $cf_directive
5591EOF
5592
5593				;;
5594			esac
5595		fi
5596	done
5597else
5598	${FGREP-fgrep} define conftest.i >>confdefs.h
5599fi
5600rm -rf ./conftest*
5601fi
5602
5603if test "x$have_x" = xyes; then
5604
5605cf_save_LIBS_CF_CONST_X_STRING="$LIBS"
5606cf_save_CFLAGS_CF_CONST_X_STRING="$CFLAGS"
5607cf_save_CPPFLAGS_CF_CONST_X_STRING="$CPPFLAGS"
5608LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
5609for cf_X_CFLAGS in $X_CFLAGS
5610do
5611	case "x$cf_X_CFLAGS" in
5612	x-[IUD]*)
5613		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
5614		;;
5615	*)
5616		CFLAGS="$CFLAGS $cf_X_CFLAGS"
5617		;;
5618	esac
5619done
5620
5621cat >"conftest.$ac_ext" <<_ACEOF
5622#line 5622 "configure"
5623#include "confdefs.h"
5624
5625#include <stdlib.h>
5626#include <X11/Intrinsic.h>
5627
5628int
5629main (void)
5630{
5631String foo = malloc(1); free((void*)foo)
5632  ;
5633  return 0;
5634}
5635_ACEOF
5636rm -f "conftest.$ac_objext"
5637if { (eval echo "$as_me:5637: \"$ac_compile\"") >&5
5638  (eval $ac_compile) 2>&5
5639  ac_status=$?
5640  echo "$as_me:5640: \$? = $ac_status" >&5
5641  (exit "$ac_status"); } &&
5642         { ac_try='test -s "conftest.$ac_objext"'
5643  { (eval echo "$as_me:5643: \"$ac_try\"") >&5
5644  (eval $ac_try) 2>&5
5645  ac_status=$?
5646  echo "$as_me:5646: \$? = $ac_status" >&5
5647  (exit "$ac_status"); }; }; then
5648
5649echo "$as_me:5649: checking for X11/Xt const-feature" >&5
5650echo $ECHO_N "checking for X11/Xt const-feature... $ECHO_C" >&6
5651if test "${cf_cv_const_x_string+set}" = set; then
5652  echo $ECHO_N "(cached) $ECHO_C" >&6
5653else
5654
5655	cat >"conftest.$ac_ext" <<_ACEOF
5656#line 5656 "configure"
5657#include "confdefs.h"
5658
5659#define _CONST_X_STRING	/* X11R7.8 (perhaps) */
5660#undef  XTSTRINGDEFINES	/* X11R5 and later */
5661#include <stdlib.h>
5662#include <X11/Intrinsic.h>
5663
5664int
5665main (void)
5666{
5667String foo = malloc(1); *foo = 0
5668  ;
5669  return 0;
5670}
5671_ACEOF
5672rm -f "conftest.$ac_objext"
5673if { (eval echo "$as_me:5673: \"$ac_compile\"") >&5
5674  (eval $ac_compile) 2>&5
5675  ac_status=$?
5676  echo "$as_me:5676: \$? = $ac_status" >&5
5677  (exit "$ac_status"); } &&
5678         { ac_try='test -s "conftest.$ac_objext"'
5679  { (eval echo "$as_me:5679: \"$ac_try\"") >&5
5680  (eval $ac_try) 2>&5
5681  ac_status=$?
5682  echo "$as_me:5682: \$? = $ac_status" >&5
5683  (exit "$ac_status"); }; }; then
5684
5685			cf_cv_const_x_string=no
5686
5687else
5688  echo "$as_me: failed program was:" >&5
5689cat "conftest.$ac_ext" >&5
5690
5691			cf_cv_const_x_string=yes
5692
5693fi
5694rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5695
5696fi
5697echo "$as_me:5697: result: $cf_cv_const_x_string" >&5
5698echo "${ECHO_T}$cf_cv_const_x_string" >&6
5699
5700LIBS="$cf_save_LIBS_CF_CONST_X_STRING"
5701CFLAGS="$cf_save_CFLAGS_CF_CONST_X_STRING"
5702CPPFLAGS="$cf_save_CPPFLAGS_CF_CONST_X_STRING"
5703
5704case "$cf_cv_const_x_string" in
5705(no)
5706
5707	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5708	CPPFLAGS="${CPPFLAGS}-DXTSTRINGDEFINES"
5709
5710	;;
5711(*)
5712
5713	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5714	CPPFLAGS="${CPPFLAGS}-D_CONST_X_STRING"
5715
5716	;;
5717esac
5718
5719else
5720  echo "$as_me: failed program was:" >&5
5721cat "conftest.$ac_ext" >&5
5722fi
5723rm -f "conftest.$ac_objext" "conftest.$ac_ext"
5724 fi
5725cat > "conftest.$ac_ext" <<EOF
5726#line 5726 "${as_me:-configure}"
5727int main(int argc, char *argv[]) { return (argv[argc-1] == 0) ; }
5728EOF
5729if test "$INTEL_COMPILER" = yes
5730then
5731# The "-wdXXX" options suppress warnings:
5732# remark #1419: external declaration in primary source file
5733# remark #1683: explicit conversion of a 64-bit integral type to a smaller integral type (potential portability problem)
5734# remark #1684: conversion from pointer to same-sized integral type (potential portability problem)
5735# remark #193: zero used for undefined preprocessing identifier
5736# remark #593: variable "curs_sb_left_arrow" was set but never used
5737# remark #810: conversion from "int" to "Dimension={unsigned short}" may lose significant bits
5738# remark #869: parameter "tw" was never referenced
5739# remark #981: operands are evaluated in unspecified order
5740# warning #279: controlling expression is constant
5741
5742	{ echo "$as_me:5742: checking for $CC warning options..." >&5
5743echo "$as_me: checking for $CC warning options..." >&6;}
5744	cf_save_CFLAGS="$CFLAGS"
5745	EXTRA_CFLAGS="$EXTRA_CFLAGS -Wall"
5746	for cf_opt in \
5747		wd1419 \
5748		wd1683 \
5749		wd1684 \
5750		wd193 \
5751		wd593 \
5752		wd279 \
5753		wd810 \
5754		wd869 \
5755		wd981
5756	do
5757		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5758		if { (eval echo "$as_me:5758: \"$ac_compile\"") >&5
5759  (eval $ac_compile) 2>&5
5760  ac_status=$?
5761  echo "$as_me:5761: \$? = $ac_status" >&5
5762  (exit "$ac_status"); }; then
5763			test -n "$verbose" && echo "$as_me:5763: result: ... -$cf_opt" >&5
5764echo "${ECHO_T}... -$cf_opt" >&6
5765			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5766		fi
5767	done
5768	CFLAGS="$cf_save_CFLAGS"
5769elif test "$GCC" = yes && test "$GCC_VERSION" != "unknown"
5770then
5771	{ echo "$as_me:5771: checking for $CC warning options..." >&5
5772echo "$as_me: checking for $CC warning options..." >&6;}
5773	cf_save_CFLAGS="$CFLAGS"
5774	cf_warn_CONST=""
5775	test "$with_ext_const" = yes && cf_warn_CONST="Wwrite-strings"
5776	cf_gcc_warnings="Wignored-qualifiers Wlogical-op Wvarargs"
5777	test "x$CLANG_COMPILER" = xyes && cf_gcc_warnings=
5778	for cf_opt in W Wall \
5779		Wbad-function-cast \
5780		Wcast-align \
5781		Wcast-qual \
5782		Wdeclaration-after-statement \
5783		Wextra \
5784		Winline \
5785		Wmissing-declarations \
5786		Wmissing-prototypes \
5787		Wnested-externs \
5788		Wpointer-arith \
5789		Wshadow \
5790		Wstrict-prototypes \
5791		Wundef Wno-inline $cf_gcc_warnings $cf_warn_CONST
5792	do
5793		CFLAGS="$cf_save_CFLAGS $EXTRA_CFLAGS -$cf_opt"
5794		if { (eval echo "$as_me:5794: \"$ac_compile\"") >&5
5795  (eval $ac_compile) 2>&5
5796  ac_status=$?
5797  echo "$as_me:5797: \$? = $ac_status" >&5
5798  (exit "$ac_status"); }; then
5799			test -n "$verbose" && echo "$as_me:5799: result: ... -$cf_opt" >&5
5800echo "${ECHO_T}... -$cf_opt" >&6
5801			case "$cf_opt" in
5802			(Winline)
5803				case "$GCC_VERSION" in
5804				([34].*)
5805					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5806
5807echo "${as_me:-configure}:5807: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5808
5809					continue;;
5810				esac
5811				;;
5812			(Wpointer-arith)
5813				case "$GCC_VERSION" in
5814				([12].*)
5815					test -n "$verbose" && echo "	feature is broken in gcc $GCC_VERSION" 1>&6
5816
5817echo "${as_me:-configure}:5817: testing feature is broken in gcc $GCC_VERSION ..." 1>&5
5818
5819					continue;;
5820				esac
5821				;;
5822			esac
5823			EXTRA_CFLAGS="$EXTRA_CFLAGS -$cf_opt"
5824		fi
5825	done
5826	CFLAGS="$cf_save_CFLAGS"
5827fi
5828rm -rf ./conftest*
5829
5830fi
5831
5832fi
5833
5834echo "$as_me:5834: checking if you want to use dbmalloc for testing" >&5
5835echo $ECHO_N "checking if you want to use dbmalloc for testing... $ECHO_C" >&6
5836
5837# Check whether --with-dbmalloc or --without-dbmalloc was given.
5838if test "${with_dbmalloc+set}" = set; then
5839  withval="$with_dbmalloc"
5840  case "x$withval" in
5841	(x|xno) ;;
5842	(*)
5843		: "${with_cflags:=-g}"
5844		: "${enable_leaks:=no}"
5845		with_dbmalloc=yes
5846
5847cat >>confdefs.h <<EOF
5848#define USE_DBMALLOC 1
5849EOF
5850
5851		;;
5852	esac
5853else
5854  with_dbmalloc=
5855fi;
5856echo "$as_me:5856: result: ${with_dbmalloc:-no}" >&5
5857echo "${ECHO_T}${with_dbmalloc:-no}" >&6
5858
5859case ".$with_cflags" in
5860(.*-g*)
5861	case .$CFLAGS in
5862	(.*-g*)
5863		;;
5864	(*)
5865
5866cf_fix_cppflags=no
5867cf_new_cflags=
5868cf_new_cppflags=
5869cf_new_extra_cppflags=
5870
5871for cf_add_cflags in -g
5872do
5873case "$cf_fix_cppflags" in
5874(no)
5875	case "$cf_add_cflags" in
5876	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
5877		case "$cf_add_cflags" in
5878		(-D*)
5879			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
5880
5881			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5882				&& test -z "${cf_tst_cflags}" \
5883				&& cf_fix_cppflags=yes
5884
5885			if test "$cf_fix_cppflags" = yes ; then
5886
5887	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5888	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5889
5890				continue
5891			elif test "${cf_tst_cflags}" = "\"'" ; then
5892
5893	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5894	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5895
5896				continue
5897			fi
5898			;;
5899		esac
5900		case "$CPPFLAGS" in
5901		(*$cf_add_cflags)
5902			;;
5903		(*)
5904			case "$cf_add_cflags" in
5905			(-D*)
5906				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
5907
5908CPPFLAGS=`echo "$CPPFLAGS" | \
5909	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
5910		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
5911
5912				;;
5913			esac
5914
5915	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
5916	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
5917
5918			;;
5919		esac
5920		;;
5921	(*)
5922
5923	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
5924	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
5925
5926		;;
5927	esac
5928	;;
5929(yes)
5930
5931	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
5932	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
5933
5934	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
5935
5936	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
5937		&& test -z "${cf_tst_cflags}" \
5938		&& cf_fix_cppflags=no
5939	;;
5940esac
5941done
5942
5943if test -n "$cf_new_cflags" ; then
5944
5945	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
5946	CFLAGS="${CFLAGS}$cf_new_cflags"
5947
5948fi
5949
5950if test -n "$cf_new_cppflags" ; then
5951
5952	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
5953	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
5954
5955fi
5956
5957if test -n "$cf_new_extra_cppflags" ; then
5958
5959	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
5960	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
5961
5962fi
5963
5964		;;
5965	esac
5966	;;
5967esac
5968
5969if test "$with_dbmalloc" = yes ; then
5970	echo "$as_me:5970: checking for dbmalloc.h" >&5
5971echo $ECHO_N "checking for dbmalloc.h... $ECHO_C" >&6
5972if test "${ac_cv_header_dbmalloc_h+set}" = set; then
5973  echo $ECHO_N "(cached) $ECHO_C" >&6
5974else
5975  cat >"conftest.$ac_ext" <<_ACEOF
5976#line 5976 "configure"
5977#include "confdefs.h"
5978#include <dbmalloc.h>
5979_ACEOF
5980if { (eval echo "$as_me:5980: \"$ac_cpp "conftest.$ac_ext"\"") >&5
5981  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
5982  ac_status=$?
5983  $EGREP -v '^ *\+' conftest.er1 >conftest.err
5984  rm -f conftest.er1
5985  cat conftest.err >&5
5986  echo "$as_me:5986: \$? = $ac_status" >&5
5987  (exit "$ac_status"); } >/dev/null; then
5988  if test -s conftest.err; then
5989    ac_cpp_err=$ac_c_preproc_warn_flag
5990  else
5991    ac_cpp_err=
5992  fi
5993else
5994  ac_cpp_err=yes
5995fi
5996if test -z "$ac_cpp_err"; then
5997  ac_cv_header_dbmalloc_h=yes
5998else
5999  echo "$as_me: failed program was:" >&5
6000  cat "conftest.$ac_ext" >&5
6001  ac_cv_header_dbmalloc_h=no
6002fi
6003rm -f conftest.err "conftest.$ac_ext"
6004fi
6005echo "$as_me:6005: result: $ac_cv_header_dbmalloc_h" >&5
6006echo "${ECHO_T}$ac_cv_header_dbmalloc_h" >&6
6007if test "$ac_cv_header_dbmalloc_h" = yes; then
6008
6009echo "$as_me:6009: checking for debug_malloc in -ldbmalloc" >&5
6010echo $ECHO_N "checking for debug_malloc in -ldbmalloc... $ECHO_C" >&6
6011if test "${ac_cv_lib_dbmalloc_debug_malloc+set}" = set; then
6012  echo $ECHO_N "(cached) $ECHO_C" >&6
6013else
6014  ac_check_lib_save_LIBS=$LIBS
6015LIBS="-ldbmalloc  $LIBS"
6016cat >"conftest.$ac_ext" <<_ACEOF
6017#line 6017 "configure"
6018#include "confdefs.h"
6019
6020/* Override any gcc2 internal prototype to avoid an error.  */
6021#ifdef __cplusplus
6022extern "C"
6023#endif
6024/* We use char because int might match the return type of a gcc2
6025   builtin and then its argument prototype would still apply.  */
6026char debug_malloc ();
6027int
6028main (void)
6029{
6030debug_malloc ();
6031  ;
6032  return 0;
6033}
6034_ACEOF
6035rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6036if { (eval echo "$as_me:6036: \"$ac_link\"") >&5
6037  (eval $ac_link) 2>&5
6038  ac_status=$?
6039  echo "$as_me:6039: \$? = $ac_status" >&5
6040  (exit "$ac_status"); } &&
6041         { ac_try='test -s "conftest$ac_exeext"'
6042  { (eval echo "$as_me:6042: \"$ac_try\"") >&5
6043  (eval $ac_try) 2>&5
6044  ac_status=$?
6045  echo "$as_me:6045: \$? = $ac_status" >&5
6046  (exit "$ac_status"); }; }; then
6047  ac_cv_lib_dbmalloc_debug_malloc=yes
6048else
6049  echo "$as_me: failed program was:" >&5
6050cat "conftest.$ac_ext" >&5
6051ac_cv_lib_dbmalloc_debug_malloc=no
6052fi
6053rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6054LIBS=$ac_check_lib_save_LIBS
6055fi
6056echo "$as_me:6056: result: $ac_cv_lib_dbmalloc_debug_malloc" >&5
6057echo "${ECHO_T}$ac_cv_lib_dbmalloc_debug_malloc" >&6
6058if test "$ac_cv_lib_dbmalloc_debug_malloc" = yes; then
6059  cat >>confdefs.h <<EOF
6060#define HAVE_LIBDBMALLOC 1
6061EOF
6062
6063  LIBS="-ldbmalloc $LIBS"
6064
6065fi
6066
6067fi
6068
6069fi
6070
6071echo "$as_me:6071: checking if you want to use dmalloc for testing" >&5
6072echo $ECHO_N "checking if you want to use dmalloc for testing... $ECHO_C" >&6
6073
6074# Check whether --with-dmalloc or --without-dmalloc was given.
6075if test "${with_dmalloc+set}" = set; then
6076  withval="$with_dmalloc"
6077  case "x$withval" in
6078	(x|xno) ;;
6079	(*)
6080		: "${with_cflags:=-g}"
6081		: "${enable_leaks:=no}"
6082		with_dmalloc=yes
6083
6084cat >>confdefs.h <<EOF
6085#define USE_DMALLOC 1
6086EOF
6087
6088		;;
6089	esac
6090else
6091  with_dmalloc=
6092fi;
6093echo "$as_me:6093: result: ${with_dmalloc:-no}" >&5
6094echo "${ECHO_T}${with_dmalloc:-no}" >&6
6095
6096case ".$with_cflags" in
6097(.*-g*)
6098	case .$CFLAGS in
6099	(.*-g*)
6100		;;
6101	(*)
6102
6103cf_fix_cppflags=no
6104cf_new_cflags=
6105cf_new_cppflags=
6106cf_new_extra_cppflags=
6107
6108for cf_add_cflags in -g
6109do
6110case "$cf_fix_cppflags" in
6111(no)
6112	case "$cf_add_cflags" in
6113	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6114		case "$cf_add_cflags" in
6115		(-D*)
6116			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6117
6118			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6119				&& test -z "${cf_tst_cflags}" \
6120				&& cf_fix_cppflags=yes
6121
6122			if test "$cf_fix_cppflags" = yes ; then
6123
6124	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6125	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6126
6127				continue
6128			elif test "${cf_tst_cflags}" = "\"'" ; then
6129
6130	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6131	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6132
6133				continue
6134			fi
6135			;;
6136		esac
6137		case "$CPPFLAGS" in
6138		(*$cf_add_cflags)
6139			;;
6140		(*)
6141			case "$cf_add_cflags" in
6142			(-D*)
6143				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6144
6145CPPFLAGS=`echo "$CPPFLAGS" | \
6146	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
6147		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
6148
6149				;;
6150			esac
6151
6152	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6153	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6154
6155			;;
6156		esac
6157		;;
6158	(*)
6159
6160	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6161	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6162
6163		;;
6164	esac
6165	;;
6166(yes)
6167
6168	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6169	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6170
6171	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6172
6173	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6174		&& test -z "${cf_tst_cflags}" \
6175		&& cf_fix_cppflags=no
6176	;;
6177esac
6178done
6179
6180if test -n "$cf_new_cflags" ; then
6181
6182	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6183	CFLAGS="${CFLAGS}$cf_new_cflags"
6184
6185fi
6186
6187if test -n "$cf_new_cppflags" ; then
6188
6189	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6190	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6191
6192fi
6193
6194if test -n "$cf_new_extra_cppflags" ; then
6195
6196	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6197	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6198
6199fi
6200
6201		;;
6202	esac
6203	;;
6204esac
6205
6206if test "$with_dmalloc" = yes ; then
6207	echo "$as_me:6207: checking for dmalloc.h" >&5
6208echo $ECHO_N "checking for dmalloc.h... $ECHO_C" >&6
6209if test "${ac_cv_header_dmalloc_h+set}" = set; then
6210  echo $ECHO_N "(cached) $ECHO_C" >&6
6211else
6212  cat >"conftest.$ac_ext" <<_ACEOF
6213#line 6213 "configure"
6214#include "confdefs.h"
6215#include <dmalloc.h>
6216_ACEOF
6217if { (eval echo "$as_me:6217: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6218  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6219  ac_status=$?
6220  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6221  rm -f conftest.er1
6222  cat conftest.err >&5
6223  echo "$as_me:6223: \$? = $ac_status" >&5
6224  (exit "$ac_status"); } >/dev/null; then
6225  if test -s conftest.err; then
6226    ac_cpp_err=$ac_c_preproc_warn_flag
6227  else
6228    ac_cpp_err=
6229  fi
6230else
6231  ac_cpp_err=yes
6232fi
6233if test -z "$ac_cpp_err"; then
6234  ac_cv_header_dmalloc_h=yes
6235else
6236  echo "$as_me: failed program was:" >&5
6237  cat "conftest.$ac_ext" >&5
6238  ac_cv_header_dmalloc_h=no
6239fi
6240rm -f conftest.err "conftest.$ac_ext"
6241fi
6242echo "$as_me:6242: result: $ac_cv_header_dmalloc_h" >&5
6243echo "${ECHO_T}$ac_cv_header_dmalloc_h" >&6
6244if test "$ac_cv_header_dmalloc_h" = yes; then
6245
6246echo "$as_me:6246: checking for dmalloc_debug in -ldmalloc" >&5
6247echo $ECHO_N "checking for dmalloc_debug in -ldmalloc... $ECHO_C" >&6
6248if test "${ac_cv_lib_dmalloc_dmalloc_debug+set}" = set; then
6249  echo $ECHO_N "(cached) $ECHO_C" >&6
6250else
6251  ac_check_lib_save_LIBS=$LIBS
6252LIBS="-ldmalloc  $LIBS"
6253cat >"conftest.$ac_ext" <<_ACEOF
6254#line 6254 "configure"
6255#include "confdefs.h"
6256
6257/* Override any gcc2 internal prototype to avoid an error.  */
6258#ifdef __cplusplus
6259extern "C"
6260#endif
6261/* We use char because int might match the return type of a gcc2
6262   builtin and then its argument prototype would still apply.  */
6263char dmalloc_debug ();
6264int
6265main (void)
6266{
6267dmalloc_debug ();
6268  ;
6269  return 0;
6270}
6271_ACEOF
6272rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6273if { (eval echo "$as_me:6273: \"$ac_link\"") >&5
6274  (eval $ac_link) 2>&5
6275  ac_status=$?
6276  echo "$as_me:6276: \$? = $ac_status" >&5
6277  (exit "$ac_status"); } &&
6278         { ac_try='test -s "conftest$ac_exeext"'
6279  { (eval echo "$as_me:6279: \"$ac_try\"") >&5
6280  (eval $ac_try) 2>&5
6281  ac_status=$?
6282  echo "$as_me:6282: \$? = $ac_status" >&5
6283  (exit "$ac_status"); }; }; then
6284  ac_cv_lib_dmalloc_dmalloc_debug=yes
6285else
6286  echo "$as_me: failed program was:" >&5
6287cat "conftest.$ac_ext" >&5
6288ac_cv_lib_dmalloc_dmalloc_debug=no
6289fi
6290rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6291LIBS=$ac_check_lib_save_LIBS
6292fi
6293echo "$as_me:6293: result: $ac_cv_lib_dmalloc_dmalloc_debug" >&5
6294echo "${ECHO_T}$ac_cv_lib_dmalloc_dmalloc_debug" >&6
6295if test "$ac_cv_lib_dmalloc_dmalloc_debug" = yes; then
6296  cat >>confdefs.h <<EOF
6297#define HAVE_LIBDMALLOC 1
6298EOF
6299
6300  LIBS="-ldmalloc $LIBS"
6301
6302fi
6303
6304fi
6305
6306fi
6307
6308cat >>confdefs.h <<\EOF
6309#define UNIX 1
6310EOF
6311
6312TRY_CFLAGS=
6313case "$host_os" in
6314(aix4*)
6315	TRY_CFLAGS="$TRY_CFLAGS -DAIX4 -D_BSD=44 -D_AIX"
6316	LIBS="$LIBS -lbsd"
6317	;;
6318(aix*)
6319	TRY_CFLAGS="$TRY_CFLAGS -D_ACS_COMPAT_CODE"
6320	LIBS="$LIBS -lbsd"
6321	;;
6322(apollo*)
6323	TRY_CFLAGS="$TRY_CFLAGS -D_BUILTINS -W0,-opt,4"
6324	;;
6325(bsdi*)
6326	TRY_CFLAGS="$TRY_CFLAGS -DBSDI"
6327	;;
6328(clix*)
6329	# Tested on CLIX 3.1 (T.Dickey).  The original makefile entry
6330	# contributed by Alex Matulich (matuli_a@marlin.navsea.navy.mil) also
6331	# references -lmalloc and -lbsd.
6332
6333echo "$as_me:6333: checking for strcmp in -lc_s" >&5
6334echo $ECHO_N "checking for strcmp in -lc_s... $ECHO_C" >&6
6335if test "${ac_cv_lib_c_s_strcmp+set}" = set; then
6336  echo $ECHO_N "(cached) $ECHO_C" >&6
6337else
6338  ac_check_lib_save_LIBS=$LIBS
6339LIBS="-lc_s  $LIBS"
6340cat >"conftest.$ac_ext" <<_ACEOF
6341#line 6341 "configure"
6342#include "confdefs.h"
6343
6344/* Override any gcc2 internal prototype to avoid an error.  */
6345#ifdef __cplusplus
6346extern "C"
6347#endif
6348/* We use char because int might match the return type of a gcc2
6349   builtin and then its argument prototype would still apply.  */
6350char strcmp ();
6351int
6352main (void)
6353{
6354strcmp ();
6355  ;
6356  return 0;
6357}
6358_ACEOF
6359rm -f "conftest.$ac_objext" "conftest$ac_exeext"
6360if { (eval echo "$as_me:6360: \"$ac_link\"") >&5
6361  (eval $ac_link) 2>&5
6362  ac_status=$?
6363  echo "$as_me:6363: \$? = $ac_status" >&5
6364  (exit "$ac_status"); } &&
6365         { ac_try='test -s "conftest$ac_exeext"'
6366  { (eval echo "$as_me:6366: \"$ac_try\"") >&5
6367  (eval $ac_try) 2>&5
6368  ac_status=$?
6369  echo "$as_me:6369: \$? = $ac_status" >&5
6370  (exit "$ac_status"); }; }; then
6371  ac_cv_lib_c_s_strcmp=yes
6372else
6373  echo "$as_me: failed program was:" >&5
6374cat "conftest.$ac_ext" >&5
6375ac_cv_lib_c_s_strcmp=no
6376fi
6377rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
6378LIBS=$ac_check_lib_save_LIBS
6379fi
6380echo "$as_me:6380: result: $ac_cv_lib_c_s_strcmp" >&5
6381echo "${ECHO_T}$ac_cv_lib_c_s_strcmp" >&6
6382if test "$ac_cv_lib_c_s_strcmp" = yes; then
6383  cat >>confdefs.h <<EOF
6384#define HAVE_LIBC_S 1
6385EOF
6386
6387  LIBS="-lc_s $LIBS"
6388
6389fi
6390
6391	;;
6392(convex*)
6393	TRY_CFLAGS="$TRY_CFLAGS -D__STDC__ -Dunix"
6394	;;
6395(cygwin*)
6396	TRY_CFLAGS="$TRY_CFLAGS -DWIN_EX -D_WINDOWS_NSL"
6397	LIBS="$LIBS -luser32"
6398	;;
6399(hpux*)
6400	TRY_CFLAGS="$TRY_CFLAGS -D_XOPEN_SOURCE_EXTENDED"
6401	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -Wp,-H600000 -DSYS_HPUX"
6402	;;
6403(isc*)
6404	# -DPOSIX_JC is necessary, else LYBookmark.c never finds out what a mode_t is.
6405	TRY_CFLAGS="$TRY_CFLAGS -DISC -DPOSIX_JC"
6406	LIBS="$LIBS -linet -lnsl_s -lcposix"
6407	;;
6408(irix6.*)
6409	TRY_CFLAGS="$TRY_CFLAGS -DSYS_IRIX64"
6410	;;
6411(irix*)
6412	# The original makefile used the $CFLAGS option -cckr for some form
6413	# of K&R compatibility.  However, this causes compilation warnings for
6414	# varargs on IRIX 5.2, and does not appear to be needed.
6415	;;
6416(linux*)
6417	TRY_CFLAGS="$TRY_CFLAGS -DLINUX"
6418	;;
6419(mingw*)
6420	# put these directly in CPPFLAGS since they will not work in lynx_cfg.h
6421
6422cf_fix_cppflags=no
6423cf_new_cflags=
6424cf_new_cppflags=
6425cf_new_extra_cppflags=
6426
6427for cf_add_cflags in \
6428		-DDOSPATH \
6429		-DNOSIGHUP \
6430		-DNOUSERS \
6431		-DWIN32_LEAN_AND_MEAN \
6432		-DWIN_EX \
6433		-D_CONSOLE \
6434		-D_GNU_SOURCE \
6435		-D_MBCS \
6436		-D_WINDOWS \
6437		-D_WIN_CC \
6438		-D__WIN32__ \
6439
6440do
6441case "$cf_fix_cppflags" in
6442(no)
6443	case "$cf_add_cflags" in
6444	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6445		case "$cf_add_cflags" in
6446		(-D*)
6447			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6448
6449			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6450				&& test -z "${cf_tst_cflags}" \
6451				&& cf_fix_cppflags=yes
6452
6453			if test "$cf_fix_cppflags" = yes ; then
6454
6455	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6456	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6457
6458				continue
6459			elif test "${cf_tst_cflags}" = "\"'" ; then
6460
6461	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6462	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6463
6464				continue
6465			fi
6466			;;
6467		esac
6468		case "$CPPFLAGS" in
6469		(*$cf_add_cflags)
6470			;;
6471		(*)
6472			case "$cf_add_cflags" in
6473			(-D*)
6474				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6475
6476CPPFLAGS=`echo "$CPPFLAGS" | \
6477	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
6478		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
6479
6480				;;
6481			esac
6482
6483	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6484	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6485
6486			;;
6487		esac
6488		;;
6489	(*)
6490
6491	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6492	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6493
6494		;;
6495	esac
6496	;;
6497(yes)
6498
6499	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6500	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6501
6502	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6503
6504	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6505		&& test -z "${cf_tst_cflags}" \
6506		&& cf_fix_cppflags=no
6507	;;
6508esac
6509done
6510
6511if test -n "$cf_new_cflags" ; then
6512
6513	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6514	CFLAGS="${CFLAGS}$cf_new_cflags"
6515
6516fi
6517
6518if test -n "$cf_new_cppflags" ; then
6519
6520	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6521	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6522
6523fi
6524
6525if test -n "$cf_new_extra_cppflags" ; then
6526
6527	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6528	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6529
6530fi
6531
6532	EXTRA_OBJS="$EXTRA_OBJS Xsystem\$o"
6533	;;
6534(msdosdjgpp*)
6535	LIBS="$LIBS -lwatt"
6536	TRY_CFLAGS="$TRY_CFLAGS -DDOSPATH -DNOUSERS"
6537	;;
6538(next*)
6539	TRY_CFLAGS="$TRY_CFLAGS -DNEXT"
6540	;;
6541(osf4*)
6542	# The -Olimit flag (see below) is no longer available with
6543	# Digital C 5.2, which is bundled with Digital UNIX 4.0.
6544	TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
6545	;;
6546(osf*)
6547	# Increase the maximum size of functions that will be optimized.
6548	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 4000"
6549	TRY_CFLAGS="$TRY_CFLAGS -DDSYS5 -DSYS_TRU64"
6550	;;
6551(sco3.2v5*)
6552	test "$ac_cv_c_compiler_gnu" != yes && TRY_CFLAGS="$TRY_CFLAGS -belf"
6553	;;
6554(sco*)
6555	LIBS="$LIBS -lmalloc"
6556	# It's a little late to do much, but try to warn user if he's using
6557	# SCO's cc (which is reported to have broken const/volatile).
6558	case "$CC" in
6559	(cc|*/cc)
6560		{ echo "$as_me:6560: WARNING: You should consider using gcc or rcc if available" >&5
6561echo "$as_me: WARNING: You should consider using gcc or rcc if available" >&2;}
6562		unset ac_cv_prog_CC
6563		for ac_prog in gcc rcc
6564do
6565  # Extract the first word of "$ac_prog", so it can be a program name with args.
6566set dummy $ac_prog; ac_word=$2
6567echo "$as_me:6567: checking for $ac_word" >&5
6568echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
6569if test "${ac_cv_prog_CC+set}" = set; then
6570  echo $ECHO_N "(cached) $ECHO_C" >&6
6571else
6572  if test -n "$CC"; then
6573  ac_cv_prog_CC="$CC" # Let the user override the test.
6574else
6575  ac_save_IFS=$IFS; IFS=$ac_path_separator
6576ac_dummy="$PATH"
6577for ac_dir in $ac_dummy; do
6578  IFS=$ac_save_IFS
6579  test -z "$ac_dir" && ac_dir=.
6580  $as_executable_p "$ac_dir/$ac_word" || continue
6581ac_cv_prog_CC="$ac_prog"
6582echo "$as_me:6582: found $ac_dir/$ac_word" >&5
6583break
6584done
6585
6586fi
6587fi
6588CC=$ac_cv_prog_CC
6589if test -n "$CC"; then
6590  echo "$as_me:6590: result: $CC" >&5
6591echo "${ECHO_T}$CC" >&6
6592else
6593  echo "$as_me:6593: result: no" >&5
6594echo "${ECHO_T}no" >&6
6595fi
6596
6597  test -n "$CC" && break
6598done
6599test -n "$CC" || CC="$CC"
6600
6601		;;
6602	esac
6603	;;
6604(sequent-ptx)
6605	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DNO_IOCTL -DUSE_FCNTL"
6606	;;
6607(sequent-ptx2)
6608	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT"
6609	;;
6610(sony-newsos*)
6611	TRY_CFLAGS="$TRY_CFLAGS -I/usr/sony/include"
6612
6613for ac_header in jcurses.h
6614do
6615as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6616echo "$as_me:6616: checking for $ac_header" >&5
6617echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6618if eval "test \"\${$as_ac_Header+set}\" = set"; then
6619  echo $ECHO_N "(cached) $ECHO_C" >&6
6620else
6621  cat >"conftest.$ac_ext" <<_ACEOF
6622#line 6622 "configure"
6623#include "confdefs.h"
6624#include <$ac_header>
6625_ACEOF
6626if { (eval echo "$as_me:6626: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6627  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6628  ac_status=$?
6629  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6630  rm -f conftest.er1
6631  cat conftest.err >&5
6632  echo "$as_me:6632: \$? = $ac_status" >&5
6633  (exit "$ac_status"); } >/dev/null; then
6634  if test -s conftest.err; then
6635    ac_cpp_err=$ac_c_preproc_warn_flag
6636  else
6637    ac_cpp_err=
6638  fi
6639else
6640  ac_cpp_err=yes
6641fi
6642if test -z "$ac_cpp_err"; then
6643  eval "$as_ac_Header=yes"
6644else
6645  echo "$as_me: failed program was:" >&5
6646  cat "conftest.$ac_ext" >&5
6647  eval "$as_ac_Header=no"
6648fi
6649rm -f conftest.err "conftest.$ac_ext"
6650fi
6651echo "$as_me:6651: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6652echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6653if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6654  cat >>confdefs.h <<EOF
6655#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6656EOF
6657
6658fi
6659done
6660
6661	;;
6662(svr4)
6663	TRY_CFLAGS="$TRY_CFLAGS -DSVR4_BSDSELECT -DSVR4"
6664	;;
6665(sunos3*)
6666	TRY_CFLAGS="$TRY_CFLAGS -DSUN"
6667	;;
6668(sunos4*)
6669	TRY_CFLAGS="$TRY_CFLAGS -DSUN -DSUN4"
6670	;;
6671(ultrix*)
6672	# Increase the maximum size of functions that will be optimized.
6673	test -z "$GCC" && TRY_CFLAGS="$TRY_CFLAGS -O -Olimit 600 -G 7"
6674	TRY_CFLAGS="$TRY_CFLAGS -DULTRIX"
6675
6676for ac_header in cursesX.h
6677do
6678as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
6679echo "$as_me:6679: checking for $ac_header" >&5
6680echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
6681if eval "test \"\${$as_ac_Header+set}\" = set"; then
6682  echo $ECHO_N "(cached) $ECHO_C" >&6
6683else
6684  cat >"conftest.$ac_ext" <<_ACEOF
6685#line 6685 "configure"
6686#include "confdefs.h"
6687#include <$ac_header>
6688_ACEOF
6689if { (eval echo "$as_me:6689: \"$ac_cpp "conftest.$ac_ext"\"") >&5
6690  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
6691  ac_status=$?
6692  $EGREP -v '^ *\+' conftest.er1 >conftest.err
6693  rm -f conftest.er1
6694  cat conftest.err >&5
6695  echo "$as_me:6695: \$? = $ac_status" >&5
6696  (exit "$ac_status"); } >/dev/null; then
6697  if test -s conftest.err; then
6698    ac_cpp_err=$ac_c_preproc_warn_flag
6699  else
6700    ac_cpp_err=
6701  fi
6702else
6703  ac_cpp_err=yes
6704fi
6705if test -z "$ac_cpp_err"; then
6706  eval "$as_ac_Header=yes"
6707else
6708  echo "$as_me: failed program was:" >&5
6709  cat "conftest.$ac_ext" >&5
6710  eval "$as_ac_Header=no"
6711fi
6712rm -f conftest.err "conftest.$ac_ext"
6713fi
6714echo "$as_me:6714: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
6715echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
6716if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
6717  cat >>confdefs.h <<EOF
6718#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
6719EOF
6720
6721cat >>confdefs.h <<\EOF
6722#define HAVE_CURSESX_H 1
6723EOF
6724
6725		 cf_cv_ncurses_header=cursesX.h
6726fi
6727done
6728
6729	;;
6730esac
6731
6732case "$host_os" in
6733(mingw*)
6734	EXTRA_OBJS="$EXTRA_OBJS LYIcon\$o"
6735	;;
6736esac
6737
6738# This should have been defined by AC_PROG_CC
6739: "${CC:=cc}"
6740
6741echo "$as_me:6741: checking \$CFLAGS variable" >&5
6742echo $ECHO_N "checking \$CFLAGS variable... $ECHO_C" >&6
6743case "x$CFLAGS" in
6744(*-[IUD]*)
6745	echo "$as_me:6745: result: broken" >&5
6746echo "${ECHO_T}broken" >&6
6747	{ echo "$as_me:6747: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&5
6748echo "$as_me: WARNING: your environment uses the CFLAGS variable to hold CPPFLAGS options" >&2;}
6749	cf_flags="$CFLAGS"
6750	CFLAGS=
6751	for cf_arg in $cf_flags
6752	do
6753
6754cf_fix_cppflags=no
6755cf_new_cflags=
6756cf_new_cppflags=
6757cf_new_extra_cppflags=
6758
6759for cf_add_cflags in $cf_arg
6760do
6761case "$cf_fix_cppflags" in
6762(no)
6763	case "$cf_add_cflags" in
6764	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6765		case "$cf_add_cflags" in
6766		(-D*)
6767			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6768
6769			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6770				&& test -z "${cf_tst_cflags}" \
6771				&& cf_fix_cppflags=yes
6772
6773			if test "$cf_fix_cppflags" = yes ; then
6774
6775	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6776	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6777
6778				continue
6779			elif test "${cf_tst_cflags}" = "\"'" ; then
6780
6781	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6782	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6783
6784				continue
6785			fi
6786			;;
6787		esac
6788		case "$CPPFLAGS" in
6789		(*$cf_add_cflags)
6790			;;
6791		(*)
6792			case "$cf_add_cflags" in
6793			(-D*)
6794				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6795
6796CPPFLAGS=`echo "$CPPFLAGS" | \
6797	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
6798		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
6799
6800				;;
6801			esac
6802
6803	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6804	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6805
6806			;;
6807		esac
6808		;;
6809	(*)
6810
6811	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6812	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6813
6814		;;
6815	esac
6816	;;
6817(yes)
6818
6819	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6820	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6821
6822	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6823
6824	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6825		&& test -z "${cf_tst_cflags}" \
6826		&& cf_fix_cppflags=no
6827	;;
6828esac
6829done
6830
6831if test -n "$cf_new_cflags" ; then
6832
6833	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6834	CFLAGS="${CFLAGS}$cf_new_cflags"
6835
6836fi
6837
6838if test -n "$cf_new_cppflags" ; then
6839
6840	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6841	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6842
6843fi
6844
6845if test -n "$cf_new_extra_cppflags" ; then
6846
6847	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6848	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6849
6850fi
6851
6852	done
6853	;;
6854(*)
6855	echo "$as_me:6855: result: ok" >&5
6856echo "${ECHO_T}ok" >&6
6857	;;
6858esac
6859
6860echo "$as_me:6860: checking \$CC variable" >&5
6861echo $ECHO_N "checking \$CC variable... $ECHO_C" >&6
6862case "$CC" in
6863(*[\ \	]-*)
6864	echo "$as_me:6864: result: broken" >&5
6865echo "${ECHO_T}broken" >&6
6866	{ echo "$as_me:6866: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&5
6867echo "$as_me: WARNING: your environment uses the CC variable to hold CFLAGS/CPPFLAGS options" >&2;}
6868	# humor him...
6869	cf_prog=`echo "$CC" | sed -e 's/	/ /g' -e 's/[ ]* / /g' -e 's/[ ]*[ ]-[^ ].*//'`
6870	cf_flags=`echo "$CC" | ${AWK:-awk} -v prog="$cf_prog" '{ printf("%s", substr($0,1+length(prog))); }'`
6871	CC="$cf_prog"
6872	for cf_arg in $cf_flags
6873	do
6874		case "x$cf_arg" in
6875		(x-[IUDfgOW]*)
6876
6877cf_fix_cppflags=no
6878cf_new_cflags=
6879cf_new_cppflags=
6880cf_new_extra_cppflags=
6881
6882for cf_add_cflags in $cf_arg
6883do
6884case "$cf_fix_cppflags" in
6885(no)
6886	case "$cf_add_cflags" in
6887	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
6888		case "$cf_add_cflags" in
6889		(-D*)
6890			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
6891
6892			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6893				&& test -z "${cf_tst_cflags}" \
6894				&& cf_fix_cppflags=yes
6895
6896			if test "$cf_fix_cppflags" = yes ; then
6897
6898	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6899	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6900
6901				continue
6902			elif test "${cf_tst_cflags}" = "\"'" ; then
6903
6904	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6905	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6906
6907				continue
6908			fi
6909			;;
6910		esac
6911		case "$CPPFLAGS" in
6912		(*$cf_add_cflags)
6913			;;
6914		(*)
6915			case "$cf_add_cflags" in
6916			(-D*)
6917				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
6918
6919CPPFLAGS=`echo "$CPPFLAGS" | \
6920	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
6921		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
6922
6923				;;
6924			esac
6925
6926	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
6927	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
6928
6929			;;
6930		esac
6931		;;
6932	(*)
6933
6934	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
6935	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
6936
6937		;;
6938	esac
6939	;;
6940(yes)
6941
6942	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
6943	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
6944
6945	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
6946
6947	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
6948		&& test -z "${cf_tst_cflags}" \
6949		&& cf_fix_cppflags=no
6950	;;
6951esac
6952done
6953
6954if test -n "$cf_new_cflags" ; then
6955
6956	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
6957	CFLAGS="${CFLAGS}$cf_new_cflags"
6958
6959fi
6960
6961if test -n "$cf_new_cppflags" ; then
6962
6963	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
6964	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
6965
6966fi
6967
6968if test -n "$cf_new_extra_cppflags" ; then
6969
6970	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
6971	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
6972
6973fi
6974
6975			;;
6976		(*)
6977			CC="$CC $cf_arg"
6978			;;
6979		esac
6980	done
6981	test -n "$verbose" && echo "	resulting CC: '$CC'" 1>&6
6982
6983echo "${as_me:-configure}:6983: testing resulting CC: '$CC' ..." 1>&5
6984
6985	test -n "$verbose" && echo "	resulting CFLAGS: '$CFLAGS'" 1>&6
6986
6987echo "${as_me:-configure}:6987: testing resulting CFLAGS: '$CFLAGS' ..." 1>&5
6988
6989	test -n "$verbose" && echo "	resulting CPPFLAGS: '$CPPFLAGS'" 1>&6
6990
6991echo "${as_me:-configure}:6991: testing resulting CPPFLAGS: '$CPPFLAGS' ..." 1>&5
6992
6993	;;
6994(*)
6995	echo "$as_me:6995: result: ok" >&5
6996echo "${ECHO_T}ok" >&6
6997	;;
6998esac
6999
7000echo "$as_me:7000: checking for ${CC:-cc} option to accept ANSI C" >&5
7001echo $ECHO_N "checking for ${CC:-cc} option to accept ANSI C... $ECHO_C" >&6
7002if test "${cf_cv_ansi_cc+set}" = set; then
7003  echo $ECHO_N "(cached) $ECHO_C" >&6
7004else
7005
7006cf_cv_ansi_cc=no
7007cf_save_CFLAGS="$CFLAGS"
7008cf_save_CPPFLAGS="$CPPFLAGS"
7009# Don't try gcc -ansi; that turns off useful extensions and
7010# breaks some systems' header files.
7011# AIX			-qlanglvl=ansi
7012# Ultrix and OSF/1	-std1
7013# HP-UX			-Aa -D_HPUX_SOURCE
7014# SVR4			-Xc
7015# UnixWare 1.2		(cannot use -Xc, since ANSI/POSIX clashes)
7016for cf_arg in "-DCC_HAS_PROTOS" \
7017	"" \
7018	-qlanglvl=ansi \
7019	-std1 \
7020	-Ae \
7021	"-Aa -D_HPUX_SOURCE" \
7022	-Xc
7023do
7024
7025cf_fix_cppflags=no
7026cf_new_cflags=
7027cf_new_cppflags=
7028cf_new_extra_cppflags=
7029
7030for cf_add_cflags in $cf_arg
7031do
7032case "$cf_fix_cppflags" in
7033(no)
7034	case "$cf_add_cflags" in
7035	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7036		case "$cf_add_cflags" in
7037		(-D*)
7038			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7039
7040			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7041				&& test -z "${cf_tst_cflags}" \
7042				&& cf_fix_cppflags=yes
7043
7044			if test "$cf_fix_cppflags" = yes ; then
7045
7046	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7047	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7048
7049				continue
7050			elif test "${cf_tst_cflags}" = "\"'" ; then
7051
7052	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7053	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7054
7055				continue
7056			fi
7057			;;
7058		esac
7059		case "$CPPFLAGS" in
7060		(*$cf_add_cflags)
7061			;;
7062		(*)
7063			case "$cf_add_cflags" in
7064			(-D*)
7065				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7066
7067CPPFLAGS=`echo "$CPPFLAGS" | \
7068	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7069		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7070
7071				;;
7072			esac
7073
7074	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7075	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7076
7077			;;
7078		esac
7079		;;
7080	(*)
7081
7082	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7083	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7084
7085		;;
7086	esac
7087	;;
7088(yes)
7089
7090	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7091	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7092
7093	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7094
7095	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7096		&& test -z "${cf_tst_cflags}" \
7097		&& cf_fix_cppflags=no
7098	;;
7099esac
7100done
7101
7102if test -n "$cf_new_cflags" ; then
7103
7104	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7105	CFLAGS="${CFLAGS}$cf_new_cflags"
7106
7107fi
7108
7109if test -n "$cf_new_cppflags" ; then
7110
7111	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7112	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7113
7114fi
7115
7116if test -n "$cf_new_extra_cppflags" ; then
7117
7118	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7119	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7120
7121fi
7122
7123	cat >"conftest.$ac_ext" <<_ACEOF
7124#line 7124 "configure"
7125#include "confdefs.h"
7126
7127#ifndef CC_HAS_PROTOS
7128#if !defined(__STDC__) || (__STDC__ != 1)
7129choke me
7130#endif
7131#endif
7132
7133int
7134main (void)
7135{
7136
7137	int test (int i, double x);
7138	struct s1 {int (*f) (int a);};
7139	struct s2 {int (*f) (double a);};
7140  ;
7141  return 0;
7142}
7143_ACEOF
7144rm -f "conftest.$ac_objext"
7145if { (eval echo "$as_me:7145: \"$ac_compile\"") >&5
7146  (eval $ac_compile) 2>&5
7147  ac_status=$?
7148  echo "$as_me:7148: \$? = $ac_status" >&5
7149  (exit "$ac_status"); } &&
7150         { ac_try='test -s "conftest.$ac_objext"'
7151  { (eval echo "$as_me:7151: \"$ac_try\"") >&5
7152  (eval $ac_try) 2>&5
7153  ac_status=$?
7154  echo "$as_me:7154: \$? = $ac_status" >&5
7155  (exit "$ac_status"); }; }; then
7156  cf_cv_ansi_cc="$cf_arg"; break
7157else
7158  echo "$as_me: failed program was:" >&5
7159cat "conftest.$ac_ext" >&5
7160fi
7161rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7162done
7163CFLAGS="$cf_save_CFLAGS"
7164CPPFLAGS="$cf_save_CPPFLAGS"
7165
7166fi
7167echo "$as_me:7167: result: $cf_cv_ansi_cc" >&5
7168echo "${ECHO_T}$cf_cv_ansi_cc" >&6
7169
7170if test "$cf_cv_ansi_cc" != "no"; then
7171if test ".$cf_cv_ansi_cc" != ".-DCC_HAS_PROTOS"; then
7172
7173cf_fix_cppflags=no
7174cf_new_cflags=
7175cf_new_cppflags=
7176cf_new_extra_cppflags=
7177
7178for cf_add_cflags in $cf_cv_ansi_cc
7179do
7180case "$cf_fix_cppflags" in
7181(no)
7182	case "$cf_add_cflags" in
7183	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
7184		case "$cf_add_cflags" in
7185		(-D*)
7186			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
7187
7188			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7189				&& test -z "${cf_tst_cflags}" \
7190				&& cf_fix_cppflags=yes
7191
7192			if test "$cf_fix_cppflags" = yes ; then
7193
7194	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7195	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7196
7197				continue
7198			elif test "${cf_tst_cflags}" = "\"'" ; then
7199
7200	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7201	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7202
7203				continue
7204			fi
7205			;;
7206		esac
7207		case "$CPPFLAGS" in
7208		(*$cf_add_cflags)
7209			;;
7210		(*)
7211			case "$cf_add_cflags" in
7212			(-D*)
7213				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
7214
7215CPPFLAGS=`echo "$CPPFLAGS" | \
7216	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
7217		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
7218
7219				;;
7220			esac
7221
7222	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
7223	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
7224
7225			;;
7226		esac
7227		;;
7228	(*)
7229
7230	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
7231	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
7232
7233		;;
7234	esac
7235	;;
7236(yes)
7237
7238	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
7239	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
7240
7241	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
7242
7243	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
7244		&& test -z "${cf_tst_cflags}" \
7245		&& cf_fix_cppflags=no
7246	;;
7247esac
7248done
7249
7250if test -n "$cf_new_cflags" ; then
7251
7252	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
7253	CFLAGS="${CFLAGS}$cf_new_cflags"
7254
7255fi
7256
7257if test -n "$cf_new_cppflags" ; then
7258
7259	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7260	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
7261
7262fi
7263
7264if test -n "$cf_new_extra_cppflags" ; then
7265
7266	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
7267	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
7268
7269fi
7270
7271else
7272
7273cat >>confdefs.h <<\EOF
7274#define CC_HAS_PROTOS 1
7275EOF
7276
7277fi
7278fi
7279
7280if test "$cf_cv_ansi_cc" = "no"; then
7281	{ { echo "$as_me:7281: error: Your compiler does not appear to recognize prototypes.
7282You have the following choices:
7283	a. adjust your compiler options
7284	b. get an up-to-date compiler
7285	c. use a wrapper such as unproto" >&5
7286echo "$as_me: error: Your compiler does not appear to recognize prototypes.
7287You have the following choices:
7288	a. adjust your compiler options
7289	b. get an up-to-date compiler
7290	c. use a wrapper such as unproto" >&2;}
7291   { (exit 1); exit 1; }; }
7292fi
7293
7294# Check whether --enable-largefile or --disable-largefile was given.
7295if test "${enable_largefile+set}" = set; then
7296  enableval="$enable_largefile"
7297
7298fi;
7299if test "$enable_largefile" != no; then
7300
7301  echo "$as_me:7301: checking for special C compiler options needed for large files" >&5
7302echo $ECHO_N "checking for special C compiler options needed for large files... $ECHO_C" >&6
7303if test "${ac_cv_sys_largefile_CC+set}" = set; then
7304  echo $ECHO_N "(cached) $ECHO_C" >&6
7305else
7306  ac_cv_sys_largefile_CC=no
7307     if test "$GCC" != yes; then
7308       ac_save_CC=$CC
7309       while :; do
7310     	 # IRIX 6.2 and later do not support large files by default,
7311     	 # so use the C compiler's -n32 option if that helps.
7312         cat >"conftest.$ac_ext" <<_ACEOF
7313#line 7313 "configure"
7314#include "confdefs.h"
7315#include <sys/types.h>
7316 /* Check that off_t can represent 2**63 - 1 correctly.
7317    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7318    since some C++ compilers masquerading as C compilers
7319    incorrectly reject 9223372036854775807.  */
7320#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7321  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7322		       && LARGE_OFF_T % 2147483647 == 1)
7323		      ? 1 : -1];
7324int
7325main (void)
7326{
7327
7328  ;
7329  return 0;
7330}
7331_ACEOF
7332     	 rm -f "conftest.$ac_objext"
7333if { (eval echo "$as_me:7333: \"$ac_compile\"") >&5
7334  (eval $ac_compile) 2>&5
7335  ac_status=$?
7336  echo "$as_me:7336: \$? = $ac_status" >&5
7337  (exit "$ac_status"); } &&
7338         { ac_try='test -s "conftest.$ac_objext"'
7339  { (eval echo "$as_me:7339: \"$ac_try\"") >&5
7340  (eval $ac_try) 2>&5
7341  ac_status=$?
7342  echo "$as_me:7342: \$? = $ac_status" >&5
7343  (exit "$ac_status"); }; }; then
7344  break
7345else
7346  echo "$as_me: failed program was:" >&5
7347cat "conftest.$ac_ext" >&5
7348fi
7349rm -f "conftest.$ac_objext"
7350     	 CC="$CC -n32"
7351     	 rm -f "conftest.$ac_objext"
7352if { (eval echo "$as_me:7352: \"$ac_compile\"") >&5
7353  (eval $ac_compile) 2>&5
7354  ac_status=$?
7355  echo "$as_me:7355: \$? = $ac_status" >&5
7356  (exit "$ac_status"); } &&
7357         { ac_try='test -s "conftest.$ac_objext"'
7358  { (eval echo "$as_me:7358: \"$ac_try\"") >&5
7359  (eval $ac_try) 2>&5
7360  ac_status=$?
7361  echo "$as_me:7361: \$? = $ac_status" >&5
7362  (exit "$ac_status"); }; }; then
7363  ac_cv_sys_largefile_CC=' -n32'; break
7364else
7365  echo "$as_me: failed program was:" >&5
7366cat "conftest.$ac_ext" >&5
7367fi
7368rm -f "conftest.$ac_objext"
7369         break
7370       done
7371       CC=$ac_save_CC
7372       rm -f "conftest.$ac_ext"
7373    fi
7374fi
7375echo "$as_me:7375: result: $ac_cv_sys_largefile_CC" >&5
7376echo "${ECHO_T}$ac_cv_sys_largefile_CC" >&6
7377  if test "$ac_cv_sys_largefile_CC" != no; then
7378    CC=$CC$ac_cv_sys_largefile_CC
7379  fi
7380
7381  echo "$as_me:7381: checking for _FILE_OFFSET_BITS value needed for large files" >&5
7382echo $ECHO_N "checking for _FILE_OFFSET_BITS value needed for large files... $ECHO_C" >&6
7383if test "${ac_cv_sys_file_offset_bits+set}" = set; then
7384  echo $ECHO_N "(cached) $ECHO_C" >&6
7385else
7386  while :; do
7387  ac_cv_sys_file_offset_bits=no
7388  cat >"conftest.$ac_ext" <<_ACEOF
7389#line 7389 "configure"
7390#include "confdefs.h"
7391#include <sys/types.h>
7392 /* Check that off_t can represent 2**63 - 1 correctly.
7393    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7394    since some C++ compilers masquerading as C compilers
7395    incorrectly reject 9223372036854775807.  */
7396#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7397  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7398		       && LARGE_OFF_T % 2147483647 == 1)
7399		      ? 1 : -1];
7400int
7401main (void)
7402{
7403
7404  ;
7405  return 0;
7406}
7407_ACEOF
7408rm -f "conftest.$ac_objext"
7409if { (eval echo "$as_me:7409: \"$ac_compile\"") >&5
7410  (eval $ac_compile) 2>&5
7411  ac_status=$?
7412  echo "$as_me:7412: \$? = $ac_status" >&5
7413  (exit "$ac_status"); } &&
7414         { ac_try='test -s "conftest.$ac_objext"'
7415  { (eval echo "$as_me:7415: \"$ac_try\"") >&5
7416  (eval $ac_try) 2>&5
7417  ac_status=$?
7418  echo "$as_me:7418: \$? = $ac_status" >&5
7419  (exit "$ac_status"); }; }; then
7420  break
7421else
7422  echo "$as_me: failed program was:" >&5
7423cat "conftest.$ac_ext" >&5
7424fi
7425rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7426  cat >"conftest.$ac_ext" <<_ACEOF
7427#line 7427 "configure"
7428#include "confdefs.h"
7429#define _FILE_OFFSET_BITS 64
7430#include <sys/types.h>
7431 /* Check that off_t can represent 2**63 - 1 correctly.
7432    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7433    since some C++ compilers masquerading as C compilers
7434    incorrectly reject 9223372036854775807.  */
7435#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7436  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7437		       && LARGE_OFF_T % 2147483647 == 1)
7438		      ? 1 : -1];
7439int
7440main (void)
7441{
7442
7443  ;
7444  return 0;
7445}
7446_ACEOF
7447rm -f "conftest.$ac_objext"
7448if { (eval echo "$as_me:7448: \"$ac_compile\"") >&5
7449  (eval $ac_compile) 2>&5
7450  ac_status=$?
7451  echo "$as_me:7451: \$? = $ac_status" >&5
7452  (exit "$ac_status"); } &&
7453         { ac_try='test -s "conftest.$ac_objext"'
7454  { (eval echo "$as_me:7454: \"$ac_try\"") >&5
7455  (eval $ac_try) 2>&5
7456  ac_status=$?
7457  echo "$as_me:7457: \$? = $ac_status" >&5
7458  (exit "$ac_status"); }; }; then
7459  ac_cv_sys_file_offset_bits=64; break
7460else
7461  echo "$as_me: failed program was:" >&5
7462cat "conftest.$ac_ext" >&5
7463fi
7464rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7465  break
7466done
7467fi
7468echo "$as_me:7468: result: $ac_cv_sys_file_offset_bits" >&5
7469echo "${ECHO_T}$ac_cv_sys_file_offset_bits" >&6
7470if test "$ac_cv_sys_file_offset_bits" != no; then
7471
7472cat >>confdefs.h <<EOF
7473#define _FILE_OFFSET_BITS $ac_cv_sys_file_offset_bits
7474EOF
7475
7476fi
7477rm -rf conftest*
7478  echo "$as_me:7478: checking for _LARGE_FILES value needed for large files" >&5
7479echo $ECHO_N "checking for _LARGE_FILES value needed for large files... $ECHO_C" >&6
7480if test "${ac_cv_sys_large_files+set}" = set; then
7481  echo $ECHO_N "(cached) $ECHO_C" >&6
7482else
7483  while :; do
7484  ac_cv_sys_large_files=no
7485  cat >"conftest.$ac_ext" <<_ACEOF
7486#line 7486 "configure"
7487#include "confdefs.h"
7488#include <sys/types.h>
7489 /* Check that off_t can represent 2**63 - 1 correctly.
7490    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7491    since some C++ compilers masquerading as C compilers
7492    incorrectly reject 9223372036854775807.  */
7493#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7494  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7495		       && LARGE_OFF_T % 2147483647 == 1)
7496		      ? 1 : -1];
7497int
7498main (void)
7499{
7500
7501  ;
7502  return 0;
7503}
7504_ACEOF
7505rm -f "conftest.$ac_objext"
7506if { (eval echo "$as_me:7506: \"$ac_compile\"") >&5
7507  (eval $ac_compile) 2>&5
7508  ac_status=$?
7509  echo "$as_me:7509: \$? = $ac_status" >&5
7510  (exit "$ac_status"); } &&
7511         { ac_try='test -s "conftest.$ac_objext"'
7512  { (eval echo "$as_me:7512: \"$ac_try\"") >&5
7513  (eval $ac_try) 2>&5
7514  ac_status=$?
7515  echo "$as_me:7515: \$? = $ac_status" >&5
7516  (exit "$ac_status"); }; }; then
7517  break
7518else
7519  echo "$as_me: failed program was:" >&5
7520cat "conftest.$ac_ext" >&5
7521fi
7522rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7523  cat >"conftest.$ac_ext" <<_ACEOF
7524#line 7524 "configure"
7525#include "confdefs.h"
7526#define _LARGE_FILES 1
7527#include <sys/types.h>
7528 /* Check that off_t can represent 2**63 - 1 correctly.
7529    We can't simply define LARGE_OFF_T to be 9223372036854775807,
7530    since some C++ compilers masquerading as C compilers
7531    incorrectly reject 9223372036854775807.  */
7532#define LARGE_OFF_T (((off_t) 1 << 62) - 1 + ((off_t) 1 << 62))
7533  int off_t_is_large[(LARGE_OFF_T % 2147483629 == 721
7534		       && LARGE_OFF_T % 2147483647 == 1)
7535		      ? 1 : -1];
7536int
7537main (void)
7538{
7539
7540  ;
7541  return 0;
7542}
7543_ACEOF
7544rm -f "conftest.$ac_objext"
7545if { (eval echo "$as_me:7545: \"$ac_compile\"") >&5
7546  (eval $ac_compile) 2>&5
7547  ac_status=$?
7548  echo "$as_me:7548: \$? = $ac_status" >&5
7549  (exit "$ac_status"); } &&
7550         { ac_try='test -s "conftest.$ac_objext"'
7551  { (eval echo "$as_me:7551: \"$ac_try\"") >&5
7552  (eval $ac_try) 2>&5
7553  ac_status=$?
7554  echo "$as_me:7554: \$? = $ac_status" >&5
7555  (exit "$ac_status"); }; }; then
7556  ac_cv_sys_large_files=1; break
7557else
7558  echo "$as_me: failed program was:" >&5
7559cat "conftest.$ac_ext" >&5
7560fi
7561rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7562  break
7563done
7564fi
7565echo "$as_me:7565: result: $ac_cv_sys_large_files" >&5
7566echo "${ECHO_T}$ac_cv_sys_large_files" >&6
7567if test "$ac_cv_sys_large_files" != no; then
7568
7569cat >>confdefs.h <<EOF
7570#define _LARGE_FILES $ac_cv_sys_large_files
7571EOF
7572
7573fi
7574rm -rf conftest*
7575fi
7576
7577	if test "$enable_largefile" != no ; then
7578	echo "$as_me:7578: checking for _LARGEFILE_SOURCE value needed for large files" >&5
7579echo $ECHO_N "checking for _LARGEFILE_SOURCE value needed for large files... $ECHO_C" >&6
7580if test "${ac_cv_sys_largefile_source+set}" = set; then
7581  echo $ECHO_N "(cached) $ECHO_C" >&6
7582else
7583  while :; do
7584  ac_cv_sys_largefile_source=no
7585  cat >"conftest.$ac_ext" <<_ACEOF
7586#line 7586 "configure"
7587#include "confdefs.h"
7588#include <stdio.h>
7589int
7590main (void)
7591{
7592return !fseeko;
7593  ;
7594  return 0;
7595}
7596_ACEOF
7597rm -f "conftest.$ac_objext"
7598if { (eval echo "$as_me:7598: \"$ac_compile\"") >&5
7599  (eval $ac_compile) 2>&5
7600  ac_status=$?
7601  echo "$as_me:7601: \$? = $ac_status" >&5
7602  (exit "$ac_status"); } &&
7603         { ac_try='test -s "conftest.$ac_objext"'
7604  { (eval echo "$as_me:7604: \"$ac_try\"") >&5
7605  (eval $ac_try) 2>&5
7606  ac_status=$?
7607  echo "$as_me:7607: \$? = $ac_status" >&5
7608  (exit "$ac_status"); }; }; then
7609  break
7610else
7611  echo "$as_me: failed program was:" >&5
7612cat "conftest.$ac_ext" >&5
7613fi
7614rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7615  cat >"conftest.$ac_ext" <<_ACEOF
7616#line 7616 "configure"
7617#include "confdefs.h"
7618#define _LARGEFILE_SOURCE 1
7619#include <stdio.h>
7620int
7621main (void)
7622{
7623return !fseeko;
7624  ;
7625  return 0;
7626}
7627_ACEOF
7628rm -f "conftest.$ac_objext"
7629if { (eval echo "$as_me:7629: \"$ac_compile\"") >&5
7630  (eval $ac_compile) 2>&5
7631  ac_status=$?
7632  echo "$as_me:7632: \$? = $ac_status" >&5
7633  (exit "$ac_status"); } &&
7634         { ac_try='test -s "conftest.$ac_objext"'
7635  { (eval echo "$as_me:7635: \"$ac_try\"") >&5
7636  (eval $ac_try) 2>&5
7637  ac_status=$?
7638  echo "$as_me:7638: \$? = $ac_status" >&5
7639  (exit "$ac_status"); }; }; then
7640  ac_cv_sys_largefile_source=1; break
7641else
7642  echo "$as_me: failed program was:" >&5
7643cat "conftest.$ac_ext" >&5
7644fi
7645rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7646  break
7647done
7648fi
7649echo "$as_me:7649: result: $ac_cv_sys_largefile_source" >&5
7650echo "${ECHO_T}$ac_cv_sys_largefile_source" >&6
7651if test "$ac_cv_sys_largefile_source" != no; then
7652
7653cat >>confdefs.h <<EOF
7654#define _LARGEFILE_SOURCE $ac_cv_sys_largefile_source
7655EOF
7656
7657fi
7658rm -rf conftest*
7659
7660# We used to try defining _XOPEN_SOURCE=500 too, to work around a bug
7661# in glibc 2.1.3, but that breaks too many other things.
7662# If you want fseeko and ftello with glibc, upgrade to a fixed glibc.
7663echo "$as_me:7663: checking for fseeko" >&5
7664echo $ECHO_N "checking for fseeko... $ECHO_C" >&6
7665if test "${ac_cv_func_fseeko+set}" = set; then
7666  echo $ECHO_N "(cached) $ECHO_C" >&6
7667else
7668  cat >"conftest.$ac_ext" <<_ACEOF
7669#line 7669 "configure"
7670#include "confdefs.h"
7671#include <stdio.h>
7672int
7673main (void)
7674{
7675return fseeko && fseeko (stdin, 0, 0);
7676  ;
7677  return 0;
7678}
7679_ACEOF
7680rm -f "conftest.$ac_objext" "conftest$ac_exeext"
7681if { (eval echo "$as_me:7681: \"$ac_link\"") >&5
7682  (eval $ac_link) 2>&5
7683  ac_status=$?
7684  echo "$as_me:7684: \$? = $ac_status" >&5
7685  (exit "$ac_status"); } &&
7686         { ac_try='test -s "conftest$ac_exeext"'
7687  { (eval echo "$as_me:7687: \"$ac_try\"") >&5
7688  (eval $ac_try) 2>&5
7689  ac_status=$?
7690  echo "$as_me:7690: \$? = $ac_status" >&5
7691  (exit "$ac_status"); }; }; then
7692  ac_cv_func_fseeko=yes
7693else
7694  echo "$as_me: failed program was:" >&5
7695cat "conftest.$ac_ext" >&5
7696ac_cv_func_fseeko=no
7697fi
7698rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
7699fi
7700echo "$as_me:7700: result: $ac_cv_func_fseeko" >&5
7701echo "${ECHO_T}$ac_cv_func_fseeko" >&6
7702if test $ac_cv_func_fseeko = yes; then
7703
7704cat >>confdefs.h <<\EOF
7705#define HAVE_FSEEKO 1
7706EOF
7707
7708fi
7709
7710	# Normally we would collect these definitions in the config.h,
7711	# but (like _XOPEN_SOURCE), some environments rely on having these
7712	# defined before any of the system headers are included.  Another
7713	# case comes up with C++, e.g., on AIX the compiler compiles the
7714	# header files by themselves before looking at the body files it is
7715	# told to compile.  For ncurses, those header files do not include
7716	# the config.h
7717	if test "$ac_cv_sys_large_files" != no
7718	then
7719
7720	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7721	CPPFLAGS="${CPPFLAGS}-D_LARGE_FILES"
7722
7723	fi
7724	if test "$ac_cv_sys_largefile_source" != no
7725	then
7726
7727	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7728	CPPFLAGS="${CPPFLAGS}-D_LARGEFILE_SOURCE"
7729
7730	fi
7731	if test "$ac_cv_sys_file_offset_bits" != no
7732	then
7733
7734	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
7735	CPPFLAGS="${CPPFLAGS}-D_FILE_OFFSET_BITS=$ac_cv_sys_file_offset_bits"
7736
7737	fi
7738
7739	echo "$as_me:7739: checking whether to use struct dirent64" >&5
7740echo $ECHO_N "checking whether to use struct dirent64... $ECHO_C" >&6
7741if test "${cf_cv_struct_dirent64+set}" = set; then
7742  echo $ECHO_N "(cached) $ECHO_C" >&6
7743else
7744
7745		cat >"conftest.$ac_ext" <<_ACEOF
7746#line 7746 "configure"
7747#include "confdefs.h"
7748
7749#pragma GCC diagnostic error "-Wincompatible-pointer-types"
7750#include <sys/types.h>
7751#include <dirent.h>
7752
7753int
7754main (void)
7755{
7756
7757		/* if transitional largefile support is setup, this is true */
7758		extern struct dirent64 * readdir(DIR *);
7759		struct dirent64 *x = readdir((DIR *)0);
7760		struct dirent *y = readdir((DIR *)0);
7761		int z = x - y;
7762		(void)z;
7763
7764  ;
7765  return 0;
7766}
7767_ACEOF
7768rm -f "conftest.$ac_objext"
7769if { (eval echo "$as_me:7769: \"$ac_compile\"") >&5
7770  (eval $ac_compile) 2>&5
7771  ac_status=$?
7772  echo "$as_me:7772: \$? = $ac_status" >&5
7773  (exit "$ac_status"); } &&
7774         { ac_try='test -s "conftest.$ac_objext"'
7775  { (eval echo "$as_me:7775: \"$ac_try\"") >&5
7776  (eval $ac_try) 2>&5
7777  ac_status=$?
7778  echo "$as_me:7778: \$? = $ac_status" >&5
7779  (exit "$ac_status"); }; }; then
7780  cf_cv_struct_dirent64=yes
7781else
7782  echo "$as_me: failed program was:" >&5
7783cat "conftest.$ac_ext" >&5
7784cf_cv_struct_dirent64=no
7785fi
7786rm -f "conftest.$ac_objext" "conftest.$ac_ext"
7787
7788fi
7789echo "$as_me:7789: result: $cf_cv_struct_dirent64" >&5
7790echo "${ECHO_T}$cf_cv_struct_dirent64" >&6
7791	test "$cf_cv_struct_dirent64" = yes &&
7792cat >>confdefs.h <<\EOF
7793#define HAVE_STRUCT_DIRENT64 1
7794EOF
7795
7796	fi
7797
7798if test -z "$ALL_LINGUAS" ; then
7799	ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
7800
7801	echo "$as_me:7801: checking for PATH separator" >&5
7802echo $ECHO_N "checking for PATH separator... $ECHO_C" >&6
7803	case "$cf_cv_system_name" in
7804	(os2*)	PATH_SEPARATOR=';'  ;;
7805	(*)	${PATH_SEPARATOR:=':'}  ;;
7806	esac
7807
7808	echo "$as_me:7808: result: $PATH_SEPARATOR" >&5
7809echo "${ECHO_T}$PATH_SEPARATOR" >&6
7810
7811# Extract the first word of "msginit", so it can be a program name with args.
7812
7813set dummy msginit; ac_word=$2
7814echo "$as_me:7814: checking for $ac_word" >&5
7815echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7816if test "${ac_cv_path_MSGINIT+set}" = set; then
7817  echo $ECHO_N "(cached) $ECHO_C" >&6
7818else
7819  case "$MSGINIT" in
7820  ([\\/]*|?:[\\/]*)
7821  ac_cv_path_MSGINIT="$MSGINIT" # Let the user override the test with a path.
7822  ;;
7823  (*)
7824  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
7825  for ac_dir in $PATH; do
7826    test -z "$ac_dir" && ac_dir=.
7827    if test -f "$ac_dir/$ac_word$ac_exeext" ; then
7828      if "$ac_dir/$ac_word" --no-translator --version /dev/null >/dev/null 2>&1; then
7829	ac_cv_path_MSGINIT="$ac_dir/$ac_word$ac_exeext"
7830	break
7831      fi
7832    fi
7833  done
7834  IFS="$ac_save_ifs"
7835  test -z "$ac_cv_path_MSGINIT" && ac_cv_path_MSGINIT=":"
7836  ;;
7837esac
7838fi
7839MSGINIT="$ac_cv_path_MSGINIT"
7840if test "$MSGINIT" != ":"; then
7841  echo "$as_me:7841: result: $MSGINIT" >&5
7842echo "${ECHO_T}$MSGINIT" >&6
7843else
7844  echo "$as_me:7844: result: no" >&5
7845echo "${ECHO_T}no" >&6
7846fi
7847
7848	if test "$MSGINIT" != ":" ; then
7849		test -n "$verbose" && echo "	adding en.po" 1>&6
7850
7851echo "${as_me:-configure}:7851: testing adding en.po ..." 1>&5
7852
7853		ALL_LINGUAS="$ALL_LINGUAS en"
7854	fi
7855fi
7856
7857if test -n "$ac_tool_prefix"; then
7858  # Extract the first word of "${ac_tool_prefix}ranlib", so it can be a program name with args.
7859set dummy ${ac_tool_prefix}ranlib; ac_word=$2
7860echo "$as_me:7860: checking for $ac_word" >&5
7861echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7862if test "${ac_cv_prog_RANLIB+set}" = set; then
7863  echo $ECHO_N "(cached) $ECHO_C" >&6
7864else
7865  if test -n "$RANLIB"; then
7866  ac_cv_prog_RANLIB="$RANLIB" # Let the user override the test.
7867else
7868  ac_save_IFS=$IFS; IFS=$ac_path_separator
7869ac_dummy="$PATH"
7870for ac_dir in $ac_dummy; do
7871  IFS=$ac_save_IFS
7872  test -z "$ac_dir" && ac_dir=.
7873  $as_executable_p "$ac_dir/$ac_word" || continue
7874ac_cv_prog_RANLIB="${ac_tool_prefix}ranlib"
7875echo "$as_me:7875: found $ac_dir/$ac_word" >&5
7876break
7877done
7878
7879fi
7880fi
7881RANLIB=$ac_cv_prog_RANLIB
7882if test -n "$RANLIB"; then
7883  echo "$as_me:7883: result: $RANLIB" >&5
7884echo "${ECHO_T}$RANLIB" >&6
7885else
7886  echo "$as_me:7886: result: no" >&5
7887echo "${ECHO_T}no" >&6
7888fi
7889
7890fi
7891if test -z "$ac_cv_prog_RANLIB"; then
7892  ac_ct_RANLIB=$RANLIB
7893  # Extract the first word of "ranlib", so it can be a program name with args.
7894set dummy ranlib; ac_word=$2
7895echo "$as_me:7895: checking for $ac_word" >&5
7896echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
7897if test "${ac_cv_prog_ac_ct_RANLIB+set}" = set; then
7898  echo $ECHO_N "(cached) $ECHO_C" >&6
7899else
7900  if test -n "$ac_ct_RANLIB"; then
7901  ac_cv_prog_ac_ct_RANLIB="$ac_ct_RANLIB" # Let the user override the test.
7902else
7903  ac_save_IFS=$IFS; IFS=$ac_path_separator
7904ac_dummy="$PATH"
7905for ac_dir in $ac_dummy; do
7906  IFS=$ac_save_IFS
7907  test -z "$ac_dir" && ac_dir=.
7908  $as_executable_p "$ac_dir/$ac_word" || continue
7909ac_cv_prog_ac_ct_RANLIB="ranlib"
7910echo "$as_me:7910: found $ac_dir/$ac_word" >&5
7911break
7912done
7913
7914  test -z "$ac_cv_prog_ac_ct_RANLIB" && ac_cv_prog_ac_ct_RANLIB=":"
7915fi
7916fi
7917ac_ct_RANLIB=$ac_cv_prog_ac_ct_RANLIB
7918if test -n "$ac_ct_RANLIB"; then
7919  echo "$as_me:7919: result: $ac_ct_RANLIB" >&5
7920echo "${ECHO_T}$ac_ct_RANLIB" >&6
7921else
7922  echo "$as_me:7922: result: no" >&5
7923echo "${ECHO_T}no" >&6
7924fi
7925
7926  RANLIB=$ac_ct_RANLIB
7927else
7928  RANLIB="$ac_cv_prog_RANLIB"
7929fi
7930
7931echo "$as_me:7931: checking for ANSI C header files" >&5
7932echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
7933if test "${ac_cv_header_stdc+set}" = set; then
7934  echo $ECHO_N "(cached) $ECHO_C" >&6
7935else
7936  cat >"conftest.$ac_ext" <<_ACEOF
7937#line 7937 "configure"
7938#include "confdefs.h"
7939#include <stdlib.h>
7940#include <stdarg.h>
7941#include <string.h>
7942#include <float.h>
7943
7944_ACEOF
7945if { (eval echo "$as_me:7945: \"$ac_cpp "conftest.$ac_ext"\"") >&5
7946  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
7947  ac_status=$?
7948  $EGREP -v '^ *\+' conftest.er1 >conftest.err
7949  rm -f conftest.er1
7950  cat conftest.err >&5
7951  echo "$as_me:7951: \$? = $ac_status" >&5
7952  (exit "$ac_status"); } >/dev/null; then
7953  if test -s conftest.err; then
7954    ac_cpp_err=$ac_c_preproc_warn_flag
7955  else
7956    ac_cpp_err=
7957  fi
7958else
7959  ac_cpp_err=yes
7960fi
7961if test -z "$ac_cpp_err"; then
7962  ac_cv_header_stdc=yes
7963else
7964  echo "$as_me: failed program was:" >&5
7965  cat "conftest.$ac_ext" >&5
7966  ac_cv_header_stdc=no
7967fi
7968rm -f conftest.err "conftest.$ac_ext"
7969
7970if test $ac_cv_header_stdc = yes; then
7971  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
7972  cat >"conftest.$ac_ext" <<_ACEOF
7973#line 7973 "configure"
7974#include "confdefs.h"
7975#include <string.h>
7976
7977_ACEOF
7978if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7979  $EGREP "memchr" >/dev/null 2>&1; then
7980  :
7981else
7982  ac_cv_header_stdc=no
7983fi
7984rm -rf conftest*
7985
7986fi
7987
7988if test $ac_cv_header_stdc = yes; then
7989  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
7990  cat >"conftest.$ac_ext" <<_ACEOF
7991#line 7991 "configure"
7992#include "confdefs.h"
7993#include <stdlib.h>
7994
7995_ACEOF
7996if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
7997  $EGREP "free" >/dev/null 2>&1; then
7998  :
7999else
8000  ac_cv_header_stdc=no
8001fi
8002rm -rf conftest*
8003
8004fi
8005
8006if test $ac_cv_header_stdc = yes; then
8007  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
8008  if test "$cross_compiling" = yes; then
8009  :
8010else
8011  cat >"conftest.$ac_ext" <<_ACEOF
8012#line 8012 "configure"
8013#include "confdefs.h"
8014#include <ctype.h>
8015#if ((' ' & 0x0FF) == 0x020)
8016# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
8017# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
8018#else
8019# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
8020                     || ('j' <= (c) && (c) <= 'r') \
8021                     || ('s' <= (c) && (c) <= 'z'))
8022# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
8023#endif
8024
8025#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
8026int
8027main (void)
8028{
8029  int i;
8030  for (i = 0; i < 256; i++)
8031    if (XOR (islower (i), ISLOWER (i))
8032        || toupper (i) != TOUPPER (i))
8033      $ac_main_return(2);
8034  $ac_main_return (0);
8035}
8036_ACEOF
8037rm -f "conftest$ac_exeext"
8038if { (eval echo "$as_me:8038: \"$ac_link\"") >&5
8039  (eval $ac_link) 2>&5
8040  ac_status=$?
8041  echo "$as_me:8041: \$? = $ac_status" >&5
8042  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8043  { (eval echo "$as_me:8043: \"$ac_try\"") >&5
8044  (eval $ac_try) 2>&5
8045  ac_status=$?
8046  echo "$as_me:8046: \$? = $ac_status" >&5
8047  (exit "$ac_status"); }; }; then
8048  :
8049else
8050  echo "$as_me: program exited with status $ac_status" >&5
8051echo "$as_me: failed program was:" >&5
8052cat "conftest.$ac_ext" >&5
8053ac_cv_header_stdc=no
8054fi
8055rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8056fi
8057fi
8058fi
8059echo "$as_me:8059: result: $ac_cv_header_stdc" >&5
8060echo "${ECHO_T}$ac_cv_header_stdc" >&6
8061if test $ac_cv_header_stdc = yes; then
8062
8063cat >>confdefs.h <<\EOF
8064#define STDC_HEADERS 1
8065EOF
8066
8067fi
8068
8069echo "$as_me:8069: checking for inline" >&5
8070echo $ECHO_N "checking for inline... $ECHO_C" >&6
8071if test "${ac_cv_c_inline+set}" = set; then
8072  echo $ECHO_N "(cached) $ECHO_C" >&6
8073else
8074  ac_cv_c_inline=no
8075for ac_kw in inline __inline__ __inline; do
8076  cat >"conftest.$ac_ext" <<_ACEOF
8077#line 8077 "configure"
8078#include "confdefs.h"
8079#ifndef __cplusplus
8080static $ac_kw int static_foo () {return 0; }
8081$ac_kw int foo () {return 0; }
8082#endif
8083
8084_ACEOF
8085rm -f "conftest.$ac_objext"
8086if { (eval echo "$as_me:8086: \"$ac_compile\"") >&5
8087  (eval $ac_compile) 2>&5
8088  ac_status=$?
8089  echo "$as_me:8089: \$? = $ac_status" >&5
8090  (exit "$ac_status"); } &&
8091         { ac_try='test -s "conftest.$ac_objext"'
8092  { (eval echo "$as_me:8092: \"$ac_try\"") >&5
8093  (eval $ac_try) 2>&5
8094  ac_status=$?
8095  echo "$as_me:8095: \$? = $ac_status" >&5
8096  (exit "$ac_status"); }; }; then
8097  ac_cv_c_inline=$ac_kw; break
8098else
8099  echo "$as_me: failed program was:" >&5
8100cat "conftest.$ac_ext" >&5
8101fi
8102rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8103done
8104
8105fi
8106echo "$as_me:8106: result: $ac_cv_c_inline" >&5
8107echo "${ECHO_T}$ac_cv_c_inline" >&6
8108case $ac_cv_c_inline in
8109  inline | yes) ;;
8110  no)
8111cat >>confdefs.h <<\EOF
8112#define inline
8113EOF
8114 ;;
8115  *)  cat >>confdefs.h <<EOF
8116#define inline $ac_cv_c_inline
8117EOF
8118 ;;
8119esac
8120
8121# On IRIX 5.3, sys/types and inttypes.h are conflicting.
8122
8123for ac_header in sys/types.h sys/stat.h stdlib.h string.h memory.h strings.h \
8124                  inttypes.h stdint.h unistd.h
8125do
8126as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8127echo "$as_me:8127: checking for $ac_header" >&5
8128echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8129if eval "test \"\${$as_ac_Header+set}\" = set"; then
8130  echo $ECHO_N "(cached) $ECHO_C" >&6
8131else
8132  cat >"conftest.$ac_ext" <<_ACEOF
8133#line 8133 "configure"
8134#include "confdefs.h"
8135$ac_includes_default
8136#include <$ac_header>
8137_ACEOF
8138rm -f "conftest.$ac_objext"
8139if { (eval echo "$as_me:8139: \"$ac_compile\"") >&5
8140  (eval $ac_compile) 2>&5
8141  ac_status=$?
8142  echo "$as_me:8142: \$? = $ac_status" >&5
8143  (exit "$ac_status"); } &&
8144         { ac_try='test -s "conftest.$ac_objext"'
8145  { (eval echo "$as_me:8145: \"$ac_try\"") >&5
8146  (eval $ac_try) 2>&5
8147  ac_status=$?
8148  echo "$as_me:8148: \$? = $ac_status" >&5
8149  (exit "$ac_status"); }; }; then
8150  eval "$as_ac_Header=yes"
8151else
8152  echo "$as_me: failed program was:" >&5
8153cat "conftest.$ac_ext" >&5
8154eval "$as_ac_Header=no"
8155fi
8156rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8157fi
8158echo "$as_me:8158: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8159echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8160if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8161  cat >>confdefs.h <<EOF
8162#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8163EOF
8164
8165fi
8166done
8167
8168echo "$as_me:8168: checking for off_t" >&5
8169echo $ECHO_N "checking for off_t... $ECHO_C" >&6
8170if test "${ac_cv_type_off_t+set}" = set; then
8171  echo $ECHO_N "(cached) $ECHO_C" >&6
8172else
8173  cat >"conftest.$ac_ext" <<_ACEOF
8174#line 8174 "configure"
8175#include "confdefs.h"
8176$ac_includes_default
8177int
8178main (void)
8179{
8180if ((off_t *) 0)
8181  return 0;
8182if (sizeof (off_t))
8183  return 0;
8184  ;
8185  return 0;
8186}
8187_ACEOF
8188rm -f "conftest.$ac_objext"
8189if { (eval echo "$as_me:8189: \"$ac_compile\"") >&5
8190  (eval $ac_compile) 2>&5
8191  ac_status=$?
8192  echo "$as_me:8192: \$? = $ac_status" >&5
8193  (exit "$ac_status"); } &&
8194         { ac_try='test -s "conftest.$ac_objext"'
8195  { (eval echo "$as_me:8195: \"$ac_try\"") >&5
8196  (eval $ac_try) 2>&5
8197  ac_status=$?
8198  echo "$as_me:8198: \$? = $ac_status" >&5
8199  (exit "$ac_status"); }; }; then
8200  ac_cv_type_off_t=yes
8201else
8202  echo "$as_me: failed program was:" >&5
8203cat "conftest.$ac_ext" >&5
8204ac_cv_type_off_t=no
8205fi
8206rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8207fi
8208echo "$as_me:8208: result: $ac_cv_type_off_t" >&5
8209echo "${ECHO_T}$ac_cv_type_off_t" >&6
8210if test "$ac_cv_type_off_t" = yes; then
8211  :
8212else
8213
8214cat >>confdefs.h <<EOF
8215#define off_t long
8216EOF
8217
8218fi
8219
8220echo "$as_me:8220: checking for size_t" >&5
8221echo $ECHO_N "checking for size_t... $ECHO_C" >&6
8222if test "${ac_cv_type_size_t+set}" = set; then
8223  echo $ECHO_N "(cached) $ECHO_C" >&6
8224else
8225  cat >"conftest.$ac_ext" <<_ACEOF
8226#line 8226 "configure"
8227#include "confdefs.h"
8228$ac_includes_default
8229int
8230main (void)
8231{
8232if ((size_t *) 0)
8233  return 0;
8234if (sizeof (size_t))
8235  return 0;
8236  ;
8237  return 0;
8238}
8239_ACEOF
8240rm -f "conftest.$ac_objext"
8241if { (eval echo "$as_me:8241: \"$ac_compile\"") >&5
8242  (eval $ac_compile) 2>&5
8243  ac_status=$?
8244  echo "$as_me:8244: \$? = $ac_status" >&5
8245  (exit "$ac_status"); } &&
8246         { ac_try='test -s "conftest.$ac_objext"'
8247  { (eval echo "$as_me:8247: \"$ac_try\"") >&5
8248  (eval $ac_try) 2>&5
8249  ac_status=$?
8250  echo "$as_me:8250: \$? = $ac_status" >&5
8251  (exit "$ac_status"); }; }; then
8252  ac_cv_type_size_t=yes
8253else
8254  echo "$as_me: failed program was:" >&5
8255cat "conftest.$ac_ext" >&5
8256ac_cv_type_size_t=no
8257fi
8258rm -f "conftest.$ac_objext" "conftest.$ac_ext"
8259fi
8260echo "$as_me:8260: result: $ac_cv_type_size_t" >&5
8261echo "${ECHO_T}$ac_cv_type_size_t" >&6
8262if test "$ac_cv_type_size_t" = yes; then
8263  :
8264else
8265
8266cat >>confdefs.h <<EOF
8267#define size_t unsigned
8268EOF
8269
8270fi
8271
8272# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
8273# for constant arguments.  Useless!
8274echo "$as_me:8274: checking for working alloca.h" >&5
8275echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
8276if test "${ac_cv_working_alloca_h+set}" = set; then
8277  echo $ECHO_N "(cached) $ECHO_C" >&6
8278else
8279  cat >"conftest.$ac_ext" <<_ACEOF
8280#line 8280 "configure"
8281#include "confdefs.h"
8282#include <alloca.h>
8283int
8284main (void)
8285{
8286char *p = (char *) alloca (2 * sizeof (int));
8287  ;
8288  return 0;
8289}
8290_ACEOF
8291rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8292if { (eval echo "$as_me:8292: \"$ac_link\"") >&5
8293  (eval $ac_link) 2>&5
8294  ac_status=$?
8295  echo "$as_me:8295: \$? = $ac_status" >&5
8296  (exit "$ac_status"); } &&
8297         { ac_try='test -s "conftest$ac_exeext"'
8298  { (eval echo "$as_me:8298: \"$ac_try\"") >&5
8299  (eval $ac_try) 2>&5
8300  ac_status=$?
8301  echo "$as_me:8301: \$? = $ac_status" >&5
8302  (exit "$ac_status"); }; }; then
8303  ac_cv_working_alloca_h=yes
8304else
8305  echo "$as_me: failed program was:" >&5
8306cat "conftest.$ac_ext" >&5
8307ac_cv_working_alloca_h=no
8308fi
8309rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8310fi
8311echo "$as_me:8311: result: $ac_cv_working_alloca_h" >&5
8312echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
8313if test $ac_cv_working_alloca_h = yes; then
8314
8315cat >>confdefs.h <<\EOF
8316#define HAVE_ALLOCA_H 1
8317EOF
8318
8319fi
8320
8321echo "$as_me:8321: checking for alloca" >&5
8322echo $ECHO_N "checking for alloca... $ECHO_C" >&6
8323if test "${ac_cv_func_alloca_works+set}" = set; then
8324  echo $ECHO_N "(cached) $ECHO_C" >&6
8325else
8326  cat >"conftest.$ac_ext" <<_ACEOF
8327#line 8327 "configure"
8328#include "confdefs.h"
8329#ifdef __GNUC__
8330# define alloca __builtin_alloca
8331#else
8332# ifdef _MSC_VER
8333#  include <malloc.h>
8334#  define alloca _alloca
8335# else
8336#  if HAVE_ALLOCA_H
8337#   include <alloca.h>
8338#  else
8339#   ifdef _AIX
8340 #pragma alloca
8341#   else
8342#    ifndef alloca /* predefined by HP cc +Olibcalls */
8343char *alloca ();
8344#    endif
8345#   endif
8346#  endif
8347# endif
8348#endif
8349
8350int
8351main (void)
8352{
8353char *p = (char *) alloca (1);
8354  ;
8355  return 0;
8356}
8357_ACEOF
8358rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8359if { (eval echo "$as_me:8359: \"$ac_link\"") >&5
8360  (eval $ac_link) 2>&5
8361  ac_status=$?
8362  echo "$as_me:8362: \$? = $ac_status" >&5
8363  (exit "$ac_status"); } &&
8364         { ac_try='test -s "conftest$ac_exeext"'
8365  { (eval echo "$as_me:8365: \"$ac_try\"") >&5
8366  (eval $ac_try) 2>&5
8367  ac_status=$?
8368  echo "$as_me:8368: \$? = $ac_status" >&5
8369  (exit "$ac_status"); }; }; then
8370  ac_cv_func_alloca_works=yes
8371else
8372  echo "$as_me: failed program was:" >&5
8373cat "conftest.$ac_ext" >&5
8374ac_cv_func_alloca_works=no
8375fi
8376rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8377fi
8378echo "$as_me:8378: result: $ac_cv_func_alloca_works" >&5
8379echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
8380
8381if test $ac_cv_func_alloca_works = yes; then
8382
8383cat >>confdefs.h <<\EOF
8384#define HAVE_ALLOCA 1
8385EOF
8386
8387else
8388  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
8389# that cause trouble.  Some versions do not even contain alloca or
8390# contain a buggy version.  If you still want to use their alloca,
8391# use ar to extract alloca.o from them instead of compiling alloca.c.
8392
8393ALLOCA="alloca.$ac_objext"
8394
8395cat >>confdefs.h <<\EOF
8396#define C_ALLOCA 1
8397EOF
8398
8399echo "$as_me:8399: checking whether \`alloca.c' needs Cray hooks" >&5
8400echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
8401if test "${ac_cv_os_cray+set}" = set; then
8402  echo $ECHO_N "(cached) $ECHO_C" >&6
8403else
8404  cat >"conftest.$ac_ext" <<_ACEOF
8405#line 8405 "configure"
8406#include "confdefs.h"
8407#if defined(CRAY) && ! defined(CRAY2)
8408webecray
8409#else
8410wenotbecray
8411#endif
8412
8413_ACEOF
8414if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8415  $EGREP "webecray" >/dev/null 2>&1; then
8416  ac_cv_os_cray=yes
8417else
8418  ac_cv_os_cray=no
8419fi
8420rm -rf conftest*
8421
8422fi
8423echo "$as_me:8423: result: $ac_cv_os_cray" >&5
8424echo "${ECHO_T}$ac_cv_os_cray" >&6
8425if test $ac_cv_os_cray = yes; then
8426  for ac_func in _getb67 GETB67 getb67; do
8427    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8428echo "$as_me:8428: checking for $ac_func" >&5
8429echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8430if eval "test \"\${$as_ac_var+set}\" = set"; then
8431  echo $ECHO_N "(cached) $ECHO_C" >&6
8432else
8433  cat >"conftest.$ac_ext" <<_ACEOF
8434#line 8434 "configure"
8435#include "confdefs.h"
8436#define $ac_func autoconf_temporary
8437#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8438#undef $ac_func
8439
8440#ifdef __cplusplus
8441extern "C"
8442#endif
8443
8444/* We use char because int might match the return type of a gcc2
8445   builtin and then its argument prototype would still apply.  */
8446char $ac_func (void);
8447
8448int
8449main (void)
8450{
8451
8452/* The GNU C library defines stubs for functions which it implements
8453    to always fail with ENOSYS.  Some functions are actually named
8454    something starting with __ and the normal name is an alias.  */
8455#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8456#error found stub for $ac_func
8457#endif
8458
8459	return $ac_func ();
8460  ;
8461  return 0;
8462}
8463_ACEOF
8464rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8465if { (eval echo "$as_me:8465: \"$ac_link\"") >&5
8466  (eval $ac_link) 2>&5
8467  ac_status=$?
8468  echo "$as_me:8468: \$? = $ac_status" >&5
8469  (exit "$ac_status"); } &&
8470         { ac_try='test -s "conftest$ac_exeext"'
8471  { (eval echo "$as_me:8471: \"$ac_try\"") >&5
8472  (eval $ac_try) 2>&5
8473  ac_status=$?
8474  echo "$as_me:8474: \$? = $ac_status" >&5
8475  (exit "$ac_status"); }; }; then
8476  eval "$as_ac_var=yes"
8477else
8478  echo "$as_me: failed program was:" >&5
8479cat "conftest.$ac_ext" >&5
8480eval "$as_ac_var=no"
8481fi
8482rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8483fi
8484echo "$as_me:8484: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8485echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8486if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8487
8488cat >>confdefs.h <<EOF
8489#define CRAY_STACKSEG_END $ac_func
8490EOF
8491
8492    break
8493fi
8494
8495  done
8496fi
8497
8498echo "$as_me:8498: checking stack direction for C alloca" >&5
8499echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
8500if test "${ac_cv_c_stack_direction+set}" = set; then
8501  echo $ECHO_N "(cached) $ECHO_C" >&6
8502else
8503  if test "$cross_compiling" = yes; then
8504  ac_cv_c_stack_direction=0
8505else
8506  cat >"conftest.$ac_ext" <<_ACEOF
8507#line 8507 "configure"
8508#include "confdefs.h"
8509int
8510find_stack_direction (void)
8511{
8512  static char *addr = 0;
8513  auto char dummy;
8514  if (addr == 0)
8515    {
8516      addr = &dummy;
8517      return find_stack_direction ();
8518    }
8519  else
8520    return (&dummy > addr) ? 1 : -1;
8521}
8522
8523int
8524main (void)
8525{
8526  $ac_main_return (find_stack_direction () < 0);
8527}
8528_ACEOF
8529rm -f "conftest$ac_exeext"
8530if { (eval echo "$as_me:8530: \"$ac_link\"") >&5
8531  (eval $ac_link) 2>&5
8532  ac_status=$?
8533  echo "$as_me:8533: \$? = $ac_status" >&5
8534  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8535  { (eval echo "$as_me:8535: \"$ac_try\"") >&5
8536  (eval $ac_try) 2>&5
8537  ac_status=$?
8538  echo "$as_me:8538: \$? = $ac_status" >&5
8539  (exit "$ac_status"); }; }; then
8540  ac_cv_c_stack_direction=1
8541else
8542  echo "$as_me: program exited with status $ac_status" >&5
8543echo "$as_me: failed program was:" >&5
8544cat "conftest.$ac_ext" >&5
8545ac_cv_c_stack_direction=-1
8546fi
8547rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8548fi
8549fi
8550echo "$as_me:8550: result: $ac_cv_c_stack_direction" >&5
8551echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
8552
8553cat >>confdefs.h <<EOF
8554#define STACK_DIRECTION $ac_cv_c_stack_direction
8555EOF
8556
8557fi
8558
8559for ac_header in stdlib.h unistd.h
8560do
8561as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8562echo "$as_me:8562: checking for $ac_header" >&5
8563echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8564if eval "test \"\${$as_ac_Header+set}\" = set"; then
8565  echo $ECHO_N "(cached) $ECHO_C" >&6
8566else
8567  cat >"conftest.$ac_ext" <<_ACEOF
8568#line 8568 "configure"
8569#include "confdefs.h"
8570#include <$ac_header>
8571_ACEOF
8572if { (eval echo "$as_me:8572: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8573  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8574  ac_status=$?
8575  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8576  rm -f conftest.er1
8577  cat conftest.err >&5
8578  echo "$as_me:8578: \$? = $ac_status" >&5
8579  (exit "$ac_status"); } >/dev/null; then
8580  if test -s conftest.err; then
8581    ac_cpp_err=$ac_c_preproc_warn_flag
8582  else
8583    ac_cpp_err=
8584  fi
8585else
8586  ac_cpp_err=yes
8587fi
8588if test -z "$ac_cpp_err"; then
8589  eval "$as_ac_Header=yes"
8590else
8591  echo "$as_me: failed program was:" >&5
8592  cat "conftest.$ac_ext" >&5
8593  eval "$as_ac_Header=no"
8594fi
8595rm -f conftest.err "conftest.$ac_ext"
8596fi
8597echo "$as_me:8597: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8598echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8599if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8600  cat >>confdefs.h <<EOF
8601#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8602EOF
8603
8604fi
8605done
8606
8607for ac_func in getpagesize
8608do
8609as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8610echo "$as_me:8610: checking for $ac_func" >&5
8611echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8612if eval "test \"\${$as_ac_var+set}\" = set"; then
8613  echo $ECHO_N "(cached) $ECHO_C" >&6
8614else
8615  cat >"conftest.$ac_ext" <<_ACEOF
8616#line 8616 "configure"
8617#include "confdefs.h"
8618#define $ac_func autoconf_temporary
8619#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8620#undef $ac_func
8621
8622#ifdef __cplusplus
8623extern "C"
8624#endif
8625
8626/* We use char because int might match the return type of a gcc2
8627   builtin and then its argument prototype would still apply.  */
8628char $ac_func (void);
8629
8630int
8631main (void)
8632{
8633
8634/* The GNU C library defines stubs for functions which it implements
8635    to always fail with ENOSYS.  Some functions are actually named
8636    something starting with __ and the normal name is an alias.  */
8637#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8638#error found stub for $ac_func
8639#endif
8640
8641	return $ac_func ();
8642  ;
8643  return 0;
8644}
8645_ACEOF
8646rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8647if { (eval echo "$as_me:8647: \"$ac_link\"") >&5
8648  (eval $ac_link) 2>&5
8649  ac_status=$?
8650  echo "$as_me:8650: \$? = $ac_status" >&5
8651  (exit "$ac_status"); } &&
8652         { ac_try='test -s "conftest$ac_exeext"'
8653  { (eval echo "$as_me:8653: \"$ac_try\"") >&5
8654  (eval $ac_try) 2>&5
8655  ac_status=$?
8656  echo "$as_me:8656: \$? = $ac_status" >&5
8657  (exit "$ac_status"); }; }; then
8658  eval "$as_ac_var=yes"
8659else
8660  echo "$as_me: failed program was:" >&5
8661cat "conftest.$ac_ext" >&5
8662eval "$as_ac_var=no"
8663fi
8664rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
8665fi
8666echo "$as_me:8666: result: `eval echo '${'"$as_ac_var"'}'`" >&5
8667echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
8668if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
8669  cat >>confdefs.h <<EOF
8670#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
8671EOF
8672
8673fi
8674done
8675
8676echo "$as_me:8676: checking for working mmap" >&5
8677echo $ECHO_N "checking for working mmap... $ECHO_C" >&6
8678if test "${ac_cv_func_mmap_fixed_mapped+set}" = set; then
8679  echo $ECHO_N "(cached) $ECHO_C" >&6
8680else
8681  if test "$cross_compiling" = yes; then
8682  ac_cv_func_mmap_fixed_mapped=no
8683else
8684  cat >"conftest.$ac_ext" <<_ACEOF
8685#line 8685 "configure"
8686#include "confdefs.h"
8687$ac_includes_default
8688/* Thanks to Mike Haertel and Jim Avera for this test.
8689   Here is a matrix of mmap possibilities:
8690	mmap private not fixed
8691	mmap private fixed at somewhere currently unmapped
8692	mmap private fixed at somewhere already mapped
8693	mmap shared not fixed
8694	mmap shared fixed at somewhere currently unmapped
8695	mmap shared fixed at somewhere already mapped
8696   For private mappings, we should verify that changes cannot be read()
8697   back from the file, nor mmap's back from the file at a different
8698   address.  (There have been systems where private was not correctly
8699   implemented like the infamous i386 svr4.0, and systems where the
8700   VM page cache was not coherent with the file system buffer cache
8701   like early versions of FreeBSD and possibly contemporary NetBSD.)
8702   For shared mappings, we should conversely verify that changes get
8703   propogated back to all the places they're supposed to be.
8704
8705   Grep wants private fixed already mapped.
8706   The main things grep needs to know about mmap are:
8707   * does it exist and is it safe to write into the mmap'd area
8708   * how to use it (BSD variants)  */
8709
8710#include <fcntl.h>
8711#include <sys/mman.h>
8712
8713#if !STDC_HEADERS && !HAVE_STDLIB_H
8714char *malloc ();
8715#endif
8716
8717/* This mess was copied from the GNU getpagesize.h.  */
8718#if !HAVE_GETPAGESIZE
8719/* Assume that all systems that can run configure have sys/param.h.  */
8720# if !HAVE_SYS_PARAM_H
8721#  define HAVE_SYS_PARAM_H 1
8722# endif
8723
8724# ifdef _SC_PAGESIZE
8725#  define getpagesize() sysconf(_SC_PAGESIZE)
8726# else /* no _SC_PAGESIZE */
8727#  if HAVE_SYS_PARAM_H
8728#   include <sys/param.h>
8729#   ifdef EXEC_PAGESIZE
8730#    define getpagesize() EXEC_PAGESIZE
8731#   else /* no EXEC_PAGESIZE */
8732#    ifdef NBPG
8733#     define getpagesize() NBPG * CLSIZE
8734#     ifndef CLSIZE
8735#      define CLSIZE 1
8736#     endif /* no CLSIZE */
8737#    else /* no NBPG */
8738#     ifdef NBPC
8739#      define getpagesize() NBPC
8740#     else /* no NBPC */
8741#      ifdef PAGESIZE
8742#       define getpagesize() PAGESIZE
8743#      endif /* PAGESIZE */
8744#     endif /* no NBPC */
8745#    endif /* no NBPG */
8746#   endif /* no EXEC_PAGESIZE */
8747#  else /* no HAVE_SYS_PARAM_H */
8748#   define getpagesize() 8192	/* punt totally */
8749#  endif /* no HAVE_SYS_PARAM_H */
8750# endif /* no _SC_PAGESIZE */
8751
8752#endif /* no HAVE_GETPAGESIZE */
8753
8754int
8755main (void)
8756{
8757  char *data, *data2, *data3;
8758  int i, pagesize;
8759  int fd;
8760
8761  pagesize = getpagesize ();
8762
8763  /* First, make a file with some known garbage in it. */
8764  data = (char *) malloc (pagesize);
8765  if (!data)
8766    $ac_main_return (1);
8767  for (i = 0; i < pagesize; ++i)
8768    *(data + i) = rand ();
8769  umask (0);
8770  fd = creat ("conftest.mmap", 0600);
8771  if (fd < 0)
8772    $ac_main_return (1);
8773  if (write (fd, data, pagesize) != pagesize)
8774    $ac_main_return (1);
8775  close (fd);
8776
8777  /* Next, try to mmap the file at a fixed address which already has
8778     something else allocated at it.  If we can, also make sure that
8779     we see the same garbage.  */
8780  fd = open ("conftest.mmap", O_RDWR);
8781  if (fd < 0)
8782    $ac_main_return (1);
8783  data2 = (char *) malloc (2 * pagesize);
8784  if (!data2)
8785    $ac_main_return (1);
8786  data2 += (pagesize - ((int) data2 & (pagesize - 1))) & (pagesize - 1);
8787  if (data2 != mmap (data2, pagesize, PROT_READ | PROT_WRITE,
8788                     MAP_PRIVATE | MAP_FIXED, fd, 0L))
8789    $ac_main_return (1);
8790  for (i = 0; i < pagesize; ++i)
8791    if (*(data + i) != *(data2 + i))
8792      $ac_main_return (1);
8793
8794  /* Finally, make sure that changes to the mapped area do not
8795     percolate back to the file as seen by read().  (This is a bug on
8796     some variants of i386 svr4.0.)  */
8797  for (i = 0; i < pagesize; ++i)
8798    *(data2 + i) = *(data2 + i) + 1;
8799  data3 = (char *) malloc (pagesize);
8800  if (!data3)
8801    $ac_main_return (1);
8802  if (read (fd, data3, pagesize) != pagesize)
8803    $ac_main_return (1);
8804  for (i = 0; i < pagesize; ++i)
8805    if (*(data + i) != *(data3 + i))
8806      $ac_main_return (1);
8807  close (fd);
8808  $ac_main_return (0);
8809}
8810_ACEOF
8811rm -f "conftest$ac_exeext"
8812if { (eval echo "$as_me:8812: \"$ac_link\"") >&5
8813  (eval $ac_link) 2>&5
8814  ac_status=$?
8815  echo "$as_me:8815: \$? = $ac_status" >&5
8816  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
8817  { (eval echo "$as_me:8817: \"$ac_try\"") >&5
8818  (eval $ac_try) 2>&5
8819  ac_status=$?
8820  echo "$as_me:8820: \$? = $ac_status" >&5
8821  (exit "$ac_status"); }; }; then
8822  ac_cv_func_mmap_fixed_mapped=yes
8823else
8824  echo "$as_me: program exited with status $ac_status" >&5
8825echo "$as_me: failed program was:" >&5
8826cat "conftest.$ac_ext" >&5
8827ac_cv_func_mmap_fixed_mapped=no
8828fi
8829rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
8830fi
8831fi
8832echo "$as_me:8832: result: $ac_cv_func_mmap_fixed_mapped" >&5
8833echo "${ECHO_T}$ac_cv_func_mmap_fixed_mapped" >&6
8834if test $ac_cv_func_mmap_fixed_mapped = yes; then
8835
8836cat >>confdefs.h <<\EOF
8837#define HAVE_MMAP 1
8838EOF
8839
8840fi
8841rm -f conftest.mmap
8842
8843echo "$as_me:8843: checking whether we are using the GNU C Library 2.1 or newer" >&5
8844echo $ECHO_N "checking whether we are using the GNU C Library 2.1 or newer... $ECHO_C" >&6
8845if test "${ac_cv_gnu_library_2_1+set}" = set; then
8846  echo $ECHO_N "(cached) $ECHO_C" >&6
8847else
8848  cat >"conftest.$ac_ext" <<_ACEOF
8849#line 8849 "configure"
8850#include "confdefs.h"
8851
8852#include <features.h>
8853#ifdef __GNU_LIBRARY__
8854 #if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 1) || (__GLIBC__ > 2)
8855  Lucky GNU user
8856 #endif
8857#endif
8858
8859_ACEOF
8860if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
8861  $EGREP "Lucky GNU user" >/dev/null 2>&1; then
8862  ac_cv_gnu_library_2_1=yes
8863else
8864  ac_cv_gnu_library_2_1=no
8865fi
8866rm -rf conftest*
8867
8868fi
8869echo "$as_me:8869: result: $ac_cv_gnu_library_2_1" >&5
8870echo "${ECHO_T}$ac_cv_gnu_library_2_1" >&6
8871
8872	GLIBC21="$ac_cv_gnu_library_2_1"
8873
8874cf_makefile=makefile
8875
8876test -z "$ALL_LINGUAS" && ALL_LINGUAS=`test -d "$srcdir/po" && cd "$srcdir/po" && echo *.po|sed -e 's/\.po//g' -e 's/*//'`
8877
8878# Allow override of "config.h" definition:
8879: ${CONFIG_H:=config.h}
8880
8881if test -z "$PACKAGE" ; then
8882	{ { echo "$as_me:8882: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&5
8883echo "$as_me: error: CF_BUNDLED_INTL used without setting PACKAGE variable" >&2;}
8884   { (exit 1); exit 1; }; }
8885fi
8886
8887if test -z "$VERSION" ; then
8888if test -f "$srcdir/VERSION" ; then
8889	VERSION=`sed -e '2,$d' "$srcdir/VERSION" |cut -f1`
8890else
8891	VERSION=unknown
8892fi
8893fi
8894
8895for ac_header in argz.h limits.h locale.h nl_types.h malloc.h stddef.h \
8896stdlib.h string.h unistd.h sys/param.h
8897do
8898as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
8899echo "$as_me:8899: checking for $ac_header" >&5
8900echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
8901if eval "test \"\${$as_ac_Header+set}\" = set"; then
8902  echo $ECHO_N "(cached) $ECHO_C" >&6
8903else
8904  cat >"conftest.$ac_ext" <<_ACEOF
8905#line 8905 "configure"
8906#include "confdefs.h"
8907#include <$ac_header>
8908_ACEOF
8909if { (eval echo "$as_me:8909: \"$ac_cpp "conftest.$ac_ext"\"") >&5
8910  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
8911  ac_status=$?
8912  $EGREP -v '^ *\+' conftest.er1 >conftest.err
8913  rm -f conftest.er1
8914  cat conftest.err >&5
8915  echo "$as_me:8915: \$? = $ac_status" >&5
8916  (exit "$ac_status"); } >/dev/null; then
8917  if test -s conftest.err; then
8918    ac_cpp_err=$ac_c_preproc_warn_flag
8919  else
8920    ac_cpp_err=
8921  fi
8922else
8923  ac_cpp_err=yes
8924fi
8925if test -z "$ac_cpp_err"; then
8926  eval "$as_ac_Header=yes"
8927else
8928  echo "$as_me: failed program was:" >&5
8929  cat "conftest.$ac_ext" >&5
8930  eval "$as_ac_Header=no"
8931fi
8932rm -f conftest.err "conftest.$ac_ext"
8933fi
8934echo "$as_me:8934: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
8935echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
8936if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
8937  cat >>confdefs.h <<EOF
8938#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
8939EOF
8940
8941fi
8942done
8943
8944for ac_func in feof_unlocked fgets_unlocked getcwd getegid geteuid \
8945getgid getuid mempcpy munmap putenv setenv setlocale stpcpy strchr strcasecmp \
8946strdup strtoul tsearch __argz_count __argz_stringify __argz_next
8947do
8948as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
8949echo "$as_me:8949: checking for $ac_func" >&5
8950echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
8951if eval "test \"\${$as_ac_var+set}\" = set"; then
8952  echo $ECHO_N "(cached) $ECHO_C" >&6
8953else
8954  cat >"conftest.$ac_ext" <<_ACEOF
8955#line 8955 "configure"
8956#include "confdefs.h"
8957#define $ac_func autoconf_temporary
8958#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
8959#undef $ac_func
8960
8961#ifdef __cplusplus
8962extern "C"
8963#endif
8964
8965/* We use char because int might match the return type of a gcc2
8966   builtin and then its argument prototype would still apply.  */
8967char $ac_func (void);
8968
8969int
8970main (void)
8971{
8972
8973/* The GNU C library defines stubs for functions which it implements
8974    to always fail with ENOSYS.  Some functions are actually named
8975    something starting with __ and the normal name is an alias.  */
8976#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
8977#error found stub for $ac_func
8978#endif
8979
8980	return $ac_func ();
8981  ;
8982  return 0;
8983}
8984_ACEOF
8985rm -f "conftest.$ac_objext" "conftest$ac_exeext"
8986if { (eval echo "$as_me:8986: \"$ac_link\"") >&5
8987  (eval $ac_link) 2>&5
8988  ac_status=$?
8989  echo "$as_me:8989: \$? = $ac_status" >&5
8990  (exit "$ac_status"); } &&
8991         { ac_try='test -s "conftest$ac_exeext"'
8992  { (eval echo "$as_me:8992: \"$ac_try\"") >&5
8993  (eval $ac_try) 2>&5
8994  ac_status=$?
8995  echo "$as_me:8995: \$? = $ac_status" >&5
8996  (exit "$ac_status"); }; }; then
8997  eval "$as_ac_var=yes"
8998else
8999  echo "$as_me: failed program was:" >&5
9000cat "conftest.$ac_ext" >&5
9001eval "$as_ac_var=no"
9002fi
9003rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9004fi
9005echo "$as_me:9005: result: `eval echo '${'"$as_ac_var"'}'`" >&5
9006echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
9007if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
9008  cat >>confdefs.h <<EOF
9009#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
9010EOF
9011
9012fi
9013done
9014
9015# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
9016if test "${with_libiconv_prefix+set}" = set; then
9017  withval="$with_libiconv_prefix"
9018
9019case "$withval" in
9020(no)
9021	;;
9022(yes)
9023	;;
9024(*)
9025
9026for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
9027	if test -d "$cf_searchpath/include" ; then
9028
9029if test -n "$cf_searchpath/include" ; then
9030  for cf_add_incdir in $cf_searchpath/include
9031  do
9032	while test "$cf_add_incdir" != /usr/include
9033	do
9034	  if test -d "$cf_add_incdir"
9035	  then
9036		cf_have_incdir=no
9037		if test -n "$CFLAGS$CPPFLAGS" ; then
9038		  # a loop is needed to ensure we can add subdirs of existing dirs
9039		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9040			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9041			  cf_have_incdir=yes; break
9042			fi
9043		  done
9044		fi
9045
9046		if test "$cf_have_incdir" = no ; then
9047		  if test "$cf_add_incdir" = /usr/local/include ; then
9048			if test "$GCC" = yes
9049			then
9050			  cf_save_CPPFLAGS=$CPPFLAGS
9051
9052	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9053	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9054
9055			  cat >"conftest.$ac_ext" <<_ACEOF
9056#line 9056 "configure"
9057#include "confdefs.h"
9058#include <stdio.h>
9059int
9060main (void)
9061{
9062printf("Hello")
9063  ;
9064  return 0;
9065}
9066_ACEOF
9067rm -f "conftest.$ac_objext"
9068if { (eval echo "$as_me:9068: \"$ac_compile\"") >&5
9069  (eval $ac_compile) 2>&5
9070  ac_status=$?
9071  echo "$as_me:9071: \$? = $ac_status" >&5
9072  (exit "$ac_status"); } &&
9073         { ac_try='test -s "conftest.$ac_objext"'
9074  { (eval echo "$as_me:9074: \"$ac_try\"") >&5
9075  (eval $ac_try) 2>&5
9076  ac_status=$?
9077  echo "$as_me:9077: \$? = $ac_status" >&5
9078  (exit "$ac_status"); }; }; then
9079  :
9080else
9081  echo "$as_me: failed program was:" >&5
9082cat "conftest.$ac_ext" >&5
9083cf_have_incdir=yes
9084fi
9085rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9086			  CPPFLAGS=$cf_save_CPPFLAGS
9087			fi
9088		  fi
9089		fi
9090
9091		if test "$cf_have_incdir" = no ; then
9092		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9093
9094echo "${as_me:-configure}:9094: testing adding $cf_add_incdir to include-path ..." 1>&5
9095
9096		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9097
9098		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9099		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9100		  cf_add_incdir="$cf_top_incdir"
9101		else
9102		  break
9103		fi
9104	  else
9105		break
9106	  fi
9107	done
9108  done
9109fi
9110
9111	elif test -d "$cf_searchpath/../include" ; then
9112
9113if test -n "$cf_searchpath/../include" ; then
9114  for cf_add_incdir in $cf_searchpath/../include
9115  do
9116	while test "$cf_add_incdir" != /usr/include
9117	do
9118	  if test -d "$cf_add_incdir"
9119	  then
9120		cf_have_incdir=no
9121		if test -n "$CFLAGS$CPPFLAGS" ; then
9122		  # a loop is needed to ensure we can add subdirs of existing dirs
9123		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9124			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9125			  cf_have_incdir=yes; break
9126			fi
9127		  done
9128		fi
9129
9130		if test "$cf_have_incdir" = no ; then
9131		  if test "$cf_add_incdir" = /usr/local/include ; then
9132			if test "$GCC" = yes
9133			then
9134			  cf_save_CPPFLAGS=$CPPFLAGS
9135
9136	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9137	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9138
9139			  cat >"conftest.$ac_ext" <<_ACEOF
9140#line 9140 "configure"
9141#include "confdefs.h"
9142#include <stdio.h>
9143int
9144main (void)
9145{
9146printf("Hello")
9147  ;
9148  return 0;
9149}
9150_ACEOF
9151rm -f "conftest.$ac_objext"
9152if { (eval echo "$as_me:9152: \"$ac_compile\"") >&5
9153  (eval $ac_compile) 2>&5
9154  ac_status=$?
9155  echo "$as_me:9155: \$? = $ac_status" >&5
9156  (exit "$ac_status"); } &&
9157         { ac_try='test -s "conftest.$ac_objext"'
9158  { (eval echo "$as_me:9158: \"$ac_try\"") >&5
9159  (eval $ac_try) 2>&5
9160  ac_status=$?
9161  echo "$as_me:9161: \$? = $ac_status" >&5
9162  (exit "$ac_status"); }; }; then
9163  :
9164else
9165  echo "$as_me: failed program was:" >&5
9166cat "conftest.$ac_ext" >&5
9167cf_have_incdir=yes
9168fi
9169rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9170			  CPPFLAGS=$cf_save_CPPFLAGS
9171			fi
9172		  fi
9173		fi
9174
9175		if test "$cf_have_incdir" = no ; then
9176		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9177
9178echo "${as_me:-configure}:9178: testing adding $cf_add_incdir to include-path ..." 1>&5
9179
9180		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9181
9182		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9183		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9184		  cf_add_incdir="$cf_top_incdir"
9185		else
9186		  break
9187		fi
9188	  else
9189		break
9190	  fi
9191	done
9192  done
9193fi
9194
9195	else
9196{ { echo "$as_me:9196: error: cannot find libiconv under $withval" >&5
9197echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9198   { (exit 1); exit 1; }; }
9199	fi
9200	if test -d "$cf_searchpath/lib" ; then
9201
9202if test -n "$cf_searchpath/lib" ; then
9203	for cf_add_libdir in $cf_searchpath/lib
9204	do
9205		if test "$cf_add_libdir" = /usr/lib ; then
9206			:
9207		elif test -d "$cf_add_libdir"
9208		then
9209			cf_have_libdir=no
9210			if test -n "$LDFLAGS$LIBS" ; then
9211				# a loop is needed to ensure we can add subdirs of existing dirs
9212				for cf_test_libdir in $LDFLAGS $LIBS ; do
9213					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9214						cf_have_libdir=yes; break
9215					fi
9216				done
9217			fi
9218			if test "$cf_have_libdir" = no ; then
9219				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9220
9221echo "${as_me:-configure}:9221: testing adding $cf_add_libdir to library-path ..." 1>&5
9222
9223				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9224			fi
9225		fi
9226	done
9227fi
9228
9229	elif test -d "$cf_searchpath" ; then
9230
9231if test -n "$cf_searchpath" ; then
9232	for cf_add_libdir in $cf_searchpath
9233	do
9234		if test "$cf_add_libdir" = /usr/lib ; then
9235			:
9236		elif test -d "$cf_add_libdir"
9237		then
9238			cf_have_libdir=no
9239			if test -n "$LDFLAGS$LIBS" ; then
9240				# a loop is needed to ensure we can add subdirs of existing dirs
9241				for cf_test_libdir in $LDFLAGS $LIBS ; do
9242					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9243						cf_have_libdir=yes; break
9244					fi
9245				done
9246			fi
9247			if test "$cf_have_libdir" = no ; then
9248				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9249
9250echo "${as_me:-configure}:9250: testing adding $cf_add_libdir to library-path ..." 1>&5
9251
9252				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9253			fi
9254		fi
9255	done
9256fi
9257
9258	else
9259{ { echo "$as_me:9259: error: cannot find libiconv under $withval" >&5
9260echo "$as_me: error: cannot find libiconv under $withval" >&2;}
9261   { (exit 1); exit 1; }; }
9262	fi
9263done
9264
9265	;;
9266esac
9267
9268fi;
9269
9270  echo "$as_me:9270: checking for iconv" >&5
9271echo $ECHO_N "checking for iconv... $ECHO_C" >&6
9272if test "${am_cv_func_iconv+set}" = set; then
9273  echo $ECHO_N "(cached) $ECHO_C" >&6
9274else
9275
9276# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
9277# will be set on completion of the AC_TRY_LINK below.
9278cf_cv_header_path_iconv=
9279cf_cv_library_path_iconv=
9280
9281echo "${as_me:-configure}:9281: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
9282
9283cf_save_LIBS="$LIBS"
9284
9285cat >"conftest.$ac_ext" <<_ACEOF
9286#line 9286 "configure"
9287#include "confdefs.h"
9288
9289#include <stdlib.h>
9290#include <iconv.h>
9291
9292int
9293main (void)
9294{
9295
9296	iconv_t cd = iconv_open("","");
9297	iconv(cd,NULL,NULL,NULL,NULL);
9298	iconv_close(cd);
9299
9300  ;
9301  return 0;
9302}
9303_ACEOF
9304rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9305if { (eval echo "$as_me:9305: \"$ac_link\"") >&5
9306  (eval $ac_link) 2>&5
9307  ac_status=$?
9308  echo "$as_me:9308: \$? = $ac_status" >&5
9309  (exit "$ac_status"); } &&
9310         { ac_try='test -s "conftest$ac_exeext"'
9311  { (eval echo "$as_me:9311: \"$ac_try\"") >&5
9312  (eval $ac_try) 2>&5
9313  ac_status=$?
9314  echo "$as_me:9314: \$? = $ac_status" >&5
9315  (exit "$ac_status"); }; }; then
9316
9317	cf_cv_find_linkage_iconv=yes
9318	cf_cv_header_path_iconv=/usr/include
9319	cf_cv_library_path_iconv=/usr/lib
9320
9321else
9322  echo "$as_me: failed program was:" >&5
9323cat "conftest.$ac_ext" >&5
9324
9325LIBS="-liconv  $cf_save_LIBS"
9326
9327cat >"conftest.$ac_ext" <<_ACEOF
9328#line 9328 "configure"
9329#include "confdefs.h"
9330
9331#include <stdlib.h>
9332#include <iconv.h>
9333
9334int
9335main (void)
9336{
9337
9338	iconv_t cd = iconv_open("","");
9339	iconv(cd,NULL,NULL,NULL,NULL);
9340	iconv_close(cd);
9341
9342  ;
9343  return 0;
9344}
9345_ACEOF
9346rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9347if { (eval echo "$as_me:9347: \"$ac_link\"") >&5
9348  (eval $ac_link) 2>&5
9349  ac_status=$?
9350  echo "$as_me:9350: \$? = $ac_status" >&5
9351  (exit "$ac_status"); } &&
9352         { ac_try='test -s "conftest$ac_exeext"'
9353  { (eval echo "$as_me:9353: \"$ac_try\"") >&5
9354  (eval $ac_try) 2>&5
9355  ac_status=$?
9356  echo "$as_me:9356: \$? = $ac_status" >&5
9357  (exit "$ac_status"); }; }; then
9358
9359	cf_cv_find_linkage_iconv=yes
9360	cf_cv_header_path_iconv=/usr/include
9361	cf_cv_library_path_iconv=/usr/lib
9362	cf_cv_library_file_iconv="-liconv"
9363
9364else
9365  echo "$as_me: failed program was:" >&5
9366cat "conftest.$ac_ext" >&5
9367
9368	cf_cv_find_linkage_iconv=no
9369	LIBS="$cf_save_LIBS"
9370
9371	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
9372
9373echo "${as_me:-configure}:9373: testing find linkage for iconv library ..." 1>&5
9374
9375echo "${as_me:-configure}:9375: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
9376
9377	cf_save_CPPFLAGS="$CPPFLAGS"
9378	cf_test_CPPFLAGS="$CPPFLAGS"
9379
9380cf_search=
9381
9382# collect the current set of include-directories from compiler flags
9383cf_header_path_list=""
9384if test -n "${CFLAGS}${CPPFLAGS}" ; then
9385	for cf_header_path in $CPPFLAGS $CFLAGS
9386	do
9387		case "$cf_header_path" in
9388		(-I*)
9389			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
9390
9391test "x$cf_header_path" != "xNONE" && \
9392test -d "$cf_header_path" && \
9393 {
9394	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
9395	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
9396	test -d "$cf_header_path/include/iconv" &&       cf_search="$cf_search $cf_header_path/include/iconv"
9397	test -d "$cf_header_path/include/iconv/include" &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
9398	test -d "$cf_header_path/iconv/include" &&       cf_search="$cf_search $cf_header_path/iconv/include"
9399	test -d "$cf_header_path/iconv/include/iconv" &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
9400}
9401
9402			cf_header_path_list="$cf_header_path_list $cf_search"
9403			;;
9404		esac
9405	done
9406fi
9407
9408# add the variations for the package we are looking for
9409
9410cf_search=
9411
9412test "x$prefix" != "xNONE" && \
9413test -d "$prefix" && \
9414 {
9415	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
9416	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
9417	test -d "$prefix/include/iconv" &&       cf_search="$cf_search $prefix/include/iconv"
9418	test -d "$prefix/include/iconv/include" &&    cf_search="$cf_search $prefix/include/iconv/include"
9419	test -d "$prefix/iconv/include" &&       cf_search="$cf_search $prefix/iconv/include"
9420	test -d "$prefix/iconv/include/iconv" &&    cf_search="$cf_search $prefix/iconv/include/iconv"
9421}
9422
9423for cf_subdir_prefix in \
9424	/usr \
9425	/usr/local \
9426	/usr/pkg \
9427	/opt \
9428	/opt/local \
9429	$HOME
9430do
9431
9432test "x$cf_subdir_prefix" != "x$prefix" && \
9433test -d "$cf_subdir_prefix" && \
9434{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9435	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
9436	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
9437	test -d "$cf_subdir_prefix/include/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
9438	test -d "$cf_subdir_prefix/include/iconv/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
9439	test -d "$cf_subdir_prefix/iconv/include" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
9440	test -d "$cf_subdir_prefix/iconv/include/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
9441}
9442
9443done
9444
9445test "$includedir" != NONE && \
9446test "$includedir" != "/usr/include" && \
9447test -d "$includedir" && {
9448	test -d "$includedir" &&    cf_search="$cf_search $includedir"
9449	test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
9450}
9451
9452test "$oldincludedir" != NONE && \
9453test "$oldincludedir" != "/usr/include" && \
9454test -d "$oldincludedir" && {
9455	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
9456	test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
9457}
9458
9459cf_search="$cf_search $cf_header_path_list"
9460
9461	for cf_cv_header_path_iconv in $cf_search
9462	do
9463		if test -d "$cf_cv_header_path_iconv" ; then
9464			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
9465
9466echo "${as_me:-configure}:9466: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
9467
9468			CPPFLAGS="$cf_save_CPPFLAGS"
9469
9470	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9471	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
9472
9473			cat >"conftest.$ac_ext" <<_ACEOF
9474#line 9474 "configure"
9475#include "confdefs.h"
9476
9477#include <stdlib.h>
9478#include <iconv.h>
9479
9480int
9481main (void)
9482{
9483
9484	iconv_t cd = iconv_open("","");
9485	iconv(cd,NULL,NULL,NULL,NULL);
9486	iconv_close(cd);
9487
9488  ;
9489  return 0;
9490}
9491_ACEOF
9492rm -f "conftest.$ac_objext"
9493if { (eval echo "$as_me:9493: \"$ac_compile\"") >&5
9494  (eval $ac_compile) 2>&5
9495  ac_status=$?
9496  echo "$as_me:9496: \$? = $ac_status" >&5
9497  (exit "$ac_status"); } &&
9498         { ac_try='test -s "conftest.$ac_objext"'
9499  { (eval echo "$as_me:9499: \"$ac_try\"") >&5
9500  (eval $ac_try) 2>&5
9501  ac_status=$?
9502  echo "$as_me:9502: \$? = $ac_status" >&5
9503  (exit "$ac_status"); }; }; then
9504
9505				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
9506
9507echo "${as_me:-configure}:9507: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
9508
9509				cf_cv_find_linkage_iconv=maybe
9510				cf_test_CPPFLAGS="$CPPFLAGS"
9511				break
9512else
9513  echo "$as_me: failed program was:" >&5
9514cat "conftest.$ac_ext" >&5
9515
9516				CPPFLAGS="$cf_save_CPPFLAGS"
9517
9518fi
9519rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9520		fi
9521	done
9522
9523	if test "$cf_cv_find_linkage_iconv" = maybe ; then
9524
9525echo "${as_me:-configure}:9525: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
9526
9527		cf_save_LIBS="$LIBS"
9528		cf_save_LDFLAGS="$LDFLAGS"
9529
9530		if test "$cf_cv_find_linkage_iconv" != yes ; then
9531
9532cf_search=
9533cf_library_path_list=""
9534if test -n "${LDFLAGS}${LIBS}" ; then
9535	for cf_library_path in $LDFLAGS $LIBS
9536	do
9537		case "$cf_library_path" in
9538		(-L*)
9539			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
9540
9541test "x$cf_library_path" != "xNONE" && \
9542test -d "$cf_library_path" && \
9543 {
9544	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
9545	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
9546	test -d "$cf_library_path/lib/iconv" &&       cf_search="$cf_search $cf_library_path/lib/iconv"
9547	test -d "$cf_library_path/lib/iconv/lib" &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
9548	test -d "$cf_library_path/iconv/lib" &&       cf_search="$cf_search $cf_library_path/iconv/lib"
9549	test -d "$cf_library_path/iconv/lib/iconv" &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
9550}
9551
9552			cf_library_path_list="$cf_library_path_list $cf_search"
9553			;;
9554		esac
9555	done
9556fi
9557
9558cf_search=
9559
9560test "x$prefix" != "xNONE" && \
9561test -d "$prefix" && \
9562 {
9563	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
9564	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
9565	test -d "$prefix/lib/iconv" &&       cf_search="$cf_search $prefix/lib/iconv"
9566	test -d "$prefix/lib/iconv/lib" &&    cf_search="$cf_search $prefix/lib/iconv/lib"
9567	test -d "$prefix/iconv/lib" &&       cf_search="$cf_search $prefix/iconv/lib"
9568	test -d "$prefix/iconv/lib/iconv" &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
9569}
9570
9571for cf_subdir_prefix in \
9572	/usr \
9573	/usr/local \
9574	/usr/pkg \
9575	/opt \
9576	/opt/local \
9577	$HOME
9578do
9579
9580test "x$cf_subdir_prefix" != "x$prefix" && \
9581test -d "$cf_subdir_prefix" && \
9582{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
9583	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
9584	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
9585	test -d "$cf_subdir_prefix/lib/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
9586	test -d "$cf_subdir_prefix/lib/iconv/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
9587	test -d "$cf_subdir_prefix/iconv/lib" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
9588	test -d "$cf_subdir_prefix/iconv/lib/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
9589}
9590
9591done
9592
9593cf_search="$cf_library_path_list $cf_search"
9594
9595			for cf_cv_library_path_iconv in $cf_search
9596			do
9597				if test -d "$cf_cv_library_path_iconv" ; then
9598					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
9599
9600echo "${as_me:-configure}:9600: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
9601
9602					CPPFLAGS="$cf_test_CPPFLAGS"
9603					LIBS="-liconv  $cf_save_LIBS"
9604					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
9605					cat >"conftest.$ac_ext" <<_ACEOF
9606#line 9606 "configure"
9607#include "confdefs.h"
9608
9609#include <stdlib.h>
9610#include <iconv.h>
9611
9612int
9613main (void)
9614{
9615
9616	iconv_t cd = iconv_open("","");
9617	iconv(cd,NULL,NULL,NULL,NULL);
9618	iconv_close(cd);
9619
9620  ;
9621  return 0;
9622}
9623_ACEOF
9624rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9625if { (eval echo "$as_me:9625: \"$ac_link\"") >&5
9626  (eval $ac_link) 2>&5
9627  ac_status=$?
9628  echo "$as_me:9628: \$? = $ac_status" >&5
9629  (exit "$ac_status"); } &&
9630         { ac_try='test -s "conftest$ac_exeext"'
9631  { (eval echo "$as_me:9631: \"$ac_try\"") >&5
9632  (eval $ac_try) 2>&5
9633  ac_status=$?
9634  echo "$as_me:9634: \$? = $ac_status" >&5
9635  (exit "$ac_status"); }; }; then
9636
9637					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
9638
9639echo "${as_me:-configure}:9639: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
9640
9641					cf_cv_find_linkage_iconv=yes
9642					cf_cv_library_file_iconv="-liconv"
9643					break
9644else
9645  echo "$as_me: failed program was:" >&5
9646cat "conftest.$ac_ext" >&5
9647
9648					CPPFLAGS="$cf_save_CPPFLAGS"
9649					LIBS="$cf_save_LIBS"
9650					LDFLAGS="$cf_save_LDFLAGS"
9651
9652fi
9653rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9654				fi
9655			done
9656			CPPFLAGS="$cf_save_CPPFLAGS"
9657			LDFLAGS="$cf_save_LDFLAGS"
9658		fi
9659
9660	else
9661		cf_cv_find_linkage_iconv=no
9662	fi
9663
9664fi
9665rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9666
9667fi
9668rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9669
9670LIBS="$cf_save_LIBS"
9671
9672if test "$cf_cv_find_linkage_iconv" = yes ; then
9673am_cv_func_iconv=yes
9674else
9675am_cv_func_iconv="no, consider installing GNU libiconv"
9676fi
9677
9678fi
9679echo "$as_me:9679: result: $am_cv_func_iconv" >&5
9680echo "${ECHO_T}$am_cv_func_iconv" >&6
9681
9682  if test "$am_cv_func_iconv" = yes; then
9683
9684cat >>confdefs.h <<\EOF
9685#define HAVE_ICONV 1
9686EOF
9687
9688    echo "$as_me:9688: checking if the declaration of iconv() needs const." >&5
9689echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
9690if test "${am_cv_proto_iconv_const+set}" = set; then
9691  echo $ECHO_N "(cached) $ECHO_C" >&6
9692else
9693
9694      cat >"conftest.$ac_ext" <<_ACEOF
9695#line 9695 "configure"
9696#include "confdefs.h"
9697
9698#include <stdlib.h>
9699#include <iconv.h>
9700
9701extern
9702#ifdef __cplusplus
9703"C"
9704#endif
9705#if defined(__STDC__) || defined(__cplusplus)
9706size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
9707#else
9708size_t iconv();
9709#endif
9710
9711int
9712main (void)
9713{
9714
9715  ;
9716  return 0;
9717}
9718_ACEOF
9719rm -f "conftest.$ac_objext"
9720if { (eval echo "$as_me:9720: \"$ac_compile\"") >&5
9721  (eval $ac_compile) 2>&5
9722  ac_status=$?
9723  echo "$as_me:9723: \$? = $ac_status" >&5
9724  (exit "$ac_status"); } &&
9725         { ac_try='test -s "conftest.$ac_objext"'
9726  { (eval echo "$as_me:9726: \"$ac_try\"") >&5
9727  (eval $ac_try) 2>&5
9728  ac_status=$?
9729  echo "$as_me:9729: \$? = $ac_status" >&5
9730  (exit "$ac_status"); }; }; then
9731  am_cv_proto_iconv_const=no
9732else
9733  echo "$as_me: failed program was:" >&5
9734cat "conftest.$ac_ext" >&5
9735am_cv_proto_iconv_const=yes
9736fi
9737rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9738fi
9739echo "$as_me:9739: result: $am_cv_proto_iconv_const" >&5
9740echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
9741
9742    if test "$am_cv_proto_iconv_const" = yes ; then
9743      am_cv_proto_iconv_arg1="const"
9744    else
9745      am_cv_proto_iconv_arg1=""
9746    fi
9747
9748cat >>confdefs.h <<EOF
9749#define ICONV_CONST $am_cv_proto_iconv_arg1
9750EOF
9751
9752  fi
9753
9754  LIBICONV=
9755  if test "$cf_cv_find_linkage_iconv" = yes; then
9756
9757if test -n "$cf_cv_header_path_iconv" ; then
9758  for cf_add_incdir in $cf_cv_header_path_iconv
9759  do
9760	while test "$cf_add_incdir" != /usr/include
9761	do
9762	  if test -d "$cf_add_incdir"
9763	  then
9764		cf_have_incdir=no
9765		if test -n "$CFLAGS$CPPFLAGS" ; then
9766		  # a loop is needed to ensure we can add subdirs of existing dirs
9767		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
9768			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
9769			  cf_have_incdir=yes; break
9770			fi
9771		  done
9772		fi
9773
9774		if test "$cf_have_incdir" = no ; then
9775		  if test "$cf_add_incdir" = /usr/local/include ; then
9776			if test "$GCC" = yes
9777			then
9778			  cf_save_CPPFLAGS=$CPPFLAGS
9779
9780	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
9781	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
9782
9783			  cat >"conftest.$ac_ext" <<_ACEOF
9784#line 9784 "configure"
9785#include "confdefs.h"
9786#include <stdio.h>
9787int
9788main (void)
9789{
9790printf("Hello")
9791  ;
9792  return 0;
9793}
9794_ACEOF
9795rm -f "conftest.$ac_objext"
9796if { (eval echo "$as_me:9796: \"$ac_compile\"") >&5
9797  (eval $ac_compile) 2>&5
9798  ac_status=$?
9799  echo "$as_me:9799: \$? = $ac_status" >&5
9800  (exit "$ac_status"); } &&
9801         { ac_try='test -s "conftest.$ac_objext"'
9802  { (eval echo "$as_me:9802: \"$ac_try\"") >&5
9803  (eval $ac_try) 2>&5
9804  ac_status=$?
9805  echo "$as_me:9805: \$? = $ac_status" >&5
9806  (exit "$ac_status"); }; }; then
9807  :
9808else
9809  echo "$as_me: failed program was:" >&5
9810cat "conftest.$ac_ext" >&5
9811cf_have_incdir=yes
9812fi
9813rm -f "conftest.$ac_objext" "conftest.$ac_ext"
9814			  CPPFLAGS=$cf_save_CPPFLAGS
9815			fi
9816		  fi
9817		fi
9818
9819		if test "$cf_have_incdir" = no ; then
9820		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
9821
9822echo "${as_me:-configure}:9822: testing adding $cf_add_incdir to include-path ..." 1>&5
9823
9824		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
9825
9826		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
9827		  test "$cf_top_incdir" = "$cf_add_incdir" && break
9828		  cf_add_incdir="$cf_top_incdir"
9829		else
9830		  break
9831		fi
9832	  else
9833		break
9834	  fi
9835	done
9836  done
9837fi
9838
9839    if test -n "$cf_cv_library_file_iconv" ; then
9840      LIBICONV="-liconv"
9841
9842if test -n "$cf_cv_library_path_iconv" ; then
9843	for cf_add_libdir in $cf_cv_library_path_iconv
9844	do
9845		if test "$cf_add_libdir" = /usr/lib ; then
9846			:
9847		elif test -d "$cf_add_libdir"
9848		then
9849			cf_have_libdir=no
9850			if test -n "$LDFLAGS$LIBS" ; then
9851				# a loop is needed to ensure we can add subdirs of existing dirs
9852				for cf_test_libdir in $LDFLAGS $LIBS ; do
9853					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
9854						cf_have_libdir=yes; break
9855					fi
9856				done
9857			fi
9858			if test "$cf_have_libdir" = no ; then
9859				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
9860
9861echo "${as_me:-configure}:9861: testing adding $cf_add_libdir to library-path ..." 1>&5
9862
9863				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
9864			fi
9865		fi
9866	done
9867fi
9868
9869    fi
9870  fi
9871
9872echo "$as_me:9872: checking for nl_langinfo and CODESET" >&5
9873echo $ECHO_N "checking for nl_langinfo and CODESET... $ECHO_C" >&6
9874if test "${am_cv_langinfo_codeset+set}" = set; then
9875  echo $ECHO_N "(cached) $ECHO_C" >&6
9876else
9877  cat >"conftest.$ac_ext" <<_ACEOF
9878#line 9878 "configure"
9879#include "confdefs.h"
9880#include <langinfo.h>
9881int
9882main (void)
9883{
9884char* cs = nl_langinfo(CODESET); (void)cs
9885  ;
9886  return 0;
9887}
9888_ACEOF
9889rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9890if { (eval echo "$as_me:9890: \"$ac_link\"") >&5
9891  (eval $ac_link) 2>&5
9892  ac_status=$?
9893  echo "$as_me:9893: \$? = $ac_status" >&5
9894  (exit "$ac_status"); } &&
9895         { ac_try='test -s "conftest$ac_exeext"'
9896  { (eval echo "$as_me:9896: \"$ac_try\"") >&5
9897  (eval $ac_try) 2>&5
9898  ac_status=$?
9899  echo "$as_me:9899: \$? = $ac_status" >&5
9900  (exit "$ac_status"); }; }; then
9901  am_cv_langinfo_codeset=yes
9902else
9903  echo "$as_me: failed program was:" >&5
9904cat "conftest.$ac_ext" >&5
9905am_cv_langinfo_codeset=no
9906fi
9907rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9908
9909fi
9910echo "$as_me:9910: result: $am_cv_langinfo_codeset" >&5
9911echo "${ECHO_T}$am_cv_langinfo_codeset" >&6
9912	if test "$am_cv_langinfo_codeset" = yes; then
9913
9914cat >>confdefs.h <<\EOF
9915#define HAVE_LANGINFO_CODESET 1
9916EOF
9917
9918	fi
9919
9920   if test "$ac_cv_header_locale_h" = yes; then
9921	echo "$as_me:9921: checking for LC_MESSAGES" >&5
9922echo $ECHO_N "checking for LC_MESSAGES... $ECHO_C" >&6
9923if test "${am_cv_val_LC_MESSAGES+set}" = set; then
9924  echo $ECHO_N "(cached) $ECHO_C" >&6
9925else
9926  cat >"conftest.$ac_ext" <<_ACEOF
9927#line 9927 "configure"
9928#include "confdefs.h"
9929#include <locale.h>
9930int
9931main (void)
9932{
9933return LC_MESSAGES
9934  ;
9935  return 0;
9936}
9937_ACEOF
9938rm -f "conftest.$ac_objext" "conftest$ac_exeext"
9939if { (eval echo "$as_me:9939: \"$ac_link\"") >&5
9940  (eval $ac_link) 2>&5
9941  ac_status=$?
9942  echo "$as_me:9942: \$? = $ac_status" >&5
9943  (exit "$ac_status"); } &&
9944         { ac_try='test -s "conftest$ac_exeext"'
9945  { (eval echo "$as_me:9945: \"$ac_try\"") >&5
9946  (eval $ac_try) 2>&5
9947  ac_status=$?
9948  echo "$as_me:9948: \$? = $ac_status" >&5
9949  (exit "$ac_status"); }; }; then
9950  am_cv_val_LC_MESSAGES=yes
9951else
9952  echo "$as_me: failed program was:" >&5
9953cat "conftest.$ac_ext" >&5
9954am_cv_val_LC_MESSAGES=no
9955fi
9956rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
9957fi
9958echo "$as_me:9958: result: $am_cv_val_LC_MESSAGES" >&5
9959echo "${ECHO_T}$am_cv_val_LC_MESSAGES" >&6
9960	if test "$am_cv_val_LC_MESSAGES" = yes; then
9961
9962cat >>confdefs.h <<\EOF
9963#define HAVE_LC_MESSAGES 1
9964EOF
9965
9966	fi
9967fi
9968   echo "$as_me:9968: checking whether NLS is requested" >&5
9969echo $ECHO_N "checking whether NLS is requested... $ECHO_C" >&6
9970
9971# Check whether --enable-nls or --disable-nls was given.
9972if test "${enable_nls+set}" = set; then
9973  enableval="$enable_nls"
9974  USE_NLS=$enableval
9975else
9976  USE_NLS=no
9977fi;
9978  echo "$as_me:9978: result: $USE_NLS" >&5
9979echo "${ECHO_T}$USE_NLS" >&6
9980
9981  BUILD_INCLUDED_LIBINTL=no
9982  USE_INCLUDED_LIBINTL=no
9983  INTLLIBS=
9984
9985    if test "$USE_NLS" = "yes"; then
9986        POSUB=po
9987
9988cat >>confdefs.h <<\EOF
9989#define ENABLE_NLS 1
9990EOF
9991
9992    echo "$as_me:9992: checking whether included gettext is requested" >&5
9993echo $ECHO_N "checking whether included gettext is requested... $ECHO_C" >&6
9994
9995# Check whether --with-included-gettext or --without-included-gettext was given.
9996if test "${with_included_gettext+set}" = set; then
9997  withval="$with_included_gettext"
9998  nls_cv_force_use_gnu_gettext=$withval
9999else
10000  nls_cv_force_use_gnu_gettext=no
10001fi;
10002    echo "$as_me:10002: result: $nls_cv_force_use_gnu_gettext" >&5
10003echo "${ECHO_T}$nls_cv_force_use_gnu_gettext" >&6
10004
10005    nls_cv_use_gnu_gettext="$nls_cv_force_use_gnu_gettext"
10006    if test "$nls_cv_force_use_gnu_gettext" != "yes"; then
10007                        CATOBJEXT=NONE
10008
10009                                          cf_save_msgfmt_path="$MSGFMT"
10010      cf_save_xgettext_path="$XGETTEXT"
10011
10012            # Extract the first word of "msgfmt", so it can be a program name with args.
10013
10014set dummy msgfmt; ac_word=$2
10015echo "$as_me:10015: checking for $ac_word" >&5
10016echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10017if test "${ac_cv_path_MSGFMT+set}" = set; then
10018  echo $ECHO_N "(cached) $ECHO_C" >&6
10019else
10020  case "$MSGFMT" in
10021  ([\\/]*|?:[\\/]*)
10022  ac_cv_path_MSGFMT="$MSGFMT" # Let the user override the test with a path.
10023  ;;
10024  (*)
10025  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10026  for ac_dir in $PATH; do
10027    test -z "$ac_dir" && ac_dir=.
10028    if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10029      if "$ac_dir/$ac_word" --statistics /dev/null >/dev/null 2>&1; then
10030	ac_cv_path_MSGFMT="$ac_dir/$ac_word$ac_exeext"
10031	break
10032      fi
10033    fi
10034  done
10035  IFS="$ac_save_ifs"
10036  test -z "$ac_cv_path_MSGFMT" && ac_cv_path_MSGFMT=":"
10037  ;;
10038esac
10039fi
10040MSGFMT="$ac_cv_path_MSGFMT"
10041if test "$MSGFMT" != ":"; then
10042  echo "$as_me:10042: result: $MSGFMT" >&5
10043echo "${ECHO_T}$MSGFMT" >&6
10044else
10045  echo "$as_me:10045: result: no" >&5
10046echo "${ECHO_T}no" >&6
10047fi
10048
10049      # Extract the first word of "gmsgfmt", so it can be a program name with args.
10050set dummy gmsgfmt; ac_word=$2
10051echo "$as_me:10051: checking for $ac_word" >&5
10052echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10053if test "${ac_cv_path_GMSGFMT+set}" = set; then
10054  echo $ECHO_N "(cached) $ECHO_C" >&6
10055else
10056  case $GMSGFMT in
10057  [\\/]* | ?:[\\/]*)
10058  ac_cv_path_GMSGFMT="$GMSGFMT" # Let the user override the test with a path.
10059  ;;
10060  *)
10061  ac_save_IFS=$IFS; IFS=$ac_path_separator
10062ac_dummy="$PATH"
10063for ac_dir in $ac_dummy; do
10064  IFS=$ac_save_IFS
10065  test -z "$ac_dir" && ac_dir=.
10066  if $as_executable_p "$ac_dir/$ac_word"; then
10067   ac_cv_path_GMSGFMT="$ac_dir/$ac_word"
10068   echo "$as_me:10068: found $ac_dir/$ac_word" >&5
10069   break
10070fi
10071done
10072
10073  test -z "$ac_cv_path_GMSGFMT" && ac_cv_path_GMSGFMT="$MSGFMT"
10074  ;;
10075esac
10076fi
10077GMSGFMT=$ac_cv_path_GMSGFMT
10078
10079if test -n "$GMSGFMT"; then
10080  echo "$as_me:10080: result: $GMSGFMT" >&5
10081echo "${ECHO_T}$GMSGFMT" >&6
10082else
10083  echo "$as_me:10083: result: no" >&5
10084echo "${ECHO_T}no" >&6
10085fi
10086
10087            # Extract the first word of "xgettext", so it can be a program name with args.
10088
10089set dummy xgettext; ac_word=$2
10090echo "$as_me:10090: checking for $ac_word" >&5
10091echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10092if test "${ac_cv_path_XGETTEXT+set}" = set; then
10093  echo $ECHO_N "(cached) $ECHO_C" >&6
10094else
10095  case "$XGETTEXT" in
10096  ([\\/]*|?:[\\/]*)
10097  ac_cv_path_XGETTEXT="$XGETTEXT" # Let the user override the test with a path.
10098  ;;
10099  (*)
10100  IFS="${IFS= 	}"; ac_save_ifs="$IFS"; IFS="${IFS}${PATH_SEPARATOR}"
10101  for ac_dir in $PATH; do
10102    test -z "$ac_dir" && ac_dir=.
10103    if test -f "$ac_dir/$ac_word$ac_exeext" ; then
10104      if "$ac_dir/$ac_word" --omit-header /dev/null >/dev/null 2>&1; then
10105	ac_cv_path_XGETTEXT="$ac_dir/$ac_word$ac_exeext"
10106	break
10107      fi
10108    fi
10109  done
10110  IFS="$ac_save_ifs"
10111  test -z "$ac_cv_path_XGETTEXT" && ac_cv_path_XGETTEXT=":"
10112  ;;
10113esac
10114fi
10115XGETTEXT="$ac_cv_path_XGETTEXT"
10116if test "$XGETTEXT" != ":"; then
10117  echo "$as_me:10117: result: $XGETTEXT" >&5
10118echo "${ECHO_T}$XGETTEXT" >&6
10119else
10120  echo "$as_me:10120: result: no" >&5
10121echo "${ECHO_T}no" >&6
10122fi
10123
10124      cf_save_OPTS_1="$CPPFLAGS"
10125      if test "x$cf_save_msgfmt_path" = "x$MSGFMT" && \
10126         test "x$cf_save_xgettext_path" = "x$XGETTEXT" ; then
10127
10128cf_fix_cppflags=no
10129cf_new_cflags=
10130cf_new_cppflags=
10131cf_new_extra_cppflags=
10132
10133for cf_add_cflags in -DIGNORE_MSGFMT_HACK
10134do
10135case "$cf_fix_cppflags" in
10136(no)
10137	case "$cf_add_cflags" in
10138	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
10139		case "$cf_add_cflags" in
10140		(-D*)
10141			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
10142
10143			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10144				&& test -z "${cf_tst_cflags}" \
10145				&& cf_fix_cppflags=yes
10146
10147			if test "$cf_fix_cppflags" = yes ; then
10148
10149	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10150	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10151
10152				continue
10153			elif test "${cf_tst_cflags}" = "\"'" ; then
10154
10155	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10156	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10157
10158				continue
10159			fi
10160			;;
10161		esac
10162		case "$CPPFLAGS" in
10163		(*$cf_add_cflags)
10164			;;
10165		(*)
10166			case "$cf_add_cflags" in
10167			(-D*)
10168				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
10169
10170CPPFLAGS=`echo "$CPPFLAGS" | \
10171	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
10172		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
10173
10174				;;
10175			esac
10176
10177	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
10178	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
10179
10180			;;
10181		esac
10182		;;
10183	(*)
10184
10185	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
10186	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
10187
10188		;;
10189	esac
10190	;;
10191(yes)
10192
10193	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
10194	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
10195
10196	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
10197
10198	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
10199		&& test -z "${cf_tst_cflags}" \
10200		&& cf_fix_cppflags=no
10201	;;
10202esac
10203done
10204
10205if test -n "$cf_new_cflags" ; then
10206
10207	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
10208	CFLAGS="${CFLAGS}$cf_new_cflags"
10209
10210fi
10211
10212if test -n "$cf_new_cppflags" ; then
10213
10214	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10215	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
10216
10217fi
10218
10219if test -n "$cf_new_extra_cppflags" ; then
10220
10221	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
10222	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
10223
10224fi
10225
10226      fi
10227
10228      cf_save_LIBS_1="$LIBS"
10229
10230cf_add_libs="$LIBS"
10231# reverse order
10232cf_add_0lib=
10233for cf_add_1lib in $LIBICONV; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
10234# filter duplicates
10235for cf_add_1lib in $cf_add_0lib; do
10236	for cf_add_2lib in $cf_add_libs; do
10237		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
10238			cf_add_1lib=
10239			break
10240		fi
10241	done
10242	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
10243done
10244LIBS="$cf_add_libs"
10245
10246# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
10247# will be set on completion of the AC_TRY_LINK below.
10248cf_cv_header_path_intl=
10249cf_cv_library_path_intl=
10250
10251echo "${as_me:-configure}:10251: testing Starting FIND_LINKAGE(intl,) ..." 1>&5
10252
10253cf_save_LIBS="$LIBS"
10254
10255cat >"conftest.$ac_ext" <<_ACEOF
10256#line 10256 "configure"
10257#include "confdefs.h"
10258
10259#include <libintl.h>
10260extern int _nl_msg_cat_cntr;
10261
10262int
10263main (void)
10264{
10265
10266	bindtextdomain ("", "");
10267	return (gettext ("") != 0)
10268
10269#ifndef IGNORE_MSGFMT_HACK
10270			 + _nl_msg_cat_cntr
10271#endif
10272
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
10290	cf_cv_find_linkage_intl=yes
10291	cf_cv_header_path_intl=/usr/include
10292	cf_cv_library_path_intl=/usr/lib
10293
10294else
10295  echo "$as_me: failed program was:" >&5
10296cat "conftest.$ac_ext" >&5
10297
10298LIBS="-lintl  $cf_save_LIBS"
10299
10300cat >"conftest.$ac_ext" <<_ACEOF
10301#line 10301 "configure"
10302#include "confdefs.h"
10303
10304#include <libintl.h>
10305extern int _nl_msg_cat_cntr;
10306
10307int
10308main (void)
10309{
10310
10311	bindtextdomain ("", "");
10312	return (gettext ("") != 0)
10313
10314#ifndef IGNORE_MSGFMT_HACK
10315			 + _nl_msg_cat_cntr
10316#endif
10317
10318  ;
10319  return 0;
10320}
10321_ACEOF
10322rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10323if { (eval echo "$as_me:10323: \"$ac_link\"") >&5
10324  (eval $ac_link) 2>&5
10325  ac_status=$?
10326  echo "$as_me:10326: \$? = $ac_status" >&5
10327  (exit "$ac_status"); } &&
10328         { ac_try='test -s "conftest$ac_exeext"'
10329  { (eval echo "$as_me:10329: \"$ac_try\"") >&5
10330  (eval $ac_try) 2>&5
10331  ac_status=$?
10332  echo "$as_me:10332: \$? = $ac_status" >&5
10333  (exit "$ac_status"); }; }; then
10334
10335	cf_cv_find_linkage_intl=yes
10336	cf_cv_header_path_intl=/usr/include
10337	cf_cv_library_path_intl=/usr/lib
10338	cf_cv_library_file_intl="-lintl"
10339
10340else
10341  echo "$as_me: failed program was:" >&5
10342cat "conftest.$ac_ext" >&5
10343
10344	cf_cv_find_linkage_intl=no
10345	LIBS="$cf_save_LIBS"
10346
10347	test -n "$verbose" && echo "	find linkage for intl library" 1>&6
10348
10349echo "${as_me:-configure}:10349: testing find linkage for intl library ..." 1>&5
10350
10351echo "${as_me:-configure}:10351: testing Searching for headers in FIND_LINKAGE(intl,) ..." 1>&5
10352
10353	cf_save_CPPFLAGS="$CPPFLAGS"
10354	cf_test_CPPFLAGS="$CPPFLAGS"
10355
10356cf_search=
10357
10358# collect the current set of include-directories from compiler flags
10359cf_header_path_list=""
10360if test -n "${CFLAGS}${CPPFLAGS}" ; then
10361	for cf_header_path in $CPPFLAGS $CFLAGS
10362	do
10363		case "$cf_header_path" in
10364		(-I*)
10365			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
10366
10367test "x$cf_header_path" != "xNONE" && \
10368test -d "$cf_header_path" && \
10369 {
10370	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
10371	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
10372	test -d "$cf_header_path/include/intl" &&       cf_search="$cf_search $cf_header_path/include/intl"
10373	test -d "$cf_header_path/include/intl/include" &&    cf_search="$cf_search $cf_header_path/include/intl/include"
10374	test -d "$cf_header_path/intl/include" &&       cf_search="$cf_search $cf_header_path/intl/include"
10375	test -d "$cf_header_path/intl/include/intl" &&    cf_search="$cf_search $cf_header_path/intl/include/intl"
10376}
10377
10378			cf_header_path_list="$cf_header_path_list $cf_search"
10379			;;
10380		esac
10381	done
10382fi
10383
10384# add the variations for the package we are looking for
10385
10386cf_search=
10387
10388test "x$prefix" != "xNONE" && \
10389test -d "$prefix" && \
10390 {
10391	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
10392	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
10393	test -d "$prefix/include/intl" &&       cf_search="$cf_search $prefix/include/intl"
10394	test -d "$prefix/include/intl/include" &&    cf_search="$cf_search $prefix/include/intl/include"
10395	test -d "$prefix/intl/include" &&       cf_search="$cf_search $prefix/intl/include"
10396	test -d "$prefix/intl/include/intl" &&    cf_search="$cf_search $prefix/intl/include/intl"
10397}
10398
10399for cf_subdir_prefix in \
10400	/usr \
10401	/usr/local \
10402	/usr/pkg \
10403	/opt \
10404	/opt/local \
10405	$HOME
10406do
10407
10408test "x$cf_subdir_prefix" != "x$prefix" && \
10409test -d "$cf_subdir_prefix" && \
10410{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10411	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
10412	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
10413	test -d "$cf_subdir_prefix/include/intl" &&       cf_search="$cf_search $cf_subdir_prefix/include/intl"
10414	test -d "$cf_subdir_prefix/include/intl/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/intl/include"
10415	test -d "$cf_subdir_prefix/intl/include" &&       cf_search="$cf_search $cf_subdir_prefix/intl/include"
10416	test -d "$cf_subdir_prefix/intl/include/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/include/intl"
10417}
10418
10419done
10420
10421test "$includedir" != NONE && \
10422test "$includedir" != "/usr/include" && \
10423test -d "$includedir" && {
10424	test -d "$includedir" &&    cf_search="$cf_search $includedir"
10425	test -d "$includedir/intl" && cf_search="$cf_search $includedir/intl"
10426}
10427
10428test "$oldincludedir" != NONE && \
10429test "$oldincludedir" != "/usr/include" && \
10430test -d "$oldincludedir" && {
10431	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
10432	test -d "$oldincludedir/intl" && cf_search="$cf_search $oldincludedir/intl"
10433}
10434
10435cf_search="$cf_search $cf_header_path_list"
10436
10437	for cf_cv_header_path_intl in $cf_search
10438	do
10439		if test -d "$cf_cv_header_path_intl" ; then
10440			test -n "$verbose" && echo "	... testing $cf_cv_header_path_intl" 1>&6
10441
10442echo "${as_me:-configure}:10442: testing ... testing $cf_cv_header_path_intl ..." 1>&5
10443
10444			CPPFLAGS="$cf_save_CPPFLAGS"
10445
10446	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10447	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_intl"
10448
10449			cat >"conftest.$ac_ext" <<_ACEOF
10450#line 10450 "configure"
10451#include "confdefs.h"
10452
10453#include <libintl.h>
10454extern int _nl_msg_cat_cntr;
10455
10456int
10457main (void)
10458{
10459
10460	bindtextdomain ("", "");
10461	return (gettext ("") != 0)
10462
10463#ifndef IGNORE_MSGFMT_HACK
10464			 + _nl_msg_cat_cntr
10465#endif
10466
10467  ;
10468  return 0;
10469}
10470_ACEOF
10471rm -f "conftest.$ac_objext"
10472if { (eval echo "$as_me:10472: \"$ac_compile\"") >&5
10473  (eval $ac_compile) 2>&5
10474  ac_status=$?
10475  echo "$as_me:10475: \$? = $ac_status" >&5
10476  (exit "$ac_status"); } &&
10477         { ac_try='test -s "conftest.$ac_objext"'
10478  { (eval echo "$as_me:10478: \"$ac_try\"") >&5
10479  (eval $ac_try) 2>&5
10480  ac_status=$?
10481  echo "$as_me:10481: \$? = $ac_status" >&5
10482  (exit "$ac_status"); }; }; then
10483
10484				test -n "$verbose" && echo "	... found intl headers in $cf_cv_header_path_intl" 1>&6
10485
10486echo "${as_me:-configure}:10486: testing ... found intl headers in $cf_cv_header_path_intl ..." 1>&5
10487
10488				cf_cv_find_linkage_intl=maybe
10489				cf_test_CPPFLAGS="$CPPFLAGS"
10490				break
10491else
10492  echo "$as_me: failed program was:" >&5
10493cat "conftest.$ac_ext" >&5
10494
10495				CPPFLAGS="$cf_save_CPPFLAGS"
10496
10497fi
10498rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10499		fi
10500	done
10501
10502	if test "$cf_cv_find_linkage_intl" = maybe ; then
10503
10504echo "${as_me:-configure}:10504: testing Searching for intl library in FIND_LINKAGE(intl,) ..." 1>&5
10505
10506		cf_save_LIBS="$LIBS"
10507		cf_save_LDFLAGS="$LDFLAGS"
10508
10509		if test "$cf_cv_find_linkage_intl" != yes ; then
10510
10511cf_search=
10512cf_library_path_list=""
10513if test -n "${LDFLAGS}${LIBS}" ; then
10514	for cf_library_path in $LDFLAGS $LIBS
10515	do
10516		case "$cf_library_path" in
10517		(-L*)
10518			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
10519
10520test "x$cf_library_path" != "xNONE" && \
10521test -d "$cf_library_path" && \
10522 {
10523	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
10524	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
10525	test -d "$cf_library_path/lib/intl" &&       cf_search="$cf_search $cf_library_path/lib/intl"
10526	test -d "$cf_library_path/lib/intl/lib" &&    cf_search="$cf_search $cf_library_path/lib/intl/lib"
10527	test -d "$cf_library_path/intl/lib" &&       cf_search="$cf_search $cf_library_path/intl/lib"
10528	test -d "$cf_library_path/intl/lib/intl" &&    cf_search="$cf_search $cf_library_path/intl/lib/intl"
10529}
10530
10531			cf_library_path_list="$cf_library_path_list $cf_search"
10532			;;
10533		esac
10534	done
10535fi
10536
10537cf_search=
10538
10539test "x$prefix" != "xNONE" && \
10540test -d "$prefix" && \
10541 {
10542	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
10543	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
10544	test -d "$prefix/lib/intl" &&       cf_search="$cf_search $prefix/lib/intl"
10545	test -d "$prefix/lib/intl/lib" &&    cf_search="$cf_search $prefix/lib/intl/lib"
10546	test -d "$prefix/intl/lib" &&       cf_search="$cf_search $prefix/intl/lib"
10547	test -d "$prefix/intl/lib/intl" &&    cf_search="$cf_search $prefix/intl/lib/intl"
10548}
10549
10550for cf_subdir_prefix in \
10551	/usr \
10552	/usr/local \
10553	/usr/pkg \
10554	/opt \
10555	/opt/local \
10556	$HOME
10557do
10558
10559test "x$cf_subdir_prefix" != "x$prefix" && \
10560test -d "$cf_subdir_prefix" && \
10561{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
10562	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
10563	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
10564	test -d "$cf_subdir_prefix/lib/intl" &&       cf_search="$cf_search $cf_subdir_prefix/lib/intl"
10565	test -d "$cf_subdir_prefix/lib/intl/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/intl/lib"
10566	test -d "$cf_subdir_prefix/intl/lib" &&       cf_search="$cf_search $cf_subdir_prefix/intl/lib"
10567	test -d "$cf_subdir_prefix/intl/lib/intl" &&    cf_search="$cf_search $cf_subdir_prefix/intl/lib/intl"
10568}
10569
10570done
10571
10572cf_search="$cf_library_path_list $cf_search"
10573
10574			for cf_cv_library_path_intl in $cf_search
10575			do
10576				if test -d "$cf_cv_library_path_intl" ; then
10577					test -n "$verbose" && echo "	... testing $cf_cv_library_path_intl" 1>&6
10578
10579echo "${as_me:-configure}:10579: testing ... testing $cf_cv_library_path_intl ..." 1>&5
10580
10581					CPPFLAGS="$cf_test_CPPFLAGS"
10582					LIBS="-lintl  $cf_save_LIBS"
10583					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_intl"
10584					cat >"conftest.$ac_ext" <<_ACEOF
10585#line 10585 "configure"
10586#include "confdefs.h"
10587
10588#include <libintl.h>
10589extern int _nl_msg_cat_cntr;
10590
10591int
10592main (void)
10593{
10594
10595	bindtextdomain ("", "");
10596	return (gettext ("") != 0)
10597
10598#ifndef IGNORE_MSGFMT_HACK
10599			 + _nl_msg_cat_cntr
10600#endif
10601
10602  ;
10603  return 0;
10604}
10605_ACEOF
10606rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10607if { (eval echo "$as_me:10607: \"$ac_link\"") >&5
10608  (eval $ac_link) 2>&5
10609  ac_status=$?
10610  echo "$as_me:10610: \$? = $ac_status" >&5
10611  (exit "$ac_status"); } &&
10612         { ac_try='test -s "conftest$ac_exeext"'
10613  { (eval echo "$as_me:10613: \"$ac_try\"") >&5
10614  (eval $ac_try) 2>&5
10615  ac_status=$?
10616  echo "$as_me:10616: \$? = $ac_status" >&5
10617  (exit "$ac_status"); }; }; then
10618
10619					test -n "$verbose" && echo "	... found intl library in $cf_cv_library_path_intl" 1>&6
10620
10621echo "${as_me:-configure}:10621: testing ... found intl library in $cf_cv_library_path_intl ..." 1>&5
10622
10623					cf_cv_find_linkage_intl=yes
10624					cf_cv_library_file_intl="-lintl"
10625					break
10626else
10627  echo "$as_me: failed program was:" >&5
10628cat "conftest.$ac_ext" >&5
10629
10630					CPPFLAGS="$cf_save_CPPFLAGS"
10631					LIBS="$cf_save_LIBS"
10632					LDFLAGS="$cf_save_LDFLAGS"
10633
10634fi
10635rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10636				fi
10637			done
10638			CPPFLAGS="$cf_save_CPPFLAGS"
10639			LDFLAGS="$cf_save_LDFLAGS"
10640		fi
10641
10642	else
10643		cf_cv_find_linkage_intl=no
10644	fi
10645
10646fi
10647rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10648
10649fi
10650rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10651
10652LIBS="$cf_save_LIBS"
10653
10654if test "$cf_cv_find_linkage_intl" = yes ; then
10655cf_cv_func_gettext=yes
10656else
10657cf_cv_func_gettext=no
10658fi
10659
10660      echo "$as_me:10660: checking for libintl.h and gettext()" >&5
10661echo $ECHO_N "checking for libintl.h and gettext()... $ECHO_C" >&6
10662      echo "$as_me:10662: result: $cf_cv_func_gettext" >&5
10663echo "${ECHO_T}$cf_cv_func_gettext" >&6
10664
10665      LIBS="$cf_save_LIBS_1"
10666      CPPFLAGS="$cf_save_OPTS_1"
10667
10668      if test "$cf_cv_func_gettext" = yes ; then
10669
10670cat >>confdefs.h <<\EOF
10671#define HAVE_LIBINTL_H 1
10672EOF
10673
10674                                        if test "$PACKAGE" != gettext; then
10675
10676cat >>confdefs.h <<\EOF
10677#define HAVE_GETTEXT 1
10678EOF
10679
10680if test -n "$cf_cv_header_path_intl" ; then
10681  for cf_add_incdir in $cf_cv_header_path_intl
10682  do
10683	while test "$cf_add_incdir" != /usr/include
10684	do
10685	  if test -d "$cf_add_incdir"
10686	  then
10687		cf_have_incdir=no
10688		if test -n "$CFLAGS$CPPFLAGS" ; then
10689		  # a loop is needed to ensure we can add subdirs of existing dirs
10690		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
10691			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
10692			  cf_have_incdir=yes; break
10693			fi
10694		  done
10695		fi
10696
10697		if test "$cf_have_incdir" = no ; then
10698		  if test "$cf_add_incdir" = /usr/local/include ; then
10699			if test "$GCC" = yes
10700			then
10701			  cf_save_CPPFLAGS=$CPPFLAGS
10702
10703	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
10704	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
10705
10706			  cat >"conftest.$ac_ext" <<_ACEOF
10707#line 10707 "configure"
10708#include "confdefs.h"
10709#include <stdio.h>
10710int
10711main (void)
10712{
10713printf("Hello")
10714  ;
10715  return 0;
10716}
10717_ACEOF
10718rm -f "conftest.$ac_objext"
10719if { (eval echo "$as_me:10719: \"$ac_compile\"") >&5
10720  (eval $ac_compile) 2>&5
10721  ac_status=$?
10722  echo "$as_me:10722: \$? = $ac_status" >&5
10723  (exit "$ac_status"); } &&
10724         { ac_try='test -s "conftest.$ac_objext"'
10725  { (eval echo "$as_me:10725: \"$ac_try\"") >&5
10726  (eval $ac_try) 2>&5
10727  ac_status=$?
10728  echo "$as_me:10728: \$? = $ac_status" >&5
10729  (exit "$ac_status"); }; }; then
10730  :
10731else
10732  echo "$as_me: failed program was:" >&5
10733cat "conftest.$ac_ext" >&5
10734cf_have_incdir=yes
10735fi
10736rm -f "conftest.$ac_objext" "conftest.$ac_ext"
10737			  CPPFLAGS=$cf_save_CPPFLAGS
10738			fi
10739		  fi
10740		fi
10741
10742		if test "$cf_have_incdir" = no ; then
10743		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
10744
10745echo "${as_me:-configure}:10745: testing adding $cf_add_incdir to include-path ..." 1>&5
10746
10747		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
10748
10749		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
10750		  test "$cf_top_incdir" = "$cf_add_incdir" && break
10751		  cf_add_incdir="$cf_top_incdir"
10752		else
10753		  break
10754		fi
10755	  else
10756		break
10757	  fi
10758	done
10759  done
10760fi
10761
10762          if test -n "$cf_cv_library_file_intl" ; then
10763                                                INTLLIBS="$cf_cv_library_file_intl $LIBICONV"
10764
10765if test -n "$cf_cv_library_path_intl" ; then
10766	for cf_add_libdir in $cf_cv_library_path_intl
10767	do
10768		if test "$cf_add_libdir" = /usr/lib ; then
10769			:
10770		elif test -d "$cf_add_libdir"
10771		then
10772			cf_have_libdir=no
10773			if test -n "$LDFLAGS$LIBS" ; then
10774				# a loop is needed to ensure we can add subdirs of existing dirs
10775				for cf_test_libdir in $LDFLAGS $LIBS ; do
10776					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
10777						cf_have_libdir=yes; break
10778					fi
10779				done
10780			fi
10781			if test "$cf_have_libdir" = no ; then
10782				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
10783
10784echo "${as_me:-configure}:10784: testing adding $cf_add_libdir to library-path ..." 1>&5
10785
10786				INTLLIBS="-L$cf_add_libdir $INTLLIBS"
10787			fi
10788		fi
10789	done
10790fi
10791
10792          fi
10793
10794          gt_save_LIBS="$LIBS"
10795          LIBS="$LIBS $INTLLIBS"
10796
10797for ac_func in dcgettext
10798do
10799as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
10800echo "$as_me:10800: checking for $ac_func" >&5
10801echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
10802if eval "test \"\${$as_ac_var+set}\" = set"; then
10803  echo $ECHO_N "(cached) $ECHO_C" >&6
10804else
10805  cat >"conftest.$ac_ext" <<_ACEOF
10806#line 10806 "configure"
10807#include "confdefs.h"
10808#define $ac_func autoconf_temporary
10809#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
10810#undef $ac_func
10811
10812#ifdef __cplusplus
10813extern "C"
10814#endif
10815
10816/* We use char because int might match the return type of a gcc2
10817   builtin and then its argument prototype would still apply.  */
10818char $ac_func (void);
10819
10820int
10821main (void)
10822{
10823
10824/* The GNU C library defines stubs for functions which it implements
10825    to always fail with ENOSYS.  Some functions are actually named
10826    something starting with __ and the normal name is an alias.  */
10827#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
10828#error found stub for $ac_func
10829#endif
10830
10831	return $ac_func ();
10832  ;
10833  return 0;
10834}
10835_ACEOF
10836rm -f "conftest.$ac_objext" "conftest$ac_exeext"
10837if { (eval echo "$as_me:10837: \"$ac_link\"") >&5
10838  (eval $ac_link) 2>&5
10839  ac_status=$?
10840  echo "$as_me:10840: \$? = $ac_status" >&5
10841  (exit "$ac_status"); } &&
10842         { ac_try='test -s "conftest$ac_exeext"'
10843  { (eval echo "$as_me:10843: \"$ac_try\"") >&5
10844  (eval $ac_try) 2>&5
10845  ac_status=$?
10846  echo "$as_me:10846: \$? = $ac_status" >&5
10847  (exit "$ac_status"); }; }; then
10848  eval "$as_ac_var=yes"
10849else
10850  echo "$as_me: failed program was:" >&5
10851cat "conftest.$ac_ext" >&5
10852eval "$as_ac_var=no"
10853fi
10854rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
10855fi
10856echo "$as_me:10856: result: `eval echo '${'"$as_ac_var"'}'`" >&5
10857echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
10858if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
10859  cat >>confdefs.h <<EOF
10860#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
10861EOF
10862
10863fi
10864done
10865
10866          LIBS="$gt_save_LIBS"
10867
10868          CATOBJEXT=.gmo
10869        fi
10870      elif test -z "$MSGFMT" || test -z "$XGETTEXT" ; then
10871        { echo "$as_me:10871: WARNING: disabling NLS feature" >&5
10872echo "$as_me: WARNING: disabling NLS feature" >&2;}
10873        sed -e /ENABLE_NLS/d confdefs.h >confdefs.tmp
10874        mv confdefs.tmp confdefs.h
10875        ALL_LINGUAS=
10876        CATOBJEXT=.ignored
10877        MSGFMT=":"
10878        GMSGFMT=":"
10879        XGETTEXT=":"
10880        POSUB=
10881        BUILD_INCLUDED_LIBINTL=no
10882        USE_INCLUDED_LIBINTL=no
10883        USE_NLS=no
10884        nls_cv_use_gnu_gettext=no
10885      fi
10886
10887      if test "$CATOBJEXT" = "NONE"; then
10888                        nls_cv_use_gnu_gettext=maybe
10889      fi
10890    fi
10891
10892    if test "$nls_cv_use_gnu_gettext" != "no"; then
10893      CATOBJEXT=.gmo
10894      if test -f "$srcdir/intl/libintl.h" ; then
10895                INTLOBJS="\$(GETTOBJS)"
10896        BUILD_INCLUDED_LIBINTL=yes
10897        USE_INCLUDED_LIBINTL=yes
10898        INTLLIBS="\$(top_builddir)/intl/libintl.a $LIBICONV"
10899        LIBS=`echo " $LIBS " | sed -e 's/ -lintl / /' -e 's/^ //' -e 's/ $//'`
10900      elif test "$nls_cv_use_gnu_gettext" = "yes"; then
10901        nls_cv_use_gnu_gettext=no
10902        { echo "$as_me:10902: WARNING: no NLS library is packaged with this application" >&5
10903echo "$as_me: WARNING: no NLS library is packaged with this application" >&2;}
10904      fi
10905    fi
10906
10907        if test "$GMSGFMT" != ":"; then
10908      if $GMSGFMT --statistics /dev/null >/dev/null 2>&1; then
10909        : ;
10910      else
10911        { echo "$as_me:10911: WARNING: found msgfmt program is not GNU msgfmt" >&5
10912echo "$as_me: WARNING: found msgfmt program is not GNU msgfmt" >&2;}
10913      fi
10914    fi
10915
10916        if test "$XGETTEXT" != ":"; then
10917      if $XGETTEXT --omit-header /dev/null >/dev/null 2>&1; then
10918        : ;
10919      else
10920        { echo "$as_me:10920: WARNING: found xgettext program is not GNU xgettext" >&5
10921echo "$as_me: WARNING: found xgettext program is not GNU xgettext" >&2;}
10922      fi
10923    fi
10924  fi
10925
10926  if test "$XGETTEXT" != ":"; then
10927    ac_config_commands="$ac_config_commands default-1"
10928
10929            if test "$PACKAGE" = gettext; then
10930      BUILD_INCLUDED_LIBINTL=yes
10931    fi
10932
10933                                            if test "$nls_cv_use_gnu_gettext" = "yes"; then
10934      for ac_prog in bison
10935do
10936  # Extract the first word of "$ac_prog", so it can be a program name with args.
10937set dummy $ac_prog; ac_word=$2
10938echo "$as_me:10938: checking for $ac_word" >&5
10939echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
10940if test "${ac_cv_prog_INTLBISON+set}" = set; then
10941  echo $ECHO_N "(cached) $ECHO_C" >&6
10942else
10943  if test -n "$INTLBISON"; then
10944  ac_cv_prog_INTLBISON="$INTLBISON" # Let the user override the test.
10945else
10946  ac_save_IFS=$IFS; IFS=$ac_path_separator
10947ac_dummy="$PATH"
10948for ac_dir in $ac_dummy; do
10949  IFS=$ac_save_IFS
10950  test -z "$ac_dir" && ac_dir=.
10951  $as_executable_p "$ac_dir/$ac_word" || continue
10952ac_cv_prog_INTLBISON="$ac_prog"
10953echo "$as_me:10953: found $ac_dir/$ac_word" >&5
10954break
10955done
10956
10957fi
10958fi
10959INTLBISON=$ac_cv_prog_INTLBISON
10960if test -n "$INTLBISON"; then
10961  echo "$as_me:10961: result: $INTLBISON" >&5
10962echo "${ECHO_T}$INTLBISON" >&6
10963else
10964  echo "$as_me:10964: result: no" >&5
10965echo "${ECHO_T}no" >&6
10966fi
10967
10968  test -n "$INTLBISON" && break
10969done
10970
10971      if test -z "$INTLBISON"; then
10972        ac_verc_fail=yes
10973      else
10974                echo "$as_me:10974: checking version of bison" >&5
10975echo $ECHO_N "checking version of bison... $ECHO_C" >&6
10976        ac_prog_version=`$INTLBISON --version 2>&1 | sed -n 's/^.*GNU Bison.* \([0-9]*\.[0-9.]*\).*$/\1/p'`
10977        case "$ac_prog_version" in
10978          ('') ac_prog_version="v. ?.??, bad"; ac_verc_fail=yes;;
10979          (1.2[6-9]*|1.[3-9][0-9]*|[2-9].*)
10980             ac_prog_version="$ac_prog_version, ok"; ac_verc_fail=no;;
10981          (*) ac_prog_version="$ac_prog_version, bad"; ac_verc_fail=yes;;
10982        esac
10983      echo "$as_me:10983: result: $ac_prog_version" >&5
10984echo "${ECHO_T}$ac_prog_version" >&6
10985      fi
10986      if test "$ac_verc_fail" = yes; then
10987        INTLBISON=:
10988      fi
10989    fi
10990
10991                for lang in $ALL_LINGUAS; do
10992      GMOFILES="$GMOFILES $lang.gmo"
10993      POFILES="$POFILES $lang.po"
10994    done
10995  fi
10996
10997    nls_cv_header_intl=
10998  nls_cv_header_libgt=
10999
11000    DATADIRNAME=share
11001
11002    INSTOBJEXT=.mo
11003
11004    GENCAT=gencat
11005
11006   if test "x$CATOBJEXT" != "x"; then
11007     if test "x$ALL_LINGUAS" = "x"; then
11008       LINGUAS=
11009     else
11010       echo "$as_me:11010: checking for catalogs to be installed" >&5
11011echo $ECHO_N "checking for catalogs to be installed... $ECHO_C" >&6
11012       NEW_LINGUAS=
11013       for presentlang in $ALL_LINGUAS; do
11014         useit=no
11015         for desiredlang in ${LINGUAS-$ALL_LINGUAS}; do
11016           # Use the presentlang catalog if desiredlang is
11017           #   a. equal to presentlang, or
11018           #   b. a variant of presentlang (because in this case,
11019           #      presentlang can be used as a fallback for messages
11020           #      which are not translated in the desiredlang catalog).
11021           case "$desiredlang" in
11022             ("$presentlang"*) useit=yes;;
11023           esac
11024         done
11025         if test "$useit" = yes; then
11026           NEW_LINGUAS="$NEW_LINGUAS $presentlang"
11027         fi
11028       done
11029       LINGUAS=$NEW_LINGUAS
11030       echo "$as_me:11030: result: $LINGUAS" >&5
11031echo "${ECHO_T}$LINGUAS" >&6
11032     fi
11033
11034          if test -n "$LINGUAS"; then
11035       for lang in $LINGUAS; do CATALOGS="$CATALOGS $lang$CATOBJEXT"; done
11036     fi
11037   fi
11038
11039      INTL_LIBTOOL_SUFFIX_PREFIX=
11040
11041if test "$USE_NLS" = yes ; then
11042
11043# Check whether --with-textdomain or --without-textdomain was given.
11044if test "${with_textdomain+set}" = set; then
11045  withval="$with_textdomain"
11046  NLS_TEXTDOMAIN=$withval
11047else
11048  NLS_TEXTDOMAIN=$PACKAGE
11049fi;
11050
11051cat >>confdefs.h <<EOF
11052#define NLS_TEXTDOMAIN "$NLS_TEXTDOMAIN"
11053EOF
11054
11055fi
11056
11057INTLDIR_MAKE=
11058MSG_DIR_MAKE=
11059SUB_MAKEFILE=
11060
11061cf_makefile=makefile
11062
11063use_our_messages=no
11064if test "$USE_NLS" = yes ; then
11065if test -d "$srcdir/po" ; then
11066echo "$as_me:11066: checking if we should use included message-library" >&5
11067echo $ECHO_N "checking if we should use included message-library... $ECHO_C" >&6
11068
11069# Check whether --enable-included-msgs or --disable-included-msgs was given.
11070if test "${enable_included_msgs+set}" = set; then
11071  enableval="$enable_included_msgs"
11072  use_our_messages=$enableval
11073else
11074  use_our_messages=yes
11075fi;
11076fi
11077echo "$as_me:11077: result: $use_our_messages" >&5
11078echo "${ECHO_T}$use_our_messages" >&6
11079fi
11080
11081MSG_DIR_MAKE="#"
11082if test "$use_our_messages" = yes
11083then
11084	SUB_MAKEFILE="$SUB_MAKEFILE po/$cf_makefile.in:$srcdir/po/$cf_makefile.inn"
11085	MSG_DIR_MAKE=
11086fi
11087
11088if test "$USE_INCLUDED_LIBINTL" = yes ; then
11089	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11090		:
11091	elif test "$nls_cv_use_gnu_gettext" = yes ; then
11092		:
11093	else
11094		INTLDIR_MAKE="#"
11095	fi
11096	if test -z "$INTLDIR_MAKE"; then
11097
11098cat >>confdefs.h <<\EOF
11099#define HAVE_LIBGETTEXT_H 1
11100EOF
11101
11102		for cf_makefile in \
11103			$srcdir/intl/Makefile.in \
11104			$srcdir/intl/makefile.in
11105		do
11106			if test -f "$cf_makefile" ; then
11107				SUB_MAKEFILE="$SUB_MAKEFILE `echo \"${cf_makefile}\"|sed -e 's,^'$srcdir/',,' -e 's/\.in$//'`:${cf_makefile}"
11108				break
11109			fi
11110		done
11111	fi
11112else
11113	INTLDIR_MAKE="#"
11114	if test "$USE_NLS" = yes ; then
11115
11116for ac_header in libintl.h
11117do
11118as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
11119echo "$as_me:11119: checking for $ac_header" >&5
11120echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
11121if eval "test \"\${$as_ac_Header+set}\" = set"; then
11122  echo $ECHO_N "(cached) $ECHO_C" >&6
11123else
11124  cat >"conftest.$ac_ext" <<_ACEOF
11125#line 11125 "configure"
11126#include "confdefs.h"
11127#include <$ac_header>
11128_ACEOF
11129if { (eval echo "$as_me:11129: \"$ac_cpp "conftest.$ac_ext"\"") >&5
11130  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
11131  ac_status=$?
11132  $EGREP -v '^ *\+' conftest.er1 >conftest.err
11133  rm -f conftest.er1
11134  cat conftest.err >&5
11135  echo "$as_me:11135: \$? = $ac_status" >&5
11136  (exit "$ac_status"); } >/dev/null; then
11137  if test -s conftest.err; then
11138    ac_cpp_err=$ac_c_preproc_warn_flag
11139  else
11140    ac_cpp_err=
11141  fi
11142else
11143  ac_cpp_err=yes
11144fi
11145if test -z "$ac_cpp_err"; then
11146  eval "$as_ac_Header=yes"
11147else
11148  echo "$as_me: failed program was:" >&5
11149  cat "conftest.$ac_ext" >&5
11150  eval "$as_ac_Header=no"
11151fi
11152rm -f conftest.err "conftest.$ac_ext"
11153fi
11154echo "$as_me:11154: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
11155echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
11156if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
11157  cat >>confdefs.h <<EOF
11158#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
11159EOF
11160
11161fi
11162done
11163
11164	fi
11165fi
11166
11167if test -z "$INTLDIR_MAKE" ; then
11168
11169	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11170	CPPFLAGS="${CPPFLAGS}-I../intl"
11171
11172fi
11173
11174if test "$BUILD_INCLUDED_LIBINTL" = yes ; then
11175	GT_YES="#"
11176	GT_NO=
11177else
11178	GT_YES=
11179	GT_NO="#"
11180fi
11181
11182if test "$USE_INCLUDED_LIBINTL" = yes ; then
11183	if test "$nls_cv_force_use_gnu_gettext" = yes ; then
11184
11185cat >>confdefs.h <<\EOF
11186#define HAVE_GETTEXT 1
11187EOF
11188
11189	elif test "$nls_cv_use_gnu_gettext" = yes ; then
11190
11191cat >>confdefs.h <<\EOF
11192#define HAVE_GETTEXT 1
11193EOF
11194
11195	fi
11196	if test -n "$nls_cv_header_intl" ; then
11197
11198cat >>confdefs.h <<\EOF
11199#define HAVE_LIBINTL_H 1
11200EOF
11201
11202	fi
11203fi
11204
11205INTLDIR_CPPFLAGS="#"
11206if test -z "$INTLDIR_MAKE" ; then
11207	INTLDIR_CPPFLAGS=
11208fi
11209
11210# Check whether --with-nls-datadir or --without-nls-datadir was given.
11211if test "${with_nls_datadir+set}" = set; then
11212  withval="$with_nls_datadir"
11213
11214else
11215  withval="${NLS_DATADIR:-$prefix/$DATADIRNAME}"
11216fi; if test -n "$prefix/$DATADIRNAME" ; then
11217
11218if test "x$prefix" != xNONE; then
11219	cf_path_syntax="$prefix"
11220else
11221	cf_path_syntax="$ac_default_prefix"
11222fi
11223
11224case ".$withval" in
11225(.\$\(*\)*|.\'*\'*)
11226	;;
11227(..|./*|.\\*)
11228	;;
11229(.[a-zA-Z]:[\\/]*) # OS/2 EMX
11230	;;
11231(.\$\{*prefix\}*|.\$\{*dir\}*)
11232	eval withval="$withval"
11233	case ".$withval" in
11234	(.NONE/*)
11235		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
11236		;;
11237	esac
11238	;;
11239(.no|.NONE/*)
11240	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
11241	;;
11242(*)
11243	{ { echo "$as_me:11243: error: expected a pathname, not \"$withval\"" >&5
11244echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
11245   { (exit 1); exit 1; }; }
11246	;;
11247esac
11248
11249fi
11250eval NLS_DATADIR="$withval"
11251
11252echo "$as_me:11252: checking if you want full utility pathnames" >&5
11253echo $ECHO_N "checking if you want full utility pathnames... $ECHO_C" >&6
11254
11255# Check whether --enable-full-paths or --disable-full-paths was given.
11256if test "${enable_full_paths+set}" = set; then
11257  enableval="$enable_full_paths"
11258  test "$enableval" != no && enableval=yes
11259	if test "$enableval" != "yes" ; then
11260    with_full_paths=no
11261	else
11262		with_full_paths=yes
11263	fi
11264else
11265  enableval=yes
11266	with_full_paths=yes
11267
11268fi;
11269echo "$as_me:11269: result: $with_full_paths" >&5
11270echo "${ECHO_T}$with_full_paths" >&6
11271test "$with_full_paths" = no &&
11272cat >>confdefs.h <<\EOF
11273#define USE_EXECVP 1
11274EOF
11275
11276echo "$as_me:11276: checking for system mailer" >&5
11277echo $ECHO_N "checking for system mailer... $ECHO_C" >&6
11278if test "${cf_cv_SYSTEM_MAIL+set}" = set; then
11279  echo $ECHO_N "(cached) $ECHO_C" >&6
11280else
11281
11282	cf_cv_SYSTEM_MAIL=unknown
11283	for cv_path in /usr/mmdf/bin/submit \
11284	/usr/sbin/sendmail \
11285	/usr/lib/sendmail  \
11286
11287	do
11288		if test -f "$cv_path" ; then
11289			cf_cv_SYSTEM_MAIL="$cv_path"
11290			break
11291		fi
11292	done
11293
11294fi
11295
11296echo "$as_me:11296: result: $cf_cv_SYSTEM_MAIL" >&5
11297echo "${ECHO_T}$cf_cv_SYSTEM_MAIL" >&6
11298
11299cat >>confdefs.h <<EOF
11300#define SYSTEM_MAIL "$cf_cv_SYSTEM_MAIL"
11301EOF
11302
11303echo "$as_me:11303: checking system mail flags" >&5
11304echo $ECHO_N "checking system mail flags... $ECHO_C" >&6
11305if test "${cf_cv_system_mail_flags+set}" = set; then
11306  echo $ECHO_N "(cached) $ECHO_C" >&6
11307else
11308
11309	case "$cf_cv_SYSTEM_MAIL" in
11310	(*/mmdf/*)
11311		cf_cv_system_mail_flags="-mlruxto,cc\\\\*"
11312        	;;
11313	(*)
11314        	cf_cv_system_mail_flags="-t -oi"
11315	esac
11316
11317fi
11318
11319echo "$as_me:11319: result: $cf_cv_system_mail_flags" >&5
11320echo "${ECHO_T}$cf_cv_system_mail_flags" >&6
11321
11322cat >>confdefs.h <<EOF
11323#define SYSTEM_MAIL_FLAGS "$cf_cv_system_mail_flags"
11324EOF
11325
11326if test -n "$SYSTEM_MAIL" ; then
11327if test "$with_full_paths" = no ; then
11328	SYSTEM_MAIL=`basename "$SYSTEM_MAIL"`
11329fi
11330fi
11331
11332echo "$as_me:11332: checking if the POSIX test-macros are already defined" >&5
11333echo $ECHO_N "checking if the POSIX test-macros are already defined... $ECHO_C" >&6
11334if test "${cf_cv_posix_visible+set}" = set; then
11335  echo $ECHO_N "(cached) $ECHO_C" >&6
11336else
11337
11338cat >"conftest.$ac_ext" <<_ACEOF
11339#line 11339 "configure"
11340#include "confdefs.h"
11341#include <stdio.h>
11342int
11343main (void)
11344{
11345
11346#if defined(__POSIX_VISIBLE) && ((__POSIX_VISIBLE - 0L) > 0) \
11347	&& defined(__XSI_VISIBLE) && ((__XSI_VISIBLE - 0L) > 0) \
11348	&& defined(__BSD_VISIBLE) && ((__BSD_VISIBLE - 0L) > 0) \
11349	&& defined(__ISO_C_VISIBLE) && ((__ISO_C_VISIBLE - 0L) > 0)
11350#error conflicting symbols found
11351#endif
11352
11353  ;
11354  return 0;
11355}
11356_ACEOF
11357rm -f "conftest.$ac_objext"
11358if { (eval echo "$as_me:11358: \"$ac_compile\"") >&5
11359  (eval $ac_compile) 2>&5
11360  ac_status=$?
11361  echo "$as_me:11361: \$? = $ac_status" >&5
11362  (exit "$ac_status"); } &&
11363         { ac_try='test -s "conftest.$ac_objext"'
11364  { (eval echo "$as_me:11364: \"$ac_try\"") >&5
11365  (eval $ac_try) 2>&5
11366  ac_status=$?
11367  echo "$as_me:11367: \$? = $ac_status" >&5
11368  (exit "$ac_status"); }; }; then
11369  cf_cv_posix_visible=no
11370else
11371  echo "$as_me: failed program was:" >&5
11372cat "conftest.$ac_ext" >&5
11373cf_cv_posix_visible=yes
11374fi
11375rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11376
11377fi
11378echo "$as_me:11378: result: $cf_cv_posix_visible" >&5
11379echo "${ECHO_T}$cf_cv_posix_visible" >&6
11380
11381if test "$cf_cv_posix_visible" = no; then
11382
11383cf_XOPEN_SOURCE=500
11384cf_POSIX_C_SOURCE=199506L
11385cf_xopen_source=
11386
11387case "$host_os" in
11388(aix[4-7]*)
11389	cf_xopen_source="-D_ALL_SOURCE"
11390	;;
11391(msys)
11392	cf_XOPEN_SOURCE=600
11393	;;
11394(darwin[0-8].*)
11395	cf_xopen_source="-D_APPLE_C_SOURCE"
11396	;;
11397(darwin*)
11398	cf_xopen_source="-D_DARWIN_C_SOURCE"
11399	cf_XOPEN_SOURCE=
11400	;;
11401(freebsd*|dragonfly*|midnightbsd*)
11402	# 5.x headers associate
11403	#	_XOPEN_SOURCE=600 with _POSIX_C_SOURCE=200112L
11404	#	_XOPEN_SOURCE=500 with _POSIX_C_SOURCE=199506L
11405	cf_POSIX_C_SOURCE=200112L
11406	cf_XOPEN_SOURCE=600
11407	cf_xopen_source="-D_BSD_TYPES -D__BSD_VISIBLE -D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE -D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
11408	;;
11409(hpux11*)
11410	cf_xopen_source="-D_HPUX_SOURCE -D_XOPEN_SOURCE=500"
11411	;;
11412(hpux*)
11413	cf_xopen_source="-D_HPUX_SOURCE"
11414	;;
11415(irix[56].*)
11416	cf_xopen_source="-D_SGI_SOURCE"
11417	cf_XOPEN_SOURCE=
11418	;;
11419(linux*|uclinux*|gnu*|mint*|k*bsd*-gnu|cygwin)
11420
11421cf_gnu_xopen_source=$cf_XOPEN_SOURCE
11422
11423echo "$as_me:11423: checking if this is the GNU C library" >&5
11424echo $ECHO_N "checking if this is the GNU C library... $ECHO_C" >&6
11425if test "${cf_cv_gnu_library+set}" = set; then
11426  echo $ECHO_N "(cached) $ECHO_C" >&6
11427else
11428
11429cat >"conftest.$ac_ext" <<_ACEOF
11430#line 11430 "configure"
11431#include "confdefs.h"
11432#include <sys/types.h>
11433int
11434main (void)
11435{
11436
11437	#if __GLIBC__ > 0 && __GLIBC_MINOR__ >= 0
11438		return 0;
11439	#elif __NEWLIB__ > 0 && __NEWLIB_MINOR__ >= 0
11440		return 0;
11441	#else
11442	#	error not GNU C library
11443	#endif
11444  ;
11445  return 0;
11446}
11447_ACEOF
11448rm -f "conftest.$ac_objext"
11449if { (eval echo "$as_me:11449: \"$ac_compile\"") >&5
11450  (eval $ac_compile) 2>&5
11451  ac_status=$?
11452  echo "$as_me:11452: \$? = $ac_status" >&5
11453  (exit "$ac_status"); } &&
11454         { ac_try='test -s "conftest.$ac_objext"'
11455  { (eval echo "$as_me:11455: \"$ac_try\"") >&5
11456  (eval $ac_try) 2>&5
11457  ac_status=$?
11458  echo "$as_me:11458: \$? = $ac_status" >&5
11459  (exit "$ac_status"); }; }; then
11460  cf_cv_gnu_library=yes
11461else
11462  echo "$as_me: failed program was:" >&5
11463cat "conftest.$ac_ext" >&5
11464cf_cv_gnu_library=no
11465fi
11466rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11467
11468fi
11469echo "$as_me:11469: result: $cf_cv_gnu_library" >&5
11470echo "${ECHO_T}$cf_cv_gnu_library" >&6
11471
11472if test x$cf_cv_gnu_library = xyes; then
11473
11474	# With glibc 2.19 (13 years after this check was begun), _DEFAULT_SOURCE
11475	# was changed to help a little.  newlib incorporated the change about 4
11476	# years later.
11477	echo "$as_me:11477: checking if _DEFAULT_SOURCE can be used as a basis" >&5
11478echo $ECHO_N "checking if _DEFAULT_SOURCE can be used as a basis... $ECHO_C" >&6
11479if test "${cf_cv_gnu_library_219+set}" = set; then
11480  echo $ECHO_N "(cached) $ECHO_C" >&6
11481else
11482
11483		cf_save="$CPPFLAGS"
11484
11485	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11486	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11487
11488		cat >"conftest.$ac_ext" <<_ACEOF
11489#line 11489 "configure"
11490#include "confdefs.h"
11491#include <sys/types.h>
11492int
11493main (void)
11494{
11495
11496			#if (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 19) || (__GLIBC__ > 2)
11497				return 0;
11498			#elif (__NEWLIB__ == 2 && __NEWLIB_MINOR__ >= 4) || (__GLIBC__ > 3)
11499				return 0;
11500			#else
11501			#	error GNU C library __GLIBC__.__GLIBC_MINOR__ is too old
11502			#endif
11503  ;
11504  return 0;
11505}
11506_ACEOF
11507rm -f "conftest.$ac_objext"
11508if { (eval echo "$as_me:11508: \"$ac_compile\"") >&5
11509  (eval $ac_compile) 2>&5
11510  ac_status=$?
11511  echo "$as_me:11511: \$? = $ac_status" >&5
11512  (exit "$ac_status"); } &&
11513         { ac_try='test -s "conftest.$ac_objext"'
11514  { (eval echo "$as_me:11514: \"$ac_try\"") >&5
11515  (eval $ac_try) 2>&5
11516  ac_status=$?
11517  echo "$as_me:11517: \$? = $ac_status" >&5
11518  (exit "$ac_status"); }; }; then
11519  cf_cv_gnu_library_219=yes
11520else
11521  echo "$as_me: failed program was:" >&5
11522cat "conftest.$ac_ext" >&5
11523cf_cv_gnu_library_219=no
11524fi
11525rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11526		CPPFLAGS="$cf_save"
11527
11528fi
11529echo "$as_me:11529: result: $cf_cv_gnu_library_219" >&5
11530echo "${ECHO_T}$cf_cv_gnu_library_219" >&6
11531
11532	if test "x$cf_cv_gnu_library_219" = xyes; then
11533		cf_save="$CPPFLAGS"
11534		echo "$as_me:11534: checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE" >&5
11535echo $ECHO_N "checking if _XOPEN_SOURCE=$cf_gnu_xopen_source works with _DEFAULT_SOURCE... $ECHO_C" >&6
11536if test "${cf_cv_gnu_dftsrc_219+set}" = set; then
11537  echo $ECHO_N "(cached) $ECHO_C" >&6
11538else
11539
11540cf_fix_cppflags=no
11541cf_new_cflags=
11542cf_new_cppflags=
11543cf_new_extra_cppflags=
11544
11545for cf_add_cflags in -D_DEFAULT_SOURCE -D_XOPEN_SOURCE=$cf_gnu_xopen_source
11546do
11547case "$cf_fix_cppflags" in
11548(no)
11549	case "$cf_add_cflags" in
11550	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11551		case "$cf_add_cflags" in
11552		(-D*)
11553			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11554
11555			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11556				&& test -z "${cf_tst_cflags}" \
11557				&& cf_fix_cppflags=yes
11558
11559			if test "$cf_fix_cppflags" = yes ; then
11560
11561	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11562	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11563
11564				continue
11565			elif test "${cf_tst_cflags}" = "\"'" ; then
11566
11567	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11568	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11569
11570				continue
11571			fi
11572			;;
11573		esac
11574		case "$CPPFLAGS" in
11575		(*$cf_add_cflags)
11576			;;
11577		(*)
11578			case "$cf_add_cflags" in
11579			(-D*)
11580				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11581
11582CPPFLAGS=`echo "$CPPFLAGS" | \
11583	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11584		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11585
11586				;;
11587			esac
11588
11589	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11590	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11591
11592			;;
11593		esac
11594		;;
11595	(*)
11596
11597	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11598	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11599
11600		;;
11601	esac
11602	;;
11603(yes)
11604
11605	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11606	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11607
11608	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11609
11610	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11611		&& test -z "${cf_tst_cflags}" \
11612		&& cf_fix_cppflags=no
11613	;;
11614esac
11615done
11616
11617if test -n "$cf_new_cflags" ; then
11618
11619	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11620	CFLAGS="${CFLAGS}$cf_new_cflags"
11621
11622fi
11623
11624if test -n "$cf_new_cppflags" ; then
11625
11626	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11627	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11628
11629fi
11630
11631if test -n "$cf_new_extra_cppflags" ; then
11632
11633	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11634	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11635
11636fi
11637
11638			cat >"conftest.$ac_ext" <<_ACEOF
11639#line 11639 "configure"
11640#include "confdefs.h"
11641
11642				#include <limits.h>
11643				#include <sys/types.h>
11644
11645int
11646main (void)
11647{
11648
11649				#if (_XOPEN_SOURCE >= $cf_gnu_xopen_source) && (MB_LEN_MAX > 1)
11650					return 0;
11651				#else
11652				#	error GNU C library is too old
11653				#endif
11654  ;
11655  return 0;
11656}
11657_ACEOF
11658rm -f "conftest.$ac_objext"
11659if { (eval echo "$as_me:11659: \"$ac_compile\"") >&5
11660  (eval $ac_compile) 2>&5
11661  ac_status=$?
11662  echo "$as_me:11662: \$? = $ac_status" >&5
11663  (exit "$ac_status"); } &&
11664         { ac_try='test -s "conftest.$ac_objext"'
11665  { (eval echo "$as_me:11665: \"$ac_try\"") >&5
11666  (eval $ac_try) 2>&5
11667  ac_status=$?
11668  echo "$as_me:11668: \$? = $ac_status" >&5
11669  (exit "$ac_status"); }; }; then
11670  cf_cv_gnu_dftsrc_219=yes
11671else
11672  echo "$as_me: failed program was:" >&5
11673cat "conftest.$ac_ext" >&5
11674cf_cv_gnu_dftsrc_219=no
11675fi
11676rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11677
11678fi
11679echo "$as_me:11679: result: $cf_cv_gnu_dftsrc_219" >&5
11680echo "${ECHO_T}$cf_cv_gnu_dftsrc_219" >&6
11681		test "x$cf_cv_gnu_dftsrc_219" = "xyes" || CPPFLAGS="$cf_save"
11682	else
11683		cf_cv_gnu_dftsrc_219=maybe
11684	fi
11685
11686	if test "x$cf_cv_gnu_dftsrc_219" != xyes; then
11687
11688		echo "$as_me:11688: checking if we must define _GNU_SOURCE" >&5
11689echo $ECHO_N "checking if we must define _GNU_SOURCE... $ECHO_C" >&6
11690if test "${cf_cv_gnu_source+set}" = set; then
11691  echo $ECHO_N "(cached) $ECHO_C" >&6
11692else
11693
11694		cat >"conftest.$ac_ext" <<_ACEOF
11695#line 11695 "configure"
11696#include "confdefs.h"
11697#include <sys/types.h>
11698int
11699main (void)
11700{
11701
11702			#ifndef _XOPEN_SOURCE
11703			#error	expected _XOPEN_SOURCE to be defined
11704			#endif
11705  ;
11706  return 0;
11707}
11708_ACEOF
11709rm -f "conftest.$ac_objext"
11710if { (eval echo "$as_me:11710: \"$ac_compile\"") >&5
11711  (eval $ac_compile) 2>&5
11712  ac_status=$?
11713  echo "$as_me:11713: \$? = $ac_status" >&5
11714  (exit "$ac_status"); } &&
11715         { ac_try='test -s "conftest.$ac_objext"'
11716  { (eval echo "$as_me:11716: \"$ac_try\"") >&5
11717  (eval $ac_try) 2>&5
11718  ac_status=$?
11719  echo "$as_me:11719: \$? = $ac_status" >&5
11720  (exit "$ac_status"); }; }; then
11721  cf_cv_gnu_source=no
11722else
11723  echo "$as_me: failed program was:" >&5
11724cat "conftest.$ac_ext" >&5
11725cf_save="$CPPFLAGS"
11726
11727cf_fix_cppflags=no
11728cf_new_cflags=
11729cf_new_cppflags=
11730cf_new_extra_cppflags=
11731
11732for cf_add_cflags in -D_GNU_SOURCE
11733do
11734case "$cf_fix_cppflags" in
11735(no)
11736	case "$cf_add_cflags" in
11737	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
11738		case "$cf_add_cflags" in
11739		(-D*)
11740			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
11741
11742			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11743				&& test -z "${cf_tst_cflags}" \
11744				&& cf_fix_cppflags=yes
11745
11746			if test "$cf_fix_cppflags" = yes ; then
11747
11748	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11749	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11750
11751				continue
11752			elif test "${cf_tst_cflags}" = "\"'" ; then
11753
11754	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11755	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11756
11757				continue
11758			fi
11759			;;
11760		esac
11761		case "$CPPFLAGS" in
11762		(*$cf_add_cflags)
11763			;;
11764		(*)
11765			case "$cf_add_cflags" in
11766			(-D*)
11767				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
11768
11769CPPFLAGS=`echo "$CPPFLAGS" | \
11770	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
11771		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
11772
11773				;;
11774			esac
11775
11776	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
11777	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
11778
11779			;;
11780		esac
11781		;;
11782	(*)
11783
11784	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
11785	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
11786
11787		;;
11788	esac
11789	;;
11790(yes)
11791
11792	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
11793	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
11794
11795	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
11796
11797	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
11798		&& test -z "${cf_tst_cflags}" \
11799		&& cf_fix_cppflags=no
11800	;;
11801esac
11802done
11803
11804if test -n "$cf_new_cflags" ; then
11805
11806	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
11807	CFLAGS="${CFLAGS}$cf_new_cflags"
11808
11809fi
11810
11811if test -n "$cf_new_cppflags" ; then
11812
11813	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11814	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
11815
11816fi
11817
11818if test -n "$cf_new_extra_cppflags" ; then
11819
11820	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
11821	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
11822
11823fi
11824
11825			 cat >"conftest.$ac_ext" <<_ACEOF
11826#line 11826 "configure"
11827#include "confdefs.h"
11828#include <sys/types.h>
11829int
11830main (void)
11831{
11832
11833				#ifdef _XOPEN_SOURCE
11834				#error	expected _XOPEN_SOURCE to be undefined
11835				#endif
11836  ;
11837  return 0;
11838}
11839_ACEOF
11840rm -f "conftest.$ac_objext"
11841if { (eval echo "$as_me:11841: \"$ac_compile\"") >&5
11842  (eval $ac_compile) 2>&5
11843  ac_status=$?
11844  echo "$as_me:11844: \$? = $ac_status" >&5
11845  (exit "$ac_status"); } &&
11846         { ac_try='test -s "conftest.$ac_objext"'
11847  { (eval echo "$as_me:11847: \"$ac_try\"") >&5
11848  (eval $ac_try) 2>&5
11849  ac_status=$?
11850  echo "$as_me:11850: \$? = $ac_status" >&5
11851  (exit "$ac_status"); }; }; then
11852  cf_cv_gnu_source=no
11853else
11854  echo "$as_me: failed program was:" >&5
11855cat "conftest.$ac_ext" >&5
11856cf_cv_gnu_source=yes
11857fi
11858rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11859			CPPFLAGS="$cf_save"
11860
11861fi
11862rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11863
11864fi
11865echo "$as_me:11865: result: $cf_cv_gnu_source" >&5
11866echo "${ECHO_T}$cf_cv_gnu_source" >&6
11867
11868		if test "$cf_cv_gnu_source" = yes
11869		then
11870		echo "$as_me:11870: checking if we should also define _DEFAULT_SOURCE" >&5
11871echo $ECHO_N "checking if we should also define _DEFAULT_SOURCE... $ECHO_C" >&6
11872if test "${cf_cv_default_source+set}" = set; then
11873  echo $ECHO_N "(cached) $ECHO_C" >&6
11874else
11875
11876	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11877	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
11878
11879			cat >"conftest.$ac_ext" <<_ACEOF
11880#line 11880 "configure"
11881#include "confdefs.h"
11882#include <sys/types.h>
11883int
11884main (void)
11885{
11886
11887				#ifdef _DEFAULT_SOURCE
11888				#error	expected _DEFAULT_SOURCE to be undefined
11889				#endif
11890  ;
11891  return 0;
11892}
11893_ACEOF
11894rm -f "conftest.$ac_objext"
11895if { (eval echo "$as_me:11895: \"$ac_compile\"") >&5
11896  (eval $ac_compile) 2>&5
11897  ac_status=$?
11898  echo "$as_me:11898: \$? = $ac_status" >&5
11899  (exit "$ac_status"); } &&
11900         { ac_try='test -s "conftest.$ac_objext"'
11901  { (eval echo "$as_me:11901: \"$ac_try\"") >&5
11902  (eval $ac_try) 2>&5
11903  ac_status=$?
11904  echo "$as_me:11904: \$? = $ac_status" >&5
11905  (exit "$ac_status"); }; }; then
11906  cf_cv_default_source=no
11907else
11908  echo "$as_me: failed program was:" >&5
11909cat "conftest.$ac_ext" >&5
11910cf_cv_default_source=yes
11911fi
11912rm -f "conftest.$ac_objext" "conftest.$ac_ext"
11913
11914fi
11915echo "$as_me:11915: result: $cf_cv_default_source" >&5
11916echo "${ECHO_T}$cf_cv_default_source" >&6
11917			if test "$cf_cv_default_source" = yes
11918			then
11919
11920	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
11921	CPPFLAGS="${CPPFLAGS}-D_DEFAULT_SOURCE"
11922
11923			fi
11924		fi
11925	fi
11926
11927fi
11928
11929	;;
11930(minix*)
11931	cf_xopen_source="-D_NETBSD_SOURCE" # POSIX.1-2001 features are ifdef'd with this...
11932	;;
11933(mirbsd*)
11934	# setting _XOPEN_SOURCE or _POSIX_SOURCE breaks <sys/select.h> and other headers which use u_int / u_short types
11935	cf_XOPEN_SOURCE=
11936
11937if test "$cf_cv_posix_visible" = no; then
11938
11939cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
11940
11941cf_save_CFLAGS="$CFLAGS"
11942cf_save_CPPFLAGS="$CPPFLAGS"
11943
11944cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
11945	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11946		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11947
11948cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
11949	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
11950		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
11951
11952echo "$as_me:11952: checking if we should define _POSIX_C_SOURCE" >&5
11953echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
11954if test "${cf_cv_posix_c_source+set}" = set; then
11955  echo $ECHO_N "(cached) $ECHO_C" >&6
11956else
11957
11958echo "${as_me:-configure}:11958: testing if the symbol is already defined go no further ..." 1>&5
11959
11960	cat >"conftest.$ac_ext" <<_ACEOF
11961#line 11961 "configure"
11962#include "confdefs.h"
11963#include <sys/types.h>
11964int
11965main (void)
11966{
11967
11968#ifndef _POSIX_C_SOURCE
11969make an error
11970#endif
11971  ;
11972  return 0;
11973}
11974_ACEOF
11975rm -f "conftest.$ac_objext"
11976if { (eval echo "$as_me:11976: \"$ac_compile\"") >&5
11977  (eval $ac_compile) 2>&5
11978  ac_status=$?
11979  echo "$as_me:11979: \$? = $ac_status" >&5
11980  (exit "$ac_status"); } &&
11981         { ac_try='test -s "conftest.$ac_objext"'
11982  { (eval echo "$as_me:11982: \"$ac_try\"") >&5
11983  (eval $ac_try) 2>&5
11984  ac_status=$?
11985  echo "$as_me:11985: \$? = $ac_status" >&5
11986  (exit "$ac_status"); }; }; then
11987  cf_cv_posix_c_source=no
11988else
11989  echo "$as_me: failed program was:" >&5
11990cat "conftest.$ac_ext" >&5
11991cf_want_posix_source=no
11992	 case .$cf_POSIX_C_SOURCE in
11993	 (.[12]??*)
11994		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11995		;;
11996	 (.2)
11997		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
11998		cf_want_posix_source=yes
11999		;;
12000	 (.*)
12001		cf_want_posix_source=yes
12002		;;
12003	 esac
12004	 if test "$cf_want_posix_source" = yes ; then
12005		cat >"conftest.$ac_ext" <<_ACEOF
12006#line 12006 "configure"
12007#include "confdefs.h"
12008#include <sys/types.h>
12009int
12010main (void)
12011{
12012
12013#ifdef _POSIX_SOURCE
12014make an error
12015#endif
12016  ;
12017  return 0;
12018}
12019_ACEOF
12020rm -f "conftest.$ac_objext"
12021if { (eval echo "$as_me:12021: \"$ac_compile\"") >&5
12022  (eval $ac_compile) 2>&5
12023  ac_status=$?
12024  echo "$as_me:12024: \$? = $ac_status" >&5
12025  (exit "$ac_status"); } &&
12026         { ac_try='test -s "conftest.$ac_objext"'
12027  { (eval echo "$as_me:12027: \"$ac_try\"") >&5
12028  (eval $ac_try) 2>&5
12029  ac_status=$?
12030  echo "$as_me:12030: \$? = $ac_status" >&5
12031  (exit "$ac_status"); }; }; then
12032  :
12033else
12034  echo "$as_me: failed program was:" >&5
12035cat "conftest.$ac_ext" >&5
12036cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12037fi
12038rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12039	 fi
12040
12041echo "${as_me:-configure}:12041: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12042
12043	 CFLAGS="$cf_trim_CFLAGS"
12044	 CPPFLAGS="$cf_trim_CPPFLAGS"
12045
12046	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12047	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12048
12049echo "${as_me:-configure}:12049: testing if the second compile does not leave our definition intact error ..." 1>&5
12050
12051	 cat >"conftest.$ac_ext" <<_ACEOF
12052#line 12052 "configure"
12053#include "confdefs.h"
12054#include <sys/types.h>
12055int
12056main (void)
12057{
12058
12059#ifndef _POSIX_C_SOURCE
12060make an error
12061#endif
12062  ;
12063  return 0;
12064}
12065_ACEOF
12066rm -f "conftest.$ac_objext"
12067if { (eval echo "$as_me:12067: \"$ac_compile\"") >&5
12068  (eval $ac_compile) 2>&5
12069  ac_status=$?
12070  echo "$as_me:12070: \$? = $ac_status" >&5
12071  (exit "$ac_status"); } &&
12072         { ac_try='test -s "conftest.$ac_objext"'
12073  { (eval echo "$as_me:12073: \"$ac_try\"") >&5
12074  (eval $ac_try) 2>&5
12075  ac_status=$?
12076  echo "$as_me:12076: \$? = $ac_status" >&5
12077  (exit "$ac_status"); }; }; then
12078  :
12079else
12080  echo "$as_me: failed program was:" >&5
12081cat "conftest.$ac_ext" >&5
12082cf_cv_posix_c_source=no
12083fi
12084rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12085	 CFLAGS="$cf_save_CFLAGS"
12086	 CPPFLAGS="$cf_save_CPPFLAGS"
12087
12088fi
12089rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12090
12091fi
12092echo "$as_me:12092: result: $cf_cv_posix_c_source" >&5
12093echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12094
12095if test "$cf_cv_posix_c_source" != no ; then
12096	CFLAGS="$cf_trim_CFLAGS"
12097	CPPFLAGS="$cf_trim_CPPFLAGS"
12098
12099cf_fix_cppflags=no
12100cf_new_cflags=
12101cf_new_cppflags=
12102cf_new_extra_cppflags=
12103
12104for cf_add_cflags in $cf_cv_posix_c_source
12105do
12106case "$cf_fix_cppflags" in
12107(no)
12108	case "$cf_add_cflags" in
12109	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12110		case "$cf_add_cflags" in
12111		(-D*)
12112			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12113
12114			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12115				&& test -z "${cf_tst_cflags}" \
12116				&& cf_fix_cppflags=yes
12117
12118			if test "$cf_fix_cppflags" = yes ; then
12119
12120	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12121	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12122
12123				continue
12124			elif test "${cf_tst_cflags}" = "\"'" ; then
12125
12126	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12127	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12128
12129				continue
12130			fi
12131			;;
12132		esac
12133		case "$CPPFLAGS" in
12134		(*$cf_add_cflags)
12135			;;
12136		(*)
12137			case "$cf_add_cflags" in
12138			(-D*)
12139				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12140
12141CPPFLAGS=`echo "$CPPFLAGS" | \
12142	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12143		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12144
12145				;;
12146			esac
12147
12148	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12149	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12150
12151			;;
12152		esac
12153		;;
12154	(*)
12155
12156	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12157	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12158
12159		;;
12160	esac
12161	;;
12162(yes)
12163
12164	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12165	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12166
12167	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12168
12169	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12170		&& test -z "${cf_tst_cflags}" \
12171		&& cf_fix_cppflags=no
12172	;;
12173esac
12174done
12175
12176if test -n "$cf_new_cflags" ; then
12177
12178	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12179	CFLAGS="${CFLAGS}$cf_new_cflags"
12180
12181fi
12182
12183if test -n "$cf_new_cppflags" ; then
12184
12185	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12186	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12187
12188fi
12189
12190if test -n "$cf_new_extra_cppflags" ; then
12191
12192	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12193	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12194
12195fi
12196
12197fi
12198
12199fi # cf_cv_posix_visible
12200
12201	;;
12202(netbsd*)
12203	cf_xopen_source="-D_NETBSD_SOURCE" # setting _XOPEN_SOURCE breaks IPv6 for lynx on NetBSD 1.6, breaks xterm, is not needed for ncursesw
12204	;;
12205(openbsd[6-9]*)
12206	# OpenBSD 6.x has broken locale support, both compile-time and runtime.
12207	# see https://www.mail-archive.com/bugs@openbsd.org/msg13200.html
12208	# Abusing the conformance level is a workaround.
12209	{ echo "$as_me:12209: WARNING: this system does not provide usable locale support" >&5
12210echo "$as_me: WARNING: this system does not provide usable locale support" >&2;}
12211	cf_xopen_source="-D_BSD_SOURCE"
12212	cf_XOPEN_SOURCE=700
12213	;;
12214(openbsd[4-5]*)
12215	# setting _XOPEN_SOURCE lower than 500 breaks g++ compile with wchar.h, needed for ncursesw
12216	cf_xopen_source="-D_BSD_SOURCE"
12217	cf_XOPEN_SOURCE=600
12218	;;
12219(openbsd*)
12220	# setting _XOPEN_SOURCE breaks xterm on OpenBSD 2.8, is not needed for ncursesw
12221	;;
12222(osf[45]*)
12223	cf_xopen_source="-D_OSF_SOURCE"
12224	;;
12225(nto-qnx*)
12226	cf_xopen_source="-D_QNX_SOURCE"
12227	;;
12228(sco*)
12229	# setting _XOPEN_SOURCE breaks Lynx on SCO Unix / OpenServer
12230	;;
12231(solaris2.*)
12232	cf_xopen_source="-D__EXTENSIONS__"
12233	cf_cv_xopen_source=broken
12234	;;
12235(sysv4.2uw2.*) # Novell/SCO UnixWare 2.x (tested on 2.1.2)
12236	cf_XOPEN_SOURCE=
12237	cf_POSIX_C_SOURCE=
12238	;;
12239(*)
12240
12241echo "$as_me:12241: checking if we should define _XOPEN_SOURCE" >&5
12242echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12243if test "${cf_cv_xopen_source+set}" = set; then
12244  echo $ECHO_N "(cached) $ECHO_C" >&6
12245else
12246
12247	cat >"conftest.$ac_ext" <<_ACEOF
12248#line 12248 "configure"
12249#include "confdefs.h"
12250
12251#include <stdlib.h>
12252#include <string.h>
12253#include <sys/types.h>
12254
12255int
12256main (void)
12257{
12258
12259#ifndef _XOPEN_SOURCE
12260make an error
12261#endif
12262  ;
12263  return 0;
12264}
12265_ACEOF
12266rm -f "conftest.$ac_objext"
12267if { (eval echo "$as_me:12267: \"$ac_compile\"") >&5
12268  (eval $ac_compile) 2>&5
12269  ac_status=$?
12270  echo "$as_me:12270: \$? = $ac_status" >&5
12271  (exit "$ac_status"); } &&
12272         { ac_try='test -s "conftest.$ac_objext"'
12273  { (eval echo "$as_me:12273: \"$ac_try\"") >&5
12274  (eval $ac_try) 2>&5
12275  ac_status=$?
12276  echo "$as_me:12276: \$? = $ac_status" >&5
12277  (exit "$ac_status"); }; }; then
12278  cf_cv_xopen_source=no
12279else
12280  echo "$as_me: failed program was:" >&5
12281cat "conftest.$ac_ext" >&5
12282cf_save="$CPPFLAGS"
12283
12284	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12285	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12286
12287	 cat >"conftest.$ac_ext" <<_ACEOF
12288#line 12288 "configure"
12289#include "confdefs.h"
12290
12291#include <stdlib.h>
12292#include <string.h>
12293#include <sys/types.h>
12294
12295int
12296main (void)
12297{
12298
12299#ifdef _XOPEN_SOURCE
12300make an error
12301#endif
12302  ;
12303  return 0;
12304}
12305_ACEOF
12306rm -f "conftest.$ac_objext"
12307if { (eval echo "$as_me:12307: \"$ac_compile\"") >&5
12308  (eval $ac_compile) 2>&5
12309  ac_status=$?
12310  echo "$as_me:12310: \$? = $ac_status" >&5
12311  (exit "$ac_status"); } &&
12312         { ac_try='test -s "conftest.$ac_objext"'
12313  { (eval echo "$as_me:12313: \"$ac_try\"") >&5
12314  (eval $ac_try) 2>&5
12315  ac_status=$?
12316  echo "$as_me:12316: \$? = $ac_status" >&5
12317  (exit "$ac_status"); }; }; then
12318  cf_cv_xopen_source=no
12319else
12320  echo "$as_me: failed program was:" >&5
12321cat "conftest.$ac_ext" >&5
12322cf_cv_xopen_source=$cf_XOPEN_SOURCE
12323fi
12324rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12325	CPPFLAGS="$cf_save"
12326
12327fi
12328rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12329
12330fi
12331echo "$as_me:12331: result: $cf_cv_xopen_source" >&5
12332echo "${ECHO_T}$cf_cv_xopen_source" >&6
12333
12334if test "$cf_cv_xopen_source" != no ; then
12335
12336CFLAGS=`echo "$CFLAGS" | \
12337	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12338		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
12339
12340CPPFLAGS=`echo "$CPPFLAGS" | \
12341	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12342		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
12343
12344	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
12345
12346cf_fix_cppflags=no
12347cf_new_cflags=
12348cf_new_cppflags=
12349cf_new_extra_cppflags=
12350
12351for cf_add_cflags in $cf_temp_xopen_source
12352do
12353case "$cf_fix_cppflags" in
12354(no)
12355	case "$cf_add_cflags" in
12356	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12357		case "$cf_add_cflags" in
12358		(-D*)
12359			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12360
12361			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12362				&& test -z "${cf_tst_cflags}" \
12363				&& cf_fix_cppflags=yes
12364
12365			if test "$cf_fix_cppflags" = yes ; then
12366
12367	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12368	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12369
12370				continue
12371			elif test "${cf_tst_cflags}" = "\"'" ; then
12372
12373	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12374	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12375
12376				continue
12377			fi
12378			;;
12379		esac
12380		case "$CPPFLAGS" in
12381		(*$cf_add_cflags)
12382			;;
12383		(*)
12384			case "$cf_add_cflags" in
12385			(-D*)
12386				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12387
12388CPPFLAGS=`echo "$CPPFLAGS" | \
12389	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12390		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12391
12392				;;
12393			esac
12394
12395	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12396	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12397
12398			;;
12399		esac
12400		;;
12401	(*)
12402
12403	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12404	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12405
12406		;;
12407	esac
12408	;;
12409(yes)
12410
12411	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12412	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12413
12414	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12415
12416	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12417		&& test -z "${cf_tst_cflags}" \
12418		&& cf_fix_cppflags=no
12419	;;
12420esac
12421done
12422
12423if test -n "$cf_new_cflags" ; then
12424
12425	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12426	CFLAGS="${CFLAGS}$cf_new_cflags"
12427
12428fi
12429
12430if test -n "$cf_new_cppflags" ; then
12431
12432	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12433	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12434
12435fi
12436
12437if test -n "$cf_new_extra_cppflags" ; then
12438
12439	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12440	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12441
12442fi
12443
12444fi
12445
12446if test "$cf_cv_posix_visible" = no; then
12447
12448cf_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE
12449
12450cf_save_CFLAGS="$CFLAGS"
12451cf_save_CPPFLAGS="$CPPFLAGS"
12452
12453cf_trim_CFLAGS=`echo "$cf_save_CFLAGS" | \
12454	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12455		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
12456
12457cf_trim_CPPFLAGS=`echo "$cf_save_CPPFLAGS" | \
12458	sed	-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
12459		-e 's/-[UD]'"_POSIX_C_SOURCE"'\(=[^ 	]*\)\?$//g'`
12460
12461echo "$as_me:12461: checking if we should define _POSIX_C_SOURCE" >&5
12462echo $ECHO_N "checking if we should define _POSIX_C_SOURCE... $ECHO_C" >&6
12463if test "${cf_cv_posix_c_source+set}" = set; then
12464  echo $ECHO_N "(cached) $ECHO_C" >&6
12465else
12466
12467echo "${as_me:-configure}:12467: testing if the symbol is already defined go no further ..." 1>&5
12468
12469	cat >"conftest.$ac_ext" <<_ACEOF
12470#line 12470 "configure"
12471#include "confdefs.h"
12472#include <sys/types.h>
12473int
12474main (void)
12475{
12476
12477#ifndef _POSIX_C_SOURCE
12478make an error
12479#endif
12480  ;
12481  return 0;
12482}
12483_ACEOF
12484rm -f "conftest.$ac_objext"
12485if { (eval echo "$as_me:12485: \"$ac_compile\"") >&5
12486  (eval $ac_compile) 2>&5
12487  ac_status=$?
12488  echo "$as_me:12488: \$? = $ac_status" >&5
12489  (exit "$ac_status"); } &&
12490         { ac_try='test -s "conftest.$ac_objext"'
12491  { (eval echo "$as_me:12491: \"$ac_try\"") >&5
12492  (eval $ac_try) 2>&5
12493  ac_status=$?
12494  echo "$as_me:12494: \$? = $ac_status" >&5
12495  (exit "$ac_status"); }; }; then
12496  cf_cv_posix_c_source=no
12497else
12498  echo "$as_me: failed program was:" >&5
12499cat "conftest.$ac_ext" >&5
12500cf_want_posix_source=no
12501	 case .$cf_POSIX_C_SOURCE in
12502	 (.[12]??*)
12503		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12504		;;
12505	 (.2)
12506		cf_cv_posix_c_source="-D_POSIX_C_SOURCE=$cf_POSIX_C_SOURCE"
12507		cf_want_posix_source=yes
12508		;;
12509	 (.*)
12510		cf_want_posix_source=yes
12511		;;
12512	 esac
12513	 if test "$cf_want_posix_source" = yes ; then
12514		cat >"conftest.$ac_ext" <<_ACEOF
12515#line 12515 "configure"
12516#include "confdefs.h"
12517#include <sys/types.h>
12518int
12519main (void)
12520{
12521
12522#ifdef _POSIX_SOURCE
12523make an error
12524#endif
12525  ;
12526  return 0;
12527}
12528_ACEOF
12529rm -f "conftest.$ac_objext"
12530if { (eval echo "$as_me:12530: \"$ac_compile\"") >&5
12531  (eval $ac_compile) 2>&5
12532  ac_status=$?
12533  echo "$as_me:12533: \$? = $ac_status" >&5
12534  (exit "$ac_status"); } &&
12535         { ac_try='test -s "conftest.$ac_objext"'
12536  { (eval echo "$as_me:12536: \"$ac_try\"") >&5
12537  (eval $ac_try) 2>&5
12538  ac_status=$?
12539  echo "$as_me:12539: \$? = $ac_status" >&5
12540  (exit "$ac_status"); }; }; then
12541  :
12542else
12543  echo "$as_me: failed program was:" >&5
12544cat "conftest.$ac_ext" >&5
12545cf_cv_posix_c_source="$cf_cv_posix_c_source -D_POSIX_SOURCE"
12546fi
12547rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12548	 fi
12549
12550echo "${as_me:-configure}:12550: testing ifdef from value $cf_POSIX_C_SOURCE ..." 1>&5
12551
12552	 CFLAGS="$cf_trim_CFLAGS"
12553	 CPPFLAGS="$cf_trim_CPPFLAGS"
12554
12555	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12556	CPPFLAGS="${CPPFLAGS}$cf_cv_posix_c_source"
12557
12558echo "${as_me:-configure}:12558: testing if the second compile does not leave our definition intact error ..." 1>&5
12559
12560	 cat >"conftest.$ac_ext" <<_ACEOF
12561#line 12561 "configure"
12562#include "confdefs.h"
12563#include <sys/types.h>
12564int
12565main (void)
12566{
12567
12568#ifndef _POSIX_C_SOURCE
12569make an error
12570#endif
12571  ;
12572  return 0;
12573}
12574_ACEOF
12575rm -f "conftest.$ac_objext"
12576if { (eval echo "$as_me:12576: \"$ac_compile\"") >&5
12577  (eval $ac_compile) 2>&5
12578  ac_status=$?
12579  echo "$as_me:12579: \$? = $ac_status" >&5
12580  (exit "$ac_status"); } &&
12581         { ac_try='test -s "conftest.$ac_objext"'
12582  { (eval echo "$as_me:12582: \"$ac_try\"") >&5
12583  (eval $ac_try) 2>&5
12584  ac_status=$?
12585  echo "$as_me:12585: \$? = $ac_status" >&5
12586  (exit "$ac_status"); }; }; then
12587  :
12588else
12589  echo "$as_me: failed program was:" >&5
12590cat "conftest.$ac_ext" >&5
12591cf_cv_posix_c_source=no
12592fi
12593rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12594	 CFLAGS="$cf_save_CFLAGS"
12595	 CPPFLAGS="$cf_save_CPPFLAGS"
12596
12597fi
12598rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12599
12600fi
12601echo "$as_me:12601: result: $cf_cv_posix_c_source" >&5
12602echo "${ECHO_T}$cf_cv_posix_c_source" >&6
12603
12604if test "$cf_cv_posix_c_source" != no ; then
12605	CFLAGS="$cf_trim_CFLAGS"
12606	CPPFLAGS="$cf_trim_CPPFLAGS"
12607
12608cf_fix_cppflags=no
12609cf_new_cflags=
12610cf_new_cppflags=
12611cf_new_extra_cppflags=
12612
12613for cf_add_cflags in $cf_cv_posix_c_source
12614do
12615case "$cf_fix_cppflags" in
12616(no)
12617	case "$cf_add_cflags" in
12618	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12619		case "$cf_add_cflags" in
12620		(-D*)
12621			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12622
12623			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12624				&& test -z "${cf_tst_cflags}" \
12625				&& cf_fix_cppflags=yes
12626
12627			if test "$cf_fix_cppflags" = yes ; then
12628
12629	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12630	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12631
12632				continue
12633			elif test "${cf_tst_cflags}" = "\"'" ; then
12634
12635	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12636	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12637
12638				continue
12639			fi
12640			;;
12641		esac
12642		case "$CPPFLAGS" in
12643		(*$cf_add_cflags)
12644			;;
12645		(*)
12646			case "$cf_add_cflags" in
12647			(-D*)
12648				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12649
12650CPPFLAGS=`echo "$CPPFLAGS" | \
12651	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12652		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12653
12654				;;
12655			esac
12656
12657	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12658	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12659
12660			;;
12661		esac
12662		;;
12663	(*)
12664
12665	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12666	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12667
12668		;;
12669	esac
12670	;;
12671(yes)
12672
12673	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12674	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12675
12676	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12677
12678	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12679		&& test -z "${cf_tst_cflags}" \
12680		&& cf_fix_cppflags=no
12681	;;
12682esac
12683done
12684
12685if test -n "$cf_new_cflags" ; then
12686
12687	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12688	CFLAGS="${CFLAGS}$cf_new_cflags"
12689
12690fi
12691
12692if test -n "$cf_new_cppflags" ; then
12693
12694	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12695	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12696
12697fi
12698
12699if test -n "$cf_new_extra_cppflags" ; then
12700
12701	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12702	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12703
12704fi
12705
12706fi
12707
12708fi # cf_cv_posix_visible
12709
12710	;;
12711esac
12712
12713if test -n "$cf_xopen_source" ; then
12714
12715cf_fix_cppflags=no
12716cf_new_cflags=
12717cf_new_cppflags=
12718cf_new_extra_cppflags=
12719
12720for cf_add_cflags in $cf_xopen_source
12721do
12722case "$cf_fix_cppflags" in
12723(no)
12724	case "$cf_add_cflags" in
12725	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
12726		case "$cf_add_cflags" in
12727		(-D*)
12728			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
12729
12730			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12731				&& test -z "${cf_tst_cflags}" \
12732				&& cf_fix_cppflags=yes
12733
12734			if test "$cf_fix_cppflags" = yes ; then
12735
12736	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12737	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12738
12739				continue
12740			elif test "${cf_tst_cflags}" = "\"'" ; then
12741
12742	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12743	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12744
12745				continue
12746			fi
12747			;;
12748		esac
12749		case "$CPPFLAGS" in
12750		(*$cf_add_cflags)
12751			;;
12752		(*)
12753			case "$cf_add_cflags" in
12754			(-D*)
12755				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
12756
12757CPPFLAGS=`echo "$CPPFLAGS" | \
12758	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
12759		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
12760
12761				;;
12762			esac
12763
12764	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
12765	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
12766
12767			;;
12768		esac
12769		;;
12770	(*)
12771
12772	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
12773	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
12774
12775		;;
12776	esac
12777	;;
12778(yes)
12779
12780	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
12781	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
12782
12783	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
12784
12785	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
12786		&& test -z "${cf_tst_cflags}" \
12787		&& cf_fix_cppflags=no
12788	;;
12789esac
12790done
12791
12792if test -n "$cf_new_cflags" ; then
12793	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
12794
12795echo "${as_me:-configure}:12795: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
12796
12797	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
12798	CFLAGS="${CFLAGS}$cf_new_cflags"
12799
12800fi
12801
12802if test -n "$cf_new_cppflags" ; then
12803	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
12804
12805echo "${as_me:-configure}:12805: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
12806
12807	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12808	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
12809
12810fi
12811
12812if test -n "$cf_new_extra_cppflags" ; then
12813	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
12814
12815echo "${as_me:-configure}:12815: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
12816
12817	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
12818	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
12819
12820fi
12821
12822fi
12823
12824if test -n "$cf_XOPEN_SOURCE" && test -z "$cf_cv_xopen_source" ; then
12825	echo "$as_me:12825: checking if _XOPEN_SOURCE really is set" >&5
12826echo $ECHO_N "checking if _XOPEN_SOURCE really is set... $ECHO_C" >&6
12827	cat >"conftest.$ac_ext" <<_ACEOF
12828#line 12828 "configure"
12829#include "confdefs.h"
12830#include <stdlib.h>
12831int
12832main (void)
12833{
12834
12835#ifndef _XOPEN_SOURCE
12836make an error
12837#endif
12838  ;
12839  return 0;
12840}
12841_ACEOF
12842rm -f "conftest.$ac_objext"
12843if { (eval echo "$as_me:12843: \"$ac_compile\"") >&5
12844  (eval $ac_compile) 2>&5
12845  ac_status=$?
12846  echo "$as_me:12846: \$? = $ac_status" >&5
12847  (exit "$ac_status"); } &&
12848         { ac_try='test -s "conftest.$ac_objext"'
12849  { (eval echo "$as_me:12849: \"$ac_try\"") >&5
12850  (eval $ac_try) 2>&5
12851  ac_status=$?
12852  echo "$as_me:12852: \$? = $ac_status" >&5
12853  (exit "$ac_status"); }; }; then
12854  cf_XOPEN_SOURCE_set=yes
12855else
12856  echo "$as_me: failed program was:" >&5
12857cat "conftest.$ac_ext" >&5
12858cf_XOPEN_SOURCE_set=no
12859fi
12860rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12861	echo "$as_me:12861: result: $cf_XOPEN_SOURCE_set" >&5
12862echo "${ECHO_T}$cf_XOPEN_SOURCE_set" >&6
12863	if test "$cf_XOPEN_SOURCE_set" = yes
12864	then
12865		cat >"conftest.$ac_ext" <<_ACEOF
12866#line 12866 "configure"
12867#include "confdefs.h"
12868#include <stdlib.h>
12869int
12870main (void)
12871{
12872
12873#if (_XOPEN_SOURCE - 0) < $cf_XOPEN_SOURCE
12874make an error
12875#endif
12876  ;
12877  return 0;
12878}
12879_ACEOF
12880rm -f "conftest.$ac_objext"
12881if { (eval echo "$as_me:12881: \"$ac_compile\"") >&5
12882  (eval $ac_compile) 2>&5
12883  ac_status=$?
12884  echo "$as_me:12884: \$? = $ac_status" >&5
12885  (exit "$ac_status"); } &&
12886         { ac_try='test -s "conftest.$ac_objext"'
12887  { (eval echo "$as_me:12887: \"$ac_try\"") >&5
12888  (eval $ac_try) 2>&5
12889  ac_status=$?
12890  echo "$as_me:12890: \$? = $ac_status" >&5
12891  (exit "$ac_status"); }; }; then
12892  cf_XOPEN_SOURCE_set_ok=yes
12893else
12894  echo "$as_me: failed program was:" >&5
12895cat "conftest.$ac_ext" >&5
12896cf_XOPEN_SOURCE_set_ok=no
12897fi
12898rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12899		if test "$cf_XOPEN_SOURCE_set_ok" = no
12900		then
12901			{ echo "$as_me:12901: WARNING: _XOPEN_SOURCE is lower than requested" >&5
12902echo "$as_me: WARNING: _XOPEN_SOURCE is lower than requested" >&2;}
12903		fi
12904	else
12905
12906echo "$as_me:12906: checking if we should define _XOPEN_SOURCE" >&5
12907echo $ECHO_N "checking if we should define _XOPEN_SOURCE... $ECHO_C" >&6
12908if test "${cf_cv_xopen_source+set}" = set; then
12909  echo $ECHO_N "(cached) $ECHO_C" >&6
12910else
12911
12912	cat >"conftest.$ac_ext" <<_ACEOF
12913#line 12913 "configure"
12914#include "confdefs.h"
12915
12916#include <stdlib.h>
12917#include <string.h>
12918#include <sys/types.h>
12919
12920int
12921main (void)
12922{
12923
12924#ifndef _XOPEN_SOURCE
12925make an error
12926#endif
12927  ;
12928  return 0;
12929}
12930_ACEOF
12931rm -f "conftest.$ac_objext"
12932if { (eval echo "$as_me:12932: \"$ac_compile\"") >&5
12933  (eval $ac_compile) 2>&5
12934  ac_status=$?
12935  echo "$as_me:12935: \$? = $ac_status" >&5
12936  (exit "$ac_status"); } &&
12937         { ac_try='test -s "conftest.$ac_objext"'
12938  { (eval echo "$as_me:12938: \"$ac_try\"") >&5
12939  (eval $ac_try) 2>&5
12940  ac_status=$?
12941  echo "$as_me:12941: \$? = $ac_status" >&5
12942  (exit "$ac_status"); }; }; then
12943  cf_cv_xopen_source=no
12944else
12945  echo "$as_me: failed program was:" >&5
12946cat "conftest.$ac_ext" >&5
12947cf_save="$CPPFLAGS"
12948
12949	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
12950	CPPFLAGS="${CPPFLAGS}-D_XOPEN_SOURCE=$cf_XOPEN_SOURCE"
12951
12952	 cat >"conftest.$ac_ext" <<_ACEOF
12953#line 12953 "configure"
12954#include "confdefs.h"
12955
12956#include <stdlib.h>
12957#include <string.h>
12958#include <sys/types.h>
12959
12960int
12961main (void)
12962{
12963
12964#ifdef _XOPEN_SOURCE
12965make an error
12966#endif
12967  ;
12968  return 0;
12969}
12970_ACEOF
12971rm -f "conftest.$ac_objext"
12972if { (eval echo "$as_me:12972: \"$ac_compile\"") >&5
12973  (eval $ac_compile) 2>&5
12974  ac_status=$?
12975  echo "$as_me:12975: \$? = $ac_status" >&5
12976  (exit "$ac_status"); } &&
12977         { ac_try='test -s "conftest.$ac_objext"'
12978  { (eval echo "$as_me:12978: \"$ac_try\"") >&5
12979  (eval $ac_try) 2>&5
12980  ac_status=$?
12981  echo "$as_me:12981: \$? = $ac_status" >&5
12982  (exit "$ac_status"); }; }; then
12983  cf_cv_xopen_source=no
12984else
12985  echo "$as_me: failed program was:" >&5
12986cat "conftest.$ac_ext" >&5
12987cf_cv_xopen_source=$cf_XOPEN_SOURCE
12988fi
12989rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12990	CPPFLAGS="$cf_save"
12991
12992fi
12993rm -f "conftest.$ac_objext" "conftest.$ac_ext"
12994
12995fi
12996echo "$as_me:12996: result: $cf_cv_xopen_source" >&5
12997echo "${ECHO_T}$cf_cv_xopen_source" >&6
12998
12999if test "$cf_cv_xopen_source" != no ; then
13000
13001CFLAGS=`echo "$CFLAGS" | \
13002	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
13003		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
13004
13005CPPFLAGS=`echo "$CPPFLAGS" | \
13006	sed	-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?[ 	]/ /g' \
13007		-e 's/-[UD]'"_XOPEN_SOURCE"'\(=[^ 	]*\)\?$//g'`
13008
13009	cf_temp_xopen_source="-D_XOPEN_SOURCE=$cf_cv_xopen_source"
13010
13011cf_fix_cppflags=no
13012cf_new_cflags=
13013cf_new_cppflags=
13014cf_new_extra_cppflags=
13015
13016for cf_add_cflags in $cf_temp_xopen_source
13017do
13018case "$cf_fix_cppflags" in
13019(no)
13020	case "$cf_add_cflags" in
13021	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13022		case "$cf_add_cflags" in
13023		(-D*)
13024			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13025
13026			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13027				&& test -z "${cf_tst_cflags}" \
13028				&& cf_fix_cppflags=yes
13029
13030			if test "$cf_fix_cppflags" = yes ; then
13031
13032	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13033	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13034
13035				continue
13036			elif test "${cf_tst_cflags}" = "\"'" ; then
13037
13038	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13039	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13040
13041				continue
13042			fi
13043			;;
13044		esac
13045		case "$CPPFLAGS" in
13046		(*$cf_add_cflags)
13047			;;
13048		(*)
13049			case "$cf_add_cflags" in
13050			(-D*)
13051				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13052
13053CPPFLAGS=`echo "$CPPFLAGS" | \
13054	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13055		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13056
13057				;;
13058			esac
13059
13060	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13061	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13062
13063			;;
13064		esac
13065		;;
13066	(*)
13067
13068	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13069	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13070
13071		;;
13072	esac
13073	;;
13074(yes)
13075
13076	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13077	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13078
13079	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13080
13081	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13082		&& test -z "${cf_tst_cflags}" \
13083		&& cf_fix_cppflags=no
13084	;;
13085esac
13086done
13087
13088if test -n "$cf_new_cflags" ; then
13089
13090	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13091	CFLAGS="${CFLAGS}$cf_new_cflags"
13092
13093fi
13094
13095if test -n "$cf_new_cppflags" ; then
13096
13097	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13098	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13099
13100fi
13101
13102if test -n "$cf_new_extra_cppflags" ; then
13103
13104	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13105	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13106
13107fi
13108
13109fi
13110
13111	fi
13112fi
13113fi # cf_cv_posix_visible
13114
13115echo "$as_me:13115: checking if SIGWINCH is defined" >&5
13116echo $ECHO_N "checking if SIGWINCH is defined... $ECHO_C" >&6
13117if test "${cf_cv_define_sigwinch+set}" = set; then
13118  echo $ECHO_N "(cached) $ECHO_C" >&6
13119else
13120
13121	cat >"conftest.$ac_ext" <<_ACEOF
13122#line 13122 "configure"
13123#include "confdefs.h"
13124
13125#include <sys/types.h>
13126#include <sys/signal.h>
13127
13128int
13129main (void)
13130{
13131int x = SIGWINCH; (void)x
13132  ;
13133  return 0;
13134}
13135_ACEOF
13136rm -f "conftest.$ac_objext"
13137if { (eval echo "$as_me:13137: \"$ac_compile\"") >&5
13138  (eval $ac_compile) 2>&5
13139  ac_status=$?
13140  echo "$as_me:13140: \$? = $ac_status" >&5
13141  (exit "$ac_status"); } &&
13142         { ac_try='test -s "conftest.$ac_objext"'
13143  { (eval echo "$as_me:13143: \"$ac_try\"") >&5
13144  (eval $ac_try) 2>&5
13145  ac_status=$?
13146  echo "$as_me:13146: \$? = $ac_status" >&5
13147  (exit "$ac_status"); }; }; then
13148  cf_cv_define_sigwinch=yes
13149else
13150  echo "$as_me: failed program was:" >&5
13151cat "conftest.$ac_ext" >&5
13152cat >"conftest.$ac_ext" <<_ACEOF
13153#line 13153 "configure"
13154#include "confdefs.h"
13155
13156#undef _XOPEN_SOURCE
13157#undef _POSIX_SOURCE
13158#undef _POSIX_C_SOURCE
13159#include <sys/types.h>
13160#include <sys/signal.h>
13161
13162int
13163main (void)
13164{
13165int x = SIGWINCH; (void)x
13166  ;
13167  return 0;
13168}
13169_ACEOF
13170rm -f "conftest.$ac_objext"
13171if { (eval echo "$as_me:13171: \"$ac_compile\"") >&5
13172  (eval $ac_compile) 2>&5
13173  ac_status=$?
13174  echo "$as_me:13174: \$? = $ac_status" >&5
13175  (exit "$ac_status"); } &&
13176         { ac_try='test -s "conftest.$ac_objext"'
13177  { (eval echo "$as_me:13177: \"$ac_try\"") >&5
13178  (eval $ac_try) 2>&5
13179  ac_status=$?
13180  echo "$as_me:13180: \$? = $ac_status" >&5
13181  (exit "$ac_status"); }; }; then
13182  cf_cv_define_sigwinch=maybe
13183else
13184  echo "$as_me: failed program was:" >&5
13185cat "conftest.$ac_ext" >&5
13186cf_cv_define_sigwinch=no
13187fi
13188rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13189
13190fi
13191rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13192
13193fi
13194echo "$as_me:13194: result: $cf_cv_define_sigwinch" >&5
13195echo "${ECHO_T}$cf_cv_define_sigwinch" >&6
13196
13197if test "$cf_cv_define_sigwinch" = maybe ; then
13198echo "$as_me:13198: checking for actual SIGWINCH definition" >&5
13199echo $ECHO_N "checking for actual SIGWINCH definition... $ECHO_C" >&6
13200if test "${cf_cv_fixup_sigwinch+set}" = set; then
13201  echo $ECHO_N "(cached) $ECHO_C" >&6
13202else
13203
13204cf_cv_fixup_sigwinch=unknown
13205cf_sigwinch=32
13206while test "$cf_sigwinch" != 1
13207do
13208	cat >"conftest.$ac_ext" <<_ACEOF
13209#line 13209 "configure"
13210#include "confdefs.h"
13211
13212#undef _XOPEN_SOURCE
13213#undef _POSIX_SOURCE
13214#undef _POSIX_C_SOURCE
13215#include <sys/types.h>
13216#include <sys/signal.h>
13217
13218int
13219main (void)
13220{
13221
13222#if SIGWINCH != $cf_sigwinch
13223make an error
13224#endif
13225int x = SIGWINCH; (void)x
13226  ;
13227  return 0;
13228}
13229_ACEOF
13230rm -f "conftest.$ac_objext"
13231if { (eval echo "$as_me:13231: \"$ac_compile\"") >&5
13232  (eval $ac_compile) 2>&5
13233  ac_status=$?
13234  echo "$as_me:13234: \$? = $ac_status" >&5
13235  (exit "$ac_status"); } &&
13236         { ac_try='test -s "conftest.$ac_objext"'
13237  { (eval echo "$as_me:13237: \"$ac_try\"") >&5
13238  (eval $ac_try) 2>&5
13239  ac_status=$?
13240  echo "$as_me:13240: \$? = $ac_status" >&5
13241  (exit "$ac_status"); }; }; then
13242  cf_cv_fixup_sigwinch=$cf_sigwinch
13243	 break
13244else
13245  echo "$as_me: failed program was:" >&5
13246cat "conftest.$ac_ext" >&5
13247fi
13248rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13249
13250cf_sigwinch="`expr "$cf_sigwinch" - 1`"
13251done
13252
13253fi
13254echo "$as_me:13254: result: $cf_cv_fixup_sigwinch" >&5
13255echo "${ECHO_T}$cf_cv_fixup_sigwinch" >&6
13256
13257	if test "$cf_cv_fixup_sigwinch" != unknown ; then
13258		CPPFLAGS="$CPPFLAGS -DSIGWINCH=$cf_cv_fixup_sigwinch"
13259	fi
13260fi
13261
13262if test -n "$TRY_CFLAGS" ; then
13263
13264test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
13265
13266echo "${as_me:-configure}:13266: testing checking additions to CFLAGS ..." 1>&5
13267
13268cf_check_cflags="$CFLAGS"
13269cf_check_cppflags="$CPPFLAGS"
13270
13271cf_fix_cppflags=no
13272cf_new_cflags=
13273cf_new_cppflags=
13274cf_new_extra_cppflags=
13275
13276for cf_add_cflags in $TRY_CFLAGS
13277do
13278case "$cf_fix_cppflags" in
13279(no)
13280	case "$cf_add_cflags" in
13281	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
13282		case "$cf_add_cflags" in
13283		(-D*)
13284			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
13285
13286			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13287				&& test -z "${cf_tst_cflags}" \
13288				&& cf_fix_cppflags=yes
13289
13290			if test "$cf_fix_cppflags" = yes ; then
13291
13292	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13293	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13294
13295				continue
13296			elif test "${cf_tst_cflags}" = "\"'" ; then
13297
13298	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13299	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13300
13301				continue
13302			fi
13303			;;
13304		esac
13305		case "$CPPFLAGS" in
13306		(*$cf_add_cflags)
13307			;;
13308		(*)
13309			case "$cf_add_cflags" in
13310			(-D*)
13311				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
13312
13313CPPFLAGS=`echo "$CPPFLAGS" | \
13314	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
13315		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
13316
13317				;;
13318			esac
13319
13320	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
13321	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
13322
13323			;;
13324		esac
13325		;;
13326	(*)
13327
13328	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
13329	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
13330
13331		;;
13332	esac
13333	;;
13334(yes)
13335
13336	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
13337	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
13338
13339	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
13340
13341	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
13342		&& test -z "${cf_tst_cflags}" \
13343		&& cf_fix_cppflags=no
13344	;;
13345esac
13346done
13347
13348if test -n "$cf_new_cflags" ; then
13349	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
13350
13351echo "${as_me:-configure}:13351: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
13352
13353	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
13354	CFLAGS="${CFLAGS}$cf_new_cflags"
13355
13356fi
13357
13358if test -n "$cf_new_cppflags" ; then
13359	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
13360
13361echo "${as_me:-configure}:13361: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
13362
13363	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13364	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
13365
13366fi
13367
13368if test -n "$cf_new_extra_cppflags" ; then
13369	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
13370
13371echo "${as_me:-configure}:13371: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
13372
13373	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
13374	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
13375
13376fi
13377
13378if test "x$cf_check_cflags" != "x$CFLAGS" ; then
13379cat >"conftest.$ac_ext" <<_ACEOF
13380#line 13380 "configure"
13381#include "confdefs.h"
13382#include <stdio.h>
13383int
13384main (void)
13385{
13386printf("Hello world");
13387  ;
13388  return 0;
13389}
13390_ACEOF
13391rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13392if { (eval echo "$as_me:13392: \"$ac_link\"") >&5
13393  (eval $ac_link) 2>&5
13394  ac_status=$?
13395  echo "$as_me:13395: \$? = $ac_status" >&5
13396  (exit "$ac_status"); } &&
13397         { ac_try='test -s "conftest$ac_exeext"'
13398  { (eval echo "$as_me:13398: \"$ac_try\"") >&5
13399  (eval $ac_try) 2>&5
13400  ac_status=$?
13401  echo "$as_me:13401: \$? = $ac_status" >&5
13402  (exit "$ac_status"); }; }; then
13403  :
13404else
13405  echo "$as_me: failed program was:" >&5
13406cat "conftest.$ac_ext" >&5
13407test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
13408
13409echo "${as_me:-configure}:13409: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
13410
13411	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
13412		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
13413
13414echo "${as_me:-configure}:13414: testing but keeping change to \$CPPFLAGS ..." 1>&5
13415
13416	 fi
13417	 CFLAGS="$cf_check_cflags"
13418fi
13419rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
13420fi
13421
13422fi
13423
13424### Look for network libraries first, since some functions (such as gethostname)
13425### are used in a lot of places.
13426echo "$as_me:13426: checking if you want NSS compatible SSL libraries" >&5
13427echo $ECHO_N "checking if you want NSS compatible SSL libraries... $ECHO_C" >&6
13428if test "${cf_cv_use_libnss_compat+set}" = set; then
13429  echo $ECHO_N "(cached) $ECHO_C" >&6
13430else
13431
13432# Check whether --with-nss-compat or --without-nss-compat was given.
13433if test "${with_nss_compat+set}" = set; then
13434  withval="$with_nss_compat"
13435  cf_cv_use_libnss_compat=$withval
13436else
13437  cf_cv_use_libnss_compat=no
13438fi;
13439
13440fi
13441echo "$as_me:13441: result: $cf_cv_use_libnss_compat" >&5
13442echo "${ECHO_T}$cf_cv_use_libnss_compat" >&6
13443
13444echo "$as_me:13444: checking if you want ssl library" >&5
13445echo $ECHO_N "checking if you want ssl library... $ECHO_C" >&6
13446if test "${cf_cv_use_libssl+set}" = set; then
13447  echo $ECHO_N "(cached) $ECHO_C" >&6
13448else
13449
13450# Check whether --with-ssl or --without-ssl was given.
13451if test "${with_ssl+set}" = set; then
13452  withval="$with_ssl"
13453  cf_cv_use_libssl=$withval
13454else
13455  cf_cv_use_libssl=no
13456fi;
13457
13458fi
13459echo "$as_me:13459: result: $cf_cv_use_libssl" >&5
13460echo "${ECHO_T}$cf_cv_use_libssl" >&6
13461
13462echo "$as_me:13462: checking if you want gnutls support" >&5
13463echo $ECHO_N "checking if you want gnutls support... $ECHO_C" >&6
13464if test "${cf_cv_use_libgnutls+set}" = set; then
13465  echo $ECHO_N "(cached) $ECHO_C" >&6
13466else
13467
13468# Check whether --with-gnutls or --without-gnutls was given.
13469if test "${with_gnutls+set}" = set; then
13470  withval="$with_gnutls"
13471  cf_cv_use_libgnutls=$withval
13472else
13473  cf_cv_use_libgnutls=no
13474fi;
13475
13476fi
13477echo "$as_me:13477: result: $cf_cv_use_libgnutls" >&5
13478echo "${ECHO_T}$cf_cv_use_libgnutls" >&6
13479
13480# this option is mainly for comparing with/without Lynx's wrapper for GNUTLS.
13481echo "$as_me:13481: checking if you want gnutls-openssl compat" >&5
13482echo $ECHO_N "checking if you want gnutls-openssl compat... $ECHO_C" >&6
13483if test "${cf_cv_gnutls_compat+set}" = set; then
13484  echo $ECHO_N "(cached) $ECHO_C" >&6
13485else
13486
13487# Check whether --enable-gnutls-compat or --disable-gnutls-compat was given.
13488if test "${enable_gnutls_compat+set}" = set; then
13489  enableval="$enable_gnutls_compat"
13490  cf_cv_gnutls_compat=$enableval
13491else
13492  cf_cv_gnutls_compat=no
13493fi;
13494
13495fi
13496echo "$as_me:13496: result: $cf_cv_gnutls_compat" >&5
13497echo "${ECHO_T}$cf_cv_gnutls_compat" >&6
13498
13499echo "$as_me:13499: checking if you want socks library" >&5
13500echo $ECHO_N "checking if you want socks library... $ECHO_C" >&6
13501if test "${cf_cv_use_libsocks+set}" = set; then
13502  echo $ECHO_N "(cached) $ECHO_C" >&6
13503else
13504
13505# Check whether --with-socks or --without-socks was given.
13506if test "${with_socks+set}" = set; then
13507  withval="$with_socks"
13508  cf_cv_use_libsocks=$withval
13509else
13510  cf_cv_use_libsocks=no
13511fi;
13512
13513fi
13514echo "$as_me:13514: result: $cf_cv_use_libsocks" >&5
13515echo "${ECHO_T}$cf_cv_use_libsocks" >&6
13516
13517echo "$as_me:13517: checking if you want socks5 library" >&5
13518echo $ECHO_N "checking if you want socks5 library... $ECHO_C" >&6
13519if test "${cf_cv_use_libsocks5+set}" = set; then
13520  echo $ECHO_N "(cached) $ECHO_C" >&6
13521else
13522
13523# Check whether --with-socks5 or --without-socks5 was given.
13524if test "${with_socks5+set}" = set; then
13525  withval="$with_socks5"
13526  cf_cv_use_libsocks5=$withval
13527else
13528  cf_cv_use_libsocks5=no
13529fi;
13530
13531fi
13532echo "$as_me:13532: result: $cf_cv_use_libsocks5" >&5
13533echo "${ECHO_T}$cf_cv_use_libsocks5" >&6
13534
13535if test "x$cf_cv_use_libsocks" != xno ; then
13536
13537case "$cf_cv_use_libsocks" in
13538(no)
13539	;;
13540(yes)
13541	;;
13542(*)
13543
13544for cf_searchpath in `echo "$cf_cv_use_libsocks" | tr $PATH_SEPARATOR ' '`; do
13545	if test -d "$cf_searchpath/include" ; then
13546
13547if test -n "$cf_searchpath/include" ; then
13548  for cf_add_incdir in $cf_searchpath/include
13549  do
13550	while test "$cf_add_incdir" != /usr/include
13551	do
13552	  if test -d "$cf_add_incdir"
13553	  then
13554		cf_have_incdir=no
13555		if test -n "$CFLAGS$CPPFLAGS" ; then
13556		  # a loop is needed to ensure we can add subdirs of existing dirs
13557		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13558			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13559			  cf_have_incdir=yes; break
13560			fi
13561		  done
13562		fi
13563
13564		if test "$cf_have_incdir" = no ; then
13565		  if test "$cf_add_incdir" = /usr/local/include ; then
13566			if test "$GCC" = yes
13567			then
13568			  cf_save_CPPFLAGS=$CPPFLAGS
13569
13570	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13571	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13572
13573			  cat >"conftest.$ac_ext" <<_ACEOF
13574#line 13574 "configure"
13575#include "confdefs.h"
13576#include <stdio.h>
13577int
13578main (void)
13579{
13580printf("Hello")
13581  ;
13582  return 0;
13583}
13584_ACEOF
13585rm -f "conftest.$ac_objext"
13586if { (eval echo "$as_me:13586: \"$ac_compile\"") >&5
13587  (eval $ac_compile) 2>&5
13588  ac_status=$?
13589  echo "$as_me:13589: \$? = $ac_status" >&5
13590  (exit "$ac_status"); } &&
13591         { ac_try='test -s "conftest.$ac_objext"'
13592  { (eval echo "$as_me:13592: \"$ac_try\"") >&5
13593  (eval $ac_try) 2>&5
13594  ac_status=$?
13595  echo "$as_me:13595: \$? = $ac_status" >&5
13596  (exit "$ac_status"); }; }; then
13597  :
13598else
13599  echo "$as_me: failed program was:" >&5
13600cat "conftest.$ac_ext" >&5
13601cf_have_incdir=yes
13602fi
13603rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13604			  CPPFLAGS=$cf_save_CPPFLAGS
13605			fi
13606		  fi
13607		fi
13608
13609		if test "$cf_have_incdir" = no ; then
13610		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13611
13612echo "${as_me:-configure}:13612: testing adding $cf_add_incdir to include-path ..." 1>&5
13613
13614		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13615
13616		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13617		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13618		  cf_add_incdir="$cf_top_incdir"
13619		else
13620		  break
13621		fi
13622	  else
13623		break
13624	  fi
13625	done
13626  done
13627fi
13628
13629	elif test -d "$cf_searchpath/../include" ; then
13630
13631if test -n "$cf_searchpath/../include" ; then
13632  for cf_add_incdir in $cf_searchpath/../include
13633  do
13634	while test "$cf_add_incdir" != /usr/include
13635	do
13636	  if test -d "$cf_add_incdir"
13637	  then
13638		cf_have_incdir=no
13639		if test -n "$CFLAGS$CPPFLAGS" ; then
13640		  # a loop is needed to ensure we can add subdirs of existing dirs
13641		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
13642			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
13643			  cf_have_incdir=yes; break
13644			fi
13645		  done
13646		fi
13647
13648		if test "$cf_have_incdir" = no ; then
13649		  if test "$cf_add_incdir" = /usr/local/include ; then
13650			if test "$GCC" = yes
13651			then
13652			  cf_save_CPPFLAGS=$CPPFLAGS
13653
13654	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13655	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
13656
13657			  cat >"conftest.$ac_ext" <<_ACEOF
13658#line 13658 "configure"
13659#include "confdefs.h"
13660#include <stdio.h>
13661int
13662main (void)
13663{
13664printf("Hello")
13665  ;
13666  return 0;
13667}
13668_ACEOF
13669rm -f "conftest.$ac_objext"
13670if { (eval echo "$as_me:13670: \"$ac_compile\"") >&5
13671  (eval $ac_compile) 2>&5
13672  ac_status=$?
13673  echo "$as_me:13673: \$? = $ac_status" >&5
13674  (exit "$ac_status"); } &&
13675         { ac_try='test -s "conftest.$ac_objext"'
13676  { (eval echo "$as_me:13676: \"$ac_try\"") >&5
13677  (eval $ac_try) 2>&5
13678  ac_status=$?
13679  echo "$as_me:13679: \$? = $ac_status" >&5
13680  (exit "$ac_status"); }; }; then
13681  :
13682else
13683  echo "$as_me: failed program was:" >&5
13684cat "conftest.$ac_ext" >&5
13685cf_have_incdir=yes
13686fi
13687rm -f "conftest.$ac_objext" "conftest.$ac_ext"
13688			  CPPFLAGS=$cf_save_CPPFLAGS
13689			fi
13690		  fi
13691		fi
13692
13693		if test "$cf_have_incdir" = no ; then
13694		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
13695
13696echo "${as_me:-configure}:13696: testing adding $cf_add_incdir to include-path ..." 1>&5
13697
13698		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
13699
13700		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
13701		  test "$cf_top_incdir" = "$cf_add_incdir" && break
13702		  cf_add_incdir="$cf_top_incdir"
13703		else
13704		  break
13705		fi
13706	  else
13707		break
13708	  fi
13709	done
13710  done
13711fi
13712
13713	else
13714{ { echo "$as_me:13714: error: cannot find socks library under $cf_cv_use_libsocks" >&5
13715echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
13716   { (exit 1); exit 1; }; }
13717	fi
13718	if test -d "$cf_searchpath/lib" ; then
13719
13720if test -n "$cf_searchpath/lib" ; then
13721	for cf_add_libdir in $cf_searchpath/lib
13722	do
13723		if test "$cf_add_libdir" = /usr/lib ; then
13724			:
13725		elif test -d "$cf_add_libdir"
13726		then
13727			cf_have_libdir=no
13728			if test -n "$LDFLAGS$LIBS" ; then
13729				# a loop is needed to ensure we can add subdirs of existing dirs
13730				for cf_test_libdir in $LDFLAGS $LIBS ; do
13731					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13732						cf_have_libdir=yes; break
13733					fi
13734				done
13735			fi
13736			if test "$cf_have_libdir" = no ; then
13737				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13738
13739echo "${as_me:-configure}:13739: testing adding $cf_add_libdir to library-path ..." 1>&5
13740
13741				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13742			fi
13743		fi
13744	done
13745fi
13746
13747	elif test -d "$cf_searchpath" ; then
13748
13749if test -n "$cf_searchpath" ; then
13750	for cf_add_libdir in $cf_searchpath
13751	do
13752		if test "$cf_add_libdir" = /usr/lib ; then
13753			:
13754		elif test -d "$cf_add_libdir"
13755		then
13756			cf_have_libdir=no
13757			if test -n "$LDFLAGS$LIBS" ; then
13758				# a loop is needed to ensure we can add subdirs of existing dirs
13759				for cf_test_libdir in $LDFLAGS $LIBS ; do
13760					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
13761						cf_have_libdir=yes; break
13762					fi
13763				done
13764			fi
13765			if test "$cf_have_libdir" = no ; then
13766				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
13767
13768echo "${as_me:-configure}:13768: testing adding $cf_add_libdir to library-path ..." 1>&5
13769
13770				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
13771			fi
13772		fi
13773	done
13774fi
13775
13776	else
13777{ { echo "$as_me:13777: error: cannot find socks library under $cf_cv_use_libsocks" >&5
13778echo "$as_me: error: cannot find socks library under $cf_cv_use_libsocks" >&2;}
13779   { (exit 1); exit 1; }; }
13780	fi
13781done
13782
13783	;;
13784esac
13785
13786# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
13787# will be set on completion of the AC_TRY_LINK below.
13788cf_cv_header_path_socks=
13789cf_cv_library_path_socks=
13790
13791echo "${as_me:-configure}:13791: testing Starting FIND_LINKAGE(socks,) ..." 1>&5
13792
13793cf_save_LIBS="$LIBS"
13794
13795cat >"conftest.$ac_ext" <<_ACEOF
13796#line 13796 "configure"
13797#include "confdefs.h"
13798
13799#include <stdio.h>
13800
13801int
13802main (void)
13803{
13804
13805      Raccept((char *)0)
13806
13807  ;
13808  return 0;
13809}
13810_ACEOF
13811rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13812if { (eval echo "$as_me:13812: \"$ac_link\"") >&5
13813  (eval $ac_link) 2>&5
13814  ac_status=$?
13815  echo "$as_me:13815: \$? = $ac_status" >&5
13816  (exit "$ac_status"); } &&
13817         { ac_try='test -s "conftest$ac_exeext"'
13818  { (eval echo "$as_me:13818: \"$ac_try\"") >&5
13819  (eval $ac_try) 2>&5
13820  ac_status=$?
13821  echo "$as_me:13821: \$? = $ac_status" >&5
13822  (exit "$ac_status"); }; }; then
13823
13824	cf_cv_find_linkage_socks=yes
13825	cf_cv_header_path_socks=/usr/include
13826	cf_cv_library_path_socks=/usr/lib
13827
13828else
13829  echo "$as_me: failed program was:" >&5
13830cat "conftest.$ac_ext" >&5
13831
13832LIBS="-lsocks  $cf_save_LIBS"
13833
13834cat >"conftest.$ac_ext" <<_ACEOF
13835#line 13835 "configure"
13836#include "confdefs.h"
13837
13838#include <stdio.h>
13839
13840int
13841main (void)
13842{
13843
13844      Raccept((char *)0)
13845
13846  ;
13847  return 0;
13848}
13849_ACEOF
13850rm -f "conftest.$ac_objext" "conftest$ac_exeext"
13851if { (eval echo "$as_me:13851: \"$ac_link\"") >&5
13852  (eval $ac_link) 2>&5
13853  ac_status=$?
13854  echo "$as_me:13854: \$? = $ac_status" >&5
13855  (exit "$ac_status"); } &&
13856         { ac_try='test -s "conftest$ac_exeext"'
13857  { (eval echo "$as_me:13857: \"$ac_try\"") >&5
13858  (eval $ac_try) 2>&5
13859  ac_status=$?
13860  echo "$as_me:13860: \$? = $ac_status" >&5
13861  (exit "$ac_status"); }; }; then
13862
13863	cf_cv_find_linkage_socks=yes
13864	cf_cv_header_path_socks=/usr/include
13865	cf_cv_library_path_socks=/usr/lib
13866	cf_cv_library_file_socks="-lsocks"
13867
13868else
13869  echo "$as_me: failed program was:" >&5
13870cat "conftest.$ac_ext" >&5
13871
13872	cf_cv_find_linkage_socks=no
13873	LIBS="$cf_save_LIBS"
13874
13875	test -n "$verbose" && echo "	find linkage for socks library" 1>&6
13876
13877echo "${as_me:-configure}:13877: testing find linkage for socks library ..." 1>&5
13878
13879echo "${as_me:-configure}:13879: testing Searching for headers in FIND_LINKAGE(socks,) ..." 1>&5
13880
13881	cf_save_CPPFLAGS="$CPPFLAGS"
13882	cf_test_CPPFLAGS="$CPPFLAGS"
13883
13884cf_search=
13885
13886# collect the current set of include-directories from compiler flags
13887cf_header_path_list=""
13888if test -n "${CFLAGS}${CPPFLAGS}" ; then
13889	for cf_header_path in $CPPFLAGS $CFLAGS
13890	do
13891		case "$cf_header_path" in
13892		(-I*)
13893			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
13894
13895test "x$cf_header_path" != "xNONE" && \
13896test -d "$cf_header_path" && \
13897 {
13898	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
13899	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
13900	test -d "$cf_header_path/include/socks" &&       cf_search="$cf_search $cf_header_path/include/socks"
13901	test -d "$cf_header_path/include/socks/include" &&    cf_search="$cf_search $cf_header_path/include/socks/include"
13902	test -d "$cf_header_path/socks/include" &&       cf_search="$cf_search $cf_header_path/socks/include"
13903	test -d "$cf_header_path/socks/include/socks" &&    cf_search="$cf_search $cf_header_path/socks/include/socks"
13904}
13905
13906			cf_header_path_list="$cf_header_path_list $cf_search"
13907			;;
13908		esac
13909	done
13910fi
13911
13912# add the variations for the package we are looking for
13913
13914cf_search=
13915
13916test "x$prefix" != "xNONE" && \
13917test -d "$prefix" && \
13918 {
13919	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
13920	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
13921	test -d "$prefix/include/socks" &&       cf_search="$cf_search $prefix/include/socks"
13922	test -d "$prefix/include/socks/include" &&    cf_search="$cf_search $prefix/include/socks/include"
13923	test -d "$prefix/socks/include" &&       cf_search="$cf_search $prefix/socks/include"
13924	test -d "$prefix/socks/include/socks" &&    cf_search="$cf_search $prefix/socks/include/socks"
13925}
13926
13927for cf_subdir_prefix in \
13928	/usr \
13929	/usr/local \
13930	/usr/pkg \
13931	/opt \
13932	/opt/local \
13933	$HOME
13934do
13935
13936test "x$cf_subdir_prefix" != "x$prefix" && \
13937test -d "$cf_subdir_prefix" && \
13938{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
13939	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
13940	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
13941	test -d "$cf_subdir_prefix/include/socks" &&       cf_search="$cf_search $cf_subdir_prefix/include/socks"
13942	test -d "$cf_subdir_prefix/include/socks/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/socks/include"
13943	test -d "$cf_subdir_prefix/socks/include" &&       cf_search="$cf_search $cf_subdir_prefix/socks/include"
13944	test -d "$cf_subdir_prefix/socks/include/socks" &&    cf_search="$cf_search $cf_subdir_prefix/socks/include/socks"
13945}
13946
13947done
13948
13949test "$includedir" != NONE && \
13950test "$includedir" != "/usr/include" && \
13951test -d "$includedir" && {
13952	test -d "$includedir" &&    cf_search="$cf_search $includedir"
13953	test -d "$includedir/socks" && cf_search="$cf_search $includedir/socks"
13954}
13955
13956test "$oldincludedir" != NONE && \
13957test "$oldincludedir" != "/usr/include" && \
13958test -d "$oldincludedir" && {
13959	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
13960	test -d "$oldincludedir/socks" && cf_search="$cf_search $oldincludedir/socks"
13961}
13962
13963cf_search="$cf_search $cf_header_path_list"
13964
13965	for cf_cv_header_path_socks in $cf_search
13966	do
13967		if test -d "$cf_cv_header_path_socks" ; then
13968			test -n "$verbose" && echo "	... testing $cf_cv_header_path_socks" 1>&6
13969
13970echo "${as_me:-configure}:13970: testing ... testing $cf_cv_header_path_socks ..." 1>&5
13971
13972			CPPFLAGS="$cf_save_CPPFLAGS"
13973
13974	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
13975	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_socks"
13976
13977			cat >"conftest.$ac_ext" <<_ACEOF
13978#line 13978 "configure"
13979#include "confdefs.h"
13980
13981#include <stdio.h>
13982
13983int
13984main (void)
13985{
13986
13987      Raccept((char *)0)
13988
13989  ;
13990  return 0;
13991}
13992_ACEOF
13993rm -f "conftest.$ac_objext"
13994if { (eval echo "$as_me:13994: \"$ac_compile\"") >&5
13995  (eval $ac_compile) 2>&5
13996  ac_status=$?
13997  echo "$as_me:13997: \$? = $ac_status" >&5
13998  (exit "$ac_status"); } &&
13999         { ac_try='test -s "conftest.$ac_objext"'
14000  { (eval echo "$as_me:14000: \"$ac_try\"") >&5
14001  (eval $ac_try) 2>&5
14002  ac_status=$?
14003  echo "$as_me:14003: \$? = $ac_status" >&5
14004  (exit "$ac_status"); }; }; then
14005
14006				test -n "$verbose" && echo "	... found socks headers in $cf_cv_header_path_socks" 1>&6
14007
14008echo "${as_me:-configure}:14008: testing ... found socks headers in $cf_cv_header_path_socks ..." 1>&5
14009
14010				cf_cv_find_linkage_socks=maybe
14011				cf_test_CPPFLAGS="$CPPFLAGS"
14012				break
14013else
14014  echo "$as_me: failed program was:" >&5
14015cat "conftest.$ac_ext" >&5
14016
14017				CPPFLAGS="$cf_save_CPPFLAGS"
14018
14019fi
14020rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14021		fi
14022	done
14023
14024	if test "$cf_cv_find_linkage_socks" = maybe ; then
14025
14026echo "${as_me:-configure}:14026: testing Searching for socks library in FIND_LINKAGE(socks,) ..." 1>&5
14027
14028		cf_save_LIBS="$LIBS"
14029		cf_save_LDFLAGS="$LDFLAGS"
14030
14031		if test "$cf_cv_find_linkage_socks" != yes ; then
14032
14033cf_search=
14034cf_library_path_list=""
14035if test -n "${LDFLAGS}${LIBS}" ; then
14036	for cf_library_path in $LDFLAGS $LIBS
14037	do
14038		case "$cf_library_path" in
14039		(-L*)
14040			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
14041
14042test "x$cf_library_path" != "xNONE" && \
14043test -d "$cf_library_path" && \
14044 {
14045	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
14046	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
14047	test -d "$cf_library_path/lib/socks" &&       cf_search="$cf_search $cf_library_path/lib/socks"
14048	test -d "$cf_library_path/lib/socks/lib" &&    cf_search="$cf_search $cf_library_path/lib/socks/lib"
14049	test -d "$cf_library_path/socks/lib" &&       cf_search="$cf_search $cf_library_path/socks/lib"
14050	test -d "$cf_library_path/socks/lib/socks" &&    cf_search="$cf_search $cf_library_path/socks/lib/socks"
14051}
14052
14053			cf_library_path_list="$cf_library_path_list $cf_search"
14054			;;
14055		esac
14056	done
14057fi
14058
14059cf_search=
14060
14061test "x$prefix" != "xNONE" && \
14062test -d "$prefix" && \
14063 {
14064	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
14065	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
14066	test -d "$prefix/lib/socks" &&       cf_search="$cf_search $prefix/lib/socks"
14067	test -d "$prefix/lib/socks/lib" &&    cf_search="$cf_search $prefix/lib/socks/lib"
14068	test -d "$prefix/socks/lib" &&       cf_search="$cf_search $prefix/socks/lib"
14069	test -d "$prefix/socks/lib/socks" &&    cf_search="$cf_search $prefix/socks/lib/socks"
14070}
14071
14072for cf_subdir_prefix in \
14073	/usr \
14074	/usr/local \
14075	/usr/pkg \
14076	/opt \
14077	/opt/local \
14078	$HOME
14079do
14080
14081test "x$cf_subdir_prefix" != "x$prefix" && \
14082test -d "$cf_subdir_prefix" && \
14083{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
14084	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
14085	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
14086	test -d "$cf_subdir_prefix/lib/socks" &&       cf_search="$cf_search $cf_subdir_prefix/lib/socks"
14087	test -d "$cf_subdir_prefix/lib/socks/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/socks/lib"
14088	test -d "$cf_subdir_prefix/socks/lib" &&       cf_search="$cf_search $cf_subdir_prefix/socks/lib"
14089	test -d "$cf_subdir_prefix/socks/lib/socks" &&    cf_search="$cf_search $cf_subdir_prefix/socks/lib/socks"
14090}
14091
14092done
14093
14094cf_search="$cf_library_path_list $cf_search"
14095
14096			for cf_cv_library_path_socks in $cf_search
14097			do
14098				if test -d "$cf_cv_library_path_socks" ; then
14099					test -n "$verbose" && echo "	... testing $cf_cv_library_path_socks" 1>&6
14100
14101echo "${as_me:-configure}:14101: testing ... testing $cf_cv_library_path_socks ..." 1>&5
14102
14103					CPPFLAGS="$cf_test_CPPFLAGS"
14104					LIBS="-lsocks  $cf_save_LIBS"
14105					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_socks"
14106					cat >"conftest.$ac_ext" <<_ACEOF
14107#line 14107 "configure"
14108#include "confdefs.h"
14109
14110#include <stdio.h>
14111
14112int
14113main (void)
14114{
14115
14116      Raccept((char *)0)
14117
14118  ;
14119  return 0;
14120}
14121_ACEOF
14122rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14123if { (eval echo "$as_me:14123: \"$ac_link\"") >&5
14124  (eval $ac_link) 2>&5
14125  ac_status=$?
14126  echo "$as_me:14126: \$? = $ac_status" >&5
14127  (exit "$ac_status"); } &&
14128         { ac_try='test -s "conftest$ac_exeext"'
14129  { (eval echo "$as_me:14129: \"$ac_try\"") >&5
14130  (eval $ac_try) 2>&5
14131  ac_status=$?
14132  echo "$as_me:14132: \$? = $ac_status" >&5
14133  (exit "$ac_status"); }; }; then
14134
14135					test -n "$verbose" && echo "	... found socks library in $cf_cv_library_path_socks" 1>&6
14136
14137echo "${as_me:-configure}:14137: testing ... found socks library in $cf_cv_library_path_socks ..." 1>&5
14138
14139					cf_cv_find_linkage_socks=yes
14140					cf_cv_library_file_socks="-lsocks"
14141					break
14142else
14143  echo "$as_me: failed program was:" >&5
14144cat "conftest.$ac_ext" >&5
14145
14146					CPPFLAGS="$cf_save_CPPFLAGS"
14147					LIBS="$cf_save_LIBS"
14148					LDFLAGS="$cf_save_LDFLAGS"
14149
14150fi
14151rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14152				fi
14153			done
14154			CPPFLAGS="$cf_save_CPPFLAGS"
14155			LDFLAGS="$cf_save_LDFLAGS"
14156		fi
14157
14158	else
14159		cf_cv_find_linkage_socks=no
14160	fi
14161
14162fi
14163rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14164
14165fi
14166rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14167
14168LIBS="$cf_save_LIBS"
14169
14170if test "$cf_cv_find_linkage_socks" = yes ; then
14171
14172if test -n "$cf_cv_header_path_socks" ; then
14173  for cf_add_incdir in $cf_cv_header_path_socks
14174  do
14175	while test "$cf_add_incdir" != /usr/include
14176	do
14177	  if test -d "$cf_add_incdir"
14178	  then
14179		cf_have_incdir=no
14180		if test -n "$CFLAGS$CPPFLAGS" ; then
14181		  # a loop is needed to ensure we can add subdirs of existing dirs
14182		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14183			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14184			  cf_have_incdir=yes; break
14185			fi
14186		  done
14187		fi
14188
14189		if test "$cf_have_incdir" = no ; then
14190		  if test "$cf_add_incdir" = /usr/local/include ; then
14191			if test "$GCC" = yes
14192			then
14193			  cf_save_CPPFLAGS=$CPPFLAGS
14194
14195	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14196	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14197
14198			  cat >"conftest.$ac_ext" <<_ACEOF
14199#line 14199 "configure"
14200#include "confdefs.h"
14201#include <stdio.h>
14202int
14203main (void)
14204{
14205printf("Hello")
14206  ;
14207  return 0;
14208}
14209_ACEOF
14210rm -f "conftest.$ac_objext"
14211if { (eval echo "$as_me:14211: \"$ac_compile\"") >&5
14212  (eval $ac_compile) 2>&5
14213  ac_status=$?
14214  echo "$as_me:14214: \$? = $ac_status" >&5
14215  (exit "$ac_status"); } &&
14216         { ac_try='test -s "conftest.$ac_objext"'
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  :
14223else
14224  echo "$as_me: failed program was:" >&5
14225cat "conftest.$ac_ext" >&5
14226cf_have_incdir=yes
14227fi
14228rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14229			  CPPFLAGS=$cf_save_CPPFLAGS
14230			fi
14231		  fi
14232		fi
14233
14234		if test "$cf_have_incdir" = no ; then
14235		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14236
14237echo "${as_me:-configure}:14237: testing adding $cf_add_incdir to include-path ..." 1>&5
14238
14239		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14240
14241		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
14242		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14243		  cf_add_incdir="$cf_top_incdir"
14244		else
14245		  break
14246		fi
14247	  else
14248		break
14249	  fi
14250	done
14251  done
14252fi
14253
14254if test -n "$cf_cv_library_path_socks" ; then
14255	for cf_add_libdir in $cf_cv_library_path_socks
14256	do
14257		if test "$cf_add_libdir" = /usr/lib ; then
14258			:
14259		elif test -d "$cf_add_libdir"
14260		then
14261			cf_have_libdir=no
14262			if test -n "$LDFLAGS$LIBS" ; then
14263				# a loop is needed to ensure we can add subdirs of existing dirs
14264				for cf_test_libdir in $LDFLAGS $LIBS ; do
14265					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14266						cf_have_libdir=yes; break
14267					fi
14268				done
14269			fi
14270			if test "$cf_have_libdir" = no ; then
14271				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14272
14273echo "${as_me:-configure}:14273: testing adding $cf_add_libdir to library-path ..." 1>&5
14274
14275				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14276			fi
14277		fi
14278	done
14279fi
14280
14281cf_add_libs="$LIBS"
14282# reverse order
14283cf_add_0lib=
14284for cf_add_1lib in -lsocks; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14285# filter duplicates
14286for cf_add_1lib in $cf_add_0lib; do
14287	for cf_add_2lib in $cf_add_libs; do
14288		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14289			cf_add_1lib=
14290			break
14291		fi
14292	done
14293	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14294done
14295LIBS="$cf_add_libs"
14296
14297else
14298{ echo "$as_me:14298: WARNING: Cannot find socks library" >&5
14299echo "$as_me: WARNING: Cannot find socks library" >&2;}
14300fi
14301
14302  if test "x$cf_cv_find_linkage_socks" = "xyes" ; then
14303
14304cat >>confdefs.h <<\EOF
14305#define SOCKS 1
14306EOF
14307
14308cat >>confdefs.h <<\EOF
14309#define accept Raccept
14310EOF
14311
14312cat >>confdefs.h <<\EOF
14313#define bind Rbind
14314EOF
14315
14316cat >>confdefs.h <<\EOF
14317#define connect Rconnect
14318EOF
14319
14320cat >>confdefs.h <<\EOF
14321#define getpeername Rgetpeername
14322EOF
14323
14324cat >>confdefs.h <<\EOF
14325#define getsockname Rgetsockname
14326EOF
14327
14328cat >>confdefs.h <<\EOF
14329#define listen Rlisten
14330EOF
14331
14332cat >>confdefs.h <<\EOF
14333#define recvfrom Rrecvfrom
14334EOF
14335
14336cat >>confdefs.h <<\EOF
14337#define select Rselect
14338EOF
14339
14340  else
14341    { { echo "$as_me:14341: error: cannot link with socks library" >&5
14342echo "$as_me: error: cannot link with socks library" >&2;}
14343   { (exit 1); exit 1; }; }
14344  fi
14345
14346elif test "x$cf_cv_use_libsocks5" != xno ; then
14347
14348case "$cf_cv_use_libsocks5" in
14349(no)
14350	;;
14351(yes)
14352	;;
14353(*)
14354
14355for cf_searchpath in `echo "$cf_cv_use_libsocks5" | tr $PATH_SEPARATOR ' '`; do
14356	if test -d "$cf_searchpath/include" ; then
14357
14358if test -n "$cf_searchpath/include" ; then
14359  for cf_add_incdir in $cf_searchpath/include
14360  do
14361	while test "$cf_add_incdir" != /usr/include
14362	do
14363	  if test -d "$cf_add_incdir"
14364	  then
14365		cf_have_incdir=no
14366		if test -n "$CFLAGS$CPPFLAGS" ; then
14367		  # a loop is needed to ensure we can add subdirs of existing dirs
14368		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14369			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14370			  cf_have_incdir=yes; break
14371			fi
14372		  done
14373		fi
14374
14375		if test "$cf_have_incdir" = no ; then
14376		  if test "$cf_add_incdir" = /usr/local/include ; then
14377			if test "$GCC" = yes
14378			then
14379			  cf_save_CPPFLAGS=$CPPFLAGS
14380
14381	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14382	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14383
14384			  cat >"conftest.$ac_ext" <<_ACEOF
14385#line 14385 "configure"
14386#include "confdefs.h"
14387#include <stdio.h>
14388int
14389main (void)
14390{
14391printf("Hello")
14392  ;
14393  return 0;
14394}
14395_ACEOF
14396rm -f "conftest.$ac_objext"
14397if { (eval echo "$as_me:14397: \"$ac_compile\"") >&5
14398  (eval $ac_compile) 2>&5
14399  ac_status=$?
14400  echo "$as_me:14400: \$? = $ac_status" >&5
14401  (exit "$ac_status"); } &&
14402         { ac_try='test -s "conftest.$ac_objext"'
14403  { (eval echo "$as_me:14403: \"$ac_try\"") >&5
14404  (eval $ac_try) 2>&5
14405  ac_status=$?
14406  echo "$as_me:14406: \$? = $ac_status" >&5
14407  (exit "$ac_status"); }; }; then
14408  :
14409else
14410  echo "$as_me: failed program was:" >&5
14411cat "conftest.$ac_ext" >&5
14412cf_have_incdir=yes
14413fi
14414rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14415			  CPPFLAGS=$cf_save_CPPFLAGS
14416			fi
14417		  fi
14418		fi
14419
14420		if test "$cf_have_incdir" = no ; then
14421		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14422
14423echo "${as_me:-configure}:14423: testing adding $cf_add_incdir to include-path ..." 1>&5
14424
14425		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14426
14427		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
14428		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14429		  cf_add_incdir="$cf_top_incdir"
14430		else
14431		  break
14432		fi
14433	  else
14434		break
14435	  fi
14436	done
14437  done
14438fi
14439
14440	elif test -d "$cf_searchpath/../include" ; then
14441
14442if test -n "$cf_searchpath/../include" ; then
14443  for cf_add_incdir in $cf_searchpath/../include
14444  do
14445	while test "$cf_add_incdir" != /usr/include
14446	do
14447	  if test -d "$cf_add_incdir"
14448	  then
14449		cf_have_incdir=no
14450		if test -n "$CFLAGS$CPPFLAGS" ; then
14451		  # a loop is needed to ensure we can add subdirs of existing dirs
14452		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
14453			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
14454			  cf_have_incdir=yes; break
14455			fi
14456		  done
14457		fi
14458
14459		if test "$cf_have_incdir" = no ; then
14460		  if test "$cf_add_incdir" = /usr/local/include ; then
14461			if test "$GCC" = yes
14462			then
14463			  cf_save_CPPFLAGS=$CPPFLAGS
14464
14465	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
14466	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
14467
14468			  cat >"conftest.$ac_ext" <<_ACEOF
14469#line 14469 "configure"
14470#include "confdefs.h"
14471#include <stdio.h>
14472int
14473main (void)
14474{
14475printf("Hello")
14476  ;
14477  return 0;
14478}
14479_ACEOF
14480rm -f "conftest.$ac_objext"
14481if { (eval echo "$as_me:14481: \"$ac_compile\"") >&5
14482  (eval $ac_compile) 2>&5
14483  ac_status=$?
14484  echo "$as_me:14484: \$? = $ac_status" >&5
14485  (exit "$ac_status"); } &&
14486         { ac_try='test -s "conftest.$ac_objext"'
14487  { (eval echo "$as_me:14487: \"$ac_try\"") >&5
14488  (eval $ac_try) 2>&5
14489  ac_status=$?
14490  echo "$as_me:14490: \$? = $ac_status" >&5
14491  (exit "$ac_status"); }; }; then
14492  :
14493else
14494  echo "$as_me: failed program was:" >&5
14495cat "conftest.$ac_ext" >&5
14496cf_have_incdir=yes
14497fi
14498rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14499			  CPPFLAGS=$cf_save_CPPFLAGS
14500			fi
14501		  fi
14502		fi
14503
14504		if test "$cf_have_incdir" = no ; then
14505		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
14506
14507echo "${as_me:-configure}:14507: testing adding $cf_add_incdir to include-path ..." 1>&5
14508
14509		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
14510
14511		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
14512		  test "$cf_top_incdir" = "$cf_add_incdir" && break
14513		  cf_add_incdir="$cf_top_incdir"
14514		else
14515		  break
14516		fi
14517	  else
14518		break
14519	  fi
14520	done
14521  done
14522fi
14523
14524	else
14525{ { echo "$as_me:14525: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
14526echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
14527   { (exit 1); exit 1; }; }
14528	fi
14529	if test -d "$cf_searchpath/lib" ; then
14530
14531if test -n "$cf_searchpath/lib" ; then
14532	for cf_add_libdir in $cf_searchpath/lib
14533	do
14534		if test "$cf_add_libdir" = /usr/lib ; then
14535			:
14536		elif test -d "$cf_add_libdir"
14537		then
14538			cf_have_libdir=no
14539			if test -n "$LDFLAGS$LIBS" ; then
14540				# a loop is needed to ensure we can add subdirs of existing dirs
14541				for cf_test_libdir in $LDFLAGS $LIBS ; do
14542					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14543						cf_have_libdir=yes; break
14544					fi
14545				done
14546			fi
14547			if test "$cf_have_libdir" = no ; then
14548				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14549
14550echo "${as_me:-configure}:14550: testing adding $cf_add_libdir to library-path ..." 1>&5
14551
14552				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14553			fi
14554		fi
14555	done
14556fi
14557
14558	elif test -d "$cf_searchpath" ; then
14559
14560if test -n "$cf_searchpath" ; then
14561	for cf_add_libdir in $cf_searchpath
14562	do
14563		if test "$cf_add_libdir" = /usr/lib ; then
14564			:
14565		elif test -d "$cf_add_libdir"
14566		then
14567			cf_have_libdir=no
14568			if test -n "$LDFLAGS$LIBS" ; then
14569				# a loop is needed to ensure we can add subdirs of existing dirs
14570				for cf_test_libdir in $LDFLAGS $LIBS ; do
14571					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
14572						cf_have_libdir=yes; break
14573					fi
14574				done
14575			fi
14576			if test "$cf_have_libdir" = no ; then
14577				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
14578
14579echo "${as_me:-configure}:14579: testing adding $cf_add_libdir to library-path ..." 1>&5
14580
14581				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
14582			fi
14583		fi
14584	done
14585fi
14586
14587	else
14588{ { echo "$as_me:14588: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&5
14589echo "$as_me: error: cannot find socks5 library under $cf_cv_use_libsocks5" >&2;}
14590   { (exit 1); exit 1; }; }
14591	fi
14592done
14593
14594	;;
14595esac
14596
14597cf_add_libs="$LIBS"
14598# reverse order
14599cf_add_0lib=
14600for cf_add_1lib in -lsocks5; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14601# filter duplicates
14602for cf_add_1lib in $cf_add_0lib; do
14603	for cf_add_2lib in $cf_add_libs; do
14604		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14605			cf_add_1lib=
14606			break
14607		fi
14608	done
14609	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14610done
14611LIBS="$cf_add_libs"
14612
14613cat >>confdefs.h <<\EOF
14614#define USE_SOCKS5 1
14615EOF
14616
14617cat >>confdefs.h <<\EOF
14618#define SOCKS 1
14619EOF
14620
14621echo "$as_me:14621: checking if the socks library uses socks4 prefix" >&5
14622echo $ECHO_N "checking if the socks library uses socks4 prefix... $ECHO_C" >&6
14623cf_use_socks4=error
14624cat >"conftest.$ac_ext" <<_ACEOF
14625#line 14625 "configure"
14626#include "confdefs.h"
14627
14628#include <socks.h>
14629int
14630main (void)
14631{
14632
14633	Rinit((char *)0)
14634  ;
14635  return 0;
14636}
14637_ACEOF
14638rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14639if { (eval echo "$as_me:14639: \"$ac_link\"") >&5
14640  (eval $ac_link) 2>&5
14641  ac_status=$?
14642  echo "$as_me:14642: \$? = $ac_status" >&5
14643  (exit "$ac_status"); } &&
14644         { ac_try='test -s "conftest$ac_exeext"'
14645  { (eval echo "$as_me:14645: \"$ac_try\"") >&5
14646  (eval $ac_try) 2>&5
14647  ac_status=$?
14648  echo "$as_me:14648: \$? = $ac_status" >&5
14649  (exit "$ac_status"); }; }; then
14650
14651cat >>confdefs.h <<\EOF
14652#define USE_SOCKS4_PREFIX 1
14653EOF
14654
14655	 cf_use_socks4=yes
14656else
14657  echo "$as_me: failed program was:" >&5
14658cat "conftest.$ac_ext" >&5
14659cat >"conftest.$ac_ext" <<_ACEOF
14660#line 14660 "configure"
14661#include "confdefs.h"
14662#include <socks.h>
14663int
14664main (void)
14665{
14666SOCKSinit((char *)0)
14667  ;
14668  return 0;
14669}
14670_ACEOF
14671rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14672if { (eval echo "$as_me:14672: \"$ac_link\"") >&5
14673  (eval $ac_link) 2>&5
14674  ac_status=$?
14675  echo "$as_me:14675: \$? = $ac_status" >&5
14676  (exit "$ac_status"); } &&
14677         { ac_try='test -s "conftest$ac_exeext"'
14678  { (eval echo "$as_me:14678: \"$ac_try\"") >&5
14679  (eval $ac_try) 2>&5
14680  ac_status=$?
14681  echo "$as_me:14681: \$? = $ac_status" >&5
14682  (exit "$ac_status"); }; }; then
14683  cf_use_socks4=no
14684else
14685  echo "$as_me: failed program was:" >&5
14686cat "conftest.$ac_ext" >&5
14687{ { echo "$as_me:14687: error: Cannot link with socks5 library" >&5
14688echo "$as_me: error: Cannot link with socks5 library" >&2;}
14689   { (exit 1); exit 1; }; }
14690fi
14691rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14692fi
14693rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14694echo "$as_me:14694: result: $cf_use_socks4" >&5
14695echo "${ECHO_T}$cf_use_socks4" >&6
14696
14697if test "$cf_use_socks4" = "yes" ; then
14698	cat >>confdefs.h <<\EOF
14699#define accept Raccept
14700EOF
14701
14702	cat >>confdefs.h <<\EOF
14703#define bind Rbind
14704EOF
14705
14706	cat >>confdefs.h <<\EOF
14707#define connect Rconnect
14708EOF
14709
14710	cat >>confdefs.h <<\EOF
14711#define getpeername Rgetpeername
14712EOF
14713
14714	cat >>confdefs.h <<\EOF
14715#define getsockname Rgetsockname
14716EOF
14717
14718	cat >>confdefs.h <<\EOF
14719#define listen Rlisten
14720EOF
14721
14722	cat >>confdefs.h <<\EOF
14723#define recvfrom Rrecvfrom
14724EOF
14725
14726	cat >>confdefs.h <<\EOF
14727#define select Rselect
14728EOF
14729
14730else
14731	cat >>confdefs.h <<\EOF
14732#define accept SOCKSaccept
14733EOF
14734
14735	cat >>confdefs.h <<\EOF
14736#define getpeername SOCKSgetpeername
14737EOF
14738
14739	cat >>confdefs.h <<\EOF
14740#define getsockname SOCKSgetsockname
14741EOF
14742
14743	cat >>confdefs.h <<\EOF
14744#define recvfrom SOCKSrecvfrom
14745EOF
14746
14747fi
14748
14749echo "$as_me:14749: checking if socks5p.h is available" >&5
14750echo $ECHO_N "checking if socks5p.h is available... $ECHO_C" >&6
14751cat >"conftest.$ac_ext" <<_ACEOF
14752#line 14752 "configure"
14753#include "confdefs.h"
14754
14755#define INCLUDE_PROTOTYPES
14756#include <socks.h>
14757int
14758main (void)
14759{
14760
14761	init((char *)0)
14762  ;
14763  return 0;
14764}
14765_ACEOF
14766rm -f "conftest.$ac_objext"
14767if { (eval echo "$as_me:14767: \"$ac_compile\"") >&5
14768  (eval $ac_compile) 2>&5
14769  ac_status=$?
14770  echo "$as_me:14770: \$? = $ac_status" >&5
14771  (exit "$ac_status"); } &&
14772         { ac_try='test -s "conftest.$ac_objext"'
14773  { (eval echo "$as_me:14773: \"$ac_try\"") >&5
14774  (eval $ac_try) 2>&5
14775  ac_status=$?
14776  echo "$as_me:14776: \$? = $ac_status" >&5
14777  (exit "$ac_status"); }; }; then
14778  cf_use_socks5p_h=yes
14779else
14780  echo "$as_me: failed program was:" >&5
14781cat "conftest.$ac_ext" >&5
14782cf_use_socks5p_h=no
14783fi
14784rm -f "conftest.$ac_objext" "conftest.$ac_ext"
14785echo "$as_me:14785: result: $cf_use_socks5p_h" >&5
14786echo "${ECHO_T}$cf_use_socks5p_h" >&6
14787
14788test "$cf_use_socks5p_h" = yes &&
14789cat >>confdefs.h <<\EOF
14790#define INCLUDE_PROTOTYPES 1
14791EOF
14792
14793else
14794
14795cf_test_netlibs=no
14796
14797echo "$as_me:14797: checking for network libraries" >&5
14798echo $ECHO_N "checking for network libraries... $ECHO_C" >&6
14799
14800if test "${cf_cv_netlibs+set}" = set; then
14801  echo $ECHO_N "(cached) $ECHO_C" >&6
14802else
14803
14804echo "$as_me:14804: result: working..." >&5
14805echo "${ECHO_T}working..." >&6
14806
14807cf_cv_netlibs=""
14808cf_test_netlibs=yes
14809
14810case "$host_os" in
14811(mingw*)
14812
14813for ac_header in windows.h winsock.h winsock2.h
14814do
14815as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
14816echo "$as_me:14816: checking for $ac_header" >&5
14817echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
14818if eval "test \"\${$as_ac_Header+set}\" = set"; then
14819  echo $ECHO_N "(cached) $ECHO_C" >&6
14820else
14821  cat >"conftest.$ac_ext" <<_ACEOF
14822#line 14822 "configure"
14823#include "confdefs.h"
14824#include <$ac_header>
14825_ACEOF
14826if { (eval echo "$as_me:14826: \"$ac_cpp "conftest.$ac_ext"\"") >&5
14827  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
14828  ac_status=$?
14829  $EGREP -v '^ *\+' conftest.er1 >conftest.err
14830  rm -f conftest.er1
14831  cat conftest.err >&5
14832  echo "$as_me:14832: \$? = $ac_status" >&5
14833  (exit "$ac_status"); } >/dev/null; then
14834  if test -s conftest.err; then
14835    ac_cpp_err=$ac_c_preproc_warn_flag
14836  else
14837    ac_cpp_err=
14838  fi
14839else
14840  ac_cpp_err=yes
14841fi
14842if test -z "$ac_cpp_err"; then
14843  eval "$as_ac_Header=yes"
14844else
14845  echo "$as_me: failed program was:" >&5
14846  cat "conftest.$ac_ext" >&5
14847  eval "$as_ac_Header=no"
14848fi
14849rm -f conftest.err "conftest.$ac_ext"
14850fi
14851echo "$as_me:14851: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
14852echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
14853if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
14854  cat >>confdefs.h <<EOF
14855#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
14856EOF
14857
14858fi
14859done
14860
14861	if test "$ac_cv_header_winsock2_h" = "yes" ; then
14862		cf_winsock_lib="-lws2_32"
14863	elif test "$ac_cv_header_winsock_h" = "yes" ; then
14864		cf_winsock_lib="-lwsock32"
14865	fi
14866
14867	cf_save_LIBS="$LIBS"
14868
14869cf_add_libs="$LIBS"
14870# reverse order
14871cf_add_0lib=
14872for cf_add_1lib in $cf_winsock_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
14873# filter duplicates
14874for cf_add_1lib in $cf_add_0lib; do
14875	for cf_add_2lib in $cf_add_libs; do
14876		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
14877			cf_add_1lib=
14878			break
14879		fi
14880	done
14881	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
14882done
14883LIBS="$cf_add_libs"
14884
14885	cat >"conftest.$ac_ext" <<_ACEOF
14886#line 14886 "configure"
14887#include "confdefs.h"
14888
14889#ifdef HAVE_WINDOWS_H
14890#undef WIN32_LEAN_AND_MEAN
14891#define WIN32_LEAN_AND_MEAN
14892#include <windows.h>
14893#ifdef HAVE_WINSOCK2_H
14894#include <winsock2.h>
14895#else
14896#ifdef HAVE_WINSOCK_H
14897#include <winsock.h>
14898#endif
14899#endif
14900#endif
14901
14902int
14903main (void)
14904{
14905
14906	char buffer[1024];
14907	gethostname(buffer, sizeof(buffer));
14908  ;
14909  return 0;
14910}
14911_ACEOF
14912rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14913if { (eval echo "$as_me:14913: \"$ac_link\"") >&5
14914  (eval $ac_link) 2>&5
14915  ac_status=$?
14916  echo "$as_me:14916: \$? = $ac_status" >&5
14917  (exit "$ac_status"); } &&
14918         { ac_try='test -s "conftest$ac_exeext"'
14919  { (eval echo "$as_me:14919: \"$ac_try\"") >&5
14920  (eval $ac_try) 2>&5
14921  ac_status=$?
14922  echo "$as_me:14922: \$? = $ac_status" >&5
14923  (exit "$ac_status"); }; }; then
14924  cf_cv_netlibs="$cf_winsock_lib $cf_cv_netlibs"
14925else
14926  echo "$as_me: failed program was:" >&5
14927cat "conftest.$ac_ext" >&5
14928{ { echo "$as_me:14928: error: Cannot link against winsock library" >&5
14929echo "$as_me: error: Cannot link against winsock library" >&2;}
14930   { (exit 1); exit 1; }; }
14931fi
14932rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14933
14934	LIBS="$cf_save_LIBS"
14935	;;
14936(*)
14937
14938for ac_func in gethostname
14939do
14940as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
14941echo "$as_me:14941: checking for $ac_func" >&5
14942echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
14943if eval "test \"\${$as_ac_var+set}\" = set"; then
14944  echo $ECHO_N "(cached) $ECHO_C" >&6
14945else
14946  cat >"conftest.$ac_ext" <<_ACEOF
14947#line 14947 "configure"
14948#include "confdefs.h"
14949#define $ac_func autoconf_temporary
14950#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
14951#undef $ac_func
14952
14953#ifdef __cplusplus
14954extern "C"
14955#endif
14956
14957/* We use char because int might match the return type of a gcc2
14958   builtin and then its argument prototype would still apply.  */
14959char $ac_func (void);
14960
14961int
14962main (void)
14963{
14964
14965/* The GNU C library defines stubs for functions which it implements
14966    to always fail with ENOSYS.  Some functions are actually named
14967    something starting with __ and the normal name is an alias.  */
14968#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
14969#error found stub for $ac_func
14970#endif
14971
14972	return $ac_func ();
14973  ;
14974  return 0;
14975}
14976_ACEOF
14977rm -f "conftest.$ac_objext" "conftest$ac_exeext"
14978if { (eval echo "$as_me:14978: \"$ac_link\"") >&5
14979  (eval $ac_link) 2>&5
14980  ac_status=$?
14981  echo "$as_me:14981: \$? = $ac_status" >&5
14982  (exit "$ac_status"); } &&
14983         { ac_try='test -s "conftest$ac_exeext"'
14984  { (eval echo "$as_me:14984: \"$ac_try\"") >&5
14985  (eval $ac_try) 2>&5
14986  ac_status=$?
14987  echo "$as_me:14987: \$? = $ac_status" >&5
14988  (exit "$ac_status"); }; }; then
14989  eval "$as_ac_var=yes"
14990else
14991  echo "$as_me: failed program was:" >&5
14992cat "conftest.$ac_ext" >&5
14993eval "$as_ac_var=no"
14994fi
14995rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
14996fi
14997echo "$as_me:14997: result: `eval echo '${'"$as_ac_var"'}'`" >&5
14998echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
14999if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15000  cat >>confdefs.h <<EOF
15001#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15002EOF
15003
15004else
15005
15006echo "$as_me:15006: checking for gethostname in -lnsl" >&5
15007echo $ECHO_N "checking for gethostname in -lnsl... $ECHO_C" >&6
15008if test "${ac_cv_lib_nsl_gethostname+set}" = set; then
15009  echo $ECHO_N "(cached) $ECHO_C" >&6
15010else
15011  ac_check_lib_save_LIBS=$LIBS
15012LIBS="-lnsl $cf_cv_netlibs $LIBS"
15013cat >"conftest.$ac_ext" <<_ACEOF
15014#line 15014 "configure"
15015#include "confdefs.h"
15016
15017/* Override any gcc2 internal prototype to avoid an error.  */
15018#ifdef __cplusplus
15019extern "C"
15020#endif
15021/* We use char because int might match the return type of a gcc2
15022   builtin and then its argument prototype would still apply.  */
15023char gethostname ();
15024int
15025main (void)
15026{
15027gethostname ();
15028  ;
15029  return 0;
15030}
15031_ACEOF
15032rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15033if { (eval echo "$as_me:15033: \"$ac_link\"") >&5
15034  (eval $ac_link) 2>&5
15035  ac_status=$?
15036  echo "$as_me:15036: \$? = $ac_status" >&5
15037  (exit "$ac_status"); } &&
15038         { ac_try='test -s "conftest$ac_exeext"'
15039  { (eval echo "$as_me:15039: \"$ac_try\"") >&5
15040  (eval $ac_try) 2>&5
15041  ac_status=$?
15042  echo "$as_me:15042: \$? = $ac_status" >&5
15043  (exit "$ac_status"); }; }; then
15044  ac_cv_lib_nsl_gethostname=yes
15045else
15046  echo "$as_me: failed program was:" >&5
15047cat "conftest.$ac_ext" >&5
15048ac_cv_lib_nsl_gethostname=no
15049fi
15050rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15051LIBS=$ac_check_lib_save_LIBS
15052fi
15053echo "$as_me:15053: result: $ac_cv_lib_nsl_gethostname" >&5
15054echo "${ECHO_T}$ac_cv_lib_nsl_gethostname" >&6
15055if test "$ac_cv_lib_nsl_gethostname" = yes; then
15056
15057cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15058
15059	cat >>confdefs.h <<EOF
15060#define HAVE_$cf_tr_func 1
15061EOF
15062
15063	ac_cv_func_gethostname=yes
15064	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
15065else
15066
15067	ac_cv_func_gethostname=unknown
15068	unset ac_cv_func_gethostname 2>/dev/null
15069
15070echo "$as_me:15070: checking for gethostname in -lsocket" >&5
15071echo $ECHO_N "checking for gethostname in -lsocket... $ECHO_C" >&6
15072if test "${ac_cv_lib_socket_gethostname+set}" = set; then
15073  echo $ECHO_N "(cached) $ECHO_C" >&6
15074else
15075  ac_check_lib_save_LIBS=$LIBS
15076LIBS="-lsocket $cf_cv_netlibs $LIBS"
15077cat >"conftest.$ac_ext" <<_ACEOF
15078#line 15078 "configure"
15079#include "confdefs.h"
15080
15081/* Override any gcc2 internal prototype to avoid an error.  */
15082#ifdef __cplusplus
15083extern "C"
15084#endif
15085/* We use char because int might match the return type of a gcc2
15086   builtin and then its argument prototype would still apply.  */
15087char gethostname ();
15088int
15089main (void)
15090{
15091gethostname ();
15092  ;
15093  return 0;
15094}
15095_ACEOF
15096rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15097if { (eval echo "$as_me:15097: \"$ac_link\"") >&5
15098  (eval $ac_link) 2>&5
15099  ac_status=$?
15100  echo "$as_me:15100: \$? = $ac_status" >&5
15101  (exit "$ac_status"); } &&
15102         { ac_try='test -s "conftest$ac_exeext"'
15103  { (eval echo "$as_me:15103: \"$ac_try\"") >&5
15104  (eval $ac_try) 2>&5
15105  ac_status=$?
15106  echo "$as_me:15106: \$? = $ac_status" >&5
15107  (exit "$ac_status"); }; }; then
15108  ac_cv_lib_socket_gethostname=yes
15109else
15110  echo "$as_me: failed program was:" >&5
15111cat "conftest.$ac_ext" >&5
15112ac_cv_lib_socket_gethostname=no
15113fi
15114rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15115LIBS=$ac_check_lib_save_LIBS
15116fi
15117echo "$as_me:15117: result: $ac_cv_lib_socket_gethostname" >&5
15118echo "${ECHO_T}$ac_cv_lib_socket_gethostname" >&6
15119if test "$ac_cv_lib_socket_gethostname" = yes; then
15120
15121cf_tr_func=`echo "gethostname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15122
15123	cat >>confdefs.h <<EOF
15124#define HAVE_$cf_tr_func 1
15125EOF
15126
15127	ac_cv_func_gethostname=yes
15128	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
15129else
15130
15131	ac_cv_func_gethostname=unknown
15132	unset ac_cv_func_gethostname 2>/dev/null
15133
15134fi
15135
15136fi
15137
15138fi
15139done
15140
15141	echo "$as_me:15141: checking for main in -linet" >&5
15142echo $ECHO_N "checking for main in -linet... $ECHO_C" >&6
15143if test "${ac_cv_lib_inet_main+set}" = set; then
15144  echo $ECHO_N "(cached) $ECHO_C" >&6
15145else
15146  ac_check_lib_save_LIBS=$LIBS
15147LIBS="-linet  $LIBS"
15148cat >"conftest.$ac_ext" <<_ACEOF
15149#line 15149 "configure"
15150#include "confdefs.h"
15151
15152int
15153main (void)
15154{
15155main ();
15156  ;
15157  return 0;
15158}
15159_ACEOF
15160rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15161if { (eval echo "$as_me:15161: \"$ac_link\"") >&5
15162  (eval $ac_link) 2>&5
15163  ac_status=$?
15164  echo "$as_me:15164: \$? = $ac_status" >&5
15165  (exit "$ac_status"); } &&
15166         { ac_try='test -s "conftest$ac_exeext"'
15167  { (eval echo "$as_me:15167: \"$ac_try\"") >&5
15168  (eval $ac_try) 2>&5
15169  ac_status=$?
15170  echo "$as_me:15170: \$? = $ac_status" >&5
15171  (exit "$ac_status"); }; }; then
15172  ac_cv_lib_inet_main=yes
15173else
15174  echo "$as_me: failed program was:" >&5
15175cat "conftest.$ac_ext" >&5
15176ac_cv_lib_inet_main=no
15177fi
15178rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15179LIBS=$ac_check_lib_save_LIBS
15180fi
15181echo "$as_me:15181: result: $ac_cv_lib_inet_main" >&5
15182echo "${ECHO_T}$ac_cv_lib_inet_main" >&6
15183if test "$ac_cv_lib_inet_main" = yes; then
15184  cf_cv_netlibs="-linet $cf_cv_netlibs"
15185fi
15186
15187	if test "$ac_cv_func_lsocket" != no ; then
15188
15189for ac_func in socket
15190do
15191as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15192echo "$as_me:15192: checking for $ac_func" >&5
15193echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15194if eval "test \"\${$as_ac_var+set}\" = set"; then
15195  echo $ECHO_N "(cached) $ECHO_C" >&6
15196else
15197  cat >"conftest.$ac_ext" <<_ACEOF
15198#line 15198 "configure"
15199#include "confdefs.h"
15200#define $ac_func autoconf_temporary
15201#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15202#undef $ac_func
15203
15204#ifdef __cplusplus
15205extern "C"
15206#endif
15207
15208/* We use char because int might match the return type of a gcc2
15209   builtin and then its argument prototype would still apply.  */
15210char $ac_func (void);
15211
15212int
15213main (void)
15214{
15215
15216/* The GNU C library defines stubs for functions which it implements
15217    to always fail with ENOSYS.  Some functions are actually named
15218    something starting with __ and the normal name is an alias.  */
15219#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15220#error found stub for $ac_func
15221#endif
15222
15223	return $ac_func ();
15224  ;
15225  return 0;
15226}
15227_ACEOF
15228rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15229if { (eval echo "$as_me:15229: \"$ac_link\"") >&5
15230  (eval $ac_link) 2>&5
15231  ac_status=$?
15232  echo "$as_me:15232: \$? = $ac_status" >&5
15233  (exit "$ac_status"); } &&
15234         { ac_try='test -s "conftest$ac_exeext"'
15235  { (eval echo "$as_me:15235: \"$ac_try\"") >&5
15236  (eval $ac_try) 2>&5
15237  ac_status=$?
15238  echo "$as_me:15238: \$? = $ac_status" >&5
15239  (exit "$ac_status"); }; }; then
15240  eval "$as_ac_var=yes"
15241else
15242  echo "$as_me: failed program was:" >&5
15243cat "conftest.$ac_ext" >&5
15244eval "$as_ac_var=no"
15245fi
15246rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15247fi
15248echo "$as_me:15248: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15249echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15250if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15251  cat >>confdefs.h <<EOF
15252#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15253EOF
15254
15255else
15256
15257echo "$as_me:15257: checking for socket in -lsocket" >&5
15258echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
15259if test "${ac_cv_lib_socket_socket+set}" = set; then
15260  echo $ECHO_N "(cached) $ECHO_C" >&6
15261else
15262  ac_check_lib_save_LIBS=$LIBS
15263LIBS="-lsocket $cf_cv_netlibs $LIBS"
15264cat >"conftest.$ac_ext" <<_ACEOF
15265#line 15265 "configure"
15266#include "confdefs.h"
15267
15268/* Override any gcc2 internal prototype to avoid an error.  */
15269#ifdef __cplusplus
15270extern "C"
15271#endif
15272/* We use char because int might match the return type of a gcc2
15273   builtin and then its argument prototype would still apply.  */
15274char socket ();
15275int
15276main (void)
15277{
15278socket ();
15279  ;
15280  return 0;
15281}
15282_ACEOF
15283rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15284if { (eval echo "$as_me:15284: \"$ac_link\"") >&5
15285  (eval $ac_link) 2>&5
15286  ac_status=$?
15287  echo "$as_me:15287: \$? = $ac_status" >&5
15288  (exit "$ac_status"); } &&
15289         { ac_try='test -s "conftest$ac_exeext"'
15290  { (eval echo "$as_me:15290: \"$ac_try\"") >&5
15291  (eval $ac_try) 2>&5
15292  ac_status=$?
15293  echo "$as_me:15293: \$? = $ac_status" >&5
15294  (exit "$ac_status"); }; }; then
15295  ac_cv_lib_socket_socket=yes
15296else
15297  echo "$as_me: failed program was:" >&5
15298cat "conftest.$ac_ext" >&5
15299ac_cv_lib_socket_socket=no
15300fi
15301rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15302LIBS=$ac_check_lib_save_LIBS
15303fi
15304echo "$as_me:15304: result: $ac_cv_lib_socket_socket" >&5
15305echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
15306if test "$ac_cv_lib_socket_socket" = yes; then
15307
15308cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15309
15310	cat >>confdefs.h <<EOF
15311#define HAVE_$cf_tr_func 1
15312EOF
15313
15314	ac_cv_func_socket=yes
15315	if test "$cf_used_lib_socket" != yes ; then cf_used_lib_socket=yes; cf_cv_netlibs="-lsocket $cf_cv_netlibs"; fi
15316else
15317
15318	ac_cv_func_socket=unknown
15319	unset ac_cv_func_socket 2>/dev/null
15320
15321echo "$as_me:15321: checking for socket in -lbsd" >&5
15322echo $ECHO_N "checking for socket in -lbsd... $ECHO_C" >&6
15323if test "${ac_cv_lib_bsd_socket+set}" = set; then
15324  echo $ECHO_N "(cached) $ECHO_C" >&6
15325else
15326  ac_check_lib_save_LIBS=$LIBS
15327LIBS="-lbsd $cf_cv_netlibs $LIBS"
15328cat >"conftest.$ac_ext" <<_ACEOF
15329#line 15329 "configure"
15330#include "confdefs.h"
15331
15332/* Override any gcc2 internal prototype to avoid an error.  */
15333#ifdef __cplusplus
15334extern "C"
15335#endif
15336/* We use char because int might match the return type of a gcc2
15337   builtin and then its argument prototype would still apply.  */
15338char socket ();
15339int
15340main (void)
15341{
15342socket ();
15343  ;
15344  return 0;
15345}
15346_ACEOF
15347rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15348if { (eval echo "$as_me:15348: \"$ac_link\"") >&5
15349  (eval $ac_link) 2>&5
15350  ac_status=$?
15351  echo "$as_me:15351: \$? = $ac_status" >&5
15352  (exit "$ac_status"); } &&
15353         { ac_try='test -s "conftest$ac_exeext"'
15354  { (eval echo "$as_me:15354: \"$ac_try\"") >&5
15355  (eval $ac_try) 2>&5
15356  ac_status=$?
15357  echo "$as_me:15357: \$? = $ac_status" >&5
15358  (exit "$ac_status"); }; }; then
15359  ac_cv_lib_bsd_socket=yes
15360else
15361  echo "$as_me: failed program was:" >&5
15362cat "conftest.$ac_ext" >&5
15363ac_cv_lib_bsd_socket=no
15364fi
15365rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15366LIBS=$ac_check_lib_save_LIBS
15367fi
15368echo "$as_me:15368: result: $ac_cv_lib_bsd_socket" >&5
15369echo "${ECHO_T}$ac_cv_lib_bsd_socket" >&6
15370if test "$ac_cv_lib_bsd_socket" = yes; then
15371
15372cf_tr_func=`echo "socket" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15373
15374	cat >>confdefs.h <<EOF
15375#define HAVE_$cf_tr_func 1
15376EOF
15377
15378	ac_cv_func_socket=yes
15379	if test "$cf_used_lib_bsd" != yes ; then cf_used_lib_bsd=yes; cf_cv_netlibs="-lbsd $cf_cv_netlibs"; fi
15380else
15381
15382	ac_cv_func_socket=unknown
15383	unset ac_cv_func_socket 2>/dev/null
15384
15385fi
15386
15387fi
15388
15389fi
15390done
15391
15392	fi
15393
15394for ac_func in gethostbyname
15395do
15396as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15397echo "$as_me:15397: checking for $ac_func" >&5
15398echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15399if eval "test \"\${$as_ac_var+set}\" = set"; then
15400  echo $ECHO_N "(cached) $ECHO_C" >&6
15401else
15402  cat >"conftest.$ac_ext" <<_ACEOF
15403#line 15403 "configure"
15404#include "confdefs.h"
15405#define $ac_func autoconf_temporary
15406#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15407#undef $ac_func
15408
15409#ifdef __cplusplus
15410extern "C"
15411#endif
15412
15413/* We use char because int might match the return type of a gcc2
15414   builtin and then its argument prototype would still apply.  */
15415char $ac_func (void);
15416
15417int
15418main (void)
15419{
15420
15421/* The GNU C library defines stubs for functions which it implements
15422    to always fail with ENOSYS.  Some functions are actually named
15423    something starting with __ and the normal name is an alias.  */
15424#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15425#error found stub for $ac_func
15426#endif
15427
15428	return $ac_func ();
15429  ;
15430  return 0;
15431}
15432_ACEOF
15433rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15434if { (eval echo "$as_me:15434: \"$ac_link\"") >&5
15435  (eval $ac_link) 2>&5
15436  ac_status=$?
15437  echo "$as_me:15437: \$? = $ac_status" >&5
15438  (exit "$ac_status"); } &&
15439         { ac_try='test -s "conftest$ac_exeext"'
15440  { (eval echo "$as_me:15440: \"$ac_try\"") >&5
15441  (eval $ac_try) 2>&5
15442  ac_status=$?
15443  echo "$as_me:15443: \$? = $ac_status" >&5
15444  (exit "$ac_status"); }; }; then
15445  eval "$as_ac_var=yes"
15446else
15447  echo "$as_me: failed program was:" >&5
15448cat "conftest.$ac_ext" >&5
15449eval "$as_ac_var=no"
15450fi
15451rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15452fi
15453echo "$as_me:15453: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15454echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15455if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15456  cat >>confdefs.h <<EOF
15457#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15458EOF
15459
15460else
15461
15462echo "$as_me:15462: checking for gethostbyname in -lnsl" >&5
15463echo $ECHO_N "checking for gethostbyname in -lnsl... $ECHO_C" >&6
15464if test "${ac_cv_lib_nsl_gethostbyname+set}" = set; then
15465  echo $ECHO_N "(cached) $ECHO_C" >&6
15466else
15467  ac_check_lib_save_LIBS=$LIBS
15468LIBS="-lnsl $cf_cv_netlibs $LIBS"
15469cat >"conftest.$ac_ext" <<_ACEOF
15470#line 15470 "configure"
15471#include "confdefs.h"
15472
15473/* Override any gcc2 internal prototype to avoid an error.  */
15474#ifdef __cplusplus
15475extern "C"
15476#endif
15477/* We use char because int might match the return type of a gcc2
15478   builtin and then its argument prototype would still apply.  */
15479char gethostbyname ();
15480int
15481main (void)
15482{
15483gethostbyname ();
15484  ;
15485  return 0;
15486}
15487_ACEOF
15488rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15489if { (eval echo "$as_me:15489: \"$ac_link\"") >&5
15490  (eval $ac_link) 2>&5
15491  ac_status=$?
15492  echo "$as_me:15492: \$? = $ac_status" >&5
15493  (exit "$ac_status"); } &&
15494         { ac_try='test -s "conftest$ac_exeext"'
15495  { (eval echo "$as_me:15495: \"$ac_try\"") >&5
15496  (eval $ac_try) 2>&5
15497  ac_status=$?
15498  echo "$as_me:15498: \$? = $ac_status" >&5
15499  (exit "$ac_status"); }; }; then
15500  ac_cv_lib_nsl_gethostbyname=yes
15501else
15502  echo "$as_me: failed program was:" >&5
15503cat "conftest.$ac_ext" >&5
15504ac_cv_lib_nsl_gethostbyname=no
15505fi
15506rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15507LIBS=$ac_check_lib_save_LIBS
15508fi
15509echo "$as_me:15509: result: $ac_cv_lib_nsl_gethostbyname" >&5
15510echo "${ECHO_T}$ac_cv_lib_nsl_gethostbyname" >&6
15511if test "$ac_cv_lib_nsl_gethostbyname" = yes; then
15512
15513cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15514
15515	cat >>confdefs.h <<EOF
15516#define HAVE_$cf_tr_func 1
15517EOF
15518
15519	ac_cv_func_gethostbyname=yes
15520	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
15521else
15522
15523	ac_cv_func_gethostbyname=unknown
15524	unset ac_cv_func_gethostbyname 2>/dev/null
15525
15526fi
15527
15528fi
15529done
15530
15531for ac_func in inet_ntoa
15532do
15533as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15534echo "$as_me:15534: checking for $ac_func" >&5
15535echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15536if eval "test \"\${$as_ac_var+set}\" = set"; then
15537  echo $ECHO_N "(cached) $ECHO_C" >&6
15538else
15539  cat >"conftest.$ac_ext" <<_ACEOF
15540#line 15540 "configure"
15541#include "confdefs.h"
15542#define $ac_func autoconf_temporary
15543#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15544#undef $ac_func
15545
15546#ifdef __cplusplus
15547extern "C"
15548#endif
15549
15550/* We use char because int might match the return type of a gcc2
15551   builtin and then its argument prototype would still apply.  */
15552char $ac_func (void);
15553
15554int
15555main (void)
15556{
15557
15558/* The GNU C library defines stubs for functions which it implements
15559    to always fail with ENOSYS.  Some functions are actually named
15560    something starting with __ and the normal name is an alias.  */
15561#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15562#error found stub for $ac_func
15563#endif
15564
15565	return $ac_func ();
15566  ;
15567  return 0;
15568}
15569_ACEOF
15570rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15571if { (eval echo "$as_me:15571: \"$ac_link\"") >&5
15572  (eval $ac_link) 2>&5
15573  ac_status=$?
15574  echo "$as_me:15574: \$? = $ac_status" >&5
15575  (exit "$ac_status"); } &&
15576         { ac_try='test -s "conftest$ac_exeext"'
15577  { (eval echo "$as_me:15577: \"$ac_try\"") >&5
15578  (eval $ac_try) 2>&5
15579  ac_status=$?
15580  echo "$as_me:15580: \$? = $ac_status" >&5
15581  (exit "$ac_status"); }; }; then
15582  eval "$as_ac_var=yes"
15583else
15584  echo "$as_me: failed program was:" >&5
15585cat "conftest.$ac_ext" >&5
15586eval "$as_ac_var=no"
15587fi
15588rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15589fi
15590echo "$as_me:15590: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15591echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15592if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15593  cat >>confdefs.h <<EOF
15594#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15595EOF
15596
15597else
15598
15599echo "$as_me:15599: checking for inet_ntoa in -lnsl" >&5
15600echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
15601if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
15602  echo $ECHO_N "(cached) $ECHO_C" >&6
15603else
15604  ac_check_lib_save_LIBS=$LIBS
15605LIBS="-lnsl $cf_cv_netlibs $LIBS"
15606cat >"conftest.$ac_ext" <<_ACEOF
15607#line 15607 "configure"
15608#include "confdefs.h"
15609
15610/* Override any gcc2 internal prototype to avoid an error.  */
15611#ifdef __cplusplus
15612extern "C"
15613#endif
15614/* We use char because int might match the return type of a gcc2
15615   builtin and then its argument prototype would still apply.  */
15616char inet_ntoa ();
15617int
15618main (void)
15619{
15620inet_ntoa ();
15621  ;
15622  return 0;
15623}
15624_ACEOF
15625rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15626if { (eval echo "$as_me:15626: \"$ac_link\"") >&5
15627  (eval $ac_link) 2>&5
15628  ac_status=$?
15629  echo "$as_me:15629: \$? = $ac_status" >&5
15630  (exit "$ac_status"); } &&
15631         { ac_try='test -s "conftest$ac_exeext"'
15632  { (eval echo "$as_me:15632: \"$ac_try\"") >&5
15633  (eval $ac_try) 2>&5
15634  ac_status=$?
15635  echo "$as_me:15635: \$? = $ac_status" >&5
15636  (exit "$ac_status"); }; }; then
15637  ac_cv_lib_nsl_inet_ntoa=yes
15638else
15639  echo "$as_me: failed program was:" >&5
15640cat "conftest.$ac_ext" >&5
15641ac_cv_lib_nsl_inet_ntoa=no
15642fi
15643rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15644LIBS=$ac_check_lib_save_LIBS
15645fi
15646echo "$as_me:15646: result: $ac_cv_lib_nsl_inet_ntoa" >&5
15647echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
15648if test "$ac_cv_lib_nsl_inet_ntoa" = yes; then
15649
15650cf_tr_func=`echo "inet_ntoa" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15651
15652	cat >>confdefs.h <<EOF
15653#define HAVE_$cf_tr_func 1
15654EOF
15655
15656	ac_cv_func_inet_ntoa=yes
15657	if test "$cf_used_lib_nsl" != yes ; then cf_used_lib_nsl=yes; cf_cv_netlibs="-lnsl $cf_cv_netlibs"; fi
15658else
15659
15660	ac_cv_func_inet_ntoa=unknown
15661	unset ac_cv_func_inet_ntoa 2>/dev/null
15662
15663fi
15664
15665fi
15666done
15667
15668for ac_func in gethostbyname
15669do
15670as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15671echo "$as_me:15671: checking for $ac_func" >&5
15672echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15673if eval "test \"\${$as_ac_var+set}\" = set"; then
15674  echo $ECHO_N "(cached) $ECHO_C" >&6
15675else
15676  cat >"conftest.$ac_ext" <<_ACEOF
15677#line 15677 "configure"
15678#include "confdefs.h"
15679#define $ac_func autoconf_temporary
15680#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15681#undef $ac_func
15682
15683#ifdef __cplusplus
15684extern "C"
15685#endif
15686
15687/* We use char because int might match the return type of a gcc2
15688   builtin and then its argument prototype would still apply.  */
15689char $ac_func (void);
15690
15691int
15692main (void)
15693{
15694
15695/* The GNU C library defines stubs for functions which it implements
15696    to always fail with ENOSYS.  Some functions are actually named
15697    something starting with __ and the normal name is an alias.  */
15698#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15699#error found stub for $ac_func
15700#endif
15701
15702	return $ac_func ();
15703  ;
15704  return 0;
15705}
15706_ACEOF
15707rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15708if { (eval echo "$as_me:15708: \"$ac_link\"") >&5
15709  (eval $ac_link) 2>&5
15710  ac_status=$?
15711  echo "$as_me:15711: \$? = $ac_status" >&5
15712  (exit "$ac_status"); } &&
15713         { ac_try='test -s "conftest$ac_exeext"'
15714  { (eval echo "$as_me:15714: \"$ac_try\"") >&5
15715  (eval $ac_try) 2>&5
15716  ac_status=$?
15717  echo "$as_me:15717: \$? = $ac_status" >&5
15718  (exit "$ac_status"); }; }; then
15719  eval "$as_ac_var=yes"
15720else
15721  echo "$as_me: failed program was:" >&5
15722cat "conftest.$ac_ext" >&5
15723eval "$as_ac_var=no"
15724fi
15725rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15726fi
15727echo "$as_me:15727: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15728echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15729if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15730  cat >>confdefs.h <<EOF
15731#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15732EOF
15733
15734else
15735
15736echo "$as_me:15736: checking for gethostbyname in -lnetwork" >&5
15737echo $ECHO_N "checking for gethostbyname in -lnetwork... $ECHO_C" >&6
15738if test "${ac_cv_lib_network_gethostbyname+set}" = set; then
15739  echo $ECHO_N "(cached) $ECHO_C" >&6
15740else
15741  ac_check_lib_save_LIBS=$LIBS
15742LIBS="-lnetwork $cf_cv_netlibs $LIBS"
15743cat >"conftest.$ac_ext" <<_ACEOF
15744#line 15744 "configure"
15745#include "confdefs.h"
15746
15747/* Override any gcc2 internal prototype to avoid an error.  */
15748#ifdef __cplusplus
15749extern "C"
15750#endif
15751/* We use char because int might match the return type of a gcc2
15752   builtin and then its argument prototype would still apply.  */
15753char gethostbyname ();
15754int
15755main (void)
15756{
15757gethostbyname ();
15758  ;
15759  return 0;
15760}
15761_ACEOF
15762rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15763if { (eval echo "$as_me:15763: \"$ac_link\"") >&5
15764  (eval $ac_link) 2>&5
15765  ac_status=$?
15766  echo "$as_me:15766: \$? = $ac_status" >&5
15767  (exit "$ac_status"); } &&
15768         { ac_try='test -s "conftest$ac_exeext"'
15769  { (eval echo "$as_me:15769: \"$ac_try\"") >&5
15770  (eval $ac_try) 2>&5
15771  ac_status=$?
15772  echo "$as_me:15772: \$? = $ac_status" >&5
15773  (exit "$ac_status"); }; }; then
15774  ac_cv_lib_network_gethostbyname=yes
15775else
15776  echo "$as_me: failed program was:" >&5
15777cat "conftest.$ac_ext" >&5
15778ac_cv_lib_network_gethostbyname=no
15779fi
15780rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15781LIBS=$ac_check_lib_save_LIBS
15782fi
15783echo "$as_me:15783: result: $ac_cv_lib_network_gethostbyname" >&5
15784echo "${ECHO_T}$ac_cv_lib_network_gethostbyname" >&6
15785if test "$ac_cv_lib_network_gethostbyname" = yes; then
15786
15787cf_tr_func=`echo "gethostbyname" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15788
15789	cat >>confdefs.h <<EOF
15790#define HAVE_$cf_tr_func 1
15791EOF
15792
15793	ac_cv_func_gethostbyname=yes
15794	if test "$cf_used_lib_network" != yes ; then cf_used_lib_network=yes; cf_cv_netlibs="-lnetwork $cf_cv_netlibs"; fi
15795else
15796
15797	ac_cv_func_gethostbyname=unknown
15798	unset ac_cv_func_gethostbyname 2>/dev/null
15799
15800fi
15801
15802fi
15803done
15804
15805for ac_func in strcasecmp
15806do
15807as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
15808echo "$as_me:15808: checking for $ac_func" >&5
15809echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
15810if eval "test \"\${$as_ac_var+set}\" = set"; then
15811  echo $ECHO_N "(cached) $ECHO_C" >&6
15812else
15813  cat >"conftest.$ac_ext" <<_ACEOF
15814#line 15814 "configure"
15815#include "confdefs.h"
15816#define $ac_func autoconf_temporary
15817#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
15818#undef $ac_func
15819
15820#ifdef __cplusplus
15821extern "C"
15822#endif
15823
15824/* We use char because int might match the return type of a gcc2
15825   builtin and then its argument prototype would still apply.  */
15826char $ac_func (void);
15827
15828int
15829main (void)
15830{
15831
15832/* The GNU C library defines stubs for functions which it implements
15833    to always fail with ENOSYS.  Some functions are actually named
15834    something starting with __ and the normal name is an alias.  */
15835#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
15836#error found stub for $ac_func
15837#endif
15838
15839	return $ac_func ();
15840  ;
15841  return 0;
15842}
15843_ACEOF
15844rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15845if { (eval echo "$as_me:15845: \"$ac_link\"") >&5
15846  (eval $ac_link) 2>&5
15847  ac_status=$?
15848  echo "$as_me:15848: \$? = $ac_status" >&5
15849  (exit "$ac_status"); } &&
15850         { ac_try='test -s "conftest$ac_exeext"'
15851  { (eval echo "$as_me:15851: \"$ac_try\"") >&5
15852  (eval $ac_try) 2>&5
15853  ac_status=$?
15854  echo "$as_me:15854: \$? = $ac_status" >&5
15855  (exit "$ac_status"); }; }; then
15856  eval "$as_ac_var=yes"
15857else
15858  echo "$as_me: failed program was:" >&5
15859cat "conftest.$ac_ext" >&5
15860eval "$as_ac_var=no"
15861fi
15862rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15863fi
15864echo "$as_me:15864: result: `eval echo '${'"$as_ac_var"'}'`" >&5
15865echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
15866if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
15867  cat >>confdefs.h <<EOF
15868#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
15869EOF
15870
15871else
15872
15873echo "$as_me:15873: checking for strcasecmp in -lresolv" >&5
15874echo $ECHO_N "checking for strcasecmp in -lresolv... $ECHO_C" >&6
15875if test "${ac_cv_lib_resolv_strcasecmp+set}" = set; then
15876  echo $ECHO_N "(cached) $ECHO_C" >&6
15877else
15878  ac_check_lib_save_LIBS=$LIBS
15879LIBS="-lresolv $cf_cv_netlibs $LIBS"
15880cat >"conftest.$ac_ext" <<_ACEOF
15881#line 15881 "configure"
15882#include "confdefs.h"
15883
15884/* Override any gcc2 internal prototype to avoid an error.  */
15885#ifdef __cplusplus
15886extern "C"
15887#endif
15888/* We use char because int might match the return type of a gcc2
15889   builtin and then its argument prototype would still apply.  */
15890char strcasecmp ();
15891int
15892main (void)
15893{
15894strcasecmp ();
15895  ;
15896  return 0;
15897}
15898_ACEOF
15899rm -f "conftest.$ac_objext" "conftest$ac_exeext"
15900if { (eval echo "$as_me:15900: \"$ac_link\"") >&5
15901  (eval $ac_link) 2>&5
15902  ac_status=$?
15903  echo "$as_me:15903: \$? = $ac_status" >&5
15904  (exit "$ac_status"); } &&
15905         { ac_try='test -s "conftest$ac_exeext"'
15906  { (eval echo "$as_me:15906: \"$ac_try\"") >&5
15907  (eval $ac_try) 2>&5
15908  ac_status=$?
15909  echo "$as_me:15909: \$? = $ac_status" >&5
15910  (exit "$ac_status"); }; }; then
15911  ac_cv_lib_resolv_strcasecmp=yes
15912else
15913  echo "$as_me: failed program was:" >&5
15914cat "conftest.$ac_ext" >&5
15915ac_cv_lib_resolv_strcasecmp=no
15916fi
15917rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
15918LIBS=$ac_check_lib_save_LIBS
15919fi
15920echo "$as_me:15920: result: $ac_cv_lib_resolv_strcasecmp" >&5
15921echo "${ECHO_T}$ac_cv_lib_resolv_strcasecmp" >&6
15922if test "$ac_cv_lib_resolv_strcasecmp" = yes; then
15923
15924cf_tr_func=`echo "strcasecmp" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
15925
15926	cat >>confdefs.h <<EOF
15927#define HAVE_$cf_tr_func 1
15928EOF
15929
15930	ac_cv_func_strcasecmp=yes
15931	if test "$cf_used_lib_resolv" != yes ; then cf_used_lib_resolv=yes; cf_cv_netlibs="-lresolv $cf_cv_netlibs"; fi
15932else
15933
15934	ac_cv_func_strcasecmp=unknown
15935	unset ac_cv_func_strcasecmp 2>/dev/null
15936
15937fi
15938
15939fi
15940done
15941
15942	;;
15943esac
15944
15945fi
15946
15947case "$cf_cv_netlibs" in
15948(*ws2_32*)
15949
15950cat >>confdefs.h <<\EOF
15951#define USE_WINSOCK2_H 1
15952EOF
15953
15954	;;
15955esac
15956
15957cf_add_libs="$LIBS"
15958# reverse order
15959cf_add_0lib=
15960for cf_add_1lib in $cf_cv_netlibs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
15961# filter duplicates
15962for cf_add_1lib in $cf_add_0lib; do
15963	for cf_add_2lib in $cf_add_libs; do
15964		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
15965			cf_add_1lib=
15966			break
15967		fi
15968	done
15969	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
15970done
15971LIBS="$cf_add_libs"
15972
15973test "$cf_test_netlibs" = no && echo "$cf_cv_netlibs" >&6
15974
15975fi
15976
15977echo "$as_me:15977: checking for inet_aton function" >&5
15978echo $ECHO_N "checking for inet_aton function... $ECHO_C" >&6
15979if test "${cf_cv_have_inet_aton+set}" = set; then
15980  echo $ECHO_N "(cached) $ECHO_C" >&6
15981else
15982
15983cat >"conftest.$ac_ext" <<_ACEOF
15984#line 15984 "configure"
15985#include "confdefs.h"
15986
15987#if defined(__MINGW32__)
15988
15989#undef WIN32_LEAN_AND_MEAN
15990#define WIN32_LEAN_AND_MEAN
15991#include <windows.h>
15992
15993#ifdef HAVE_WINSOCK2_H
15994#include <winsock2.h>
15995#else
15996#ifdef HAVE_WINSOCK_H
15997#include <winsock.h>
15998#endif
15999#endif
16000
16001#else
16002
16003#include <sys/types.h>
16004#include <sys/socket.h>
16005#include <netinet/in.h>
16006#include <arpa/inet.h>
16007
16008#endif
16009
16010int
16011main (void)
16012{
16013inet_aton(0, (struct in_addr *)0)
16014  ;
16015  return 0;
16016}
16017_ACEOF
16018rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16019if { (eval echo "$as_me:16019: \"$ac_link\"") >&5
16020  (eval $ac_link) 2>&5
16021  ac_status=$?
16022  echo "$as_me:16022: \$? = $ac_status" >&5
16023  (exit "$ac_status"); } &&
16024         { ac_try='test -s "conftest$ac_exeext"'
16025  { (eval echo "$as_me:16025: \"$ac_try\"") >&5
16026  (eval $ac_try) 2>&5
16027  ac_status=$?
16028  echo "$as_me:16028: \$? = $ac_status" >&5
16029  (exit "$ac_status"); }; }; then
16030  cf_cv_have_inet_aton=yes
16031else
16032  echo "$as_me: failed program was:" >&5
16033cat "conftest.$ac_ext" >&5
16034cf_cv_have_inet_aton=no
16035fi
16036rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16037fi
16038echo "$as_me:16038: result: $cf_cv_have_inet_aton" >&5
16039echo "${ECHO_T}$cf_cv_have_inet_aton" >&6
16040if test "$cf_cv_have_inet_aton" = yes ; then
16041
16042cat >>confdefs.h <<\EOF
16043#define HAVE_INET_ATON 1
16044EOF
16045
16046else
16047    echo "$as_me:16047: checking for inet_addr function" >&5
16048echo $ECHO_N "checking for inet_addr function... $ECHO_C" >&6
16049if test "${cf_cv_have_inet_addr+set}" = set; then
16050  echo $ECHO_N "(cached) $ECHO_C" >&6
16051else
16052
16053    cat >"conftest.$ac_ext" <<_ACEOF
16054#line 16054 "configure"
16055#include "confdefs.h"
16056
16057#if defined(__MINGW32__)
16058
16059#undef WIN32_LEAN_AND_MEAN
16060#define WIN32_LEAN_AND_MEAN
16061#include <windows.h>
16062
16063#ifdef HAVE_WINSOCK2_H
16064#include <winsock2.h>
16065#else
16066#ifdef HAVE_WINSOCK_H
16067#include <winsock.h>
16068#endif
16069#endif
16070
16071#else
16072
16073#include <sys/types.h>
16074#include <sys/socket.h>
16075#include <netinet/in.h>
16076#include <arpa/inet.h>
16077
16078#endif
16079
16080int
16081main (void)
16082{
16083inet_addr(0)
16084  ;
16085  return 0;
16086}
16087_ACEOF
16088rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16089if { (eval echo "$as_me:16089: \"$ac_link\"") >&5
16090  (eval $ac_link) 2>&5
16091  ac_status=$?
16092  echo "$as_me:16092: \$? = $ac_status" >&5
16093  (exit "$ac_status"); } &&
16094         { ac_try='test -s "conftest$ac_exeext"'
16095  { (eval echo "$as_me:16095: \"$ac_try\"") >&5
16096  (eval $ac_try) 2>&5
16097  ac_status=$?
16098  echo "$as_me:16098: \$? = $ac_status" >&5
16099  (exit "$ac_status"); }; }; then
16100  cf_cv_have_inet_addr=yes
16101else
16102  echo "$as_me: failed program was:" >&5
16103cat "conftest.$ac_ext" >&5
16104cf_cv_have_inet_addr=no
16105fi
16106rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16107fi
16108echo "$as_me:16108: result: $cf_cv_have_inet_addr" >&5
16109echo "${ECHO_T}$cf_cv_have_inet_addr" >&6
16110    if test "$cf_cv_have_inet_addr" = no ; then
16111	echo "$as_me:16111: checking for library with inet_addr" >&5
16112echo $ECHO_N "checking for library with inet_addr... $ECHO_C" >&6
16113if test "${cf_cv_lib_inet_addr+set}" = set; then
16114  echo $ECHO_N "(cached) $ECHO_C" >&6
16115else
16116
16117	    cf_save_LIBS="$LIBS"
16118	    for cf_inetlib in -lbind -lresolv
16119	    do
16120		LIBS="$cf_save_LIBS $cf_inetlib"
16121		cat >"conftest.$ac_ext" <<_ACEOF
16122#line 16122 "configure"
16123#include "confdefs.h"
16124#include <sys/types.h>
16125#include <sys/socket.h>
16126#include <netinet/in.h>
16127#include <arpa/inet.h>
16128
16129int
16130main (void)
16131{
16132inet_addr(0)
16133  ;
16134  return 0;
16135}
16136_ACEOF
16137rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16138if { (eval echo "$as_me:16138: \"$ac_link\"") >&5
16139  (eval $ac_link) 2>&5
16140  ac_status=$?
16141  echo "$as_me:16141: \$? = $ac_status" >&5
16142  (exit "$ac_status"); } &&
16143         { ac_try='test -s "conftest$ac_exeext"'
16144  { (eval echo "$as_me:16144: \"$ac_try\"") >&5
16145  (eval $ac_try) 2>&5
16146  ac_status=$?
16147  echo "$as_me:16147: \$? = $ac_status" >&5
16148  (exit "$ac_status"); }; }; then
16149  cf_cv_lib_inet_addr=$cf_inetlib
16150else
16151  echo "$as_me: failed program was:" >&5
16152cat "conftest.$ac_ext" >&5
16153cf_cv_lib_inet_addr=no
16154fi
16155rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16156		LIBS="$cf_save_LIBS"
16157		test "$cf_cv_lib_inet_addr" != no && break
16158	    done
16159
16160fi
16161echo "$as_me:16161: result: $cf_cv_lib_inet_addr" >&5
16162echo "${ECHO_T}$cf_cv_lib_inet_addr" >&6
16163	if test "$cf_cv_lib_inet_addr" != no ; then
16164
16165cf_add_libs="$LIBS"
16166# reverse order
16167cf_add_0lib=
16168for cf_add_1lib in $cf_cv_lib_inet_addr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16169# filter duplicates
16170for cf_add_1lib in $cf_add_0lib; do
16171	for cf_add_2lib in $cf_add_libs; do
16172		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16173			cf_add_1lib=
16174			break
16175		fi
16176	done
16177	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16178done
16179LIBS="$cf_add_libs"
16180
16181	else
16182	    { echo "$as_me:16182: WARNING: Unable to find library for inet_addr function" >&5
16183echo "$as_me: WARNING: Unable to find library for inet_addr function" >&2;}
16184	fi
16185    fi
16186fi
16187
16188echo "$as_me:16188: checking if you want to use pkg-config" >&5
16189echo $ECHO_N "checking if you want to use pkg-config... $ECHO_C" >&6
16190
16191# Check whether --with-pkg-config or --without-pkg-config was given.
16192if test "${with_pkg_config+set}" = set; then
16193  withval="$with_pkg_config"
16194  cf_pkg_config=$withval
16195else
16196  cf_pkg_config=yes
16197fi;
16198echo "$as_me:16198: result: $cf_pkg_config" >&5
16199echo "${ECHO_T}$cf_pkg_config" >&6
16200
16201case "$cf_pkg_config" in
16202(no)
16203	PKG_CONFIG=none
16204	;;
16205(yes)
16206
16207if test -n "$ac_tool_prefix"; then
16208  # Extract the first word of "${ac_tool_prefix}pkg-config", so it can be a program name with args.
16209set dummy ${ac_tool_prefix}pkg-config; ac_word=$2
16210echo "$as_me:16210: checking for $ac_word" >&5
16211echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16212if test "${ac_cv_path_PKG_CONFIG+set}" = set; then
16213  echo $ECHO_N "(cached) $ECHO_C" >&6
16214else
16215  case $PKG_CONFIG in
16216  [\\/]* | ?:[\\/]*)
16217  ac_cv_path_PKG_CONFIG="$PKG_CONFIG" # Let the user override the test with a path.
16218  ;;
16219  *)
16220  ac_save_IFS=$IFS; IFS=$ac_path_separator
16221ac_dummy="$PATH"
16222for ac_dir in $ac_dummy; do
16223  IFS=$ac_save_IFS
16224  test -z "$ac_dir" && ac_dir=.
16225  if $as_executable_p "$ac_dir/$ac_word"; then
16226   ac_cv_path_PKG_CONFIG="$ac_dir/$ac_word"
16227   echo "$as_me:16227: found $ac_dir/$ac_word" >&5
16228   break
16229fi
16230done
16231
16232  ;;
16233esac
16234fi
16235PKG_CONFIG=$ac_cv_path_PKG_CONFIG
16236
16237if test -n "$PKG_CONFIG"; then
16238  echo "$as_me:16238: result: $PKG_CONFIG" >&5
16239echo "${ECHO_T}$PKG_CONFIG" >&6
16240else
16241  echo "$as_me:16241: result: no" >&5
16242echo "${ECHO_T}no" >&6
16243fi
16244
16245fi
16246if test -z "$ac_cv_path_PKG_CONFIG"; then
16247  ac_pt_PKG_CONFIG=$PKG_CONFIG
16248  # Extract the first word of "pkg-config", so it can be a program name with args.
16249set dummy pkg-config; ac_word=$2
16250echo "$as_me:16250: checking for $ac_word" >&5
16251echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
16252if test "${ac_cv_path_ac_pt_PKG_CONFIG+set}" = set; then
16253  echo $ECHO_N "(cached) $ECHO_C" >&6
16254else
16255  case $ac_pt_PKG_CONFIG in
16256  [\\/]* | ?:[\\/]*)
16257  ac_cv_path_ac_pt_PKG_CONFIG="$ac_pt_PKG_CONFIG" # Let the user override the test with a path.
16258  ;;
16259  *)
16260  ac_save_IFS=$IFS; IFS=$ac_path_separator
16261ac_dummy="$PATH"
16262for ac_dir in $ac_dummy; do
16263  IFS=$ac_save_IFS
16264  test -z "$ac_dir" && ac_dir=.
16265  if $as_executable_p "$ac_dir/$ac_word"; then
16266   ac_cv_path_ac_pt_PKG_CONFIG="$ac_dir/$ac_word"
16267   echo "$as_me:16267: found $ac_dir/$ac_word" >&5
16268   break
16269fi
16270done
16271
16272  test -z "$ac_cv_path_ac_pt_PKG_CONFIG" && ac_cv_path_ac_pt_PKG_CONFIG="none"
16273  ;;
16274esac
16275fi
16276ac_pt_PKG_CONFIG=$ac_cv_path_ac_pt_PKG_CONFIG
16277
16278if test -n "$ac_pt_PKG_CONFIG"; then
16279  echo "$as_me:16279: result: $ac_pt_PKG_CONFIG" >&5
16280echo "${ECHO_T}$ac_pt_PKG_CONFIG" >&6
16281else
16282  echo "$as_me:16282: result: no" >&5
16283echo "${ECHO_T}no" >&6
16284fi
16285
16286  PKG_CONFIG=$ac_pt_PKG_CONFIG
16287else
16288  PKG_CONFIG="$ac_cv_path_PKG_CONFIG"
16289fi
16290
16291	;;
16292(*)
16293	PKG_CONFIG=$withval
16294	;;
16295esac
16296
16297test -z "$PKG_CONFIG" && PKG_CONFIG=none
16298if test "$PKG_CONFIG" != none ; then
16299
16300if test "x$prefix" != xNONE; then
16301	cf_path_syntax="$prefix"
16302else
16303	cf_path_syntax="$ac_default_prefix"
16304fi
16305
16306case ".$PKG_CONFIG" in
16307(.\$\(*\)*|.\'*\'*)
16308	;;
16309(..|./*|.\\*)
16310	;;
16311(.[a-zA-Z]:[\\/]*) # OS/2 EMX
16312	;;
16313(.\$\{*prefix\}*|.\$\{*dir\}*)
16314	eval PKG_CONFIG="$PKG_CONFIG"
16315	case ".$PKG_CONFIG" in
16316	(.NONE/*)
16317		PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
16318		;;
16319	esac
16320	;;
16321(.no|.NONE/*)
16322	PKG_CONFIG=`echo "$PKG_CONFIG" | sed -e s%NONE%$cf_path_syntax%`
16323	;;
16324(*)
16325	{ { echo "$as_me:16325: error: expected a pathname, not \"$PKG_CONFIG\"" >&5
16326echo "$as_me: error: expected a pathname, not \"$PKG_CONFIG\"" >&2;}
16327   { (exit 1); exit 1; }; }
16328	;;
16329esac
16330
16331elif test "x$cf_pkg_config" != xno ; then
16332	{ echo "$as_me:16332: WARNING: pkg-config is not installed" >&5
16333echo "$as_me: WARNING: pkg-config is not installed" >&2;}
16334fi
16335
16336if test "x$cf_cv_use_libssl"  != xno ; then
16337
16338	cf_cv_have_ssl=no
16339	cf_cv_pkg_config_ssl=no
16340
16341	# command-line option, etc., override default behavior
16342
16343case "$cf_cv_use_libssl" in
16344(no)
16345	;;
16346(yes)
16347	;;
16348(*)
16349
16350for cf_searchpath in `echo "$cf_cv_use_libssl" | tr $PATH_SEPARATOR ' '`; do
16351	if test -d "$cf_searchpath/include" ; then
16352
16353if test -n "$cf_searchpath/include" ; then
16354  for cf_add_incdir in $cf_searchpath/include
16355  do
16356	while test "$cf_add_incdir" != /usr/include
16357	do
16358	  if test -d "$cf_add_incdir"
16359	  then
16360		cf_have_incdir=no
16361		if test -n "$CFLAGS$CPPFLAGS" ; then
16362		  # a loop is needed to ensure we can add subdirs of existing dirs
16363		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16364			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16365			  cf_have_incdir=yes; break
16366			fi
16367		  done
16368		fi
16369
16370		if test "$cf_have_incdir" = no ; then
16371		  if test "$cf_add_incdir" = /usr/local/include ; then
16372			if test "$GCC" = yes
16373			then
16374			  cf_save_CPPFLAGS=$CPPFLAGS
16375
16376	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16377	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16378
16379			  cat >"conftest.$ac_ext" <<_ACEOF
16380#line 16380 "configure"
16381#include "confdefs.h"
16382#include <stdio.h>
16383int
16384main (void)
16385{
16386printf("Hello")
16387  ;
16388  return 0;
16389}
16390_ACEOF
16391rm -f "conftest.$ac_objext"
16392if { (eval echo "$as_me:16392: \"$ac_compile\"") >&5
16393  (eval $ac_compile) 2>&5
16394  ac_status=$?
16395  echo "$as_me:16395: \$? = $ac_status" >&5
16396  (exit "$ac_status"); } &&
16397         { ac_try='test -s "conftest.$ac_objext"'
16398  { (eval echo "$as_me:16398: \"$ac_try\"") >&5
16399  (eval $ac_try) 2>&5
16400  ac_status=$?
16401  echo "$as_me:16401: \$? = $ac_status" >&5
16402  (exit "$ac_status"); }; }; then
16403  :
16404else
16405  echo "$as_me: failed program was:" >&5
16406cat "conftest.$ac_ext" >&5
16407cf_have_incdir=yes
16408fi
16409rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16410			  CPPFLAGS=$cf_save_CPPFLAGS
16411			fi
16412		  fi
16413		fi
16414
16415		if test "$cf_have_incdir" = no ; then
16416		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16417
16418echo "${as_me:-configure}:16418: testing adding $cf_add_incdir to include-path ..." 1>&5
16419
16420		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16421
16422		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16423		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16424		  cf_add_incdir="$cf_top_incdir"
16425		else
16426		  break
16427		fi
16428	  else
16429		break
16430	  fi
16431	done
16432  done
16433fi
16434
16435	elif test -d "$cf_searchpath/../include" ; then
16436
16437if test -n "$cf_searchpath/../include" ; then
16438  for cf_add_incdir in $cf_searchpath/../include
16439  do
16440	while test "$cf_add_incdir" != /usr/include
16441	do
16442	  if test -d "$cf_add_incdir"
16443	  then
16444		cf_have_incdir=no
16445		if test -n "$CFLAGS$CPPFLAGS" ; then
16446		  # a loop is needed to ensure we can add subdirs of existing dirs
16447		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
16448			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
16449			  cf_have_incdir=yes; break
16450			fi
16451		  done
16452		fi
16453
16454		if test "$cf_have_incdir" = no ; then
16455		  if test "$cf_add_incdir" = /usr/local/include ; then
16456			if test "$GCC" = yes
16457			then
16458			  cf_save_CPPFLAGS=$CPPFLAGS
16459
16460	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16461	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
16462
16463			  cat >"conftest.$ac_ext" <<_ACEOF
16464#line 16464 "configure"
16465#include "confdefs.h"
16466#include <stdio.h>
16467int
16468main (void)
16469{
16470printf("Hello")
16471  ;
16472  return 0;
16473}
16474_ACEOF
16475rm -f "conftest.$ac_objext"
16476if { (eval echo "$as_me:16476: \"$ac_compile\"") >&5
16477  (eval $ac_compile) 2>&5
16478  ac_status=$?
16479  echo "$as_me:16479: \$? = $ac_status" >&5
16480  (exit "$ac_status"); } &&
16481         { ac_try='test -s "conftest.$ac_objext"'
16482  { (eval echo "$as_me:16482: \"$ac_try\"") >&5
16483  (eval $ac_try) 2>&5
16484  ac_status=$?
16485  echo "$as_me:16485: \$? = $ac_status" >&5
16486  (exit "$ac_status"); }; }; then
16487  :
16488else
16489  echo "$as_me: failed program was:" >&5
16490cat "conftest.$ac_ext" >&5
16491cf_have_incdir=yes
16492fi
16493rm -f "conftest.$ac_objext" "conftest.$ac_ext"
16494			  CPPFLAGS=$cf_save_CPPFLAGS
16495			fi
16496		  fi
16497		fi
16498
16499		if test "$cf_have_incdir" = no ; then
16500		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
16501
16502echo "${as_me:-configure}:16502: testing adding $cf_add_incdir to include-path ..." 1>&5
16503
16504		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
16505
16506		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
16507		  test "$cf_top_incdir" = "$cf_add_incdir" && break
16508		  cf_add_incdir="$cf_top_incdir"
16509		else
16510		  break
16511		fi
16512	  else
16513		break
16514	  fi
16515	done
16516  done
16517fi
16518
16519	else
16520{ { echo "$as_me:16520: error: cannot find ssl library under $cf_cv_use_libssl" >&5
16521echo "$as_me: error: cannot find ssl library under $cf_cv_use_libssl" >&2;}
16522   { (exit 1); exit 1; }; }
16523	fi
16524	if test -d "$cf_searchpath/lib" ; then
16525
16526if test -n "$cf_searchpath/lib" ; then
16527	for cf_add_libdir in $cf_searchpath/lib
16528	do
16529		if test "$cf_add_libdir" = /usr/lib ; then
16530			:
16531		elif test -d "$cf_add_libdir"
16532		then
16533			cf_have_libdir=no
16534			if test -n "$LDFLAGS$LIBS" ; then
16535				# a loop is needed to ensure we can add subdirs of existing dirs
16536				for cf_test_libdir in $LDFLAGS $LIBS ; do
16537					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16538						cf_have_libdir=yes; break
16539					fi
16540				done
16541			fi
16542			if test "$cf_have_libdir" = no ; then
16543				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16544
16545echo "${as_me:-configure}:16545: testing adding $cf_add_libdir to library-path ..." 1>&5
16546
16547				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16548			fi
16549		fi
16550	done
16551fi
16552
16553	elif test -d "$cf_searchpath" ; then
16554
16555if test -n "$cf_searchpath" ; then
16556	for cf_add_libdir in $cf_searchpath
16557	do
16558		if test "$cf_add_libdir" = /usr/lib ; then
16559			:
16560		elif test -d "$cf_add_libdir"
16561		then
16562			cf_have_libdir=no
16563			if test -n "$LDFLAGS$LIBS" ; then
16564				# a loop is needed to ensure we can add subdirs of existing dirs
16565				for cf_test_libdir in $LDFLAGS $LIBS ; do
16566					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
16567						cf_have_libdir=yes; break
16568					fi
16569				done
16570			fi
16571			if test "$cf_have_libdir" = no ; then
16572				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
16573
16574echo "${as_me:-configure}:16574: testing adding $cf_add_libdir to library-path ..." 1>&5
16575
16576				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
16577			fi
16578		fi
16579	done
16580fi
16581
16582	else
16583{ { echo "$as_me:16583: error: cannot find ssl library under $cf_cv_use_libssl" >&5
16584echo "$as_me: error: cannot find ssl library under $cf_cv_use_libssl" >&2;}
16585   { (exit 1); exit 1; }; }
16586	fi
16587done
16588
16589	;;
16590esac
16591
16592	if test "x$PKG_CONFIG" != xnone; then
16593		case "$cf_cv_use_libssl" in
16594		(no)
16595			;;
16596		(yes) # if no explicit directory given, try pkg-config
16597			cf_cv_pkg_ssl=
16598			for cf_try_package in openssl libssl
16599			do
16600				echo "$as_me:16600: checking pkg-config for $cf_try_package" >&5
16601echo $ECHO_N "checking pkg-config for $cf_try_package... $ECHO_C" >&6
16602				if "$PKG_CONFIG" --exists $cf_try_package ; then
16603					cf_cv_pkg_ssl=$cf_try_package
16604					echo "$as_me:16604: result: yes" >&5
16605echo "${ECHO_T}yes" >&6
16606					break
16607				else
16608					echo "$as_me:16608: result: no" >&5
16609echo "${ECHO_T}no" >&6
16610				fi
16611			done
16612			if test -n "$cf_cv_pkg_ssl" ; then
16613				cf_cv_have_ssl=yes
16614				cf_cv_pkg_config_ssl=yes
16615
16616				cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_cv_pkg_ssl`
16617				cf_libs_ssl=`$PKG_CONFIG --libs $cf_cv_pkg_ssl`
16618
16619				if test -n "$cf_cflags_ssl" ; then
16620					case "$cf_cflags_ssl" in
16621					(*-I*)
16622						cf_cv_header_path_ssl=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
16623						;;
16624					(*)
16625						cf_cv_header_path_ssl=/usr/include
16626						;;
16627					esac
16628
16629cf_fix_cppflags=no
16630cf_new_cflags=
16631cf_new_cppflags=
16632cf_new_extra_cppflags=
16633
16634for cf_add_cflags in $cf_cflags_ssl
16635do
16636case "$cf_fix_cppflags" in
16637(no)
16638	case "$cf_add_cflags" in
16639	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
16640		case "$cf_add_cflags" in
16641		(-D*)
16642			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
16643
16644			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16645				&& test -z "${cf_tst_cflags}" \
16646				&& cf_fix_cppflags=yes
16647
16648			if test "$cf_fix_cppflags" = yes ; then
16649
16650	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16651	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16652
16653				continue
16654			elif test "${cf_tst_cflags}" = "\"'" ; then
16655
16656	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16657	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16658
16659				continue
16660			fi
16661			;;
16662		esac
16663		case "$CPPFLAGS" in
16664		(*$cf_add_cflags)
16665			;;
16666		(*)
16667			case "$cf_add_cflags" in
16668			(-D*)
16669				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
16670
16671CPPFLAGS=`echo "$CPPFLAGS" | \
16672	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
16673		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
16674
16675				;;
16676			esac
16677
16678	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
16679	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
16680
16681			;;
16682		esac
16683		;;
16684	(*)
16685
16686	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
16687	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
16688
16689		;;
16690	esac
16691	;;
16692(yes)
16693
16694	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
16695	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
16696
16697	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
16698
16699	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
16700		&& test -z "${cf_tst_cflags}" \
16701		&& cf_fix_cppflags=no
16702	;;
16703esac
16704done
16705
16706if test -n "$cf_new_cflags" ; then
16707
16708	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
16709	CFLAGS="${CFLAGS}$cf_new_cflags"
16710
16711fi
16712
16713if test -n "$cf_new_cppflags" ; then
16714
16715	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
16716	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
16717
16718fi
16719
16720if test -n "$cf_new_extra_cppflags" ; then
16721
16722	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
16723	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
16724
16725fi
16726
16727					# workaround for broken openssl package using kerberos
16728					case "$cf_cflags_ssl" in
16729					(*kerberos*)
16730						cf_cv_have_ssl=maybe
16731						;;
16732					esac
16733				else
16734					cf_cv_header_path_ssl=/usr/include
16735				fi
16736
16737				if test -d "$cf_cv_header_path_ssl/openssl" ; then
16738					cf_cv_header_path_ssl=$cf_cv_header_path_ssl/openssl
16739				fi
16740
16741				if test -n "$cf_libs_ssl" ; then
16742					case "x$cf_libs_ssl" in
16743					(*-L*)
16744						cf_cv_library_path_ssl=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
16745						;;
16746					(*)
16747						cf_cv_library_path_ssl=/usr/lib
16748						;;
16749					esac
16750					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6
16751
16752echo "${as_me:-configure}:16752: testing adding $cf_libs_ssl to LIBS ..." 1>&5
16753
16754cf_add_libs="$LIBS"
16755# reverse order
16756cf_add_0lib=
16757for cf_add_1lib in $cf_libs_ssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
16758# filter duplicates
16759for cf_add_1lib in $cf_add_0lib; do
16760	for cf_add_2lib in $cf_add_libs; do
16761		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
16762			cf_add_1lib=
16763			break
16764		fi
16765	done
16766	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
16767done
16768LIBS="$cf_add_libs"
16769
16770				fi
16771			fi
16772			;;
16773		esac
16774	fi
16775
16776	if test "$cf_cv_have_ssl" != yes; then
16777		case "$host_os" in
16778		(mingw*)
16779			cf_extra_ssl_libs="-lcrypto -lgdi32"
16780			;;
16781		(*)
16782			# openssl 0.9.6 and up use dynamic loading for engines.
16783			cf_extra_ssl_libs="-lcrypto"
16784			case "x$LIBS" in
16785			(*-ldl)
16786				;;
16787			(*)
16788				echo "$as_me:16788: checking for dlsym in -ldl" >&5
16789echo $ECHO_N "checking for dlsym in -ldl... $ECHO_C" >&6
16790if test "${ac_cv_lib_dl_dlsym+set}" = set; then
16791  echo $ECHO_N "(cached) $ECHO_C" >&6
16792else
16793  ac_check_lib_save_LIBS=$LIBS
16794LIBS="-ldl  $LIBS"
16795cat >"conftest.$ac_ext" <<_ACEOF
16796#line 16796 "configure"
16797#include "confdefs.h"
16798
16799/* Override any gcc2 internal prototype to avoid an error.  */
16800#ifdef __cplusplus
16801extern "C"
16802#endif
16803/* We use char because int might match the return type of a gcc2
16804   builtin and then its argument prototype would still apply.  */
16805char dlsym ();
16806int
16807main (void)
16808{
16809dlsym ();
16810  ;
16811  return 0;
16812}
16813_ACEOF
16814rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16815if { (eval echo "$as_me:16815: \"$ac_link\"") >&5
16816  (eval $ac_link) 2>&5
16817  ac_status=$?
16818  echo "$as_me:16818: \$? = $ac_status" >&5
16819  (exit "$ac_status"); } &&
16820         { ac_try='test -s "conftest$ac_exeext"'
16821  { (eval echo "$as_me:16821: \"$ac_try\"") >&5
16822  (eval $ac_try) 2>&5
16823  ac_status=$?
16824  echo "$as_me:16824: \$? = $ac_status" >&5
16825  (exit "$ac_status"); }; }; then
16826  ac_cv_lib_dl_dlsym=yes
16827else
16828  echo "$as_me: failed program was:" >&5
16829cat "conftest.$ac_ext" >&5
16830ac_cv_lib_dl_dlsym=no
16831fi
16832rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
16833LIBS=$ac_check_lib_save_LIBS
16834fi
16835echo "$as_me:16835: result: $ac_cv_lib_dl_dlsym" >&5
16836echo "${ECHO_T}$ac_cv_lib_dl_dlsym" >&6
16837if test "$ac_cv_lib_dl_dlsym" = yes; then
16838  cf_extra_ssl_libs="$cf_extra_ssl_libs -ldl"
16839fi
16840
16841				;;
16842			esac
16843			;;
16844		esac
16845
16846# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
16847# will be set on completion of the AC_TRY_LINK below.
16848cf_cv_header_path_ssl=
16849cf_cv_library_path_ssl=
16850
16851echo "${as_me:-configure}:16851: testing Starting FIND_LINKAGE(ssl,openssl) ..." 1>&5
16852
16853cf_save_LIBS="$LIBS"
16854
16855cat >"conftest.$ac_ext" <<_ACEOF
16856#line 16856 "configure"
16857#include "confdefs.h"
16858
16859#include <stdio.h>
16860#if defined(USE_OPENSSL_INCL)
16861#include <openssl/ssl.h>
16862#elif defined(USE_GNUTLS_FUNCS)
16863#include <gnutls/gnutls.h>
16864#elif defined(USE_GNUTLS_INCL)
16865#include <gnutls/openssl.h>
16866#else
16867#include <ssl.h>
16868#endif
16869
16870int
16871main (void)
16872{
16873
16874#ifdef USE_GNUTLS_FUNCS
16875    gnutls_global_init();
16876#else
16877    SSL_shutdown((SSL *)0)
16878#endif
16879
16880  ;
16881  return 0;
16882}
16883_ACEOF
16884rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16885if { (eval echo "$as_me:16885: \"$ac_link\"") >&5
16886  (eval $ac_link) 2>&5
16887  ac_status=$?
16888  echo "$as_me:16888: \$? = $ac_status" >&5
16889  (exit "$ac_status"); } &&
16890         { ac_try='test -s "conftest$ac_exeext"'
16891  { (eval echo "$as_me:16891: \"$ac_try\"") >&5
16892  (eval $ac_try) 2>&5
16893  ac_status=$?
16894  echo "$as_me:16894: \$? = $ac_status" >&5
16895  (exit "$ac_status"); }; }; then
16896
16897	cf_cv_find_linkage_ssl=yes
16898	cf_cv_header_path_ssl=/usr/include
16899	cf_cv_library_path_ssl=/usr/lib
16900
16901else
16902  echo "$as_me: failed program was:" >&5
16903cat "conftest.$ac_ext" >&5
16904
16905LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
16906
16907cat >"conftest.$ac_ext" <<_ACEOF
16908#line 16908 "configure"
16909#include "confdefs.h"
16910
16911#include <stdio.h>
16912#if defined(USE_OPENSSL_INCL)
16913#include <openssl/ssl.h>
16914#elif defined(USE_GNUTLS_FUNCS)
16915#include <gnutls/gnutls.h>
16916#elif defined(USE_GNUTLS_INCL)
16917#include <gnutls/openssl.h>
16918#else
16919#include <ssl.h>
16920#endif
16921
16922int
16923main (void)
16924{
16925
16926#ifdef USE_GNUTLS_FUNCS
16927    gnutls_global_init();
16928#else
16929    SSL_shutdown((SSL *)0)
16930#endif
16931
16932  ;
16933  return 0;
16934}
16935_ACEOF
16936rm -f "conftest.$ac_objext" "conftest$ac_exeext"
16937if { (eval echo "$as_me:16937: \"$ac_link\"") >&5
16938  (eval $ac_link) 2>&5
16939  ac_status=$?
16940  echo "$as_me:16940: \$? = $ac_status" >&5
16941  (exit "$ac_status"); } &&
16942         { ac_try='test -s "conftest$ac_exeext"'
16943  { (eval echo "$as_me:16943: \"$ac_try\"") >&5
16944  (eval $ac_try) 2>&5
16945  ac_status=$?
16946  echo "$as_me:16946: \$? = $ac_status" >&5
16947  (exit "$ac_status"); }; }; then
16948
16949	cf_cv_find_linkage_ssl=yes
16950	cf_cv_header_path_ssl=/usr/include
16951	cf_cv_library_path_ssl=/usr/lib
16952	cf_cv_library_file_ssl="-lssl"
16953
16954else
16955  echo "$as_me: failed program was:" >&5
16956cat "conftest.$ac_ext" >&5
16957
16958	cf_cv_find_linkage_ssl=no
16959	LIBS="$cf_save_LIBS"
16960
16961	test -n "$verbose" && echo "	find linkage for ssl library" 1>&6
16962
16963echo "${as_me:-configure}:16963: testing find linkage for ssl library ..." 1>&5
16964
16965echo "${as_me:-configure}:16965: testing Searching for headers in FIND_LINKAGE(ssl,openssl) ..." 1>&5
16966
16967	cf_save_CPPFLAGS="$CPPFLAGS"
16968	cf_test_CPPFLAGS="$CPPFLAGS"
16969
16970cf_search=
16971
16972# collect the current set of include-directories from compiler flags
16973cf_header_path_list=""
16974if test -n "${CFLAGS}${CPPFLAGS}" ; then
16975	for cf_header_path in $CPPFLAGS $CFLAGS
16976	do
16977		case "$cf_header_path" in
16978		(-I*)
16979			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
16980
16981test "x$cf_header_path" != "xNONE" && \
16982test -d "$cf_header_path" && \
16983 {
16984	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
16985	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
16986	test -d "$cf_header_path/include/openssl" &&       cf_search="$cf_search $cf_header_path/include/openssl"
16987	test -d "$cf_header_path/include/openssl/include" &&    cf_search="$cf_search $cf_header_path/include/openssl/include"
16988	test -d "$cf_header_path/openssl/include" &&       cf_search="$cf_search $cf_header_path/openssl/include"
16989	test -d "$cf_header_path/openssl/include/openssl" &&    cf_search="$cf_search $cf_header_path/openssl/include/openssl"
16990}
16991
16992			cf_header_path_list="$cf_header_path_list $cf_search"
16993			;;
16994		esac
16995	done
16996fi
16997
16998# add the variations for the package we are looking for
16999
17000cf_search=
17001
17002test "x$prefix" != "xNONE" && \
17003test -d "$prefix" && \
17004 {
17005	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
17006	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
17007	test -d "$prefix/include/openssl" &&       cf_search="$cf_search $prefix/include/openssl"
17008	test -d "$prefix/include/openssl/include" &&    cf_search="$cf_search $prefix/include/openssl/include"
17009	test -d "$prefix/openssl/include" &&       cf_search="$cf_search $prefix/openssl/include"
17010	test -d "$prefix/openssl/include/openssl" &&    cf_search="$cf_search $prefix/openssl/include/openssl"
17011}
17012
17013for cf_subdir_prefix in \
17014	/usr \
17015	/usr/local \
17016	/usr/pkg \
17017	/opt \
17018	/opt/local \
17019	$HOME
17020do
17021
17022test "x$cf_subdir_prefix" != "x$prefix" && \
17023test -d "$cf_subdir_prefix" && \
17024{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17025	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
17026	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
17027	test -d "$cf_subdir_prefix/include/openssl" &&       cf_search="$cf_search $cf_subdir_prefix/include/openssl"
17028	test -d "$cf_subdir_prefix/include/openssl/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/openssl/include"
17029	test -d "$cf_subdir_prefix/openssl/include" &&       cf_search="$cf_search $cf_subdir_prefix/openssl/include"
17030	test -d "$cf_subdir_prefix/openssl/include/openssl" &&    cf_search="$cf_search $cf_subdir_prefix/openssl/include/openssl"
17031}
17032
17033done
17034
17035test "$includedir" != NONE && \
17036test "$includedir" != "/usr/include" && \
17037test -d "$includedir" && {
17038	test -d "$includedir" &&    cf_search="$cf_search $includedir"
17039	test -d "$includedir/openssl" && cf_search="$cf_search $includedir/openssl"
17040}
17041
17042test "$oldincludedir" != NONE && \
17043test "$oldincludedir" != "/usr/include" && \
17044test -d "$oldincludedir" && {
17045	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
17046	test -d "$oldincludedir/openssl" && cf_search="$cf_search $oldincludedir/openssl"
17047}
17048
17049cf_search="$cf_search $cf_header_path_list"
17050
17051	for cf_cv_header_path_ssl in $cf_search
17052	do
17053		if test -d "$cf_cv_header_path_ssl" ; then
17054			test -n "$verbose" && echo "	... testing $cf_cv_header_path_ssl" 1>&6
17055
17056echo "${as_me:-configure}:17056: testing ... testing $cf_cv_header_path_ssl ..." 1>&5
17057
17058			CPPFLAGS="$cf_save_CPPFLAGS"
17059
17060	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17061	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_ssl"
17062
17063			cat >"conftest.$ac_ext" <<_ACEOF
17064#line 17064 "configure"
17065#include "confdefs.h"
17066
17067#include <stdio.h>
17068#if defined(USE_OPENSSL_INCL)
17069#include <openssl/ssl.h>
17070#elif defined(USE_GNUTLS_FUNCS)
17071#include <gnutls/gnutls.h>
17072#elif defined(USE_GNUTLS_INCL)
17073#include <gnutls/openssl.h>
17074#else
17075#include <ssl.h>
17076#endif
17077
17078int
17079main (void)
17080{
17081
17082#ifdef USE_GNUTLS_FUNCS
17083    gnutls_global_init();
17084#else
17085    SSL_shutdown((SSL *)0)
17086#endif
17087
17088  ;
17089  return 0;
17090}
17091_ACEOF
17092rm -f "conftest.$ac_objext"
17093if { (eval echo "$as_me:17093: \"$ac_compile\"") >&5
17094  (eval $ac_compile) 2>&5
17095  ac_status=$?
17096  echo "$as_me:17096: \$? = $ac_status" >&5
17097  (exit "$ac_status"); } &&
17098         { ac_try='test -s "conftest.$ac_objext"'
17099  { (eval echo "$as_me:17099: \"$ac_try\"") >&5
17100  (eval $ac_try) 2>&5
17101  ac_status=$?
17102  echo "$as_me:17102: \$? = $ac_status" >&5
17103  (exit "$ac_status"); }; }; then
17104
17105				test -n "$verbose" && echo "	... found ssl headers in $cf_cv_header_path_ssl" 1>&6
17106
17107echo "${as_me:-configure}:17107: testing ... found ssl headers in $cf_cv_header_path_ssl ..." 1>&5
17108
17109				cf_cv_find_linkage_ssl=maybe
17110				cf_test_CPPFLAGS="$CPPFLAGS"
17111				break
17112else
17113  echo "$as_me: failed program was:" >&5
17114cat "conftest.$ac_ext" >&5
17115
17116				CPPFLAGS="$cf_save_CPPFLAGS"
17117
17118fi
17119rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17120		fi
17121	done
17122
17123	if test "$cf_cv_find_linkage_ssl" = maybe ; then
17124
17125echo "${as_me:-configure}:17125: testing Searching for ssl library in FIND_LINKAGE(ssl,openssl) ..." 1>&5
17126
17127		cf_save_LIBS="$LIBS"
17128		cf_save_LDFLAGS="$LDFLAGS"
17129
17130		CPPFLAGS="$cf_test_CPPFLAGS"
17131		LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
17132		cat >"conftest.$ac_ext" <<_ACEOF
17133#line 17133 "configure"
17134#include "confdefs.h"
17135
17136#include <stdio.h>
17137#if defined(USE_OPENSSL_INCL)
17138#include <openssl/ssl.h>
17139#elif defined(USE_GNUTLS_FUNCS)
17140#include <gnutls/gnutls.h>
17141#elif defined(USE_GNUTLS_INCL)
17142#include <gnutls/openssl.h>
17143#else
17144#include <ssl.h>
17145#endif
17146
17147int
17148main (void)
17149{
17150
17151#ifdef USE_GNUTLS_FUNCS
17152    gnutls_global_init();
17153#else
17154    SSL_shutdown((SSL *)0)
17155#endif
17156
17157  ;
17158  return 0;
17159}
17160_ACEOF
17161rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17162if { (eval echo "$as_me:17162: \"$ac_link\"") >&5
17163  (eval $ac_link) 2>&5
17164  ac_status=$?
17165  echo "$as_me:17165: \$? = $ac_status" >&5
17166  (exit "$ac_status"); } &&
17167         { ac_try='test -s "conftest$ac_exeext"'
17168  { (eval echo "$as_me:17168: \"$ac_try\"") >&5
17169  (eval $ac_try) 2>&5
17170  ac_status=$?
17171  echo "$as_me:17171: \$? = $ac_status" >&5
17172  (exit "$ac_status"); }; }; then
17173
17174			test -n "$verbose" && echo "	... found ssl library in system" 1>&6
17175
17176echo "${as_me:-configure}:17176: testing ... found ssl library in system ..." 1>&5
17177
17178			cf_cv_find_linkage_ssl=yes
17179else
17180  echo "$as_me: failed program was:" >&5
17181cat "conftest.$ac_ext" >&5
17182fi
17183rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17184			CPPFLAGS="$cf_save_CPPFLAGS"
17185			LIBS="$cf_save_LIBS"
17186
17187		if test "$cf_cv_find_linkage_ssl" != yes ; then
17188
17189cf_search=
17190cf_library_path_list=""
17191if test -n "${LDFLAGS}${LIBS}" ; then
17192	for cf_library_path in $LDFLAGS $LIBS
17193	do
17194		case "$cf_library_path" in
17195		(-L*)
17196			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
17197
17198test "x$cf_library_path" != "xNONE" && \
17199test -d "$cf_library_path" && \
17200 {
17201	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
17202	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
17203	test -d "$cf_library_path/lib/ssl" &&       cf_search="$cf_search $cf_library_path/lib/ssl"
17204	test -d "$cf_library_path/lib/ssl/lib" &&    cf_search="$cf_search $cf_library_path/lib/ssl/lib"
17205	test -d "$cf_library_path/ssl/lib" &&       cf_search="$cf_search $cf_library_path/ssl/lib"
17206	test -d "$cf_library_path/ssl/lib/ssl" &&    cf_search="$cf_search $cf_library_path/ssl/lib/ssl"
17207}
17208
17209			cf_library_path_list="$cf_library_path_list $cf_search"
17210			;;
17211		esac
17212	done
17213fi
17214
17215cf_search=
17216
17217test "x$prefix" != "xNONE" && \
17218test -d "$prefix" && \
17219 {
17220	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
17221	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
17222	test -d "$prefix/lib/ssl" &&       cf_search="$cf_search $prefix/lib/ssl"
17223	test -d "$prefix/lib/ssl/lib" &&    cf_search="$cf_search $prefix/lib/ssl/lib"
17224	test -d "$prefix/ssl/lib" &&       cf_search="$cf_search $prefix/ssl/lib"
17225	test -d "$prefix/ssl/lib/ssl" &&    cf_search="$cf_search $prefix/ssl/lib/ssl"
17226}
17227
17228for cf_subdir_prefix in \
17229	/usr \
17230	/usr/local \
17231	/usr/pkg \
17232	/opt \
17233	/opt/local \
17234	$HOME
17235do
17236
17237test "x$cf_subdir_prefix" != "x$prefix" && \
17238test -d "$cf_subdir_prefix" && \
17239{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
17240	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
17241	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
17242	test -d "$cf_subdir_prefix/lib/ssl" &&       cf_search="$cf_search $cf_subdir_prefix/lib/ssl"
17243	test -d "$cf_subdir_prefix/lib/ssl/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/ssl/lib"
17244	test -d "$cf_subdir_prefix/ssl/lib" &&       cf_search="$cf_search $cf_subdir_prefix/ssl/lib"
17245	test -d "$cf_subdir_prefix/ssl/lib/ssl" &&    cf_search="$cf_search $cf_subdir_prefix/ssl/lib/ssl"
17246}
17247
17248done
17249
17250cf_search="$cf_library_path_list $cf_search"
17251
17252			for cf_cv_library_path_ssl in $cf_search
17253			do
17254				if test -d "$cf_cv_library_path_ssl" ; then
17255					test -n "$verbose" && echo "	... testing $cf_cv_library_path_ssl" 1>&6
17256
17257echo "${as_me:-configure}:17257: testing ... testing $cf_cv_library_path_ssl ..." 1>&5
17258
17259					CPPFLAGS="$cf_test_CPPFLAGS"
17260					LIBS="-lssl $cf_extra_ssl_libs $cf_save_LIBS"
17261					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_ssl"
17262					cat >"conftest.$ac_ext" <<_ACEOF
17263#line 17263 "configure"
17264#include "confdefs.h"
17265
17266#include <stdio.h>
17267#if defined(USE_OPENSSL_INCL)
17268#include <openssl/ssl.h>
17269#elif defined(USE_GNUTLS_FUNCS)
17270#include <gnutls/gnutls.h>
17271#elif defined(USE_GNUTLS_INCL)
17272#include <gnutls/openssl.h>
17273#else
17274#include <ssl.h>
17275#endif
17276
17277int
17278main (void)
17279{
17280
17281#ifdef USE_GNUTLS_FUNCS
17282    gnutls_global_init();
17283#else
17284    SSL_shutdown((SSL *)0)
17285#endif
17286
17287  ;
17288  return 0;
17289}
17290_ACEOF
17291rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17292if { (eval echo "$as_me:17292: \"$ac_link\"") >&5
17293  (eval $ac_link) 2>&5
17294  ac_status=$?
17295  echo "$as_me:17295: \$? = $ac_status" >&5
17296  (exit "$ac_status"); } &&
17297         { ac_try='test -s "conftest$ac_exeext"'
17298  { (eval echo "$as_me:17298: \"$ac_try\"") >&5
17299  (eval $ac_try) 2>&5
17300  ac_status=$?
17301  echo "$as_me:17301: \$? = $ac_status" >&5
17302  (exit "$ac_status"); }; }; then
17303
17304					test -n "$verbose" && echo "	... found ssl library in $cf_cv_library_path_ssl" 1>&6
17305
17306echo "${as_me:-configure}:17306: testing ... found ssl library in $cf_cv_library_path_ssl ..." 1>&5
17307
17308					cf_cv_find_linkage_ssl=yes
17309					cf_cv_library_file_ssl="-lssl"
17310					break
17311else
17312  echo "$as_me: failed program was:" >&5
17313cat "conftest.$ac_ext" >&5
17314
17315					CPPFLAGS="$cf_save_CPPFLAGS"
17316					LIBS="$cf_save_LIBS"
17317					LDFLAGS="$cf_save_LDFLAGS"
17318
17319fi
17320rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17321				fi
17322			done
17323			CPPFLAGS="$cf_save_CPPFLAGS"
17324			LDFLAGS="$cf_save_LDFLAGS"
17325		fi
17326
17327	else
17328		cf_cv_find_linkage_ssl=no
17329	fi
17330
17331fi
17332rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17333
17334fi
17335rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17336
17337LIBS="$cf_save_LIBS"
17338
17339if test "$cf_cv_find_linkage_ssl" = yes ; then
17340cf_cv_have_ssl=yes
17341else
17342cf_cv_have_ssl=no
17343fi
17344
17345		if test "$cf_cv_pkg_config_ssl" != yes ; then
17346			if test "$cf_cv_have_ssl" = yes ; then
17347				if test -n "$cf_cv_library_path_ssl" ; then
17348
17349if test -n "$cf_cv_library_path_ssl" ; then
17350	for cf_add_libdir in $cf_cv_library_path_ssl
17351	do
17352		if test "$cf_add_libdir" = /usr/lib ; then
17353			:
17354		elif test -d "$cf_add_libdir"
17355		then
17356			cf_have_libdir=no
17357			if test -n "$LDFLAGS$LIBS" ; then
17358				# a loop is needed to ensure we can add subdirs of existing dirs
17359				for cf_test_libdir in $LDFLAGS $LIBS ; do
17360					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17361						cf_have_libdir=yes; break
17362					fi
17363				done
17364			fi
17365			if test "$cf_have_libdir" = no ; then
17366				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
17367
17368echo "${as_me:-configure}:17368: testing adding $cf_add_libdir to library-path ..." 1>&5
17369
17370				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17371			fi
17372		fi
17373	done
17374fi
17375
17376				fi
17377
17378cf_add_libs="$LIBS"
17379# reverse order
17380cf_add_0lib=
17381for cf_add_1lib in -lssl $cf_extra_ssl_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17382# filter duplicates
17383for cf_add_1lib in $cf_add_0lib; do
17384	for cf_add_2lib in $cf_add_libs; do
17385		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17386			cf_add_1lib=
17387			break
17388		fi
17389	done
17390	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17391done
17392LIBS="$cf_add_libs"
17393
17394				if test -n "$cf_cv_header_path_ssl" ; then
17395					case "$cf_cv_header_path_ssl" in
17396					(/usr/include/openssl)
17397						;;
17398					(*)
17399
17400if test -n "$cf_cv_header_path_ssl" ; then
17401  for cf_add_incdir in $cf_cv_header_path_ssl
17402  do
17403	while test "$cf_add_incdir" != /usr/include
17404	do
17405	  if test -d "$cf_add_incdir"
17406	  then
17407		cf_have_incdir=no
17408		if test -n "$CFLAGS$CPPFLAGS" ; then
17409		  # a loop is needed to ensure we can add subdirs of existing dirs
17410		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17411			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17412			  cf_have_incdir=yes; break
17413			fi
17414		  done
17415		fi
17416
17417		if test "$cf_have_incdir" = no ; then
17418		  if test "$cf_add_incdir" = /usr/local/include ; then
17419			if test "$GCC" = yes
17420			then
17421			  cf_save_CPPFLAGS=$CPPFLAGS
17422
17423	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17424	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
17425
17426			  cat >"conftest.$ac_ext" <<_ACEOF
17427#line 17427 "configure"
17428#include "confdefs.h"
17429#include <stdio.h>
17430int
17431main (void)
17432{
17433printf("Hello")
17434  ;
17435  return 0;
17436}
17437_ACEOF
17438rm -f "conftest.$ac_objext"
17439if { (eval echo "$as_me:17439: \"$ac_compile\"") >&5
17440  (eval $ac_compile) 2>&5
17441  ac_status=$?
17442  echo "$as_me:17442: \$? = $ac_status" >&5
17443  (exit "$ac_status"); } &&
17444         { ac_try='test -s "conftest.$ac_objext"'
17445  { (eval echo "$as_me:17445: \"$ac_try\"") >&5
17446  (eval $ac_try) 2>&5
17447  ac_status=$?
17448  echo "$as_me:17448: \$? = $ac_status" >&5
17449  (exit "$ac_status"); }; }; then
17450  :
17451else
17452  echo "$as_me: failed program was:" >&5
17453cat "conftest.$ac_ext" >&5
17454cf_have_incdir=yes
17455fi
17456rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17457			  CPPFLAGS=$cf_save_CPPFLAGS
17458			fi
17459		  fi
17460		fi
17461
17462		if test "$cf_have_incdir" = no ; then
17463		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
17464
17465echo "${as_me:-configure}:17465: testing adding $cf_add_incdir to include-path ..." 1>&5
17466
17467		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17468
17469		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
17470		  test "$cf_top_incdir" = "$cf_add_incdir" && break
17471		  cf_add_incdir="$cf_top_incdir"
17472		else
17473		  break
17474		fi
17475	  else
17476		break
17477	  fi
17478	done
17479  done
17480fi
17481
17482						;;
17483					esac
17484				fi
17485			fi
17486		fi
17487	fi
17488
17489	if test "$cf_cv_have_ssl" = yes ; then
17490
17491cat >>confdefs.h <<\EOF
17492#define USE_SSL 1
17493EOF
17494
17495		if test -n "$cf_cv_header_path_ssl" ; then
17496			test -n "$verbose" && echo "	checking ssl header-path $cf_cv_header_path_ssl" 1>&6
17497
17498echo "${as_me:-configure}:17498: testing checking ssl header-path $cf_cv_header_path_ssl ..." 1>&5
17499
17500			case "$cf_cv_header_path_ssl" in
17501			(*/openssl)
17502
17503cat >>confdefs.h <<\EOF
17504#define USE_OPENSSL_INCL 1
17505EOF
17506
17507				;;
17508			esac
17509		fi
17510
17511echo "$as_me:17511: checking for X509 support" >&5
17512echo $ECHO_N "checking for X509 support... $ECHO_C" >&6
17513cat >"conftest.$ac_ext" <<_ACEOF
17514#line 17514 "configure"
17515#include "confdefs.h"
17516
17517#include <stdio.h>
17518#if defined(USE_OPENSSL_INCL)
17519#include <openssl/ssl.h>
17520#elif defined(USE_GNUTLS_FUNCS)
17521#include <gnutls/gnutls.h>
17522#elif defined(USE_GNUTLS_INCL)
17523#include <gnutls/openssl.h>
17524#else
17525#include <ssl.h>
17526#endif
17527
17528#if defined(USE_GNUTLS_INCL)
17529#include <gnutls/x509.h>
17530#else
17531#include <openssl/x509.h>
17532#endif
17533
17534int
17535main (void)
17536{
17537X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
17538  ;
17539  return 0;
17540}
17541_ACEOF
17542rm -f "conftest.$ac_objext" "conftest$ac_exeext"
17543if { (eval echo "$as_me:17543: \"$ac_link\"") >&5
17544  (eval $ac_link) 2>&5
17545  ac_status=$?
17546  echo "$as_me:17546: \$? = $ac_status" >&5
17547  (exit "$ac_status"); } &&
17548         { ac_try='test -s "conftest$ac_exeext"'
17549  { (eval echo "$as_me:17549: \"$ac_try\"") >&5
17550  (eval $ac_try) 2>&5
17551  ac_status=$?
17552  echo "$as_me:17552: \$? = $ac_status" >&5
17553  (exit "$ac_status"); }; }; then
17554  cf_x509_support=yes
17555else
17556  echo "$as_me: failed program was:" >&5
17557cat "conftest.$ac_ext" >&5
17558cf_x509_support=no
17559fi
17560rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
17561echo "$as_me:17561: result: $cf_x509_support" >&5
17562echo "${ECHO_T}$cf_x509_support" >&6
17563
17564if test "$cf_x509_support" = yes ; then
17565	cat >>confdefs.h <<\EOF
17566#define USE_X509_SUPPORT 1
17567EOF
17568
17569fi
17570
17571	fi
17572
17573elif test "x$cf_cv_use_libgnutls" != xno ; then
17574    if test "x$cf_cv_gnutls_compat" = xno ; then
17575
17576	cf_cv_have_gnutls=no
17577	cf_cv_pkg_config_ssl=no
17578
17579case "$cf_cv_use_libgnutls" in
17580(no)
17581	;;
17582(yes)
17583	;;
17584(*)
17585
17586for cf_searchpath in `echo "$cf_cv_use_libgnutls" | tr $PATH_SEPARATOR ' '`; do
17587	if test -d "$cf_searchpath/include" ; then
17588
17589if test -n "$cf_searchpath/include" ; then
17590  for cf_add_incdir in $cf_searchpath/include
17591  do
17592	while test "$cf_add_incdir" != /usr/include
17593	do
17594	  if test -d "$cf_add_incdir"
17595	  then
17596		cf_have_incdir=no
17597		if test -n "$CFLAGS$CPPFLAGS" ; then
17598		  # a loop is needed to ensure we can add subdirs of existing dirs
17599		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17600			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17601			  cf_have_incdir=yes; break
17602			fi
17603		  done
17604		fi
17605
17606		if test "$cf_have_incdir" = no ; then
17607		  if test "$cf_add_incdir" = /usr/local/include ; then
17608			if test "$GCC" = yes
17609			then
17610			  cf_save_CPPFLAGS=$CPPFLAGS
17611
17612	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17613	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
17614
17615			  cat >"conftest.$ac_ext" <<_ACEOF
17616#line 17616 "configure"
17617#include "confdefs.h"
17618#include <stdio.h>
17619int
17620main (void)
17621{
17622printf("Hello")
17623  ;
17624  return 0;
17625}
17626_ACEOF
17627rm -f "conftest.$ac_objext"
17628if { (eval echo "$as_me:17628: \"$ac_compile\"") >&5
17629  (eval $ac_compile) 2>&5
17630  ac_status=$?
17631  echo "$as_me:17631: \$? = $ac_status" >&5
17632  (exit "$ac_status"); } &&
17633         { ac_try='test -s "conftest.$ac_objext"'
17634  { (eval echo "$as_me:17634: \"$ac_try\"") >&5
17635  (eval $ac_try) 2>&5
17636  ac_status=$?
17637  echo "$as_me:17637: \$? = $ac_status" >&5
17638  (exit "$ac_status"); }; }; then
17639  :
17640else
17641  echo "$as_me: failed program was:" >&5
17642cat "conftest.$ac_ext" >&5
17643cf_have_incdir=yes
17644fi
17645rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17646			  CPPFLAGS=$cf_save_CPPFLAGS
17647			fi
17648		  fi
17649		fi
17650
17651		if test "$cf_have_incdir" = no ; then
17652		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
17653
17654echo "${as_me:-configure}:17654: testing adding $cf_add_incdir to include-path ..." 1>&5
17655
17656		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17657
17658		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
17659		  test "$cf_top_incdir" = "$cf_add_incdir" && break
17660		  cf_add_incdir="$cf_top_incdir"
17661		else
17662		  break
17663		fi
17664	  else
17665		break
17666	  fi
17667	done
17668  done
17669fi
17670
17671	elif test -d "$cf_searchpath/../include" ; then
17672
17673if test -n "$cf_searchpath/../include" ; then
17674  for cf_add_incdir in $cf_searchpath/../include
17675  do
17676	while test "$cf_add_incdir" != /usr/include
17677	do
17678	  if test -d "$cf_add_incdir"
17679	  then
17680		cf_have_incdir=no
17681		if test -n "$CFLAGS$CPPFLAGS" ; then
17682		  # a loop is needed to ensure we can add subdirs of existing dirs
17683		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
17684			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
17685			  cf_have_incdir=yes; break
17686			fi
17687		  done
17688		fi
17689
17690		if test "$cf_have_incdir" = no ; then
17691		  if test "$cf_add_incdir" = /usr/local/include ; then
17692			if test "$GCC" = yes
17693			then
17694			  cf_save_CPPFLAGS=$CPPFLAGS
17695
17696	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17697	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
17698
17699			  cat >"conftest.$ac_ext" <<_ACEOF
17700#line 17700 "configure"
17701#include "confdefs.h"
17702#include <stdio.h>
17703int
17704main (void)
17705{
17706printf("Hello")
17707  ;
17708  return 0;
17709}
17710_ACEOF
17711rm -f "conftest.$ac_objext"
17712if { (eval echo "$as_me:17712: \"$ac_compile\"") >&5
17713  (eval $ac_compile) 2>&5
17714  ac_status=$?
17715  echo "$as_me:17715: \$? = $ac_status" >&5
17716  (exit "$ac_status"); } &&
17717         { ac_try='test -s "conftest.$ac_objext"'
17718  { (eval echo "$as_me:17718: \"$ac_try\"") >&5
17719  (eval $ac_try) 2>&5
17720  ac_status=$?
17721  echo "$as_me:17721: \$? = $ac_status" >&5
17722  (exit "$ac_status"); }; }; then
17723  :
17724else
17725  echo "$as_me: failed program was:" >&5
17726cat "conftest.$ac_ext" >&5
17727cf_have_incdir=yes
17728fi
17729rm -f "conftest.$ac_objext" "conftest.$ac_ext"
17730			  CPPFLAGS=$cf_save_CPPFLAGS
17731			fi
17732		  fi
17733		fi
17734
17735		if test "$cf_have_incdir" = no ; then
17736		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
17737
17738echo "${as_me:-configure}:17738: testing adding $cf_add_incdir to include-path ..." 1>&5
17739
17740		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
17741
17742		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
17743		  test "$cf_top_incdir" = "$cf_add_incdir" && break
17744		  cf_add_incdir="$cf_top_incdir"
17745		else
17746		  break
17747		fi
17748	  else
17749		break
17750	  fi
17751	done
17752  done
17753fi
17754
17755	else
17756{ { echo "$as_me:17756: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
17757echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
17758   { (exit 1); exit 1; }; }
17759	fi
17760	if test -d "$cf_searchpath/lib" ; then
17761
17762if test -n "$cf_searchpath/lib" ; then
17763	for cf_add_libdir in $cf_searchpath/lib
17764	do
17765		if test "$cf_add_libdir" = /usr/lib ; then
17766			:
17767		elif test -d "$cf_add_libdir"
17768		then
17769			cf_have_libdir=no
17770			if test -n "$LDFLAGS$LIBS" ; then
17771				# a loop is needed to ensure we can add subdirs of existing dirs
17772				for cf_test_libdir in $LDFLAGS $LIBS ; do
17773					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17774						cf_have_libdir=yes; break
17775					fi
17776				done
17777			fi
17778			if test "$cf_have_libdir" = no ; then
17779				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
17780
17781echo "${as_me:-configure}:17781: testing adding $cf_add_libdir to library-path ..." 1>&5
17782
17783				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17784			fi
17785		fi
17786	done
17787fi
17788
17789	elif test -d "$cf_searchpath" ; then
17790
17791if test -n "$cf_searchpath" ; then
17792	for cf_add_libdir in $cf_searchpath
17793	do
17794		if test "$cf_add_libdir" = /usr/lib ; then
17795			:
17796		elif test -d "$cf_add_libdir"
17797		then
17798			cf_have_libdir=no
17799			if test -n "$LDFLAGS$LIBS" ; then
17800				# a loop is needed to ensure we can add subdirs of existing dirs
17801				for cf_test_libdir in $LDFLAGS $LIBS ; do
17802					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
17803						cf_have_libdir=yes; break
17804					fi
17805				done
17806			fi
17807			if test "$cf_have_libdir" = no ; then
17808				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
17809
17810echo "${as_me:-configure}:17810: testing adding $cf_add_libdir to library-path ..." 1>&5
17811
17812				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
17813			fi
17814		fi
17815	done
17816fi
17817
17818	else
17819{ { echo "$as_me:17819: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
17820echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
17821   { (exit 1); exit 1; }; }
17822	fi
17823done
17824
17825	;;
17826esac
17827
17828	cf_pkg_gnutls=none
17829	if test "x$PKG_CONFIG" != xnone; then
17830		cf_pkg_gnutls=gnutls
17831		case "$cf_cv_use_libgnutls" in
17832		(no)
17833			;;
17834		(yes) # if no explicit directory given, try pkg-config
17835			test -n "$verbose" && echo "	checking pkg-config for $cf_pkg_gnutls" 1>&6
17836
17837echo "${as_me:-configure}:17837: testing checking pkg-config for $cf_pkg_gnutls ..." 1>&5
17838
17839			if "$PKG_CONFIG" --exists $cf_pkg_gnutls ; then
17840				test -n "$verbose" && echo "	... found $cf_pkg_gnutls in pkg-config" 1>&6
17841
17842echo "${as_me:-configure}:17842: testing ... found $cf_pkg_gnutls in pkg-config ..." 1>&5
17843
17844				cf_cv_have_gnutls=yes
17845				cf_cv_pkg_config_ssl=yes
17846
17847				cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_pkg_gnutls`
17848				cf_libs_ssl=`$PKG_CONFIG --libs $cf_pkg_gnutls`
17849
17850				if test -n "$cf_cflags_ssl" ; then
17851					case "$cf_cflags_ssl" in
17852					(*-I*)
17853						cf_cv_header_path_gnutls=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
17854						;;
17855					(*)
17856						cf_cv_header_path_gnutls=/usr/include
17857						;;
17858					esac
17859					if test -d "$cf_cv_header_path_gnutls/gnutls" ; then
17860						cf_cv_header_path_gnutls=$cf_cv_header_path_gnutls/gnutls
17861					fi
17862
17863cf_fix_cppflags=no
17864cf_new_cflags=
17865cf_new_cppflags=
17866cf_new_extra_cppflags=
17867
17868for cf_add_cflags in $cf_cflags_ssl
17869do
17870case "$cf_fix_cppflags" in
17871(no)
17872	case "$cf_add_cflags" in
17873	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
17874		case "$cf_add_cflags" in
17875		(-D*)
17876			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
17877
17878			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17879				&& test -z "${cf_tst_cflags}" \
17880				&& cf_fix_cppflags=yes
17881
17882			if test "$cf_fix_cppflags" = yes ; then
17883
17884	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17885	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17886
17887				continue
17888			elif test "${cf_tst_cflags}" = "\"'" ; then
17889
17890	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17891	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17892
17893				continue
17894			fi
17895			;;
17896		esac
17897		case "$CPPFLAGS" in
17898		(*$cf_add_cflags)
17899			;;
17900		(*)
17901			case "$cf_add_cflags" in
17902			(-D*)
17903				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
17904
17905CPPFLAGS=`echo "$CPPFLAGS" | \
17906	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
17907		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
17908
17909				;;
17910			esac
17911
17912	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
17913	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
17914
17915			;;
17916		esac
17917		;;
17918	(*)
17919
17920	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
17921	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
17922
17923		;;
17924	esac
17925	;;
17926(yes)
17927
17928	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
17929	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
17930
17931	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
17932
17933	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
17934		&& test -z "${cf_tst_cflags}" \
17935		&& cf_fix_cppflags=no
17936	;;
17937esac
17938done
17939
17940if test -n "$cf_new_cflags" ; then
17941
17942	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
17943	CFLAGS="${CFLAGS}$cf_new_cflags"
17944
17945fi
17946
17947if test -n "$cf_new_cppflags" ; then
17948
17949	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
17950	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
17951
17952fi
17953
17954if test -n "$cf_new_extra_cppflags" ; then
17955
17956	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
17957	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
17958
17959fi
17960
17961				fi
17962
17963				if test -n "$cf_libs_ssl" ; then
17964					case "x$cf_libs_ssl" in
17965					(*-L*)
17966						cf_cv_library_path_gnutls=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
17967						;;
17968					(*)
17969						cf_cv_library_path_gnutls=/usr/lib
17970						;;
17971					esac
17972					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6
17973
17974echo "${as_me:-configure}:17974: testing adding $cf_libs_ssl to LIBS ..." 1>&5
17975
17976cf_add_libs="$LIBS"
17977# reverse order
17978cf_add_0lib=
17979for cf_add_1lib in $cf_libs_ssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
17980# filter duplicates
17981for cf_add_1lib in $cf_add_0lib; do
17982	for cf_add_2lib in $cf_add_libs; do
17983		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
17984			cf_add_1lib=
17985			break
17986		fi
17987	done
17988	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
17989done
17990LIBS="$cf_add_libs"
17991
17992				fi
17993			else
17994				test -n "$verbose" && echo "	... did not find $cf_pkg_gnutls in pkg-config" 1>&6
17995
17996echo "${as_me:-configure}:17996: testing ... did not find $cf_pkg_gnutls in pkg-config ..." 1>&5
17997
17998				cf_pkg_gnutls=none
17999			fi
18000			;;
18001		esac
18002	fi
18003
18004cat >>confdefs.h <<\EOF
18005#define USE_GNUTLS_FUNCS 1
18006EOF
18007
18008	if test "$cf_cv_have_gnutls" = no ; then
18009		cf_gnutls_CPPFLAGS=$CPPFLAGS
18010
18011# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
18012# will be set on completion of the AC_TRY_LINK below.
18013cf_cv_header_path_gnutls=
18014cf_cv_library_path_gnutls=
18015
18016echo "${as_me:-configure}:18016: testing Starting FIND_LINKAGE(gnutls,) ..." 1>&5
18017
18018cf_save_LIBS="$LIBS"
18019
18020cat >"conftest.$ac_ext" <<_ACEOF
18021#line 18021 "configure"
18022#include "confdefs.h"
18023
18024#include <stdio.h>
18025#if defined(USE_OPENSSL_INCL)
18026#include <openssl/ssl.h>
18027#elif defined(USE_GNUTLS_FUNCS)
18028#include <gnutls/gnutls.h>
18029#elif defined(USE_GNUTLS_INCL)
18030#include <gnutls/openssl.h>
18031#else
18032#include <ssl.h>
18033#endif
18034
18035int
18036main (void)
18037{
18038
18039#ifdef USE_GNUTLS_FUNCS
18040    gnutls_global_init();
18041#else
18042    SSL_shutdown((SSL *)0)
18043#endif
18044
18045  ;
18046  return 0;
18047}
18048_ACEOF
18049rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18050if { (eval echo "$as_me:18050: \"$ac_link\"") >&5
18051  (eval $ac_link) 2>&5
18052  ac_status=$?
18053  echo "$as_me:18053: \$? = $ac_status" >&5
18054  (exit "$ac_status"); } &&
18055         { ac_try='test -s "conftest$ac_exeext"'
18056  { (eval echo "$as_me:18056: \"$ac_try\"") >&5
18057  (eval $ac_try) 2>&5
18058  ac_status=$?
18059  echo "$as_me:18059: \$? = $ac_status" >&5
18060  (exit "$ac_status"); }; }; then
18061
18062	cf_cv_find_linkage_gnutls=yes
18063	cf_cv_header_path_gnutls=/usr/include
18064	cf_cv_library_path_gnutls=/usr/lib
18065
18066else
18067  echo "$as_me: failed program was:" >&5
18068cat "conftest.$ac_ext" >&5
18069
18070LIBS="-lgnutls  $cf_save_LIBS"
18071
18072cat >"conftest.$ac_ext" <<_ACEOF
18073#line 18073 "configure"
18074#include "confdefs.h"
18075
18076#include <stdio.h>
18077#if defined(USE_OPENSSL_INCL)
18078#include <openssl/ssl.h>
18079#elif defined(USE_GNUTLS_FUNCS)
18080#include <gnutls/gnutls.h>
18081#elif defined(USE_GNUTLS_INCL)
18082#include <gnutls/openssl.h>
18083#else
18084#include <ssl.h>
18085#endif
18086
18087int
18088main (void)
18089{
18090
18091#ifdef USE_GNUTLS_FUNCS
18092    gnutls_global_init();
18093#else
18094    SSL_shutdown((SSL *)0)
18095#endif
18096
18097  ;
18098  return 0;
18099}
18100_ACEOF
18101rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18102if { (eval echo "$as_me:18102: \"$ac_link\"") >&5
18103  (eval $ac_link) 2>&5
18104  ac_status=$?
18105  echo "$as_me:18105: \$? = $ac_status" >&5
18106  (exit "$ac_status"); } &&
18107         { ac_try='test -s "conftest$ac_exeext"'
18108  { (eval echo "$as_me:18108: \"$ac_try\"") >&5
18109  (eval $ac_try) 2>&5
18110  ac_status=$?
18111  echo "$as_me:18111: \$? = $ac_status" >&5
18112  (exit "$ac_status"); }; }; then
18113
18114	cf_cv_find_linkage_gnutls=yes
18115	cf_cv_header_path_gnutls=/usr/include
18116	cf_cv_library_path_gnutls=/usr/lib
18117	cf_cv_library_file_gnutls="-lgnutls"
18118
18119else
18120  echo "$as_me: failed program was:" >&5
18121cat "conftest.$ac_ext" >&5
18122
18123	cf_cv_find_linkage_gnutls=no
18124	LIBS="$cf_save_LIBS"
18125
18126	test -n "$verbose" && echo "	find linkage for gnutls library" 1>&6
18127
18128echo "${as_me:-configure}:18128: testing find linkage for gnutls library ..." 1>&5
18129
18130echo "${as_me:-configure}:18130: testing Searching for headers in FIND_LINKAGE(gnutls,) ..." 1>&5
18131
18132	cf_save_CPPFLAGS="$CPPFLAGS"
18133	cf_test_CPPFLAGS="$CPPFLAGS"
18134
18135cf_search=
18136
18137# collect the current set of include-directories from compiler flags
18138cf_header_path_list=""
18139if test -n "${CFLAGS}${CPPFLAGS}" ; then
18140	for cf_header_path in $CPPFLAGS $CFLAGS
18141	do
18142		case "$cf_header_path" in
18143		(-I*)
18144			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
18145
18146test "x$cf_header_path" != "xNONE" && \
18147test -d "$cf_header_path" && \
18148 {
18149	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
18150	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
18151	test -d "$cf_header_path/include/gnutls" &&       cf_search="$cf_search $cf_header_path/include/gnutls"
18152	test -d "$cf_header_path/include/gnutls/include" &&    cf_search="$cf_search $cf_header_path/include/gnutls/include"
18153	test -d "$cf_header_path/gnutls/include" &&       cf_search="$cf_search $cf_header_path/gnutls/include"
18154	test -d "$cf_header_path/gnutls/include/gnutls" &&    cf_search="$cf_search $cf_header_path/gnutls/include/gnutls"
18155}
18156
18157			cf_header_path_list="$cf_header_path_list $cf_search"
18158			;;
18159		esac
18160	done
18161fi
18162
18163# add the variations for the package we are looking for
18164
18165cf_search=
18166
18167test "x$prefix" != "xNONE" && \
18168test -d "$prefix" && \
18169 {
18170	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
18171	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
18172	test -d "$prefix/include/gnutls" &&       cf_search="$cf_search $prefix/include/gnutls"
18173	test -d "$prefix/include/gnutls/include" &&    cf_search="$cf_search $prefix/include/gnutls/include"
18174	test -d "$prefix/gnutls/include" &&       cf_search="$cf_search $prefix/gnutls/include"
18175	test -d "$prefix/gnutls/include/gnutls" &&    cf_search="$cf_search $prefix/gnutls/include/gnutls"
18176}
18177
18178for cf_subdir_prefix in \
18179	/usr \
18180	/usr/local \
18181	/usr/pkg \
18182	/opt \
18183	/opt/local \
18184	$HOME
18185do
18186
18187test "x$cf_subdir_prefix" != "x$prefix" && \
18188test -d "$cf_subdir_prefix" && \
18189{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18190	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
18191	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
18192	test -d "$cf_subdir_prefix/include/gnutls" &&       cf_search="$cf_search $cf_subdir_prefix/include/gnutls"
18193	test -d "$cf_subdir_prefix/include/gnutls/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/gnutls/include"
18194	test -d "$cf_subdir_prefix/gnutls/include" &&       cf_search="$cf_search $cf_subdir_prefix/gnutls/include"
18195	test -d "$cf_subdir_prefix/gnutls/include/gnutls" &&    cf_search="$cf_search $cf_subdir_prefix/gnutls/include/gnutls"
18196}
18197
18198done
18199
18200test "$includedir" != NONE && \
18201test "$includedir" != "/usr/include" && \
18202test -d "$includedir" && {
18203	test -d "$includedir" &&    cf_search="$cf_search $includedir"
18204	test -d "$includedir/gnutls" && cf_search="$cf_search $includedir/gnutls"
18205}
18206
18207test "$oldincludedir" != NONE && \
18208test "$oldincludedir" != "/usr/include" && \
18209test -d "$oldincludedir" && {
18210	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
18211	test -d "$oldincludedir/gnutls" && cf_search="$cf_search $oldincludedir/gnutls"
18212}
18213
18214cf_search="$cf_search $cf_header_path_list"
18215
18216	for cf_cv_header_path_gnutls in $cf_search
18217	do
18218		if test -d "$cf_cv_header_path_gnutls" ; then
18219			test -n "$verbose" && echo "	... testing $cf_cv_header_path_gnutls" 1>&6
18220
18221echo "${as_me:-configure}:18221: testing ... testing $cf_cv_header_path_gnutls ..." 1>&5
18222
18223			CPPFLAGS="$cf_save_CPPFLAGS"
18224
18225	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18226	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_gnutls"
18227
18228			cat >"conftest.$ac_ext" <<_ACEOF
18229#line 18229 "configure"
18230#include "confdefs.h"
18231
18232#include <stdio.h>
18233#if defined(USE_OPENSSL_INCL)
18234#include <openssl/ssl.h>
18235#elif defined(USE_GNUTLS_FUNCS)
18236#include <gnutls/gnutls.h>
18237#elif defined(USE_GNUTLS_INCL)
18238#include <gnutls/openssl.h>
18239#else
18240#include <ssl.h>
18241#endif
18242
18243int
18244main (void)
18245{
18246
18247#ifdef USE_GNUTLS_FUNCS
18248    gnutls_global_init();
18249#else
18250    SSL_shutdown((SSL *)0)
18251#endif
18252
18253  ;
18254  return 0;
18255}
18256_ACEOF
18257rm -f "conftest.$ac_objext"
18258if { (eval echo "$as_me:18258: \"$ac_compile\"") >&5
18259  (eval $ac_compile) 2>&5
18260  ac_status=$?
18261  echo "$as_me:18261: \$? = $ac_status" >&5
18262  (exit "$ac_status"); } &&
18263         { ac_try='test -s "conftest.$ac_objext"'
18264  { (eval echo "$as_me:18264: \"$ac_try\"") >&5
18265  (eval $ac_try) 2>&5
18266  ac_status=$?
18267  echo "$as_me:18267: \$? = $ac_status" >&5
18268  (exit "$ac_status"); }; }; then
18269
18270				test -n "$verbose" && echo "	... found gnutls headers in $cf_cv_header_path_gnutls" 1>&6
18271
18272echo "${as_me:-configure}:18272: testing ... found gnutls headers in $cf_cv_header_path_gnutls ..." 1>&5
18273
18274				cf_cv_find_linkage_gnutls=maybe
18275				cf_test_CPPFLAGS="$CPPFLAGS"
18276				break
18277else
18278  echo "$as_me: failed program was:" >&5
18279cat "conftest.$ac_ext" >&5
18280
18281				CPPFLAGS="$cf_save_CPPFLAGS"
18282
18283fi
18284rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18285		fi
18286	done
18287
18288	if test "$cf_cv_find_linkage_gnutls" = maybe ; then
18289
18290echo "${as_me:-configure}:18290: testing Searching for gnutls library in FIND_LINKAGE(gnutls,) ..." 1>&5
18291
18292		cf_save_LIBS="$LIBS"
18293		cf_save_LDFLAGS="$LDFLAGS"
18294
18295		if test "$cf_cv_find_linkage_gnutls" != yes ; then
18296
18297cf_search=
18298cf_library_path_list=""
18299if test -n "${LDFLAGS}${LIBS}" ; then
18300	for cf_library_path in $LDFLAGS $LIBS
18301	do
18302		case "$cf_library_path" in
18303		(-L*)
18304			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
18305
18306test "x$cf_library_path" != "xNONE" && \
18307test -d "$cf_library_path" && \
18308 {
18309	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
18310	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
18311	test -d "$cf_library_path/lib/gnutls" &&       cf_search="$cf_search $cf_library_path/lib/gnutls"
18312	test -d "$cf_library_path/lib/gnutls/lib" &&    cf_search="$cf_search $cf_library_path/lib/gnutls/lib"
18313	test -d "$cf_library_path/gnutls/lib" &&       cf_search="$cf_search $cf_library_path/gnutls/lib"
18314	test -d "$cf_library_path/gnutls/lib/gnutls" &&    cf_search="$cf_search $cf_library_path/gnutls/lib/gnutls"
18315}
18316
18317			cf_library_path_list="$cf_library_path_list $cf_search"
18318			;;
18319		esac
18320	done
18321fi
18322
18323cf_search=
18324
18325test "x$prefix" != "xNONE" && \
18326test -d "$prefix" && \
18327 {
18328	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
18329	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
18330	test -d "$prefix/lib/gnutls" &&       cf_search="$cf_search $prefix/lib/gnutls"
18331	test -d "$prefix/lib/gnutls/lib" &&    cf_search="$cf_search $prefix/lib/gnutls/lib"
18332	test -d "$prefix/gnutls/lib" &&       cf_search="$cf_search $prefix/gnutls/lib"
18333	test -d "$prefix/gnutls/lib/gnutls" &&    cf_search="$cf_search $prefix/gnutls/lib/gnutls"
18334}
18335
18336for cf_subdir_prefix in \
18337	/usr \
18338	/usr/local \
18339	/usr/pkg \
18340	/opt \
18341	/opt/local \
18342	$HOME
18343do
18344
18345test "x$cf_subdir_prefix" != "x$prefix" && \
18346test -d "$cf_subdir_prefix" && \
18347{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
18348	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
18349	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
18350	test -d "$cf_subdir_prefix/lib/gnutls" &&       cf_search="$cf_search $cf_subdir_prefix/lib/gnutls"
18351	test -d "$cf_subdir_prefix/lib/gnutls/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/gnutls/lib"
18352	test -d "$cf_subdir_prefix/gnutls/lib" &&       cf_search="$cf_search $cf_subdir_prefix/gnutls/lib"
18353	test -d "$cf_subdir_prefix/gnutls/lib/gnutls" &&    cf_search="$cf_search $cf_subdir_prefix/gnutls/lib/gnutls"
18354}
18355
18356done
18357
18358cf_search="$cf_library_path_list $cf_search"
18359
18360			for cf_cv_library_path_gnutls in $cf_search
18361			do
18362				if test -d "$cf_cv_library_path_gnutls" ; then
18363					test -n "$verbose" && echo "	... testing $cf_cv_library_path_gnutls" 1>&6
18364
18365echo "${as_me:-configure}:18365: testing ... testing $cf_cv_library_path_gnutls ..." 1>&5
18366
18367					CPPFLAGS="$cf_test_CPPFLAGS"
18368					LIBS="-lgnutls  $cf_save_LIBS"
18369					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_gnutls"
18370					cat >"conftest.$ac_ext" <<_ACEOF
18371#line 18371 "configure"
18372#include "confdefs.h"
18373
18374#include <stdio.h>
18375#if defined(USE_OPENSSL_INCL)
18376#include <openssl/ssl.h>
18377#elif defined(USE_GNUTLS_FUNCS)
18378#include <gnutls/gnutls.h>
18379#elif defined(USE_GNUTLS_INCL)
18380#include <gnutls/openssl.h>
18381#else
18382#include <ssl.h>
18383#endif
18384
18385int
18386main (void)
18387{
18388
18389#ifdef USE_GNUTLS_FUNCS
18390    gnutls_global_init();
18391#else
18392    SSL_shutdown((SSL *)0)
18393#endif
18394
18395  ;
18396  return 0;
18397}
18398_ACEOF
18399rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18400if { (eval echo "$as_me:18400: \"$ac_link\"") >&5
18401  (eval $ac_link) 2>&5
18402  ac_status=$?
18403  echo "$as_me:18403: \$? = $ac_status" >&5
18404  (exit "$ac_status"); } &&
18405         { ac_try='test -s "conftest$ac_exeext"'
18406  { (eval echo "$as_me:18406: \"$ac_try\"") >&5
18407  (eval $ac_try) 2>&5
18408  ac_status=$?
18409  echo "$as_me:18409: \$? = $ac_status" >&5
18410  (exit "$ac_status"); }; }; then
18411
18412					test -n "$verbose" && echo "	... found gnutls library in $cf_cv_library_path_gnutls" 1>&6
18413
18414echo "${as_me:-configure}:18414: testing ... found gnutls library in $cf_cv_library_path_gnutls ..." 1>&5
18415
18416					cf_cv_find_linkage_gnutls=yes
18417					cf_cv_library_file_gnutls="-lgnutls"
18418					break
18419else
18420  echo "$as_me: failed program was:" >&5
18421cat "conftest.$ac_ext" >&5
18422
18423					CPPFLAGS="$cf_save_CPPFLAGS"
18424					LIBS="$cf_save_LIBS"
18425					LDFLAGS="$cf_save_LDFLAGS"
18426
18427fi
18428rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18429				fi
18430			done
18431			CPPFLAGS="$cf_save_CPPFLAGS"
18432			LDFLAGS="$cf_save_LDFLAGS"
18433		fi
18434
18435	else
18436		cf_cv_find_linkage_gnutls=no
18437	fi
18438
18439fi
18440rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18441
18442fi
18443rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18444
18445LIBS="$cf_save_LIBS"
18446
18447if test "$cf_cv_find_linkage_gnutls" = yes ; then
18448cf_cv_have_gnutls=yes
18449else
18450cf_cv_have_gnutls=no
18451fi
18452
18453		CPPFLAGS=$cf_gnutls_CPPFLAGS
18454	fi
18455
18456	if test "$cf_cv_have_gnutls" = yes ; then
18457		if test -n "$cf_cv_header_path_gnutls" ; then
18458			cat >>confdefs.h <<\EOF
18459#define USE_SSL 1
18460EOF
18461
18462			case "$cf_cv_header_path_gnutls" in
18463			(/usr/include/gnutls)
18464				;;
18465			(*)
18466
18467if test -n "$cf_cv_header_path_gnutls" ; then
18468  for cf_add_incdir in $cf_cv_header_path_gnutls
18469  do
18470	while test "$cf_add_incdir" != /usr/include
18471	do
18472	  if test -d "$cf_add_incdir"
18473	  then
18474		cf_have_incdir=no
18475		if test -n "$CFLAGS$CPPFLAGS" ; then
18476		  # a loop is needed to ensure we can add subdirs of existing dirs
18477		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18478			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18479			  cf_have_incdir=yes; break
18480			fi
18481		  done
18482		fi
18483
18484		if test "$cf_have_incdir" = no ; then
18485		  if test "$cf_add_incdir" = /usr/local/include ; then
18486			if test "$GCC" = yes
18487			then
18488			  cf_save_CPPFLAGS=$CPPFLAGS
18489
18490	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18491	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18492
18493			  cat >"conftest.$ac_ext" <<_ACEOF
18494#line 18494 "configure"
18495#include "confdefs.h"
18496#include <stdio.h>
18497int
18498main (void)
18499{
18500printf("Hello")
18501  ;
18502  return 0;
18503}
18504_ACEOF
18505rm -f "conftest.$ac_objext"
18506if { (eval echo "$as_me:18506: \"$ac_compile\"") >&5
18507  (eval $ac_compile) 2>&5
18508  ac_status=$?
18509  echo "$as_me:18509: \$? = $ac_status" >&5
18510  (exit "$ac_status"); } &&
18511         { ac_try='test -s "conftest.$ac_objext"'
18512  { (eval echo "$as_me:18512: \"$ac_try\"") >&5
18513  (eval $ac_try) 2>&5
18514  ac_status=$?
18515  echo "$as_me:18515: \$? = $ac_status" >&5
18516  (exit "$ac_status"); }; }; then
18517  :
18518else
18519  echo "$as_me: failed program was:" >&5
18520cat "conftest.$ac_ext" >&5
18521cf_have_incdir=yes
18522fi
18523rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18524			  CPPFLAGS=$cf_save_CPPFLAGS
18525			fi
18526		  fi
18527		fi
18528
18529		if test "$cf_have_incdir" = no ; then
18530		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
18531
18532echo "${as_me:-configure}:18532: testing adding $cf_add_incdir to include-path ..." 1>&5
18533
18534		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18535
18536		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18537		  test "$cf_top_incdir" = "$cf_add_incdir" && break
18538		  cf_add_incdir="$cf_top_incdir"
18539		else
18540		  break
18541		fi
18542	  else
18543		break
18544	  fi
18545	done
18546  done
18547fi
18548
18549				;;
18550			esac
18551		fi
18552		if test -n "$cf_cv_library_path_gnutls" ; then
18553
18554if test -n "$cf_cv_library_path_gnutls" ; then
18555	for cf_add_libdir in $cf_cv_library_path_gnutls
18556	do
18557		if test "$cf_add_libdir" = /usr/lib ; then
18558			:
18559		elif test -d "$cf_add_libdir"
18560		then
18561			cf_have_libdir=no
18562			if test -n "$LDFLAGS$LIBS" ; then
18563				# a loop is needed to ensure we can add subdirs of existing dirs
18564				for cf_test_libdir in $LDFLAGS $LIBS ; do
18565					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
18566						cf_have_libdir=yes; break
18567					fi
18568				done
18569			fi
18570			if test "$cf_have_libdir" = no ; then
18571				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
18572
18573echo "${as_me:-configure}:18573: testing adding $cf_add_libdir to library-path ..." 1>&5
18574
18575				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
18576			fi
18577		fi
18578	done
18579fi
18580
18581		fi
18582
18583cf_add_libs="$LIBS"
18584# reverse order
18585cf_add_0lib=
18586for cf_add_1lib in -lgnutls; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18587# filter duplicates
18588for cf_add_1lib in $cf_add_0lib; do
18589	for cf_add_2lib in $cf_add_libs; do
18590		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18591			cf_add_1lib=
18592			break
18593		fi
18594	done
18595	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18596done
18597LIBS="$cf_add_libs"
18598
18599for ac_func in gnutls_protocol_set_priority
18600do
18601as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
18602echo "$as_me:18602: checking for $ac_func" >&5
18603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
18604if eval "test \"\${$as_ac_var+set}\" = set"; then
18605  echo $ECHO_N "(cached) $ECHO_C" >&6
18606else
18607  cat >"conftest.$ac_ext" <<_ACEOF
18608#line 18608 "configure"
18609#include "confdefs.h"
18610#define $ac_func autoconf_temporary
18611#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18612#undef $ac_func
18613
18614#ifdef __cplusplus
18615extern "C"
18616#endif
18617
18618/* We use char because int might match the return type of a gcc2
18619   builtin and then its argument prototype would still apply.  */
18620char $ac_func (void);
18621
18622int
18623main (void)
18624{
18625
18626/* The GNU C library defines stubs for functions which it implements
18627    to always fail with ENOSYS.  Some functions are actually named
18628    something starting with __ and the normal name is an alias.  */
18629#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
18630#error found stub for $ac_func
18631#endif
18632
18633	return $ac_func ();
18634  ;
18635  return 0;
18636}
18637_ACEOF
18638rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18639if { (eval echo "$as_me:18639: \"$ac_link\"") >&5
18640  (eval $ac_link) 2>&5
18641  ac_status=$?
18642  echo "$as_me:18642: \$? = $ac_status" >&5
18643  (exit "$ac_status"); } &&
18644         { ac_try='test -s "conftest$ac_exeext"'
18645  { (eval echo "$as_me:18645: \"$ac_try\"") >&5
18646  (eval $ac_try) 2>&5
18647  ac_status=$?
18648  echo "$as_me:18648: \$? = $ac_status" >&5
18649  (exit "$ac_status"); }; }; then
18650  eval "$as_ac_var=yes"
18651else
18652  echo "$as_me: failed program was:" >&5
18653cat "conftest.$ac_ext" >&5
18654eval "$as_ac_var=no"
18655fi
18656rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18657fi
18658echo "$as_me:18658: result: `eval echo '${'"$as_ac_var"'}'`" >&5
18659echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
18660if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
18661  cat >>confdefs.h <<EOF
18662#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
18663EOF
18664
18665fi
18666done
18667
18668		echo "$as_me:18668: checking for gnutls_rnd" >&5
18669echo $ECHO_N "checking for gnutls_rnd... $ECHO_C" >&6
18670if test "${ac_cv_func_gnutls_rnd+set}" = set; then
18671  echo $ECHO_N "(cached) $ECHO_C" >&6
18672else
18673  cat >"conftest.$ac_ext" <<_ACEOF
18674#line 18674 "configure"
18675#include "confdefs.h"
18676#define gnutls_rnd autoconf_temporary
18677#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
18678#undef gnutls_rnd
18679
18680#ifdef __cplusplus
18681extern "C"
18682#endif
18683
18684/* We use char because int might match the return type of a gcc2
18685   builtin and then its argument prototype would still apply.  */
18686char gnutls_rnd (void);
18687
18688int
18689main (void)
18690{
18691
18692/* The GNU C library defines stubs for functions which it implements
18693    to always fail with ENOSYS.  Some functions are actually named
18694    something starting with __ and the normal name is an alias.  */
18695#if defined (__stub_gnutls_rnd) || defined (__stub___gnutls_rnd)
18696#error found stub for gnutls_rnd
18697#endif
18698
18699	return gnutls_rnd ();
18700  ;
18701  return 0;
18702}
18703_ACEOF
18704rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18705if { (eval echo "$as_me:18705: \"$ac_link\"") >&5
18706  (eval $ac_link) 2>&5
18707  ac_status=$?
18708  echo "$as_me:18708: \$? = $ac_status" >&5
18709  (exit "$ac_status"); } &&
18710         { ac_try='test -s "conftest$ac_exeext"'
18711  { (eval echo "$as_me:18711: \"$ac_try\"") >&5
18712  (eval $ac_try) 2>&5
18713  ac_status=$?
18714  echo "$as_me:18714: \$? = $ac_status" >&5
18715  (exit "$ac_status"); }; }; then
18716  ac_cv_func_gnutls_rnd=yes
18717else
18718  echo "$as_me: failed program was:" >&5
18719cat "conftest.$ac_ext" >&5
18720ac_cv_func_gnutls_rnd=no
18721fi
18722rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18723fi
18724echo "$as_me:18724: result: $ac_cv_func_gnutls_rnd" >&5
18725echo "${ECHO_T}$ac_cv_func_gnutls_rnd" >&6
18726if test "$ac_cv_func_gnutls_rnd" = yes; then
18727
18728cat >>confdefs.h <<\EOF
18729#define HAVE_GNUTLS_RND 1
18730EOF
18731
18732else
18733
18734cf_add_libs="$LIBS"
18735# reverse order
18736cf_add_0lib=
18737for cf_add_1lib in -lgcrypt; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
18738# filter duplicates
18739for cf_add_1lib in $cf_add_0lib; do
18740	for cf_add_2lib in $cf_add_libs; do
18741		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
18742			cf_add_1lib=
18743			break
18744		fi
18745	done
18746	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
18747done
18748LIBS="$cf_add_libs"
18749
18750fi
18751
18752		EXTRA_OBJS="$EXTRA_OBJS tidy_tls\$o"
18753
18754echo "$as_me:18754: checking for X509 support" >&5
18755echo $ECHO_N "checking for X509 support... $ECHO_C" >&6
18756cat >"conftest.$ac_ext" <<_ACEOF
18757#line 18757 "configure"
18758#include "confdefs.h"
18759
18760#include <stdio.h>
18761#if defined(USE_OPENSSL_INCL)
18762#include <openssl/ssl.h>
18763#elif defined(USE_GNUTLS_FUNCS)
18764#include <gnutls/gnutls.h>
18765#elif defined(USE_GNUTLS_INCL)
18766#include <gnutls/openssl.h>
18767#else
18768#include <ssl.h>
18769#endif
18770
18771#if defined(USE_GNUTLS_INCL)
18772#include <gnutls/x509.h>
18773#else
18774#include <openssl/x509.h>
18775#endif
18776
18777int
18778main (void)
18779{
18780X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
18781  ;
18782  return 0;
18783}
18784_ACEOF
18785rm -f "conftest.$ac_objext" "conftest$ac_exeext"
18786if { (eval echo "$as_me:18786: \"$ac_link\"") >&5
18787  (eval $ac_link) 2>&5
18788  ac_status=$?
18789  echo "$as_me:18789: \$? = $ac_status" >&5
18790  (exit "$ac_status"); } &&
18791         { ac_try='test -s "conftest$ac_exeext"'
18792  { (eval echo "$as_me:18792: \"$ac_try\"") >&5
18793  (eval $ac_try) 2>&5
18794  ac_status=$?
18795  echo "$as_me:18795: \$? = $ac_status" >&5
18796  (exit "$ac_status"); }; }; then
18797  cf_x509_support=yes
18798else
18799  echo "$as_me: failed program was:" >&5
18800cat "conftest.$ac_ext" >&5
18801cf_x509_support=no
18802fi
18803rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
18804echo "$as_me:18804: result: $cf_x509_support" >&5
18805echo "${ECHO_T}$cf_x509_support" >&6
18806
18807if test "$cf_x509_support" = yes ; then
18808	cat >>confdefs.h <<\EOF
18809#define USE_X509_SUPPORT 1
18810EOF
18811
18812fi
18813
18814	fi
18815
18816    else
18817
18818	cf_cv_have_gnutls=no
18819	cf_cv_pkg_config_ssl=no
18820
18821case "$cf_cv_use_libgnutls" in
18822(no)
18823	;;
18824(yes)
18825	;;
18826(*)
18827
18828for cf_searchpath in `echo "$cf_cv_use_libgnutls" | tr $PATH_SEPARATOR ' '`; do
18829	if test -d "$cf_searchpath/include" ; then
18830
18831if test -n "$cf_searchpath/include" ; then
18832  for cf_add_incdir in $cf_searchpath/include
18833  do
18834	while test "$cf_add_incdir" != /usr/include
18835	do
18836	  if test -d "$cf_add_incdir"
18837	  then
18838		cf_have_incdir=no
18839		if test -n "$CFLAGS$CPPFLAGS" ; then
18840		  # a loop is needed to ensure we can add subdirs of existing dirs
18841		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18842			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18843			  cf_have_incdir=yes; break
18844			fi
18845		  done
18846		fi
18847
18848		if test "$cf_have_incdir" = no ; then
18849		  if test "$cf_add_incdir" = /usr/local/include ; then
18850			if test "$GCC" = yes
18851			then
18852			  cf_save_CPPFLAGS=$CPPFLAGS
18853
18854	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18855	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18856
18857			  cat >"conftest.$ac_ext" <<_ACEOF
18858#line 18858 "configure"
18859#include "confdefs.h"
18860#include <stdio.h>
18861int
18862main (void)
18863{
18864printf("Hello")
18865  ;
18866  return 0;
18867}
18868_ACEOF
18869rm -f "conftest.$ac_objext"
18870if { (eval echo "$as_me:18870: \"$ac_compile\"") >&5
18871  (eval $ac_compile) 2>&5
18872  ac_status=$?
18873  echo "$as_me:18873: \$? = $ac_status" >&5
18874  (exit "$ac_status"); } &&
18875         { ac_try='test -s "conftest.$ac_objext"'
18876  { (eval echo "$as_me:18876: \"$ac_try\"") >&5
18877  (eval $ac_try) 2>&5
18878  ac_status=$?
18879  echo "$as_me:18879: \$? = $ac_status" >&5
18880  (exit "$ac_status"); }; }; then
18881  :
18882else
18883  echo "$as_me: failed program was:" >&5
18884cat "conftest.$ac_ext" >&5
18885cf_have_incdir=yes
18886fi
18887rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18888			  CPPFLAGS=$cf_save_CPPFLAGS
18889			fi
18890		  fi
18891		fi
18892
18893		if test "$cf_have_incdir" = no ; then
18894		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
18895
18896echo "${as_me:-configure}:18896: testing adding $cf_add_incdir to include-path ..." 1>&5
18897
18898		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18899
18900		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18901		  test "$cf_top_incdir" = "$cf_add_incdir" && break
18902		  cf_add_incdir="$cf_top_incdir"
18903		else
18904		  break
18905		fi
18906	  else
18907		break
18908	  fi
18909	done
18910  done
18911fi
18912
18913	elif test -d "$cf_searchpath/../include" ; then
18914
18915if test -n "$cf_searchpath/../include" ; then
18916  for cf_add_incdir in $cf_searchpath/../include
18917  do
18918	while test "$cf_add_incdir" != /usr/include
18919	do
18920	  if test -d "$cf_add_incdir"
18921	  then
18922		cf_have_incdir=no
18923		if test -n "$CFLAGS$CPPFLAGS" ; then
18924		  # a loop is needed to ensure we can add subdirs of existing dirs
18925		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
18926			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
18927			  cf_have_incdir=yes; break
18928			fi
18929		  done
18930		fi
18931
18932		if test "$cf_have_incdir" = no ; then
18933		  if test "$cf_add_incdir" = /usr/local/include ; then
18934			if test "$GCC" = yes
18935			then
18936			  cf_save_CPPFLAGS=$CPPFLAGS
18937
18938	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
18939	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
18940
18941			  cat >"conftest.$ac_ext" <<_ACEOF
18942#line 18942 "configure"
18943#include "confdefs.h"
18944#include <stdio.h>
18945int
18946main (void)
18947{
18948printf("Hello")
18949  ;
18950  return 0;
18951}
18952_ACEOF
18953rm -f "conftest.$ac_objext"
18954if { (eval echo "$as_me:18954: \"$ac_compile\"") >&5
18955  (eval $ac_compile) 2>&5
18956  ac_status=$?
18957  echo "$as_me:18957: \$? = $ac_status" >&5
18958  (exit "$ac_status"); } &&
18959         { ac_try='test -s "conftest.$ac_objext"'
18960  { (eval echo "$as_me:18960: \"$ac_try\"") >&5
18961  (eval $ac_try) 2>&5
18962  ac_status=$?
18963  echo "$as_me:18963: \$? = $ac_status" >&5
18964  (exit "$ac_status"); }; }; then
18965  :
18966else
18967  echo "$as_me: failed program was:" >&5
18968cat "conftest.$ac_ext" >&5
18969cf_have_incdir=yes
18970fi
18971rm -f "conftest.$ac_objext" "conftest.$ac_ext"
18972			  CPPFLAGS=$cf_save_CPPFLAGS
18973			fi
18974		  fi
18975		fi
18976
18977		if test "$cf_have_incdir" = no ; then
18978		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
18979
18980echo "${as_me:-configure}:18980: testing adding $cf_add_incdir to include-path ..." 1>&5
18981
18982		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
18983
18984		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
18985		  test "$cf_top_incdir" = "$cf_add_incdir" && break
18986		  cf_add_incdir="$cf_top_incdir"
18987		else
18988		  break
18989		fi
18990	  else
18991		break
18992	  fi
18993	done
18994  done
18995fi
18996
18997	else
18998{ { echo "$as_me:18998: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
18999echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
19000   { (exit 1); exit 1; }; }
19001	fi
19002	if test -d "$cf_searchpath/lib" ; then
19003
19004if test -n "$cf_searchpath/lib" ; then
19005	for cf_add_libdir in $cf_searchpath/lib
19006	do
19007		if test "$cf_add_libdir" = /usr/lib ; then
19008			:
19009		elif test -d "$cf_add_libdir"
19010		then
19011			cf_have_libdir=no
19012			if test -n "$LDFLAGS$LIBS" ; then
19013				# a loop is needed to ensure we can add subdirs of existing dirs
19014				for cf_test_libdir in $LDFLAGS $LIBS ; do
19015					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19016						cf_have_libdir=yes; break
19017					fi
19018				done
19019			fi
19020			if test "$cf_have_libdir" = no ; then
19021				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
19022
19023echo "${as_me:-configure}:19023: testing adding $cf_add_libdir to library-path ..." 1>&5
19024
19025				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19026			fi
19027		fi
19028	done
19029fi
19030
19031	elif test -d "$cf_searchpath" ; then
19032
19033if test -n "$cf_searchpath" ; then
19034	for cf_add_libdir in $cf_searchpath
19035	do
19036		if test "$cf_add_libdir" = /usr/lib ; then
19037			:
19038		elif test -d "$cf_add_libdir"
19039		then
19040			cf_have_libdir=no
19041			if test -n "$LDFLAGS$LIBS" ; then
19042				# a loop is needed to ensure we can add subdirs of existing dirs
19043				for cf_test_libdir in $LDFLAGS $LIBS ; do
19044					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19045						cf_have_libdir=yes; break
19046					fi
19047				done
19048			fi
19049			if test "$cf_have_libdir" = no ; then
19050				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
19051
19052echo "${as_me:-configure}:19052: testing adding $cf_add_libdir to library-path ..." 1>&5
19053
19054				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19055			fi
19056		fi
19057	done
19058fi
19059
19060	else
19061{ { echo "$as_me:19061: error: cannot find ssl library under $cf_cv_use_libgnutls" >&5
19062echo "$as_me: error: cannot find ssl library under $cf_cv_use_libgnutls" >&2;}
19063   { (exit 1); exit 1; }; }
19064	fi
19065done
19066
19067	;;
19068esac
19069
19070	cf_pkg_gnutls=none
19071	if test "x$PKG_CONFIG" != xnone; then
19072		cf_pkg_gnutls=gnutls-openssl
19073		case "$cf_cv_use_libgnutls" in
19074		(no)
19075			;;
19076		(yes) # if no explicit directory given, try pkg-config
19077			test -n "$verbose" && echo "	checking pkg-config for $cf_pkg_gnutls" 1>&6
19078
19079echo "${as_me:-configure}:19079: testing checking pkg-config for $cf_pkg_gnutls ..." 1>&5
19080
19081			if "$PKG_CONFIG" --exists $cf_pkg_gnutls ; then
19082				test -n "$verbose" && echo "	... found $cf_pkg_gnutls in pkg-config" 1>&6
19083
19084echo "${as_me:-configure}:19084: testing ... found $cf_pkg_gnutls in pkg-config ..." 1>&5
19085
19086				cf_cv_have_gnutls=yes
19087				cf_cv_pkg_config_ssl=yes
19088
19089				cf_cflags_ssl=`$PKG_CONFIG --cflags $cf_pkg_gnutls`
19090				cf_libs_ssl=`$PKG_CONFIG --libs $cf_pkg_gnutls`
19091
19092				if test -n "$cf_cflags_ssl" ; then
19093					case "$cf_cflags_ssl" in
19094					(*-I*)
19095						cf_cv_header_path_gnutls=`echo "$cf_cflags_ssl" | sed -e 's/^.*-I//' -e 's/ .*//'`
19096						;;
19097					(*)
19098						cf_cv_header_path_gnutls=/usr/include
19099						;;
19100					esac
19101					if test -d "$cf_cv_header_path_gnutls/gnutls" ; then
19102						cf_cv_header_path_gnutls=$cf_cv_header_path_gnutls/gnutls
19103					fi
19104
19105cf_fix_cppflags=no
19106cf_new_cflags=
19107cf_new_cppflags=
19108cf_new_extra_cppflags=
19109
19110for cf_add_cflags in $cf_cflags_ssl
19111do
19112case "$cf_fix_cppflags" in
19113(no)
19114	case "$cf_add_cflags" in
19115	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
19116		case "$cf_add_cflags" in
19117		(-D*)
19118			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
19119
19120			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19121				&& test -z "${cf_tst_cflags}" \
19122				&& cf_fix_cppflags=yes
19123
19124			if test "$cf_fix_cppflags" = yes ; then
19125
19126	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19127	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19128
19129				continue
19130			elif test "${cf_tst_cflags}" = "\"'" ; then
19131
19132	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19133	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19134
19135				continue
19136			fi
19137			;;
19138		esac
19139		case "$CPPFLAGS" in
19140		(*$cf_add_cflags)
19141			;;
19142		(*)
19143			case "$cf_add_cflags" in
19144			(-D*)
19145				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
19146
19147CPPFLAGS=`echo "$CPPFLAGS" | \
19148	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
19149		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
19150
19151				;;
19152			esac
19153
19154	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
19155	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
19156
19157			;;
19158		esac
19159		;;
19160	(*)
19161
19162	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
19163	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
19164
19165		;;
19166	esac
19167	;;
19168(yes)
19169
19170	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
19171	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
19172
19173	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
19174
19175	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
19176		&& test -z "${cf_tst_cflags}" \
19177		&& cf_fix_cppflags=no
19178	;;
19179esac
19180done
19181
19182if test -n "$cf_new_cflags" ; then
19183
19184	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
19185	CFLAGS="${CFLAGS}$cf_new_cflags"
19186
19187fi
19188
19189if test -n "$cf_new_cppflags" ; then
19190
19191	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19192	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
19193
19194fi
19195
19196if test -n "$cf_new_extra_cppflags" ; then
19197
19198	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
19199	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
19200
19201fi
19202
19203				fi
19204
19205				if test -n "$cf_libs_ssl" ; then
19206					case "x$cf_libs_ssl" in
19207					(*-L*)
19208						cf_cv_library_path_gnutls=`echo "$cf_libs_ssl" | sed -e 's/^.*-L//' -e 's/ .*//'`
19209						;;
19210					(*)
19211						cf_cv_library_path_gnutls=/usr/lib
19212						;;
19213					esac
19214					test -n "$verbose" && echo "	adding $cf_libs_ssl to LIBS" 1>&6
19215
19216echo "${as_me:-configure}:19216: testing adding $cf_libs_ssl to LIBS ..." 1>&5
19217
19218cf_add_libs="$LIBS"
19219# reverse order
19220cf_add_0lib=
19221for cf_add_1lib in $cf_libs_ssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19222# filter duplicates
19223for cf_add_1lib in $cf_add_0lib; do
19224	for cf_add_2lib in $cf_add_libs; do
19225		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19226			cf_add_1lib=
19227			break
19228		fi
19229	done
19230	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19231done
19232LIBS="$cf_add_libs"
19233
19234				fi
19235			else
19236				test -n "$verbose" && echo "	... did not find $cf_pkg_gnutls in pkg-config" 1>&6
19237
19238echo "${as_me:-configure}:19238: testing ... did not find $cf_pkg_gnutls in pkg-config ..." 1>&5
19239
19240				cf_pkg_gnutls=none
19241			fi
19242			;;
19243		esac
19244	fi
19245
19246cat >>confdefs.h <<\EOF
19247#define USE_GNUTLS_INCL 1
19248EOF
19249
19250	if test "$cf_cv_have_gnutls" = no ; then
19251		cf_gnutls_CPPFLAGS=$CPPFLAGS
19252
19253# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
19254# will be set on completion of the AC_TRY_LINK below.
19255cf_cv_header_path_gnutls=
19256cf_cv_library_path_gnutls=
19257
19258echo "${as_me:-configure}:19258: testing Starting FIND_LINKAGE(gnutls,) ..." 1>&5
19259
19260cf_save_LIBS="$LIBS"
19261
19262cat >"conftest.$ac_ext" <<_ACEOF
19263#line 19263 "configure"
19264#include "confdefs.h"
19265
19266#include <stdio.h>
19267#if defined(USE_OPENSSL_INCL)
19268#include <openssl/ssl.h>
19269#elif defined(USE_GNUTLS_FUNCS)
19270#include <gnutls/gnutls.h>
19271#elif defined(USE_GNUTLS_INCL)
19272#include <gnutls/openssl.h>
19273#else
19274#include <ssl.h>
19275#endif
19276
19277int
19278main (void)
19279{
19280
19281#ifdef USE_GNUTLS_FUNCS
19282    gnutls_global_init();
19283#else
19284    SSL_shutdown((SSL *)0)
19285#endif
19286
19287  ;
19288  return 0;
19289}
19290_ACEOF
19291rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19292if { (eval echo "$as_me:19292: \"$ac_link\"") >&5
19293  (eval $ac_link) 2>&5
19294  ac_status=$?
19295  echo "$as_me:19295: \$? = $ac_status" >&5
19296  (exit "$ac_status"); } &&
19297         { ac_try='test -s "conftest$ac_exeext"'
19298  { (eval echo "$as_me:19298: \"$ac_try\"") >&5
19299  (eval $ac_try) 2>&5
19300  ac_status=$?
19301  echo "$as_me:19301: \$? = $ac_status" >&5
19302  (exit "$ac_status"); }; }; then
19303
19304	cf_cv_find_linkage_gnutls=yes
19305	cf_cv_header_path_gnutls=/usr/include
19306	cf_cv_library_path_gnutls=/usr/lib
19307
19308else
19309  echo "$as_me: failed program was:" >&5
19310cat "conftest.$ac_ext" >&5
19311
19312LIBS="-lgnutls -lgnutls-openssl $cf_save_LIBS"
19313
19314cat >"conftest.$ac_ext" <<_ACEOF
19315#line 19315 "configure"
19316#include "confdefs.h"
19317
19318#include <stdio.h>
19319#if defined(USE_OPENSSL_INCL)
19320#include <openssl/ssl.h>
19321#elif defined(USE_GNUTLS_FUNCS)
19322#include <gnutls/gnutls.h>
19323#elif defined(USE_GNUTLS_INCL)
19324#include <gnutls/openssl.h>
19325#else
19326#include <ssl.h>
19327#endif
19328
19329int
19330main (void)
19331{
19332
19333#ifdef USE_GNUTLS_FUNCS
19334    gnutls_global_init();
19335#else
19336    SSL_shutdown((SSL *)0)
19337#endif
19338
19339  ;
19340  return 0;
19341}
19342_ACEOF
19343rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19344if { (eval echo "$as_me:19344: \"$ac_link\"") >&5
19345  (eval $ac_link) 2>&5
19346  ac_status=$?
19347  echo "$as_me:19347: \$? = $ac_status" >&5
19348  (exit "$ac_status"); } &&
19349         { ac_try='test -s "conftest$ac_exeext"'
19350  { (eval echo "$as_me:19350: \"$ac_try\"") >&5
19351  (eval $ac_try) 2>&5
19352  ac_status=$?
19353  echo "$as_me:19353: \$? = $ac_status" >&5
19354  (exit "$ac_status"); }; }; then
19355
19356	cf_cv_find_linkage_gnutls=yes
19357	cf_cv_header_path_gnutls=/usr/include
19358	cf_cv_library_path_gnutls=/usr/lib
19359	cf_cv_library_file_gnutls="-lgnutls"
19360
19361else
19362  echo "$as_me: failed program was:" >&5
19363cat "conftest.$ac_ext" >&5
19364
19365	cf_cv_find_linkage_gnutls=no
19366	LIBS="$cf_save_LIBS"
19367
19368	test -n "$verbose" && echo "	find linkage for gnutls library" 1>&6
19369
19370echo "${as_me:-configure}:19370: testing find linkage for gnutls library ..." 1>&5
19371
19372echo "${as_me:-configure}:19372: testing Searching for headers in FIND_LINKAGE(gnutls,) ..." 1>&5
19373
19374	cf_save_CPPFLAGS="$CPPFLAGS"
19375	cf_test_CPPFLAGS="$CPPFLAGS"
19376
19377cf_search=
19378
19379# collect the current set of include-directories from compiler flags
19380cf_header_path_list=""
19381if test -n "${CFLAGS}${CPPFLAGS}" ; then
19382	for cf_header_path in $CPPFLAGS $CFLAGS
19383	do
19384		case "$cf_header_path" in
19385		(-I*)
19386			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
19387
19388test "x$cf_header_path" != "xNONE" && \
19389test -d "$cf_header_path" && \
19390 {
19391	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
19392	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
19393	test -d "$cf_header_path/include/gnutls" &&       cf_search="$cf_search $cf_header_path/include/gnutls"
19394	test -d "$cf_header_path/include/gnutls/include" &&    cf_search="$cf_search $cf_header_path/include/gnutls/include"
19395	test -d "$cf_header_path/gnutls/include" &&       cf_search="$cf_search $cf_header_path/gnutls/include"
19396	test -d "$cf_header_path/gnutls/include/gnutls" &&    cf_search="$cf_search $cf_header_path/gnutls/include/gnutls"
19397}
19398
19399			cf_header_path_list="$cf_header_path_list $cf_search"
19400			;;
19401		esac
19402	done
19403fi
19404
19405# add the variations for the package we are looking for
19406
19407cf_search=
19408
19409test "x$prefix" != "xNONE" && \
19410test -d "$prefix" && \
19411 {
19412	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
19413	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
19414	test -d "$prefix/include/gnutls" &&       cf_search="$cf_search $prefix/include/gnutls"
19415	test -d "$prefix/include/gnutls/include" &&    cf_search="$cf_search $prefix/include/gnutls/include"
19416	test -d "$prefix/gnutls/include" &&       cf_search="$cf_search $prefix/gnutls/include"
19417	test -d "$prefix/gnutls/include/gnutls" &&    cf_search="$cf_search $prefix/gnutls/include/gnutls"
19418}
19419
19420for cf_subdir_prefix in \
19421	/usr \
19422	/usr/local \
19423	/usr/pkg \
19424	/opt \
19425	/opt/local \
19426	$HOME
19427do
19428
19429test "x$cf_subdir_prefix" != "x$prefix" && \
19430test -d "$cf_subdir_prefix" && \
19431{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
19432	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
19433	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
19434	test -d "$cf_subdir_prefix/include/gnutls" &&       cf_search="$cf_search $cf_subdir_prefix/include/gnutls"
19435	test -d "$cf_subdir_prefix/include/gnutls/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/gnutls/include"
19436	test -d "$cf_subdir_prefix/gnutls/include" &&       cf_search="$cf_search $cf_subdir_prefix/gnutls/include"
19437	test -d "$cf_subdir_prefix/gnutls/include/gnutls" &&    cf_search="$cf_search $cf_subdir_prefix/gnutls/include/gnutls"
19438}
19439
19440done
19441
19442test "$includedir" != NONE && \
19443test "$includedir" != "/usr/include" && \
19444test -d "$includedir" && {
19445	test -d "$includedir" &&    cf_search="$cf_search $includedir"
19446	test -d "$includedir/gnutls" && cf_search="$cf_search $includedir/gnutls"
19447}
19448
19449test "$oldincludedir" != NONE && \
19450test "$oldincludedir" != "/usr/include" && \
19451test -d "$oldincludedir" && {
19452	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
19453	test -d "$oldincludedir/gnutls" && cf_search="$cf_search $oldincludedir/gnutls"
19454}
19455
19456cf_search="$cf_search $cf_header_path_list"
19457
19458	for cf_cv_header_path_gnutls in $cf_search
19459	do
19460		if test -d "$cf_cv_header_path_gnutls" ; then
19461			test -n "$verbose" && echo "	... testing $cf_cv_header_path_gnutls" 1>&6
19462
19463echo "${as_me:-configure}:19463: testing ... testing $cf_cv_header_path_gnutls ..." 1>&5
19464
19465			CPPFLAGS="$cf_save_CPPFLAGS"
19466
19467	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19468	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_gnutls"
19469
19470			cat >"conftest.$ac_ext" <<_ACEOF
19471#line 19471 "configure"
19472#include "confdefs.h"
19473
19474#include <stdio.h>
19475#if defined(USE_OPENSSL_INCL)
19476#include <openssl/ssl.h>
19477#elif defined(USE_GNUTLS_FUNCS)
19478#include <gnutls/gnutls.h>
19479#elif defined(USE_GNUTLS_INCL)
19480#include <gnutls/openssl.h>
19481#else
19482#include <ssl.h>
19483#endif
19484
19485int
19486main (void)
19487{
19488
19489#ifdef USE_GNUTLS_FUNCS
19490    gnutls_global_init();
19491#else
19492    SSL_shutdown((SSL *)0)
19493#endif
19494
19495  ;
19496  return 0;
19497}
19498_ACEOF
19499rm -f "conftest.$ac_objext"
19500if { (eval echo "$as_me:19500: \"$ac_compile\"") >&5
19501  (eval $ac_compile) 2>&5
19502  ac_status=$?
19503  echo "$as_me:19503: \$? = $ac_status" >&5
19504  (exit "$ac_status"); } &&
19505         { ac_try='test -s "conftest.$ac_objext"'
19506  { (eval echo "$as_me:19506: \"$ac_try\"") >&5
19507  (eval $ac_try) 2>&5
19508  ac_status=$?
19509  echo "$as_me:19509: \$? = $ac_status" >&5
19510  (exit "$ac_status"); }; }; then
19511
19512				test -n "$verbose" && echo "	... found gnutls headers in $cf_cv_header_path_gnutls" 1>&6
19513
19514echo "${as_me:-configure}:19514: testing ... found gnutls headers in $cf_cv_header_path_gnutls ..." 1>&5
19515
19516				cf_cv_find_linkage_gnutls=maybe
19517				cf_test_CPPFLAGS="$CPPFLAGS"
19518				break
19519else
19520  echo "$as_me: failed program was:" >&5
19521cat "conftest.$ac_ext" >&5
19522
19523				CPPFLAGS="$cf_save_CPPFLAGS"
19524
19525fi
19526rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19527		fi
19528	done
19529
19530	if test "$cf_cv_find_linkage_gnutls" = maybe ; then
19531
19532echo "${as_me:-configure}:19532: testing Searching for gnutls library in FIND_LINKAGE(gnutls,) ..." 1>&5
19533
19534		cf_save_LIBS="$LIBS"
19535		cf_save_LDFLAGS="$LDFLAGS"
19536
19537		if test "$cf_cv_find_linkage_gnutls" != yes ; then
19538
19539cf_search=
19540cf_library_path_list=""
19541if test -n "${LDFLAGS}${LIBS}" ; then
19542	for cf_library_path in $LDFLAGS $LIBS
19543	do
19544		case "$cf_library_path" in
19545		(-L*)
19546			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
19547
19548test "x$cf_library_path" != "xNONE" && \
19549test -d "$cf_library_path" && \
19550 {
19551	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
19552	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
19553	test -d "$cf_library_path/lib/gnutls" &&       cf_search="$cf_search $cf_library_path/lib/gnutls"
19554	test -d "$cf_library_path/lib/gnutls/lib" &&    cf_search="$cf_search $cf_library_path/lib/gnutls/lib"
19555	test -d "$cf_library_path/gnutls/lib" &&       cf_search="$cf_search $cf_library_path/gnutls/lib"
19556	test -d "$cf_library_path/gnutls/lib/gnutls" &&    cf_search="$cf_search $cf_library_path/gnutls/lib/gnutls"
19557}
19558
19559			cf_library_path_list="$cf_library_path_list $cf_search"
19560			;;
19561		esac
19562	done
19563fi
19564
19565cf_search=
19566
19567test "x$prefix" != "xNONE" && \
19568test -d "$prefix" && \
19569 {
19570	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
19571	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
19572	test -d "$prefix/lib/gnutls" &&       cf_search="$cf_search $prefix/lib/gnutls"
19573	test -d "$prefix/lib/gnutls/lib" &&    cf_search="$cf_search $prefix/lib/gnutls/lib"
19574	test -d "$prefix/gnutls/lib" &&       cf_search="$cf_search $prefix/gnutls/lib"
19575	test -d "$prefix/gnutls/lib/gnutls" &&    cf_search="$cf_search $prefix/gnutls/lib/gnutls"
19576}
19577
19578for cf_subdir_prefix in \
19579	/usr \
19580	/usr/local \
19581	/usr/pkg \
19582	/opt \
19583	/opt/local \
19584	$HOME
19585do
19586
19587test "x$cf_subdir_prefix" != "x$prefix" && \
19588test -d "$cf_subdir_prefix" && \
19589{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
19590	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
19591	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
19592	test -d "$cf_subdir_prefix/lib/gnutls" &&       cf_search="$cf_search $cf_subdir_prefix/lib/gnutls"
19593	test -d "$cf_subdir_prefix/lib/gnutls/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/gnutls/lib"
19594	test -d "$cf_subdir_prefix/gnutls/lib" &&       cf_search="$cf_search $cf_subdir_prefix/gnutls/lib"
19595	test -d "$cf_subdir_prefix/gnutls/lib/gnutls" &&    cf_search="$cf_search $cf_subdir_prefix/gnutls/lib/gnutls"
19596}
19597
19598done
19599
19600cf_search="$cf_library_path_list $cf_search"
19601
19602			for cf_cv_library_path_gnutls in $cf_search
19603			do
19604				if test -d "$cf_cv_library_path_gnutls" ; then
19605					test -n "$verbose" && echo "	... testing $cf_cv_library_path_gnutls" 1>&6
19606
19607echo "${as_me:-configure}:19607: testing ... testing $cf_cv_library_path_gnutls ..." 1>&5
19608
19609					CPPFLAGS="$cf_test_CPPFLAGS"
19610					LIBS="-lgnutls -lgnutls-openssl $cf_save_LIBS"
19611					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_gnutls"
19612					cat >"conftest.$ac_ext" <<_ACEOF
19613#line 19613 "configure"
19614#include "confdefs.h"
19615
19616#include <stdio.h>
19617#if defined(USE_OPENSSL_INCL)
19618#include <openssl/ssl.h>
19619#elif defined(USE_GNUTLS_FUNCS)
19620#include <gnutls/gnutls.h>
19621#elif defined(USE_GNUTLS_INCL)
19622#include <gnutls/openssl.h>
19623#else
19624#include <ssl.h>
19625#endif
19626
19627int
19628main (void)
19629{
19630
19631#ifdef USE_GNUTLS_FUNCS
19632    gnutls_global_init();
19633#else
19634    SSL_shutdown((SSL *)0)
19635#endif
19636
19637  ;
19638  return 0;
19639}
19640_ACEOF
19641rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19642if { (eval echo "$as_me:19642: \"$ac_link\"") >&5
19643  (eval $ac_link) 2>&5
19644  ac_status=$?
19645  echo "$as_me:19645: \$? = $ac_status" >&5
19646  (exit "$ac_status"); } &&
19647         { ac_try='test -s "conftest$ac_exeext"'
19648  { (eval echo "$as_me:19648: \"$ac_try\"") >&5
19649  (eval $ac_try) 2>&5
19650  ac_status=$?
19651  echo "$as_me:19651: \$? = $ac_status" >&5
19652  (exit "$ac_status"); }; }; then
19653
19654					test -n "$verbose" && echo "	... found gnutls library in $cf_cv_library_path_gnutls" 1>&6
19655
19656echo "${as_me:-configure}:19656: testing ... found gnutls library in $cf_cv_library_path_gnutls ..." 1>&5
19657
19658					cf_cv_find_linkage_gnutls=yes
19659					cf_cv_library_file_gnutls="-lgnutls"
19660					break
19661else
19662  echo "$as_me: failed program was:" >&5
19663cat "conftest.$ac_ext" >&5
19664
19665					CPPFLAGS="$cf_save_CPPFLAGS"
19666					LIBS="$cf_save_LIBS"
19667					LDFLAGS="$cf_save_LDFLAGS"
19668
19669fi
19670rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19671				fi
19672			done
19673			CPPFLAGS="$cf_save_CPPFLAGS"
19674			LDFLAGS="$cf_save_LDFLAGS"
19675		fi
19676
19677	else
19678		cf_cv_find_linkage_gnutls=no
19679	fi
19680
19681fi
19682rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19683
19684fi
19685rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19686
19687LIBS="$cf_save_LIBS"
19688
19689if test "$cf_cv_find_linkage_gnutls" = yes ; then
19690cf_cv_have_gnutls=yes
19691else
19692cf_cv_have_gnutls=no
19693fi
19694
19695		CPPFLAGS=$cf_gnutls_CPPFLAGS
19696	fi
19697
19698	if test "$cf_cv_have_gnutls" = yes ; then
19699		if test -n "$cf_cv_header_path_gnutls" ; then
19700			cat >>confdefs.h <<\EOF
19701#define USE_SSL 1
19702EOF
19703
19704			case "$cf_cv_header_path_gnutls" in
19705			(/usr/include/gnutls)
19706				;;
19707			(*)
19708
19709if test -n "$cf_cv_header_path_gnutls" ; then
19710  for cf_add_incdir in $cf_cv_header_path_gnutls
19711  do
19712	while test "$cf_add_incdir" != /usr/include
19713	do
19714	  if test -d "$cf_add_incdir"
19715	  then
19716		cf_have_incdir=no
19717		if test -n "$CFLAGS$CPPFLAGS" ; then
19718		  # a loop is needed to ensure we can add subdirs of existing dirs
19719		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
19720			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
19721			  cf_have_incdir=yes; break
19722			fi
19723		  done
19724		fi
19725
19726		if test "$cf_have_incdir" = no ; then
19727		  if test "$cf_add_incdir" = /usr/local/include ; then
19728			if test "$GCC" = yes
19729			then
19730			  cf_save_CPPFLAGS=$CPPFLAGS
19731
19732	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
19733	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
19734
19735			  cat >"conftest.$ac_ext" <<_ACEOF
19736#line 19736 "configure"
19737#include "confdefs.h"
19738#include <stdio.h>
19739int
19740main (void)
19741{
19742printf("Hello")
19743  ;
19744  return 0;
19745}
19746_ACEOF
19747rm -f "conftest.$ac_objext"
19748if { (eval echo "$as_me:19748: \"$ac_compile\"") >&5
19749  (eval $ac_compile) 2>&5
19750  ac_status=$?
19751  echo "$as_me:19751: \$? = $ac_status" >&5
19752  (exit "$ac_status"); } &&
19753         { ac_try='test -s "conftest.$ac_objext"'
19754  { (eval echo "$as_me:19754: \"$ac_try\"") >&5
19755  (eval $ac_try) 2>&5
19756  ac_status=$?
19757  echo "$as_me:19757: \$? = $ac_status" >&5
19758  (exit "$ac_status"); }; }; then
19759  :
19760else
19761  echo "$as_me: failed program was:" >&5
19762cat "conftest.$ac_ext" >&5
19763cf_have_incdir=yes
19764fi
19765rm -f "conftest.$ac_objext" "conftest.$ac_ext"
19766			  CPPFLAGS=$cf_save_CPPFLAGS
19767			fi
19768		  fi
19769		fi
19770
19771		if test "$cf_have_incdir" = no ; then
19772		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
19773
19774echo "${as_me:-configure}:19774: testing adding $cf_add_incdir to include-path ..." 1>&5
19775
19776		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
19777
19778		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
19779		  test "$cf_top_incdir" = "$cf_add_incdir" && break
19780		  cf_add_incdir="$cf_top_incdir"
19781		else
19782		  break
19783		fi
19784	  else
19785		break
19786	  fi
19787	done
19788  done
19789fi
19790
19791				;;
19792			esac
19793		fi
19794		if test -n "$cf_cv_library_path_gnutls" ; then
19795
19796if test -n "$cf_cv_library_path_gnutls" ; then
19797	for cf_add_libdir in $cf_cv_library_path_gnutls
19798	do
19799		if test "$cf_add_libdir" = /usr/lib ; then
19800			:
19801		elif test -d "$cf_add_libdir"
19802		then
19803			cf_have_libdir=no
19804			if test -n "$LDFLAGS$LIBS" ; then
19805				# a loop is needed to ensure we can add subdirs of existing dirs
19806				for cf_test_libdir in $LDFLAGS $LIBS ; do
19807					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
19808						cf_have_libdir=yes; break
19809					fi
19810				done
19811			fi
19812			if test "$cf_have_libdir" = no ; then
19813				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
19814
19815echo "${as_me:-configure}:19815: testing adding $cf_add_libdir to library-path ..." 1>&5
19816
19817				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
19818			fi
19819		fi
19820	done
19821fi
19822
19823		fi
19824
19825cf_add_libs="$LIBS"
19826# reverse order
19827cf_add_0lib=
19828for cf_add_1lib in -lgnutls; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19829# filter duplicates
19830for cf_add_1lib in $cf_add_0lib; do
19831	for cf_add_2lib in $cf_add_libs; do
19832		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19833			cf_add_1lib=
19834			break
19835		fi
19836	done
19837	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19838done
19839LIBS="$cf_add_libs"
19840
19841for ac_func in gnutls_protocol_set_priority
19842do
19843as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
19844echo "$as_me:19844: checking for $ac_func" >&5
19845echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
19846if eval "test \"\${$as_ac_var+set}\" = set"; then
19847  echo $ECHO_N "(cached) $ECHO_C" >&6
19848else
19849  cat >"conftest.$ac_ext" <<_ACEOF
19850#line 19850 "configure"
19851#include "confdefs.h"
19852#define $ac_func autoconf_temporary
19853#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19854#undef $ac_func
19855
19856#ifdef __cplusplus
19857extern "C"
19858#endif
19859
19860/* We use char because int might match the return type of a gcc2
19861   builtin and then its argument prototype would still apply.  */
19862char $ac_func (void);
19863
19864int
19865main (void)
19866{
19867
19868/* The GNU C library defines stubs for functions which it implements
19869    to always fail with ENOSYS.  Some functions are actually named
19870    something starting with __ and the normal name is an alias.  */
19871#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
19872#error found stub for $ac_func
19873#endif
19874
19875	return $ac_func ();
19876  ;
19877  return 0;
19878}
19879_ACEOF
19880rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19881if { (eval echo "$as_me:19881: \"$ac_link\"") >&5
19882  (eval $ac_link) 2>&5
19883  ac_status=$?
19884  echo "$as_me:19884: \$? = $ac_status" >&5
19885  (exit "$ac_status"); } &&
19886         { ac_try='test -s "conftest$ac_exeext"'
19887  { (eval echo "$as_me:19887: \"$ac_try\"") >&5
19888  (eval $ac_try) 2>&5
19889  ac_status=$?
19890  echo "$as_me:19890: \$? = $ac_status" >&5
19891  (exit "$ac_status"); }; }; then
19892  eval "$as_ac_var=yes"
19893else
19894  echo "$as_me: failed program was:" >&5
19895cat "conftest.$ac_ext" >&5
19896eval "$as_ac_var=no"
19897fi
19898rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19899fi
19900echo "$as_me:19900: result: `eval echo '${'"$as_ac_var"'}'`" >&5
19901echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
19902if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
19903  cat >>confdefs.h <<EOF
19904#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
19905EOF
19906
19907fi
19908done
19909
19910		echo "$as_me:19910: checking for gnutls_rnd" >&5
19911echo $ECHO_N "checking for gnutls_rnd... $ECHO_C" >&6
19912if test "${ac_cv_func_gnutls_rnd+set}" = set; then
19913  echo $ECHO_N "(cached) $ECHO_C" >&6
19914else
19915  cat >"conftest.$ac_ext" <<_ACEOF
19916#line 19916 "configure"
19917#include "confdefs.h"
19918#define gnutls_rnd autoconf_temporary
19919#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
19920#undef gnutls_rnd
19921
19922#ifdef __cplusplus
19923extern "C"
19924#endif
19925
19926/* We use char because int might match the return type of a gcc2
19927   builtin and then its argument prototype would still apply.  */
19928char gnutls_rnd (void);
19929
19930int
19931main (void)
19932{
19933
19934/* The GNU C library defines stubs for functions which it implements
19935    to always fail with ENOSYS.  Some functions are actually named
19936    something starting with __ and the normal name is an alias.  */
19937#if defined (__stub_gnutls_rnd) || defined (__stub___gnutls_rnd)
19938#error found stub for gnutls_rnd
19939#endif
19940
19941	return gnutls_rnd ();
19942  ;
19943  return 0;
19944}
19945_ACEOF
19946rm -f "conftest.$ac_objext" "conftest$ac_exeext"
19947if { (eval echo "$as_me:19947: \"$ac_link\"") >&5
19948  (eval $ac_link) 2>&5
19949  ac_status=$?
19950  echo "$as_me:19950: \$? = $ac_status" >&5
19951  (exit "$ac_status"); } &&
19952         { ac_try='test -s "conftest$ac_exeext"'
19953  { (eval echo "$as_me:19953: \"$ac_try\"") >&5
19954  (eval $ac_try) 2>&5
19955  ac_status=$?
19956  echo "$as_me:19956: \$? = $ac_status" >&5
19957  (exit "$ac_status"); }; }; then
19958  ac_cv_func_gnutls_rnd=yes
19959else
19960  echo "$as_me: failed program was:" >&5
19961cat "conftest.$ac_ext" >&5
19962ac_cv_func_gnutls_rnd=no
19963fi
19964rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
19965fi
19966echo "$as_me:19966: result: $ac_cv_func_gnutls_rnd" >&5
19967echo "${ECHO_T}$ac_cv_func_gnutls_rnd" >&6
19968if test "$ac_cv_func_gnutls_rnd" = yes; then
19969
19970cat >>confdefs.h <<\EOF
19971#define HAVE_GNUTLS_RND 1
19972EOF
19973
19974else
19975
19976cf_add_libs="$LIBS"
19977# reverse order
19978cf_add_0lib=
19979for cf_add_1lib in -lgcrypt; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
19980# filter duplicates
19981for cf_add_1lib in $cf_add_0lib; do
19982	for cf_add_2lib in $cf_add_libs; do
19983		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
19984			cf_add_1lib=
19985			break
19986		fi
19987	done
19988	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
19989done
19990LIBS="$cf_add_libs"
19991
19992fi
19993
19994		if test "$cf_pkg_gnutls" = none ; then
19995				echo "$as_me:19995: checking for SSL_connect in -lgnutls-openssl" >&5
19996echo $ECHO_N "checking for SSL_connect in -lgnutls-openssl... $ECHO_C" >&6
19997if test "${ac_cv_lib_gnutls_openssl_SSL_connect+set}" = set; then
19998  echo $ECHO_N "(cached) $ECHO_C" >&6
19999else
20000  ac_check_lib_save_LIBS=$LIBS
20001LIBS="-lgnutls-openssl  $LIBS"
20002cat >"conftest.$ac_ext" <<_ACEOF
20003#line 20003 "configure"
20004#include "confdefs.h"
20005
20006/* Override any gcc2 internal prototype to avoid an error.  */
20007#ifdef __cplusplus
20008extern "C"
20009#endif
20010/* We use char because int might match the return type of a gcc2
20011   builtin and then its argument prototype would still apply.  */
20012char SSL_connect ();
20013int
20014main (void)
20015{
20016SSL_connect ();
20017  ;
20018  return 0;
20019}
20020_ACEOF
20021rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20022if { (eval echo "$as_me:20022: \"$ac_link\"") >&5
20023  (eval $ac_link) 2>&5
20024  ac_status=$?
20025  echo "$as_me:20025: \$? = $ac_status" >&5
20026  (exit "$ac_status"); } &&
20027         { ac_try='test -s "conftest$ac_exeext"'
20028  { (eval echo "$as_me:20028: \"$ac_try\"") >&5
20029  (eval $ac_try) 2>&5
20030  ac_status=$?
20031  echo "$as_me:20031: \$? = $ac_status" >&5
20032  (exit "$ac_status"); }; }; then
20033  ac_cv_lib_gnutls_openssl_SSL_connect=yes
20034else
20035  echo "$as_me: failed program was:" >&5
20036cat "conftest.$ac_ext" >&5
20037ac_cv_lib_gnutls_openssl_SSL_connect=no
20038fi
20039rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20040LIBS=$ac_check_lib_save_LIBS
20041fi
20042echo "$as_me:20042: result: $ac_cv_lib_gnutls_openssl_SSL_connect" >&5
20043echo "${ECHO_T}$ac_cv_lib_gnutls_openssl_SSL_connect" >&6
20044if test "$ac_cv_lib_gnutls_openssl_SSL_connect" = yes; then
20045
20046cf_add_libs="$LIBS"
20047# reverse order
20048cf_add_0lib=
20049for cf_add_1lib in -lgnutls-openssl; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20050# filter duplicates
20051for cf_add_1lib in $cf_add_0lib; do
20052	for cf_add_2lib in $cf_add_libs; do
20053		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20054			cf_add_1lib=
20055			break
20056		fi
20057	done
20058	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20059done
20060LIBS="$cf_add_libs"
20061
20062else
20063  echo "$as_me:20063: checking for SSL_connect in -lgnutls-extra" >&5
20064echo $ECHO_N "checking for SSL_connect in -lgnutls-extra... $ECHO_C" >&6
20065if test "${ac_cv_lib_gnutls_extra_SSL_connect+set}" = set; then
20066  echo $ECHO_N "(cached) $ECHO_C" >&6
20067else
20068  ac_check_lib_save_LIBS=$LIBS
20069LIBS="-lgnutls-extra  $LIBS"
20070cat >"conftest.$ac_ext" <<_ACEOF
20071#line 20071 "configure"
20072#include "confdefs.h"
20073
20074/* Override any gcc2 internal prototype to avoid an error.  */
20075#ifdef __cplusplus
20076extern "C"
20077#endif
20078/* We use char because int might match the return type of a gcc2
20079   builtin and then its argument prototype would still apply.  */
20080char SSL_connect ();
20081int
20082main (void)
20083{
20084SSL_connect ();
20085  ;
20086  return 0;
20087}
20088_ACEOF
20089rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20090if { (eval echo "$as_me:20090: \"$ac_link\"") >&5
20091  (eval $ac_link) 2>&5
20092  ac_status=$?
20093  echo "$as_me:20093: \$? = $ac_status" >&5
20094  (exit "$ac_status"); } &&
20095         { ac_try='test -s "conftest$ac_exeext"'
20096  { (eval echo "$as_me:20096: \"$ac_try\"") >&5
20097  (eval $ac_try) 2>&5
20098  ac_status=$?
20099  echo "$as_me:20099: \$? = $ac_status" >&5
20100  (exit "$ac_status"); }; }; then
20101  ac_cv_lib_gnutls_extra_SSL_connect=yes
20102else
20103  echo "$as_me: failed program was:" >&5
20104cat "conftest.$ac_ext" >&5
20105ac_cv_lib_gnutls_extra_SSL_connect=no
20106fi
20107rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20108LIBS=$ac_check_lib_save_LIBS
20109fi
20110echo "$as_me:20110: result: $ac_cv_lib_gnutls_extra_SSL_connect" >&5
20111echo "${ECHO_T}$ac_cv_lib_gnutls_extra_SSL_connect" >&6
20112if test "$ac_cv_lib_gnutls_extra_SSL_connect" = yes; then
20113
20114cf_add_libs="$LIBS"
20115# reverse order
20116cf_add_0lib=
20117for cf_add_1lib in -lgnutls-extra; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20118# filter duplicates
20119for cf_add_1lib in $cf_add_0lib; do
20120	for cf_add_2lib in $cf_add_libs; do
20121		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20122			cf_add_1lib=
20123			break
20124		fi
20125	done
20126	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20127done
20128LIBS="$cf_add_libs"
20129
20130else
20131  { { echo "$as_me:20131: error: cannot find gnutls openssl functions" >&5
20132echo "$as_me: error: cannot find gnutls openssl functions" >&2;}
20133   { (exit 1); exit 1; }; }
20134fi
20135
20136fi
20137
20138			fi
20139
20140echo "$as_me:20140: checking for X509 support" >&5
20141echo $ECHO_N "checking for X509 support... $ECHO_C" >&6
20142cat >"conftest.$ac_ext" <<_ACEOF
20143#line 20143 "configure"
20144#include "confdefs.h"
20145
20146#include <stdio.h>
20147#if defined(USE_OPENSSL_INCL)
20148#include <openssl/ssl.h>
20149#elif defined(USE_GNUTLS_FUNCS)
20150#include <gnutls/gnutls.h>
20151#elif defined(USE_GNUTLS_INCL)
20152#include <gnutls/openssl.h>
20153#else
20154#include <ssl.h>
20155#endif
20156
20157#if defined(USE_GNUTLS_INCL)
20158#include <gnutls/x509.h>
20159#else
20160#include <openssl/x509.h>
20161#endif
20162
20163int
20164main (void)
20165{
20166X509_verify_cert_error_string(X509_STORE_CTX_get_error(NULL))
20167  ;
20168  return 0;
20169}
20170_ACEOF
20171rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20172if { (eval echo "$as_me:20172: \"$ac_link\"") >&5
20173  (eval $ac_link) 2>&5
20174  ac_status=$?
20175  echo "$as_me:20175: \$? = $ac_status" >&5
20176  (exit "$ac_status"); } &&
20177         { ac_try='test -s "conftest$ac_exeext"'
20178  { (eval echo "$as_me:20178: \"$ac_try\"") >&5
20179  (eval $ac_try) 2>&5
20180  ac_status=$?
20181  echo "$as_me:20181: \$? = $ac_status" >&5
20182  (exit "$ac_status"); }; }; then
20183  cf_x509_support=yes
20184else
20185  echo "$as_me: failed program was:" >&5
20186cat "conftest.$ac_ext" >&5
20187cf_x509_support=no
20188fi
20189rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20190echo "$as_me:20190: result: $cf_x509_support" >&5
20191echo "${ECHO_T}$cf_x509_support" >&6
20192
20193if test "$cf_x509_support" = yes ; then
20194	cat >>confdefs.h <<\EOF
20195#define USE_X509_SUPPORT 1
20196EOF
20197
20198fi
20199
20200	fi
20201
20202    fi
20203elif test "x$cf_cv_use_libnss_compat"  != xno ; then
20204
20205check=`pkg-config --version 2>/dev/null`
20206if test -n "$check" ; then
20207	cf_ssl_library=`pkg-config --libs nss`
20208	cf_ssl_cflags=`pkg-config --cflags nss`
20209else
20210	# Without pkg-config, we'll kludge in some defaults
20211	cf_ssl_library="-lssl3 -lsmime3 -lnss3 -lplds4 -lplc4 -lnspr4 -lpthread -ldl"
20212	cf_ssl_cflags="-I/usr/include/nss3 -I/usr/include/nspr4"
20213fi
20214cf_ssl_library="-lnss_compat_ossl $cf_ssl_library"
20215
20216case "$cf_cv_use_libnss_compat" in
20217(no)
20218	cf_ssl_root=
20219	;;
20220(yes)
20221
20222echo "$as_me:20222: checking for SSL_get_version in -lnss_compat_ossl" >&5
20223echo $ECHO_N "checking for SSL_get_version in -lnss_compat_ossl... $ECHO_C" >&6
20224if test "${ac_cv_lib_nss_compat_ossl_SSL_get_version+set}" = set; then
20225  echo $ECHO_N "(cached) $ECHO_C" >&6
20226else
20227  ac_check_lib_save_LIBS=$LIBS
20228LIBS="-lnss_compat_ossl -lnss_compat_ossl $LIBS"
20229cat >"conftest.$ac_ext" <<_ACEOF
20230#line 20230 "configure"
20231#include "confdefs.h"
20232
20233/* Override any gcc2 internal prototype to avoid an error.  */
20234#ifdef __cplusplus
20235extern "C"
20236#endif
20237/* We use char because int might match the return type of a gcc2
20238   builtin and then its argument prototype would still apply.  */
20239char SSL_get_version ();
20240int
20241main (void)
20242{
20243SSL_get_version ();
20244  ;
20245  return 0;
20246}
20247_ACEOF
20248rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20249if { (eval echo "$as_me:20249: \"$ac_link\"") >&5
20250  (eval $ac_link) 2>&5
20251  ac_status=$?
20252  echo "$as_me:20252: \$? = $ac_status" >&5
20253  (exit "$ac_status"); } &&
20254         { ac_try='test -s "conftest$ac_exeext"'
20255  { (eval echo "$as_me:20255: \"$ac_try\"") >&5
20256  (eval $ac_try) 2>&5
20257  ac_status=$?
20258  echo "$as_me:20258: \$? = $ac_status" >&5
20259  (exit "$ac_status"); }; }; then
20260  ac_cv_lib_nss_compat_ossl_SSL_get_version=yes
20261else
20262  echo "$as_me: failed program was:" >&5
20263cat "conftest.$ac_ext" >&5
20264ac_cv_lib_nss_compat_ossl_SSL_get_version=no
20265fi
20266rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20267LIBS=$ac_check_lib_save_LIBS
20268fi
20269echo "$as_me:20269: result: $ac_cv_lib_nss_compat_ossl_SSL_get_version" >&5
20270echo "${ECHO_T}$ac_cv_lib_nss_compat_ossl_SSL_get_version" >&6
20271if test "$ac_cv_lib_nss_compat_ossl_SSL_get_version" = yes; then
20272  cat >>confdefs.h <<EOF
20273#define HAVE_LIBNSS_COMPAT_OSSL 1
20274EOF
20275
20276  LIBS="-lnss_compat_ossl $LIBS"
20277
20278else
20279
20280		cf_ssl_root=/usr/local/nss_compat_ossl
20281		if test -d "$cf_ssl_root" ; then
20282			test -n "$verbose" && echo "	assume it is in $cf_ssl_root" 1>&6
20283
20284echo "${as_me:-configure}:20284: testing assume it is in $cf_ssl_root ..." 1>&5
20285
20286			cf_ssl_library="-L$cf_ssl_root/lib $cf_ssl_library"
20287		else
20288			{ { echo "$as_me:20288: error: cannot find NSS compliant libraries" >&5
20289echo "$as_me: error: cannot find NSS compliant libraries" >&2;}
20290   { (exit 1); exit 1; }; }
20291		fi
20292
20293fi
20294
20295	;;
20296(*)
20297	if test -d "$cf_cv_use_libnss_compat" ; then
20298		if test -d "$cf_cv_use_libnss_compat/include" ; then
20299			cf_ssl_root=$cf_cv_use_libnss_compat
20300		elif test -d "$cf_cv_use_libnss_compat/../include" ; then
20301			cf_ssl_root=$cf_cv_use_libnss_compat/..
20302		else
20303			{ { echo "$as_me:20303: error: cannot find NSS compliant library under $cf_cv_use_libnss_compat" >&5
20304echo "$as_me: error: cannot find NSS compliant library under $cf_cv_use_libnss_compat" >&2;}
20305   { (exit 1); exit 1; }; }
20306		fi
20307		cf_ssl_library="-L$cf_ssl_root/lib $cf_ssl_library"
20308	else
20309		{ echo "$as_me:20309: WARNING: expected a directory: $cf_cv_use_libnss_compat" >&5
20310echo "$as_me: WARNING: expected a directory: $cf_cv_use_libnss_compat" >&2;}
20311	fi
20312	;;
20313esac
20314
20315cf_add_libs="$LIBS"
20316# reverse order
20317cf_add_0lib=
20318for cf_add_1lib in $cf_ssl_library; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
20319# filter duplicates
20320for cf_add_1lib in $cf_add_0lib; do
20321	for cf_add_2lib in $cf_add_libs; do
20322		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
20323			cf_add_1lib=
20324			break
20325		fi
20326	done
20327	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
20328done
20329LIBS="$cf_add_libs"
20330
20331cf_ssl_subincs=yes
20332if test -n "$cf_ssl_root" ; then
20333	if test -d "$cf_ssl_root/include" ; then
20334		cf_ssl_cflags="-I$cf_ssl_root/include  $cf_ssl_cflags"
20335		test -d "$cf_ssl_root/include/nss_compat_ossl" || cf_ssl_subincs=no
20336	fi
20337fi
20338
20339cf_fix_cppflags=no
20340cf_new_cflags=
20341cf_new_cppflags=
20342cf_new_extra_cppflags=
20343
20344for cf_add_cflags in $cf_ssl_cflags
20345do
20346case "$cf_fix_cppflags" in
20347(no)
20348	case "$cf_add_cflags" in
20349	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
20350		case "$cf_add_cflags" in
20351		(-D*)
20352			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
20353
20354			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20355				&& test -z "${cf_tst_cflags}" \
20356				&& cf_fix_cppflags=yes
20357
20358			if test "$cf_fix_cppflags" = yes ; then
20359
20360	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20361	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20362
20363				continue
20364			elif test "${cf_tst_cflags}" = "\"'" ; then
20365
20366	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20367	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20368
20369				continue
20370			fi
20371			;;
20372		esac
20373		case "$CPPFLAGS" in
20374		(*$cf_add_cflags)
20375			;;
20376		(*)
20377			case "$cf_add_cflags" in
20378			(-D*)
20379				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
20380
20381CPPFLAGS=`echo "$CPPFLAGS" | \
20382	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
20383		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
20384
20385				;;
20386			esac
20387
20388	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
20389	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
20390
20391			;;
20392		esac
20393		;;
20394	(*)
20395
20396	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
20397	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
20398
20399		;;
20400	esac
20401	;;
20402(yes)
20403
20404	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
20405	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
20406
20407	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
20408
20409	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
20410		&& test -z "${cf_tst_cflags}" \
20411		&& cf_fix_cppflags=no
20412	;;
20413esac
20414done
20415
20416if test -n "$cf_new_cflags" ; then
20417
20418	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
20419	CFLAGS="${CFLAGS}$cf_new_cflags"
20420
20421fi
20422
20423if test -n "$cf_new_cppflags" ; then
20424
20425	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20426	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
20427
20428fi
20429
20430if test -n "$cf_new_extra_cppflags" ; then
20431
20432	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
20433	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
20434
20435fi
20436
20437if test "$cf_ssl_subincs" = yes ; then
20438echo "$as_me:20438: checking for NSS compliant include directory" >&5
20439echo $ECHO_N "checking for NSS compliant include directory... $ECHO_C" >&6
20440cat >"conftest.$ac_ext" <<_ACEOF
20441#line 20441 "configure"
20442#include "confdefs.h"
20443
20444#include <stdio.h>
20445#include <nss_compat_ossl/nss_compat_ossl.h>
20446int
20447main (void)
20448{
20449SSL_shutdown((SSL *)0)
20450  ;
20451  return 0;
20452}
20453_ACEOF
20454rm -f "conftest.$ac_objext"
20455if { (eval echo "$as_me:20455: \"$ac_compile\"") >&5
20456  (eval $ac_compile) 2>&5
20457  ac_status=$?
20458  echo "$as_me:20458: \$? = $ac_status" >&5
20459  (exit "$ac_status"); } &&
20460         { ac_try='test -s "conftest.$ac_objext"'
20461  { (eval echo "$as_me:20461: \"$ac_try\"") >&5
20462  (eval $ac_try) 2>&5
20463  ac_status=$?
20464  echo "$as_me:20464: \$? = $ac_status" >&5
20465  (exit "$ac_status"); }; }; then
20466  cf_ssl_incl=yes
20467else
20468  echo "$as_me: failed program was:" >&5
20469cat "conftest.$ac_ext" >&5
20470cf_ssl_incl=no
20471fi
20472rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20473echo "$as_me:20473: result: $cf_ssl_incl" >&5
20474echo "${ECHO_T}$cf_ssl_incl" >&6
20475test "$cf_ssl_incl" = yes &&
20476cat >>confdefs.h <<\EOF
20477#define USE_NSS_COMPAT_INCL 1
20478EOF
20479
20480fi
20481
20482echo "$as_me:20482: checking if we can link to NSS compliant library" >&5
20483echo $ECHO_N "checking if we can link to NSS compliant library... $ECHO_C" >&6
20484cat >"conftest.$ac_ext" <<_ACEOF
20485#line 20485 "configure"
20486#include "confdefs.h"
20487
20488#include <stdio.h>
20489#ifdef USE_NSS_COMPAT_INCL
20490#include <nss_compat_ossl/nss_compat_ossl.h>
20491#else
20492#include <ssl.h>
20493#endif
20494
20495int
20496main (void)
20497{
20498SSL_shutdown((SSL *)0)
20499  ;
20500  return 0;
20501}
20502_ACEOF
20503rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20504if { (eval echo "$as_me:20504: \"$ac_link\"") >&5
20505  (eval $ac_link) 2>&5
20506  ac_status=$?
20507  echo "$as_me:20507: \$? = $ac_status" >&5
20508  (exit "$ac_status"); } &&
20509         { ac_try='test -s "conftest$ac_exeext"'
20510  { (eval echo "$as_me:20510: \"$ac_try\"") >&5
20511  (eval $ac_try) 2>&5
20512  ac_status=$?
20513  echo "$as_me:20513: \$? = $ac_status" >&5
20514  (exit "$ac_status"); }; }; then
20515  cf_ssl_library=yes
20516else
20517  echo "$as_me: failed program was:" >&5
20518cat "conftest.$ac_ext" >&5
20519cf_ssl_library=no
20520fi
20521rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20522echo "$as_me:20522: result: $cf_ssl_library" >&5
20523echo "${ECHO_T}$cf_ssl_library" >&6
20524if test "$cf_ssl_library" = yes ; then
20525
20526cat >>confdefs.h <<\EOF
20527#define USE_SSL 1
20528EOF
20529
20530cat >>confdefs.h <<\EOF
20531#define USE_X509_SUPPORT 1
20532EOF
20533
20534else
20535	{ { echo "$as_me:20535: error: Cannot link with NSS compliant libraries" >&5
20536echo "$as_me: error: Cannot link with NSS compliant libraries" >&2;}
20537   { (exit 1); exit 1; }; }
20538fi
20539
20540fi
20541
20542### check for ipv6 support
20543echo "$as_me:20543: checking whether to enable ipv6" >&5
20544echo $ECHO_N "checking whether to enable ipv6... $ECHO_C" >&6
20545
20546# Check whether --enable-ipv6 or --disable-ipv6 was given.
20547if test "${enable_ipv6+set}" = set; then
20548  enableval="$enable_ipv6"
20549  test "$enableval" != yes && enableval=no
20550	if test "$enableval" != "no" ; then
20551
20552cat >>confdefs.h <<\EOF
20553#define ENABLE_IPV6 1
20554EOF
20555
20556	fi
20557else
20558  enableval=no
20559fi;
20560echo "$as_me:20560: result: $enableval" >&5
20561echo "${ECHO_T}$enableval" >&6
20562if test "$enableval" = "yes"; then
20563
20564echo "$as_me:20564: checking ipv6 stack type" >&5
20565echo $ECHO_N "checking ipv6 stack type... $ECHO_C" >&6
20566if test "${cf_cv_ipv6type+set}" = set; then
20567  echo $ECHO_N "(cached) $ECHO_C" >&6
20568else
20569
20570cf_cv_ipv6type=unknown
20571for i in solaris inria kame linux-glibc linux-libinet6 toshiba v6d zeta
20572do
20573	case "$i" in
20574	(solaris)
20575		if test "SunOS" = "`uname -s`"
20576		then
20577		  if test -f /usr/include/netinet/ip6.h
20578		  then
20579			cf_cv_ipv6type=$i
20580		  fi
20581		fi
20582		;;
20583	(inria)
20584				cat >"conftest.$ac_ext" <<_ACEOF
20585#line 20585 "configure"
20586#include "confdefs.h"
20587
20588#include <netinet/in.h>
20589#ifdef IPV6_INRIA_VERSION
20590yes
20591#endif
20592_ACEOF
20593if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20594  $EGREP "yes" >/dev/null 2>&1; then
20595  cf_cv_ipv6type=$i
20596fi
20597rm -rf conftest*
20598
20599		;;
20600	(kame)
20601				cat >"conftest.$ac_ext" <<_ACEOF
20602#line 20602 "configure"
20603#include "confdefs.h"
20604
20605#include <netinet/in.h>
20606#ifdef __KAME__
20607yes
20608#endif
20609_ACEOF
20610if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20611  $EGREP "yes" >/dev/null 2>&1; then
20612  cf_cv_ipv6type=$i
20613fi
20614rm -rf conftest*
20615
20616		;;
20617	(linux-glibc)
20618				cat >"conftest.$ac_ext" <<_ACEOF
20619#line 20619 "configure"
20620#include "confdefs.h"
20621
20622#include <features.h>
20623#if defined(__GLIBC__) && __GLIBC__ >= 2 && __GLIBC_MINOR__ >= 1
20624yes
20625#endif
20626_ACEOF
20627if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20628  $EGREP "yes" >/dev/null 2>&1; then
20629  cf_cv_ipv6type=$i
20630fi
20631rm -rf conftest*
20632
20633		;;
20634	(linux-libinet6)
20635				if test -d /usr/inet6
20636		then
20637			cf_cv_ipv6type=$i
20638		elif test -f /usr/include/netinet/ip6.h
20639		then
20640			cf_cv_ipv6type=$i
20641		fi
20642		;;
20643	(toshiba)
20644		cat >"conftest.$ac_ext" <<_ACEOF
20645#line 20645 "configure"
20646#include "confdefs.h"
20647
20648#include <sys/param.h>
20649#ifdef _TOSHIBA_INET6
20650yes
20651#endif
20652_ACEOF
20653if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20654  $EGREP "yes" >/dev/null 2>&1; then
20655  cf_cv_ipv6type=$i
20656fi
20657rm -rf conftest*
20658
20659		;;
20660	(v6d)
20661		cat >"conftest.$ac_ext" <<_ACEOF
20662#line 20662 "configure"
20663#include "confdefs.h"
20664
20665#include </usr/local/v6/include/sys/v6config.h>
20666#ifdef __V6D__
20667yes
20668#endif
20669_ACEOF
20670if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20671  $EGREP "yes" >/dev/null 2>&1; then
20672  cf_cv_ipv6type=$i
20673fi
20674rm -rf conftest*
20675
20676		;;
20677	(zeta)
20678		cat >"conftest.$ac_ext" <<_ACEOF
20679#line 20679 "configure"
20680#include "confdefs.h"
20681
20682#include <sys/param.h>
20683#ifdef _ZETA_MINAMI_INET6
20684yes
20685#endif
20686_ACEOF
20687if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
20688  $EGREP "yes" >/dev/null 2>&1; then
20689  cf_cv_ipv6type=$i
20690fi
20691rm -rf conftest*
20692
20693		;;
20694	esac
20695	if test "$cf_cv_ipv6type" != "unknown"; then
20696		break
20697	fi
20698done
20699
20700fi
20701echo "$as_me:20701: result: $cf_cv_ipv6type" >&5
20702echo "${ECHO_T}$cf_cv_ipv6type" >&6
20703
20704cf_ipv6lib=none
20705cf_ipv6dir=none
20706
20707echo "$as_me:20707: checking for IPv6 library if required" >&5
20708echo $ECHO_N "checking for IPv6 library if required... $ECHO_C" >&6
20709case "$cf_cv_ipv6type" in
20710(solaris)
20711	;;
20712(inria)
20713	;;
20714(kame)
20715		cf_ipv6lib=inet6
20716	cf_ipv6dir=v6
20717	;;
20718(linux-glibc)
20719	;;
20720(linux-libinet6)
20721		cf_ipv6lib=inet6
20722	cf_ipv6dir=inet6
20723	;;
20724(toshiba)
20725	cf_ipv6lib=inet6
20726	cf_ipv6dir=v6
20727	;;
20728(v6d)
20729	cf_ipv6lib=v6
20730	cf_ipv6dir=v6
20731	;;
20732(zeta)
20733	cf_ipv6lib=inet6
20734	cf_ipv6dir=v6
20735	;;
20736esac
20737echo "$as_me:20737: result: $cf_ipv6lib" >&5
20738echo "${ECHO_T}$cf_ipv6lib" >&6
20739
20740if test "$cf_ipv6lib" != "none"; then
20741
20742	cat >"conftest.$ac_ext" <<_ACEOF
20743#line 20743 "configure"
20744#include "confdefs.h"
20745
20746#include <sys/types.h>
20747#include <netdb.h>
20748#include <netinet/in.h>
20749#include <netinet/ip6.h>
20750int
20751main (void)
20752{
20753getaddrinfo(0, 0, 0, 0)
20754  ;
20755  return 0;
20756}
20757_ACEOF
20758rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20759if { (eval echo "$as_me:20759: \"$ac_link\"") >&5
20760  (eval $ac_link) 2>&5
20761  ac_status=$?
20762  echo "$as_me:20762: \$? = $ac_status" >&5
20763  (exit "$ac_status"); } &&
20764         { ac_try='test -s "conftest$ac_exeext"'
20765  { (eval echo "$as_me:20765: \"$ac_try\"") >&5
20766  (eval $ac_try) 2>&5
20767  ac_status=$?
20768  echo "$as_me:20768: \$? = $ac_status" >&5
20769  (exit "$ac_status"); }; }; then
20770  :
20771else
20772  echo "$as_me: failed program was:" >&5
20773cat "conftest.$ac_ext" >&5
20774
20775cf_search=
20776
20777# collect the current set of include-directories from compiler flags
20778cf_header_path_list=""
20779if test -n "${CFLAGS}${CPPFLAGS}" ; then
20780	for cf_header_path in $CPPFLAGS $CFLAGS
20781	do
20782		case "$cf_header_path" in
20783		(-I*)
20784			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
20785
20786test "x$cf_header_path" != "xNONE" && \
20787test -d "$cf_header_path" && \
20788 {
20789	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
20790	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
20791	test -d "$cf_header_path/include/$cf_ipv6dir" &&       cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir"
20792	test -d "$cf_header_path/include/$cf_ipv6dir/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ipv6dir/include"
20793	test -d "$cf_header_path/$cf_ipv6dir/include" &&       cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include"
20794	test -d "$cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir" &&    cf_search="$cf_search $cf_header_path/$cf_ipv6dir/include/$cf_ipv6dir"
20795}
20796
20797			cf_header_path_list="$cf_header_path_list $cf_search"
20798			;;
20799		esac
20800	done
20801fi
20802
20803# add the variations for the package we are looking for
20804
20805cf_search=
20806
20807test "x$prefix" != "xNONE" && \
20808test -d "$prefix" && \
20809 {
20810	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
20811	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
20812	test -d "$prefix/include/$cf_ipv6dir" &&       cf_search="$cf_search $prefix/include/$cf_ipv6dir"
20813	test -d "$prefix/include/$cf_ipv6dir/include" &&    cf_search="$cf_search $prefix/include/$cf_ipv6dir/include"
20814	test -d "$prefix/$cf_ipv6dir/include" &&       cf_search="$cf_search $prefix/$cf_ipv6dir/include"
20815	test -d "$prefix/$cf_ipv6dir/include/$cf_ipv6dir" &&    cf_search="$cf_search $prefix/$cf_ipv6dir/include/$cf_ipv6dir"
20816}
20817
20818for cf_subdir_prefix in \
20819	/usr \
20820	/usr/local \
20821	/usr/pkg \
20822	/opt \
20823	/opt/local \
20824	$HOME
20825do
20826
20827test "x$cf_subdir_prefix" != "x$prefix" && \
20828test -d "$cf_subdir_prefix" && \
20829{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
20830	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
20831	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
20832	test -d "$cf_subdir_prefix/include/$cf_ipv6dir" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir"
20833	test -d "$cf_subdir_prefix/include/$cf_ipv6dir/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ipv6dir/include"
20834	test -d "$cf_subdir_prefix/$cf_ipv6dir/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include"
20835	test -d "$cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir" &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/include/$cf_ipv6dir"
20836}
20837
20838done
20839
20840test "$includedir" != NONE && \
20841test "$includedir" != "/usr/include" && \
20842test -d "$includedir" && {
20843	test -d "$includedir" &&    cf_search="$cf_search $includedir"
20844	test -d "$includedir/$cf_ipv6dir" && cf_search="$cf_search $includedir/$cf_ipv6dir"
20845}
20846
20847test "$oldincludedir" != NONE && \
20848test "$oldincludedir" != "/usr/include" && \
20849test -d "$oldincludedir" && {
20850	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
20851	test -d "$oldincludedir/$cf_ipv6dir" && cf_search="$cf_search $oldincludedir/$cf_ipv6dir"
20852}
20853
20854cf_search="$cf_search $cf_header_path_list"
20855
20856	for cf_incdir in $cf_search
20857	do
20858		cf_header=$cf_incdir/netinet/ip6.h
20859		if test -f "$cf_header"
20860		then
20861
20862if test -n "$cf_incdir" ; then
20863  for cf_add_incdir in $cf_incdir
20864  do
20865	while test "$cf_add_incdir" != /usr/include
20866	do
20867	  if test -d "$cf_add_incdir"
20868	  then
20869		cf_have_incdir=no
20870		if test -n "$CFLAGS$CPPFLAGS" ; then
20871		  # a loop is needed to ensure we can add subdirs of existing dirs
20872		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
20873			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
20874			  cf_have_incdir=yes; break
20875			fi
20876		  done
20877		fi
20878
20879		if test "$cf_have_incdir" = no ; then
20880		  if test "$cf_add_incdir" = /usr/local/include ; then
20881			if test "$GCC" = yes
20882			then
20883			  cf_save_CPPFLAGS=$CPPFLAGS
20884
20885	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
20886	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
20887
20888			  cat >"conftest.$ac_ext" <<_ACEOF
20889#line 20889 "configure"
20890#include "confdefs.h"
20891#include <stdio.h>
20892int
20893main (void)
20894{
20895printf("Hello")
20896  ;
20897  return 0;
20898}
20899_ACEOF
20900rm -f "conftest.$ac_objext"
20901if { (eval echo "$as_me:20901: \"$ac_compile\"") >&5
20902  (eval $ac_compile) 2>&5
20903  ac_status=$?
20904  echo "$as_me:20904: \$? = $ac_status" >&5
20905  (exit "$ac_status"); } &&
20906         { ac_try='test -s "conftest.$ac_objext"'
20907  { (eval echo "$as_me:20907: \"$ac_try\"") >&5
20908  (eval $ac_try) 2>&5
20909  ac_status=$?
20910  echo "$as_me:20910: \$? = $ac_status" >&5
20911  (exit "$ac_status"); }; }; then
20912  :
20913else
20914  echo "$as_me: failed program was:" >&5
20915cat "conftest.$ac_ext" >&5
20916cf_have_incdir=yes
20917fi
20918rm -f "conftest.$ac_objext" "conftest.$ac_ext"
20919			  CPPFLAGS=$cf_save_CPPFLAGS
20920			fi
20921		  fi
20922		fi
20923
20924		if test "$cf_have_incdir" = no ; then
20925		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
20926
20927echo "${as_me:-configure}:20927: testing adding $cf_add_incdir to include-path ..." 1>&5
20928
20929		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
20930
20931		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
20932		  test "$cf_top_incdir" = "$cf_add_incdir" && break
20933		  cf_add_incdir="$cf_top_incdir"
20934		else
20935		  break
20936		fi
20937	  else
20938		break
20939	  fi
20940	done
20941  done
20942fi
20943
20944			test -n "$verbose" && echo "	... found $cf_header" 1>&6
20945			break
20946		fi
20947		test -n "$verbose" && echo "	... tested $cf_header" 1>&6
20948	done
20949
20950fi
20951rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
20952
20953	eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=no'
20954	cf_libdir=""
20955	echo "$as_me:20955: checking for getaddrinfo" >&5
20956echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
20957if test "${ac_cv_func_getaddrinfo+set}" = set; then
20958  echo $ECHO_N "(cached) $ECHO_C" >&6
20959else
20960  cat >"conftest.$ac_ext" <<_ACEOF
20961#line 20961 "configure"
20962#include "confdefs.h"
20963#define getaddrinfo autoconf_temporary
20964#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
20965#undef getaddrinfo
20966
20967#ifdef __cplusplus
20968extern "C"
20969#endif
20970
20971/* We use char because int might match the return type of a gcc2
20972   builtin and then its argument prototype would still apply.  */
20973char getaddrinfo (void);
20974
20975int
20976main (void)
20977{
20978
20979/* The GNU C library defines stubs for functions which it implements
20980    to always fail with ENOSYS.  Some functions are actually named
20981    something starting with __ and the normal name is an alias.  */
20982#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
20983#error found stub for getaddrinfo
20984#endif
20985
20986	return getaddrinfo ();
20987  ;
20988  return 0;
20989}
20990_ACEOF
20991rm -f "conftest.$ac_objext" "conftest$ac_exeext"
20992if { (eval echo "$as_me:20992: \"$ac_link\"") >&5
20993  (eval $ac_link) 2>&5
20994  ac_status=$?
20995  echo "$as_me:20995: \$? = $ac_status" >&5
20996  (exit "$ac_status"); } &&
20997         { ac_try='test -s "conftest$ac_exeext"'
20998  { (eval echo "$as_me:20998: \"$ac_try\"") >&5
20999  (eval $ac_try) 2>&5
21000  ac_status=$?
21001  echo "$as_me:21001: \$? = $ac_status" >&5
21002  (exit "$ac_status"); }; }; then
21003  ac_cv_func_getaddrinfo=yes
21004else
21005  echo "$as_me: failed program was:" >&5
21006cat "conftest.$ac_ext" >&5
21007ac_cv_func_getaddrinfo=no
21008fi
21009rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21010fi
21011echo "$as_me:21011: result: $ac_cv_func_getaddrinfo" >&5
21012echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
21013if test "$ac_cv_func_getaddrinfo" = yes; then
21014  eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
21015else
21016
21017		cf_save_LIBS="$LIBS"
21018		echo "$as_me:21018: checking for getaddrinfo in -l$cf_ipv6lib" >&5
21019echo $ECHO_N "checking for getaddrinfo in -l$cf_ipv6lib... $ECHO_C" >&6
21020		LIBS="-l$cf_ipv6lib $LIBS"
21021		cat >"conftest.$ac_ext" <<_ACEOF
21022#line 21022 "configure"
21023#include "confdefs.h"
21024
21025#include <sys/types.h>
21026#include <netdb.h>
21027#include <netinet/in.h>
21028#include <netinet/ip6.h>
21029int
21030main (void)
21031{
21032getaddrinfo(0, 0, 0, 0)
21033  ;
21034  return 0;
21035}
21036_ACEOF
21037rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21038if { (eval echo "$as_me:21038: \"$ac_link\"") >&5
21039  (eval $ac_link) 2>&5
21040  ac_status=$?
21041  echo "$as_me:21041: \$? = $ac_status" >&5
21042  (exit "$ac_status"); } &&
21043         { ac_try='test -s "conftest$ac_exeext"'
21044  { (eval echo "$as_me:21044: \"$ac_try\"") >&5
21045  (eval $ac_try) 2>&5
21046  ac_status=$?
21047  echo "$as_me:21047: \$? = $ac_status" >&5
21048  (exit "$ac_status"); }; }; then
21049  echo "$as_me:21049: result: yes" >&5
21050echo "${ECHO_T}yes" >&6
21051			 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
21052
21053else
21054  echo "$as_me: failed program was:" >&5
21055cat "conftest.$ac_ext" >&5
21056echo "$as_me:21056: result: no" >&5
21057echo "${ECHO_T}no" >&6
21058
21059cf_search=
21060cf_library_path_list=""
21061if test -n "${LDFLAGS}${LIBS}" ; then
21062	for cf_library_path in $LDFLAGS $LIBS
21063	do
21064		case "$cf_library_path" in
21065		(-L*)
21066			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
21067
21068test "x$cf_library_path" != "xNONE" && \
21069test -d "$cf_library_path" && \
21070 {
21071	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
21072	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
21073	test -d "$cf_library_path/lib/$cf_ipv6dir" &&       cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir"
21074	test -d "$cf_library_path/lib/$cf_ipv6dir/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_ipv6dir/lib"
21075	test -d "$cf_library_path/$cf_ipv6dir/lib" &&       cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib"
21076	test -d "$cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir" &&    cf_search="$cf_search $cf_library_path/$cf_ipv6dir/lib/$cf_ipv6dir"
21077}
21078
21079			cf_library_path_list="$cf_library_path_list $cf_search"
21080			;;
21081		esac
21082	done
21083fi
21084
21085cf_search=
21086
21087test "x$prefix" != "xNONE" && \
21088test -d "$prefix" && \
21089 {
21090	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
21091	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
21092	test -d "$prefix/lib/$cf_ipv6dir" &&       cf_search="$cf_search $prefix/lib/$cf_ipv6dir"
21093	test -d "$prefix/lib/$cf_ipv6dir/lib" &&    cf_search="$cf_search $prefix/lib/$cf_ipv6dir/lib"
21094	test -d "$prefix/$cf_ipv6dir/lib" &&       cf_search="$cf_search $prefix/$cf_ipv6dir/lib"
21095	test -d "$prefix/$cf_ipv6dir/lib/$cf_ipv6dir" &&    cf_search="$cf_search $prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
21096}
21097
21098for cf_subdir_prefix in \
21099	/usr \
21100	/usr/local \
21101	/usr/pkg \
21102	/opt \
21103	/opt/local \
21104	$HOME
21105do
21106
21107test "x$cf_subdir_prefix" != "x$prefix" && \
21108test -d "$cf_subdir_prefix" && \
21109{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
21110	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
21111	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
21112	test -d "$cf_subdir_prefix/lib/$cf_ipv6dir" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir"
21113	test -d "$cf_subdir_prefix/lib/$cf_ipv6dir/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_ipv6dir/lib"
21114	test -d "$cf_subdir_prefix/$cf_ipv6dir/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib"
21115	test -d "$cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir" &&    cf_search="$cf_search $cf_subdir_prefix/$cf_ipv6dir/lib/$cf_ipv6dir"
21116}
21117
21118done
21119
21120cf_search="$cf_library_path_list $cf_search"
21121
21122			for cf_libdir in $cf_search
21123			do
21124				echo "$as_me:21124: checking for -l$cf_ipv6lib in $cf_libdir" >&5
21125echo $ECHO_N "checking for -l$cf_ipv6lib in $cf_libdir... $ECHO_C" >&6
21126				LIBS="-L$cf_libdir -l$cf_ipv6lib $cf_save_LIBS"
21127				cat >"conftest.$ac_ext" <<_ACEOF
21128#line 21128 "configure"
21129#include "confdefs.h"
21130
21131#include <sys/types.h>
21132#include <netdb.h>
21133#include <netinet/in.h>
21134#include <netinet/ip6.h>
21135int
21136main (void)
21137{
21138getaddrinfo(0, 0, 0, 0)
21139  ;
21140  return 0;
21141}
21142_ACEOF
21143rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21144if { (eval echo "$as_me:21144: \"$ac_link\"") >&5
21145  (eval $ac_link) 2>&5
21146  ac_status=$?
21147  echo "$as_me:21147: \$? = $ac_status" >&5
21148  (exit "$ac_status"); } &&
21149         { ac_try='test -s "conftest$ac_exeext"'
21150  { (eval echo "$as_me:21150: \"$ac_try\"") >&5
21151  (eval $ac_try) 2>&5
21152  ac_status=$?
21153  echo "$as_me:21153: \$? = $ac_status" >&5
21154  (exit "$ac_status"); }; }; then
21155  echo "$as_me:21155: result: yes" >&5
21156echo "${ECHO_T}yes" >&6
21157			 		 eval 'cf_cv_have_lib_'"$cf_ipv6lib"'=yes'
21158					 break
21159else
21160  echo "$as_me: failed program was:" >&5
21161cat "conftest.$ac_ext" >&5
21162echo "$as_me:21162: result: no" >&5
21163echo "${ECHO_T}no" >&6
21164					 LIBS="$cf_save_LIBS"
21165fi
21166rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21167			done
21168
21169fi
21170rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21171
21172fi
21173
21174eval 'cf_found_library="$cf_cv_have_lib_'"$cf_ipv6lib"\"
21175
21176	if test "$cf_found_library" = no ; then
21177		{ { echo "$as_me:21177: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
21178from an appropriate IPv6 kit and compile beforehand." >&5
21179echo "$as_me: error: No $cf_ipv6lib library found, cannot continue.  You must fetch lib$cf_ipv6lib.a
21180from an appropriate IPv6 kit and compile beforehand." >&2;}
21181   { (exit 1); exit 1; }; }
21182	fi
21183fi
21184
21185echo "$as_me:21185: checking working getaddrinfo" >&5
21186echo $ECHO_N "checking working getaddrinfo... $ECHO_C" >&6
21187if test "${cf_cv_getaddrinfo+set}" = set; then
21188  echo $ECHO_N "(cached) $ECHO_C" >&6
21189else
21190
21191if test "$cross_compiling" = yes; then
21192  cf_cv_getaddrinfo=unknown
21193else
21194  cat >"conftest.$ac_ext" <<_ACEOF
21195#line 21195 "configure"
21196#include "confdefs.h"
21197
21198#include <sys/types.h>
21199#include <netdb.h>
21200#include <string.h>
21201#include <sys/socket.h>
21202#include <netinet/in.h>
21203
21204#define expect(a,b) if (strcmp(a,b) != 0) goto bad
21205
21206int main(void)
21207{
21208   int passive, gaierr, inet4 = 0, inet6 = 0;
21209   struct addrinfo hints, *ai, *aitop;
21210   char straddr[INET6_ADDRSTRLEN], strport[16];
21211
21212   for (passive = 0; passive <= 1; passive++) {
21213     memset(&hints, 0, sizeof(hints));
21214     hints.ai_family = AF_UNSPEC;
21215     hints.ai_flags = passive ? AI_PASSIVE : 0;
21216     hints.ai_socktype = SOCK_STREAM;
21217     if ((gaierr = getaddrinfo(NULL, "54321", &hints, &aitop)) != 0) {
21218       (void)gai_strerror(gaierr);
21219       goto bad;
21220     }
21221     for (ai = aitop; ai; ai = ai->ai_next) {
21222       if (ai->ai_addr == NULL ||
21223           ai->ai_addrlen == 0 ||
21224           getnameinfo(ai->ai_addr, ai->ai_addrlen,
21225                       straddr, sizeof(straddr), strport, sizeof(strport),
21226                       NI_NUMERICHOST|NI_NUMERICSERV) != 0) {
21227         goto bad;
21228       }
21229       switch (ai->ai_family) {
21230       case AF_INET:
21231         expect(strport, "54321");
21232         if (passive) {
21233           expect(straddr, "0.0.0.0");
21234         } else {
21235           expect(straddr, "127.0.0.1");
21236         }
21237         inet4++;
21238         break;
21239       case AF_INET6:
21240         expect(strport, "54321");
21241         if (passive) {
21242           expect(straddr, "::");
21243         } else {
21244           expect(straddr, "::1");
21245         }
21246         inet6++;
21247         break;
21248       case AF_UNSPEC:
21249         goto bad;
21250         break;
21251       default:
21252         /* another family support? */
21253         break;
21254       }
21255     }
21256   }
21257
21258   if (!(inet4 == 0 || inet4 == 2))
21259     goto bad;
21260   if (!(inet6 == 0 || inet6 == 2))
21261     goto bad;
21262
21263   if (aitop)
21264     freeaddrinfo(aitop);
21265   ${cf_cv_main_return:-return}(0);
21266
21267  bad:
21268   if (aitop)
21269     freeaddrinfo(aitop);
21270   ${cf_cv_main_return:-return}(1);
21271}
21272
21273_ACEOF
21274rm -f "conftest$ac_exeext"
21275if { (eval echo "$as_me:21275: \"$ac_link\"") >&5
21276  (eval $ac_link) 2>&5
21277  ac_status=$?
21278  echo "$as_me:21278: \$? = $ac_status" >&5
21279  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21280  { (eval echo "$as_me:21280: \"$ac_try\"") >&5
21281  (eval $ac_try) 2>&5
21282  ac_status=$?
21283  echo "$as_me:21283: \$? = $ac_status" >&5
21284  (exit "$ac_status"); }; }; then
21285  cf_cv_getaddrinfo=yes
21286else
21287  echo "$as_me: program exited with status $ac_status" >&5
21288echo "$as_me: failed program was:" >&5
21289cat "conftest.$ac_ext" >&5
21290cf_cv_getaddrinfo=no
21291fi
21292rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21293fi
21294
21295fi
21296echo "$as_me:21296: result: $cf_cv_getaddrinfo" >&5
21297echo "${ECHO_T}$cf_cv_getaddrinfo" >&6
21298if test "$cf_cv_getaddrinfo" = yes ; then
21299
21300cat >>confdefs.h <<\EOF
21301#define HAVE_GAI_STRERROR 1
21302EOF
21303
21304cat >>confdefs.h <<\EOF
21305#define HAVE_GETADDRINFO 1
21306EOF
21307
21308fi
21309
21310if test "$cf_cv_getaddrinfo" != "yes"; then
21311	if test "$cf_cv_ipv6type" != "linux"; then
21312		{ echo "$as_me:21312: WARNING: You must get working getaddrinfo() function,
21313or you can specify \"--disable-ipv6\"" >&5
21314echo "$as_me: WARNING: You must get working getaddrinfo() function,
21315or you can specify \"--disable-ipv6\"" >&2;}
21316	else
21317		{ echo "$as_me:21317: WARNING: The getaddrinfo() implementation on your system seems be buggy.
21318You should upgrade your system library to the newest version
21319of GNU C library (aka glibc)." >&5
21320echo "$as_me: WARNING: The getaddrinfo() implementation on your system seems be buggy.
21321You should upgrade your system library to the newest version
21322of GNU C library (aka glibc)." >&2;}
21323	fi
21324fi
21325
21326fi
21327
21328echo "$as_me:21328: checking for screen type" >&5
21329echo $ECHO_N "checking for screen type... $ECHO_C" >&6
21330if test "${cf_cv_screen+set}" = set; then
21331  echo $ECHO_N "(cached) $ECHO_C" >&6
21332else
21333
21334# Check whether --with-screen or --without-screen was given.
21335if test "${with_screen+set}" = set; then
21336  withval="$with_screen"
21337
21338case "$withval" in
21339(curses|ncurses*|pdcurses|slang)
21340	cf_cv_screen=$withval
21341	;;
21342(*)	{ { echo "$as_me:21342: error: Unexpected value $withval" >&5
21343echo "$as_me: error: Unexpected value $withval" >&2;}
21344   { (exit 1); exit 1; }; }
21345	;;
21346esac
21347else
21348  cf_cv_screen=curses
21349fi;
21350fi
21351echo "$as_me:21351: result: $cf_cv_screen" >&5
21352echo "${ECHO_T}$cf_cv_screen" >&6
21353
21354case "$cf_cv_screen" in
21355(curses|ncurses*)
21356
21357echo "$as_me:21357: checking for specific curses-directory" >&5
21358echo $ECHO_N "checking for specific curses-directory... $ECHO_C" >&6
21359
21360# Check whether --with-curses-dir or --without-curses-dir was given.
21361if test "${with_curses_dir+set}" = set; then
21362  withval="$with_curses_dir"
21363  cf_cv_curses_dir=$withval
21364else
21365  cf_cv_curses_dir=no
21366fi;
21367echo "$as_me:21367: result: $cf_cv_curses_dir" >&5
21368echo "${ECHO_T}$cf_cv_curses_dir" >&6
21369
21370if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
21371then
21372
21373if test "x$prefix" != xNONE; then
21374	cf_path_syntax="$prefix"
21375else
21376	cf_path_syntax="$ac_default_prefix"
21377fi
21378
21379case ".$withval" in
21380(.\$\(*\)*|.\'*\'*)
21381	;;
21382(..|./*|.\\*)
21383	;;
21384(.[a-zA-Z]:[\\/]*) # OS/2 EMX
21385	;;
21386(.\$\{*prefix\}*|.\$\{*dir\}*)
21387	eval withval="$withval"
21388	case ".$withval" in
21389	(.NONE/*)
21390		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
21391		;;
21392	esac
21393	;;
21394(.no|.NONE/*)
21395	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
21396	;;
21397(*)
21398	{ { echo "$as_me:21398: error: expected a pathname, not \"$withval\"" >&5
21399echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
21400   { (exit 1); exit 1; }; }
21401	;;
21402esac
21403
21404	if test -d "$cf_cv_curses_dir"
21405	then
21406
21407if test -n "$cf_cv_curses_dir/include" ; then
21408  for cf_add_incdir in $cf_cv_curses_dir/include
21409  do
21410	while test "$cf_add_incdir" != /usr/include
21411	do
21412	  if test -d "$cf_add_incdir"
21413	  then
21414		cf_have_incdir=no
21415		if test -n "$CFLAGS$CPPFLAGS" ; then
21416		  # a loop is needed to ensure we can add subdirs of existing dirs
21417		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
21418			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
21419			  cf_have_incdir=yes; break
21420			fi
21421		  done
21422		fi
21423
21424		if test "$cf_have_incdir" = no ; then
21425		  if test "$cf_add_incdir" = /usr/local/include ; then
21426			if test "$GCC" = yes
21427			then
21428			  cf_save_CPPFLAGS=$CPPFLAGS
21429
21430	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21431	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
21432
21433			  cat >"conftest.$ac_ext" <<_ACEOF
21434#line 21434 "configure"
21435#include "confdefs.h"
21436#include <stdio.h>
21437int
21438main (void)
21439{
21440printf("Hello")
21441  ;
21442  return 0;
21443}
21444_ACEOF
21445rm -f "conftest.$ac_objext"
21446if { (eval echo "$as_me:21446: \"$ac_compile\"") >&5
21447  (eval $ac_compile) 2>&5
21448  ac_status=$?
21449  echo "$as_me:21449: \$? = $ac_status" >&5
21450  (exit "$ac_status"); } &&
21451         { ac_try='test -s "conftest.$ac_objext"'
21452  { (eval echo "$as_me:21452: \"$ac_try\"") >&5
21453  (eval $ac_try) 2>&5
21454  ac_status=$?
21455  echo "$as_me:21455: \$? = $ac_status" >&5
21456  (exit "$ac_status"); }; }; then
21457  :
21458else
21459  echo "$as_me: failed program was:" >&5
21460cat "conftest.$ac_ext" >&5
21461cf_have_incdir=yes
21462fi
21463rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21464			  CPPFLAGS=$cf_save_CPPFLAGS
21465			fi
21466		  fi
21467		fi
21468
21469		if test "$cf_have_incdir" = no ; then
21470		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
21471
21472echo "${as_me:-configure}:21472: testing adding $cf_add_incdir to include-path ..." 1>&5
21473
21474		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
21475
21476		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
21477		  test "$cf_top_incdir" = "$cf_add_incdir" && break
21478		  cf_add_incdir="$cf_top_incdir"
21479		else
21480		  break
21481		fi
21482	  else
21483		break
21484	  fi
21485	done
21486  done
21487fi
21488
21489if test -n "$cf_cv_curses_dir/lib" ; then
21490	for cf_add_libdir in $cf_cv_curses_dir/lib
21491	do
21492		if test "$cf_add_libdir" = /usr/lib ; then
21493			:
21494		elif test -d "$cf_add_libdir"
21495		then
21496			cf_have_libdir=no
21497			if test -n "$LDFLAGS$LIBS" ; then
21498				# a loop is needed to ensure we can add subdirs of existing dirs
21499				for cf_test_libdir in $LDFLAGS $LIBS ; do
21500					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
21501						cf_have_libdir=yes; break
21502					fi
21503				done
21504			fi
21505			if test "$cf_have_libdir" = no ; then
21506				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
21507
21508echo "${as_me:-configure}:21508: testing adding $cf_add_libdir to library-path ..." 1>&5
21509
21510				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
21511			fi
21512		fi
21513	done
21514fi
21515
21516	fi
21517fi
21518
21519	;;
21520esac
21521
21522cf_wide_curses=no
21523dft_color_style=yes
21524case "$cf_cv_screen" in
21525(curses)
21526
21527echo "$as_me:21527: checking for extra include directories" >&5
21528echo $ECHO_N "checking for extra include directories... $ECHO_C" >&6
21529if test "${cf_cv_curses_incdir+set}" = set; then
21530  echo $ECHO_N "(cached) $ECHO_C" >&6
21531else
21532
21533cf_cv_curses_incdir=no
21534case "$host_os" in
21535(hpux10.*)
21536	if test "x$cf_cv_screen" = "xcurses_colr"
21537	then
21538		test -d /usr/include/curses_colr && \
21539		cf_cv_curses_incdir="-I/usr/include/curses_colr"
21540	fi
21541	;;
21542(sunos3*|sunos4*)
21543	if test "x$cf_cv_screen" = "xcurses_5lib"
21544	then
21545		test -d /usr/5lib && \
21546		test -d /usr/5include && \
21547		cf_cv_curses_incdir="-I/usr/5include"
21548	fi
21549	;;
21550esac
21551
21552fi
21553echo "$as_me:21553: result: $cf_cv_curses_incdir" >&5
21554echo "${ECHO_T}$cf_cv_curses_incdir" >&6
21555if test "$cf_cv_curses_incdir" != no
21556then
21557
21558	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
21559	CPPFLAGS="${CPPFLAGS}$cf_cv_curses_incdir"
21560
21561fi
21562
21563echo "$as_me:21563: checking if we have identified curses headers" >&5
21564echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
21565if test "${cf_cv_ncurses_header+set}" = set; then
21566  echo $ECHO_N "(cached) $ECHO_C" >&6
21567else
21568
21569cf_cv_ncurses_header=none
21570for cf_header in \
21571	ncurses.h  \
21572	curses.h  ncurses/ncurses.h ncurses/curses.h
21573do
21574cat >"conftest.$ac_ext" <<_ACEOF
21575#line 21575 "configure"
21576#include "confdefs.h"
21577#include <${cf_header}>
21578int
21579main (void)
21580{
21581initscr(); tgoto("?", 0,0)
21582  ;
21583  return 0;
21584}
21585_ACEOF
21586rm -f "conftest.$ac_objext"
21587if { (eval echo "$as_me:21587: \"$ac_compile\"") >&5
21588  (eval $ac_compile) 2>&5
21589  ac_status=$?
21590  echo "$as_me:21590: \$? = $ac_status" >&5
21591  (exit "$ac_status"); } &&
21592         { ac_try='test -s "conftest.$ac_objext"'
21593  { (eval echo "$as_me:21593: \"$ac_try\"") >&5
21594  (eval $ac_try) 2>&5
21595  ac_status=$?
21596  echo "$as_me:21596: \$? = $ac_status" >&5
21597  (exit "$ac_status"); }; }; then
21598  cf_cv_ncurses_header=$cf_header; break
21599else
21600  echo "$as_me: failed program was:" >&5
21601cat "conftest.$ac_ext" >&5
21602fi
21603rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21604done
21605
21606fi
21607echo "$as_me:21607: result: $cf_cv_ncurses_header" >&5
21608echo "${ECHO_T}$cf_cv_ncurses_header" >&6
21609
21610if test "$cf_cv_ncurses_header" = none ; then
21611	{ { echo "$as_me:21611: error: No curses header-files found" >&5
21612echo "$as_me: error: No curses header-files found" >&2;}
21613   { (exit 1); exit 1; }; }
21614fi
21615
21616# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
21617
21618for ac_header in $cf_cv_ncurses_header
21619do
21620as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
21621echo "$as_me:21621: checking for $ac_header" >&5
21622echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
21623if eval "test \"\${$as_ac_Header+set}\" = set"; then
21624  echo $ECHO_N "(cached) $ECHO_C" >&6
21625else
21626  cat >"conftest.$ac_ext" <<_ACEOF
21627#line 21627 "configure"
21628#include "confdefs.h"
21629#include <$ac_header>
21630_ACEOF
21631if { (eval echo "$as_me:21631: \"$ac_cpp "conftest.$ac_ext"\"") >&5
21632  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
21633  ac_status=$?
21634  $EGREP -v '^ *\+' conftest.er1 >conftest.err
21635  rm -f conftest.er1
21636  cat conftest.err >&5
21637  echo "$as_me:21637: \$? = $ac_status" >&5
21638  (exit "$ac_status"); } >/dev/null; then
21639  if test -s conftest.err; then
21640    ac_cpp_err=$ac_c_preproc_warn_flag
21641  else
21642    ac_cpp_err=
21643  fi
21644else
21645  ac_cpp_err=yes
21646fi
21647if test -z "$ac_cpp_err"; then
21648  eval "$as_ac_Header=yes"
21649else
21650  echo "$as_me: failed program was:" >&5
21651  cat "conftest.$ac_ext" >&5
21652  eval "$as_ac_Header=no"
21653fi
21654rm -f conftest.err "conftest.$ac_ext"
21655fi
21656echo "$as_me:21656: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
21657echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
21658if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
21659  cat >>confdefs.h <<EOF
21660#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
21661EOF
21662
21663fi
21664done
21665
21666echo "$as_me:21666: checking for terminfo header" >&5
21667echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
21668if test "${cf_cv_term_header+set}" = set; then
21669  echo $ECHO_N "(cached) $ECHO_C" >&6
21670else
21671
21672case "${cf_cv_ncurses_header}" in
21673(*/ncurses.h|*/ncursesw.h)
21674	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
21675	;;
21676(*)
21677	cf_term_header=term.h
21678	;;
21679esac
21680
21681for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
21682do
21683cat >"conftest.$ac_ext" <<_ACEOF
21684#line 21684 "configure"
21685#include "confdefs.h"
21686#include <stdio.h>
21687#include <${cf_cv_ncurses_header:-curses.h}>
21688#include <$cf_test>
21689
21690int
21691main (void)
21692{
21693int x = auto_left_margin; (void)x
21694  ;
21695  return 0;
21696}
21697_ACEOF
21698rm -f "conftest.$ac_objext"
21699if { (eval echo "$as_me:21699: \"$ac_compile\"") >&5
21700  (eval $ac_compile) 2>&5
21701  ac_status=$?
21702  echo "$as_me:21702: \$? = $ac_status" >&5
21703  (exit "$ac_status"); } &&
21704         { ac_try='test -s "conftest.$ac_objext"'
21705  { (eval echo "$as_me:21705: \"$ac_try\"") >&5
21706  (eval $ac_try) 2>&5
21707  ac_status=$?
21708  echo "$as_me:21708: \$? = $ac_status" >&5
21709  (exit "$ac_status"); }; }; then
21710
21711	cf_cv_term_header="$cf_test"
21712else
21713  echo "$as_me: failed program was:" >&5
21714cat "conftest.$ac_ext" >&5
21715
21716	cf_cv_term_header=unknown
21717
21718fi
21719rm -f "conftest.$ac_objext" "conftest.$ac_ext"
21720	test "$cf_cv_term_header" != unknown && break
21721done
21722
21723fi
21724echo "$as_me:21724: result: $cf_cv_term_header" >&5
21725echo "${ECHO_T}$cf_cv_term_header" >&6
21726
21727# Set definitions to allow ifdef'ing to accommodate subdirectories
21728
21729case "$cf_cv_term_header" in
21730(*term.h)
21731
21732cat >>confdefs.h <<\EOF
21733#define HAVE_TERM_H 1
21734EOF
21735
21736	;;
21737esac
21738
21739case "$cf_cv_term_header" in
21740(ncurses/term.h)
21741
21742cat >>confdefs.h <<\EOF
21743#define HAVE_NCURSES_TERM_H 1
21744EOF
21745
21746	;;
21747(ncursesw/term.h)
21748
21749cat >>confdefs.h <<\EOF
21750#define HAVE_NCURSESW_TERM_H 1
21751EOF
21752
21753	;;
21754esac
21755
21756echo "$as_me:21756: checking for ncurses version" >&5
21757echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
21758if test "${cf_cv_ncurses_version+set}" = set; then
21759  echo $ECHO_N "(cached) $ECHO_C" >&6
21760else
21761
21762	cf_cv_ncurses_version=no
21763	cf_tempfile=out$$
21764	rm -f "$cf_tempfile"
21765	if test "$cross_compiling" = yes; then
21766
21767	# This will not work if the preprocessor splits the line after the
21768	# Autoconf token.  The 'unproto' program does that.
21769	cat > "conftest.$ac_ext" <<EOF
21770#include <${cf_cv_ncurses_header:-curses.h}>
21771#undef Autoconf
21772#ifdef NCURSES_VERSION
21773Autoconf NCURSES_VERSION
21774#else
21775#ifdef __NCURSES_H
21776Autoconf "old"
21777#endif
21778;
21779#endif
21780EOF
21781	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
21782	{ (eval echo "$as_me:21782: \"$cf_try\"") >&5
21783  (eval $cf_try) 2>&5
21784  ac_status=$?
21785  echo "$as_me:21785: \$? = $ac_status" >&5
21786  (exit "$ac_status"); }
21787	if test -f conftest.out ; then
21788		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
21789		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
21790		rm -f conftest.out
21791	fi
21792
21793else
21794  cat >"conftest.$ac_ext" <<_ACEOF
21795#line 21795 "configure"
21796#include "confdefs.h"
21797
21798#include <${cf_cv_ncurses_header:-curses.h}>
21799#include <stdio.h>
21800int main(void)
21801{
21802	FILE *fp = fopen("$cf_tempfile", "w");
21803#ifdef NCURSES_VERSION
21804# ifdef NCURSES_VERSION_PATCH
21805	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
21806# else
21807	fprintf(fp, "%s\\n", NCURSES_VERSION);
21808# endif
21809#else
21810# ifdef __NCURSES_H
21811	fprintf(fp, "old\\n");
21812# else
21813	make an error
21814# endif
21815#endif
21816	${cf_cv_main_return:-return}(0);
21817}
21818_ACEOF
21819rm -f "conftest$ac_exeext"
21820if { (eval echo "$as_me:21820: \"$ac_link\"") >&5
21821  (eval $ac_link) 2>&5
21822  ac_status=$?
21823  echo "$as_me:21823: \$? = $ac_status" >&5
21824  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
21825  { (eval echo "$as_me:21825: \"$ac_try\"") >&5
21826  (eval $ac_try) 2>&5
21827  ac_status=$?
21828  echo "$as_me:21828: \$? = $ac_status" >&5
21829  (exit "$ac_status"); }; }; then
21830
21831	cf_cv_ncurses_version=`cat $cf_tempfile`
21832else
21833  echo "$as_me: program exited with status $ac_status" >&5
21834echo "$as_me: failed program was:" >&5
21835cat "conftest.$ac_ext" >&5
21836fi
21837rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
21838fi
21839	rm -f "$cf_tempfile"
21840
21841fi
21842echo "$as_me:21842: result: $cf_cv_ncurses_version" >&5
21843echo "${ECHO_T}$cf_cv_ncurses_version" >&6
21844test "$cf_cv_ncurses_version" = no ||
21845cat >>confdefs.h <<\EOF
21846#define NCURSES 1
21847EOF
21848
21849echo "$as_me:21849: checking if we have identified curses libraries" >&5
21850echo $ECHO_N "checking if we have identified curses libraries... $ECHO_C" >&6
21851cat >"conftest.$ac_ext" <<_ACEOF
21852#line 21852 "configure"
21853#include "confdefs.h"
21854#include <${cf_cv_ncurses_header:-curses.h}>
21855int
21856main (void)
21857{
21858initscr(); tgoto("?", 0,0)
21859  ;
21860  return 0;
21861}
21862_ACEOF
21863rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21864if { (eval echo "$as_me:21864: \"$ac_link\"") >&5
21865  (eval $ac_link) 2>&5
21866  ac_status=$?
21867  echo "$as_me:21867: \$? = $ac_status" >&5
21868  (exit "$ac_status"); } &&
21869         { ac_try='test -s "conftest$ac_exeext"'
21870  { (eval echo "$as_me:21870: \"$ac_try\"") >&5
21871  (eval $ac_try) 2>&5
21872  ac_status=$?
21873  echo "$as_me:21873: \$? = $ac_status" >&5
21874  (exit "$ac_status"); }; }; then
21875  cf_result=yes
21876else
21877  echo "$as_me: failed program was:" >&5
21878cat "conftest.$ac_ext" >&5
21879cf_result=no
21880fi
21881rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21882echo "$as_me:21882: result: $cf_result" >&5
21883echo "${ECHO_T}$cf_result" >&6
21884
21885if test "$cf_result" = no ; then
21886case "$host_os" in
21887(freebsd*)
21888	echo "$as_me:21888: checking for tgoto in -lmytinfo" >&5
21889echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
21890if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
21891  echo $ECHO_N "(cached) $ECHO_C" >&6
21892else
21893  ac_check_lib_save_LIBS=$LIBS
21894LIBS="-lmytinfo  $LIBS"
21895cat >"conftest.$ac_ext" <<_ACEOF
21896#line 21896 "configure"
21897#include "confdefs.h"
21898
21899/* Override any gcc2 internal prototype to avoid an error.  */
21900#ifdef __cplusplus
21901extern "C"
21902#endif
21903/* We use char because int might match the return type of a gcc2
21904   builtin and then its argument prototype would still apply.  */
21905char tgoto ();
21906int
21907main (void)
21908{
21909tgoto ();
21910  ;
21911  return 0;
21912}
21913_ACEOF
21914rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21915if { (eval echo "$as_me:21915: \"$ac_link\"") >&5
21916  (eval $ac_link) 2>&5
21917  ac_status=$?
21918  echo "$as_me:21918: \$? = $ac_status" >&5
21919  (exit "$ac_status"); } &&
21920         { ac_try='test -s "conftest$ac_exeext"'
21921  { (eval echo "$as_me:21921: \"$ac_try\"") >&5
21922  (eval $ac_try) 2>&5
21923  ac_status=$?
21924  echo "$as_me:21924: \$? = $ac_status" >&5
21925  (exit "$ac_status"); }; }; then
21926  ac_cv_lib_mytinfo_tgoto=yes
21927else
21928  echo "$as_me: failed program was:" >&5
21929cat "conftest.$ac_ext" >&5
21930ac_cv_lib_mytinfo_tgoto=no
21931fi
21932rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
21933LIBS=$ac_check_lib_save_LIBS
21934fi
21935echo "$as_me:21935: result: $ac_cv_lib_mytinfo_tgoto" >&5
21936echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
21937if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
21938
21939cf_add_libs="$LIBS"
21940# reverse order
21941cf_add_0lib=
21942for cf_add_1lib in -lmytinfo; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
21943# filter duplicates
21944for cf_add_1lib in $cf_add_0lib; do
21945	for cf_add_2lib in $cf_add_libs; do
21946		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
21947			cf_add_1lib=
21948			break
21949		fi
21950	done
21951	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
21952done
21953LIBS="$cf_add_libs"
21954
21955fi
21956
21957	;;
21958(hpux10.*)
21959	# Looking at HPUX 10.20, the Hcurses library is the oldest (1997), cur_colr
21960	# next (1998), and xcurses "newer" (2000).  There is no header file for
21961	# Hcurses; the subdirectory curses_colr has the headers (curses.h and
21962	# term.h) for cur_colr
21963	if test "x$cf_cv_screen" = "xcurses_colr"
21964	then
21965		echo "$as_me:21965: checking for initscr in -lcur_colr" >&5
21966echo $ECHO_N "checking for initscr in -lcur_colr... $ECHO_C" >&6
21967if test "${ac_cv_lib_cur_colr_initscr+set}" = set; then
21968  echo $ECHO_N "(cached) $ECHO_C" >&6
21969else
21970  ac_check_lib_save_LIBS=$LIBS
21971LIBS="-lcur_colr  $LIBS"
21972cat >"conftest.$ac_ext" <<_ACEOF
21973#line 21973 "configure"
21974#include "confdefs.h"
21975
21976/* Override any gcc2 internal prototype to avoid an error.  */
21977#ifdef __cplusplus
21978extern "C"
21979#endif
21980/* We use char because int might match the return type of a gcc2
21981   builtin and then its argument prototype would still apply.  */
21982char initscr ();
21983int
21984main (void)
21985{
21986initscr ();
21987  ;
21988  return 0;
21989}
21990_ACEOF
21991rm -f "conftest.$ac_objext" "conftest$ac_exeext"
21992if { (eval echo "$as_me:21992: \"$ac_link\"") >&5
21993  (eval $ac_link) 2>&5
21994  ac_status=$?
21995  echo "$as_me:21995: \$? = $ac_status" >&5
21996  (exit "$ac_status"); } &&
21997         { ac_try='test -s "conftest$ac_exeext"'
21998  { (eval echo "$as_me:21998: \"$ac_try\"") >&5
21999  (eval $ac_try) 2>&5
22000  ac_status=$?
22001  echo "$as_me:22001: \$? = $ac_status" >&5
22002  (exit "$ac_status"); }; }; then
22003  ac_cv_lib_cur_colr_initscr=yes
22004else
22005  echo "$as_me: failed program was:" >&5
22006cat "conftest.$ac_ext" >&5
22007ac_cv_lib_cur_colr_initscr=no
22008fi
22009rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22010LIBS=$ac_check_lib_save_LIBS
22011fi
22012echo "$as_me:22012: result: $ac_cv_lib_cur_colr_initscr" >&5
22013echo "${ECHO_T}$ac_cv_lib_cur_colr_initscr" >&6
22014if test "$ac_cv_lib_cur_colr_initscr" = yes; then
22015
22016cf_add_libs="$LIBS"
22017# reverse order
22018cf_add_0lib=
22019for cf_add_1lib in -lcur_colr; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22020# filter duplicates
22021for cf_add_1lib in $cf_add_0lib; do
22022	for cf_add_2lib in $cf_add_libs; do
22023		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22024			cf_add_1lib=
22025			break
22026		fi
22027	done
22028	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22029done
22030LIBS="$cf_add_libs"
22031
22032			ac_cv_func_initscr=yes
22033
22034else
22035
22036		echo "$as_me:22036: checking for initscr in -lHcurses" >&5
22037echo $ECHO_N "checking for initscr in -lHcurses... $ECHO_C" >&6
22038if test "${ac_cv_lib_Hcurses_initscr+set}" = set; then
22039  echo $ECHO_N "(cached) $ECHO_C" >&6
22040else
22041  ac_check_lib_save_LIBS=$LIBS
22042LIBS="-lHcurses  $LIBS"
22043cat >"conftest.$ac_ext" <<_ACEOF
22044#line 22044 "configure"
22045#include "confdefs.h"
22046
22047/* Override any gcc2 internal prototype to avoid an error.  */
22048#ifdef __cplusplus
22049extern "C"
22050#endif
22051/* We use char because int might match the return type of a gcc2
22052   builtin and then its argument prototype would still apply.  */
22053char initscr ();
22054int
22055main (void)
22056{
22057initscr ();
22058  ;
22059  return 0;
22060}
22061_ACEOF
22062rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22063if { (eval echo "$as_me:22063: \"$ac_link\"") >&5
22064  (eval $ac_link) 2>&5
22065  ac_status=$?
22066  echo "$as_me:22066: \$? = $ac_status" >&5
22067  (exit "$ac_status"); } &&
22068         { ac_try='test -s "conftest$ac_exeext"'
22069  { (eval echo "$as_me:22069: \"$ac_try\"") >&5
22070  (eval $ac_try) 2>&5
22071  ac_status=$?
22072  echo "$as_me:22072: \$? = $ac_status" >&5
22073  (exit "$ac_status"); }; }; then
22074  ac_cv_lib_Hcurses_initscr=yes
22075else
22076  echo "$as_me: failed program was:" >&5
22077cat "conftest.$ac_ext" >&5
22078ac_cv_lib_Hcurses_initscr=no
22079fi
22080rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22081LIBS=$ac_check_lib_save_LIBS
22082fi
22083echo "$as_me:22083: result: $ac_cv_lib_Hcurses_initscr" >&5
22084echo "${ECHO_T}$ac_cv_lib_Hcurses_initscr" >&6
22085if test "$ac_cv_lib_Hcurses_initscr" = yes; then
22086
22087			# HP's header uses __HP_CURSES, but user claims _HP_CURSES.
22088
22089cf_add_libs="$LIBS"
22090# reverse order
22091cf_add_0lib=
22092for cf_add_1lib in -lHcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22093# filter duplicates
22094for cf_add_1lib in $cf_add_0lib; do
22095	for cf_add_2lib in $cf_add_libs; do
22096		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22097			cf_add_1lib=
22098			break
22099		fi
22100	done
22101	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22102done
22103LIBS="$cf_add_libs"
22104
22105	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22106	CPPFLAGS="${CPPFLAGS}-D__HP_CURSES -D_HP_CURSES"
22107
22108			ac_cv_func_initscr=yes
22109
22110fi
22111
22112fi
22113
22114	fi
22115	;;
22116(linux*)
22117	case `arch 2>/dev/null` in
22118	(x86_64)
22119		if test -d /lib64
22120		then
22121
22122if test -n "/lib64" ; then
22123	for cf_add_libdir in /lib64
22124	do
22125		if test "$cf_add_libdir" = /usr/lib ; then
22126			:
22127		elif test -d "$cf_add_libdir"
22128		then
22129			cf_have_libdir=no
22130			if test -n "$LDFLAGS$LIBS" ; then
22131				# a loop is needed to ensure we can add subdirs of existing dirs
22132				for cf_test_libdir in $LDFLAGS $LIBS ; do
22133					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22134						cf_have_libdir=yes; break
22135					fi
22136				done
22137			fi
22138			if test "$cf_have_libdir" = no ; then
22139				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22140
22141echo "${as_me:-configure}:22141: testing adding $cf_add_libdir to library-path ..." 1>&5
22142
22143				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22144			fi
22145		fi
22146	done
22147fi
22148
22149		else
22150
22151if test -n "/lib" ; then
22152	for cf_add_libdir in /lib
22153	do
22154		if test "$cf_add_libdir" = /usr/lib ; then
22155			:
22156		elif test -d "$cf_add_libdir"
22157		then
22158			cf_have_libdir=no
22159			if test -n "$LDFLAGS$LIBS" ; then
22160				# a loop is needed to ensure we can add subdirs of existing dirs
22161				for cf_test_libdir in $LDFLAGS $LIBS ; do
22162					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22163						cf_have_libdir=yes; break
22164					fi
22165				done
22166			fi
22167			if test "$cf_have_libdir" = no ; then
22168				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22169
22170echo "${as_me:-configure}:22170: testing adding $cf_add_libdir to library-path ..." 1>&5
22171
22172				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22173			fi
22174		fi
22175	done
22176fi
22177
22178		fi
22179		;;
22180	(*)
22181
22182if test -n "/lib" ; then
22183	for cf_add_libdir in /lib
22184	do
22185		if test "$cf_add_libdir" = /usr/lib ; then
22186			:
22187		elif test -d "$cf_add_libdir"
22188		then
22189			cf_have_libdir=no
22190			if test -n "$LDFLAGS$LIBS" ; then
22191				# a loop is needed to ensure we can add subdirs of existing dirs
22192				for cf_test_libdir in $LDFLAGS $LIBS ; do
22193					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22194						cf_have_libdir=yes; break
22195					fi
22196				done
22197			fi
22198			if test "$cf_have_libdir" = no ; then
22199				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22200
22201echo "${as_me:-configure}:22201: testing adding $cf_add_libdir to library-path ..." 1>&5
22202
22203				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22204			fi
22205		fi
22206	done
22207fi
22208
22209		;;
22210	esac
22211	;;
22212(sunos3*|sunos4*)
22213	if test "x$cf_cv_screen" = "xcurses_5lib"
22214	then
22215		if test -d /usr/5lib ; then
22216
22217if test -n "/usr/5lib" ; then
22218	for cf_add_libdir in /usr/5lib
22219	do
22220		if test "$cf_add_libdir" = /usr/lib ; then
22221			:
22222		elif test -d "$cf_add_libdir"
22223		then
22224			cf_have_libdir=no
22225			if test -n "$LDFLAGS$LIBS" ; then
22226				# a loop is needed to ensure we can add subdirs of existing dirs
22227				for cf_test_libdir in $LDFLAGS $LIBS ; do
22228					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
22229						cf_have_libdir=yes; break
22230					fi
22231				done
22232			fi
22233			if test "$cf_have_libdir" = no ; then
22234				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
22235
22236echo "${as_me:-configure}:22236: testing adding $cf_add_libdir to library-path ..." 1>&5
22237
22238				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
22239			fi
22240		fi
22241	done
22242fi
22243
22244cf_add_libs="$LIBS"
22245# reverse order
22246cf_add_0lib=
22247for cf_add_1lib in -lcurses -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
22248# filter duplicates
22249for cf_add_1lib in $cf_add_0lib; do
22250	for cf_add_2lib in $cf_add_libs; do
22251		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
22252			cf_add_1lib=
22253			break
22254		fi
22255	done
22256	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
22257done
22258LIBS="$cf_add_libs"
22259
22260		fi
22261	fi
22262	ac_cv_func_initscr=yes
22263	;;
22264esac
22265
22266if test ".$ac_cv_func_initscr" != .yes ; then
22267	cf_save_LIBS="$LIBS"
22268
22269	if test ".${cf_cv_ncurses_version:-no}" != .no
22270	then
22271		cf_check_list="ncurses curses cursesX"
22272	else
22273		cf_check_list="cursesX curses ncurses"
22274	fi
22275
22276	# Check for library containing tgoto.  Do this before curses library
22277	# because it may be needed to link the test-case for initscr.
22278	if test "x$cf_term_lib" = x
22279	then
22280		echo "$as_me:22280: checking for tgoto" >&5
22281echo $ECHO_N "checking for tgoto... $ECHO_C" >&6
22282if test "${ac_cv_func_tgoto+set}" = set; then
22283  echo $ECHO_N "(cached) $ECHO_C" >&6
22284else
22285  cat >"conftest.$ac_ext" <<_ACEOF
22286#line 22286 "configure"
22287#include "confdefs.h"
22288#define tgoto autoconf_temporary
22289#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
22290#undef tgoto
22291
22292#ifdef __cplusplus
22293extern "C"
22294#endif
22295
22296/* We use char because int might match the return type of a gcc2
22297   builtin and then its argument prototype would still apply.  */
22298char tgoto (void);
22299
22300int
22301main (void)
22302{
22303
22304/* The GNU C library defines stubs for functions which it implements
22305    to always fail with ENOSYS.  Some functions are actually named
22306    something starting with __ and the normal name is an alias.  */
22307#if defined (__stub_tgoto) || defined (__stub___tgoto)
22308#error found stub for tgoto
22309#endif
22310
22311	return tgoto ();
22312  ;
22313  return 0;
22314}
22315_ACEOF
22316rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22317if { (eval echo "$as_me:22317: \"$ac_link\"") >&5
22318  (eval $ac_link) 2>&5
22319  ac_status=$?
22320  echo "$as_me:22320: \$? = $ac_status" >&5
22321  (exit "$ac_status"); } &&
22322         { ac_try='test -s "conftest$ac_exeext"'
22323  { (eval echo "$as_me:22323: \"$ac_try\"") >&5
22324  (eval $ac_try) 2>&5
22325  ac_status=$?
22326  echo "$as_me:22326: \$? = $ac_status" >&5
22327  (exit "$ac_status"); }; }; then
22328  ac_cv_func_tgoto=yes
22329else
22330  echo "$as_me: failed program was:" >&5
22331cat "conftest.$ac_ext" >&5
22332ac_cv_func_tgoto=no
22333fi
22334rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22335fi
22336echo "$as_me:22336: result: $ac_cv_func_tgoto" >&5
22337echo "${ECHO_T}$ac_cv_func_tgoto" >&6
22338if test "$ac_cv_func_tgoto" = yes; then
22339  cf_term_lib=predefined
22340else
22341
22342			for cf_term_lib in $cf_check_list otermcap termcap tinfo termlib unknown
22343			do
22344				as_ac_Lib=`echo "ac_cv_lib_$cf_term_lib''_tgoto" | $as_tr_sh`
22345echo "$as_me:22345: checking for tgoto in -l$cf_term_lib" >&5
22346echo $ECHO_N "checking for tgoto in -l$cf_term_lib... $ECHO_C" >&6
22347if eval "test \"\${$as_ac_Lib+set}\" = set"; then
22348  echo $ECHO_N "(cached) $ECHO_C" >&6
22349else
22350  ac_check_lib_save_LIBS=$LIBS
22351LIBS="-l$cf_term_lib  $LIBS"
22352cat >"conftest.$ac_ext" <<_ACEOF
22353#line 22353 "configure"
22354#include "confdefs.h"
22355
22356/* Override any gcc2 internal prototype to avoid an error.  */
22357#ifdef __cplusplus
22358extern "C"
22359#endif
22360/* We use char because int might match the return type of a gcc2
22361   builtin and then its argument prototype would still apply.  */
22362char tgoto ();
22363int
22364main (void)
22365{
22366tgoto ();
22367  ;
22368  return 0;
22369}
22370_ACEOF
22371rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22372if { (eval echo "$as_me:22372: \"$ac_link\"") >&5
22373  (eval $ac_link) 2>&5
22374  ac_status=$?
22375  echo "$as_me:22375: \$? = $ac_status" >&5
22376  (exit "$ac_status"); } &&
22377         { ac_try='test -s "conftest$ac_exeext"'
22378  { (eval echo "$as_me:22378: \"$ac_try\"") >&5
22379  (eval $ac_try) 2>&5
22380  ac_status=$?
22381  echo "$as_me:22381: \$? = $ac_status" >&5
22382  (exit "$ac_status"); }; }; then
22383  eval "$as_ac_Lib=yes"
22384else
22385  echo "$as_me: failed program was:" >&5
22386cat "conftest.$ac_ext" >&5
22387eval "$as_ac_Lib=no"
22388fi
22389rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22390LIBS=$ac_check_lib_save_LIBS
22391fi
22392echo "$as_me:22392: result: `eval echo '${'"$as_ac_Lib"'}'`" >&5
22393echo "${ECHO_T}`eval echo '${'"$as_ac_Lib"'}'`" >&6
22394if test "`eval echo '${'"$as_ac_Lib"'}'`" = yes; then
22395
22396					: "${cf_nculib_root:=$cf_term_lib}"
22397					break
22398
22399fi
22400
22401			done
22402
22403fi
22404
22405	fi
22406
22407	# Check for library containing initscr
22408	test "$cf_term_lib" != predefined && test "$cf_term_lib" != unknown && LIBS="-l$cf_term_lib $cf_save_LIBS"
22409	if test "x$cf_curs_lib" = x
22410	then
22411		for cf_curs_lib in $cf_check_list xcurses jcurses pdcurses unknown
22412		do
22413			LIBS="-l$cf_curs_lib $cf_save_LIBS"
22414			if test "$cf_term_lib" = unknown || test "$cf_term_lib" = "$cf_curs_lib" ; then
22415				echo "$as_me:22415: checking if we can link with $cf_curs_lib library" >&5
22416echo $ECHO_N "checking if we can link with $cf_curs_lib library... $ECHO_C" >&6
22417				cat >"conftest.$ac_ext" <<_ACEOF
22418#line 22418 "configure"
22419#include "confdefs.h"
22420#include <${cf_cv_ncurses_header:-curses.h}>
22421int
22422main (void)
22423{
22424initscr()
22425  ;
22426  return 0;
22427}
22428_ACEOF
22429rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22430if { (eval echo "$as_me:22430: \"$ac_link\"") >&5
22431  (eval $ac_link) 2>&5
22432  ac_status=$?
22433  echo "$as_me:22433: \$? = $ac_status" >&5
22434  (exit "$ac_status"); } &&
22435         { ac_try='test -s "conftest$ac_exeext"'
22436  { (eval echo "$as_me:22436: \"$ac_try\"") >&5
22437  (eval $ac_try) 2>&5
22438  ac_status=$?
22439  echo "$as_me:22439: \$? = $ac_status" >&5
22440  (exit "$ac_status"); }; }; then
22441  cf_result=yes
22442else
22443  echo "$as_me: failed program was:" >&5
22444cat "conftest.$ac_ext" >&5
22445cf_result=no
22446fi
22447rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22448				echo "$as_me:22448: result: $cf_result" >&5
22449echo "${ECHO_T}$cf_result" >&6
22450				test "$cf_result" = yes && break
22451			elif test "$cf_curs_lib" = "$cf_term_lib" ; then
22452				cf_result=no
22453			elif test "$cf_term_lib" != predefined ; then
22454				echo "$as_me:22454: checking if we need both $cf_curs_lib and $cf_term_lib libraries" >&5
22455echo $ECHO_N "checking if we need both $cf_curs_lib and $cf_term_lib libraries... $ECHO_C" >&6
22456				cat >"conftest.$ac_ext" <<_ACEOF
22457#line 22457 "configure"
22458#include "confdefs.h"
22459#include <${cf_cv_ncurses_header:-curses.h}>
22460int
22461main (void)
22462{
22463initscr(); tgoto((char *)0, 0, 0);
22464  ;
22465  return 0;
22466}
22467_ACEOF
22468rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22469if { (eval echo "$as_me:22469: \"$ac_link\"") >&5
22470  (eval $ac_link) 2>&5
22471  ac_status=$?
22472  echo "$as_me:22472: \$? = $ac_status" >&5
22473  (exit "$ac_status"); } &&
22474         { ac_try='test -s "conftest$ac_exeext"'
22475  { (eval echo "$as_me:22475: \"$ac_try\"") >&5
22476  (eval $ac_try) 2>&5
22477  ac_status=$?
22478  echo "$as_me:22478: \$? = $ac_status" >&5
22479  (exit "$ac_status"); }; }; then
22480  cf_result=no
22481else
22482  echo "$as_me: failed program was:" >&5
22483cat "conftest.$ac_ext" >&5
22484
22485					LIBS="-l$cf_curs_lib -l$cf_term_lib $cf_save_LIBS"
22486					cat >"conftest.$ac_ext" <<_ACEOF
22487#line 22487 "configure"
22488#include "confdefs.h"
22489#include <${cf_cv_ncurses_header:-curses.h}>
22490int
22491main (void)
22492{
22493initscr()
22494  ;
22495  return 0;
22496}
22497_ACEOF
22498rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22499if { (eval echo "$as_me:22499: \"$ac_link\"") >&5
22500  (eval $ac_link) 2>&5
22501  ac_status=$?
22502  echo "$as_me:22502: \$? = $ac_status" >&5
22503  (exit "$ac_status"); } &&
22504         { ac_try='test -s "conftest$ac_exeext"'
22505  { (eval echo "$as_me:22505: \"$ac_try\"") >&5
22506  (eval $ac_try) 2>&5
22507  ac_status=$?
22508  echo "$as_me:22508: \$? = $ac_status" >&5
22509  (exit "$ac_status"); }; }; then
22510  cf_result=yes
22511else
22512  echo "$as_me: failed program was:" >&5
22513cat "conftest.$ac_ext" >&5
22514cf_result=error
22515fi
22516rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22517
22518fi
22519rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22520				echo "$as_me:22520: result: $cf_result" >&5
22521echo "${ECHO_T}$cf_result" >&6
22522				test "$cf_result" != error && break
22523			fi
22524		done
22525	fi
22526	test "$cf_curs_lib" = unknown && { { echo "$as_me:22526: error: no curses library found" >&5
22527echo "$as_me: error: no curses library found" >&2;}
22528   { (exit 1); exit 1; }; }
22529fi
22530fi
22531
22532echo "$as_me:22532: checking for curses performance tradeoff" >&5
22533echo $ECHO_N "checking for curses performance tradeoff... $ECHO_C" >&6
22534if test "${cf_cv_curs_performance+set}" = set; then
22535  echo $ECHO_N "(cached) $ECHO_C" >&6
22536else
22537
22538    cf_cv_curs_performance=no
22539    cat >"conftest.$ac_ext" <<_ACEOF
22540#line 22540 "configure"
22541#include "confdefs.h"
22542
22543#include <${cf_cv_ncurses_header:-curses.h}>
22544int
22545main (void)
22546{
22547
22548#if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
22549	int x = ERR;
22550#else
22551	int x = ;	/* force an error */
22552#endif
22553
22554  ;
22555  return 0;
22556}
22557_ACEOF
22558rm -f "conftest.$ac_objext"
22559if { (eval echo "$as_me:22559: \"$ac_compile\"") >&5
22560  (eval $ac_compile) 2>&5
22561  ac_status=$?
22562  echo "$as_me:22562: \$? = $ac_status" >&5
22563  (exit "$ac_status"); } &&
22564         { ac_try='test -s "conftest.$ac_objext"'
22565  { (eval echo "$as_me:22565: \"$ac_try\"") >&5
22566  (eval $ac_try) 2>&5
22567  ac_status=$?
22568  echo "$as_me:22568: \$? = $ac_status" >&5
22569  (exit "$ac_status"); }; }; then
22570
22571	cat >"conftest.$ac_ext" <<_ACEOF
22572#line 22572 "configure"
22573#include "confdefs.h"
22574
22575#define CURS_PERFORMANCE
22576#include <${cf_cv_ncurses_header:-curses.h}>
22577int
22578main (void)
22579{
22580
22581#if defined(wbkgdset) && defined(clearok) && defined(getbkgd)
22582	int x = ;	/* force an error */
22583#else
22584	int x = ERR;
22585#endif
22586
22587  ;
22588  return 0;
22589}
22590_ACEOF
22591rm -f "conftest.$ac_objext"
22592if { (eval echo "$as_me:22592: \"$ac_compile\"") >&5
22593  (eval $ac_compile) 2>&5
22594  ac_status=$?
22595  echo "$as_me:22595: \$? = $ac_status" >&5
22596  (exit "$ac_status"); } &&
22597         { ac_try='test -s "conftest.$ac_objext"'
22598  { (eval echo "$as_me:22598: \"$ac_try\"") >&5
22599  (eval $ac_try) 2>&5
22600  ac_status=$?
22601  echo "$as_me:22601: \$? = $ac_status" >&5
22602  (exit "$ac_status"); }; }; then
22603  cf_cv_curs_performance=yes
22604else
22605  echo "$as_me: failed program was:" >&5
22606cat "conftest.$ac_ext" >&5
22607fi
22608rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22609else
22610  echo "$as_me: failed program was:" >&5
22611cat "conftest.$ac_ext" >&5
22612fi
22613rm -f "conftest.$ac_objext" "conftest.$ac_ext"
22614fi
22615
22616echo "$as_me:22616: result: $cf_cv_curs_performance" >&5
22617echo "${ECHO_T}$cf_cv_curs_performance" >&6
22618test "$cf_cv_curs_performance" = yes &&
22619cat >>confdefs.h <<\EOF
22620#define CURS_PERFORMANCE 1
22621EOF
22622
22623echo "$as_me:22623: checking for curses touchline function" >&5
22624echo $ECHO_N "checking for curses touchline function... $ECHO_C" >&6
22625if test "${cf_cv_curs_touchline+set}" = set; then
22626  echo $ECHO_N "(cached) $ECHO_C" >&6
22627else
22628
22629	cat >"conftest.$ac_ext" <<_ACEOF
22630#line 22630 "configure"
22631#include "confdefs.h"
22632
22633#include <${cf_cv_ncurses_header:-curses.h}>
22634int
22635main (void)
22636{
22637touchline(stdscr, 1,2,3);
22638  ;
22639  return 0;
22640}
22641_ACEOF
22642rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22643if { (eval echo "$as_me:22643: \"$ac_link\"") >&5
22644  (eval $ac_link) 2>&5
22645  ac_status=$?
22646  echo "$as_me:22646: \$? = $ac_status" >&5
22647  (exit "$ac_status"); } &&
22648         { ac_try='test -s "conftest$ac_exeext"'
22649  { (eval echo "$as_me:22649: \"$ac_try\"") >&5
22650  (eval $ac_try) 2>&5
22651  ac_status=$?
22652  echo "$as_me:22652: \$? = $ac_status" >&5
22653  (exit "$ac_status"); }; }; then
22654  cf_cv_curs_touchline=bsd
22655else
22656  echo "$as_me: failed program was:" >&5
22657cat "conftest.$ac_ext" >&5
22658cat >"conftest.$ac_ext" <<_ACEOF
22659#line 22659 "configure"
22660#include "confdefs.h"
22661
22662#include <${cf_cv_ncurses_header:-curses.h}>
22663int
22664main (void)
22665{
22666touchline(stdscr, 1,2);
22667  ;
22668  return 0;
22669}
22670_ACEOF
22671rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22672if { (eval echo "$as_me:22672: \"$ac_link\"") >&5
22673  (eval $ac_link) 2>&5
22674  ac_status=$?
22675  echo "$as_me:22675: \$? = $ac_status" >&5
22676  (exit "$ac_status"); } &&
22677         { ac_try='test -s "conftest$ac_exeext"'
22678  { (eval echo "$as_me:22678: \"$ac_try\"") >&5
22679  (eval $ac_try) 2>&5
22680  ac_status=$?
22681  echo "$as_me:22681: \$? = $ac_status" >&5
22682  (exit "$ac_status"); }; }; then
22683  cf_cv_curs_touchline=sysv
22684else
22685  echo "$as_me: failed program was:" >&5
22686cat "conftest.$ac_ext" >&5
22687cf_cv_curs_touchline=bsd
22688fi
22689rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22690fi
22691rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
22692fi
22693echo "$as_me:22693: result: $cf_cv_curs_touchline" >&5
22694echo "${ECHO_T}$cf_cv_curs_touchline" >&6
22695case "$cf_cv_curs_touchline" in
22696(bsd)
22697
22698cat >>confdefs.h <<\EOF
22699#define HAVE_BSD_TOUCHLINE 1
22700EOF
22701
22702	;;
22703(sysv)
22704
22705cat >>confdefs.h <<\EOF
22706#define HAVE_SYSV_TOUCHLINE 1
22707EOF
22708
22709	;;
22710esac
22711
22712	;;
22713(ncursesw*)
22714
22715for ac_header in wchar.h
22716do
22717as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
22718echo "$as_me:22718: checking for $ac_header" >&5
22719echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
22720if eval "test \"\${$as_ac_Header+set}\" = set"; then
22721  echo $ECHO_N "(cached) $ECHO_C" >&6
22722else
22723  cat >"conftest.$ac_ext" <<_ACEOF
22724#line 22724 "configure"
22725#include "confdefs.h"
22726#include <$ac_header>
22727_ACEOF
22728if { (eval echo "$as_me:22728: \"$ac_cpp "conftest.$ac_ext"\"") >&5
22729  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
22730  ac_status=$?
22731  $EGREP -v '^ *\+' conftest.er1 >conftest.err
22732  rm -f conftest.er1
22733  cat conftest.err >&5
22734  echo "$as_me:22734: \$? = $ac_status" >&5
22735  (exit "$ac_status"); } >/dev/null; then
22736  if test -s conftest.err; then
22737    ac_cpp_err=$ac_c_preproc_warn_flag
22738  else
22739    ac_cpp_err=
22740  fi
22741else
22742  ac_cpp_err=yes
22743fi
22744if test -z "$ac_cpp_err"; then
22745  eval "$as_ac_Header=yes"
22746else
22747  echo "$as_me: failed program was:" >&5
22748  cat "conftest.$ac_ext" >&5
22749  eval "$as_ac_Header=no"
22750fi
22751rm -f conftest.err "conftest.$ac_ext"
22752fi
22753echo "$as_me:22753: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
22754echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
22755if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
22756  cat >>confdefs.h <<EOF
22757#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
22758EOF
22759
22760fi
22761done
22762
22763echo "$as_me:22763: checking for multibyte character support" >&5
22764echo $ECHO_N "checking for multibyte character support... $ECHO_C" >&6
22765if test "${cf_cv_utf8_lib+set}" = set; then
22766  echo $ECHO_N "(cached) $ECHO_C" >&6
22767else
22768
22769	cf_save_LIBS="$LIBS"
22770	cat >"conftest.$ac_ext" <<_ACEOF
22771#line 22771 "configure"
22772#include "confdefs.h"
22773
22774#include <stdlib.h>
22775#include <stdio.h>
22776#ifdef HAVE_WCHAR_H
22777#include <wchar.h>
22778#endif
22779
22780int
22781main (void)
22782{
22783putwc(0,0);
22784  ;
22785  return 0;
22786}
22787_ACEOF
22788rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22789if { (eval echo "$as_me:22789: \"$ac_link\"") >&5
22790  (eval $ac_link) 2>&5
22791  ac_status=$?
22792  echo "$as_me:22792: \$? = $ac_status" >&5
22793  (exit "$ac_status"); } &&
22794         { ac_try='test -s "conftest$ac_exeext"'
22795  { (eval echo "$as_me:22795: \"$ac_try\"") >&5
22796  (eval $ac_try) 2>&5
22797  ac_status=$?
22798  echo "$as_me:22798: \$? = $ac_status" >&5
22799  (exit "$ac_status"); }; }; then
22800  cf_cv_utf8_lib=yes
22801else
22802  echo "$as_me: failed program was:" >&5
22803cat "conftest.$ac_ext" >&5
22804
22805# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
22806# will be set on completion of the AC_TRY_LINK below.
22807cf_cv_header_path_utf8=
22808cf_cv_library_path_utf8=
22809
22810echo "${as_me:-configure}:22810: testing Starting FIND_LINKAGE(utf8,) ..." 1>&5
22811
22812cf_save_LIBS="$LIBS"
22813
22814cat >"conftest.$ac_ext" <<_ACEOF
22815#line 22815 "configure"
22816#include "confdefs.h"
22817
22818#include <libutf8.h>
22819int
22820main (void)
22821{
22822putwc(0,0);
22823  ;
22824  return 0;
22825}
22826_ACEOF
22827rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22828if { (eval echo "$as_me:22828: \"$ac_link\"") >&5
22829  (eval $ac_link) 2>&5
22830  ac_status=$?
22831  echo "$as_me:22831: \$? = $ac_status" >&5
22832  (exit "$ac_status"); } &&
22833         { ac_try='test -s "conftest$ac_exeext"'
22834  { (eval echo "$as_me:22834: \"$ac_try\"") >&5
22835  (eval $ac_try) 2>&5
22836  ac_status=$?
22837  echo "$as_me:22837: \$? = $ac_status" >&5
22838  (exit "$ac_status"); }; }; then
22839
22840	cf_cv_find_linkage_utf8=yes
22841	cf_cv_header_path_utf8=/usr/include
22842	cf_cv_library_path_utf8=/usr/lib
22843
22844else
22845  echo "$as_me: failed program was:" >&5
22846cat "conftest.$ac_ext" >&5
22847
22848LIBS="-lutf8  $cf_save_LIBS"
22849
22850cat >"conftest.$ac_ext" <<_ACEOF
22851#line 22851 "configure"
22852#include "confdefs.h"
22853
22854#include <libutf8.h>
22855int
22856main (void)
22857{
22858putwc(0,0);
22859  ;
22860  return 0;
22861}
22862_ACEOF
22863rm -f "conftest.$ac_objext" "conftest$ac_exeext"
22864if { (eval echo "$as_me:22864: \"$ac_link\"") >&5
22865  (eval $ac_link) 2>&5
22866  ac_status=$?
22867  echo "$as_me:22867: \$? = $ac_status" >&5
22868  (exit "$ac_status"); } &&
22869         { ac_try='test -s "conftest$ac_exeext"'
22870  { (eval echo "$as_me:22870: \"$ac_try\"") >&5
22871  (eval $ac_try) 2>&5
22872  ac_status=$?
22873  echo "$as_me:22873: \$? = $ac_status" >&5
22874  (exit "$ac_status"); }; }; then
22875
22876	cf_cv_find_linkage_utf8=yes
22877	cf_cv_header_path_utf8=/usr/include
22878	cf_cv_library_path_utf8=/usr/lib
22879	cf_cv_library_file_utf8="-lutf8"
22880
22881else
22882  echo "$as_me: failed program was:" >&5
22883cat "conftest.$ac_ext" >&5
22884
22885	cf_cv_find_linkage_utf8=no
22886	LIBS="$cf_save_LIBS"
22887
22888	test -n "$verbose" && echo "	find linkage for utf8 library" 1>&6
22889
22890echo "${as_me:-configure}:22890: testing find linkage for utf8 library ..." 1>&5
22891
22892echo "${as_me:-configure}:22892: testing Searching for headers in FIND_LINKAGE(utf8,) ..." 1>&5
22893
22894	cf_save_CPPFLAGS="$CPPFLAGS"
22895	cf_test_CPPFLAGS="$CPPFLAGS"
22896
22897cf_search=
22898
22899# collect the current set of include-directories from compiler flags
22900cf_header_path_list=""
22901if test -n "${CFLAGS}${CPPFLAGS}" ; then
22902	for cf_header_path in $CPPFLAGS $CFLAGS
22903	do
22904		case "$cf_header_path" in
22905		(-I*)
22906			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
22907
22908test "x$cf_header_path" != "xNONE" && \
22909test -d "$cf_header_path" && \
22910 {
22911	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
22912	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
22913	test -d "$cf_header_path/include/utf8" &&       cf_search="$cf_search $cf_header_path/include/utf8"
22914	test -d "$cf_header_path/include/utf8/include" &&    cf_search="$cf_search $cf_header_path/include/utf8/include"
22915	test -d "$cf_header_path/utf8/include" &&       cf_search="$cf_search $cf_header_path/utf8/include"
22916	test -d "$cf_header_path/utf8/include/utf8" &&    cf_search="$cf_search $cf_header_path/utf8/include/utf8"
22917}
22918
22919			cf_header_path_list="$cf_header_path_list $cf_search"
22920			;;
22921		esac
22922	done
22923fi
22924
22925# add the variations for the package we are looking for
22926
22927cf_search=
22928
22929test "x$prefix" != "xNONE" && \
22930test -d "$prefix" && \
22931 {
22932	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
22933	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
22934	test -d "$prefix/include/utf8" &&       cf_search="$cf_search $prefix/include/utf8"
22935	test -d "$prefix/include/utf8/include" &&    cf_search="$cf_search $prefix/include/utf8/include"
22936	test -d "$prefix/utf8/include" &&       cf_search="$cf_search $prefix/utf8/include"
22937	test -d "$prefix/utf8/include/utf8" &&    cf_search="$cf_search $prefix/utf8/include/utf8"
22938}
22939
22940for cf_subdir_prefix in \
22941	/usr \
22942	/usr/local \
22943	/usr/pkg \
22944	/opt \
22945	/opt/local \
22946	$HOME
22947do
22948
22949test "x$cf_subdir_prefix" != "x$prefix" && \
22950test -d "$cf_subdir_prefix" && \
22951{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
22952	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
22953	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
22954	test -d "$cf_subdir_prefix/include/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/include/utf8"
22955	test -d "$cf_subdir_prefix/include/utf8/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/utf8/include"
22956	test -d "$cf_subdir_prefix/utf8/include" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/include"
22957	test -d "$cf_subdir_prefix/utf8/include/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/include/utf8"
22958}
22959
22960done
22961
22962test "$includedir" != NONE && \
22963test "$includedir" != "/usr/include" && \
22964test -d "$includedir" && {
22965	test -d "$includedir" &&    cf_search="$cf_search $includedir"
22966	test -d "$includedir/utf8" && cf_search="$cf_search $includedir/utf8"
22967}
22968
22969test "$oldincludedir" != NONE && \
22970test "$oldincludedir" != "/usr/include" && \
22971test -d "$oldincludedir" && {
22972	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
22973	test -d "$oldincludedir/utf8" && cf_search="$cf_search $oldincludedir/utf8"
22974}
22975
22976cf_search="$cf_search $cf_header_path_list"
22977
22978	for cf_cv_header_path_utf8 in $cf_search
22979	do
22980		if test -d "$cf_cv_header_path_utf8" ; then
22981			test -n "$verbose" && echo "	... testing $cf_cv_header_path_utf8" 1>&6
22982
22983echo "${as_me:-configure}:22983: testing ... testing $cf_cv_header_path_utf8 ..." 1>&5
22984
22985			CPPFLAGS="$cf_save_CPPFLAGS"
22986
22987	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
22988	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_utf8"
22989
22990			cat >"conftest.$ac_ext" <<_ACEOF
22991#line 22991 "configure"
22992#include "confdefs.h"
22993
22994#include <libutf8.h>
22995int
22996main (void)
22997{
22998putwc(0,0);
22999  ;
23000  return 0;
23001}
23002_ACEOF
23003rm -f "conftest.$ac_objext"
23004if { (eval echo "$as_me:23004: \"$ac_compile\"") >&5
23005  (eval $ac_compile) 2>&5
23006  ac_status=$?
23007  echo "$as_me:23007: \$? = $ac_status" >&5
23008  (exit "$ac_status"); } &&
23009         { ac_try='test -s "conftest.$ac_objext"'
23010  { (eval echo "$as_me:23010: \"$ac_try\"") >&5
23011  (eval $ac_try) 2>&5
23012  ac_status=$?
23013  echo "$as_me:23013: \$? = $ac_status" >&5
23014  (exit "$ac_status"); }; }; then
23015
23016				test -n "$verbose" && echo "	... found utf8 headers in $cf_cv_header_path_utf8" 1>&6
23017
23018echo "${as_me:-configure}:23018: testing ... found utf8 headers in $cf_cv_header_path_utf8 ..." 1>&5
23019
23020				cf_cv_find_linkage_utf8=maybe
23021				cf_test_CPPFLAGS="$CPPFLAGS"
23022				break
23023else
23024  echo "$as_me: failed program was:" >&5
23025cat "conftest.$ac_ext" >&5
23026
23027				CPPFLAGS="$cf_save_CPPFLAGS"
23028
23029fi
23030rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23031		fi
23032	done
23033
23034	if test "$cf_cv_find_linkage_utf8" = maybe ; then
23035
23036echo "${as_me:-configure}:23036: testing Searching for utf8 library in FIND_LINKAGE(utf8,) ..." 1>&5
23037
23038		cf_save_LIBS="$LIBS"
23039		cf_save_LDFLAGS="$LDFLAGS"
23040
23041		if test "$cf_cv_find_linkage_utf8" != yes ; then
23042
23043cf_search=
23044cf_library_path_list=""
23045if test -n "${LDFLAGS}${LIBS}" ; then
23046	for cf_library_path in $LDFLAGS $LIBS
23047	do
23048		case "$cf_library_path" in
23049		(-L*)
23050			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
23051
23052test "x$cf_library_path" != "xNONE" && \
23053test -d "$cf_library_path" && \
23054 {
23055	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
23056	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
23057	test -d "$cf_library_path/lib/utf8" &&       cf_search="$cf_search $cf_library_path/lib/utf8"
23058	test -d "$cf_library_path/lib/utf8/lib" &&    cf_search="$cf_search $cf_library_path/lib/utf8/lib"
23059	test -d "$cf_library_path/utf8/lib" &&       cf_search="$cf_search $cf_library_path/utf8/lib"
23060	test -d "$cf_library_path/utf8/lib/utf8" &&    cf_search="$cf_search $cf_library_path/utf8/lib/utf8"
23061}
23062
23063			cf_library_path_list="$cf_library_path_list $cf_search"
23064			;;
23065		esac
23066	done
23067fi
23068
23069cf_search=
23070
23071test "x$prefix" != "xNONE" && \
23072test -d "$prefix" && \
23073 {
23074	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
23075	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
23076	test -d "$prefix/lib/utf8" &&       cf_search="$cf_search $prefix/lib/utf8"
23077	test -d "$prefix/lib/utf8/lib" &&    cf_search="$cf_search $prefix/lib/utf8/lib"
23078	test -d "$prefix/utf8/lib" &&       cf_search="$cf_search $prefix/utf8/lib"
23079	test -d "$prefix/utf8/lib/utf8" &&    cf_search="$cf_search $prefix/utf8/lib/utf8"
23080}
23081
23082for cf_subdir_prefix in \
23083	/usr \
23084	/usr/local \
23085	/usr/pkg \
23086	/opt \
23087	/opt/local \
23088	$HOME
23089do
23090
23091test "x$cf_subdir_prefix" != "x$prefix" && \
23092test -d "$cf_subdir_prefix" && \
23093{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
23094	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
23095	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
23096	test -d "$cf_subdir_prefix/lib/utf8" &&       cf_search="$cf_search $cf_subdir_prefix/lib/utf8"
23097	test -d "$cf_subdir_prefix/lib/utf8/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/utf8/lib"
23098	test -d "$cf_subdir_prefix/utf8/lib" &&       cf_search="$cf_search $cf_subdir_prefix/utf8/lib"
23099	test -d "$cf_subdir_prefix/utf8/lib/utf8" &&    cf_search="$cf_search $cf_subdir_prefix/utf8/lib/utf8"
23100}
23101
23102done
23103
23104cf_search="$cf_library_path_list $cf_search"
23105
23106			for cf_cv_library_path_utf8 in $cf_search
23107			do
23108				if test -d "$cf_cv_library_path_utf8" ; then
23109					test -n "$verbose" && echo "	... testing $cf_cv_library_path_utf8" 1>&6
23110
23111echo "${as_me:-configure}:23111: testing ... testing $cf_cv_library_path_utf8 ..." 1>&5
23112
23113					CPPFLAGS="$cf_test_CPPFLAGS"
23114					LIBS="-lutf8  $cf_save_LIBS"
23115					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_utf8"
23116					cat >"conftest.$ac_ext" <<_ACEOF
23117#line 23117 "configure"
23118#include "confdefs.h"
23119
23120#include <libutf8.h>
23121int
23122main (void)
23123{
23124putwc(0,0);
23125  ;
23126  return 0;
23127}
23128_ACEOF
23129rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23130if { (eval echo "$as_me:23130: \"$ac_link\"") >&5
23131  (eval $ac_link) 2>&5
23132  ac_status=$?
23133  echo "$as_me:23133: \$? = $ac_status" >&5
23134  (exit "$ac_status"); } &&
23135         { ac_try='test -s "conftest$ac_exeext"'
23136  { (eval echo "$as_me:23136: \"$ac_try\"") >&5
23137  (eval $ac_try) 2>&5
23138  ac_status=$?
23139  echo "$as_me:23139: \$? = $ac_status" >&5
23140  (exit "$ac_status"); }; }; then
23141
23142					test -n "$verbose" && echo "	... found utf8 library in $cf_cv_library_path_utf8" 1>&6
23143
23144echo "${as_me:-configure}:23144: testing ... found utf8 library in $cf_cv_library_path_utf8 ..." 1>&5
23145
23146					cf_cv_find_linkage_utf8=yes
23147					cf_cv_library_file_utf8="-lutf8"
23148					break
23149else
23150  echo "$as_me: failed program was:" >&5
23151cat "conftest.$ac_ext" >&5
23152
23153					CPPFLAGS="$cf_save_CPPFLAGS"
23154					LIBS="$cf_save_LIBS"
23155					LDFLAGS="$cf_save_LDFLAGS"
23156
23157fi
23158rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23159				fi
23160			done
23161			CPPFLAGS="$cf_save_CPPFLAGS"
23162			LDFLAGS="$cf_save_LDFLAGS"
23163		fi
23164
23165	else
23166		cf_cv_find_linkage_utf8=no
23167	fi
23168
23169fi
23170rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23171
23172fi
23173rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23174
23175LIBS="$cf_save_LIBS"
23176
23177if test "$cf_cv_find_linkage_utf8" = yes ; then
23178cf_cv_utf8_lib=add-on
23179else
23180cf_cv_utf8_lib=no
23181fi
23182
23183fi
23184rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23185fi
23186echo "$as_me:23186: result: $cf_cv_utf8_lib" >&5
23187echo "${ECHO_T}$cf_cv_utf8_lib" >&6
23188
23189# HAVE_LIBUTF8_H is used by ncurses if curses.h is shared between
23190# ncurses/ncursesw:
23191if test "$cf_cv_utf8_lib" = "add-on" ; then
23192
23193cat >>confdefs.h <<\EOF
23194#define HAVE_LIBUTF8_H 1
23195EOF
23196
23197if test -n "$cf_cv_header_path_utf8" ; then
23198  for cf_add_incdir in $cf_cv_header_path_utf8
23199  do
23200	while test "$cf_add_incdir" != /usr/include
23201	do
23202	  if test -d "$cf_add_incdir"
23203	  then
23204		cf_have_incdir=no
23205		if test -n "$CFLAGS$CPPFLAGS" ; then
23206		  # a loop is needed to ensure we can add subdirs of existing dirs
23207		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
23208			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
23209			  cf_have_incdir=yes; break
23210			fi
23211		  done
23212		fi
23213
23214		if test "$cf_have_incdir" = no ; then
23215		  if test "$cf_add_incdir" = /usr/local/include ; then
23216			if test "$GCC" = yes
23217			then
23218			  cf_save_CPPFLAGS=$CPPFLAGS
23219
23220	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23221	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
23222
23223			  cat >"conftest.$ac_ext" <<_ACEOF
23224#line 23224 "configure"
23225#include "confdefs.h"
23226#include <stdio.h>
23227int
23228main (void)
23229{
23230printf("Hello")
23231  ;
23232  return 0;
23233}
23234_ACEOF
23235rm -f "conftest.$ac_objext"
23236if { (eval echo "$as_me:23236: \"$ac_compile\"") >&5
23237  (eval $ac_compile) 2>&5
23238  ac_status=$?
23239  echo "$as_me:23239: \$? = $ac_status" >&5
23240  (exit "$ac_status"); } &&
23241         { ac_try='test -s "conftest.$ac_objext"'
23242  { (eval echo "$as_me:23242: \"$ac_try\"") >&5
23243  (eval $ac_try) 2>&5
23244  ac_status=$?
23245  echo "$as_me:23245: \$? = $ac_status" >&5
23246  (exit "$ac_status"); }; }; then
23247  :
23248else
23249  echo "$as_me: failed program was:" >&5
23250cat "conftest.$ac_ext" >&5
23251cf_have_incdir=yes
23252fi
23253rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23254			  CPPFLAGS=$cf_save_CPPFLAGS
23255			fi
23256		  fi
23257		fi
23258
23259		if test "$cf_have_incdir" = no ; then
23260		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
23261
23262echo "${as_me:-configure}:23262: testing adding $cf_add_incdir to include-path ..." 1>&5
23263
23264		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
23265
23266		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
23267		  test "$cf_top_incdir" = "$cf_add_incdir" && break
23268		  cf_add_incdir="$cf_top_incdir"
23269		else
23270		  break
23271		fi
23272	  else
23273		break
23274	  fi
23275	done
23276  done
23277fi
23278
23279if test -n "$cf_cv_library_path_utf8" ; then
23280	for cf_add_libdir in $cf_cv_library_path_utf8
23281	do
23282		if test "$cf_add_libdir" = /usr/lib ; then
23283			:
23284		elif test -d "$cf_add_libdir"
23285		then
23286			cf_have_libdir=no
23287			if test -n "$LDFLAGS$LIBS" ; then
23288				# a loop is needed to ensure we can add subdirs of existing dirs
23289				for cf_test_libdir in $LDFLAGS $LIBS ; do
23290					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
23291						cf_have_libdir=yes; break
23292					fi
23293				done
23294			fi
23295			if test "$cf_have_libdir" = no ; then
23296				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
23297
23298echo "${as_me:-configure}:23298: testing adding $cf_add_libdir to library-path ..." 1>&5
23299
23300				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
23301			fi
23302		fi
23303	done
23304fi
23305
23306cf_add_libs="$LIBS"
23307# reverse order
23308cf_add_0lib=
23309for cf_add_1lib in $cf_cv_library_file_utf8; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23310# filter duplicates
23311for cf_add_1lib in $cf_add_0lib; do
23312	for cf_add_2lib in $cf_add_libs; do
23313		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23314			cf_add_1lib=
23315			break
23316		fi
23317	done
23318	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23319done
23320LIBS="$cf_add_libs"
23321
23322fi
23323
23324cf_ncuconfig_root=$cf_cv_screen
23325cf_have_ncuconfig=no
23326
23327if test "x${PKG_CONFIG:=none}" != xnone; then
23328	echo "$as_me:23328: checking pkg-config for $cf_ncuconfig_root" >&5
23329echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
23330	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
23331		echo "$as_me:23331: result: yes" >&5
23332echo "${ECHO_T}yes" >&6
23333
23334		echo "$as_me:23334: checking if the $cf_ncuconfig_root package files work" >&5
23335echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
23336		cf_have_ncuconfig=unknown
23337
23338		cf_save_CFLAGS="$CFLAGS"
23339		cf_save_CPPFLAGS="$CPPFLAGS"
23340		cf_save_LIBS="$LIBS"
23341
23342		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
23343		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
23344
23345		# while -W for passing linker flags is prevalent, it is not "standard".
23346		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
23347		# incompatible _and_ non-standard -W option which gives an error.  Work
23348		# around that pitfall.
23349		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
23350		(x*c[89]9@@*-W*)
23351
23352cf_fix_cppflags=no
23353cf_new_cflags=
23354cf_new_cppflags=
23355cf_new_extra_cppflags=
23356
23357for cf_add_cflags in $cf_pkg_cflags
23358do
23359case "$cf_fix_cppflags" in
23360(no)
23361	case "$cf_add_cflags" in
23362	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23363		case "$cf_add_cflags" in
23364		(-D*)
23365			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23366
23367			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23368				&& test -z "${cf_tst_cflags}" \
23369				&& cf_fix_cppflags=yes
23370
23371			if test "$cf_fix_cppflags" = yes ; then
23372
23373	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23374	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23375
23376				continue
23377			elif test "${cf_tst_cflags}" = "\"'" ; then
23378
23379	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23380	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23381
23382				continue
23383			fi
23384			;;
23385		esac
23386		case "$CPPFLAGS" in
23387		(*$cf_add_cflags)
23388			;;
23389		(*)
23390			case "$cf_add_cflags" in
23391			(-D*)
23392				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23393
23394CPPFLAGS=`echo "$CPPFLAGS" | \
23395	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23396		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23397
23398				;;
23399			esac
23400
23401	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23402	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23403
23404			;;
23405		esac
23406		;;
23407	(*)
23408
23409	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23410	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23411
23412		;;
23413	esac
23414	;;
23415(yes)
23416
23417	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23418	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23419
23420	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23421
23422	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23423		&& test -z "${cf_tst_cflags}" \
23424		&& cf_fix_cppflags=no
23425	;;
23426esac
23427done
23428
23429if test -n "$cf_new_cflags" ; then
23430
23431	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23432	CFLAGS="${CFLAGS}$cf_new_cflags"
23433
23434fi
23435
23436if test -n "$cf_new_cppflags" ; then
23437
23438	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23439	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23440
23441fi
23442
23443if test -n "$cf_new_extra_cppflags" ; then
23444
23445	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23446	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23447
23448fi
23449
23450cf_add_libs="$LIBS"
23451# reverse order
23452cf_add_0lib=
23453for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23454# filter duplicates
23455for cf_add_1lib in $cf_add_0lib; do
23456	for cf_add_2lib in $cf_add_libs; do
23457		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23458			cf_add_1lib=
23459			break
23460		fi
23461	done
23462	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23463done
23464LIBS="$cf_add_libs"
23465
23466			cat >"conftest.$ac_ext" <<_ACEOF
23467#line 23467 "configure"
23468#include "confdefs.h"
23469#include <${cf_cv_ncurses_header:-curses.h}>
23470int
23471main (void)
23472{
23473initscr(); mousemask(0,0); tigetstr((char *)0);
23474  ;
23475  return 0;
23476}
23477_ACEOF
23478rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23479if { (eval echo "$as_me:23479: \"$ac_link\"") >&5
23480  (eval $ac_link) 2>&5
23481  ac_status=$?
23482  echo "$as_me:23482: \$? = $ac_status" >&5
23483  (exit "$ac_status"); } &&
23484         { ac_try='test -s "conftest$ac_exeext"'
23485  { (eval echo "$as_me:23485: \"$ac_try\"") >&5
23486  (eval $ac_try) 2>&5
23487  ac_status=$?
23488  echo "$as_me:23488: \$? = $ac_status" >&5
23489  (exit "$ac_status"); }; }; then
23490  if test "$cross_compiling" = yes; then
23491  cf_test_ncuconfig=maybe
23492else
23493  cat >"conftest.$ac_ext" <<_ACEOF
23494#line 23494 "configure"
23495#include "confdefs.h"
23496#include <${cf_cv_ncurses_header:-curses.h}>
23497					int main(void)
23498					{ const char *xx = curses_version(); return (xx == 0); }
23499_ACEOF
23500rm -f "conftest$ac_exeext"
23501if { (eval echo "$as_me:23501: \"$ac_link\"") >&5
23502  (eval $ac_link) 2>&5
23503  ac_status=$?
23504  echo "$as_me:23504: \$? = $ac_status" >&5
23505  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23506  { (eval echo "$as_me:23506: \"$ac_try\"") >&5
23507  (eval $ac_try) 2>&5
23508  ac_status=$?
23509  echo "$as_me:23509: \$? = $ac_status" >&5
23510  (exit "$ac_status"); }; }; then
23511  cf_test_ncuconfig=yes
23512else
23513  echo "$as_me: program exited with status $ac_status" >&5
23514echo "$as_me: failed program was:" >&5
23515cat "conftest.$ac_ext" >&5
23516cf_test_ncuconfig=no
23517fi
23518rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23519fi
23520else
23521  echo "$as_me: failed program was:" >&5
23522cat "conftest.$ac_ext" >&5
23523cf_test_ncuconfig=no
23524fi
23525rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23526
23527			CFLAGS="$cf_save_CFLAGS"
23528			CPPFLAGS="$cf_save_CPPFLAGS"
23529			LIBS="$cf_save_LIBS"
23530
23531			if test "x$cf_test_ncuconfig" != xyes; then
23532				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
23533				cf_pkg_cflags="$cf_temp"
23534				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
23535				cf_pkg_libs="$cf_temp"
23536			fi
23537			;;
23538		esac
23539
23540cf_fix_cppflags=no
23541cf_new_cflags=
23542cf_new_cppflags=
23543cf_new_extra_cppflags=
23544
23545for cf_add_cflags in $cf_pkg_cflags
23546do
23547case "$cf_fix_cppflags" in
23548(no)
23549	case "$cf_add_cflags" in
23550	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23551		case "$cf_add_cflags" in
23552		(-D*)
23553			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23554
23555			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23556				&& test -z "${cf_tst_cflags}" \
23557				&& cf_fix_cppflags=yes
23558
23559			if test "$cf_fix_cppflags" = yes ; then
23560
23561	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23562	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23563
23564				continue
23565			elif test "${cf_tst_cflags}" = "\"'" ; then
23566
23567	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23568	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23569
23570				continue
23571			fi
23572			;;
23573		esac
23574		case "$CPPFLAGS" in
23575		(*$cf_add_cflags)
23576			;;
23577		(*)
23578			case "$cf_add_cflags" in
23579			(-D*)
23580				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23581
23582CPPFLAGS=`echo "$CPPFLAGS" | \
23583	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23584		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23585
23586				;;
23587			esac
23588
23589	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23590	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23591
23592			;;
23593		esac
23594		;;
23595	(*)
23596
23597	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23598	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23599
23600		;;
23601	esac
23602	;;
23603(yes)
23604
23605	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23606	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23607
23608	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23609
23610	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23611		&& test -z "${cf_tst_cflags}" \
23612		&& cf_fix_cppflags=no
23613	;;
23614esac
23615done
23616
23617if test -n "$cf_new_cflags" ; then
23618
23619	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23620	CFLAGS="${CFLAGS}$cf_new_cflags"
23621
23622fi
23623
23624if test -n "$cf_new_cppflags" ; then
23625
23626	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
23627	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
23628
23629fi
23630
23631if test -n "$cf_new_extra_cppflags" ; then
23632
23633	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
23634	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
23635
23636fi
23637
23638cf_add_libs="$LIBS"
23639# reverse order
23640cf_add_0lib=
23641for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
23642# filter duplicates
23643for cf_add_1lib in $cf_add_0lib; do
23644	for cf_add_2lib in $cf_add_libs; do
23645		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
23646			cf_add_1lib=
23647			break
23648		fi
23649	done
23650	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
23651done
23652LIBS="$cf_add_libs"
23653
23654		cat >"conftest.$ac_ext" <<_ACEOF
23655#line 23655 "configure"
23656#include "confdefs.h"
23657#include <${cf_cv_ncurses_header:-curses.h}>
23658int
23659main (void)
23660{
23661initscr(); mousemask(0,0); tigetstr((char *)0);
23662  ;
23663  return 0;
23664}
23665_ACEOF
23666rm -f "conftest.$ac_objext" "conftest$ac_exeext"
23667if { (eval echo "$as_me:23667: \"$ac_link\"") >&5
23668  (eval $ac_link) 2>&5
23669  ac_status=$?
23670  echo "$as_me:23670: \$? = $ac_status" >&5
23671  (exit "$ac_status"); } &&
23672         { ac_try='test -s "conftest$ac_exeext"'
23673  { (eval echo "$as_me:23673: \"$ac_try\"") >&5
23674  (eval $ac_try) 2>&5
23675  ac_status=$?
23676  echo "$as_me:23676: \$? = $ac_status" >&5
23677  (exit "$ac_status"); }; }; then
23678  if test "$cross_compiling" = yes; then
23679  cf_have_ncuconfig=maybe
23680else
23681  cat >"conftest.$ac_ext" <<_ACEOF
23682#line 23682 "configure"
23683#include "confdefs.h"
23684#include <${cf_cv_ncurses_header:-curses.h}>
23685				int main(void)
23686				{ const char *xx = curses_version(); return (xx == 0); }
23687_ACEOF
23688rm -f "conftest$ac_exeext"
23689if { (eval echo "$as_me:23689: \"$ac_link\"") >&5
23690  (eval $ac_link) 2>&5
23691  ac_status=$?
23692  echo "$as_me:23692: \$? = $ac_status" >&5
23693  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
23694  { (eval echo "$as_me:23694: \"$ac_try\"") >&5
23695  (eval $ac_try) 2>&5
23696  ac_status=$?
23697  echo "$as_me:23697: \$? = $ac_status" >&5
23698  (exit "$ac_status"); }; }; then
23699  cf_have_ncuconfig=yes
23700else
23701  echo "$as_me: program exited with status $ac_status" >&5
23702echo "$as_me: failed program was:" >&5
23703cat "conftest.$ac_ext" >&5
23704cf_have_ncuconfig=no
23705fi
23706rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
23707fi
23708else
23709  echo "$as_me: failed program was:" >&5
23710cat "conftest.$ac_ext" >&5
23711cf_have_ncuconfig=no
23712fi
23713rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
23714		echo "$as_me:23714: result: $cf_have_ncuconfig" >&5
23715echo "${ECHO_T}$cf_have_ncuconfig" >&6
23716		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
23717		if test "$cf_have_ncuconfig" != "yes"
23718		then
23719			CPPFLAGS="$cf_save_CPPFLAGS"
23720			LIBS="$cf_save_LIBS"
23721			NCURSES_CONFIG_PKG=none
23722		else
23723
23724cat >>confdefs.h <<\EOF
23725#define NCURSES 1
23726EOF
23727
23728			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
23729
23730echo "$as_me:23730: checking for terminfo header" >&5
23731echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
23732if test "${cf_cv_term_header+set}" = set; then
23733  echo $ECHO_N "(cached) $ECHO_C" >&6
23734else
23735
23736case "${cf_cv_ncurses_header}" in
23737(*/ncurses.h|*/ncursesw.h)
23738	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
23739	;;
23740(*)
23741	cf_term_header=term.h
23742	;;
23743esac
23744
23745for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
23746do
23747cat >"conftest.$ac_ext" <<_ACEOF
23748#line 23748 "configure"
23749#include "confdefs.h"
23750#include <stdio.h>
23751#include <${cf_cv_ncurses_header:-curses.h}>
23752#include <$cf_test>
23753
23754int
23755main (void)
23756{
23757int x = auto_left_margin; (void)x
23758  ;
23759  return 0;
23760}
23761_ACEOF
23762rm -f "conftest.$ac_objext"
23763if { (eval echo "$as_me:23763: \"$ac_compile\"") >&5
23764  (eval $ac_compile) 2>&5
23765  ac_status=$?
23766  echo "$as_me:23766: \$? = $ac_status" >&5
23767  (exit "$ac_status"); } &&
23768         { ac_try='test -s "conftest.$ac_objext"'
23769  { (eval echo "$as_me:23769: \"$ac_try\"") >&5
23770  (eval $ac_try) 2>&5
23771  ac_status=$?
23772  echo "$as_me:23772: \$? = $ac_status" >&5
23773  (exit "$ac_status"); }; }; then
23774
23775	cf_cv_term_header="$cf_test"
23776else
23777  echo "$as_me: failed program was:" >&5
23778cat "conftest.$ac_ext" >&5
23779
23780	cf_cv_term_header=unknown
23781
23782fi
23783rm -f "conftest.$ac_objext" "conftest.$ac_ext"
23784	test "$cf_cv_term_header" != unknown && break
23785done
23786
23787fi
23788echo "$as_me:23788: result: $cf_cv_term_header" >&5
23789echo "${ECHO_T}$cf_cv_term_header" >&6
23790
23791# Set definitions to allow ifdef'ing to accommodate subdirectories
23792
23793case "$cf_cv_term_header" in
23794(*term.h)
23795
23796cat >>confdefs.h <<\EOF
23797#define HAVE_TERM_H 1
23798EOF
23799
23800	;;
23801esac
23802
23803case "$cf_cv_term_header" in
23804(ncurses/term.h)
23805
23806cat >>confdefs.h <<\EOF
23807#define HAVE_NCURSES_TERM_H 1
23808EOF
23809
23810	;;
23811(ncursesw/term.h)
23812
23813cat >>confdefs.h <<\EOF
23814#define HAVE_NCURSESW_TERM_H 1
23815EOF
23816
23817	;;
23818esac
23819
23820		fi
23821
23822	else
23823		echo "$as_me:23823: result: no" >&5
23824echo "${ECHO_T}no" >&6
23825		NCURSES_CONFIG_PKG=none
23826	fi
23827else
23828	NCURSES_CONFIG_PKG=none
23829fi
23830
23831if test "x$cf_have_ncuconfig" = "xno"; then
23832	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
23833
23834if test -n "$ac_tool_prefix"; then
23835  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
23836  do
23837    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
23838set dummy $ac_tool_prefix$ac_prog; ac_word=$2
23839echo "$as_me:23839: checking for $ac_word" >&5
23840echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23841if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
23842  echo $ECHO_N "(cached) $ECHO_C" >&6
23843else
23844  if test -n "$NCURSES_CONFIG"; then
23845  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
23846else
23847  ac_save_IFS=$IFS; IFS=$ac_path_separator
23848ac_dummy="$PATH"
23849for ac_dir in $ac_dummy; do
23850  IFS=$ac_save_IFS
23851  test -z "$ac_dir" && ac_dir=.
23852  $as_executable_p "$ac_dir/$ac_word" || continue
23853ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
23854echo "$as_me:23854: found $ac_dir/$ac_word" >&5
23855break
23856done
23857
23858fi
23859fi
23860NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
23861if test -n "$NCURSES_CONFIG"; then
23862  echo "$as_me:23862: result: $NCURSES_CONFIG" >&5
23863echo "${ECHO_T}$NCURSES_CONFIG" >&6
23864else
23865  echo "$as_me:23865: result: no" >&5
23866echo "${ECHO_T}no" >&6
23867fi
23868
23869    test -n "$NCURSES_CONFIG" && break
23870  done
23871fi
23872if test -z "$NCURSES_CONFIG"; then
23873  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
23874  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
23875do
23876  # Extract the first word of "$ac_prog", so it can be a program name with args.
23877set dummy $ac_prog; ac_word=$2
23878echo "$as_me:23878: checking for $ac_word" >&5
23879echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
23880if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
23881  echo $ECHO_N "(cached) $ECHO_C" >&6
23882else
23883  if test -n "$ac_ct_NCURSES_CONFIG"; then
23884  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
23885else
23886  ac_save_IFS=$IFS; IFS=$ac_path_separator
23887ac_dummy="$PATH"
23888for ac_dir in $ac_dummy; do
23889  IFS=$ac_save_IFS
23890  test -z "$ac_dir" && ac_dir=.
23891  $as_executable_p "$ac_dir/$ac_word" || continue
23892ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
23893echo "$as_me:23893: found $ac_dir/$ac_word" >&5
23894break
23895done
23896
23897fi
23898fi
23899ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
23900if test -n "$ac_ct_NCURSES_CONFIG"; then
23901  echo "$as_me:23901: result: $ac_ct_NCURSES_CONFIG" >&5
23902echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
23903else
23904  echo "$as_me:23904: result: no" >&5
23905echo "${ECHO_T}no" >&6
23906fi
23907
23908  test -n "$ac_ct_NCURSES_CONFIG" && break
23909done
23910test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
23911
23912  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
23913fi
23914
23915	if test "$NCURSES_CONFIG" != none ; then
23916
23917cf_fix_cppflags=no
23918cf_new_cflags=
23919cf_new_cppflags=
23920cf_new_extra_cppflags=
23921
23922for cf_add_cflags in `$NCURSES_CONFIG --cflags`
23923do
23924case "$cf_fix_cppflags" in
23925(no)
23926	case "$cf_add_cflags" in
23927	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
23928		case "$cf_add_cflags" in
23929		(-D*)
23930			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
23931
23932			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23933				&& test -z "${cf_tst_cflags}" \
23934				&& cf_fix_cppflags=yes
23935
23936			if test "$cf_fix_cppflags" = yes ; then
23937
23938	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23939	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23940
23941				continue
23942			elif test "${cf_tst_cflags}" = "\"'" ; then
23943
23944	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23945	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23946
23947				continue
23948			fi
23949			;;
23950		esac
23951		case "$CPPFLAGS" in
23952		(*$cf_add_cflags)
23953			;;
23954		(*)
23955			case "$cf_add_cflags" in
23956			(-D*)
23957				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
23958
23959CPPFLAGS=`echo "$CPPFLAGS" | \
23960	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
23961		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
23962
23963				;;
23964			esac
23965
23966	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
23967	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
23968
23969			;;
23970		esac
23971		;;
23972	(*)
23973
23974	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
23975	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
23976
23977		;;
23978	esac
23979	;;
23980(yes)
23981
23982	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
23983	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
23984
23985	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
23986
23987	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
23988		&& test -z "${cf_tst_cflags}" \
23989		&& cf_fix_cppflags=no
23990	;;
23991esac
23992done
23993
23994if test -n "$cf_new_cflags" ; then
23995
23996	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
23997	CFLAGS="${CFLAGS}$cf_new_cflags"
23998
23999fi
24000
24001if test -n "$cf_new_cppflags" ; then
24002
24003	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24004	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
24005
24006fi
24007
24008if test -n "$cf_new_extra_cppflags" ; then
24009
24010	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
24011	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
24012
24013fi
24014
24015cf_add_libs="$LIBS"
24016# reverse order
24017cf_add_0lib=
24018for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
24019# filter duplicates
24020for cf_add_1lib in $cf_add_0lib; do
24021	for cf_add_2lib in $cf_add_libs; do
24022		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
24023			cf_add_1lib=
24024			break
24025		fi
24026	done
24027	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
24028done
24029LIBS="$cf_add_libs"
24030
24031		# even with config script, some packages use no-override for curses.h
24032
24033echo "$as_me:24033: checking if we have identified curses headers" >&5
24034echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
24035if test "${cf_cv_ncurses_header+set}" = set; then
24036  echo $ECHO_N "(cached) $ECHO_C" >&6
24037else
24038
24039cf_cv_ncurses_header=none
24040for cf_header in \
24041	ncurses.h $cf_cv_screen/ncurses.h \
24042	curses.h $cf_cv_screen/curses.h
24043do
24044cat >"conftest.$ac_ext" <<_ACEOF
24045#line 24045 "configure"
24046#include "confdefs.h"
24047#include <${cf_header}>
24048int
24049main (void)
24050{
24051initscr(); tgoto("?", 0,0)
24052  ;
24053  return 0;
24054}
24055_ACEOF
24056rm -f "conftest.$ac_objext"
24057if { (eval echo "$as_me:24057: \"$ac_compile\"") >&5
24058  (eval $ac_compile) 2>&5
24059  ac_status=$?
24060  echo "$as_me:24060: \$? = $ac_status" >&5
24061  (exit "$ac_status"); } &&
24062         { ac_try='test -s "conftest.$ac_objext"'
24063  { (eval echo "$as_me:24063: \"$ac_try\"") >&5
24064  (eval $ac_try) 2>&5
24065  ac_status=$?
24066  echo "$as_me:24066: \$? = $ac_status" >&5
24067  (exit "$ac_status"); }; }; then
24068  cf_cv_ncurses_header=$cf_header; break
24069else
24070  echo "$as_me: failed program was:" >&5
24071cat "conftest.$ac_ext" >&5
24072fi
24073rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24074done
24075
24076fi
24077echo "$as_me:24077: result: $cf_cv_ncurses_header" >&5
24078echo "${ECHO_T}$cf_cv_ncurses_header" >&6
24079
24080if test "$cf_cv_ncurses_header" = none ; then
24081	{ { echo "$as_me:24081: error: No curses header-files found" >&5
24082echo "$as_me: error: No curses header-files found" >&2;}
24083   { (exit 1); exit 1; }; }
24084fi
24085
24086# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
24087
24088for ac_header in $cf_cv_ncurses_header
24089do
24090as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
24091echo "$as_me:24091: checking for $ac_header" >&5
24092echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
24093if eval "test \"\${$as_ac_Header+set}\" = set"; then
24094  echo $ECHO_N "(cached) $ECHO_C" >&6
24095else
24096  cat >"conftest.$ac_ext" <<_ACEOF
24097#line 24097 "configure"
24098#include "confdefs.h"
24099#include <$ac_header>
24100_ACEOF
24101if { (eval echo "$as_me:24101: \"$ac_cpp "conftest.$ac_ext"\"") >&5
24102  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
24103  ac_status=$?
24104  $EGREP -v '^ *\+' conftest.er1 >conftest.err
24105  rm -f conftest.er1
24106  cat conftest.err >&5
24107  echo "$as_me:24107: \$? = $ac_status" >&5
24108  (exit "$ac_status"); } >/dev/null; then
24109  if test -s conftest.err; then
24110    ac_cpp_err=$ac_c_preproc_warn_flag
24111  else
24112    ac_cpp_err=
24113  fi
24114else
24115  ac_cpp_err=yes
24116fi
24117if test -z "$ac_cpp_err"; then
24118  eval "$as_ac_Header=yes"
24119else
24120  echo "$as_me: failed program was:" >&5
24121  cat "conftest.$ac_ext" >&5
24122  eval "$as_ac_Header=no"
24123fi
24124rm -f conftest.err "conftest.$ac_ext"
24125fi
24126echo "$as_me:24126: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
24127echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
24128if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
24129  cat >>confdefs.h <<EOF
24130#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
24131EOF
24132
24133fi
24134done
24135
24136cat >>confdefs.h <<\EOF
24137#define NCURSES 1
24138EOF
24139
24140cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
24141
24142		cat >>confdefs.h <<EOF
24143#define $cf_nculib_ROOT 1
24144EOF
24145
24146				cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
24147
24148	else
24149
24150cf_ncuhdr_root=$cf_cv_screen
24151
24152test -n "$cf_cv_curses_dir" && \
24153test "$cf_cv_curses_dir" != "no" && { \
24154
24155if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
24156  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
24157  do
24158	while test "$cf_add_incdir" != /usr/include
24159	do
24160	  if test -d "$cf_add_incdir"
24161	  then
24162		cf_have_incdir=no
24163		if test -n "$CFLAGS$CPPFLAGS" ; then
24164		  # a loop is needed to ensure we can add subdirs of existing dirs
24165		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24166			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24167			  cf_have_incdir=yes; break
24168			fi
24169		  done
24170		fi
24171
24172		if test "$cf_have_incdir" = no ; then
24173		  if test "$cf_add_incdir" = /usr/local/include ; then
24174			if test "$GCC" = yes
24175			then
24176			  cf_save_CPPFLAGS=$CPPFLAGS
24177
24178	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24179	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24180
24181			  cat >"conftest.$ac_ext" <<_ACEOF
24182#line 24182 "configure"
24183#include "confdefs.h"
24184#include <stdio.h>
24185int
24186main (void)
24187{
24188printf("Hello")
24189  ;
24190  return 0;
24191}
24192_ACEOF
24193rm -f "conftest.$ac_objext"
24194if { (eval echo "$as_me:24194: \"$ac_compile\"") >&5
24195  (eval $ac_compile) 2>&5
24196  ac_status=$?
24197  echo "$as_me:24197: \$? = $ac_status" >&5
24198  (exit "$ac_status"); } &&
24199         { ac_try='test -s "conftest.$ac_objext"'
24200  { (eval echo "$as_me:24200: \"$ac_try\"") >&5
24201  (eval $ac_try) 2>&5
24202  ac_status=$?
24203  echo "$as_me:24203: \$? = $ac_status" >&5
24204  (exit "$ac_status"); }; }; then
24205  :
24206else
24207  echo "$as_me: failed program was:" >&5
24208cat "conftest.$ac_ext" >&5
24209cf_have_incdir=yes
24210fi
24211rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24212			  CPPFLAGS=$cf_save_CPPFLAGS
24213			fi
24214		  fi
24215		fi
24216
24217		if test "$cf_have_incdir" = no ; then
24218		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
24219
24220echo "${as_me:-configure}:24220: testing adding $cf_add_incdir to include-path ..." 1>&5
24221
24222		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24223
24224		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24225		  test "$cf_top_incdir" = "$cf_add_incdir" && break
24226		  cf_add_incdir="$cf_top_incdir"
24227		else
24228		  break
24229		fi
24230	  else
24231		break
24232	  fi
24233	done
24234  done
24235fi
24236
24237}
24238
24239echo "$as_me:24239: checking for $cf_ncuhdr_root header in include-path" >&5
24240echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
24241if test "${cf_cv_ncurses_h+set}" = set; then
24242  echo $ECHO_N "(cached) $ECHO_C" >&6
24243else
24244
24245	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
24246	{ test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
24247	for cf_header in $cf_header_list
24248	do
24249
24250	cat >"conftest.$ac_ext" <<_ACEOF
24251#line 24251 "configure"
24252#include "confdefs.h"
24253
24254#include <$cf_header>
24255int
24256main (void)
24257{
24258
24259#ifdef NCURSES_VERSION
24260
24261printf("%s\\n", NCURSES_VERSION);
24262#else
24263#ifdef __NCURSES_H
24264printf("old\\n");
24265#else
24266	make an error
24267#endif
24268#endif
24269
24270  ;
24271  return 0;
24272}
24273_ACEOF
24274rm -f "conftest.$ac_objext"
24275if { (eval echo "$as_me:24275: \"$ac_compile\"") >&5
24276  (eval $ac_compile) 2>&5
24277  ac_status=$?
24278  echo "$as_me:24278: \$? = $ac_status" >&5
24279  (exit "$ac_status"); } &&
24280         { ac_try='test -s "conftest.$ac_objext"'
24281  { (eval echo "$as_me:24281: \"$ac_try\"") >&5
24282  (eval $ac_try) 2>&5
24283  ac_status=$?
24284  echo "$as_me:24284: \$? = $ac_status" >&5
24285  (exit "$ac_status"); }; }; then
24286  cf_cv_ncurses_h=$cf_header
24287
24288else
24289  echo "$as_me: failed program was:" >&5
24290cat "conftest.$ac_ext" >&5
24291cf_cv_ncurses_h=no
24292fi
24293rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24294
24295		test "$cf_cv_ncurses_h" != no && break
24296	done
24297
24298fi
24299echo "$as_me:24299: result: $cf_cv_ncurses_h" >&5
24300echo "${ECHO_T}$cf_cv_ncurses_h" >&6
24301
24302if test "$cf_cv_ncurses_h" != no ; then
24303	cf_cv_ncurses_header=$cf_cv_ncurses_h
24304else
24305
24306echo "$as_me:24306: checking for $cf_ncuhdr_root include-path" >&5
24307echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
24308if test "${cf_cv_ncurses_h2+set}" = set; then
24309  echo $ECHO_N "(cached) $ECHO_C" >&6
24310else
24311
24312	test -n "$verbose" && echo
24313
24314cf_search=
24315
24316# collect the current set of include-directories from compiler flags
24317cf_header_path_list=""
24318if test -n "${CFLAGS}${CPPFLAGS}" ; then
24319	for cf_header_path in $CPPFLAGS $CFLAGS
24320	do
24321		case "$cf_header_path" in
24322		(-I*)
24323			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
24324
24325test "x$cf_header_path" != "xNONE" && \
24326test -d "$cf_header_path" && \
24327 {
24328	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
24329	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
24330	test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
24331	test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
24332	test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
24333	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"
24334}
24335
24336			cf_header_path_list="$cf_header_path_list $cf_search"
24337			;;
24338		esac
24339	done
24340fi
24341
24342# add the variations for the package we are looking for
24343
24344cf_search=
24345
24346test "x$prefix" != "xNONE" && \
24347test -d "$prefix" && \
24348 {
24349	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
24350	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
24351	test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
24352	test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
24353	test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
24354	test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
24355}
24356
24357for cf_subdir_prefix in \
24358	/usr \
24359	/usr/local \
24360	/usr/pkg \
24361	/opt \
24362	/opt/local \
24363	$HOME
24364do
24365
24366test "x$cf_subdir_prefix" != "x$prefix" && \
24367test -d "$cf_subdir_prefix" && \
24368{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
24369	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
24370	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
24371	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
24372	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
24373	test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
24374	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"
24375}
24376
24377done
24378
24379test "$includedir" != NONE && \
24380test "$includedir" != "/usr/include" && \
24381test -d "$includedir" && {
24382	test -d "$includedir" &&    cf_search="$cf_search $includedir"
24383	test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
24384}
24385
24386test "$oldincludedir" != NONE && \
24387test "$oldincludedir" != "/usr/include" && \
24388test -d "$oldincludedir" && {
24389	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
24390	test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
24391}
24392
24393cf_search="$cf_search $cf_header_path_list"
24394
24395	test -n "$verbose" && echo "search path $cf_search"
24396	cf_save2_CPPFLAGS="$CPPFLAGS"
24397	for cf_incdir in $cf_search
24398	do
24399
24400if test -n "$cf_incdir" ; then
24401  for cf_add_incdir in $cf_incdir
24402  do
24403	while test "$cf_add_incdir" != /usr/include
24404	do
24405	  if test -d "$cf_add_incdir"
24406	  then
24407		cf_have_incdir=no
24408		if test -n "$CFLAGS$CPPFLAGS" ; then
24409		  # a loop is needed to ensure we can add subdirs of existing dirs
24410		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24411			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24412			  cf_have_incdir=yes; break
24413			fi
24414		  done
24415		fi
24416
24417		if test "$cf_have_incdir" = no ; then
24418		  if test "$cf_add_incdir" = /usr/local/include ; then
24419			if test "$GCC" = yes
24420			then
24421			  cf_save_CPPFLAGS=$CPPFLAGS
24422
24423	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24424	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24425
24426			  cat >"conftest.$ac_ext" <<_ACEOF
24427#line 24427 "configure"
24428#include "confdefs.h"
24429#include <stdio.h>
24430int
24431main (void)
24432{
24433printf("Hello")
24434  ;
24435  return 0;
24436}
24437_ACEOF
24438rm -f "conftest.$ac_objext"
24439if { (eval echo "$as_me:24439: \"$ac_compile\"") >&5
24440  (eval $ac_compile) 2>&5
24441  ac_status=$?
24442  echo "$as_me:24442: \$? = $ac_status" >&5
24443  (exit "$ac_status"); } &&
24444         { ac_try='test -s "conftest.$ac_objext"'
24445  { (eval echo "$as_me:24445: \"$ac_try\"") >&5
24446  (eval $ac_try) 2>&5
24447  ac_status=$?
24448  echo "$as_me:24448: \$? = $ac_status" >&5
24449  (exit "$ac_status"); }; }; then
24450  :
24451else
24452  echo "$as_me: failed program was:" >&5
24453cat "conftest.$ac_ext" >&5
24454cf_have_incdir=yes
24455fi
24456rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24457			  CPPFLAGS=$cf_save_CPPFLAGS
24458			fi
24459		  fi
24460		fi
24461
24462		if test "$cf_have_incdir" = no ; then
24463		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
24464
24465echo "${as_me:-configure}:24465: testing adding $cf_add_incdir to include-path ..." 1>&5
24466
24467		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24468
24469		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24470		  test "$cf_top_incdir" = "$cf_add_incdir" && break
24471		  cf_add_incdir="$cf_top_incdir"
24472		else
24473		  break
24474		fi
24475	  else
24476		break
24477	  fi
24478	done
24479  done
24480fi
24481
24482		for cf_header in \
24483			ncurses.h \
24484			curses.h
24485		do
24486
24487	cat >"conftest.$ac_ext" <<_ACEOF
24488#line 24488 "configure"
24489#include "confdefs.h"
24490
24491#include <$cf_header>
24492int
24493main (void)
24494{
24495
24496#ifdef NCURSES_VERSION
24497
24498printf("%s\\n", NCURSES_VERSION);
24499#else
24500#ifdef __NCURSES_H
24501printf("old\\n");
24502#else
24503	make an error
24504#endif
24505#endif
24506
24507  ;
24508  return 0;
24509}
24510_ACEOF
24511rm -f "conftest.$ac_objext"
24512if { (eval echo "$as_me:24512: \"$ac_compile\"") >&5
24513  (eval $ac_compile) 2>&5
24514  ac_status=$?
24515  echo "$as_me:24515: \$? = $ac_status" >&5
24516  (exit "$ac_status"); } &&
24517         { ac_try='test -s "conftest.$ac_objext"'
24518  { (eval echo "$as_me:24518: \"$ac_try\"") >&5
24519  (eval $ac_try) 2>&5
24520  ac_status=$?
24521  echo "$as_me:24521: \$? = $ac_status" >&5
24522  (exit "$ac_status"); }; }; then
24523  cf_cv_ncurses_h2=$cf_header
24524
24525else
24526  echo "$as_me: failed program was:" >&5
24527cat "conftest.$ac_ext" >&5
24528cf_cv_ncurses_h2=no
24529fi
24530rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24531
24532			if test "$cf_cv_ncurses_h2" != no ; then
24533				cf_cv_ncurses_h2=$cf_incdir/$cf_header
24534				test -n "$verbose" && echo $ECHO_N "	... found $ECHO_C" 1>&6
24535				break
24536			fi
24537			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
24538		done
24539		CPPFLAGS="$cf_save2_CPPFLAGS"
24540		test "$cf_cv_ncurses_h2" != no && break
24541	done
24542	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:24542: error: not found" >&5
24543echo "$as_me: error: not found" >&2;}
24544   { (exit 1); exit 1; }; }
24545
24546fi
24547echo "$as_me:24547: result: $cf_cv_ncurses_h2" >&5
24548echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
24549
24550	cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
24551	cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
24552	if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
24553		cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
24554	fi
24555
24556if test -n "$cf_1st_incdir" ; then
24557  for cf_add_incdir in $cf_1st_incdir
24558  do
24559	while test "$cf_add_incdir" != /usr/include
24560	do
24561	  if test -d "$cf_add_incdir"
24562	  then
24563		cf_have_incdir=no
24564		if test -n "$CFLAGS$CPPFLAGS" ; then
24565		  # a loop is needed to ensure we can add subdirs of existing dirs
24566		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
24567			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
24568			  cf_have_incdir=yes; break
24569			fi
24570		  done
24571		fi
24572
24573		if test "$cf_have_incdir" = no ; then
24574		  if test "$cf_add_incdir" = /usr/local/include ; then
24575			if test "$GCC" = yes
24576			then
24577			  cf_save_CPPFLAGS=$CPPFLAGS
24578
24579	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
24580	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
24581
24582			  cat >"conftest.$ac_ext" <<_ACEOF
24583#line 24583 "configure"
24584#include "confdefs.h"
24585#include <stdio.h>
24586int
24587main (void)
24588{
24589printf("Hello")
24590  ;
24591  return 0;
24592}
24593_ACEOF
24594rm -f "conftest.$ac_objext"
24595if { (eval echo "$as_me:24595: \"$ac_compile\"") >&5
24596  (eval $ac_compile) 2>&5
24597  ac_status=$?
24598  echo "$as_me:24598: \$? = $ac_status" >&5
24599  (exit "$ac_status"); } &&
24600         { ac_try='test -s "conftest.$ac_objext"'
24601  { (eval echo "$as_me:24601: \"$ac_try\"") >&5
24602  (eval $ac_try) 2>&5
24603  ac_status=$?
24604  echo "$as_me:24604: \$? = $ac_status" >&5
24605  (exit "$ac_status"); }; }; then
24606  :
24607else
24608  echo "$as_me: failed program was:" >&5
24609cat "conftest.$ac_ext" >&5
24610cf_have_incdir=yes
24611fi
24612rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24613			  CPPFLAGS=$cf_save_CPPFLAGS
24614			fi
24615		  fi
24616		fi
24617
24618		if test "$cf_have_incdir" = no ; then
24619		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
24620
24621echo "${as_me:-configure}:24621: testing adding $cf_add_incdir to include-path ..." 1>&5
24622
24623		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
24624
24625		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
24626		  test "$cf_top_incdir" = "$cf_add_incdir" && break
24627		  cf_add_incdir="$cf_top_incdir"
24628		else
24629		  break
24630		fi
24631	  else
24632		break
24633	  fi
24634	done
24635  done
24636fi
24637
24638fi
24639
24640# Set definitions to allow ifdef'ing for ncurses.h
24641
24642case "$cf_cv_ncurses_header" in
24643(*ncurses.h)
24644
24645cat >>confdefs.h <<\EOF
24646#define HAVE_NCURSES_H 1
24647EOF
24648
24649	;;
24650esac
24651
24652case "$cf_cv_ncurses_header" in
24653(ncurses/curses.h|ncurses/ncurses.h)
24654
24655cat >>confdefs.h <<\EOF
24656#define HAVE_NCURSES_NCURSES_H 1
24657EOF
24658
24659	;;
24660(ncursesw/curses.h|ncursesw/ncurses.h)
24661
24662cat >>confdefs.h <<\EOF
24663#define HAVE_NCURSESW_NCURSES_H 1
24664EOF
24665
24666	;;
24667esac
24668
24669echo "$as_me:24669: checking for terminfo header" >&5
24670echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
24671if test "${cf_cv_term_header+set}" = set; then
24672  echo $ECHO_N "(cached) $ECHO_C" >&6
24673else
24674
24675case "${cf_cv_ncurses_header}" in
24676(*/ncurses.h|*/ncursesw.h)
24677	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
24678	;;
24679(*)
24680	cf_term_header=term.h
24681	;;
24682esac
24683
24684for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
24685do
24686cat >"conftest.$ac_ext" <<_ACEOF
24687#line 24687 "configure"
24688#include "confdefs.h"
24689#include <stdio.h>
24690#include <${cf_cv_ncurses_header:-curses.h}>
24691#include <$cf_test>
24692
24693int
24694main (void)
24695{
24696int x = auto_left_margin; (void)x
24697  ;
24698  return 0;
24699}
24700_ACEOF
24701rm -f "conftest.$ac_objext"
24702if { (eval echo "$as_me:24702: \"$ac_compile\"") >&5
24703  (eval $ac_compile) 2>&5
24704  ac_status=$?
24705  echo "$as_me:24705: \$? = $ac_status" >&5
24706  (exit "$ac_status"); } &&
24707         { ac_try='test -s "conftest.$ac_objext"'
24708  { (eval echo "$as_me:24708: \"$ac_try\"") >&5
24709  (eval $ac_try) 2>&5
24710  ac_status=$?
24711  echo "$as_me:24711: \$? = $ac_status" >&5
24712  (exit "$ac_status"); }; }; then
24713
24714	cf_cv_term_header="$cf_test"
24715else
24716  echo "$as_me: failed program was:" >&5
24717cat "conftest.$ac_ext" >&5
24718
24719	cf_cv_term_header=unknown
24720
24721fi
24722rm -f "conftest.$ac_objext" "conftest.$ac_ext"
24723	test "$cf_cv_term_header" != unknown && break
24724done
24725
24726fi
24727echo "$as_me:24727: result: $cf_cv_term_header" >&5
24728echo "${ECHO_T}$cf_cv_term_header" >&6
24729
24730# Set definitions to allow ifdef'ing to accommodate subdirectories
24731
24732case "$cf_cv_term_header" in
24733(*term.h)
24734
24735cat >>confdefs.h <<\EOF
24736#define HAVE_TERM_H 1
24737EOF
24738
24739	;;
24740esac
24741
24742case "$cf_cv_term_header" in
24743(ncurses/term.h)
24744
24745cat >>confdefs.h <<\EOF
24746#define HAVE_NCURSES_TERM_H 1
24747EOF
24748
24749	;;
24750(ncursesw/term.h)
24751
24752cat >>confdefs.h <<\EOF
24753#define HAVE_NCURSESW_TERM_H 1
24754EOF
24755
24756	;;
24757esac
24758
24759# some applications need this, but should check for NCURSES_VERSION
24760
24761cat >>confdefs.h <<\EOF
24762#define NCURSES 1
24763EOF
24764
24765echo "$as_me:24765: checking for ncurses version" >&5
24766echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
24767if test "${cf_cv_ncurses_version+set}" = set; then
24768  echo $ECHO_N "(cached) $ECHO_C" >&6
24769else
24770
24771	cf_cv_ncurses_version=no
24772	cf_tempfile=out$$
24773	rm -f "$cf_tempfile"
24774	if test "$cross_compiling" = yes; then
24775
24776	# This will not work if the preprocessor splits the line after the
24777	# Autoconf token.  The 'unproto' program does that.
24778	cat > "conftest.$ac_ext" <<EOF
24779#include <${cf_cv_ncurses_header:-curses.h}>
24780#undef Autoconf
24781#ifdef NCURSES_VERSION
24782Autoconf NCURSES_VERSION
24783#else
24784#ifdef __NCURSES_H
24785Autoconf "old"
24786#endif
24787;
24788#endif
24789EOF
24790	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
24791	{ (eval echo "$as_me:24791: \"$cf_try\"") >&5
24792  (eval $cf_try) 2>&5
24793  ac_status=$?
24794  echo "$as_me:24794: \$? = $ac_status" >&5
24795  (exit "$ac_status"); }
24796	if test -f conftest.out ; then
24797		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
24798		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
24799		rm -f conftest.out
24800	fi
24801
24802else
24803  cat >"conftest.$ac_ext" <<_ACEOF
24804#line 24804 "configure"
24805#include "confdefs.h"
24806
24807#include <${cf_cv_ncurses_header:-curses.h}>
24808#include <stdio.h>
24809int main(void)
24810{
24811	FILE *fp = fopen("$cf_tempfile", "w");
24812#ifdef NCURSES_VERSION
24813# ifdef NCURSES_VERSION_PATCH
24814	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
24815# else
24816	fprintf(fp, "%s\\n", NCURSES_VERSION);
24817# endif
24818#else
24819# ifdef __NCURSES_H
24820	fprintf(fp, "old\\n");
24821# else
24822	make an error
24823# endif
24824#endif
24825	${cf_cv_main_return:-return}(0);
24826}
24827_ACEOF
24828rm -f "conftest$ac_exeext"
24829if { (eval echo "$as_me:24829: \"$ac_link\"") >&5
24830  (eval $ac_link) 2>&5
24831  ac_status=$?
24832  echo "$as_me:24832: \$? = $ac_status" >&5
24833  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
24834  { (eval echo "$as_me:24834: \"$ac_try\"") >&5
24835  (eval $ac_try) 2>&5
24836  ac_status=$?
24837  echo "$as_me:24837: \$? = $ac_status" >&5
24838  (exit "$ac_status"); }; }; then
24839
24840	cf_cv_ncurses_version=`cat $cf_tempfile`
24841else
24842  echo "$as_me: program exited with status $ac_status" >&5
24843echo "$as_me: failed program was:" >&5
24844cat "conftest.$ac_ext" >&5
24845fi
24846rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
24847fi
24848	rm -f "$cf_tempfile"
24849
24850fi
24851echo "$as_me:24851: result: $cf_cv_ncurses_version" >&5
24852echo "${ECHO_T}$cf_cv_ncurses_version" >&6
24853test "$cf_cv_ncurses_version" = no ||
24854cat >>confdefs.h <<\EOF
24855#define NCURSES 1
24856EOF
24857
24858cf_nculib_root=$cf_cv_screen
24859	# This works, except for the special case where we find gpm, but
24860	# ncurses is in a nonstandard location via $LIBS, and we really want
24861	# to link gpm.
24862cf_ncurses_LIBS=""
24863cf_ncurses_SAVE="$LIBS"
24864echo "$as_me:24864: checking for Gpm_Open in -lgpm" >&5
24865echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
24866if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
24867  echo $ECHO_N "(cached) $ECHO_C" >&6
24868else
24869  ac_check_lib_save_LIBS=$LIBS
24870LIBS="-lgpm  $LIBS"
24871cat >"conftest.$ac_ext" <<_ACEOF
24872#line 24872 "configure"
24873#include "confdefs.h"
24874
24875/* Override any gcc2 internal prototype to avoid an error.  */
24876#ifdef __cplusplus
24877extern "C"
24878#endif
24879/* We use char because int might match the return type of a gcc2
24880   builtin and then its argument prototype would still apply.  */
24881char Gpm_Open ();
24882int
24883main (void)
24884{
24885Gpm_Open ();
24886  ;
24887  return 0;
24888}
24889_ACEOF
24890rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24891if { (eval echo "$as_me:24891: \"$ac_link\"") >&5
24892  (eval $ac_link) 2>&5
24893  ac_status=$?
24894  echo "$as_me:24894: \$? = $ac_status" >&5
24895  (exit "$ac_status"); } &&
24896         { ac_try='test -s "conftest$ac_exeext"'
24897  { (eval echo "$as_me:24897: \"$ac_try\"") >&5
24898  (eval $ac_try) 2>&5
24899  ac_status=$?
24900  echo "$as_me:24900: \$? = $ac_status" >&5
24901  (exit "$ac_status"); }; }; then
24902  ac_cv_lib_gpm_Gpm_Open=yes
24903else
24904  echo "$as_me: failed program was:" >&5
24905cat "conftest.$ac_ext" >&5
24906ac_cv_lib_gpm_Gpm_Open=no
24907fi
24908rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24909LIBS=$ac_check_lib_save_LIBS
24910fi
24911echo "$as_me:24911: result: $ac_cv_lib_gpm_Gpm_Open" >&5
24912echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
24913if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
24914  echo "$as_me:24914: checking for initscr in -lgpm" >&5
24915echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
24916if test "${ac_cv_lib_gpm_initscr+set}" = set; then
24917  echo $ECHO_N "(cached) $ECHO_C" >&6
24918else
24919  ac_check_lib_save_LIBS=$LIBS
24920LIBS="-lgpm  $LIBS"
24921cat >"conftest.$ac_ext" <<_ACEOF
24922#line 24922 "configure"
24923#include "confdefs.h"
24924
24925/* Override any gcc2 internal prototype to avoid an error.  */
24926#ifdef __cplusplus
24927extern "C"
24928#endif
24929/* We use char because int might match the return type of a gcc2
24930   builtin and then its argument prototype would still apply.  */
24931char initscr ();
24932int
24933main (void)
24934{
24935initscr ();
24936  ;
24937  return 0;
24938}
24939_ACEOF
24940rm -f "conftest.$ac_objext" "conftest$ac_exeext"
24941if { (eval echo "$as_me:24941: \"$ac_link\"") >&5
24942  (eval $ac_link) 2>&5
24943  ac_status=$?
24944  echo "$as_me:24944: \$? = $ac_status" >&5
24945  (exit "$ac_status"); } &&
24946         { ac_try='test -s "conftest$ac_exeext"'
24947  { (eval echo "$as_me:24947: \"$ac_try\"") >&5
24948  (eval $ac_try) 2>&5
24949  ac_status=$?
24950  echo "$as_me:24950: \$? = $ac_status" >&5
24951  (exit "$ac_status"); }; }; then
24952  ac_cv_lib_gpm_initscr=yes
24953else
24954  echo "$as_me: failed program was:" >&5
24955cat "conftest.$ac_ext" >&5
24956ac_cv_lib_gpm_initscr=no
24957fi
24958rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
24959LIBS=$ac_check_lib_save_LIBS
24960fi
24961echo "$as_me:24961: result: $ac_cv_lib_gpm_initscr" >&5
24962echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
24963if test "$ac_cv_lib_gpm_initscr" = yes; then
24964  LIBS="$cf_ncurses_SAVE"
24965else
24966  cf_ncurses_LIBS="-lgpm"
24967fi
24968
24969fi
24970
24971case "$host_os" in
24972(freebsd*)
24973	# This is only necessary if you are linking against an obsolete
24974	# version of ncurses (but it should do no harm, since it's static).
24975	if test "$cf_nculib_root" = ncurses ; then
24976		echo "$as_me:24976: checking for tgoto in -lmytinfo" >&5
24977echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
24978if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
24979  echo $ECHO_N "(cached) $ECHO_C" >&6
24980else
24981  ac_check_lib_save_LIBS=$LIBS
24982LIBS="-lmytinfo  $LIBS"
24983cat >"conftest.$ac_ext" <<_ACEOF
24984#line 24984 "configure"
24985#include "confdefs.h"
24986
24987/* Override any gcc2 internal prototype to avoid an error.  */
24988#ifdef __cplusplus
24989extern "C"
24990#endif
24991/* We use char because int might match the return type of a gcc2
24992   builtin and then its argument prototype would still apply.  */
24993char tgoto ();
24994int
24995main (void)
24996{
24997tgoto ();
24998  ;
24999  return 0;
25000}
25001_ACEOF
25002rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25003if { (eval echo "$as_me:25003: \"$ac_link\"") >&5
25004  (eval $ac_link) 2>&5
25005  ac_status=$?
25006  echo "$as_me:25006: \$? = $ac_status" >&5
25007  (exit "$ac_status"); } &&
25008         { ac_try='test -s "conftest$ac_exeext"'
25009  { (eval echo "$as_me:25009: \"$ac_try\"") >&5
25010  (eval $ac_try) 2>&5
25011  ac_status=$?
25012  echo "$as_me:25012: \$? = $ac_status" >&5
25013  (exit "$ac_status"); }; }; then
25014  ac_cv_lib_mytinfo_tgoto=yes
25015else
25016  echo "$as_me: failed program was:" >&5
25017cat "conftest.$ac_ext" >&5
25018ac_cv_lib_mytinfo_tgoto=no
25019fi
25020rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25021LIBS=$ac_check_lib_save_LIBS
25022fi
25023echo "$as_me:25023: result: $ac_cv_lib_mytinfo_tgoto" >&5
25024echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
25025if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
25026  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
25027fi
25028
25029	fi
25030	;;
25031esac
25032
25033cf_add_libs="$LIBS"
25034# reverse order
25035cf_add_0lib=
25036for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25037# filter duplicates
25038for cf_add_1lib in $cf_add_0lib; do
25039	for cf_add_2lib in $cf_add_libs; do
25040		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25041			cf_add_1lib=
25042			break
25043		fi
25044	done
25045	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25046done
25047LIBS="$cf_add_libs"
25048
25049if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
25050then
25051
25052cf_add_libs="$LIBS"
25053# reverse order
25054cf_add_0lib=
25055for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25056# filter duplicates
25057for cf_add_1lib in $cf_add_0lib; do
25058	for cf_add_2lib in $cf_add_libs; do
25059		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25060			cf_add_1lib=
25061			break
25062		fi
25063	done
25064	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25065done
25066LIBS="$cf_add_libs"
25067
25068else
25069
25070	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
25071	cf_libdir=""
25072	echo "$as_me:25072: checking for initscr" >&5
25073echo $ECHO_N "checking for initscr... $ECHO_C" >&6
25074if test "${ac_cv_func_initscr+set}" = set; then
25075  echo $ECHO_N "(cached) $ECHO_C" >&6
25076else
25077  cat >"conftest.$ac_ext" <<_ACEOF
25078#line 25078 "configure"
25079#include "confdefs.h"
25080#define initscr autoconf_temporary
25081#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
25082#undef initscr
25083
25084#ifdef __cplusplus
25085extern "C"
25086#endif
25087
25088/* We use char because int might match the return type of a gcc2
25089   builtin and then its argument prototype would still apply.  */
25090char initscr (void);
25091
25092int
25093main (void)
25094{
25095
25096/* The GNU C library defines stubs for functions which it implements
25097    to always fail with ENOSYS.  Some functions are actually named
25098    something starting with __ and the normal name is an alias.  */
25099#if defined (__stub_initscr) || defined (__stub___initscr)
25100#error found stub for initscr
25101#endif
25102
25103	return initscr ();
25104  ;
25105  return 0;
25106}
25107_ACEOF
25108rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25109if { (eval echo "$as_me:25109: \"$ac_link\"") >&5
25110  (eval $ac_link) 2>&5
25111  ac_status=$?
25112  echo "$as_me:25112: \$? = $ac_status" >&5
25113  (exit "$ac_status"); } &&
25114         { ac_try='test -s "conftest$ac_exeext"'
25115  { (eval echo "$as_me:25115: \"$ac_try\"") >&5
25116  (eval $ac_try) 2>&5
25117  ac_status=$?
25118  echo "$as_me:25118: \$? = $ac_status" >&5
25119  (exit "$ac_status"); }; }; then
25120  ac_cv_func_initscr=yes
25121else
25122  echo "$as_me: failed program was:" >&5
25123cat "conftest.$ac_ext" >&5
25124ac_cv_func_initscr=no
25125fi
25126rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25127fi
25128echo "$as_me:25128: result: $ac_cv_func_initscr" >&5
25129echo "${ECHO_T}$ac_cv_func_initscr" >&6
25130if test "$ac_cv_func_initscr" = yes; then
25131  eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
25132else
25133
25134		cf_save_LIBS="$LIBS"
25135		echo "$as_me:25135: checking for initscr in -l$cf_nculib_root" >&5
25136echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
25137		LIBS="-l$cf_nculib_root $LIBS"
25138		cat >"conftest.$ac_ext" <<_ACEOF
25139#line 25139 "configure"
25140#include "confdefs.h"
25141#include <${cf_cv_ncurses_header:-curses.h}>
25142int
25143main (void)
25144{
25145initscr()
25146  ;
25147  return 0;
25148}
25149_ACEOF
25150rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25151if { (eval echo "$as_me:25151: \"$ac_link\"") >&5
25152  (eval $ac_link) 2>&5
25153  ac_status=$?
25154  echo "$as_me:25154: \$? = $ac_status" >&5
25155  (exit "$ac_status"); } &&
25156         { ac_try='test -s "conftest$ac_exeext"'
25157  { (eval echo "$as_me:25157: \"$ac_try\"") >&5
25158  (eval $ac_try) 2>&5
25159  ac_status=$?
25160  echo "$as_me:25160: \$? = $ac_status" >&5
25161  (exit "$ac_status"); }; }; then
25162  echo "$as_me:25162: result: yes" >&5
25163echo "${ECHO_T}yes" >&6
25164			 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
25165
25166else
25167  echo "$as_me: failed program was:" >&5
25168cat "conftest.$ac_ext" >&5
25169echo "$as_me:25169: result: no" >&5
25170echo "${ECHO_T}no" >&6
25171
25172cf_search=
25173cf_library_path_list=""
25174if test -n "${LDFLAGS}${LIBS}" ; then
25175	for cf_library_path in $LDFLAGS $LIBS
25176	do
25177		case "$cf_library_path" in
25178		(-L*)
25179			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
25180
25181test "x$cf_library_path" != "xNONE" && \
25182test -d "$cf_library_path" && \
25183 {
25184	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
25185	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
25186	test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
25187	test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
25188	test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
25189	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"
25190}
25191
25192			cf_library_path_list="$cf_library_path_list $cf_search"
25193			;;
25194		esac
25195	done
25196fi
25197
25198cf_search=
25199
25200test "x$prefix" != "xNONE" && \
25201test -d "$prefix" && \
25202 {
25203	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
25204	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
25205	test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
25206	test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
25207	test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
25208	test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
25209}
25210
25211for cf_subdir_prefix in \
25212	/usr \
25213	/usr/local \
25214	/usr/pkg \
25215	/opt \
25216	/opt/local \
25217	$HOME
25218do
25219
25220test "x$cf_subdir_prefix" != "x$prefix" && \
25221test -d "$cf_subdir_prefix" && \
25222{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
25223	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
25224	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
25225	test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
25226	test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
25227	test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
25228	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"
25229}
25230
25231done
25232
25233cf_search="$cf_library_path_list $cf_search"
25234
25235			for cf_libdir in $cf_search
25236			do
25237				echo "$as_me:25237: checking for -l$cf_nculib_root in $cf_libdir" >&5
25238echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
25239				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
25240				cat >"conftest.$ac_ext" <<_ACEOF
25241#line 25241 "configure"
25242#include "confdefs.h"
25243#include <${cf_cv_ncurses_header:-curses.h}>
25244int
25245main (void)
25246{
25247initscr()
25248  ;
25249  return 0;
25250}
25251_ACEOF
25252rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25253if { (eval echo "$as_me:25253: \"$ac_link\"") >&5
25254  (eval $ac_link) 2>&5
25255  ac_status=$?
25256  echo "$as_me:25256: \$? = $ac_status" >&5
25257  (exit "$ac_status"); } &&
25258         { ac_try='test -s "conftest$ac_exeext"'
25259  { (eval echo "$as_me:25259: \"$ac_try\"") >&5
25260  (eval $ac_try) 2>&5
25261  ac_status=$?
25262  echo "$as_me:25262: \$? = $ac_status" >&5
25263  (exit "$ac_status"); }; }; then
25264  echo "$as_me:25264: result: yes" >&5
25265echo "${ECHO_T}yes" >&6
25266			 		 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
25267					 break
25268else
25269  echo "$as_me: failed program was:" >&5
25270cat "conftest.$ac_ext" >&5
25271echo "$as_me:25271: result: no" >&5
25272echo "${ECHO_T}no" >&6
25273					 LIBS="$cf_save_LIBS"
25274fi
25275rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25276			done
25277
25278fi
25279rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25280
25281fi
25282
25283eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
25284
25285if test "$cf_found_library" = no ; then
25286	{ { echo "$as_me:25286: error: Cannot link $cf_nculib_root library" >&5
25287echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
25288   { (exit 1); exit 1; }; }
25289fi
25290
25291fi
25292
25293if test -n "$cf_ncurses_LIBS" ; then
25294	echo "$as_me:25294: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
25295echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
25296	cf_ncurses_SAVE="$LIBS"
25297	for p in $cf_ncurses_LIBS ; do
25298		q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
25299		if test "$q" != "$LIBS" ; then
25300			LIBS="$q"
25301		fi
25302	done
25303	cat >"conftest.$ac_ext" <<_ACEOF
25304#line 25304 "configure"
25305#include "confdefs.h"
25306#include <${cf_cv_ncurses_header:-curses.h}>
25307int
25308main (void)
25309{
25310initscr(); mousemask(0,0); tigetstr((char *)0);
25311  ;
25312  return 0;
25313}
25314_ACEOF
25315rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25316if { (eval echo "$as_me:25316: \"$ac_link\"") >&5
25317  (eval $ac_link) 2>&5
25318  ac_status=$?
25319  echo "$as_me:25319: \$? = $ac_status" >&5
25320  (exit "$ac_status"); } &&
25321         { ac_try='test -s "conftest$ac_exeext"'
25322  { (eval echo "$as_me:25322: \"$ac_try\"") >&5
25323  (eval $ac_try) 2>&5
25324  ac_status=$?
25325  echo "$as_me:25325: \$? = $ac_status" >&5
25326  (exit "$ac_status"); }; }; then
25327  echo "$as_me:25327: result: yes" >&5
25328echo "${ECHO_T}yes" >&6
25329else
25330  echo "$as_me: failed program was:" >&5
25331cat "conftest.$ac_ext" >&5
25332echo "$as_me:25332: result: no" >&5
25333echo "${ECHO_T}no" >&6
25334		 LIBS="$cf_ncurses_SAVE"
25335fi
25336rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25337fi
25338
25339cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
25340
25341cat >>confdefs.h <<EOF
25342#define $cf_nculib_ROOT 1
25343EOF
25344
25345	fi
25346else
25347	NCURSES_CONFIG=none
25348fi
25349
25350	cf_wide_curses=yes
25351	;;
25352(ncurses*)
25353
25354cf_ncuconfig_root=$cf_cv_screen
25355cf_have_ncuconfig=no
25356
25357if test "x${PKG_CONFIG:=none}" != xnone; then
25358	echo "$as_me:25358: checking pkg-config for $cf_ncuconfig_root" >&5
25359echo $ECHO_N "checking pkg-config for $cf_ncuconfig_root... $ECHO_C" >&6
25360	if "$PKG_CONFIG" --exists $cf_ncuconfig_root ; then
25361		echo "$as_me:25361: result: yes" >&5
25362echo "${ECHO_T}yes" >&6
25363
25364		echo "$as_me:25364: checking if the $cf_ncuconfig_root package files work" >&5
25365echo $ECHO_N "checking if the $cf_ncuconfig_root package files work... $ECHO_C" >&6
25366		cf_have_ncuconfig=unknown
25367
25368		cf_save_CFLAGS="$CFLAGS"
25369		cf_save_CPPFLAGS="$CPPFLAGS"
25370		cf_save_LIBS="$LIBS"
25371
25372		cf_pkg_cflags="`$PKG_CONFIG --cflags $cf_ncuconfig_root`"
25373		cf_pkg_libs="`$PKG_CONFIG --libs $cf_ncuconfig_root`"
25374
25375		# while -W for passing linker flags is prevalent, it is not "standard".
25376		# At least one wrapper for c89/c99 (in Apple's xcode) has its own
25377		# incompatible _and_ non-standard -W option which gives an error.  Work
25378		# around that pitfall.
25379		case "x${CC}@@${cf_pkg_libs}@${cf_pkg_cflags}" in
25380		(x*c[89]9@@*-W*)
25381
25382cf_fix_cppflags=no
25383cf_new_cflags=
25384cf_new_cppflags=
25385cf_new_extra_cppflags=
25386
25387for cf_add_cflags in $cf_pkg_cflags
25388do
25389case "$cf_fix_cppflags" in
25390(no)
25391	case "$cf_add_cflags" in
25392	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25393		case "$cf_add_cflags" in
25394		(-D*)
25395			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25396
25397			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25398				&& test -z "${cf_tst_cflags}" \
25399				&& cf_fix_cppflags=yes
25400
25401			if test "$cf_fix_cppflags" = yes ; then
25402
25403	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25404	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25405
25406				continue
25407			elif test "${cf_tst_cflags}" = "\"'" ; then
25408
25409	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25410	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25411
25412				continue
25413			fi
25414			;;
25415		esac
25416		case "$CPPFLAGS" in
25417		(*$cf_add_cflags)
25418			;;
25419		(*)
25420			case "$cf_add_cflags" in
25421			(-D*)
25422				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25423
25424CPPFLAGS=`echo "$CPPFLAGS" | \
25425	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
25426		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
25427
25428				;;
25429			esac
25430
25431	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25432	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25433
25434			;;
25435		esac
25436		;;
25437	(*)
25438
25439	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25440	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25441
25442		;;
25443	esac
25444	;;
25445(yes)
25446
25447	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25448	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25449
25450	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
25451
25452	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25453		&& test -z "${cf_tst_cflags}" \
25454		&& cf_fix_cppflags=no
25455	;;
25456esac
25457done
25458
25459if test -n "$cf_new_cflags" ; then
25460
25461	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25462	CFLAGS="${CFLAGS}$cf_new_cflags"
25463
25464fi
25465
25466if test -n "$cf_new_cppflags" ; then
25467
25468	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25469	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25470
25471fi
25472
25473if test -n "$cf_new_extra_cppflags" ; then
25474
25475	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25476	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25477
25478fi
25479
25480cf_add_libs="$LIBS"
25481# reverse order
25482cf_add_0lib=
25483for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25484# filter duplicates
25485for cf_add_1lib in $cf_add_0lib; do
25486	for cf_add_2lib in $cf_add_libs; do
25487		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25488			cf_add_1lib=
25489			break
25490		fi
25491	done
25492	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25493done
25494LIBS="$cf_add_libs"
25495
25496			cat >"conftest.$ac_ext" <<_ACEOF
25497#line 25497 "configure"
25498#include "confdefs.h"
25499#include <${cf_cv_ncurses_header:-curses.h}>
25500int
25501main (void)
25502{
25503initscr(); mousemask(0,0); tigetstr((char *)0);
25504  ;
25505  return 0;
25506}
25507_ACEOF
25508rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25509if { (eval echo "$as_me:25509: \"$ac_link\"") >&5
25510  (eval $ac_link) 2>&5
25511  ac_status=$?
25512  echo "$as_me:25512: \$? = $ac_status" >&5
25513  (exit "$ac_status"); } &&
25514         { ac_try='test -s "conftest$ac_exeext"'
25515  { (eval echo "$as_me:25515: \"$ac_try\"") >&5
25516  (eval $ac_try) 2>&5
25517  ac_status=$?
25518  echo "$as_me:25518: \$? = $ac_status" >&5
25519  (exit "$ac_status"); }; }; then
25520  if test "$cross_compiling" = yes; then
25521  cf_test_ncuconfig=maybe
25522else
25523  cat >"conftest.$ac_ext" <<_ACEOF
25524#line 25524 "configure"
25525#include "confdefs.h"
25526#include <${cf_cv_ncurses_header:-curses.h}>
25527					int main(void)
25528					{ const char *xx = curses_version(); return (xx == 0); }
25529_ACEOF
25530rm -f "conftest$ac_exeext"
25531if { (eval echo "$as_me:25531: \"$ac_link\"") >&5
25532  (eval $ac_link) 2>&5
25533  ac_status=$?
25534  echo "$as_me:25534: \$? = $ac_status" >&5
25535  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25536  { (eval echo "$as_me:25536: \"$ac_try\"") >&5
25537  (eval $ac_try) 2>&5
25538  ac_status=$?
25539  echo "$as_me:25539: \$? = $ac_status" >&5
25540  (exit "$ac_status"); }; }; then
25541  cf_test_ncuconfig=yes
25542else
25543  echo "$as_me: program exited with status $ac_status" >&5
25544echo "$as_me: failed program was:" >&5
25545cat "conftest.$ac_ext" >&5
25546cf_test_ncuconfig=no
25547fi
25548rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25549fi
25550else
25551  echo "$as_me: failed program was:" >&5
25552cat "conftest.$ac_ext" >&5
25553cf_test_ncuconfig=no
25554fi
25555rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25556
25557			CFLAGS="$cf_save_CFLAGS"
25558			CPPFLAGS="$cf_save_CPPFLAGS"
25559			LIBS="$cf_save_LIBS"
25560
25561			if test "x$cf_test_ncuconfig" != xyes; then
25562				cf_temp=`echo "x$cf_pkg_cflags" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
25563				cf_pkg_cflags="$cf_temp"
25564				cf_temp=`echo "x$cf_pkg_libs" | sed -e s/^x// -e 's/-W[^ 	]*//g'`
25565				cf_pkg_libs="$cf_temp"
25566			fi
25567			;;
25568		esac
25569
25570cf_fix_cppflags=no
25571cf_new_cflags=
25572cf_new_cppflags=
25573cf_new_extra_cppflags=
25574
25575for cf_add_cflags in $cf_pkg_cflags
25576do
25577case "$cf_fix_cppflags" in
25578(no)
25579	case "$cf_add_cflags" in
25580	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25581		case "$cf_add_cflags" in
25582		(-D*)
25583			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25584
25585			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25586				&& test -z "${cf_tst_cflags}" \
25587				&& cf_fix_cppflags=yes
25588
25589			if test "$cf_fix_cppflags" = yes ; then
25590
25591	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25592	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25593
25594				continue
25595			elif test "${cf_tst_cflags}" = "\"'" ; then
25596
25597	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25598	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25599
25600				continue
25601			fi
25602			;;
25603		esac
25604		case "$CPPFLAGS" in
25605		(*$cf_add_cflags)
25606			;;
25607		(*)
25608			case "$cf_add_cflags" in
25609			(-D*)
25610				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25611
25612CPPFLAGS=`echo "$CPPFLAGS" | \
25613	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
25614		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
25615
25616				;;
25617			esac
25618
25619	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25620	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25621
25622			;;
25623		esac
25624		;;
25625	(*)
25626
25627	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
25628	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
25629
25630		;;
25631	esac
25632	;;
25633(yes)
25634
25635	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25636	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25637
25638	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
25639
25640	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25641		&& test -z "${cf_tst_cflags}" \
25642		&& cf_fix_cppflags=no
25643	;;
25644esac
25645done
25646
25647if test -n "$cf_new_cflags" ; then
25648
25649	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
25650	CFLAGS="${CFLAGS}$cf_new_cflags"
25651
25652fi
25653
25654if test -n "$cf_new_cppflags" ; then
25655
25656	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
25657	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
25658
25659fi
25660
25661if test -n "$cf_new_extra_cppflags" ; then
25662
25663	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
25664	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
25665
25666fi
25667
25668cf_add_libs="$LIBS"
25669# reverse order
25670cf_add_0lib=
25671for cf_add_1lib in $cf_pkg_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
25672# filter duplicates
25673for cf_add_1lib in $cf_add_0lib; do
25674	for cf_add_2lib in $cf_add_libs; do
25675		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
25676			cf_add_1lib=
25677			break
25678		fi
25679	done
25680	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
25681done
25682LIBS="$cf_add_libs"
25683
25684		cat >"conftest.$ac_ext" <<_ACEOF
25685#line 25685 "configure"
25686#include "confdefs.h"
25687#include <${cf_cv_ncurses_header:-curses.h}>
25688int
25689main (void)
25690{
25691initscr(); mousemask(0,0); tigetstr((char *)0);
25692  ;
25693  return 0;
25694}
25695_ACEOF
25696rm -f "conftest.$ac_objext" "conftest$ac_exeext"
25697if { (eval echo "$as_me:25697: \"$ac_link\"") >&5
25698  (eval $ac_link) 2>&5
25699  ac_status=$?
25700  echo "$as_me:25700: \$? = $ac_status" >&5
25701  (exit "$ac_status"); } &&
25702         { ac_try='test -s "conftest$ac_exeext"'
25703  { (eval echo "$as_me:25703: \"$ac_try\"") >&5
25704  (eval $ac_try) 2>&5
25705  ac_status=$?
25706  echo "$as_me:25706: \$? = $ac_status" >&5
25707  (exit "$ac_status"); }; }; then
25708  if test "$cross_compiling" = yes; then
25709  cf_have_ncuconfig=maybe
25710else
25711  cat >"conftest.$ac_ext" <<_ACEOF
25712#line 25712 "configure"
25713#include "confdefs.h"
25714#include <${cf_cv_ncurses_header:-curses.h}>
25715				int main(void)
25716				{ const char *xx = curses_version(); return (xx == 0); }
25717_ACEOF
25718rm -f "conftest$ac_exeext"
25719if { (eval echo "$as_me:25719: \"$ac_link\"") >&5
25720  (eval $ac_link) 2>&5
25721  ac_status=$?
25722  echo "$as_me:25722: \$? = $ac_status" >&5
25723  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
25724  { (eval echo "$as_me:25724: \"$ac_try\"") >&5
25725  (eval $ac_try) 2>&5
25726  ac_status=$?
25727  echo "$as_me:25727: \$? = $ac_status" >&5
25728  (exit "$ac_status"); }; }; then
25729  cf_have_ncuconfig=yes
25730else
25731  echo "$as_me: program exited with status $ac_status" >&5
25732echo "$as_me: failed program was:" >&5
25733cat "conftest.$ac_ext" >&5
25734cf_have_ncuconfig=no
25735fi
25736rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
25737fi
25738else
25739  echo "$as_me: failed program was:" >&5
25740cat "conftest.$ac_ext" >&5
25741cf_have_ncuconfig=no
25742fi
25743rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
25744		echo "$as_me:25744: result: $cf_have_ncuconfig" >&5
25745echo "${ECHO_T}$cf_have_ncuconfig" >&6
25746		test "$cf_have_ncuconfig" = maybe && cf_have_ncuconfig=yes
25747		if test "$cf_have_ncuconfig" != "yes"
25748		then
25749			CPPFLAGS="$cf_save_CPPFLAGS"
25750			LIBS="$cf_save_LIBS"
25751			NCURSES_CONFIG_PKG=none
25752		else
25753
25754cat >>confdefs.h <<\EOF
25755#define NCURSES 1
25756EOF
25757
25758			NCURSES_CONFIG_PKG=$cf_ncuconfig_root
25759
25760echo "$as_me:25760: checking for terminfo header" >&5
25761echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
25762if test "${cf_cv_term_header+set}" = set; then
25763  echo $ECHO_N "(cached) $ECHO_C" >&6
25764else
25765
25766case "${cf_cv_ncurses_header}" in
25767(*/ncurses.h|*/ncursesw.h)
25768	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
25769	;;
25770(*)
25771	cf_term_header=term.h
25772	;;
25773esac
25774
25775for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
25776do
25777cat >"conftest.$ac_ext" <<_ACEOF
25778#line 25778 "configure"
25779#include "confdefs.h"
25780#include <stdio.h>
25781#include <${cf_cv_ncurses_header:-curses.h}>
25782#include <$cf_test>
25783
25784int
25785main (void)
25786{
25787int x = auto_left_margin; (void)x
25788  ;
25789  return 0;
25790}
25791_ACEOF
25792rm -f "conftest.$ac_objext"
25793if { (eval echo "$as_me:25793: \"$ac_compile\"") >&5
25794  (eval $ac_compile) 2>&5
25795  ac_status=$?
25796  echo "$as_me:25796: \$? = $ac_status" >&5
25797  (exit "$ac_status"); } &&
25798         { ac_try='test -s "conftest.$ac_objext"'
25799  { (eval echo "$as_me:25799: \"$ac_try\"") >&5
25800  (eval $ac_try) 2>&5
25801  ac_status=$?
25802  echo "$as_me:25802: \$? = $ac_status" >&5
25803  (exit "$ac_status"); }; }; then
25804
25805	cf_cv_term_header="$cf_test"
25806else
25807  echo "$as_me: failed program was:" >&5
25808cat "conftest.$ac_ext" >&5
25809
25810	cf_cv_term_header=unknown
25811
25812fi
25813rm -f "conftest.$ac_objext" "conftest.$ac_ext"
25814	test "$cf_cv_term_header" != unknown && break
25815done
25816
25817fi
25818echo "$as_me:25818: result: $cf_cv_term_header" >&5
25819echo "${ECHO_T}$cf_cv_term_header" >&6
25820
25821# Set definitions to allow ifdef'ing to accommodate subdirectories
25822
25823case "$cf_cv_term_header" in
25824(*term.h)
25825
25826cat >>confdefs.h <<\EOF
25827#define HAVE_TERM_H 1
25828EOF
25829
25830	;;
25831esac
25832
25833case "$cf_cv_term_header" in
25834(ncurses/term.h)
25835
25836cat >>confdefs.h <<\EOF
25837#define HAVE_NCURSES_TERM_H 1
25838EOF
25839
25840	;;
25841(ncursesw/term.h)
25842
25843cat >>confdefs.h <<\EOF
25844#define HAVE_NCURSESW_TERM_H 1
25845EOF
25846
25847	;;
25848esac
25849
25850		fi
25851
25852	else
25853		echo "$as_me:25853: result: no" >&5
25854echo "${ECHO_T}no" >&6
25855		NCURSES_CONFIG_PKG=none
25856	fi
25857else
25858	NCURSES_CONFIG_PKG=none
25859fi
25860
25861if test "x$cf_have_ncuconfig" = "xno"; then
25862	cf_ncurses_config="${cf_ncuconfig_root}${NCURSES_CONFIG_SUFFIX}-config"; echo "Looking for ${cf_ncurses_config}"
25863
25864if test -n "$ac_tool_prefix"; then
25865  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
25866  do
25867    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
25868set dummy $ac_tool_prefix$ac_prog; ac_word=$2
25869echo "$as_me:25869: checking for $ac_word" >&5
25870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25871if test "${ac_cv_prog_NCURSES_CONFIG+set}" = set; then
25872  echo $ECHO_N "(cached) $ECHO_C" >&6
25873else
25874  if test -n "$NCURSES_CONFIG"; then
25875  ac_cv_prog_NCURSES_CONFIG="$NCURSES_CONFIG" # Let the user override the test.
25876else
25877  ac_save_IFS=$IFS; IFS=$ac_path_separator
25878ac_dummy="$PATH"
25879for ac_dir in $ac_dummy; do
25880  IFS=$ac_save_IFS
25881  test -z "$ac_dir" && ac_dir=.
25882  $as_executable_p "$ac_dir/$ac_word" || continue
25883ac_cv_prog_NCURSES_CONFIG="$ac_tool_prefix$ac_prog"
25884echo "$as_me:25884: found $ac_dir/$ac_word" >&5
25885break
25886done
25887
25888fi
25889fi
25890NCURSES_CONFIG=$ac_cv_prog_NCURSES_CONFIG
25891if test -n "$NCURSES_CONFIG"; then
25892  echo "$as_me:25892: result: $NCURSES_CONFIG" >&5
25893echo "${ECHO_T}$NCURSES_CONFIG" >&6
25894else
25895  echo "$as_me:25895: result: no" >&5
25896echo "${ECHO_T}no" >&6
25897fi
25898
25899    test -n "$NCURSES_CONFIG" && break
25900  done
25901fi
25902if test -z "$NCURSES_CONFIG"; then
25903  ac_ct_NCURSES_CONFIG=$NCURSES_CONFIG
25904  for ac_prog in ${cf_ncurses_config} ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}6-config ${cf_ncuconfig_root}5-config
25905do
25906  # Extract the first word of "$ac_prog", so it can be a program name with args.
25907set dummy $ac_prog; ac_word=$2
25908echo "$as_me:25908: checking for $ac_word" >&5
25909echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
25910if test "${ac_cv_prog_ac_ct_NCURSES_CONFIG+set}" = set; then
25911  echo $ECHO_N "(cached) $ECHO_C" >&6
25912else
25913  if test -n "$ac_ct_NCURSES_CONFIG"; then
25914  ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_ct_NCURSES_CONFIG" # Let the user override the test.
25915else
25916  ac_save_IFS=$IFS; IFS=$ac_path_separator
25917ac_dummy="$PATH"
25918for ac_dir in $ac_dummy; do
25919  IFS=$ac_save_IFS
25920  test -z "$ac_dir" && ac_dir=.
25921  $as_executable_p "$ac_dir/$ac_word" || continue
25922ac_cv_prog_ac_ct_NCURSES_CONFIG="$ac_prog"
25923echo "$as_me:25923: found $ac_dir/$ac_word" >&5
25924break
25925done
25926
25927fi
25928fi
25929ac_ct_NCURSES_CONFIG=$ac_cv_prog_ac_ct_NCURSES_CONFIG
25930if test -n "$ac_ct_NCURSES_CONFIG"; then
25931  echo "$as_me:25931: result: $ac_ct_NCURSES_CONFIG" >&5
25932echo "${ECHO_T}$ac_ct_NCURSES_CONFIG" >&6
25933else
25934  echo "$as_me:25934: result: no" >&5
25935echo "${ECHO_T}no" >&6
25936fi
25937
25938  test -n "$ac_ct_NCURSES_CONFIG" && break
25939done
25940test -n "$ac_ct_NCURSES_CONFIG" || ac_ct_NCURSES_CONFIG="none"
25941
25942  NCURSES_CONFIG=$ac_ct_NCURSES_CONFIG
25943fi
25944
25945	if test "$NCURSES_CONFIG" != none ; then
25946
25947cf_fix_cppflags=no
25948cf_new_cflags=
25949cf_new_cppflags=
25950cf_new_extra_cppflags=
25951
25952for cf_add_cflags in `$NCURSES_CONFIG --cflags`
25953do
25954case "$cf_fix_cppflags" in
25955(no)
25956	case "$cf_add_cflags" in
25957	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
25958		case "$cf_add_cflags" in
25959		(-D*)
25960			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
25961
25962			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
25963				&& test -z "${cf_tst_cflags}" \
25964				&& cf_fix_cppflags=yes
25965
25966			if test "$cf_fix_cppflags" = yes ; then
25967
25968	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25969	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25970
25971				continue
25972			elif test "${cf_tst_cflags}" = "\"'" ; then
25973
25974	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
25975	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
25976
25977				continue
25978			fi
25979			;;
25980		esac
25981		case "$CPPFLAGS" in
25982		(*$cf_add_cflags)
25983			;;
25984		(*)
25985			case "$cf_add_cflags" in
25986			(-D*)
25987				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
25988
25989CPPFLAGS=`echo "$CPPFLAGS" | \
25990	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
25991		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
25992
25993				;;
25994			esac
25995
25996	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
25997	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
25998
25999			;;
26000		esac
26001		;;
26002	(*)
26003
26004	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
26005	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
26006
26007		;;
26008	esac
26009	;;
26010(yes)
26011
26012	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
26013	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
26014
26015	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
26016
26017	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
26018		&& test -z "${cf_tst_cflags}" \
26019		&& cf_fix_cppflags=no
26020	;;
26021esac
26022done
26023
26024if test -n "$cf_new_cflags" ; then
26025
26026	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
26027	CFLAGS="${CFLAGS}$cf_new_cflags"
26028
26029fi
26030
26031if test -n "$cf_new_cppflags" ; then
26032
26033	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26034	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
26035
26036fi
26037
26038if test -n "$cf_new_extra_cppflags" ; then
26039
26040	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
26041	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
26042
26043fi
26044
26045cf_add_libs="$LIBS"
26046# reverse order
26047cf_add_0lib=
26048for cf_add_1lib in `$NCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
26049# filter duplicates
26050for cf_add_1lib in $cf_add_0lib; do
26051	for cf_add_2lib in $cf_add_libs; do
26052		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
26053			cf_add_1lib=
26054			break
26055		fi
26056	done
26057	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
26058done
26059LIBS="$cf_add_libs"
26060
26061		# even with config script, some packages use no-override for curses.h
26062
26063echo "$as_me:26063: checking if we have identified curses headers" >&5
26064echo $ECHO_N "checking if we have identified curses headers... $ECHO_C" >&6
26065if test "${cf_cv_ncurses_header+set}" = set; then
26066  echo $ECHO_N "(cached) $ECHO_C" >&6
26067else
26068
26069cf_cv_ncurses_header=none
26070for cf_header in \
26071	ncurses.h $cf_cv_screen/ncurses.h \
26072	curses.h $cf_cv_screen/curses.h
26073do
26074cat >"conftest.$ac_ext" <<_ACEOF
26075#line 26075 "configure"
26076#include "confdefs.h"
26077#include <${cf_header}>
26078int
26079main (void)
26080{
26081initscr(); tgoto("?", 0,0)
26082  ;
26083  return 0;
26084}
26085_ACEOF
26086rm -f "conftest.$ac_objext"
26087if { (eval echo "$as_me:26087: \"$ac_compile\"") >&5
26088  (eval $ac_compile) 2>&5
26089  ac_status=$?
26090  echo "$as_me:26090: \$? = $ac_status" >&5
26091  (exit "$ac_status"); } &&
26092         { ac_try='test -s "conftest.$ac_objext"'
26093  { (eval echo "$as_me:26093: \"$ac_try\"") >&5
26094  (eval $ac_try) 2>&5
26095  ac_status=$?
26096  echo "$as_me:26096: \$? = $ac_status" >&5
26097  (exit "$ac_status"); }; }; then
26098  cf_cv_ncurses_header=$cf_header; break
26099else
26100  echo "$as_me: failed program was:" >&5
26101cat "conftest.$ac_ext" >&5
26102fi
26103rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26104done
26105
26106fi
26107echo "$as_me:26107: result: $cf_cv_ncurses_header" >&5
26108echo "${ECHO_T}$cf_cv_ncurses_header" >&6
26109
26110if test "$cf_cv_ncurses_header" = none ; then
26111	{ { echo "$as_me:26111: error: No curses header-files found" >&5
26112echo "$as_me: error: No curses header-files found" >&2;}
26113   { (exit 1); exit 1; }; }
26114fi
26115
26116# cheat, to get the right #define's for HAVE_NCURSES_H, etc.
26117
26118for ac_header in $cf_cv_ncurses_header
26119do
26120as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
26121echo "$as_me:26121: checking for $ac_header" >&5
26122echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
26123if eval "test \"\${$as_ac_Header+set}\" = set"; then
26124  echo $ECHO_N "(cached) $ECHO_C" >&6
26125else
26126  cat >"conftest.$ac_ext" <<_ACEOF
26127#line 26127 "configure"
26128#include "confdefs.h"
26129#include <$ac_header>
26130_ACEOF
26131if { (eval echo "$as_me:26131: \"$ac_cpp "conftest.$ac_ext"\"") >&5
26132  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
26133  ac_status=$?
26134  $EGREP -v '^ *\+' conftest.er1 >conftest.err
26135  rm -f conftest.er1
26136  cat conftest.err >&5
26137  echo "$as_me:26137: \$? = $ac_status" >&5
26138  (exit "$ac_status"); } >/dev/null; then
26139  if test -s conftest.err; then
26140    ac_cpp_err=$ac_c_preproc_warn_flag
26141  else
26142    ac_cpp_err=
26143  fi
26144else
26145  ac_cpp_err=yes
26146fi
26147if test -z "$ac_cpp_err"; then
26148  eval "$as_ac_Header=yes"
26149else
26150  echo "$as_me: failed program was:" >&5
26151  cat "conftest.$ac_ext" >&5
26152  eval "$as_ac_Header=no"
26153fi
26154rm -f conftest.err "conftest.$ac_ext"
26155fi
26156echo "$as_me:26156: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
26157echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
26158if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
26159  cat >>confdefs.h <<EOF
26160#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
26161EOF
26162
26163fi
26164done
26165
26166cat >>confdefs.h <<\EOF
26167#define NCURSES 1
26168EOF
26169
26170cf_nculib_ROOT=`echo "HAVE_LIB$cf_ncuconfig_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
26171
26172		cat >>confdefs.h <<EOF
26173#define $cf_nculib_ROOT 1
26174EOF
26175
26176				cf_cv_ncurses_version="`$NCURSES_CONFIG --version`"
26177
26178	else
26179
26180cf_ncuhdr_root=$cf_cv_screen
26181
26182test -n "$cf_cv_curses_dir" && \
26183test "$cf_cv_curses_dir" != "no" && { \
26184
26185if test -n "$cf_cv_curses_dir/include/$cf_ncuhdr_root" ; then
26186  for cf_add_incdir in $cf_cv_curses_dir/include/$cf_ncuhdr_root
26187  do
26188	while test "$cf_add_incdir" != /usr/include
26189	do
26190	  if test -d "$cf_add_incdir"
26191	  then
26192		cf_have_incdir=no
26193		if test -n "$CFLAGS$CPPFLAGS" ; then
26194		  # a loop is needed to ensure we can add subdirs of existing dirs
26195		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
26196			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
26197			  cf_have_incdir=yes; break
26198			fi
26199		  done
26200		fi
26201
26202		if test "$cf_have_incdir" = no ; then
26203		  if test "$cf_add_incdir" = /usr/local/include ; then
26204			if test "$GCC" = yes
26205			then
26206			  cf_save_CPPFLAGS=$CPPFLAGS
26207
26208	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26209	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
26210
26211			  cat >"conftest.$ac_ext" <<_ACEOF
26212#line 26212 "configure"
26213#include "confdefs.h"
26214#include <stdio.h>
26215int
26216main (void)
26217{
26218printf("Hello")
26219  ;
26220  return 0;
26221}
26222_ACEOF
26223rm -f "conftest.$ac_objext"
26224if { (eval echo "$as_me:26224: \"$ac_compile\"") >&5
26225  (eval $ac_compile) 2>&5
26226  ac_status=$?
26227  echo "$as_me:26227: \$? = $ac_status" >&5
26228  (exit "$ac_status"); } &&
26229         { ac_try='test -s "conftest.$ac_objext"'
26230  { (eval echo "$as_me:26230: \"$ac_try\"") >&5
26231  (eval $ac_try) 2>&5
26232  ac_status=$?
26233  echo "$as_me:26233: \$? = $ac_status" >&5
26234  (exit "$ac_status"); }; }; then
26235  :
26236else
26237  echo "$as_me: failed program was:" >&5
26238cat "conftest.$ac_ext" >&5
26239cf_have_incdir=yes
26240fi
26241rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26242			  CPPFLAGS=$cf_save_CPPFLAGS
26243			fi
26244		  fi
26245		fi
26246
26247		if test "$cf_have_incdir" = no ; then
26248		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
26249
26250echo "${as_me:-configure}:26250: testing adding $cf_add_incdir to include-path ..." 1>&5
26251
26252		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
26253
26254		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
26255		  test "$cf_top_incdir" = "$cf_add_incdir" && break
26256		  cf_add_incdir="$cf_top_incdir"
26257		else
26258		  break
26259		fi
26260	  else
26261		break
26262	  fi
26263	done
26264  done
26265fi
26266
26267}
26268
26269echo "$as_me:26269: checking for $cf_ncuhdr_root header in include-path" >&5
26270echo $ECHO_N "checking for $cf_ncuhdr_root header in include-path... $ECHO_C" >&6
26271if test "${cf_cv_ncurses_h+set}" = set; then
26272  echo $ECHO_N "(cached) $ECHO_C" >&6
26273else
26274
26275	cf_header_list="$cf_ncuhdr_root/curses.h $cf_ncuhdr_root/ncurses.h"
26276	{ test "$cf_ncuhdr_root" = ncurses || test "$cf_ncuhdr_root" = ncursesw; } && cf_header_list="$cf_header_list curses.h ncurses.h"
26277	for cf_header in $cf_header_list
26278	do
26279
26280	cat >"conftest.$ac_ext" <<_ACEOF
26281#line 26281 "configure"
26282#include "confdefs.h"
26283
26284#include <$cf_header>
26285int
26286main (void)
26287{
26288
26289#ifdef NCURSES_VERSION
26290
26291printf("%s\\n", NCURSES_VERSION);
26292#else
26293#ifdef __NCURSES_H
26294printf("old\\n");
26295#else
26296	make an error
26297#endif
26298#endif
26299
26300  ;
26301  return 0;
26302}
26303_ACEOF
26304rm -f "conftest.$ac_objext"
26305if { (eval echo "$as_me:26305: \"$ac_compile\"") >&5
26306  (eval $ac_compile) 2>&5
26307  ac_status=$?
26308  echo "$as_me:26308: \$? = $ac_status" >&5
26309  (exit "$ac_status"); } &&
26310         { ac_try='test -s "conftest.$ac_objext"'
26311  { (eval echo "$as_me:26311: \"$ac_try\"") >&5
26312  (eval $ac_try) 2>&5
26313  ac_status=$?
26314  echo "$as_me:26314: \$? = $ac_status" >&5
26315  (exit "$ac_status"); }; }; then
26316  cf_cv_ncurses_h=$cf_header
26317
26318else
26319  echo "$as_me: failed program was:" >&5
26320cat "conftest.$ac_ext" >&5
26321cf_cv_ncurses_h=no
26322fi
26323rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26324
26325		test "$cf_cv_ncurses_h" != no && break
26326	done
26327
26328fi
26329echo "$as_me:26329: result: $cf_cv_ncurses_h" >&5
26330echo "${ECHO_T}$cf_cv_ncurses_h" >&6
26331
26332if test "$cf_cv_ncurses_h" != no ; then
26333	cf_cv_ncurses_header=$cf_cv_ncurses_h
26334else
26335
26336echo "$as_me:26336: checking for $cf_ncuhdr_root include-path" >&5
26337echo $ECHO_N "checking for $cf_ncuhdr_root include-path... $ECHO_C" >&6
26338if test "${cf_cv_ncurses_h2+set}" = set; then
26339  echo $ECHO_N "(cached) $ECHO_C" >&6
26340else
26341
26342	test -n "$verbose" && echo
26343
26344cf_search=
26345
26346# collect the current set of include-directories from compiler flags
26347cf_header_path_list=""
26348if test -n "${CFLAGS}${CPPFLAGS}" ; then
26349	for cf_header_path in $CPPFLAGS $CFLAGS
26350	do
26351		case "$cf_header_path" in
26352		(-I*)
26353			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
26354
26355test "x$cf_header_path" != "xNONE" && \
26356test -d "$cf_header_path" && \
26357 {
26358	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
26359	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
26360	test -d "$cf_header_path/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root"
26361	test -d "$cf_header_path/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_header_path/include/$cf_ncuhdr_root/include"
26362	test -d "$cf_header_path/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_header_path/$cf_ncuhdr_root/include"
26363	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"
26364}
26365
26366			cf_header_path_list="$cf_header_path_list $cf_search"
26367			;;
26368		esac
26369	done
26370fi
26371
26372# add the variations for the package we are looking for
26373
26374cf_search=
26375
26376test "x$prefix" != "xNONE" && \
26377test -d "$prefix" && \
26378 {
26379	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
26380	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
26381	test -d "$prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $prefix/include/$cf_ncuhdr_root"
26382	test -d "$prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $prefix/include/$cf_ncuhdr_root/include"
26383	test -d "$prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $prefix/$cf_ncuhdr_root/include"
26384	test -d "$prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root" &&    cf_search="$cf_search $prefix/$cf_ncuhdr_root/include/$cf_ncuhdr_root"
26385}
26386
26387for cf_subdir_prefix in \
26388	/usr \
26389	/usr/local \
26390	/usr/pkg \
26391	/opt \
26392	/opt/local \
26393	$HOME
26394do
26395
26396test "x$cf_subdir_prefix" != "x$prefix" && \
26397test -d "$cf_subdir_prefix" && \
26398{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
26399	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
26400	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
26401	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root" &&       cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root"
26402	test -d "$cf_subdir_prefix/include/$cf_ncuhdr_root/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/$cf_ncuhdr_root/include"
26403	test -d "$cf_subdir_prefix/$cf_ncuhdr_root/include" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_ncuhdr_root/include"
26404	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"
26405}
26406
26407done
26408
26409test "$includedir" != NONE && \
26410test "$includedir" != "/usr/include" && \
26411test -d "$includedir" && {
26412	test -d "$includedir" &&    cf_search="$cf_search $includedir"
26413	test -d "$includedir/$cf_ncuhdr_root" && cf_search="$cf_search $includedir/$cf_ncuhdr_root"
26414}
26415
26416test "$oldincludedir" != NONE && \
26417test "$oldincludedir" != "/usr/include" && \
26418test -d "$oldincludedir" && {
26419	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
26420	test -d "$oldincludedir/$cf_ncuhdr_root" && cf_search="$cf_search $oldincludedir/$cf_ncuhdr_root"
26421}
26422
26423cf_search="$cf_search $cf_header_path_list"
26424
26425	test -n "$verbose" && echo "search path $cf_search"
26426	cf_save2_CPPFLAGS="$CPPFLAGS"
26427	for cf_incdir in $cf_search
26428	do
26429
26430if test -n "$cf_incdir" ; then
26431  for cf_add_incdir in $cf_incdir
26432  do
26433	while test "$cf_add_incdir" != /usr/include
26434	do
26435	  if test -d "$cf_add_incdir"
26436	  then
26437		cf_have_incdir=no
26438		if test -n "$CFLAGS$CPPFLAGS" ; then
26439		  # a loop is needed to ensure we can add subdirs of existing dirs
26440		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
26441			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
26442			  cf_have_incdir=yes; break
26443			fi
26444		  done
26445		fi
26446
26447		if test "$cf_have_incdir" = no ; then
26448		  if test "$cf_add_incdir" = /usr/local/include ; then
26449			if test "$GCC" = yes
26450			then
26451			  cf_save_CPPFLAGS=$CPPFLAGS
26452
26453	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26454	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
26455
26456			  cat >"conftest.$ac_ext" <<_ACEOF
26457#line 26457 "configure"
26458#include "confdefs.h"
26459#include <stdio.h>
26460int
26461main (void)
26462{
26463printf("Hello")
26464  ;
26465  return 0;
26466}
26467_ACEOF
26468rm -f "conftest.$ac_objext"
26469if { (eval echo "$as_me:26469: \"$ac_compile\"") >&5
26470  (eval $ac_compile) 2>&5
26471  ac_status=$?
26472  echo "$as_me:26472: \$? = $ac_status" >&5
26473  (exit "$ac_status"); } &&
26474         { ac_try='test -s "conftest.$ac_objext"'
26475  { (eval echo "$as_me:26475: \"$ac_try\"") >&5
26476  (eval $ac_try) 2>&5
26477  ac_status=$?
26478  echo "$as_me:26478: \$? = $ac_status" >&5
26479  (exit "$ac_status"); }; }; then
26480  :
26481else
26482  echo "$as_me: failed program was:" >&5
26483cat "conftest.$ac_ext" >&5
26484cf_have_incdir=yes
26485fi
26486rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26487			  CPPFLAGS=$cf_save_CPPFLAGS
26488			fi
26489		  fi
26490		fi
26491
26492		if test "$cf_have_incdir" = no ; then
26493		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
26494
26495echo "${as_me:-configure}:26495: testing adding $cf_add_incdir to include-path ..." 1>&5
26496
26497		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
26498
26499		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
26500		  test "$cf_top_incdir" = "$cf_add_incdir" && break
26501		  cf_add_incdir="$cf_top_incdir"
26502		else
26503		  break
26504		fi
26505	  else
26506		break
26507	  fi
26508	done
26509  done
26510fi
26511
26512		for cf_header in \
26513			ncurses.h \
26514			curses.h
26515		do
26516
26517	cat >"conftest.$ac_ext" <<_ACEOF
26518#line 26518 "configure"
26519#include "confdefs.h"
26520
26521#include <$cf_header>
26522int
26523main (void)
26524{
26525
26526#ifdef NCURSES_VERSION
26527
26528printf("%s\\n", NCURSES_VERSION);
26529#else
26530#ifdef __NCURSES_H
26531printf("old\\n");
26532#else
26533	make an error
26534#endif
26535#endif
26536
26537  ;
26538  return 0;
26539}
26540_ACEOF
26541rm -f "conftest.$ac_objext"
26542if { (eval echo "$as_me:26542: \"$ac_compile\"") >&5
26543  (eval $ac_compile) 2>&5
26544  ac_status=$?
26545  echo "$as_me:26545: \$? = $ac_status" >&5
26546  (exit "$ac_status"); } &&
26547         { ac_try='test -s "conftest.$ac_objext"'
26548  { (eval echo "$as_me:26548: \"$ac_try\"") >&5
26549  (eval $ac_try) 2>&5
26550  ac_status=$?
26551  echo "$as_me:26551: \$? = $ac_status" >&5
26552  (exit "$ac_status"); }; }; then
26553  cf_cv_ncurses_h2=$cf_header
26554
26555else
26556  echo "$as_me: failed program was:" >&5
26557cat "conftest.$ac_ext" >&5
26558cf_cv_ncurses_h2=no
26559fi
26560rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26561
26562			if test "$cf_cv_ncurses_h2" != no ; then
26563				cf_cv_ncurses_h2=$cf_incdir/$cf_header
26564				test -n "$verbose" && echo $ECHO_N "	... found $ECHO_C" 1>&6
26565				break
26566			fi
26567			test -n "$verbose" && echo "	... tested $cf_incdir/$cf_header" 1>&6
26568		done
26569		CPPFLAGS="$cf_save2_CPPFLAGS"
26570		test "$cf_cv_ncurses_h2" != no && break
26571	done
26572	test "$cf_cv_ncurses_h2" = no && { { echo "$as_me:26572: error: not found" >&5
26573echo "$as_me: error: not found" >&2;}
26574   { (exit 1); exit 1; }; }
26575
26576fi
26577echo "$as_me:26577: result: $cf_cv_ncurses_h2" >&5
26578echo "${ECHO_T}$cf_cv_ncurses_h2" >&6
26579
26580	cf_1st_incdir=`echo "$cf_cv_ncurses_h2" | sed -e 's%/[^/]*$%%'`
26581	cf_cv_ncurses_header="`basename "$cf_cv_ncurses_h2"`"
26582	if test "`basename "$cf_1st_incdir"`" = "$cf_ncuhdr_root" ; then
26583		cf_cv_ncurses_header="$cf_ncuhdr_root/$cf_cv_ncurses_header"
26584	fi
26585
26586if test -n "$cf_1st_incdir" ; then
26587  for cf_add_incdir in $cf_1st_incdir
26588  do
26589	while test "$cf_add_incdir" != /usr/include
26590	do
26591	  if test -d "$cf_add_incdir"
26592	  then
26593		cf_have_incdir=no
26594		if test -n "$CFLAGS$CPPFLAGS" ; then
26595		  # a loop is needed to ensure we can add subdirs of existing dirs
26596		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
26597			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
26598			  cf_have_incdir=yes; break
26599			fi
26600		  done
26601		fi
26602
26603		if test "$cf_have_incdir" = no ; then
26604		  if test "$cf_add_incdir" = /usr/local/include ; then
26605			if test "$GCC" = yes
26606			then
26607			  cf_save_CPPFLAGS=$CPPFLAGS
26608
26609	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
26610	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
26611
26612			  cat >"conftest.$ac_ext" <<_ACEOF
26613#line 26613 "configure"
26614#include "confdefs.h"
26615#include <stdio.h>
26616int
26617main (void)
26618{
26619printf("Hello")
26620  ;
26621  return 0;
26622}
26623_ACEOF
26624rm -f "conftest.$ac_objext"
26625if { (eval echo "$as_me:26625: \"$ac_compile\"") >&5
26626  (eval $ac_compile) 2>&5
26627  ac_status=$?
26628  echo "$as_me:26628: \$? = $ac_status" >&5
26629  (exit "$ac_status"); } &&
26630         { ac_try='test -s "conftest.$ac_objext"'
26631  { (eval echo "$as_me:26631: \"$ac_try\"") >&5
26632  (eval $ac_try) 2>&5
26633  ac_status=$?
26634  echo "$as_me:26634: \$? = $ac_status" >&5
26635  (exit "$ac_status"); }; }; then
26636  :
26637else
26638  echo "$as_me: failed program was:" >&5
26639cat "conftest.$ac_ext" >&5
26640cf_have_incdir=yes
26641fi
26642rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26643			  CPPFLAGS=$cf_save_CPPFLAGS
26644			fi
26645		  fi
26646		fi
26647
26648		if test "$cf_have_incdir" = no ; then
26649		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
26650
26651echo "${as_me:-configure}:26651: testing adding $cf_add_incdir to include-path ..." 1>&5
26652
26653		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
26654
26655		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
26656		  test "$cf_top_incdir" = "$cf_add_incdir" && break
26657		  cf_add_incdir="$cf_top_incdir"
26658		else
26659		  break
26660		fi
26661	  else
26662		break
26663	  fi
26664	done
26665  done
26666fi
26667
26668fi
26669
26670# Set definitions to allow ifdef'ing for ncurses.h
26671
26672case "$cf_cv_ncurses_header" in
26673(*ncurses.h)
26674
26675cat >>confdefs.h <<\EOF
26676#define HAVE_NCURSES_H 1
26677EOF
26678
26679	;;
26680esac
26681
26682case "$cf_cv_ncurses_header" in
26683(ncurses/curses.h|ncurses/ncurses.h)
26684
26685cat >>confdefs.h <<\EOF
26686#define HAVE_NCURSES_NCURSES_H 1
26687EOF
26688
26689	;;
26690(ncursesw/curses.h|ncursesw/ncurses.h)
26691
26692cat >>confdefs.h <<\EOF
26693#define HAVE_NCURSESW_NCURSES_H 1
26694EOF
26695
26696	;;
26697esac
26698
26699echo "$as_me:26699: checking for terminfo header" >&5
26700echo $ECHO_N "checking for terminfo header... $ECHO_C" >&6
26701if test "${cf_cv_term_header+set}" = set; then
26702  echo $ECHO_N "(cached) $ECHO_C" >&6
26703else
26704
26705case "${cf_cv_ncurses_header}" in
26706(*/ncurses.h|*/ncursesw.h)
26707	cf_term_header=`echo "$cf_cv_ncurses_header" | sed -e 's%ncurses[^.]*\.h$%term.h%'`
26708	;;
26709(*)
26710	cf_term_header=term.h
26711	;;
26712esac
26713
26714for cf_test in $cf_term_header "ncurses/term.h" "ncursesw/term.h"
26715do
26716cat >"conftest.$ac_ext" <<_ACEOF
26717#line 26717 "configure"
26718#include "confdefs.h"
26719#include <stdio.h>
26720#include <${cf_cv_ncurses_header:-curses.h}>
26721#include <$cf_test>
26722
26723int
26724main (void)
26725{
26726int x = auto_left_margin; (void)x
26727  ;
26728  return 0;
26729}
26730_ACEOF
26731rm -f "conftest.$ac_objext"
26732if { (eval echo "$as_me:26732: \"$ac_compile\"") >&5
26733  (eval $ac_compile) 2>&5
26734  ac_status=$?
26735  echo "$as_me:26735: \$? = $ac_status" >&5
26736  (exit "$ac_status"); } &&
26737         { ac_try='test -s "conftest.$ac_objext"'
26738  { (eval echo "$as_me:26738: \"$ac_try\"") >&5
26739  (eval $ac_try) 2>&5
26740  ac_status=$?
26741  echo "$as_me:26741: \$? = $ac_status" >&5
26742  (exit "$ac_status"); }; }; then
26743
26744	cf_cv_term_header="$cf_test"
26745else
26746  echo "$as_me: failed program was:" >&5
26747cat "conftest.$ac_ext" >&5
26748
26749	cf_cv_term_header=unknown
26750
26751fi
26752rm -f "conftest.$ac_objext" "conftest.$ac_ext"
26753	test "$cf_cv_term_header" != unknown && break
26754done
26755
26756fi
26757echo "$as_me:26757: result: $cf_cv_term_header" >&5
26758echo "${ECHO_T}$cf_cv_term_header" >&6
26759
26760# Set definitions to allow ifdef'ing to accommodate subdirectories
26761
26762case "$cf_cv_term_header" in
26763(*term.h)
26764
26765cat >>confdefs.h <<\EOF
26766#define HAVE_TERM_H 1
26767EOF
26768
26769	;;
26770esac
26771
26772case "$cf_cv_term_header" in
26773(ncurses/term.h)
26774
26775cat >>confdefs.h <<\EOF
26776#define HAVE_NCURSES_TERM_H 1
26777EOF
26778
26779	;;
26780(ncursesw/term.h)
26781
26782cat >>confdefs.h <<\EOF
26783#define HAVE_NCURSESW_TERM_H 1
26784EOF
26785
26786	;;
26787esac
26788
26789# some applications need this, but should check for NCURSES_VERSION
26790
26791cat >>confdefs.h <<\EOF
26792#define NCURSES 1
26793EOF
26794
26795echo "$as_me:26795: checking for ncurses version" >&5
26796echo $ECHO_N "checking for ncurses version... $ECHO_C" >&6
26797if test "${cf_cv_ncurses_version+set}" = set; then
26798  echo $ECHO_N "(cached) $ECHO_C" >&6
26799else
26800
26801	cf_cv_ncurses_version=no
26802	cf_tempfile=out$$
26803	rm -f "$cf_tempfile"
26804	if test "$cross_compiling" = yes; then
26805
26806	# This will not work if the preprocessor splits the line after the
26807	# Autoconf token.  The 'unproto' program does that.
26808	cat > "conftest.$ac_ext" <<EOF
26809#include <${cf_cv_ncurses_header:-curses.h}>
26810#undef Autoconf
26811#ifdef NCURSES_VERSION
26812Autoconf NCURSES_VERSION
26813#else
26814#ifdef __NCURSES_H
26815Autoconf "old"
26816#endif
26817;
26818#endif
26819EOF
26820	cf_try="$ac_cpp conftest.$ac_ext 2>&5 | grep '^Autoconf ' >conftest.out"
26821	{ (eval echo "$as_me:26821: \"$cf_try\"") >&5
26822  (eval $cf_try) 2>&5
26823  ac_status=$?
26824  echo "$as_me:26824: \$? = $ac_status" >&5
26825  (exit "$ac_status"); }
26826	if test -f conftest.out ; then
26827		cf_out=`sed -e 's%^Autoconf %%' -e 's%^[^"]*"%%' -e 's%".*%%' conftest.out`
26828		test -n "$cf_out" && cf_cv_ncurses_version="$cf_out"
26829		rm -f conftest.out
26830	fi
26831
26832else
26833  cat >"conftest.$ac_ext" <<_ACEOF
26834#line 26834 "configure"
26835#include "confdefs.h"
26836
26837#include <${cf_cv_ncurses_header:-curses.h}>
26838#include <stdio.h>
26839int main(void)
26840{
26841	FILE *fp = fopen("$cf_tempfile", "w");
26842#ifdef NCURSES_VERSION
26843# ifdef NCURSES_VERSION_PATCH
26844	fprintf(fp, "%s.%d\\n", NCURSES_VERSION, NCURSES_VERSION_PATCH);
26845# else
26846	fprintf(fp, "%s\\n", NCURSES_VERSION);
26847# endif
26848#else
26849# ifdef __NCURSES_H
26850	fprintf(fp, "old\\n");
26851# else
26852	make an error
26853# endif
26854#endif
26855	${cf_cv_main_return:-return}(0);
26856}
26857_ACEOF
26858rm -f "conftest$ac_exeext"
26859if { (eval echo "$as_me:26859: \"$ac_link\"") >&5
26860  (eval $ac_link) 2>&5
26861  ac_status=$?
26862  echo "$as_me:26862: \$? = $ac_status" >&5
26863  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
26864  { (eval echo "$as_me:26864: \"$ac_try\"") >&5
26865  (eval $ac_try) 2>&5
26866  ac_status=$?
26867  echo "$as_me:26867: \$? = $ac_status" >&5
26868  (exit "$ac_status"); }; }; then
26869
26870	cf_cv_ncurses_version=`cat $cf_tempfile`
26871else
26872  echo "$as_me: program exited with status $ac_status" >&5
26873echo "$as_me: failed program was:" >&5
26874cat "conftest.$ac_ext" >&5
26875fi
26876rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
26877fi
26878	rm -f "$cf_tempfile"
26879
26880fi
26881echo "$as_me:26881: result: $cf_cv_ncurses_version" >&5
26882echo "${ECHO_T}$cf_cv_ncurses_version" >&6
26883test "$cf_cv_ncurses_version" = no ||
26884cat >>confdefs.h <<\EOF
26885#define NCURSES 1
26886EOF
26887
26888cf_nculib_root=$cf_cv_screen
26889	# This works, except for the special case where we find gpm, but
26890	# ncurses is in a nonstandard location via $LIBS, and we really want
26891	# to link gpm.
26892cf_ncurses_LIBS=""
26893cf_ncurses_SAVE="$LIBS"
26894echo "$as_me:26894: checking for Gpm_Open in -lgpm" >&5
26895echo $ECHO_N "checking for Gpm_Open in -lgpm... $ECHO_C" >&6
26896if test "${ac_cv_lib_gpm_Gpm_Open+set}" = set; then
26897  echo $ECHO_N "(cached) $ECHO_C" >&6
26898else
26899  ac_check_lib_save_LIBS=$LIBS
26900LIBS="-lgpm  $LIBS"
26901cat >"conftest.$ac_ext" <<_ACEOF
26902#line 26902 "configure"
26903#include "confdefs.h"
26904
26905/* Override any gcc2 internal prototype to avoid an error.  */
26906#ifdef __cplusplus
26907extern "C"
26908#endif
26909/* We use char because int might match the return type of a gcc2
26910   builtin and then its argument prototype would still apply.  */
26911char Gpm_Open ();
26912int
26913main (void)
26914{
26915Gpm_Open ();
26916  ;
26917  return 0;
26918}
26919_ACEOF
26920rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26921if { (eval echo "$as_me:26921: \"$ac_link\"") >&5
26922  (eval $ac_link) 2>&5
26923  ac_status=$?
26924  echo "$as_me:26924: \$? = $ac_status" >&5
26925  (exit "$ac_status"); } &&
26926         { ac_try='test -s "conftest$ac_exeext"'
26927  { (eval echo "$as_me:26927: \"$ac_try\"") >&5
26928  (eval $ac_try) 2>&5
26929  ac_status=$?
26930  echo "$as_me:26930: \$? = $ac_status" >&5
26931  (exit "$ac_status"); }; }; then
26932  ac_cv_lib_gpm_Gpm_Open=yes
26933else
26934  echo "$as_me: failed program was:" >&5
26935cat "conftest.$ac_ext" >&5
26936ac_cv_lib_gpm_Gpm_Open=no
26937fi
26938rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26939LIBS=$ac_check_lib_save_LIBS
26940fi
26941echo "$as_me:26941: result: $ac_cv_lib_gpm_Gpm_Open" >&5
26942echo "${ECHO_T}$ac_cv_lib_gpm_Gpm_Open" >&6
26943if test "$ac_cv_lib_gpm_Gpm_Open" = yes; then
26944  echo "$as_me:26944: checking for initscr in -lgpm" >&5
26945echo $ECHO_N "checking for initscr in -lgpm... $ECHO_C" >&6
26946if test "${ac_cv_lib_gpm_initscr+set}" = set; then
26947  echo $ECHO_N "(cached) $ECHO_C" >&6
26948else
26949  ac_check_lib_save_LIBS=$LIBS
26950LIBS="-lgpm  $LIBS"
26951cat >"conftest.$ac_ext" <<_ACEOF
26952#line 26952 "configure"
26953#include "confdefs.h"
26954
26955/* Override any gcc2 internal prototype to avoid an error.  */
26956#ifdef __cplusplus
26957extern "C"
26958#endif
26959/* We use char because int might match the return type of a gcc2
26960   builtin and then its argument prototype would still apply.  */
26961char initscr ();
26962int
26963main (void)
26964{
26965initscr ();
26966  ;
26967  return 0;
26968}
26969_ACEOF
26970rm -f "conftest.$ac_objext" "conftest$ac_exeext"
26971if { (eval echo "$as_me:26971: \"$ac_link\"") >&5
26972  (eval $ac_link) 2>&5
26973  ac_status=$?
26974  echo "$as_me:26974: \$? = $ac_status" >&5
26975  (exit "$ac_status"); } &&
26976         { ac_try='test -s "conftest$ac_exeext"'
26977  { (eval echo "$as_me:26977: \"$ac_try\"") >&5
26978  (eval $ac_try) 2>&5
26979  ac_status=$?
26980  echo "$as_me:26980: \$? = $ac_status" >&5
26981  (exit "$ac_status"); }; }; then
26982  ac_cv_lib_gpm_initscr=yes
26983else
26984  echo "$as_me: failed program was:" >&5
26985cat "conftest.$ac_ext" >&5
26986ac_cv_lib_gpm_initscr=no
26987fi
26988rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
26989LIBS=$ac_check_lib_save_LIBS
26990fi
26991echo "$as_me:26991: result: $ac_cv_lib_gpm_initscr" >&5
26992echo "${ECHO_T}$ac_cv_lib_gpm_initscr" >&6
26993if test "$ac_cv_lib_gpm_initscr" = yes; then
26994  LIBS="$cf_ncurses_SAVE"
26995else
26996  cf_ncurses_LIBS="-lgpm"
26997fi
26998
26999fi
27000
27001case "$host_os" in
27002(freebsd*)
27003	# This is only necessary if you are linking against an obsolete
27004	# version of ncurses (but it should do no harm, since it's static).
27005	if test "$cf_nculib_root" = ncurses ; then
27006		echo "$as_me:27006: checking for tgoto in -lmytinfo" >&5
27007echo $ECHO_N "checking for tgoto in -lmytinfo... $ECHO_C" >&6
27008if test "${ac_cv_lib_mytinfo_tgoto+set}" = set; then
27009  echo $ECHO_N "(cached) $ECHO_C" >&6
27010else
27011  ac_check_lib_save_LIBS=$LIBS
27012LIBS="-lmytinfo  $LIBS"
27013cat >"conftest.$ac_ext" <<_ACEOF
27014#line 27014 "configure"
27015#include "confdefs.h"
27016
27017/* Override any gcc2 internal prototype to avoid an error.  */
27018#ifdef __cplusplus
27019extern "C"
27020#endif
27021/* We use char because int might match the return type of a gcc2
27022   builtin and then its argument prototype would still apply.  */
27023char tgoto ();
27024int
27025main (void)
27026{
27027tgoto ();
27028  ;
27029  return 0;
27030}
27031_ACEOF
27032rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27033if { (eval echo "$as_me:27033: \"$ac_link\"") >&5
27034  (eval $ac_link) 2>&5
27035  ac_status=$?
27036  echo "$as_me:27036: \$? = $ac_status" >&5
27037  (exit "$ac_status"); } &&
27038         { ac_try='test -s "conftest$ac_exeext"'
27039  { (eval echo "$as_me:27039: \"$ac_try\"") >&5
27040  (eval $ac_try) 2>&5
27041  ac_status=$?
27042  echo "$as_me:27042: \$? = $ac_status" >&5
27043  (exit "$ac_status"); }; }; then
27044  ac_cv_lib_mytinfo_tgoto=yes
27045else
27046  echo "$as_me: failed program was:" >&5
27047cat "conftest.$ac_ext" >&5
27048ac_cv_lib_mytinfo_tgoto=no
27049fi
27050rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27051LIBS=$ac_check_lib_save_LIBS
27052fi
27053echo "$as_me:27053: result: $ac_cv_lib_mytinfo_tgoto" >&5
27054echo "${ECHO_T}$ac_cv_lib_mytinfo_tgoto" >&6
27055if test "$ac_cv_lib_mytinfo_tgoto" = yes; then
27056  cf_ncurses_LIBS="-lmytinfo $cf_ncurses_LIBS"
27057fi
27058
27059	fi
27060	;;
27061esac
27062
27063cf_add_libs="$LIBS"
27064# reverse order
27065cf_add_0lib=
27066for cf_add_1lib in $cf_ncurses_LIBS; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
27067# filter duplicates
27068for cf_add_1lib in $cf_add_0lib; do
27069	for cf_add_2lib in $cf_add_libs; do
27070		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
27071			cf_add_1lib=
27072			break
27073		fi
27074	done
27075	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
27076done
27077LIBS="$cf_add_libs"
27078
27079if test -n "$cf_cv_curses_dir" && test "$cf_cv_curses_dir" != "no"
27080then
27081
27082cf_add_libs="$LIBS"
27083# reverse order
27084cf_add_0lib=
27085for cf_add_1lib in -l$cf_nculib_root; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
27086# filter duplicates
27087for cf_add_1lib in $cf_add_0lib; do
27088	for cf_add_2lib in $cf_add_libs; do
27089		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
27090			cf_add_1lib=
27091			break
27092		fi
27093	done
27094	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
27095done
27096LIBS="$cf_add_libs"
27097
27098else
27099
27100	eval 'cf_cv_have_lib_'"$cf_nculib_root"'=no'
27101	cf_libdir=""
27102	echo "$as_me:27102: checking for initscr" >&5
27103echo $ECHO_N "checking for initscr... $ECHO_C" >&6
27104if test "${ac_cv_func_initscr+set}" = set; then
27105  echo $ECHO_N "(cached) $ECHO_C" >&6
27106else
27107  cat >"conftest.$ac_ext" <<_ACEOF
27108#line 27108 "configure"
27109#include "confdefs.h"
27110#define initscr autoconf_temporary
27111#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
27112#undef initscr
27113
27114#ifdef __cplusplus
27115extern "C"
27116#endif
27117
27118/* We use char because int might match the return type of a gcc2
27119   builtin and then its argument prototype would still apply.  */
27120char initscr (void);
27121
27122int
27123main (void)
27124{
27125
27126/* The GNU C library defines stubs for functions which it implements
27127    to always fail with ENOSYS.  Some functions are actually named
27128    something starting with __ and the normal name is an alias.  */
27129#if defined (__stub_initscr) || defined (__stub___initscr)
27130#error found stub for initscr
27131#endif
27132
27133	return initscr ();
27134  ;
27135  return 0;
27136}
27137_ACEOF
27138rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27139if { (eval echo "$as_me:27139: \"$ac_link\"") >&5
27140  (eval $ac_link) 2>&5
27141  ac_status=$?
27142  echo "$as_me:27142: \$? = $ac_status" >&5
27143  (exit "$ac_status"); } &&
27144         { ac_try='test -s "conftest$ac_exeext"'
27145  { (eval echo "$as_me:27145: \"$ac_try\"") >&5
27146  (eval $ac_try) 2>&5
27147  ac_status=$?
27148  echo "$as_me:27148: \$? = $ac_status" >&5
27149  (exit "$ac_status"); }; }; then
27150  ac_cv_func_initscr=yes
27151else
27152  echo "$as_me: failed program was:" >&5
27153cat "conftest.$ac_ext" >&5
27154ac_cv_func_initscr=no
27155fi
27156rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27157fi
27158echo "$as_me:27158: result: $ac_cv_func_initscr" >&5
27159echo "${ECHO_T}$ac_cv_func_initscr" >&6
27160if test "$ac_cv_func_initscr" = yes; then
27161  eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
27162else
27163
27164		cf_save_LIBS="$LIBS"
27165		echo "$as_me:27165: checking for initscr in -l$cf_nculib_root" >&5
27166echo $ECHO_N "checking for initscr in -l$cf_nculib_root... $ECHO_C" >&6
27167		LIBS="-l$cf_nculib_root $LIBS"
27168		cat >"conftest.$ac_ext" <<_ACEOF
27169#line 27169 "configure"
27170#include "confdefs.h"
27171#include <${cf_cv_ncurses_header:-curses.h}>
27172int
27173main (void)
27174{
27175initscr()
27176  ;
27177  return 0;
27178}
27179_ACEOF
27180rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27181if { (eval echo "$as_me:27181: \"$ac_link\"") >&5
27182  (eval $ac_link) 2>&5
27183  ac_status=$?
27184  echo "$as_me:27184: \$? = $ac_status" >&5
27185  (exit "$ac_status"); } &&
27186         { ac_try='test -s "conftest$ac_exeext"'
27187  { (eval echo "$as_me:27187: \"$ac_try\"") >&5
27188  (eval $ac_try) 2>&5
27189  ac_status=$?
27190  echo "$as_me:27190: \$? = $ac_status" >&5
27191  (exit "$ac_status"); }; }; then
27192  echo "$as_me:27192: result: yes" >&5
27193echo "${ECHO_T}yes" >&6
27194			 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
27195
27196else
27197  echo "$as_me: failed program was:" >&5
27198cat "conftest.$ac_ext" >&5
27199echo "$as_me:27199: result: no" >&5
27200echo "${ECHO_T}no" >&6
27201
27202cf_search=
27203cf_library_path_list=""
27204if test -n "${LDFLAGS}${LIBS}" ; then
27205	for cf_library_path in $LDFLAGS $LIBS
27206	do
27207		case "$cf_library_path" in
27208		(-L*)
27209			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
27210
27211test "x$cf_library_path" != "xNONE" && \
27212test -d "$cf_library_path" && \
27213 {
27214	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
27215	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
27216	test -d "$cf_library_path/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root"
27217	test -d "$cf_library_path/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_library_path/lib/$cf_nculib_root/lib"
27218	test -d "$cf_library_path/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_library_path/$cf_nculib_root/lib"
27219	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"
27220}
27221
27222			cf_library_path_list="$cf_library_path_list $cf_search"
27223			;;
27224		esac
27225	done
27226fi
27227
27228cf_search=
27229
27230test "x$prefix" != "xNONE" && \
27231test -d "$prefix" && \
27232 {
27233	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
27234	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
27235	test -d "$prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $prefix/lib/$cf_nculib_root"
27236	test -d "$prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $prefix/lib/$cf_nculib_root/lib"
27237	test -d "$prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $prefix/$cf_nculib_root/lib"
27238	test -d "$prefix/$cf_nculib_root/lib/$cf_nculib_root" &&    cf_search="$cf_search $prefix/$cf_nculib_root/lib/$cf_nculib_root"
27239}
27240
27241for cf_subdir_prefix in \
27242	/usr \
27243	/usr/local \
27244	/usr/pkg \
27245	/opt \
27246	/opt/local \
27247	$HOME
27248do
27249
27250test "x$cf_subdir_prefix" != "x$prefix" && \
27251test -d "$cf_subdir_prefix" && \
27252{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
27253	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
27254	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
27255	test -d "$cf_subdir_prefix/lib/$cf_nculib_root" &&       cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root"
27256	test -d "$cf_subdir_prefix/lib/$cf_nculib_root/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/$cf_nculib_root/lib"
27257	test -d "$cf_subdir_prefix/$cf_nculib_root/lib" &&       cf_search="$cf_search $cf_subdir_prefix/$cf_nculib_root/lib"
27258	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"
27259}
27260
27261done
27262
27263cf_search="$cf_library_path_list $cf_search"
27264
27265			for cf_libdir in $cf_search
27266			do
27267				echo "$as_me:27267: checking for -l$cf_nculib_root in $cf_libdir" >&5
27268echo $ECHO_N "checking for -l$cf_nculib_root in $cf_libdir... $ECHO_C" >&6
27269				LIBS="-L$cf_libdir -l$cf_nculib_root $cf_save_LIBS"
27270				cat >"conftest.$ac_ext" <<_ACEOF
27271#line 27271 "configure"
27272#include "confdefs.h"
27273#include <${cf_cv_ncurses_header:-curses.h}>
27274int
27275main (void)
27276{
27277initscr()
27278  ;
27279  return 0;
27280}
27281_ACEOF
27282rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27283if { (eval echo "$as_me:27283: \"$ac_link\"") >&5
27284  (eval $ac_link) 2>&5
27285  ac_status=$?
27286  echo "$as_me:27286: \$? = $ac_status" >&5
27287  (exit "$ac_status"); } &&
27288         { ac_try='test -s "conftest$ac_exeext"'
27289  { (eval echo "$as_me:27289: \"$ac_try\"") >&5
27290  (eval $ac_try) 2>&5
27291  ac_status=$?
27292  echo "$as_me:27292: \$? = $ac_status" >&5
27293  (exit "$ac_status"); }; }; then
27294  echo "$as_me:27294: result: yes" >&5
27295echo "${ECHO_T}yes" >&6
27296			 		 eval 'cf_cv_have_lib_'"$cf_nculib_root"'=yes'
27297					 break
27298else
27299  echo "$as_me: failed program was:" >&5
27300cat "conftest.$ac_ext" >&5
27301echo "$as_me:27301: result: no" >&5
27302echo "${ECHO_T}no" >&6
27303					 LIBS="$cf_save_LIBS"
27304fi
27305rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27306			done
27307
27308fi
27309rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27310
27311fi
27312
27313eval 'cf_found_library="$cf_cv_have_lib_'"$cf_nculib_root"\"
27314
27315if test "$cf_found_library" = no ; then
27316	{ { echo "$as_me:27316: error: Cannot link $cf_nculib_root library" >&5
27317echo "$as_me: error: Cannot link $cf_nculib_root library" >&2;}
27318   { (exit 1); exit 1; }; }
27319fi
27320
27321fi
27322
27323if test -n "$cf_ncurses_LIBS" ; then
27324	echo "$as_me:27324: checking if we can link $cf_nculib_root without $cf_ncurses_LIBS" >&5
27325echo $ECHO_N "checking if we can link $cf_nculib_root without $cf_ncurses_LIBS... $ECHO_C" >&6
27326	cf_ncurses_SAVE="$LIBS"
27327	for p in $cf_ncurses_LIBS ; do
27328		q=`echo "$LIBS" | sed -e "s%$p %%" -e "s%$p$%%"`
27329		if test "$q" != "$LIBS" ; then
27330			LIBS="$q"
27331		fi
27332	done
27333	cat >"conftest.$ac_ext" <<_ACEOF
27334#line 27334 "configure"
27335#include "confdefs.h"
27336#include <${cf_cv_ncurses_header:-curses.h}>
27337int
27338main (void)
27339{
27340initscr(); mousemask(0,0); tigetstr((char *)0);
27341  ;
27342  return 0;
27343}
27344_ACEOF
27345rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27346if { (eval echo "$as_me:27346: \"$ac_link\"") >&5
27347  (eval $ac_link) 2>&5
27348  ac_status=$?
27349  echo "$as_me:27349: \$? = $ac_status" >&5
27350  (exit "$ac_status"); } &&
27351         { ac_try='test -s "conftest$ac_exeext"'
27352  { (eval echo "$as_me:27352: \"$ac_try\"") >&5
27353  (eval $ac_try) 2>&5
27354  ac_status=$?
27355  echo "$as_me:27355: \$? = $ac_status" >&5
27356  (exit "$ac_status"); }; }; then
27357  echo "$as_me:27357: result: yes" >&5
27358echo "${ECHO_T}yes" >&6
27359else
27360  echo "$as_me: failed program was:" >&5
27361cat "conftest.$ac_ext" >&5
27362echo "$as_me:27362: result: no" >&5
27363echo "${ECHO_T}no" >&6
27364		 LIBS="$cf_ncurses_SAVE"
27365fi
27366rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27367fi
27368
27369cf_nculib_ROOT=`echo "HAVE_LIB$cf_nculib_root" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
27370
27371cat >>confdefs.h <<EOF
27372#define $cf_nculib_ROOT 1
27373EOF
27374
27375	fi
27376else
27377	NCURSES_CONFIG=none
27378fi
27379
27380	;;
27381(pdcurses)
27382	case "$host_os" in
27383	(mingw*)
27384		cf_cv_ncurses_header=curses.h
27385		;;
27386	(*)
27387		cf_cv_ncurses_header=xcurses.h
27388		# do this last, since it changes definition of main: CF_PDCURSES_X11
27389		;;
27390	esac
27391	;;
27392(slang)
27393
27394echo "$as_me:27394: checking for slang header file" >&5
27395echo $ECHO_N "checking for slang header file... $ECHO_C" >&6
27396if test "${cf_cv_slang_header+set}" = set; then
27397  echo $ECHO_N "(cached) $ECHO_C" >&6
27398else
27399
27400	cf_cv_slang_header=no
27401	cat >"conftest.$ac_ext" <<_ACEOF
27402#line 27402 "configure"
27403#include "confdefs.h"
27404#include <slang.h>
27405int
27406main (void)
27407{
27408printf("%s\\n", SLANG_VERSION)
27409  ;
27410  return 0;
27411}
27412_ACEOF
27413rm -f "conftest.$ac_objext"
27414if { (eval echo "$as_me:27414: \"$ac_compile\"") >&5
27415  (eval $ac_compile) 2>&5
27416  ac_status=$?
27417  echo "$as_me:27417: \$? = $ac_status" >&5
27418  (exit "$ac_status"); } &&
27419         { ac_try='test -s "conftest.$ac_objext"'
27420  { (eval echo "$as_me:27420: \"$ac_try\"") >&5
27421  (eval $ac_try) 2>&5
27422  ac_status=$?
27423  echo "$as_me:27423: \$? = $ac_status" >&5
27424  (exit "$ac_status"); }; }; then
27425  cf_cv_slang_header=predefined
27426else
27427  echo "$as_me: failed program was:" >&5
27428cat "conftest.$ac_ext" >&5
27429
27430cf_search=
27431
27432# collect the current set of include-directories from compiler flags
27433cf_header_path_list=""
27434if test -n "${CFLAGS}${CPPFLAGS}" ; then
27435	for cf_header_path in $CPPFLAGS $CFLAGS
27436	do
27437		case "$cf_header_path" in
27438		(-I*)
27439			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
27440
27441test "x$cf_header_path" != "xNONE" && \
27442test -d "$cf_header_path" && \
27443 {
27444	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
27445	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
27446	test -d "$cf_header_path/include/slang" &&       cf_search="$cf_search $cf_header_path/include/slang"
27447	test -d "$cf_header_path/include/slang/include" &&    cf_search="$cf_search $cf_header_path/include/slang/include"
27448	test -d "$cf_header_path/slang/include" &&       cf_search="$cf_search $cf_header_path/slang/include"
27449	test -d "$cf_header_path/slang/include/slang" &&    cf_search="$cf_search $cf_header_path/slang/include/slang"
27450}
27451
27452			cf_header_path_list="$cf_header_path_list $cf_search"
27453			;;
27454		esac
27455	done
27456fi
27457
27458# add the variations for the package we are looking for
27459
27460cf_search=
27461
27462test "x$prefix" != "xNONE" && \
27463test -d "$prefix" && \
27464 {
27465	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
27466	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
27467	test -d "$prefix/include/slang" &&       cf_search="$cf_search $prefix/include/slang"
27468	test -d "$prefix/include/slang/include" &&    cf_search="$cf_search $prefix/include/slang/include"
27469	test -d "$prefix/slang/include" &&       cf_search="$cf_search $prefix/slang/include"
27470	test -d "$prefix/slang/include/slang" &&    cf_search="$cf_search $prefix/slang/include/slang"
27471}
27472
27473for cf_subdir_prefix in \
27474	/usr \
27475	/usr/local \
27476	/usr/pkg \
27477	/opt \
27478	/opt/local \
27479	$HOME
27480do
27481
27482test "x$cf_subdir_prefix" != "x$prefix" && \
27483test -d "$cf_subdir_prefix" && \
27484{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
27485	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
27486	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
27487	test -d "$cf_subdir_prefix/include/slang" &&       cf_search="$cf_search $cf_subdir_prefix/include/slang"
27488	test -d "$cf_subdir_prefix/include/slang/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/slang/include"
27489	test -d "$cf_subdir_prefix/slang/include" &&       cf_search="$cf_search $cf_subdir_prefix/slang/include"
27490	test -d "$cf_subdir_prefix/slang/include/slang" &&    cf_search="$cf_search $cf_subdir_prefix/slang/include/slang"
27491}
27492
27493done
27494
27495test "$includedir" != NONE && \
27496test "$includedir" != "/usr/include" && \
27497test -d "$includedir" && {
27498	test -d "$includedir" &&    cf_search="$cf_search $includedir"
27499	test -d "$includedir/slang" && cf_search="$cf_search $includedir/slang"
27500}
27501
27502test "$oldincludedir" != NONE && \
27503test "$oldincludedir" != "/usr/include" && \
27504test -d "$oldincludedir" && {
27505	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
27506	test -d "$oldincludedir/slang" && cf_search="$cf_search $oldincludedir/slang"
27507}
27508
27509cf_search="$cf_search $cf_header_path_list"
27510
27511	for cf_incdir in $cf_search
27512	do
27513		for cf_header in \
27514			slang.h
27515		do
27516			echo trying "$cf_incdir/$cf_header" 1>&5
27517			if ${EGREP-egrep} "SLANG_VERSION" "$cf_incdir/$cf_header" 1>&5 2>&1; then
27518				cf_cv_slang_header=$cf_incdir/$cf_header
27519				break
27520			fi
27521		done
27522		test "$cf_cv_slang_header" != no && break
27523	done
27524
27525fi
27526rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27527fi
27528echo "$as_me:27528: result: $cf_cv_slang_header" >&5
27529echo "${ECHO_T}$cf_cv_slang_header" >&6
27530
27531if test "x$cf_cv_slang_header" != xno
27532then
27533
27534cat >>confdefs.h <<\EOF
27535#define USE_SLANG 1
27536EOF
27537
27538	cf_incdir=`echo "$cf_cv_slang_header" | sed -e 's%/[^/]*$%%'`
27539
27540	case "$cf_cv_slang_header" in
27541	(predefined)
27542		;;
27543	(*)
27544
27545if test -n "$cf_incdir" ; then
27546  for cf_add_incdir in $cf_incdir
27547  do
27548	while test "$cf_add_incdir" != /usr/include
27549	do
27550	  if test -d "$cf_add_incdir"
27551	  then
27552		cf_have_incdir=no
27553		if test -n "$CFLAGS$CPPFLAGS" ; then
27554		  # a loop is needed to ensure we can add subdirs of existing dirs
27555		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
27556			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
27557			  cf_have_incdir=yes; break
27558			fi
27559		  done
27560		fi
27561
27562		if test "$cf_have_incdir" = no ; then
27563		  if test "$cf_add_incdir" = /usr/local/include ; then
27564			if test "$GCC" = yes
27565			then
27566			  cf_save_CPPFLAGS=$CPPFLAGS
27567
27568	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
27569	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
27570
27571			  cat >"conftest.$ac_ext" <<_ACEOF
27572#line 27572 "configure"
27573#include "confdefs.h"
27574#include <stdio.h>
27575int
27576main (void)
27577{
27578printf("Hello")
27579  ;
27580  return 0;
27581}
27582_ACEOF
27583rm -f "conftest.$ac_objext"
27584if { (eval echo "$as_me:27584: \"$ac_compile\"") >&5
27585  (eval $ac_compile) 2>&5
27586  ac_status=$?
27587  echo "$as_me:27587: \$? = $ac_status" >&5
27588  (exit "$ac_status"); } &&
27589         { ac_try='test -s "conftest.$ac_objext"'
27590  { (eval echo "$as_me:27590: \"$ac_try\"") >&5
27591  (eval $ac_try) 2>&5
27592  ac_status=$?
27593  echo "$as_me:27593: \$? = $ac_status" >&5
27594  (exit "$ac_status"); }; }; then
27595  :
27596else
27597  echo "$as_me: failed program was:" >&5
27598cat "conftest.$ac_ext" >&5
27599cf_have_incdir=yes
27600fi
27601rm -f "conftest.$ac_objext" "conftest.$ac_ext"
27602			  CPPFLAGS=$cf_save_CPPFLAGS
27603			fi
27604		  fi
27605		fi
27606
27607		if test "$cf_have_incdir" = no ; then
27608		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
27609
27610echo "${as_me:-configure}:27610: testing adding $cf_add_incdir to include-path ..." 1>&5
27611
27612		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
27613
27614		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
27615		  test "$cf_top_incdir" = "$cf_add_incdir" && break
27616		  cf_add_incdir="$cf_top_incdir"
27617		else
27618		  break
27619		fi
27620	  else
27621		break
27622	  fi
27623	done
27624  done
27625fi
27626
27627		;;
27628	esac
27629fi
27630
27631if test "x$cf_cv_slang_header" != xno
27632then
27633
27634cf_slang_LIBS1="$LIBS"
27635
27636if test "${cf_cv_termlib+set}" = set; then
27637  echo $ECHO_N "(cached) $ECHO_C" >&6
27638else
27639
27640cf_cv_termlib=none
27641cat >"conftest.$ac_ext" <<_ACEOF
27642#line 27642 "configure"
27643#include "confdefs.h"
27644
27645int
27646main (void)
27647{
27648char *x=(char*)tgoto("",0,0)
27649  ;
27650  return 0;
27651}
27652_ACEOF
27653rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27654if { (eval echo "$as_me:27654: \"$ac_link\"") >&5
27655  (eval $ac_link) 2>&5
27656  ac_status=$?
27657  echo "$as_me:27657: \$? = $ac_status" >&5
27658  (exit "$ac_status"); } &&
27659         { ac_try='test -s "conftest$ac_exeext"'
27660  { (eval echo "$as_me:27660: \"$ac_try\"") >&5
27661  (eval $ac_try) 2>&5
27662  ac_status=$?
27663  echo "$as_me:27663: \$? = $ac_status" >&5
27664  (exit "$ac_status"); }; }; then
27665  cat >"conftest.$ac_ext" <<_ACEOF
27666#line 27666 "configure"
27667#include "confdefs.h"
27668
27669int
27670main (void)
27671{
27672int x=tigetstr("")
27673  ;
27674  return 0;
27675}
27676_ACEOF
27677rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27678if { (eval echo "$as_me:27678: \"$ac_link\"") >&5
27679  (eval $ac_link) 2>&5
27680  ac_status=$?
27681  echo "$as_me:27681: \$? = $ac_status" >&5
27682  (exit "$ac_status"); } &&
27683         { ac_try='test -s "conftest$ac_exeext"'
27684  { (eval echo "$as_me:27684: \"$ac_try\"") >&5
27685  (eval $ac_try) 2>&5
27686  ac_status=$?
27687  echo "$as_me:27687: \$? = $ac_status" >&5
27688  (exit "$ac_status"); }; }; then
27689  cf_cv_termlib=terminfo
27690else
27691  echo "$as_me: failed program was:" >&5
27692cat "conftest.$ac_ext" >&5
27693cf_cv_termlib=termcap
27694fi
27695rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27696	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6
27697
27698echo "${as_me:-configure}:27698: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5
27699
27700else
27701  echo "$as_me: failed program was:" >&5
27702cat "conftest.$ac_ext" >&5
27703
27704if test "$cf_cv_termlib" = none; then
27705	# FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
27706	# tgetstr lives in -lcurses when it is only an unsatisfied extern.
27707	cf_save_LIBS="$LIBS"
27708	for cf_lib in tinfo curses ncurses termlib termcap
27709	do
27710		LIBS="-l$cf_lib $cf_save_LIBS"
27711		for cf_func in tigetstr tgetstr
27712		do
27713			echo "$as_me:27713: checking for $cf_func in -l$cf_lib" >&5
27714echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
27715			cat >"conftest.$ac_ext" <<_ACEOF
27716#line 27716 "configure"
27717#include "confdefs.h"
27718
27719int
27720main (void)
27721{
27722int x=$cf_func("")
27723  ;
27724  return 0;
27725}
27726_ACEOF
27727rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27728if { (eval echo "$as_me:27728: \"$ac_link\"") >&5
27729  (eval $ac_link) 2>&5
27730  ac_status=$?
27731  echo "$as_me:27731: \$? = $ac_status" >&5
27732  (exit "$ac_status"); } &&
27733         { ac_try='test -s "conftest$ac_exeext"'
27734  { (eval echo "$as_me:27734: \"$ac_try\"") >&5
27735  (eval $ac_try) 2>&5
27736  ac_status=$?
27737  echo "$as_me:27737: \$? = $ac_status" >&5
27738  (exit "$ac_status"); }; }; then
27739  cf_result=yes
27740else
27741  echo "$as_me: failed program was:" >&5
27742cat "conftest.$ac_ext" >&5
27743cf_result=no
27744fi
27745rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27746			echo "$as_me:27746: result: $cf_result" >&5
27747echo "${ECHO_T}$cf_result" >&6
27748			if test "$cf_result" = yes ; then
27749				if test "$cf_func" = tigetstr ; then
27750					cf_cv_termlib=terminfo
27751				else
27752					cf_cv_termlib=termcap
27753				fi
27754				break
27755			fi
27756		done
27757		test "$cf_result" = yes && break
27758	done
27759	test "$cf_result" = no && LIBS="$cf_save_LIBS"
27760fi
27761if test "$cf_cv_termlib" = none; then
27762	# allow curses library for broken AIX system.
27763	echo "$as_me:27763: checking for initscr in -lcurses" >&5
27764echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
27765if test "${ac_cv_lib_curses_initscr+set}" = set; then
27766  echo $ECHO_N "(cached) $ECHO_C" >&6
27767else
27768  ac_check_lib_save_LIBS=$LIBS
27769LIBS="-lcurses  $LIBS"
27770cat >"conftest.$ac_ext" <<_ACEOF
27771#line 27771 "configure"
27772#include "confdefs.h"
27773
27774/* Override any gcc2 internal prototype to avoid an error.  */
27775#ifdef __cplusplus
27776extern "C"
27777#endif
27778/* We use char because int might match the return type of a gcc2
27779   builtin and then its argument prototype would still apply.  */
27780char initscr ();
27781int
27782main (void)
27783{
27784initscr ();
27785  ;
27786  return 0;
27787}
27788_ACEOF
27789rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27790if { (eval echo "$as_me:27790: \"$ac_link\"") >&5
27791  (eval $ac_link) 2>&5
27792  ac_status=$?
27793  echo "$as_me:27793: \$? = $ac_status" >&5
27794  (exit "$ac_status"); } &&
27795         { ac_try='test -s "conftest$ac_exeext"'
27796  { (eval echo "$as_me:27796: \"$ac_try\"") >&5
27797  (eval $ac_try) 2>&5
27798  ac_status=$?
27799  echo "$as_me:27799: \$? = $ac_status" >&5
27800  (exit "$ac_status"); }; }; then
27801  ac_cv_lib_curses_initscr=yes
27802else
27803  echo "$as_me: failed program was:" >&5
27804cat "conftest.$ac_ext" >&5
27805ac_cv_lib_curses_initscr=no
27806fi
27807rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27808LIBS=$ac_check_lib_save_LIBS
27809fi
27810echo "$as_me:27810: result: $ac_cv_lib_curses_initscr" >&5
27811echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
27812if test "$ac_cv_lib_curses_initscr" = yes; then
27813
27814cf_add_libs="$LIBS"
27815# reverse order
27816cf_add_0lib=
27817for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
27818# filter duplicates
27819for cf_add_1lib in $cf_add_0lib; do
27820	for cf_add_2lib in $cf_add_libs; do
27821		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
27822			cf_add_1lib=
27823			break
27824		fi
27825	done
27826	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
27827done
27828LIBS="$cf_add_libs"
27829
27830fi
27831
27832	echo "$as_me:27832: checking for tgoto in -ltermcap" >&5
27833echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
27834if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
27835  echo $ECHO_N "(cached) $ECHO_C" >&6
27836else
27837  ac_check_lib_save_LIBS=$LIBS
27838LIBS="-ltermcap  $LIBS"
27839cat >"conftest.$ac_ext" <<_ACEOF
27840#line 27840 "configure"
27841#include "confdefs.h"
27842
27843/* Override any gcc2 internal prototype to avoid an error.  */
27844#ifdef __cplusplus
27845extern "C"
27846#endif
27847/* We use char because int might match the return type of a gcc2
27848   builtin and then its argument prototype would still apply.  */
27849char tgoto ();
27850int
27851main (void)
27852{
27853tgoto ();
27854  ;
27855  return 0;
27856}
27857_ACEOF
27858rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27859if { (eval echo "$as_me:27859: \"$ac_link\"") >&5
27860  (eval $ac_link) 2>&5
27861  ac_status=$?
27862  echo "$as_me:27862: \$? = $ac_status" >&5
27863  (exit "$ac_status"); } &&
27864         { ac_try='test -s "conftest$ac_exeext"'
27865  { (eval echo "$as_me:27865: \"$ac_try\"") >&5
27866  (eval $ac_try) 2>&5
27867  ac_status=$?
27868  echo "$as_me:27868: \$? = $ac_status" >&5
27869  (exit "$ac_status"); }; }; then
27870  ac_cv_lib_termcap_tgoto=yes
27871else
27872  echo "$as_me: failed program was:" >&5
27873cat "conftest.$ac_ext" >&5
27874ac_cv_lib_termcap_tgoto=no
27875fi
27876rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27877LIBS=$ac_check_lib_save_LIBS
27878fi
27879echo "$as_me:27879: result: $ac_cv_lib_termcap_tgoto" >&5
27880echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
27881if test "$ac_cv_lib_termcap_tgoto" = yes; then
27882
27883cf_add_libs="$LIBS"
27884# reverse order
27885cf_add_0lib=
27886for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
27887# filter duplicates
27888for cf_add_1lib in $cf_add_0lib; do
27889	for cf_add_2lib in $cf_add_libs; do
27890		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
27891			cf_add_1lib=
27892			break
27893		fi
27894	done
27895	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
27896done
27897LIBS="$cf_add_libs"
27898 cf_cv_termlib=termcap
27899fi
27900
27901fi
27902
27903fi
27904rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27905if test "$cf_cv_termlib" = none; then
27906	{ echo "$as_me:27906: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
27907echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
27908fi
27909
27910fi
27911
27912cf_slang_LIBS2="$LIBS"
27913echo "$as_me:27913: checking for acos" >&5
27914echo $ECHO_N "checking for acos... $ECHO_C" >&6
27915if test "${ac_cv_func_acos+set}" = set; then
27916  echo $ECHO_N "(cached) $ECHO_C" >&6
27917else
27918  cat >"conftest.$ac_ext" <<_ACEOF
27919#line 27919 "configure"
27920#include "confdefs.h"
27921#define acos autoconf_temporary
27922#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
27923#undef acos
27924
27925#ifdef __cplusplus
27926extern "C"
27927#endif
27928
27929/* We use char because int might match the return type of a gcc2
27930   builtin and then its argument prototype would still apply.  */
27931char acos (void);
27932
27933int
27934main (void)
27935{
27936
27937/* The GNU C library defines stubs for functions which it implements
27938    to always fail with ENOSYS.  Some functions are actually named
27939    something starting with __ and the normal name is an alias.  */
27940#if defined (__stub_acos) || defined (__stub___acos)
27941#error found stub for acos
27942#endif
27943
27944	return acos ();
27945  ;
27946  return 0;
27947}
27948_ACEOF
27949rm -f "conftest.$ac_objext" "conftest$ac_exeext"
27950if { (eval echo "$as_me:27950: \"$ac_link\"") >&5
27951  (eval $ac_link) 2>&5
27952  ac_status=$?
27953  echo "$as_me:27953: \$? = $ac_status" >&5
27954  (exit "$ac_status"); } &&
27955         { ac_try='test -s "conftest$ac_exeext"'
27956  { (eval echo "$as_me:27956: \"$ac_try\"") >&5
27957  (eval $ac_try) 2>&5
27958  ac_status=$?
27959  echo "$as_me:27959: \$? = $ac_status" >&5
27960  (exit "$ac_status"); }; }; then
27961  ac_cv_func_acos=yes
27962else
27963  echo "$as_me: failed program was:" >&5
27964cat "conftest.$ac_ext" >&5
27965ac_cv_func_acos=no
27966fi
27967rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
27968fi
27969echo "$as_me:27969: result: $ac_cv_func_acos" >&5
27970echo "${ECHO_T}$ac_cv_func_acos" >&6
27971if test "$ac_cv_func_acos" = yes; then
27972  :
27973else
27974
27975echo "$as_me:27975: checking for acos in -lm" >&5
27976echo $ECHO_N "checking for acos in -lm... $ECHO_C" >&6
27977if test "${ac_cv_lib_m_acos+set}" = set; then
27978  echo $ECHO_N "(cached) $ECHO_C" >&6
27979else
27980  ac_check_lib_save_LIBS=$LIBS
27981LIBS="-lm $LIBS $LIBS"
27982cat >"conftest.$ac_ext" <<_ACEOF
27983#line 27983 "configure"
27984#include "confdefs.h"
27985
27986/* Override any gcc2 internal prototype to avoid an error.  */
27987#ifdef __cplusplus
27988extern "C"
27989#endif
27990/* We use char because int might match the return type of a gcc2
27991   builtin and then its argument prototype would still apply.  */
27992char acos ();
27993int
27994main (void)
27995{
27996acos ();
27997  ;
27998  return 0;
27999}
28000_ACEOF
28001rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28002if { (eval echo "$as_me:28002: \"$ac_link\"") >&5
28003  (eval $ac_link) 2>&5
28004  ac_status=$?
28005  echo "$as_me:28005: \$? = $ac_status" >&5
28006  (exit "$ac_status"); } &&
28007         { ac_try='test -s "conftest$ac_exeext"'
28008  { (eval echo "$as_me:28008: \"$ac_try\"") >&5
28009  (eval $ac_try) 2>&5
28010  ac_status=$?
28011  echo "$as_me:28011: \$? = $ac_status" >&5
28012  (exit "$ac_status"); }; }; then
28013  ac_cv_lib_m_acos=yes
28014else
28015  echo "$as_me: failed program was:" >&5
28016cat "conftest.$ac_ext" >&5
28017ac_cv_lib_m_acos=no
28018fi
28019rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28020LIBS=$ac_check_lib_save_LIBS
28021fi
28022echo "$as_me:28022: result: $ac_cv_lib_m_acos" >&5
28023echo "${ECHO_T}$ac_cv_lib_m_acos" >&6
28024if test "$ac_cv_lib_m_acos" = yes; then
28025
28026cf_tr_func=`echo "acos" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
28027
28028	cat >>confdefs.h <<EOF
28029#define HAVE_$cf_tr_func 1
28030EOF
28031
28032	ac_cv_func_acos=yes
28033	if test "$cf_used_lib_m" != yes ; then cf_used_lib_m=yes; LIBS="-lm $LIBS"; fi
28034else
28035
28036	ac_cv_func_acos=unknown
28037	unset ac_cv_func_acos 2>/dev/null
28038
28039fi
28040
28041fi
28042
28043case "$host_os" in
28044(os2*)
28045
28046	eval 'cf_cv_have_lib_'"video"'=no'
28047	cf_libdir=""
28048	echo "$as_me:28048: checking for v_init" >&5
28049echo $ECHO_N "checking for v_init... $ECHO_C" >&6
28050if test "${ac_cv_func_v_init+set}" = set; then
28051  echo $ECHO_N "(cached) $ECHO_C" >&6
28052else
28053  cat >"conftest.$ac_ext" <<_ACEOF
28054#line 28054 "configure"
28055#include "confdefs.h"
28056#define v_init autoconf_temporary
28057#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
28058#undef v_init
28059
28060#ifdef __cplusplus
28061extern "C"
28062#endif
28063
28064/* We use char because int might match the return type of a gcc2
28065   builtin and then its argument prototype would still apply.  */
28066char v_init (void);
28067
28068int
28069main (void)
28070{
28071
28072/* The GNU C library defines stubs for functions which it implements
28073    to always fail with ENOSYS.  Some functions are actually named
28074    something starting with __ and the normal name is an alias.  */
28075#if defined (__stub_v_init) || defined (__stub___v_init)
28076#error found stub for v_init
28077#endif
28078
28079	return v_init ();
28080  ;
28081  return 0;
28082}
28083_ACEOF
28084rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28085if { (eval echo "$as_me:28085: \"$ac_link\"") >&5
28086  (eval $ac_link) 2>&5
28087  ac_status=$?
28088  echo "$as_me:28088: \$? = $ac_status" >&5
28089  (exit "$ac_status"); } &&
28090         { ac_try='test -s "conftest$ac_exeext"'
28091  { (eval echo "$as_me:28091: \"$ac_try\"") >&5
28092  (eval $ac_try) 2>&5
28093  ac_status=$?
28094  echo "$as_me:28094: \$? = $ac_status" >&5
28095  (exit "$ac_status"); }; }; then
28096  ac_cv_func_v_init=yes
28097else
28098  echo "$as_me: failed program was:" >&5
28099cat "conftest.$ac_ext" >&5
28100ac_cv_func_v_init=no
28101fi
28102rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28103fi
28104echo "$as_me:28104: result: $ac_cv_func_v_init" >&5
28105echo "${ECHO_T}$ac_cv_func_v_init" >&6
28106if test "$ac_cv_func_v_init" = yes; then
28107  eval 'cf_cv_have_lib_'"video"'=yes'
28108else
28109
28110		cf_save_LIBS="$LIBS"
28111		echo "$as_me:28111: checking for v_init in -lvideo" >&5
28112echo $ECHO_N "checking for v_init in -lvideo... $ECHO_C" >&6
28113		LIBS="-lvideo $LIBS"
28114		cat >"conftest.$ac_ext" <<_ACEOF
28115#line 28115 "configure"
28116#include "confdefs.h"
28117#include <sys/video.h>
28118int
28119main (void)
28120{
28121v_init()
28122  ;
28123  return 0;
28124}
28125_ACEOF
28126rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28127if { (eval echo "$as_me:28127: \"$ac_link\"") >&5
28128  (eval $ac_link) 2>&5
28129  ac_status=$?
28130  echo "$as_me:28130: \$? = $ac_status" >&5
28131  (exit "$ac_status"); } &&
28132         { ac_try='test -s "conftest$ac_exeext"'
28133  { (eval echo "$as_me:28133: \"$ac_try\"") >&5
28134  (eval $ac_try) 2>&5
28135  ac_status=$?
28136  echo "$as_me:28136: \$? = $ac_status" >&5
28137  (exit "$ac_status"); }; }; then
28138  echo "$as_me:28138: result: yes" >&5
28139echo "${ECHO_T}yes" >&6
28140			 eval 'cf_cv_have_lib_'"video"'=yes'
28141
28142else
28143  echo "$as_me: failed program was:" >&5
28144cat "conftest.$ac_ext" >&5
28145echo "$as_me:28145: result: no" >&5
28146echo "${ECHO_T}no" >&6
28147
28148cf_search=
28149cf_library_path_list=""
28150if test -n "${LDFLAGS}${LIBS}" ; then
28151	for cf_library_path in $LDFLAGS $LIBS
28152	do
28153		case "$cf_library_path" in
28154		(-L*)
28155			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
28156
28157test "x$cf_library_path" != "xNONE" && \
28158test -d "$cf_library_path" && \
28159 {
28160	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
28161	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
28162	test -d "$cf_library_path/lib/video" &&       cf_search="$cf_search $cf_library_path/lib/video"
28163	test -d "$cf_library_path/lib/video/lib" &&    cf_search="$cf_search $cf_library_path/lib/video/lib"
28164	test -d "$cf_library_path/video/lib" &&       cf_search="$cf_search $cf_library_path/video/lib"
28165	test -d "$cf_library_path/video/lib/video" &&    cf_search="$cf_search $cf_library_path/video/lib/video"
28166}
28167
28168			cf_library_path_list="$cf_library_path_list $cf_search"
28169			;;
28170		esac
28171	done
28172fi
28173
28174cf_search=
28175
28176test "x$prefix" != "xNONE" && \
28177test -d "$prefix" && \
28178 {
28179	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
28180	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
28181	test -d "$prefix/lib/video" &&       cf_search="$cf_search $prefix/lib/video"
28182	test -d "$prefix/lib/video/lib" &&    cf_search="$cf_search $prefix/lib/video/lib"
28183	test -d "$prefix/video/lib" &&       cf_search="$cf_search $prefix/video/lib"
28184	test -d "$prefix/video/lib/video" &&    cf_search="$cf_search $prefix/video/lib/video"
28185}
28186
28187for cf_subdir_prefix in \
28188	/usr \
28189	/usr/local \
28190	/usr/pkg \
28191	/opt \
28192	/opt/local \
28193	$HOME
28194do
28195
28196test "x$cf_subdir_prefix" != "x$prefix" && \
28197test -d "$cf_subdir_prefix" && \
28198{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
28199	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
28200	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
28201	test -d "$cf_subdir_prefix/lib/video" &&       cf_search="$cf_search $cf_subdir_prefix/lib/video"
28202	test -d "$cf_subdir_prefix/lib/video/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/video/lib"
28203	test -d "$cf_subdir_prefix/video/lib" &&       cf_search="$cf_search $cf_subdir_prefix/video/lib"
28204	test -d "$cf_subdir_prefix/video/lib/video" &&    cf_search="$cf_search $cf_subdir_prefix/video/lib/video"
28205}
28206
28207done
28208
28209cf_search="$cf_library_path_list $cf_search"
28210
28211			for cf_libdir in $cf_search
28212			do
28213				echo "$as_me:28213: checking for -lvideo in $cf_libdir" >&5
28214echo $ECHO_N "checking for -lvideo in $cf_libdir... $ECHO_C" >&6
28215				LIBS="-L$cf_libdir -lvideo $cf_save_LIBS"
28216				cat >"conftest.$ac_ext" <<_ACEOF
28217#line 28217 "configure"
28218#include "confdefs.h"
28219#include <sys/video.h>
28220int
28221main (void)
28222{
28223v_init()
28224  ;
28225  return 0;
28226}
28227_ACEOF
28228rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28229if { (eval echo "$as_me:28229: \"$ac_link\"") >&5
28230  (eval $ac_link) 2>&5
28231  ac_status=$?
28232  echo "$as_me:28232: \$? = $ac_status" >&5
28233  (exit "$ac_status"); } &&
28234         { ac_try='test -s "conftest$ac_exeext"'
28235  { (eval echo "$as_me:28235: \"$ac_try\"") >&5
28236  (eval $ac_try) 2>&5
28237  ac_status=$?
28238  echo "$as_me:28238: \$? = $ac_status" >&5
28239  (exit "$ac_status"); }; }; then
28240  echo "$as_me:28240: result: yes" >&5
28241echo "${ECHO_T}yes" >&6
28242			 		 eval 'cf_cv_have_lib_'"video"'=yes'
28243					 break
28244else
28245  echo "$as_me: failed program was:" >&5
28246cat "conftest.$ac_ext" >&5
28247echo "$as_me:28247: result: no" >&5
28248echo "${ECHO_T}no" >&6
28249					 LIBS="$cf_save_LIBS"
28250fi
28251rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28252			done
28253
28254fi
28255rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28256
28257fi
28258
28259eval 'cf_found_library="$cf_cv_have_lib_'"video"\"
28260
28261if test "$cf_found_library" = no ; then
28262	{ { echo "$as_me:28262: error: Cannot link video library" >&5
28263echo "$as_me: error: Cannot link video library" >&2;}
28264   { (exit 1); exit 1; }; }
28265fi
28266
28267	;;
28268esac
28269
28270	eval 'cf_cv_have_lib_'"slang"'=no'
28271	cf_libdir=""
28272	echo "$as_me:28272: checking for SLtt_get_screen_size" >&5
28273echo $ECHO_N "checking for SLtt_get_screen_size... $ECHO_C" >&6
28274if test "${ac_cv_func_SLtt_get_screen_size+set}" = set; then
28275  echo $ECHO_N "(cached) $ECHO_C" >&6
28276else
28277  cat >"conftest.$ac_ext" <<_ACEOF
28278#line 28278 "configure"
28279#include "confdefs.h"
28280#define SLtt_get_screen_size autoconf_temporary
28281#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
28282#undef SLtt_get_screen_size
28283
28284#ifdef __cplusplus
28285extern "C"
28286#endif
28287
28288/* We use char because int might match the return type of a gcc2
28289   builtin and then its argument prototype would still apply.  */
28290char SLtt_get_screen_size (void);
28291
28292int
28293main (void)
28294{
28295
28296/* The GNU C library defines stubs for functions which it implements
28297    to always fail with ENOSYS.  Some functions are actually named
28298    something starting with __ and the normal name is an alias.  */
28299#if defined (__stub_SLtt_get_screen_size) || defined (__stub___SLtt_get_screen_size)
28300#error found stub for SLtt_get_screen_size
28301#endif
28302
28303	return SLtt_get_screen_size ();
28304  ;
28305  return 0;
28306}
28307_ACEOF
28308rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28309if { (eval echo "$as_me:28309: \"$ac_link\"") >&5
28310  (eval $ac_link) 2>&5
28311  ac_status=$?
28312  echo "$as_me:28312: \$? = $ac_status" >&5
28313  (exit "$ac_status"); } &&
28314         { ac_try='test -s "conftest$ac_exeext"'
28315  { (eval echo "$as_me:28315: \"$ac_try\"") >&5
28316  (eval $ac_try) 2>&5
28317  ac_status=$?
28318  echo "$as_me:28318: \$? = $ac_status" >&5
28319  (exit "$ac_status"); }; }; then
28320  ac_cv_func_SLtt_get_screen_size=yes
28321else
28322  echo "$as_me: failed program was:" >&5
28323cat "conftest.$ac_ext" >&5
28324ac_cv_func_SLtt_get_screen_size=no
28325fi
28326rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28327fi
28328echo "$as_me:28328: result: $ac_cv_func_SLtt_get_screen_size" >&5
28329echo "${ECHO_T}$ac_cv_func_SLtt_get_screen_size" >&6
28330if test "$ac_cv_func_SLtt_get_screen_size" = yes; then
28331  eval 'cf_cv_have_lib_'"slang"'=yes'
28332else
28333
28334		cf_save_LIBS="$LIBS"
28335		echo "$as_me:28335: checking for SLtt_get_screen_size in -lslang" >&5
28336echo $ECHO_N "checking for SLtt_get_screen_size in -lslang... $ECHO_C" >&6
28337		LIBS="-lslang $LIBS"
28338		cat >"conftest.$ac_ext" <<_ACEOF
28339#line 28339 "configure"
28340#include "confdefs.h"
28341#include <slang.h>
28342int
28343main (void)
28344{
28345SLtt_get_screen_size()
28346  ;
28347  return 0;
28348}
28349_ACEOF
28350rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28351if { (eval echo "$as_me:28351: \"$ac_link\"") >&5
28352  (eval $ac_link) 2>&5
28353  ac_status=$?
28354  echo "$as_me:28354: \$? = $ac_status" >&5
28355  (exit "$ac_status"); } &&
28356         { ac_try='test -s "conftest$ac_exeext"'
28357  { (eval echo "$as_me:28357: \"$ac_try\"") >&5
28358  (eval $ac_try) 2>&5
28359  ac_status=$?
28360  echo "$as_me:28360: \$? = $ac_status" >&5
28361  (exit "$ac_status"); }; }; then
28362  echo "$as_me:28362: result: yes" >&5
28363echo "${ECHO_T}yes" >&6
28364			 eval 'cf_cv_have_lib_'"slang"'=yes'
28365
28366else
28367  echo "$as_me: failed program was:" >&5
28368cat "conftest.$ac_ext" >&5
28369echo "$as_me:28369: result: no" >&5
28370echo "${ECHO_T}no" >&6
28371
28372cf_search=
28373cf_library_path_list=""
28374if test -n "${LDFLAGS}${LIBS}" ; then
28375	for cf_library_path in $LDFLAGS $LIBS
28376	do
28377		case "$cf_library_path" in
28378		(-L*)
28379			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
28380
28381test "x$cf_library_path" != "xNONE" && \
28382test -d "$cf_library_path" && \
28383 {
28384	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
28385	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
28386	test -d "$cf_library_path/lib/slang" &&       cf_search="$cf_search $cf_library_path/lib/slang"
28387	test -d "$cf_library_path/lib/slang/lib" &&    cf_search="$cf_search $cf_library_path/lib/slang/lib"
28388	test -d "$cf_library_path/slang/lib" &&       cf_search="$cf_search $cf_library_path/slang/lib"
28389	test -d "$cf_library_path/slang/lib/slang" &&    cf_search="$cf_search $cf_library_path/slang/lib/slang"
28390}
28391
28392			cf_library_path_list="$cf_library_path_list $cf_search"
28393			;;
28394		esac
28395	done
28396fi
28397
28398cf_search=
28399
28400test "x$prefix" != "xNONE" && \
28401test -d "$prefix" && \
28402 {
28403	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
28404	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
28405	test -d "$prefix/lib/slang" &&       cf_search="$cf_search $prefix/lib/slang"
28406	test -d "$prefix/lib/slang/lib" &&    cf_search="$cf_search $prefix/lib/slang/lib"
28407	test -d "$prefix/slang/lib" &&       cf_search="$cf_search $prefix/slang/lib"
28408	test -d "$prefix/slang/lib/slang" &&    cf_search="$cf_search $prefix/slang/lib/slang"
28409}
28410
28411for cf_subdir_prefix in \
28412	/usr \
28413	/usr/local \
28414	/usr/pkg \
28415	/opt \
28416	/opt/local \
28417	$HOME
28418do
28419
28420test "x$cf_subdir_prefix" != "x$prefix" && \
28421test -d "$cf_subdir_prefix" && \
28422{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
28423	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
28424	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
28425	test -d "$cf_subdir_prefix/lib/slang" &&       cf_search="$cf_search $cf_subdir_prefix/lib/slang"
28426	test -d "$cf_subdir_prefix/lib/slang/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/slang/lib"
28427	test -d "$cf_subdir_prefix/slang/lib" &&       cf_search="$cf_search $cf_subdir_prefix/slang/lib"
28428	test -d "$cf_subdir_prefix/slang/lib/slang" &&    cf_search="$cf_search $cf_subdir_prefix/slang/lib/slang"
28429}
28430
28431done
28432
28433cf_search="$cf_library_path_list $cf_search"
28434
28435			for cf_libdir in $cf_search
28436			do
28437				echo "$as_me:28437: checking for -lslang in $cf_libdir" >&5
28438echo $ECHO_N "checking for -lslang in $cf_libdir... $ECHO_C" >&6
28439				LIBS="-L$cf_libdir -lslang $cf_save_LIBS"
28440				cat >"conftest.$ac_ext" <<_ACEOF
28441#line 28441 "configure"
28442#include "confdefs.h"
28443#include <slang.h>
28444int
28445main (void)
28446{
28447SLtt_get_screen_size()
28448  ;
28449  return 0;
28450}
28451_ACEOF
28452rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28453if { (eval echo "$as_me:28453: \"$ac_link\"") >&5
28454  (eval $ac_link) 2>&5
28455  ac_status=$?
28456  echo "$as_me:28456: \$? = $ac_status" >&5
28457  (exit "$ac_status"); } &&
28458         { ac_try='test -s "conftest$ac_exeext"'
28459  { (eval echo "$as_me:28459: \"$ac_try\"") >&5
28460  (eval $ac_try) 2>&5
28461  ac_status=$?
28462  echo "$as_me:28462: \$? = $ac_status" >&5
28463  (exit "$ac_status"); }; }; then
28464  echo "$as_me:28464: result: yes" >&5
28465echo "${ECHO_T}yes" >&6
28466			 		 eval 'cf_cv_have_lib_'"slang"'=yes'
28467					 break
28468else
28469  echo "$as_me: failed program was:" >&5
28470cat "conftest.$ac_ext" >&5
28471echo "$as_me:28471: result: no" >&5
28472echo "${ECHO_T}no" >&6
28473					 LIBS="$cf_save_LIBS"
28474fi
28475rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28476			done
28477
28478fi
28479rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28480
28481fi
28482
28483eval 'cf_found_library="$cf_cv_have_lib_'"slang"\"
28484
28485if test "$cf_found_library" = no ; then
28486	{ { echo "$as_me:28486: error: Cannot link slang library" >&5
28487echo "$as_me: error: Cannot link slang library" >&2;}
28488   { (exit 1); exit 1; }; }
28489fi
28490
28491cf_slang_LIBS3="$LIBS"
28492echo "$as_me:28492: checking if we can link slang without termcap" >&5
28493echo $ECHO_N "checking if we can link slang without termcap... $ECHO_C" >&6
28494if test -n "`echo "$cf_slang_LIBS1" | sed -e 's/ //g'`" ; then
28495	cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s%$cf_slang_LIBS1%%" -e 's%^.%%'`
28496else
28497	cf_exclude="$cf_slang_LIBS2"
28498fi
28499LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s%$cf_exclude%%" -e 's%^.%%'`
28500cat >"conftest.$ac_ext" <<_ACEOF
28501#line 28501 "configure"
28502#include "confdefs.h"
28503#include <slang.h>
28504int
28505main (void)
28506{
28507SLtt_get_screen_size()
28508  ;
28509  return 0;
28510}
28511_ACEOF
28512rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28513if { (eval echo "$as_me:28513: \"$ac_link\"") >&5
28514  (eval $ac_link) 2>&5
28515  ac_status=$?
28516  echo "$as_me:28516: \$? = $ac_status" >&5
28517  (exit "$ac_status"); } &&
28518         { ac_try='test -s "conftest$ac_exeext"'
28519  { (eval echo "$as_me:28519: \"$ac_try\"") >&5
28520  (eval $ac_try) 2>&5
28521  ac_status=$?
28522  echo "$as_me:28522: \$? = $ac_status" >&5
28523  (exit "$ac_status"); }; }; then
28524  cf_result=yes
28525else
28526  echo "$as_me: failed program was:" >&5
28527cat "conftest.$ac_ext" >&5
28528cf_result=no
28529fi
28530rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28531echo "$as_me:28531: result: $cf_result" >&5
28532echo "${ECHO_T}$cf_result" >&6
28533test "$cf_result" = no && LIBS="$cf_slang_LIBS3"
28534
28535else
28536
28537echo "$as_me:28537: checking for slang2 header file" >&5
28538echo $ECHO_N "checking for slang2 header file... $ECHO_C" >&6
28539if test "${cf_cv_slang2_header+set}" = set; then
28540  echo $ECHO_N "(cached) $ECHO_C" >&6
28541else
28542
28543	cf_cv_slang2_header=no
28544	cat >"conftest.$ac_ext" <<_ACEOF
28545#line 28545 "configure"
28546#include "confdefs.h"
28547#include <slang.h>
28548int
28549main (void)
28550{
28551printf("%s\\n", SLANG_VERSION)
28552  ;
28553  return 0;
28554}
28555_ACEOF
28556rm -f "conftest.$ac_objext"
28557if { (eval echo "$as_me:28557: \"$ac_compile\"") >&5
28558  (eval $ac_compile) 2>&5
28559  ac_status=$?
28560  echo "$as_me:28560: \$? = $ac_status" >&5
28561  (exit "$ac_status"); } &&
28562         { ac_try='test -s "conftest.$ac_objext"'
28563  { (eval echo "$as_me:28563: \"$ac_try\"") >&5
28564  (eval $ac_try) 2>&5
28565  ac_status=$?
28566  echo "$as_me:28566: \$? = $ac_status" >&5
28567  (exit "$ac_status"); }; }; then
28568  cf_cv_slang2_header=predefined
28569else
28570  echo "$as_me: failed program was:" >&5
28571cat "conftest.$ac_ext" >&5
28572
28573cf_search=
28574
28575# collect the current set of include-directories from compiler flags
28576cf_header_path_list=""
28577if test -n "${CFLAGS}${CPPFLAGS}" ; then
28578	for cf_header_path in $CPPFLAGS $CFLAGS
28579	do
28580		case "$cf_header_path" in
28581		(-I*)
28582			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
28583
28584test "x$cf_header_path" != "xNONE" && \
28585test -d "$cf_header_path" && \
28586 {
28587	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
28588	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
28589	test -d "$cf_header_path/include/slang2" &&       cf_search="$cf_search $cf_header_path/include/slang2"
28590	test -d "$cf_header_path/include/slang2/include" &&    cf_search="$cf_search $cf_header_path/include/slang2/include"
28591	test -d "$cf_header_path/slang2/include" &&       cf_search="$cf_search $cf_header_path/slang2/include"
28592	test -d "$cf_header_path/slang2/include/slang2" &&    cf_search="$cf_search $cf_header_path/slang2/include/slang2"
28593}
28594
28595			cf_header_path_list="$cf_header_path_list $cf_search"
28596			;;
28597		esac
28598	done
28599fi
28600
28601# add the variations for the package we are looking for
28602
28603cf_search=
28604
28605test "x$prefix" != "xNONE" && \
28606test -d "$prefix" && \
28607 {
28608	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
28609	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
28610	test -d "$prefix/include/slang2" &&       cf_search="$cf_search $prefix/include/slang2"
28611	test -d "$prefix/include/slang2/include" &&    cf_search="$cf_search $prefix/include/slang2/include"
28612	test -d "$prefix/slang2/include" &&       cf_search="$cf_search $prefix/slang2/include"
28613	test -d "$prefix/slang2/include/slang2" &&    cf_search="$cf_search $prefix/slang2/include/slang2"
28614}
28615
28616for cf_subdir_prefix in \
28617	/usr \
28618	/usr/local \
28619	/usr/pkg \
28620	/opt \
28621	/opt/local \
28622	$HOME
28623do
28624
28625test "x$cf_subdir_prefix" != "x$prefix" && \
28626test -d "$cf_subdir_prefix" && \
28627{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
28628	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
28629	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
28630	test -d "$cf_subdir_prefix/include/slang2" &&       cf_search="$cf_search $cf_subdir_prefix/include/slang2"
28631	test -d "$cf_subdir_prefix/include/slang2/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/slang2/include"
28632	test -d "$cf_subdir_prefix/slang2/include" &&       cf_search="$cf_search $cf_subdir_prefix/slang2/include"
28633	test -d "$cf_subdir_prefix/slang2/include/slang2" &&    cf_search="$cf_search $cf_subdir_prefix/slang2/include/slang2"
28634}
28635
28636done
28637
28638test "$includedir" != NONE && \
28639test "$includedir" != "/usr/include" && \
28640test -d "$includedir" && {
28641	test -d "$includedir" &&    cf_search="$cf_search $includedir"
28642	test -d "$includedir/slang2" && cf_search="$cf_search $includedir/slang2"
28643}
28644
28645test "$oldincludedir" != NONE && \
28646test "$oldincludedir" != "/usr/include" && \
28647test -d "$oldincludedir" && {
28648	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
28649	test -d "$oldincludedir/slang2" && cf_search="$cf_search $oldincludedir/slang2"
28650}
28651
28652cf_search="$cf_search $cf_header_path_list"
28653
28654	for cf_incdir in $cf_search
28655	do
28656		for cf_header in \
28657			slang.h
28658		do
28659			echo trying "$cf_incdir/$cf_header" 1>&5
28660			if ${EGREP-egrep} "SLANG_VERSION" "$cf_incdir/$cf_header" 1>&5 2>&1; then
28661				cf_cv_slang2_header=$cf_incdir/$cf_header
28662				break
28663			fi
28664		done
28665		test "$cf_cv_slang2_header" != no && break
28666	done
28667
28668fi
28669rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28670fi
28671echo "$as_me:28671: result: $cf_cv_slang2_header" >&5
28672echo "${ECHO_T}$cf_cv_slang2_header" >&6
28673
28674if test "x$cf_cv_slang2_header" != xno
28675then
28676
28677cat >>confdefs.h <<\EOF
28678#define USE_SLANG 1
28679EOF
28680
28681	cf_incdir=`echo "$cf_cv_slang2_header" | sed -e 's%/[^/]*$%%'`
28682
28683	case "$cf_cv_slang2_header" in
28684	(predefined)
28685		;;
28686	(*)
28687
28688if test -n "$cf_incdir" ; then
28689  for cf_add_incdir in $cf_incdir
28690  do
28691	while test "$cf_add_incdir" != /usr/include
28692	do
28693	  if test -d "$cf_add_incdir"
28694	  then
28695		cf_have_incdir=no
28696		if test -n "$CFLAGS$CPPFLAGS" ; then
28697		  # a loop is needed to ensure we can add subdirs of existing dirs
28698		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
28699			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
28700			  cf_have_incdir=yes; break
28701			fi
28702		  done
28703		fi
28704
28705		if test "$cf_have_incdir" = no ; then
28706		  if test "$cf_add_incdir" = /usr/local/include ; then
28707			if test "$GCC" = yes
28708			then
28709			  cf_save_CPPFLAGS=$CPPFLAGS
28710
28711	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
28712	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
28713
28714			  cat >"conftest.$ac_ext" <<_ACEOF
28715#line 28715 "configure"
28716#include "confdefs.h"
28717#include <stdio.h>
28718int
28719main (void)
28720{
28721printf("Hello")
28722  ;
28723  return 0;
28724}
28725_ACEOF
28726rm -f "conftest.$ac_objext"
28727if { (eval echo "$as_me:28727: \"$ac_compile\"") >&5
28728  (eval $ac_compile) 2>&5
28729  ac_status=$?
28730  echo "$as_me:28730: \$? = $ac_status" >&5
28731  (exit "$ac_status"); } &&
28732         { ac_try='test -s "conftest.$ac_objext"'
28733  { (eval echo "$as_me:28733: \"$ac_try\"") >&5
28734  (eval $ac_try) 2>&5
28735  ac_status=$?
28736  echo "$as_me:28736: \$? = $ac_status" >&5
28737  (exit "$ac_status"); }; }; then
28738  :
28739else
28740  echo "$as_me: failed program was:" >&5
28741cat "conftest.$ac_ext" >&5
28742cf_have_incdir=yes
28743fi
28744rm -f "conftest.$ac_objext" "conftest.$ac_ext"
28745			  CPPFLAGS=$cf_save_CPPFLAGS
28746			fi
28747		  fi
28748		fi
28749
28750		if test "$cf_have_incdir" = no ; then
28751		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
28752
28753echo "${as_me:-configure}:28753: testing adding $cf_add_incdir to include-path ..." 1>&5
28754
28755		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
28756
28757		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
28758		  test "$cf_top_incdir" = "$cf_add_incdir" && break
28759		  cf_add_incdir="$cf_top_incdir"
28760		else
28761		  break
28762		fi
28763	  else
28764		break
28765	  fi
28766	done
28767  done
28768fi
28769
28770		;;
28771	esac
28772fi
28773
28774	if test "x$cf_cv_slang2_header" != xno
28775	then
28776
28777cf_slang_LIBS1="$LIBS"
28778
28779if test "${cf_cv_termlib+set}" = set; then
28780  echo $ECHO_N "(cached) $ECHO_C" >&6
28781else
28782
28783cf_cv_termlib=none
28784cat >"conftest.$ac_ext" <<_ACEOF
28785#line 28785 "configure"
28786#include "confdefs.h"
28787
28788int
28789main (void)
28790{
28791char *x=(char*)tgoto("",0,0)
28792  ;
28793  return 0;
28794}
28795_ACEOF
28796rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28797if { (eval echo "$as_me:28797: \"$ac_link\"") >&5
28798  (eval $ac_link) 2>&5
28799  ac_status=$?
28800  echo "$as_me:28800: \$? = $ac_status" >&5
28801  (exit "$ac_status"); } &&
28802         { ac_try='test -s "conftest$ac_exeext"'
28803  { (eval echo "$as_me:28803: \"$ac_try\"") >&5
28804  (eval $ac_try) 2>&5
28805  ac_status=$?
28806  echo "$as_me:28806: \$? = $ac_status" >&5
28807  (exit "$ac_status"); }; }; then
28808  cat >"conftest.$ac_ext" <<_ACEOF
28809#line 28809 "configure"
28810#include "confdefs.h"
28811
28812int
28813main (void)
28814{
28815int x=tigetstr("")
28816  ;
28817  return 0;
28818}
28819_ACEOF
28820rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28821if { (eval echo "$as_me:28821: \"$ac_link\"") >&5
28822  (eval $ac_link) 2>&5
28823  ac_status=$?
28824  echo "$as_me:28824: \$? = $ac_status" >&5
28825  (exit "$ac_status"); } &&
28826         { ac_try='test -s "conftest$ac_exeext"'
28827  { (eval echo "$as_me:28827: \"$ac_try\"") >&5
28828  (eval $ac_try) 2>&5
28829  ac_status=$?
28830  echo "$as_me:28830: \$? = $ac_status" >&5
28831  (exit "$ac_status"); }; }; then
28832  cf_cv_termlib=terminfo
28833else
28834  echo "$as_me: failed program was:" >&5
28835cat "conftest.$ac_ext" >&5
28836cf_cv_termlib=termcap
28837fi
28838rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28839	test -n "$verbose" && echo "	using functions in predefined $cf_cv_termlib LIBS" 1>&6
28840
28841echo "${as_me:-configure}:28841: testing using functions in predefined $cf_cv_termlib LIBS ..." 1>&5
28842
28843else
28844  echo "$as_me: failed program was:" >&5
28845cat "conftest.$ac_ext" >&5
28846
28847if test "$cf_cv_termlib" = none; then
28848	# FreeBSD's linker gives bogus results for AC_CHECK_LIB, saying that
28849	# tgetstr lives in -lcurses when it is only an unsatisfied extern.
28850	cf_save_LIBS="$LIBS"
28851	for cf_lib in tinfo curses ncurses termlib termcap
28852	do
28853		LIBS="-l$cf_lib $cf_save_LIBS"
28854		for cf_func in tigetstr tgetstr
28855		do
28856			echo "$as_me:28856: checking for $cf_func in -l$cf_lib" >&5
28857echo $ECHO_N "checking for $cf_func in -l$cf_lib... $ECHO_C" >&6
28858			cat >"conftest.$ac_ext" <<_ACEOF
28859#line 28859 "configure"
28860#include "confdefs.h"
28861
28862int
28863main (void)
28864{
28865int x=$cf_func("")
28866  ;
28867  return 0;
28868}
28869_ACEOF
28870rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28871if { (eval echo "$as_me:28871: \"$ac_link\"") >&5
28872  (eval $ac_link) 2>&5
28873  ac_status=$?
28874  echo "$as_me:28874: \$? = $ac_status" >&5
28875  (exit "$ac_status"); } &&
28876         { ac_try='test -s "conftest$ac_exeext"'
28877  { (eval echo "$as_me:28877: \"$ac_try\"") >&5
28878  (eval $ac_try) 2>&5
28879  ac_status=$?
28880  echo "$as_me:28880: \$? = $ac_status" >&5
28881  (exit "$ac_status"); }; }; then
28882  cf_result=yes
28883else
28884  echo "$as_me: failed program was:" >&5
28885cat "conftest.$ac_ext" >&5
28886cf_result=no
28887fi
28888rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28889			echo "$as_me:28889: result: $cf_result" >&5
28890echo "${ECHO_T}$cf_result" >&6
28891			if test "$cf_result" = yes ; then
28892				if test "$cf_func" = tigetstr ; then
28893					cf_cv_termlib=terminfo
28894				else
28895					cf_cv_termlib=termcap
28896				fi
28897				break
28898			fi
28899		done
28900		test "$cf_result" = yes && break
28901	done
28902	test "$cf_result" = no && LIBS="$cf_save_LIBS"
28903fi
28904if test "$cf_cv_termlib" = none; then
28905	# allow curses library for broken AIX system.
28906	echo "$as_me:28906: checking for initscr in -lcurses" >&5
28907echo $ECHO_N "checking for initscr in -lcurses... $ECHO_C" >&6
28908if test "${ac_cv_lib_curses_initscr+set}" = set; then
28909  echo $ECHO_N "(cached) $ECHO_C" >&6
28910else
28911  ac_check_lib_save_LIBS=$LIBS
28912LIBS="-lcurses  $LIBS"
28913cat >"conftest.$ac_ext" <<_ACEOF
28914#line 28914 "configure"
28915#include "confdefs.h"
28916
28917/* Override any gcc2 internal prototype to avoid an error.  */
28918#ifdef __cplusplus
28919extern "C"
28920#endif
28921/* We use char because int might match the return type of a gcc2
28922   builtin and then its argument prototype would still apply.  */
28923char initscr ();
28924int
28925main (void)
28926{
28927initscr ();
28928  ;
28929  return 0;
28930}
28931_ACEOF
28932rm -f "conftest.$ac_objext" "conftest$ac_exeext"
28933if { (eval echo "$as_me:28933: \"$ac_link\"") >&5
28934  (eval $ac_link) 2>&5
28935  ac_status=$?
28936  echo "$as_me:28936: \$? = $ac_status" >&5
28937  (exit "$ac_status"); } &&
28938         { ac_try='test -s "conftest$ac_exeext"'
28939  { (eval echo "$as_me:28939: \"$ac_try\"") >&5
28940  (eval $ac_try) 2>&5
28941  ac_status=$?
28942  echo "$as_me:28942: \$? = $ac_status" >&5
28943  (exit "$ac_status"); }; }; then
28944  ac_cv_lib_curses_initscr=yes
28945else
28946  echo "$as_me: failed program was:" >&5
28947cat "conftest.$ac_ext" >&5
28948ac_cv_lib_curses_initscr=no
28949fi
28950rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
28951LIBS=$ac_check_lib_save_LIBS
28952fi
28953echo "$as_me:28953: result: $ac_cv_lib_curses_initscr" >&5
28954echo "${ECHO_T}$ac_cv_lib_curses_initscr" >&6
28955if test "$ac_cv_lib_curses_initscr" = yes; then
28956
28957cf_add_libs="$LIBS"
28958# reverse order
28959cf_add_0lib=
28960for cf_add_1lib in -lcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
28961# filter duplicates
28962for cf_add_1lib in $cf_add_0lib; do
28963	for cf_add_2lib in $cf_add_libs; do
28964		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
28965			cf_add_1lib=
28966			break
28967		fi
28968	done
28969	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
28970done
28971LIBS="$cf_add_libs"
28972
28973fi
28974
28975	echo "$as_me:28975: checking for tgoto in -ltermcap" >&5
28976echo $ECHO_N "checking for tgoto in -ltermcap... $ECHO_C" >&6
28977if test "${ac_cv_lib_termcap_tgoto+set}" = set; then
28978  echo $ECHO_N "(cached) $ECHO_C" >&6
28979else
28980  ac_check_lib_save_LIBS=$LIBS
28981LIBS="-ltermcap  $LIBS"
28982cat >"conftest.$ac_ext" <<_ACEOF
28983#line 28983 "configure"
28984#include "confdefs.h"
28985
28986/* Override any gcc2 internal prototype to avoid an error.  */
28987#ifdef __cplusplus
28988extern "C"
28989#endif
28990/* We use char because int might match the return type of a gcc2
28991   builtin and then its argument prototype would still apply.  */
28992char tgoto ();
28993int
28994main (void)
28995{
28996tgoto ();
28997  ;
28998  return 0;
28999}
29000_ACEOF
29001rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29002if { (eval echo "$as_me:29002: \"$ac_link\"") >&5
29003  (eval $ac_link) 2>&5
29004  ac_status=$?
29005  echo "$as_me:29005: \$? = $ac_status" >&5
29006  (exit "$ac_status"); } &&
29007         { ac_try='test -s "conftest$ac_exeext"'
29008  { (eval echo "$as_me:29008: \"$ac_try\"") >&5
29009  (eval $ac_try) 2>&5
29010  ac_status=$?
29011  echo "$as_me:29011: \$? = $ac_status" >&5
29012  (exit "$ac_status"); }; }; then
29013  ac_cv_lib_termcap_tgoto=yes
29014else
29015  echo "$as_me: failed program was:" >&5
29016cat "conftest.$ac_ext" >&5
29017ac_cv_lib_termcap_tgoto=no
29018fi
29019rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29020LIBS=$ac_check_lib_save_LIBS
29021fi
29022echo "$as_me:29022: result: $ac_cv_lib_termcap_tgoto" >&5
29023echo "${ECHO_T}$ac_cv_lib_termcap_tgoto" >&6
29024if test "$ac_cv_lib_termcap_tgoto" = yes; then
29025
29026cf_add_libs="$LIBS"
29027# reverse order
29028cf_add_0lib=
29029for cf_add_1lib in -ltermcap; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
29030# filter duplicates
29031for cf_add_1lib in $cf_add_0lib; do
29032	for cf_add_2lib in $cf_add_libs; do
29033		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
29034			cf_add_1lib=
29035			break
29036		fi
29037	done
29038	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
29039done
29040LIBS="$cf_add_libs"
29041 cf_cv_termlib=termcap
29042fi
29043
29044fi
29045
29046fi
29047rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29048if test "$cf_cv_termlib" = none; then
29049	{ echo "$as_me:29049: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&5
29050echo "$as_me: WARNING: Cannot find -ltermlib, -lcurses, or -ltermcap" >&2;}
29051fi
29052
29053fi
29054
29055cf_slang_LIBS2="$LIBS"
29056echo "$as_me:29056: checking for acos" >&5
29057echo $ECHO_N "checking for acos... $ECHO_C" >&6
29058if test "${ac_cv_func_acos+set}" = set; then
29059  echo $ECHO_N "(cached) $ECHO_C" >&6
29060else
29061  cat >"conftest.$ac_ext" <<_ACEOF
29062#line 29062 "configure"
29063#include "confdefs.h"
29064#define acos autoconf_temporary
29065#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
29066#undef acos
29067
29068#ifdef __cplusplus
29069extern "C"
29070#endif
29071
29072/* We use char because int might match the return type of a gcc2
29073   builtin and then its argument prototype would still apply.  */
29074char acos (void);
29075
29076int
29077main (void)
29078{
29079
29080/* The GNU C library defines stubs for functions which it implements
29081    to always fail with ENOSYS.  Some functions are actually named
29082    something starting with __ and the normal name is an alias.  */
29083#if defined (__stub_acos) || defined (__stub___acos)
29084#error found stub for acos
29085#endif
29086
29087	return acos ();
29088  ;
29089  return 0;
29090}
29091_ACEOF
29092rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29093if { (eval echo "$as_me:29093: \"$ac_link\"") >&5
29094  (eval $ac_link) 2>&5
29095  ac_status=$?
29096  echo "$as_me:29096: \$? = $ac_status" >&5
29097  (exit "$ac_status"); } &&
29098         { ac_try='test -s "conftest$ac_exeext"'
29099  { (eval echo "$as_me:29099: \"$ac_try\"") >&5
29100  (eval $ac_try) 2>&5
29101  ac_status=$?
29102  echo "$as_me:29102: \$? = $ac_status" >&5
29103  (exit "$ac_status"); }; }; then
29104  ac_cv_func_acos=yes
29105else
29106  echo "$as_me: failed program was:" >&5
29107cat "conftest.$ac_ext" >&5
29108ac_cv_func_acos=no
29109fi
29110rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29111fi
29112echo "$as_me:29112: result: $ac_cv_func_acos" >&5
29113echo "${ECHO_T}$ac_cv_func_acos" >&6
29114if test "$ac_cv_func_acos" = yes; then
29115  :
29116else
29117
29118echo "$as_me:29118: checking for acos in -lm" >&5
29119echo $ECHO_N "checking for acos in -lm... $ECHO_C" >&6
29120if test "${ac_cv_lib_m_acos+set}" = set; then
29121  echo $ECHO_N "(cached) $ECHO_C" >&6
29122else
29123  ac_check_lib_save_LIBS=$LIBS
29124LIBS="-lm $LIBS $LIBS"
29125cat >"conftest.$ac_ext" <<_ACEOF
29126#line 29126 "configure"
29127#include "confdefs.h"
29128
29129/* Override any gcc2 internal prototype to avoid an error.  */
29130#ifdef __cplusplus
29131extern "C"
29132#endif
29133/* We use char because int might match the return type of a gcc2
29134   builtin and then its argument prototype would still apply.  */
29135char acos ();
29136int
29137main (void)
29138{
29139acos ();
29140  ;
29141  return 0;
29142}
29143_ACEOF
29144rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29145if { (eval echo "$as_me:29145: \"$ac_link\"") >&5
29146  (eval $ac_link) 2>&5
29147  ac_status=$?
29148  echo "$as_me:29148: \$? = $ac_status" >&5
29149  (exit "$ac_status"); } &&
29150         { ac_try='test -s "conftest$ac_exeext"'
29151  { (eval echo "$as_me:29151: \"$ac_try\"") >&5
29152  (eval $ac_try) 2>&5
29153  ac_status=$?
29154  echo "$as_me:29154: \$? = $ac_status" >&5
29155  (exit "$ac_status"); }; }; then
29156  ac_cv_lib_m_acos=yes
29157else
29158  echo "$as_me: failed program was:" >&5
29159cat "conftest.$ac_ext" >&5
29160ac_cv_lib_m_acos=no
29161fi
29162rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29163LIBS=$ac_check_lib_save_LIBS
29164fi
29165echo "$as_me:29165: result: $ac_cv_lib_m_acos" >&5
29166echo "${ECHO_T}$ac_cv_lib_m_acos" >&6
29167if test "$ac_cv_lib_m_acos" = yes; then
29168
29169cf_tr_func=`echo "acos" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
29170
29171	cat >>confdefs.h <<EOF
29172#define HAVE_$cf_tr_func 1
29173EOF
29174
29175	ac_cv_func_acos=yes
29176	if test "$cf_used_lib_m" != yes ; then cf_used_lib_m=yes; LIBS="-lm $LIBS"; fi
29177else
29178
29179	ac_cv_func_acos=unknown
29180	unset ac_cv_func_acos 2>/dev/null
29181
29182fi
29183
29184fi
29185
29186case "$host_os" in
29187(os2*)
29188
29189	eval 'cf_cv_have_lib_'"video"'=no'
29190	cf_libdir=""
29191	echo "$as_me:29191: checking for v_init" >&5
29192echo $ECHO_N "checking for v_init... $ECHO_C" >&6
29193if test "${ac_cv_func_v_init+set}" = set; then
29194  echo $ECHO_N "(cached) $ECHO_C" >&6
29195else
29196  cat >"conftest.$ac_ext" <<_ACEOF
29197#line 29197 "configure"
29198#include "confdefs.h"
29199#define v_init autoconf_temporary
29200#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
29201#undef v_init
29202
29203#ifdef __cplusplus
29204extern "C"
29205#endif
29206
29207/* We use char because int might match the return type of a gcc2
29208   builtin and then its argument prototype would still apply.  */
29209char v_init (void);
29210
29211int
29212main (void)
29213{
29214
29215/* The GNU C library defines stubs for functions which it implements
29216    to always fail with ENOSYS.  Some functions are actually named
29217    something starting with __ and the normal name is an alias.  */
29218#if defined (__stub_v_init) || defined (__stub___v_init)
29219#error found stub for v_init
29220#endif
29221
29222	return v_init ();
29223  ;
29224  return 0;
29225}
29226_ACEOF
29227rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29228if { (eval echo "$as_me:29228: \"$ac_link\"") >&5
29229  (eval $ac_link) 2>&5
29230  ac_status=$?
29231  echo "$as_me:29231: \$? = $ac_status" >&5
29232  (exit "$ac_status"); } &&
29233         { ac_try='test -s "conftest$ac_exeext"'
29234  { (eval echo "$as_me:29234: \"$ac_try\"") >&5
29235  (eval $ac_try) 2>&5
29236  ac_status=$?
29237  echo "$as_me:29237: \$? = $ac_status" >&5
29238  (exit "$ac_status"); }; }; then
29239  ac_cv_func_v_init=yes
29240else
29241  echo "$as_me: failed program was:" >&5
29242cat "conftest.$ac_ext" >&5
29243ac_cv_func_v_init=no
29244fi
29245rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29246fi
29247echo "$as_me:29247: result: $ac_cv_func_v_init" >&5
29248echo "${ECHO_T}$ac_cv_func_v_init" >&6
29249if test "$ac_cv_func_v_init" = yes; then
29250  eval 'cf_cv_have_lib_'"video"'=yes'
29251else
29252
29253		cf_save_LIBS="$LIBS"
29254		echo "$as_me:29254: checking for v_init in -lvideo" >&5
29255echo $ECHO_N "checking for v_init in -lvideo... $ECHO_C" >&6
29256		LIBS="-lvideo $LIBS"
29257		cat >"conftest.$ac_ext" <<_ACEOF
29258#line 29258 "configure"
29259#include "confdefs.h"
29260#include <sys/video.h>
29261int
29262main (void)
29263{
29264v_init()
29265  ;
29266  return 0;
29267}
29268_ACEOF
29269rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29270if { (eval echo "$as_me:29270: \"$ac_link\"") >&5
29271  (eval $ac_link) 2>&5
29272  ac_status=$?
29273  echo "$as_me:29273: \$? = $ac_status" >&5
29274  (exit "$ac_status"); } &&
29275         { ac_try='test -s "conftest$ac_exeext"'
29276  { (eval echo "$as_me:29276: \"$ac_try\"") >&5
29277  (eval $ac_try) 2>&5
29278  ac_status=$?
29279  echo "$as_me:29279: \$? = $ac_status" >&5
29280  (exit "$ac_status"); }; }; then
29281  echo "$as_me:29281: result: yes" >&5
29282echo "${ECHO_T}yes" >&6
29283			 eval 'cf_cv_have_lib_'"video"'=yes'
29284
29285else
29286  echo "$as_me: failed program was:" >&5
29287cat "conftest.$ac_ext" >&5
29288echo "$as_me:29288: result: no" >&5
29289echo "${ECHO_T}no" >&6
29290
29291cf_search=
29292cf_library_path_list=""
29293if test -n "${LDFLAGS}${LIBS}" ; then
29294	for cf_library_path in $LDFLAGS $LIBS
29295	do
29296		case "$cf_library_path" in
29297		(-L*)
29298			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
29299
29300test "x$cf_library_path" != "xNONE" && \
29301test -d "$cf_library_path" && \
29302 {
29303	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
29304	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
29305	test -d "$cf_library_path/lib/video" &&       cf_search="$cf_search $cf_library_path/lib/video"
29306	test -d "$cf_library_path/lib/video/lib" &&    cf_search="$cf_search $cf_library_path/lib/video/lib"
29307	test -d "$cf_library_path/video/lib" &&       cf_search="$cf_search $cf_library_path/video/lib"
29308	test -d "$cf_library_path/video/lib/video" &&    cf_search="$cf_search $cf_library_path/video/lib/video"
29309}
29310
29311			cf_library_path_list="$cf_library_path_list $cf_search"
29312			;;
29313		esac
29314	done
29315fi
29316
29317cf_search=
29318
29319test "x$prefix" != "xNONE" && \
29320test -d "$prefix" && \
29321 {
29322	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
29323	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
29324	test -d "$prefix/lib/video" &&       cf_search="$cf_search $prefix/lib/video"
29325	test -d "$prefix/lib/video/lib" &&    cf_search="$cf_search $prefix/lib/video/lib"
29326	test -d "$prefix/video/lib" &&       cf_search="$cf_search $prefix/video/lib"
29327	test -d "$prefix/video/lib/video" &&    cf_search="$cf_search $prefix/video/lib/video"
29328}
29329
29330for cf_subdir_prefix in \
29331	/usr \
29332	/usr/local \
29333	/usr/pkg \
29334	/opt \
29335	/opt/local \
29336	$HOME
29337do
29338
29339test "x$cf_subdir_prefix" != "x$prefix" && \
29340test -d "$cf_subdir_prefix" && \
29341{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
29342	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
29343	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
29344	test -d "$cf_subdir_prefix/lib/video" &&       cf_search="$cf_search $cf_subdir_prefix/lib/video"
29345	test -d "$cf_subdir_prefix/lib/video/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/video/lib"
29346	test -d "$cf_subdir_prefix/video/lib" &&       cf_search="$cf_search $cf_subdir_prefix/video/lib"
29347	test -d "$cf_subdir_prefix/video/lib/video" &&    cf_search="$cf_search $cf_subdir_prefix/video/lib/video"
29348}
29349
29350done
29351
29352cf_search="$cf_library_path_list $cf_search"
29353
29354			for cf_libdir in $cf_search
29355			do
29356				echo "$as_me:29356: checking for -lvideo in $cf_libdir" >&5
29357echo $ECHO_N "checking for -lvideo in $cf_libdir... $ECHO_C" >&6
29358				LIBS="-L$cf_libdir -lvideo $cf_save_LIBS"
29359				cat >"conftest.$ac_ext" <<_ACEOF
29360#line 29360 "configure"
29361#include "confdefs.h"
29362#include <sys/video.h>
29363int
29364main (void)
29365{
29366v_init()
29367  ;
29368  return 0;
29369}
29370_ACEOF
29371rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29372if { (eval echo "$as_me:29372: \"$ac_link\"") >&5
29373  (eval $ac_link) 2>&5
29374  ac_status=$?
29375  echo "$as_me:29375: \$? = $ac_status" >&5
29376  (exit "$ac_status"); } &&
29377         { ac_try='test -s "conftest$ac_exeext"'
29378  { (eval echo "$as_me:29378: \"$ac_try\"") >&5
29379  (eval $ac_try) 2>&5
29380  ac_status=$?
29381  echo "$as_me:29381: \$? = $ac_status" >&5
29382  (exit "$ac_status"); }; }; then
29383  echo "$as_me:29383: result: yes" >&5
29384echo "${ECHO_T}yes" >&6
29385			 		 eval 'cf_cv_have_lib_'"video"'=yes'
29386					 break
29387else
29388  echo "$as_me: failed program was:" >&5
29389cat "conftest.$ac_ext" >&5
29390echo "$as_me:29390: result: no" >&5
29391echo "${ECHO_T}no" >&6
29392					 LIBS="$cf_save_LIBS"
29393fi
29394rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29395			done
29396
29397fi
29398rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29399
29400fi
29401
29402eval 'cf_found_library="$cf_cv_have_lib_'"video"\"
29403
29404if test "$cf_found_library" = no ; then
29405	{ { echo "$as_me:29405: error: Cannot link video library" >&5
29406echo "$as_me: error: Cannot link video library" >&2;}
29407   { (exit 1); exit 1; }; }
29408fi
29409
29410	;;
29411esac
29412
29413	eval 'cf_cv_have_lib_'"slang2"'=no'
29414	cf_libdir=""
29415	echo "$as_me:29415: checking for SLtt_get_screen_size" >&5
29416echo $ECHO_N "checking for SLtt_get_screen_size... $ECHO_C" >&6
29417if test "${ac_cv_func_SLtt_get_screen_size+set}" = set; then
29418  echo $ECHO_N "(cached) $ECHO_C" >&6
29419else
29420  cat >"conftest.$ac_ext" <<_ACEOF
29421#line 29421 "configure"
29422#include "confdefs.h"
29423#define SLtt_get_screen_size autoconf_temporary
29424#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
29425#undef SLtt_get_screen_size
29426
29427#ifdef __cplusplus
29428extern "C"
29429#endif
29430
29431/* We use char because int might match the return type of a gcc2
29432   builtin and then its argument prototype would still apply.  */
29433char SLtt_get_screen_size (void);
29434
29435int
29436main (void)
29437{
29438
29439/* The GNU C library defines stubs for functions which it implements
29440    to always fail with ENOSYS.  Some functions are actually named
29441    something starting with __ and the normal name is an alias.  */
29442#if defined (__stub_SLtt_get_screen_size) || defined (__stub___SLtt_get_screen_size)
29443#error found stub for SLtt_get_screen_size
29444#endif
29445
29446	return SLtt_get_screen_size ();
29447  ;
29448  return 0;
29449}
29450_ACEOF
29451rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29452if { (eval echo "$as_me:29452: \"$ac_link\"") >&5
29453  (eval $ac_link) 2>&5
29454  ac_status=$?
29455  echo "$as_me:29455: \$? = $ac_status" >&5
29456  (exit "$ac_status"); } &&
29457         { ac_try='test -s "conftest$ac_exeext"'
29458  { (eval echo "$as_me:29458: \"$ac_try\"") >&5
29459  (eval $ac_try) 2>&5
29460  ac_status=$?
29461  echo "$as_me:29461: \$? = $ac_status" >&5
29462  (exit "$ac_status"); }; }; then
29463  ac_cv_func_SLtt_get_screen_size=yes
29464else
29465  echo "$as_me: failed program was:" >&5
29466cat "conftest.$ac_ext" >&5
29467ac_cv_func_SLtt_get_screen_size=no
29468fi
29469rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29470fi
29471echo "$as_me:29471: result: $ac_cv_func_SLtt_get_screen_size" >&5
29472echo "${ECHO_T}$ac_cv_func_SLtt_get_screen_size" >&6
29473if test "$ac_cv_func_SLtt_get_screen_size" = yes; then
29474  eval 'cf_cv_have_lib_'"slang2"'=yes'
29475else
29476
29477		cf_save_LIBS="$LIBS"
29478		echo "$as_me:29478: checking for SLtt_get_screen_size in -lslang2" >&5
29479echo $ECHO_N "checking for SLtt_get_screen_size in -lslang2... $ECHO_C" >&6
29480		LIBS="-lslang2 $LIBS"
29481		cat >"conftest.$ac_ext" <<_ACEOF
29482#line 29482 "configure"
29483#include "confdefs.h"
29484#include <slang.h>
29485int
29486main (void)
29487{
29488SLtt_get_screen_size()
29489  ;
29490  return 0;
29491}
29492_ACEOF
29493rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29494if { (eval echo "$as_me:29494: \"$ac_link\"") >&5
29495  (eval $ac_link) 2>&5
29496  ac_status=$?
29497  echo "$as_me:29497: \$? = $ac_status" >&5
29498  (exit "$ac_status"); } &&
29499         { ac_try='test -s "conftest$ac_exeext"'
29500  { (eval echo "$as_me:29500: \"$ac_try\"") >&5
29501  (eval $ac_try) 2>&5
29502  ac_status=$?
29503  echo "$as_me:29503: \$? = $ac_status" >&5
29504  (exit "$ac_status"); }; }; then
29505  echo "$as_me:29505: result: yes" >&5
29506echo "${ECHO_T}yes" >&6
29507			 eval 'cf_cv_have_lib_'"slang2"'=yes'
29508
29509else
29510  echo "$as_me: failed program was:" >&5
29511cat "conftest.$ac_ext" >&5
29512echo "$as_me:29512: result: no" >&5
29513echo "${ECHO_T}no" >&6
29514
29515cf_search=
29516cf_library_path_list=""
29517if test -n "${LDFLAGS}${LIBS}" ; then
29518	for cf_library_path in $LDFLAGS $LIBS
29519	do
29520		case "$cf_library_path" in
29521		(-L*)
29522			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
29523
29524test "x$cf_library_path" != "xNONE" && \
29525test -d "$cf_library_path" && \
29526 {
29527	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
29528	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
29529	test -d "$cf_library_path/lib/slang2" &&       cf_search="$cf_search $cf_library_path/lib/slang2"
29530	test -d "$cf_library_path/lib/slang2/lib" &&    cf_search="$cf_search $cf_library_path/lib/slang2/lib"
29531	test -d "$cf_library_path/slang2/lib" &&       cf_search="$cf_search $cf_library_path/slang2/lib"
29532	test -d "$cf_library_path/slang2/lib/slang2" &&    cf_search="$cf_search $cf_library_path/slang2/lib/slang2"
29533}
29534
29535			cf_library_path_list="$cf_library_path_list $cf_search"
29536			;;
29537		esac
29538	done
29539fi
29540
29541cf_search=
29542
29543test "x$prefix" != "xNONE" && \
29544test -d "$prefix" && \
29545 {
29546	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
29547	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
29548	test -d "$prefix/lib/slang2" &&       cf_search="$cf_search $prefix/lib/slang2"
29549	test -d "$prefix/lib/slang2/lib" &&    cf_search="$cf_search $prefix/lib/slang2/lib"
29550	test -d "$prefix/slang2/lib" &&       cf_search="$cf_search $prefix/slang2/lib"
29551	test -d "$prefix/slang2/lib/slang2" &&    cf_search="$cf_search $prefix/slang2/lib/slang2"
29552}
29553
29554for cf_subdir_prefix in \
29555	/usr \
29556	/usr/local \
29557	/usr/pkg \
29558	/opt \
29559	/opt/local \
29560	$HOME
29561do
29562
29563test "x$cf_subdir_prefix" != "x$prefix" && \
29564test -d "$cf_subdir_prefix" && \
29565{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
29566	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
29567	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
29568	test -d "$cf_subdir_prefix/lib/slang2" &&       cf_search="$cf_search $cf_subdir_prefix/lib/slang2"
29569	test -d "$cf_subdir_prefix/lib/slang2/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/slang2/lib"
29570	test -d "$cf_subdir_prefix/slang2/lib" &&       cf_search="$cf_search $cf_subdir_prefix/slang2/lib"
29571	test -d "$cf_subdir_prefix/slang2/lib/slang2" &&    cf_search="$cf_search $cf_subdir_prefix/slang2/lib/slang2"
29572}
29573
29574done
29575
29576cf_search="$cf_library_path_list $cf_search"
29577
29578			for cf_libdir in $cf_search
29579			do
29580				echo "$as_me:29580: checking for -lslang2 in $cf_libdir" >&5
29581echo $ECHO_N "checking for -lslang2 in $cf_libdir... $ECHO_C" >&6
29582				LIBS="-L$cf_libdir -lslang2 $cf_save_LIBS"
29583				cat >"conftest.$ac_ext" <<_ACEOF
29584#line 29584 "configure"
29585#include "confdefs.h"
29586#include <slang.h>
29587int
29588main (void)
29589{
29590SLtt_get_screen_size()
29591  ;
29592  return 0;
29593}
29594_ACEOF
29595rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29596if { (eval echo "$as_me:29596: \"$ac_link\"") >&5
29597  (eval $ac_link) 2>&5
29598  ac_status=$?
29599  echo "$as_me:29599: \$? = $ac_status" >&5
29600  (exit "$ac_status"); } &&
29601         { ac_try='test -s "conftest$ac_exeext"'
29602  { (eval echo "$as_me:29602: \"$ac_try\"") >&5
29603  (eval $ac_try) 2>&5
29604  ac_status=$?
29605  echo "$as_me:29605: \$? = $ac_status" >&5
29606  (exit "$ac_status"); }; }; then
29607  echo "$as_me:29607: result: yes" >&5
29608echo "${ECHO_T}yes" >&6
29609			 		 eval 'cf_cv_have_lib_'"slang2"'=yes'
29610					 break
29611else
29612  echo "$as_me: failed program was:" >&5
29613cat "conftest.$ac_ext" >&5
29614echo "$as_me:29614: result: no" >&5
29615echo "${ECHO_T}no" >&6
29616					 LIBS="$cf_save_LIBS"
29617fi
29618rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29619			done
29620
29621fi
29622rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29623
29624fi
29625
29626eval 'cf_found_library="$cf_cv_have_lib_'"slang2"\"
29627
29628if test "$cf_found_library" = no ; then
29629	{ { echo "$as_me:29629: error: Cannot link slang2 library" >&5
29630echo "$as_me: error: Cannot link slang2 library" >&2;}
29631   { (exit 1); exit 1; }; }
29632fi
29633
29634cf_slang_LIBS3="$LIBS"
29635echo "$as_me:29635: checking if we can link slang2 without termcap" >&5
29636echo $ECHO_N "checking if we can link slang2 without termcap... $ECHO_C" >&6
29637if test -n "`echo "$cf_slang_LIBS1" | sed -e 's/ //g'`" ; then
29638	cf_exclude=`echo ".$cf_slang_LIBS2" | sed -e "s%$cf_slang_LIBS1%%" -e 's%^.%%'`
29639else
29640	cf_exclude="$cf_slang_LIBS2"
29641fi
29642LIBS=`echo ".$cf_slang_LIBS3" | sed -e "s%$cf_exclude%%" -e 's%^.%%'`
29643cat >"conftest.$ac_ext" <<_ACEOF
29644#line 29644 "configure"
29645#include "confdefs.h"
29646#include <slang.h>
29647int
29648main (void)
29649{
29650SLtt_get_screen_size()
29651  ;
29652  return 0;
29653}
29654_ACEOF
29655rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29656if { (eval echo "$as_me:29656: \"$ac_link\"") >&5
29657  (eval $ac_link) 2>&5
29658  ac_status=$?
29659  echo "$as_me:29659: \$? = $ac_status" >&5
29660  (exit "$ac_status"); } &&
29661         { ac_try='test -s "conftest$ac_exeext"'
29662  { (eval echo "$as_me:29662: \"$ac_try\"") >&5
29663  (eval $ac_try) 2>&5
29664  ac_status=$?
29665  echo "$as_me:29665: \$? = $ac_status" >&5
29666  (exit "$ac_status"); }; }; then
29667  cf_result=yes
29668else
29669  echo "$as_me: failed program was:" >&5
29670cat "conftest.$ac_ext" >&5
29671cf_result=no
29672fi
29673rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29674echo "$as_me:29674: result: $cf_result" >&5
29675echo "${ECHO_T}$cf_result" >&6
29676test "$cf_result" = no && LIBS="$cf_slang_LIBS3"
29677
29678	else
29679		{ { echo "$as_me:29679: error: cannot find slang headers" >&5
29680echo "$as_me: error: cannot find slang headers" >&2;}
29681   { (exit 1); exit 1; }; }
29682	fi
29683fi
29684
29685# There's an unofficial set of patches for slang that gives it some limited
29686# UTF8 capability.  Unfortunately it won't compile unless one defines UTF8.
29687echo "$as_me:29687: checking if we must define UTF8" >&5
29688echo $ECHO_N "checking if we must define UTF8... $ECHO_C" >&6
29689if test "${cf_cv_slang_utf8+set}" = set; then
29690  echo $ECHO_N "(cached) $ECHO_C" >&6
29691else
29692
29693	cat >"conftest.$ac_ext" <<_ACEOF
29694#line 29694 "configure"
29695#include "confdefs.h"
29696#include <slang.h>
29697int
29698main (void)
29699{
29700SLtt_get_screen_size()
29701  ;
29702  return 0;
29703}
29704_ACEOF
29705rm -f "conftest.$ac_objext"
29706if { (eval echo "$as_me:29706: \"$ac_compile\"") >&5
29707  (eval $ac_compile) 2>&5
29708  ac_status=$?
29709  echo "$as_me:29709: \$? = $ac_status" >&5
29710  (exit "$ac_status"); } &&
29711         { ac_try='test -s "conftest.$ac_objext"'
29712  { (eval echo "$as_me:29712: \"$ac_try\"") >&5
29713  (eval $ac_try) 2>&5
29714  ac_status=$?
29715  echo "$as_me:29715: \$? = $ac_status" >&5
29716  (exit "$ac_status"); }; }; then
29717  cf_cv_slang_utf8=no
29718else
29719  echo "$as_me: failed program was:" >&5
29720cat "conftest.$ac_ext" >&5
29721
29722	cat >"conftest.$ac_ext" <<_ACEOF
29723#line 29723 "configure"
29724#include "confdefs.h"
29725
29726#define UTF8
29727#include <slang.h>
29728int
29729main (void)
29730{
29731SLtt_get_screen_size()
29732  ;
29733  return 0;
29734}
29735_ACEOF
29736rm -f "conftest.$ac_objext"
29737if { (eval echo "$as_me:29737: \"$ac_compile\"") >&5
29738  (eval $ac_compile) 2>&5
29739  ac_status=$?
29740  echo "$as_me:29740: \$? = $ac_status" >&5
29741  (exit "$ac_status"); } &&
29742         { ac_try='test -s "conftest.$ac_objext"'
29743  { (eval echo "$as_me:29743: \"$ac_try\"") >&5
29744  (eval $ac_try) 2>&5
29745  ac_status=$?
29746  echo "$as_me:29746: \$? = $ac_status" >&5
29747  (exit "$ac_status"); }; }; then
29748  cf_cv_slang_utf8=yes
29749else
29750  echo "$as_me: failed program was:" >&5
29751cat "conftest.$ac_ext" >&5
29752cf_cv_slang_utf8=unknown
29753fi
29754rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29755fi
29756rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29757
29758fi
29759echo "$as_me:29759: result: $cf_cv_slang_utf8" >&5
29760echo "${ECHO_T}$cf_cv_slang_utf8" >&6
29761
29762if test "$cf_cv_slang_utf8" = yes ; then
29763
29764cat >>confdefs.h <<\EOF
29765#define UTF8 1
29766EOF
29767
29768fi
29769
29770echo "$as_me:29770: checking if we must tell slang this is UNIX" >&5
29771echo $ECHO_N "checking if we must tell slang this is UNIX... $ECHO_C" >&6
29772if test "${cf_cv_slang_unix+set}" = set; then
29773  echo $ECHO_N "(cached) $ECHO_C" >&6
29774else
29775
29776cat >"conftest.$ac_ext" <<_ACEOF
29777#line 29777 "configure"
29778#include "confdefs.h"
29779#include <slang.h>
29780int
29781main (void)
29782{
29783
29784#ifdef REAL_UNIX_SYSTEM
29785make an error
29786#else
29787extern int SLang_TT_Baud_Rate;
29788SLang_TT_Baud_Rate = 1
29789#endif
29790
29791  ;
29792  return 0;
29793}
29794_ACEOF
29795rm -f "conftest.$ac_objext" "conftest$ac_exeext"
29796if { (eval echo "$as_me:29796: \"$ac_link\"") >&5
29797  (eval $ac_link) 2>&5
29798  ac_status=$?
29799  echo "$as_me:29799: \$? = $ac_status" >&5
29800  (exit "$ac_status"); } &&
29801         { ac_try='test -s "conftest$ac_exeext"'
29802  { (eval echo "$as_me:29802: \"$ac_try\"") >&5
29803  (eval $ac_try) 2>&5
29804  ac_status=$?
29805  echo "$as_me:29805: \$? = $ac_status" >&5
29806  (exit "$ac_status"); }; }; then
29807  cf_cv_slang_unix=yes
29808else
29809  echo "$as_me: failed program was:" >&5
29810cat "conftest.$ac_ext" >&5
29811cf_cv_slang_unix=no
29812fi
29813rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
29814
29815fi
29816echo "$as_me:29816: result: $cf_cv_slang_unix" >&5
29817echo "${ECHO_T}$cf_cv_slang_unix" >&6
29818test "$cf_cv_slang_unix" = yes &&
29819cat >>confdefs.h <<\EOF
29820#define REAL_UNIX_SYSTEM 1
29821EOF
29822
29823	echo "$as_me:29823: checking for SLsmg_Color_Type" >&5
29824echo $ECHO_N "checking for SLsmg_Color_Type... $ECHO_C" >&6
29825if test "${ac_cv_type_SLsmg_Color_Type+set}" = set; then
29826  echo $ECHO_N "(cached) $ECHO_C" >&6
29827else
29828  cat >"conftest.$ac_ext" <<_ACEOF
29829#line 29829 "configure"
29830#include "confdefs.h"
29831#include <slang.h>
29832
29833int
29834main (void)
29835{
29836if ((SLsmg_Color_Type *) 0)
29837  return 0;
29838if (sizeof (SLsmg_Color_Type))
29839  return 0;
29840  ;
29841  return 0;
29842}
29843_ACEOF
29844rm -f "conftest.$ac_objext"
29845if { (eval echo "$as_me:29845: \"$ac_compile\"") >&5
29846  (eval $ac_compile) 2>&5
29847  ac_status=$?
29848  echo "$as_me:29848: \$? = $ac_status" >&5
29849  (exit "$ac_status"); } &&
29850         { ac_try='test -s "conftest.$ac_objext"'
29851  { (eval echo "$as_me:29851: \"$ac_try\"") >&5
29852  (eval $ac_try) 2>&5
29853  ac_status=$?
29854  echo "$as_me:29854: \$? = $ac_status" >&5
29855  (exit "$ac_status"); }; }; then
29856  ac_cv_type_SLsmg_Color_Type=yes
29857else
29858  echo "$as_me: failed program was:" >&5
29859cat "conftest.$ac_ext" >&5
29860ac_cv_type_SLsmg_Color_Type=no
29861fi
29862rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29863fi
29864echo "$as_me:29864: result: $ac_cv_type_SLsmg_Color_Type" >&5
29865echo "${ECHO_T}$ac_cv_type_SLsmg_Color_Type" >&6
29866if test "$ac_cv_type_SLsmg_Color_Type" = yes; then
29867  ac_cv_type_SLsmg_Color_Type=yes
29868else
29869  ac_cv_type_SLsmg_Color_Type=no
29870fi
29871
29872	if test "$ac_cv_type_SLsmg_Color_Type" = no; then
29873
29874cat >>confdefs.h <<\EOF
29875#define SLsmg_Color_Type int
29876EOF
29877
29878fi
29879
29880	echo "$as_me:29880: checking for SLtt_Char_Type" >&5
29881echo $ECHO_N "checking for SLtt_Char_Type... $ECHO_C" >&6
29882if test "${ac_cv_type_SLtt_Char_Type+set}" = set; then
29883  echo $ECHO_N "(cached) $ECHO_C" >&6
29884else
29885  cat >"conftest.$ac_ext" <<_ACEOF
29886#line 29886 "configure"
29887#include "confdefs.h"
29888#include <slang.h>
29889
29890int
29891main (void)
29892{
29893if ((SLtt_Char_Type *) 0)
29894  return 0;
29895if (sizeof (SLtt_Char_Type))
29896  return 0;
29897  ;
29898  return 0;
29899}
29900_ACEOF
29901rm -f "conftest.$ac_objext"
29902if { (eval echo "$as_me:29902: \"$ac_compile\"") >&5
29903  (eval $ac_compile) 2>&5
29904  ac_status=$?
29905  echo "$as_me:29905: \$? = $ac_status" >&5
29906  (exit "$ac_status"); } &&
29907         { ac_try='test -s "conftest.$ac_objext"'
29908  { (eval echo "$as_me:29908: \"$ac_try\"") >&5
29909  (eval $ac_try) 2>&5
29910  ac_status=$?
29911  echo "$as_me:29911: \$? = $ac_status" >&5
29912  (exit "$ac_status"); }; }; then
29913  ac_cv_type_SLtt_Char_Type=yes
29914else
29915  echo "$as_me: failed program was:" >&5
29916cat "conftest.$ac_ext" >&5
29917ac_cv_type_SLtt_Char_Type=no
29918fi
29919rm -f "conftest.$ac_objext" "conftest.$ac_ext"
29920fi
29921echo "$as_me:29921: result: $ac_cv_type_SLtt_Char_Type" >&5
29922echo "${ECHO_T}$ac_cv_type_SLtt_Char_Type" >&6
29923if test "$ac_cv_type_SLtt_Char_Type" = yes; then
29924  ac_cv_type_SLtt_Char_Type=yes
29925else
29926  ac_cv_type_SLtt_Char_Type=no
29927fi
29928
29929	if test "$ac_cv_type_SLtt_Char_Type" = no; then
29930
29931cat >>confdefs.h <<\EOF
29932#define SLtt_Char_Type unsigned long
29933EOF
29934
29935fi
29936
29937	dft_color_style=no
29938	;;
29939esac
29940
29941LD_RPATH_OPT=
29942if test "x$cf_cv_enable_rpath" != xno
29943then
29944	echo "$as_me:29944: checking for an rpath option" >&5
29945echo $ECHO_N "checking for an rpath option... $ECHO_C" >&6
29946	case "$cf_cv_system_name" in
29947	(irix*)
29948		if test "$GCC" = yes; then
29949			LD_RPATH_OPT="-Wl,-rpath,"
29950		else
29951			LD_RPATH_OPT="-rpath "
29952		fi
29953		;;
29954	(linux*|gnu*|k*bsd*-gnu|freebsd*)
29955		LD_RPATH_OPT="-Wl,-rpath,"
29956		;;
29957	(openbsd[2-9].*|mirbsd*)
29958		LD_RPATH_OPT="-Wl,-rpath,"
29959		;;
29960	(dragonfly*)
29961		LD_RPATH_OPT="-rpath "
29962		;;
29963	(netbsd*)
29964		LD_RPATH_OPT="-Wl,-rpath,"
29965		;;
29966	(osf*|mls+*)
29967		LD_RPATH_OPT="-rpath "
29968		;;
29969	(solaris2*)
29970		LD_RPATH_OPT="-R"
29971		;;
29972	(*)
29973		;;
29974	esac
29975	echo "$as_me:29975: result: $LD_RPATH_OPT" >&5
29976echo "${ECHO_T}$LD_RPATH_OPT" >&6
29977
29978	case "x$LD_RPATH_OPT" in
29979	(x-R*)
29980		echo "$as_me:29980: checking if we need a space after rpath option" >&5
29981echo $ECHO_N "checking if we need a space after rpath option... $ECHO_C" >&6
29982		cf_save_LIBS="$LIBS"
29983
29984cf_add_libs="$LIBS"
29985# reverse order
29986cf_add_0lib=
29987for cf_add_1lib in ${LD_RPATH_OPT}$libdir; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
29988# filter duplicates
29989for cf_add_1lib in $cf_add_0lib; do
29990	for cf_add_2lib in $cf_add_libs; do
29991		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
29992			cf_add_1lib=
29993			break
29994		fi
29995	done
29996	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
29997done
29998LIBS="$cf_add_libs"
29999
30000		cat >"conftest.$ac_ext" <<_ACEOF
30001#line 30001 "configure"
30002#include "confdefs.h"
30003
30004int
30005main (void)
30006{
30007
30008  ;
30009  return 0;
30010}
30011_ACEOF
30012rm -f "conftest.$ac_objext" "conftest$ac_exeext"
30013if { (eval echo "$as_me:30013: \"$ac_link\"") >&5
30014  (eval $ac_link) 2>&5
30015  ac_status=$?
30016  echo "$as_me:30016: \$? = $ac_status" >&5
30017  (exit "$ac_status"); } &&
30018         { ac_try='test -s "conftest$ac_exeext"'
30019  { (eval echo "$as_me:30019: \"$ac_try\"") >&5
30020  (eval $ac_try) 2>&5
30021  ac_status=$?
30022  echo "$as_me:30022: \$? = $ac_status" >&5
30023  (exit "$ac_status"); }; }; then
30024  cf_rpath_space=no
30025else
30026  echo "$as_me: failed program was:" >&5
30027cat "conftest.$ac_ext" >&5
30028cf_rpath_space=yes
30029fi
30030rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
30031		LIBS="$cf_save_LIBS"
30032		echo "$as_me:30032: result: $cf_rpath_space" >&5
30033echo "${ECHO_T}$cf_rpath_space" >&6
30034		test "$cf_rpath_space" = yes && LD_RPATH_OPT="$LD_RPATH_OPT "
30035		;;
30036	esac
30037fi
30038
30039if test -z "$LD_RPATH_OPT"
30040then
30041	test -n "$verbose" && echo "	will not attempt to use rpath" 1>&6
30042
30043echo "${as_me:-configure}:30043: testing will not attempt to use rpath ..." 1>&5
30044
30045elif test "x${enable_rpath_hack:-yes}" = "xno"
30046then
30047	test -n "$verbose" && echo "	rpath is disabled" 1>&6
30048
30049echo "${as_me:-configure}:30049: testing rpath is disabled ..." 1>&5
30050
30051elif test -z "${LD_RUN_PATH}${LD_LIBRARY_PATH}"
30052then
30053	case "$LIBS" in
30054	(*-L/*)
30055
30056if test "$cross_compiling" = yes; then
30057  cf_check_run=unknown
30058else
30059  cat >"conftest.$ac_ext" <<_ACEOF
30060#line 30060 "configure"
30061#include "confdefs.h"
30062#include <stdio.h>
30063int main(void) {
30064	fflush(stderr);
30065	${cf_cv_main_return:-return}(0);
30066}
30067_ACEOF
30068rm -f "conftest$ac_exeext"
30069if { (eval echo "$as_me:30069: \"$ac_link\"") >&5
30070  (eval $ac_link) 2>&5
30071  ac_status=$?
30072  echo "$as_me:30072: \$? = $ac_status" >&5
30073  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30074  { (eval echo "$as_me:30074: \"$ac_try\"") >&5
30075  (eval $ac_try) 2>&5
30076  ac_status=$?
30077  echo "$as_me:30077: \$? = $ac_status" >&5
30078  (exit "$ac_status"); }; }; then
30079  cf_check_run=yes
30080else
30081  echo "$as_me: program exited with status $ac_status" >&5
30082echo "$as_me: failed program was:" >&5
30083cat "conftest.$ac_ext" >&5
30084cf_check_run=no
30085fi
30086rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30087fi
30088
30089		if test "x$cf_check_run" = xno
30090		then
30091			test -n "$verbose" && echo "	linkage is broken" 1>&6
30092
30093echo "${as_me:-configure}:30093: testing linkage is broken ..." 1>&5
30094
30095			cf_result=
30096			for cf_item in $LIBS
30097			do
30098				case " $cf_item" in
30099				(\ -L/*)
30100					cf_rpath_arg=`echo " $cf_item" | sed -e "s% -L%$LD_RPATH_OPT%"`
30101					cf_rpath_tmp=`echo "$cf_result " | sed -e "s% $cf_rpath_arg % %"`
30102					if test "x$cf_result " = "x$cf_rpath_tmp"
30103					then
30104						cf_result="$cf_result $cf_rpath_arg"
30105					fi
30106					cf_rpath_tmp=`echo "$cf_result " | sed -e "s% $cf_item % %g"`
30107					if test "x$cf_result " != "x$cf_rpath_tmp"
30108					then
30109						continue
30110					fi
30111					;;
30112				esac
30113				cf_result="$cf_result $cf_item"
30114			done
30115			cf_result=`echo "$cf_result" | sed -e 's/^ //'`
30116			if test "x$cf_result" != "x$LIBS"
30117			then
30118				cf_save_LIBS="$LIBS"
30119				LIBS="$cf_result"
30120
30121if test "$cross_compiling" = yes; then
30122  cf_check_run=unknown
30123else
30124  cat >"conftest.$ac_ext" <<_ACEOF
30125#line 30125 "configure"
30126#include "confdefs.h"
30127#include <stdio.h>
30128int main(void) {
30129	fflush(stderr);
30130	${cf_cv_main_return:-return}(0);
30131}
30132_ACEOF
30133rm -f "conftest$ac_exeext"
30134if { (eval echo "$as_me:30134: \"$ac_link\"") >&5
30135  (eval $ac_link) 2>&5
30136  ac_status=$?
30137  echo "$as_me:30137: \$? = $ac_status" >&5
30138  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30139  { (eval echo "$as_me:30139: \"$ac_try\"") >&5
30140  (eval $ac_try) 2>&5
30141  ac_status=$?
30142  echo "$as_me:30142: \$? = $ac_status" >&5
30143  (exit "$ac_status"); }; }; then
30144  cf_check_run=yes
30145else
30146  echo "$as_me: program exited with status $ac_status" >&5
30147echo "$as_me: failed program was:" >&5
30148cat "conftest.$ac_ext" >&5
30149cf_check_run=no
30150fi
30151rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30152fi
30153
30154				if test "x$cf_check_run" = "xyes"
30155				then
30156					test -n "$verbose" && echo "	use rpath for $cf_save_LIBS" 1>&6
30157
30158echo "${as_me:-configure}:30158: testing use rpath for $cf_save_LIBS ..." 1>&5
30159
30160					LIBS="$cf_result"
30161					test -n "$verbose" && echo "	result is now $LIBS" 1>&6
30162
30163echo "${as_me:-configure}:30163: testing result is now $LIBS ..." 1>&5
30164
30165				else
30166					LIBS="$cf_save_LIBS"
30167				fi
30168			fi
30169		fi
30170		;;
30171	(*)
30172		test -n "$verbose" && echo "	will not attempt to use rpath" 1>&6
30173
30174echo "${as_me:-configure}:30174: testing will not attempt to use rpath ..." 1>&5
30175
30176		;;
30177	esac
30178fi
30179
30180echo "$as_me:30180: checking for chtype typedef" >&5
30181echo $ECHO_N "checking for chtype typedef... $ECHO_C" >&6
30182if test "${cf_cv_chtype_decl+set}" = set; then
30183  echo $ECHO_N "(cached) $ECHO_C" >&6
30184else
30185
30186	cat >"conftest.$ac_ext" <<_ACEOF
30187#line 30187 "configure"
30188#include "confdefs.h"
30189#include <${cf_cv_ncurses_header:-curses.h}>
30190int
30191main (void)
30192{
30193chtype foo; (void)foo
30194  ;
30195  return 0;
30196}
30197_ACEOF
30198rm -f "conftest.$ac_objext"
30199if { (eval echo "$as_me:30199: \"$ac_compile\"") >&5
30200  (eval $ac_compile) 2>&5
30201  ac_status=$?
30202  echo "$as_me:30202: \$? = $ac_status" >&5
30203  (exit "$ac_status"); } &&
30204         { ac_try='test -s "conftest.$ac_objext"'
30205  { (eval echo "$as_me:30205: \"$ac_try\"") >&5
30206  (eval $ac_try) 2>&5
30207  ac_status=$?
30208  echo "$as_me:30208: \$? = $ac_status" >&5
30209  (exit "$ac_status"); }; }; then
30210  cf_cv_chtype_decl=yes
30211else
30212  echo "$as_me: failed program was:" >&5
30213cat "conftest.$ac_ext" >&5
30214cf_cv_chtype_decl=no
30215fi
30216rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30217fi
30218echo "$as_me:30218: result: $cf_cv_chtype_decl" >&5
30219echo "${ECHO_T}$cf_cv_chtype_decl" >&6
30220if test "$cf_cv_chtype_decl" = yes ; then
30221
30222cat >>confdefs.h <<\EOF
30223#define HAVE_TYPE_CHTYPE 1
30224EOF
30225
30226	echo "$as_me:30226: checking if chtype is scalar or struct" >&5
30227echo $ECHO_N "checking if chtype is scalar or struct... $ECHO_C" >&6
30228if test "${cf_cv_chtype_type+set}" = set; then
30229  echo $ECHO_N "(cached) $ECHO_C" >&6
30230else
30231
30232		cat >"conftest.$ac_ext" <<_ACEOF
30233#line 30233 "configure"
30234#include "confdefs.h"
30235#include <${cf_cv_ncurses_header:-curses.h}>
30236int
30237main (void)
30238{
30239static chtype foo; long x = foo; (void)x
30240  ;
30241  return 0;
30242}
30243_ACEOF
30244rm -f "conftest.$ac_objext"
30245if { (eval echo "$as_me:30245: \"$ac_compile\"") >&5
30246  (eval $ac_compile) 2>&5
30247  ac_status=$?
30248  echo "$as_me:30248: \$? = $ac_status" >&5
30249  (exit "$ac_status"); } &&
30250         { ac_try='test -s "conftest.$ac_objext"'
30251  { (eval echo "$as_me:30251: \"$ac_try\"") >&5
30252  (eval $ac_try) 2>&5
30253  ac_status=$?
30254  echo "$as_me:30254: \$? = $ac_status" >&5
30255  (exit "$ac_status"); }; }; then
30256  cf_cv_chtype_type=scalar
30257else
30258  echo "$as_me: failed program was:" >&5
30259cat "conftest.$ac_ext" >&5
30260cf_cv_chtype_type=struct
30261fi
30262rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30263fi
30264echo "$as_me:30264: result: $cf_cv_chtype_type" >&5
30265echo "${ECHO_T}$cf_cv_chtype_type" >&6
30266	if test "$cf_cv_chtype_type" = scalar ; then
30267
30268cat >>confdefs.h <<\EOF
30269#define TYPE_CHTYPE_IS_SCALAR 1
30270EOF
30271
30272	fi
30273fi
30274
30275echo "$as_me:30275: checking if you want the wide-curses features" >&5
30276echo $ECHO_N "checking if you want the wide-curses features... $ECHO_C" >&6
30277
30278# Check whether --enable-widec or --disable-widec was given.
30279if test "${enable_widec+set}" = set; then
30280  enableval="$enable_widec"
30281  test "$enableval" != yes && enableval=no
30282	if test "$enableval" != "no" ; then
30283    use_wide_curses=$enableval
30284	else
30285		use_wide_curses=$cf_wide_curses
30286	fi
30287else
30288  enableval=no
30289	use_wide_curses=$cf_wide_curses
30290
30291fi;
30292echo "$as_me:30292: result: $use_wide_curses" >&5
30293echo "${ECHO_T}$use_wide_curses" >&6
30294
30295echo "$as_me:30295: checking if color-style code should be used" >&5
30296echo $ECHO_N "checking if color-style code should be used... $ECHO_C" >&6
30297
30298# Check whether --enable-color-style or --disable-color-style was given.
30299if test "${enable_color_style+set}" = set; then
30300  enableval="$enable_color_style"
30301  test "$enableval" != no && enableval=yes
30302	if test "$enableval" != "yes" ; then
30303    use_color_style=$enableval
30304	else
30305		use_color_style=$dft_color_style
30306	fi
30307else
30308  enableval=yes
30309	use_color_style=$dft_color_style
30310
30311fi;
30312
30313case "$use_color_style" in
30314(no)
30315	echo "$as_me:30315: result: no" >&5
30316echo "${ECHO_T}no" >&6
30317	INSTALL_LSS=
30318	;;
30319(*)
30320
30321cat >>confdefs.h <<\EOF
30322#define USE_COLOR_STYLE 1
30323EOF
30324
30325	echo "$as_me:30325: result: yes" >&5
30326echo "${ECHO_T}yes" >&6
30327
30328	echo "$as_me:30328: checking for location of style-sheet file" >&5
30329echo $ECHO_N "checking for location of style-sheet file... $ECHO_C" >&6
30330
30331# Check whether --with-lss-file or --without-lss-file was given.
30332if test "${with_lss_file+set}" = set; then
30333  withval="$with_lss_file"
30334
30335else
30336  withval="${LYNX_LSS_FILE:-$sysconfdir/lynx.lss}"
30337fi; if test -n "$sysconfdir/lynx.lss" ; then
30338
30339if test "x$prefix" != xNONE; then
30340	cf_path_syntax="$prefix"
30341else
30342	cf_path_syntax="$ac_default_prefix"
30343fi
30344
30345case ".$withval" in
30346(.\$\(*\)*|.\'*\'*)
30347	;;
30348(..|./*|.\\*)
30349	;;
30350(.[a-zA-Z]:[\\/]*) # OS/2 EMX
30351	;;
30352(.\$\{*prefix\}*|.\$\{*dir\}*)
30353	eval withval="$withval"
30354	case ".$withval" in
30355	(.NONE/*)
30356		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30357		;;
30358	esac
30359	;;
30360(.no|.NONE/*)
30361	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30362	;;
30363(*)
30364	{ { echo "$as_me:30364: error: expected a pathname, not \"$withval\"" >&5
30365echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
30366   { (exit 1); exit 1; }; }
30367	;;
30368esac
30369
30370fi
30371eval LYNX_LSS_FILE="$withval"
30372
30373	echo "$as_me:30373: result: $LYNX_LSS_FILE" >&5
30374echo "${ECHO_T}$LYNX_LSS_FILE" >&6
30375
30376	test "$LYNX_LSS_FILE" = no && LYNX_LSS_FILE=
30377
30378cat >>confdefs.h <<EOF
30379#define LYNX_LSS_FILE "$LYNX_LSS_FILE"
30380EOF
30381
30382	INSTALL_LSS=install-lss
30383	;;
30384esac
30385
30386echo "$as_me:30386: checking for the default configuration-file" >&5
30387echo $ECHO_N "checking for the default configuration-file... $ECHO_C" >&6
30388
30389# Check whether --with-cfg-file or --without-cfg-file was given.
30390if test "${with_cfg_file+set}" = set; then
30391  withval="$with_cfg_file"
30392
30393else
30394  withval="${LYNX_CFG_FILE:-$sysconfdir/lynx.cfg}"
30395fi; if test -n "$sysconfdir/lynx.cfg" ; then
30396
30397if test "x$prefix" != xNONE; then
30398	cf_path_syntax="$prefix"
30399else
30400	cf_path_syntax="$ac_default_prefix"
30401fi
30402
30403case ".$withval" in
30404(.\$\(*\)*|.\'*\'*)
30405	;;
30406(..|./*|.\\*)
30407	;;
30408(.[a-zA-Z]:[\\/]*) # OS/2 EMX
30409	;;
30410(.\$\{*prefix\}*|.\$\{*dir\}*)
30411	eval withval="$withval"
30412	case ".$withval" in
30413	(.NONE/*)
30414		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30415		;;
30416	esac
30417	;;
30418(.no|.NONE/*)
30419	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30420	;;
30421(*)
30422	{ { echo "$as_me:30422: error: expected a pathname, not \"$withval\"" >&5
30423echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
30424   { (exit 1); exit 1; }; }
30425	;;
30426esac
30427
30428fi
30429eval LYNX_CFG_FILE="$withval"
30430
30431echo "$as_me:30431: result: $LYNX_CFG_FILE" >&5
30432echo "${ECHO_T}$LYNX_CFG_FILE" >&6
30433
30434test "$LYNX_CFG_FILE" = no && LYNX_CFG_FILE=
30435
30436cat >>confdefs.h <<EOF
30437#define LYNX_CFG_FILE "$LYNX_CFG_FILE"
30438EOF
30439
30440echo "$as_me:30440: checking for the default configuration-path" >&5
30441echo $ECHO_N "checking for the default configuration-path... $ECHO_C" >&6
30442
30443# Check whether --with-cfg-path or --without-cfg-path was given.
30444if test "${with_cfg_path+set}" = set; then
30445  withval="$with_cfg_path"
30446
30447else
30448  withval="${LYNX_CFG_PATH:-$sysconfdir}"
30449fi; if test -n "$sysconfdir" ; then
30450
30451if test "x$prefix" != xNONE; then
30452	cf_path_syntax="$prefix"
30453else
30454	cf_path_syntax="$ac_default_prefix"
30455fi
30456
30457case ".$withval" in
30458(.\$\(*\)*|.\'*\'*)
30459	;;
30460(..|./*|.\\*)
30461	;;
30462(.[a-zA-Z]:[\\/]*) # OS/2 EMX
30463	;;
30464(.\$\{*prefix\}*|.\$\{*dir\}*)
30465	eval withval="$withval"
30466	case ".$withval" in
30467	(.NONE/*)
30468		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30469		;;
30470	esac
30471	;;
30472(.no|.NONE/*)
30473	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30474	;;
30475(*)
30476	{ { echo "$as_me:30476: error: expected a pathname, not \"$withval\"" >&5
30477echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
30478   { (exit 1); exit 1; }; }
30479	;;
30480esac
30481
30482fi
30483eval LYNX_CFG_PATH="$withval"
30484
30485echo "$as_me:30485: result: $LYNX_CFG_PATH" >&5
30486echo "${ECHO_T}$LYNX_CFG_PATH" >&6
30487
30488test -z "$LYNX_CFG_PATH" && LYNX_CFG_PATH="`echo "$LYNX_CFG_FILE" | sed -e 's%/[^/]*$%%'`"
30489test "x$LYNX_CFG_PATH" = xno && LYNX_CFG_PATH=
30490
30491cat >>confdefs.h <<EOF
30492#define LYNX_CFG_PATH "$LYNX_CFG_PATH"
30493EOF
30494
30495echo "$as_me:30495: checking if htmlized lynx.cfg should be built" >&5
30496echo $ECHO_N "checking if htmlized lynx.cfg should be built... $ECHO_C" >&6
30497
30498# Check whether --enable-htmlized-cfg or --disable-htmlized-cfg was given.
30499if test "${enable_htmlized_cfg+set}" = set; then
30500  enableval="$enable_htmlized_cfg"
30501  test "$enableval" != yes && enableval=no
30502	if test "$enableval" != "no" ; then
30503    use_htmlized_cfg=$enableval
30504	else
30505		use_htmlized_cfg=no
30506	fi
30507else
30508  enableval=no
30509	use_htmlized_cfg=no
30510
30511fi;
30512echo "$as_me:30512: result: $use_htmlized_cfg" >&5
30513echo "${ECHO_T}$use_htmlized_cfg" >&6
30514
30515LYNXCFG_MAKE=''
30516LYNXCFG_NO_MAKE=''
30517if test "$use_htmlized_cfg" = no ; then
30518	LYNXCFG_MAKE='#'
30519else
30520	LYNXCFG_NO_MAKE='#'
30521fi
30522
30523echo "$as_me:30523: checking if local doc directory should be linked to help page" >&5
30524echo $ECHO_N "checking if local doc directory should be linked to help page... $ECHO_C" >&6
30525
30526# Check whether --enable-local-docs or --disable-local-docs was given.
30527if test "${enable_local_docs+set}" = set; then
30528  enableval="$enable_local_docs"
30529  test "$enableval" != yes && enableval=no
30530	if test "$enableval" != "no" ; then
30531    use_local_docs=$enableval
30532	else
30533		use_local_docs=no
30534	fi
30535else
30536  enableval=no
30537	use_local_docs=no
30538
30539fi;
30540echo "$as_me:30540: result: $use_local_docs" >&5
30541echo "${ECHO_T}$use_local_docs" >&6
30542
30543LYNXDOC_MAKE=''
30544if test "$use_local_docs" = no ; then
30545	LYNXDOC_MAKE='#'
30546fi
30547
30548echo "$as_me:30548: checking for MIME library directory" >&5
30549echo $ECHO_N "checking for MIME library directory... $ECHO_C" >&6
30550
30551# Check whether --with-mime-libdir or --without-mime-libdir was given.
30552if test "${with_mime_libdir+set}" = set; then
30553  withval="$with_mime_libdir"
30554
30555else
30556  withval="${MIME_LIBDIR:-/etc}"
30557fi; if true ; then
30558
30559if test "x$prefix" != xNONE; then
30560	cf_path_syntax="$prefix"
30561else
30562	cf_path_syntax="$ac_default_prefix"
30563fi
30564
30565case ".$withval" in
30566(.\$\(*\)*|.\'*\'*)
30567	;;
30568(..|./*|.\\*)
30569	;;
30570(.[a-zA-Z]:[\\/]*) # OS/2 EMX
30571	;;
30572(.\$\{*prefix\}*|.\$\{*dir\}*)
30573	eval withval="$withval"
30574	case ".$withval" in
30575	(.NONE/*)
30576		withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30577		;;
30578	esac
30579	;;
30580(.no|.NONE/*)
30581	withval=`echo "$withval" | sed -e s%NONE%$cf_path_syntax%`
30582	;;
30583(*)
30584	{ { echo "$as_me:30584: error: expected a pathname, not \"$withval\"" >&5
30585echo "$as_me: error: expected a pathname, not \"$withval\"" >&2;}
30586   { (exit 1); exit 1; }; }
30587	;;
30588esac
30589
30590fi
30591eval MIME_LIBDIR="$withval"
30592
30593echo "$as_me:30593: result: $MIME_LIBDIR" >&5
30594echo "${ECHO_T}$MIME_LIBDIR" >&6
30595MIME_LIBDIR=`echo "$MIME_LIBDIR" | sed -e 's,/$,,' -e 's,$,/,'`
30596
30597cat >>confdefs.h <<EOF
30598#define MIME_LIBDIR "$MIME_LIBDIR"
30599EOF
30600
30601echo "$as_me:30601: checking if locale-charset selection logic should be used" >&5
30602echo $ECHO_N "checking if locale-charset selection logic should be used... $ECHO_C" >&6
30603
30604# Check whether --enable-locale-charset or --disable-locale-charset was given.
30605if test "${enable_locale_charset+set}" = set; then
30606  enableval="$enable_locale_charset"
30607  test "$enableval" != no && enableval=yes
30608	if test "$enableval" != "yes" ; then
30609    use_locale_charset=$enableval
30610	else
30611		use_locale_charset=yes
30612	fi
30613else
30614  enableval=yes
30615	use_locale_charset=yes
30616
30617fi;
30618echo "$as_me:30618: result: $use_locale_charset" >&5
30619echo "${ECHO_T}$use_locale_charset" >&6
30620test "$use_locale_charset" != no &&
30621cat >>confdefs.h <<\EOF
30622#define USE_LOCALE_CHARSET 1
30623EOF
30624
30625CHARSET_DEFS=
30626
30627echo "$as_me:30627: checking if you want only a few charsets" >&5
30628echo $ECHO_N "checking if you want only a few charsets... $ECHO_C" >&6
30629
30630# Check whether --with-charsets or --without-charsets was given.
30631if test "${with_charsets+set}" = set; then
30632  withval="$with_charsets"
30633  cf_charsets=$withval
30634else
30635  cf_charsets=
30636fi;
30637
30638if test -n "$cf_charsets" ; then
30639	echo "$as_me:30639: result: yes" >&5
30640echo "${ECHO_T}yes" >&6
30641
30642cat >>confdefs.h <<\EOF
30643#define ALL_CHARSETS 0
30644EOF
30645
30646	cf_min_charsets=us-ascii,iso-8859-1,utf-8
30647	if test "$cf_charsets" = "no" ; then
30648		cf_charsets=minimal
30649	fi
30650	if test "$cf_charsets" = "minimal" ; then
30651		test -n "$verbose" && echo "	using minimal list of charsets: $cf_min_charsets" 1>&6
30652
30653echo "${as_me:-configure}:30653: testing using minimal list of charsets: $cf_min_charsets ..." 1>&5
30654
30655	fi
30656	cf_charsets=`echo "$cf_charsets" | sed -e "s/minimal/$cf_min_charsets/g" -e 's/,/ /g'`
30657	for cf_charset in $cf_charsets
30658	do
30659		cf_def_charset=`echo "$cf_charset" | sed -e 's/+/_/g' -e 's/-/_/g'`
30660		cf_use_charset=no
30661		# check charsets that are defined via .tbl files
30662		if ( ${EGREP-egrep} '^M'"$cf_charset"'$' "$srcdir"/src/chrtrans/*.tbl 2>/dev/null >/dev/null )
30663		then
30664			cf_use_charset=yes
30665		# check charsets that are "built-in"
30666		else
30667			for cf_tst_charset in big5 euc_cn euc_jp euc_kr shift_jis x_transparent
30668			do
30669				if test "$cf_tst_charset" = "$cf_def_charset"
30670				then
30671					cf_use_charset=yes
30672					break
30673				fi
30674			done
30675		fi
30676		if test "$cf_use_charset" = yes
30677		then
30678			test -n "$verbose" && echo "	found $cf_charset" 1>&6
30679
30680echo "${as_me:-configure}:30680: testing found $cf_charset ..." 1>&5
30681
30682			CHARSET_DEFS="-DNO_CHARSET_${cf_def_charset}=0 $CHARSET_DEFS"
30683		else
30684			test -n "$verbose" && echo "	not found $cf_charset" 1>&6
30685
30686echo "${as_me:-configure}:30686: testing not found $cf_charset ..." 1>&5
30687
30688		fi
30689	done
30690else
30691	echo "$as_me:30691: result: no" >&5
30692echo "${ECHO_T}no" >&6
30693fi
30694
30695echo "$as_me:30695: checking for ANSI C header files" >&5
30696echo $ECHO_N "checking for ANSI C header files... $ECHO_C" >&6
30697if test "${ac_cv_header_stdc+set}" = set; then
30698  echo $ECHO_N "(cached) $ECHO_C" >&6
30699else
30700  cat >"conftest.$ac_ext" <<_ACEOF
30701#line 30701 "configure"
30702#include "confdefs.h"
30703#include <stdlib.h>
30704#include <stdarg.h>
30705#include <string.h>
30706#include <float.h>
30707
30708_ACEOF
30709if { (eval echo "$as_me:30709: \"$ac_cpp "conftest.$ac_ext"\"") >&5
30710  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
30711  ac_status=$?
30712  $EGREP -v '^ *\+' conftest.er1 >conftest.err
30713  rm -f conftest.er1
30714  cat conftest.err >&5
30715  echo "$as_me:30715: \$? = $ac_status" >&5
30716  (exit "$ac_status"); } >/dev/null; then
30717  if test -s conftest.err; then
30718    ac_cpp_err=$ac_c_preproc_warn_flag
30719  else
30720    ac_cpp_err=
30721  fi
30722else
30723  ac_cpp_err=yes
30724fi
30725if test -z "$ac_cpp_err"; then
30726  ac_cv_header_stdc=yes
30727else
30728  echo "$as_me: failed program was:" >&5
30729  cat "conftest.$ac_ext" >&5
30730  ac_cv_header_stdc=no
30731fi
30732rm -f conftest.err "conftest.$ac_ext"
30733
30734if test $ac_cv_header_stdc = yes; then
30735  # SunOS 4.x string.h does not declare mem*, contrary to ANSI.
30736  cat >"conftest.$ac_ext" <<_ACEOF
30737#line 30737 "configure"
30738#include "confdefs.h"
30739#include <string.h>
30740
30741_ACEOF
30742if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30743  $EGREP "memchr" >/dev/null 2>&1; then
30744  :
30745else
30746  ac_cv_header_stdc=no
30747fi
30748rm -rf conftest*
30749
30750fi
30751
30752if test $ac_cv_header_stdc = yes; then
30753  # ISC 2.0.2 stdlib.h does not declare free, contrary to ANSI.
30754  cat >"conftest.$ac_ext" <<_ACEOF
30755#line 30755 "configure"
30756#include "confdefs.h"
30757#include <stdlib.h>
30758
30759_ACEOF
30760if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
30761  $EGREP "free" >/dev/null 2>&1; then
30762  :
30763else
30764  ac_cv_header_stdc=no
30765fi
30766rm -rf conftest*
30767
30768fi
30769
30770if test $ac_cv_header_stdc = yes; then
30771  # /bin/cc in Irix-4.0.5 gets non-ANSI ctype macros unless using -ansi.
30772  if test "$cross_compiling" = yes; then
30773  :
30774else
30775  cat >"conftest.$ac_ext" <<_ACEOF
30776#line 30776 "configure"
30777#include "confdefs.h"
30778#include <ctype.h>
30779#if ((' ' & 0x0FF) == 0x020)
30780# define ISLOWER(c) ('a' <= (c) && (c) <= 'z')
30781# define TOUPPER(c) (ISLOWER(c) ? 'A' + ((c) - 'a') : (c))
30782#else
30783# define ISLOWER(c) (('a' <= (c) && (c) <= 'i') \
30784                     || ('j' <= (c) && (c) <= 'r') \
30785                     || ('s' <= (c) && (c) <= 'z'))
30786# define TOUPPER(c) (ISLOWER(c) ? ((c) | 0x40) : (c))
30787#endif
30788
30789#define XOR(e, f) (((e) && !(f)) || (!(e) && (f)))
30790int
30791main (void)
30792{
30793  int i;
30794  for (i = 0; i < 256; i++)
30795    if (XOR (islower (i), ISLOWER (i))
30796        || toupper (i) != TOUPPER (i))
30797      $ac_main_return(2);
30798  $ac_main_return (0);
30799}
30800_ACEOF
30801rm -f "conftest$ac_exeext"
30802if { (eval echo "$as_me:30802: \"$ac_link\"") >&5
30803  (eval $ac_link) 2>&5
30804  ac_status=$?
30805  echo "$as_me:30805: \$? = $ac_status" >&5
30806  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
30807  { (eval echo "$as_me:30807: \"$ac_try\"") >&5
30808  (eval $ac_try) 2>&5
30809  ac_status=$?
30810  echo "$as_me:30810: \$? = $ac_status" >&5
30811  (exit "$ac_status"); }; }; then
30812  :
30813else
30814  echo "$as_me: program exited with status $ac_status" >&5
30815echo "$as_me: failed program was:" >&5
30816cat "conftest.$ac_ext" >&5
30817ac_cv_header_stdc=no
30818fi
30819rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
30820fi
30821fi
30822fi
30823echo "$as_me:30823: result: $ac_cv_header_stdc" >&5
30824echo "${ECHO_T}$ac_cv_header_stdc" >&6
30825if test $ac_cv_header_stdc = yes; then
30826
30827cat >>confdefs.h <<\EOF
30828#define STDC_HEADERS 1
30829EOF
30830
30831fi
30832
30833echo "$as_me:30833: checking whether time.h and sys/time.h may both be included" >&5
30834echo $ECHO_N "checking whether time.h and sys/time.h may both be included... $ECHO_C" >&6
30835if test "${ac_cv_header_time+set}" = set; then
30836  echo $ECHO_N "(cached) $ECHO_C" >&6
30837else
30838  cat >"conftest.$ac_ext" <<_ACEOF
30839#line 30839 "configure"
30840#include "confdefs.h"
30841#include <sys/types.h>
30842#include <sys/time.h>
30843#include <time.h>
30844
30845int
30846main (void)
30847{
30848if ((struct tm *) 0)
30849return 0;
30850  ;
30851  return 0;
30852}
30853_ACEOF
30854rm -f "conftest.$ac_objext"
30855if { (eval echo "$as_me:30855: \"$ac_compile\"") >&5
30856  (eval $ac_compile) 2>&5
30857  ac_status=$?
30858  echo "$as_me:30858: \$? = $ac_status" >&5
30859  (exit "$ac_status"); } &&
30860         { ac_try='test -s "conftest.$ac_objext"'
30861  { (eval echo "$as_me:30861: \"$ac_try\"") >&5
30862  (eval $ac_try) 2>&5
30863  ac_status=$?
30864  echo "$as_me:30864: \$? = $ac_status" >&5
30865  (exit "$ac_status"); }; }; then
30866  ac_cv_header_time=yes
30867else
30868  echo "$as_me: failed program was:" >&5
30869cat "conftest.$ac_ext" >&5
30870ac_cv_header_time=no
30871fi
30872rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30873fi
30874echo "$as_me:30874: result: $ac_cv_header_time" >&5
30875echo "${ECHO_T}$ac_cv_header_time" >&6
30876if test $ac_cv_header_time = yes; then
30877
30878cat >>confdefs.h <<\EOF
30879#define TIME_WITH_SYS_TIME 1
30880EOF
30881
30882fi
30883
30884ac_header_dirent=no
30885for ac_hdr in dirent.h sys/ndir.h sys/dir.h ndir.h; do
30886  as_ac_Header=`echo "ac_cv_header_dirent_$ac_hdr" | $as_tr_sh`
30887echo "$as_me:30887: checking for $ac_hdr that defines DIR" >&5
30888echo $ECHO_N "checking for $ac_hdr that defines DIR... $ECHO_C" >&6
30889if eval "test \"\${$as_ac_Header+set}\" = set"; then
30890  echo $ECHO_N "(cached) $ECHO_C" >&6
30891else
30892  cat >"conftest.$ac_ext" <<_ACEOF
30893#line 30893 "configure"
30894#include "confdefs.h"
30895#include <sys/types.h>
30896#include <$ac_hdr>
30897
30898int
30899main (void)
30900{
30901if ((DIR *) 0)
30902return 0;
30903  ;
30904  return 0;
30905}
30906_ACEOF
30907rm -f "conftest.$ac_objext"
30908if { (eval echo "$as_me:30908: \"$ac_compile\"") >&5
30909  (eval $ac_compile) 2>&5
30910  ac_status=$?
30911  echo "$as_me:30911: \$? = $ac_status" >&5
30912  (exit "$ac_status"); } &&
30913         { ac_try='test -s "conftest.$ac_objext"'
30914  { (eval echo "$as_me:30914: \"$ac_try\"") >&5
30915  (eval $ac_try) 2>&5
30916  ac_status=$?
30917  echo "$as_me:30917: \$? = $ac_status" >&5
30918  (exit "$ac_status"); }; }; then
30919  eval "$as_ac_Header=yes"
30920else
30921  echo "$as_me: failed program was:" >&5
30922cat "conftest.$ac_ext" >&5
30923eval "$as_ac_Header=no"
30924fi
30925rm -f "conftest.$ac_objext" "conftest.$ac_ext"
30926fi
30927echo "$as_me:30927: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
30928echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
30929if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
30930  cat >>confdefs.h <<EOF
30931#define `echo "HAVE_$ac_hdr" | $as_tr_cpp` 1
30932EOF
30933
30934ac_header_dirent=$ac_hdr; break
30935fi
30936
30937done
30938# Two versions of opendir et al. are in -ldir and -lx on SCO Xenix.
30939if test $ac_header_dirent = dirent.h; then
30940  echo "$as_me:30940: checking for opendir in -ldir" >&5
30941echo $ECHO_N "checking for opendir in -ldir... $ECHO_C" >&6
30942if test "${ac_cv_lib_dir_opendir+set}" = set; then
30943  echo $ECHO_N "(cached) $ECHO_C" >&6
30944else
30945  ac_check_lib_save_LIBS=$LIBS
30946LIBS="-ldir  $LIBS"
30947cat >"conftest.$ac_ext" <<_ACEOF
30948#line 30948 "configure"
30949#include "confdefs.h"
30950
30951/* Override any gcc2 internal prototype to avoid an error.  */
30952#ifdef __cplusplus
30953extern "C"
30954#endif
30955/* We use char because int might match the return type of a gcc2
30956   builtin and then its argument prototype would still apply.  */
30957char opendir ();
30958int
30959main (void)
30960{
30961opendir ();
30962  ;
30963  return 0;
30964}
30965_ACEOF
30966rm -f "conftest.$ac_objext" "conftest$ac_exeext"
30967if { (eval echo "$as_me:30967: \"$ac_link\"") >&5
30968  (eval $ac_link) 2>&5
30969  ac_status=$?
30970  echo "$as_me:30970: \$? = $ac_status" >&5
30971  (exit "$ac_status"); } &&
30972         { ac_try='test -s "conftest$ac_exeext"'
30973  { (eval echo "$as_me:30973: \"$ac_try\"") >&5
30974  (eval $ac_try) 2>&5
30975  ac_status=$?
30976  echo "$as_me:30976: \$? = $ac_status" >&5
30977  (exit "$ac_status"); }; }; then
30978  ac_cv_lib_dir_opendir=yes
30979else
30980  echo "$as_me: failed program was:" >&5
30981cat "conftest.$ac_ext" >&5
30982ac_cv_lib_dir_opendir=no
30983fi
30984rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
30985LIBS=$ac_check_lib_save_LIBS
30986fi
30987echo "$as_me:30987: result: $ac_cv_lib_dir_opendir" >&5
30988echo "${ECHO_T}$ac_cv_lib_dir_opendir" >&6
30989if test "$ac_cv_lib_dir_opendir" = yes; then
30990  LIBS="$LIBS -ldir"
30991fi
30992
30993else
30994  echo "$as_me:30994: checking for opendir in -lx" >&5
30995echo $ECHO_N "checking for opendir in -lx... $ECHO_C" >&6
30996if test "${ac_cv_lib_x_opendir+set}" = set; then
30997  echo $ECHO_N "(cached) $ECHO_C" >&6
30998else
30999  ac_check_lib_save_LIBS=$LIBS
31000LIBS="-lx  $LIBS"
31001cat >"conftest.$ac_ext" <<_ACEOF
31002#line 31002 "configure"
31003#include "confdefs.h"
31004
31005/* Override any gcc2 internal prototype to avoid an error.  */
31006#ifdef __cplusplus
31007extern "C"
31008#endif
31009/* We use char because int might match the return type of a gcc2
31010   builtin and then its argument prototype would still apply.  */
31011char opendir ();
31012int
31013main (void)
31014{
31015opendir ();
31016  ;
31017  return 0;
31018}
31019_ACEOF
31020rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31021if { (eval echo "$as_me:31021: \"$ac_link\"") >&5
31022  (eval $ac_link) 2>&5
31023  ac_status=$?
31024  echo "$as_me:31024: \$? = $ac_status" >&5
31025  (exit "$ac_status"); } &&
31026         { ac_try='test -s "conftest$ac_exeext"'
31027  { (eval echo "$as_me:31027: \"$ac_try\"") >&5
31028  (eval $ac_try) 2>&5
31029  ac_status=$?
31030  echo "$as_me:31030: \$? = $ac_status" >&5
31031  (exit "$ac_status"); }; }; then
31032  ac_cv_lib_x_opendir=yes
31033else
31034  echo "$as_me: failed program was:" >&5
31035cat "conftest.$ac_ext" >&5
31036ac_cv_lib_x_opendir=no
31037fi
31038rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31039LIBS=$ac_check_lib_save_LIBS
31040fi
31041echo "$as_me:31041: result: $ac_cv_lib_x_opendir" >&5
31042echo "${ECHO_T}$ac_cv_lib_x_opendir" >&6
31043if test "$ac_cv_lib_x_opendir" = yes; then
31044  LIBS="$LIBS -lx"
31045fi
31046
31047fi
31048
31049for ac_header in \
31050	arpa/inet.h \
31051	fcntl.h \
31052	limits.h \
31053	stdlib.h \
31054	string.h \
31055	sys/fcntl.h \
31056	sys/filio.h \
31057	sys/ioctl.h \
31058	sys/param.h \
31059	sys/timeb.h \
31060	sys/time.h \
31061	syslog.h \
31062	termio.h \
31063	termios.h \
31064	unistd.h \
31065	vfork.h \
31066	wchar.h \
31067
31068do
31069as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31070echo "$as_me:31070: checking for $ac_header" >&5
31071echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31072if eval "test \"\${$as_ac_Header+set}\" = set"; then
31073  echo $ECHO_N "(cached) $ECHO_C" >&6
31074else
31075  cat >"conftest.$ac_ext" <<_ACEOF
31076#line 31076 "configure"
31077#include "confdefs.h"
31078#include <$ac_header>
31079_ACEOF
31080if { (eval echo "$as_me:31080: \"$ac_cpp "conftest.$ac_ext"\"") >&5
31081  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
31082  ac_status=$?
31083  $EGREP -v '^ *\+' conftest.er1 >conftest.err
31084  rm -f conftest.er1
31085  cat conftest.err >&5
31086  echo "$as_me:31086: \$? = $ac_status" >&5
31087  (exit "$ac_status"); } >/dev/null; then
31088  if test -s conftest.err; then
31089    ac_cpp_err=$ac_c_preproc_warn_flag
31090  else
31091    ac_cpp_err=
31092  fi
31093else
31094  ac_cpp_err=yes
31095fi
31096if test -z "$ac_cpp_err"; then
31097  eval "$as_ac_Header=yes"
31098else
31099  echo "$as_me: failed program was:" >&5
31100  cat "conftest.$ac_ext" >&5
31101  eval "$as_ac_Header=no"
31102fi
31103rm -f conftest.err "conftest.$ac_ext"
31104fi
31105echo "$as_me:31105: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
31106echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
31107if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
31108  cat >>confdefs.h <<EOF
31109#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31110EOF
31111
31112fi
31113done
31114
31115echo "$as_me:31115: checking termio.h and termios.h" >&5
31116echo $ECHO_N "checking termio.h and termios.h... $ECHO_C" >&6
31117if test "${cf_cv_termio_and_termios+set}" = set; then
31118  echo $ECHO_N "(cached) $ECHO_C" >&6
31119else
31120
31121    cat >"conftest.$ac_ext" <<_ACEOF
31122#line 31122 "configure"
31123#include "confdefs.h"
31124
31125#if HAVE_TERMIO_H
31126#include <termio.h>
31127#endif
31128#if HAVE_TERMIOS_H
31129#include <termios.h>
31130#endif
31131int
31132main (void)
31133{
31134putchar (0x0a)
31135  ;
31136  return 0;
31137}
31138_ACEOF
31139rm -f "conftest.$ac_objext"
31140if { (eval echo "$as_me:31140: \"$ac_compile\"") >&5
31141  (eval $ac_compile) 2>&5
31142  ac_status=$?
31143  echo "$as_me:31143: \$? = $ac_status" >&5
31144  (exit "$ac_status"); } &&
31145         { ac_try='test -s "conftest.$ac_objext"'
31146  { (eval echo "$as_me:31146: \"$ac_try\"") >&5
31147  (eval $ac_try) 2>&5
31148  ac_status=$?
31149  echo "$as_me:31149: \$? = $ac_status" >&5
31150  (exit "$ac_status"); }; }; then
31151  cf_cv_termio_and_termios=yes
31152else
31153  echo "$as_me: failed program was:" >&5
31154cat "conftest.$ac_ext" >&5
31155cf_cv_termio_and_termios=no
31156fi
31157rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31158fi
31159
31160echo "$as_me:31160: result: $cf_cv_termio_and_termios" >&5
31161echo "${ECHO_T}$cf_cv_termio_and_termios" >&6
31162test "$cf_cv_termio_and_termios" = no &&
31163cat >>confdefs.h <<\EOF
31164#define TERMIO_AND_TERMIOS 1
31165EOF
31166
31167echo "$as_me:31167: checking for sigaction and structs" >&5
31168echo $ECHO_N "checking for sigaction and structs... $ECHO_C" >&6
31169if test "${cf_cv_func_sigaction+set}" = set; then
31170  echo $ECHO_N "(cached) $ECHO_C" >&6
31171else
31172
31173cat >"conftest.$ac_ext" <<_ACEOF
31174#line 31174 "configure"
31175#include "confdefs.h"
31176
31177#include <sys/types.h>
31178#include <signal.h>
31179int
31180main (void)
31181{
31182struct sigaction act;
31183	act.sa_handler = SIG_DFL;
31184#ifdef SA_RESTART
31185	act.sa_flags |= SA_RESTART;
31186#endif /* SA_RESTART */
31187	sigaction(1, &act, 0);
31188
31189  ;
31190  return 0;
31191}
31192_ACEOF
31193rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31194if { (eval echo "$as_me:31194: \"$ac_link\"") >&5
31195  (eval $ac_link) 2>&5
31196  ac_status=$?
31197  echo "$as_me:31197: \$? = $ac_status" >&5
31198  (exit "$ac_status"); } &&
31199         { ac_try='test -s "conftest$ac_exeext"'
31200  { (eval echo "$as_me:31200: \"$ac_try\"") >&5
31201  (eval $ac_try) 2>&5
31202  ac_status=$?
31203  echo "$as_me:31203: \$? = $ac_status" >&5
31204  (exit "$ac_status"); }; }; then
31205  cf_cv_func_sigaction=yes
31206else
31207  echo "$as_me: failed program was:" >&5
31208cat "conftest.$ac_ext" >&5
31209cf_cv_func_sigaction=no
31210fi
31211rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31212
31213fi
31214echo "$as_me:31214: result: $cf_cv_func_sigaction" >&5
31215echo "${ECHO_T}$cf_cv_func_sigaction" >&6
31216test "$cf_cv_func_sigaction" = yes &&
31217cat >>confdefs.h <<\EOF
31218#define HAVE_SIGACTION 1
31219EOF
31220
31221for ac_header in sys/wait.h
31222do
31223as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31224echo "$as_me:31224: checking for $ac_header" >&5
31225echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31226if eval "test \"\${$as_ac_Header+set}\" = set"; then
31227  echo $ECHO_N "(cached) $ECHO_C" >&6
31228else
31229  cat >"conftest.$ac_ext" <<_ACEOF
31230#line 31230 "configure"
31231#include "confdefs.h"
31232#include <$ac_header>
31233_ACEOF
31234if { (eval echo "$as_me:31234: \"$ac_cpp "conftest.$ac_ext"\"") >&5
31235  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
31236  ac_status=$?
31237  $EGREP -v '^ *\+' conftest.er1 >conftest.err
31238  rm -f conftest.er1
31239  cat conftest.err >&5
31240  echo "$as_me:31240: \$? = $ac_status" >&5
31241  (exit "$ac_status"); } >/dev/null; then
31242  if test -s conftest.err; then
31243    ac_cpp_err=$ac_c_preproc_warn_flag
31244  else
31245    ac_cpp_err=
31246  fi
31247else
31248  ac_cpp_err=yes
31249fi
31250if test -z "$ac_cpp_err"; then
31251  eval "$as_ac_Header=yes"
31252else
31253  echo "$as_me: failed program was:" >&5
31254  cat "conftest.$ac_ext" >&5
31255  eval "$as_ac_Header=no"
31256fi
31257rm -f conftest.err "conftest.$ac_ext"
31258fi
31259echo "$as_me:31259: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
31260echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
31261if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
31262  cat >>confdefs.h <<EOF
31263#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31264EOF
31265
31266fi
31267done
31268
31269cf_wait_headers="#include <sys/types.h>
31270"
31271if test "$ac_cv_header_sys_wait_h" = yes; then
31272cf_wait_headers="$cf_wait_headers
31273#include <sys/wait.h>
31274"
31275else
31276
31277for ac_header in wait.h
31278do
31279as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31280echo "$as_me:31280: checking for $ac_header" >&5
31281echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31282if eval "test \"\${$as_ac_Header+set}\" = set"; then
31283  echo $ECHO_N "(cached) $ECHO_C" >&6
31284else
31285  cat >"conftest.$ac_ext" <<_ACEOF
31286#line 31286 "configure"
31287#include "confdefs.h"
31288#include <$ac_header>
31289_ACEOF
31290if { (eval echo "$as_me:31290: \"$ac_cpp "conftest.$ac_ext"\"") >&5
31291  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
31292  ac_status=$?
31293  $EGREP -v '^ *\+' conftest.er1 >conftest.err
31294  rm -f conftest.er1
31295  cat conftest.err >&5
31296  echo "$as_me:31296: \$? = $ac_status" >&5
31297  (exit "$ac_status"); } >/dev/null; then
31298  if test -s conftest.err; then
31299    ac_cpp_err=$ac_c_preproc_warn_flag
31300  else
31301    ac_cpp_err=
31302  fi
31303else
31304  ac_cpp_err=yes
31305fi
31306if test -z "$ac_cpp_err"; then
31307  eval "$as_ac_Header=yes"
31308else
31309  echo "$as_me: failed program was:" >&5
31310  cat "conftest.$ac_ext" >&5
31311  eval "$as_ac_Header=no"
31312fi
31313rm -f conftest.err "conftest.$ac_ext"
31314fi
31315echo "$as_me:31315: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
31316echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
31317if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
31318  cat >>confdefs.h <<EOF
31319#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31320EOF
31321
31322fi
31323done
31324
31325for ac_header in waitstatus.h
31326do
31327as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
31328echo "$as_me:31328: checking for $ac_header" >&5
31329echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
31330if eval "test \"\${$as_ac_Header+set}\" = set"; then
31331  echo $ECHO_N "(cached) $ECHO_C" >&6
31332else
31333  cat >"conftest.$ac_ext" <<_ACEOF
31334#line 31334 "configure"
31335#include "confdefs.h"
31336#include <$ac_header>
31337_ACEOF
31338if { (eval echo "$as_me:31338: \"$ac_cpp "conftest.$ac_ext"\"") >&5
31339  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
31340  ac_status=$?
31341  $EGREP -v '^ *\+' conftest.er1 >conftest.err
31342  rm -f conftest.er1
31343  cat conftest.err >&5
31344  echo "$as_me:31344: \$? = $ac_status" >&5
31345  (exit "$ac_status"); } >/dev/null; then
31346  if test -s conftest.err; then
31347    ac_cpp_err=$ac_c_preproc_warn_flag
31348  else
31349    ac_cpp_err=
31350  fi
31351else
31352  ac_cpp_err=yes
31353fi
31354if test -z "$ac_cpp_err"; then
31355  eval "$as_ac_Header=yes"
31356else
31357  echo "$as_me: failed program was:" >&5
31358  cat "conftest.$ac_ext" >&5
31359  eval "$as_ac_Header=no"
31360fi
31361rm -f conftest.err "conftest.$ac_ext"
31362fi
31363echo "$as_me:31363: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
31364echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
31365if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
31366  cat >>confdefs.h <<EOF
31367#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
31368EOF
31369
31370fi
31371done
31372
31373if test "$ac_cv_header_wait_h" = yes; then
31374cf_wait_headers="$cf_wait_headers
31375#include <wait.h>
31376"
31377fi
31378if test "$ac_cv_header_waitstatus_h" = yes; then
31379cf_wait_headers="$cf_wait_headers
31380#include <waitstatus.h>
31381"
31382fi
31383fi
31384
31385echo "$as_me:31385: checking for union wait" >&5
31386echo $ECHO_N "checking for union wait... $ECHO_C" >&6
31387if test "${cf_cv_type_unionwait+set}" = set; then
31388  echo $ECHO_N "(cached) $ECHO_C" >&6
31389else
31390
31391	cat >"conftest.$ac_ext" <<_ACEOF
31392#line 31392 "configure"
31393#include "confdefs.h"
31394$cf_wait_headers
31395int
31396main (void)
31397{
31398static int x;
31399	 int y = WEXITSTATUS(x);
31400	 int z = WTERMSIG(x);
31401	 wait(&x);
31402	 (void)x;
31403	 (void)y;
31404	 (void)z;
31405
31406  ;
31407  return 0;
31408}
31409_ACEOF
31410rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31411if { (eval echo "$as_me:31411: \"$ac_link\"") >&5
31412  (eval $ac_link) 2>&5
31413  ac_status=$?
31414  echo "$as_me:31414: \$? = $ac_status" >&5
31415  (exit "$ac_status"); } &&
31416         { ac_try='test -s "conftest$ac_exeext"'
31417  { (eval echo "$as_me:31417: \"$ac_try\"") >&5
31418  (eval $ac_try) 2>&5
31419  ac_status=$?
31420  echo "$as_me:31420: \$? = $ac_status" >&5
31421  (exit "$ac_status"); }; }; then
31422  cf_cv_type_unionwait=no
31423	 echo compiles ok w/o union wait 1>&5
31424
31425else
31426  echo "$as_me: failed program was:" >&5
31427cat "conftest.$ac_ext" >&5
31428
31429	cat >"conftest.$ac_ext" <<_ACEOF
31430#line 31430 "configure"
31431#include "confdefs.h"
31432$cf_wait_headers
31433int
31434main (void)
31435{
31436union wait x;
31437#ifdef WEXITSTATUS
31438	 int y = WEXITSTATUS(x);
31439#endif
31440#ifdef WTERMSIG
31441	 int z = WTERMSIG(x);
31442#endif
31443	 wait(&x);
31444	 (void)x;
31445#ifdef WEXITSTATUS
31446	 (void)y;
31447#endif
31448#ifdef WTERMSIG
31449	 (void)z;
31450#endif
31451
31452  ;
31453  return 0;
31454}
31455_ACEOF
31456rm -f "conftest.$ac_objext" "conftest$ac_exeext"
31457if { (eval echo "$as_me:31457: \"$ac_link\"") >&5
31458  (eval $ac_link) 2>&5
31459  ac_status=$?
31460  echo "$as_me:31460: \$? = $ac_status" >&5
31461  (exit "$ac_status"); } &&
31462         { ac_try='test -s "conftest$ac_exeext"'
31463  { (eval echo "$as_me:31463: \"$ac_try\"") >&5
31464  (eval $ac_try) 2>&5
31465  ac_status=$?
31466  echo "$as_me:31466: \$? = $ac_status" >&5
31467  (exit "$ac_status"); }; }; then
31468  cf_cv_type_unionwait=yes
31469	 echo compiles ok with union wait and possibly macros too 1>&5
31470
31471else
31472  echo "$as_me: failed program was:" >&5
31473cat "conftest.$ac_ext" >&5
31474cf_cv_type_unionwait=no
31475fi
31476rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31477fi
31478rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
31479fi
31480
31481echo "$as_me:31481: result: $cf_cv_type_unionwait" >&5
31482echo "${ECHO_T}$cf_cv_type_unionwait" >&6
31483test "$cf_cv_type_unionwait" = yes &&
31484cat >>confdefs.h <<\EOF
31485#define HAVE_TYPE_UNIONWAIT 1
31486EOF
31487
31488if test "$cf_cv_type_unionwait" = yes; then
31489
31490	echo "$as_me:31490: checking if union wait can be used as wait-arg" >&5
31491echo $ECHO_N "checking if union wait can be used as wait-arg... $ECHO_C" >&6
31492	if test "${cf_cv_arg_union_wait+set}" = set; then
31493  echo $ECHO_N "(cached) $ECHO_C" >&6
31494else
31495
31496		cat >"conftest.$ac_ext" <<_ACEOF
31497#line 31497 "configure"
31498#include "confdefs.h"
31499$cf_wait_headers
31500int
31501main (void)
31502{
31503union wait x; wait(&x)
31504  ;
31505  return 0;
31506}
31507_ACEOF
31508rm -f "conftest.$ac_objext"
31509if { (eval echo "$as_me:31509: \"$ac_compile\"") >&5
31510  (eval $ac_compile) 2>&5
31511  ac_status=$?
31512  echo "$as_me:31512: \$? = $ac_status" >&5
31513  (exit "$ac_status"); } &&
31514         { ac_try='test -s "conftest.$ac_objext"'
31515  { (eval echo "$as_me:31515: \"$ac_try\"") >&5
31516  (eval $ac_try) 2>&5
31517  ac_status=$?
31518  echo "$as_me:31518: \$? = $ac_status" >&5
31519  (exit "$ac_status"); }; }; then
31520  cf_cv_arg_union_wait=yes
31521else
31522  echo "$as_me: failed program was:" >&5
31523cat "conftest.$ac_ext" >&5
31524cf_cv_arg_union_wait=no
31525fi
31526rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31527
31528fi
31529
31530	echo "$as_me:31530: result: $cf_cv_arg_union_wait" >&5
31531echo "${ECHO_T}$cf_cv_arg_union_wait" >&6
31532	test "$cf_cv_arg_union_wait" = yes &&
31533cat >>confdefs.h <<\EOF
31534#define WAIT_USES_UNION 1
31535EOF
31536
31537	echo "$as_me:31537: checking if union wait can be used as waitpid-arg" >&5
31538echo $ECHO_N "checking if union wait can be used as waitpid-arg... $ECHO_C" >&6
31539	if test "${cf_cv_arg_union_waitpid+set}" = set; then
31540  echo $ECHO_N "(cached) $ECHO_C" >&6
31541else
31542
31543		cat >"conftest.$ac_ext" <<_ACEOF
31544#line 31544 "configure"
31545#include "confdefs.h"
31546$cf_wait_headers
31547int
31548main (void)
31549{
31550union wait x; waitpid(0, &x, 0)
31551  ;
31552  return 0;
31553}
31554_ACEOF
31555rm -f "conftest.$ac_objext"
31556if { (eval echo "$as_me:31556: \"$ac_compile\"") >&5
31557  (eval $ac_compile) 2>&5
31558  ac_status=$?
31559  echo "$as_me:31559: \$? = $ac_status" >&5
31560  (exit "$ac_status"); } &&
31561         { ac_try='test -s "conftest.$ac_objext"'
31562  { (eval echo "$as_me:31562: \"$ac_try\"") >&5
31563  (eval $ac_try) 2>&5
31564  ac_status=$?
31565  echo "$as_me:31565: \$? = $ac_status" >&5
31566  (exit "$ac_status"); }; }; then
31567  cf_cv_arg_union_waitpid=yes
31568else
31569  echo "$as_me: failed program was:" >&5
31570cat "conftest.$ac_ext" >&5
31571cf_cv_arg_union_waitpid=no
31572fi
31573rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31574
31575fi
31576
31577	echo "$as_me:31577: result: $cf_cv_arg_union_waitpid" >&5
31578echo "${ECHO_T}$cf_cv_arg_union_waitpid" >&6
31579	test "$cf_cv_arg_union_waitpid" = yes &&
31580cat >>confdefs.h <<\EOF
31581#define WAITPID_USES_UNION 1
31582EOF
31583
31584fi
31585
31586echo "$as_me:31586: checking for uid_t in sys/types.h" >&5
31587echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
31588if test "${ac_cv_type_uid_t+set}" = set; then
31589  echo $ECHO_N "(cached) $ECHO_C" >&6
31590else
31591  cat >"conftest.$ac_ext" <<_ACEOF
31592#line 31592 "configure"
31593#include "confdefs.h"
31594#include <sys/types.h>
31595
31596_ACEOF
31597if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31598  $EGREP "uid_t" >/dev/null 2>&1; then
31599  ac_cv_type_uid_t=yes
31600else
31601  ac_cv_type_uid_t=no
31602fi
31603rm -rf conftest*
31604
31605fi
31606echo "$as_me:31606: result: $ac_cv_type_uid_t" >&5
31607echo "${ECHO_T}$ac_cv_type_uid_t" >&6
31608if test $ac_cv_type_uid_t = no; then
31609
31610cat >>confdefs.h <<\EOF
31611#define uid_t int
31612EOF
31613
31614cat >>confdefs.h <<\EOF
31615#define gid_t int
31616EOF
31617
31618fi
31619
31620echo "$as_me:31620: checking type of array argument to getgroups" >&5
31621echo $ECHO_N "checking type of array argument to getgroups... $ECHO_C" >&6
31622if test "${ac_cv_type_getgroups+set}" = set; then
31623  echo $ECHO_N "(cached) $ECHO_C" >&6
31624else
31625  if test "$cross_compiling" = yes; then
31626  ac_cv_type_getgroups=cross
31627else
31628  cat >"conftest.$ac_ext" <<_ACEOF
31629#line 31629 "configure"
31630#include "confdefs.h"
31631/* Thanks to Mike Rendell for this test.  */
31632#include <sys/types.h>
31633#define NGID 256
31634#undef MAX
31635#define MAX(x, y) ((x) > (y) ? (x) : (y))
31636
31637int
31638main (void)
31639{
31640  gid_t gidset[NGID];
31641  int i, n;
31642  union { gid_t gval; long lval; }  val;
31643
31644  val.lval = -1;
31645  for (i = 0; i < NGID; i++)
31646    gidset[i] = val.gval;
31647  n = getgroups (sizeof (gidset) / MAX (sizeof (int), sizeof (gid_t)) - 1,
31648                 gidset);
31649  /* Exit non-zero if getgroups seems to require an array of ints.  This
31650     happens when gid_t is short but getgroups modifies an array of ints.  */
31651  $ac_main_return ((n > 0 && gidset[n] != val.gval) ? 1 : 0);
31652}
31653_ACEOF
31654rm -f "conftest$ac_exeext"
31655if { (eval echo "$as_me:31655: \"$ac_link\"") >&5
31656  (eval $ac_link) 2>&5
31657  ac_status=$?
31658  echo "$as_me:31658: \$? = $ac_status" >&5
31659  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
31660  { (eval echo "$as_me:31660: \"$ac_try\"") >&5
31661  (eval $ac_try) 2>&5
31662  ac_status=$?
31663  echo "$as_me:31663: \$? = $ac_status" >&5
31664  (exit "$ac_status"); }; }; then
31665  ac_cv_type_getgroups=gid_t
31666else
31667  echo "$as_me: program exited with status $ac_status" >&5
31668echo "$as_me: failed program was:" >&5
31669cat "conftest.$ac_ext" >&5
31670ac_cv_type_getgroups=int
31671fi
31672rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
31673fi
31674if test $ac_cv_type_getgroups = cross; then
31675        cat >"conftest.$ac_ext" <<_ACEOF
31676#line 31676 "configure"
31677#include "confdefs.h"
31678#include <unistd.h>
31679
31680_ACEOF
31681if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31682  $EGREP "getgroups.*int.*gid_t" >/dev/null 2>&1; then
31683  ac_cv_type_getgroups=gid_t
31684else
31685  ac_cv_type_getgroups=int
31686fi
31687rm -rf conftest*
31688
31689fi
31690fi
31691echo "$as_me:31691: result: $ac_cv_type_getgroups" >&5
31692echo "${ECHO_T}$ac_cv_type_getgroups" >&6
31693
31694cat >>confdefs.h <<EOF
31695#define GETGROUPS_T $ac_cv_type_getgroups
31696EOF
31697
31698echo "$as_me:31698: checking for off_t" >&5
31699echo $ECHO_N "checking for off_t... $ECHO_C" >&6
31700if test "${ac_cv_type_off_t+set}" = set; then
31701  echo $ECHO_N "(cached) $ECHO_C" >&6
31702else
31703  cat >"conftest.$ac_ext" <<_ACEOF
31704#line 31704 "configure"
31705#include "confdefs.h"
31706$ac_includes_default
31707int
31708main (void)
31709{
31710if ((off_t *) 0)
31711  return 0;
31712if (sizeof (off_t))
31713  return 0;
31714  ;
31715  return 0;
31716}
31717_ACEOF
31718rm -f "conftest.$ac_objext"
31719if { (eval echo "$as_me:31719: \"$ac_compile\"") >&5
31720  (eval $ac_compile) 2>&5
31721  ac_status=$?
31722  echo "$as_me:31722: \$? = $ac_status" >&5
31723  (exit "$ac_status"); } &&
31724         { ac_try='test -s "conftest.$ac_objext"'
31725  { (eval echo "$as_me:31725: \"$ac_try\"") >&5
31726  (eval $ac_try) 2>&5
31727  ac_status=$?
31728  echo "$as_me:31728: \$? = $ac_status" >&5
31729  (exit "$ac_status"); }; }; then
31730  ac_cv_type_off_t=yes
31731else
31732  echo "$as_me: failed program was:" >&5
31733cat "conftest.$ac_ext" >&5
31734ac_cv_type_off_t=no
31735fi
31736rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31737fi
31738echo "$as_me:31738: result: $ac_cv_type_off_t" >&5
31739echo "${ECHO_T}$ac_cv_type_off_t" >&6
31740if test "$ac_cv_type_off_t" = yes; then
31741  :
31742else
31743
31744cat >>confdefs.h <<EOF
31745#define off_t long
31746EOF
31747
31748fi
31749
31750echo "$as_me:31750: checking for pid_t" >&5
31751echo $ECHO_N "checking for pid_t... $ECHO_C" >&6
31752if test "${ac_cv_type_pid_t+set}" = set; then
31753  echo $ECHO_N "(cached) $ECHO_C" >&6
31754else
31755  cat >"conftest.$ac_ext" <<_ACEOF
31756#line 31756 "configure"
31757#include "confdefs.h"
31758$ac_includes_default
31759int
31760main (void)
31761{
31762if ((pid_t *) 0)
31763  return 0;
31764if (sizeof (pid_t))
31765  return 0;
31766  ;
31767  return 0;
31768}
31769_ACEOF
31770rm -f "conftest.$ac_objext"
31771if { (eval echo "$as_me:31771: \"$ac_compile\"") >&5
31772  (eval $ac_compile) 2>&5
31773  ac_status=$?
31774  echo "$as_me:31774: \$? = $ac_status" >&5
31775  (exit "$ac_status"); } &&
31776         { ac_try='test -s "conftest.$ac_objext"'
31777  { (eval echo "$as_me:31777: \"$ac_try\"") >&5
31778  (eval $ac_try) 2>&5
31779  ac_status=$?
31780  echo "$as_me:31780: \$? = $ac_status" >&5
31781  (exit "$ac_status"); }; }; then
31782  ac_cv_type_pid_t=yes
31783else
31784  echo "$as_me: failed program was:" >&5
31785cat "conftest.$ac_ext" >&5
31786ac_cv_type_pid_t=no
31787fi
31788rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31789fi
31790echo "$as_me:31790: result: $ac_cv_type_pid_t" >&5
31791echo "${ECHO_T}$ac_cv_type_pid_t" >&6
31792if test "$ac_cv_type_pid_t" = yes; then
31793  :
31794else
31795
31796cat >>confdefs.h <<EOF
31797#define pid_t int
31798EOF
31799
31800fi
31801
31802echo "$as_me:31802: checking for uid_t in sys/types.h" >&5
31803echo $ECHO_N "checking for uid_t in sys/types.h... $ECHO_C" >&6
31804if test "${ac_cv_type_uid_t+set}" = set; then
31805  echo $ECHO_N "(cached) $ECHO_C" >&6
31806else
31807  cat >"conftest.$ac_ext" <<_ACEOF
31808#line 31808 "configure"
31809#include "confdefs.h"
31810#include <sys/types.h>
31811
31812_ACEOF
31813if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
31814  $EGREP "uid_t" >/dev/null 2>&1; then
31815  ac_cv_type_uid_t=yes
31816else
31817  ac_cv_type_uid_t=no
31818fi
31819rm -rf conftest*
31820
31821fi
31822echo "$as_me:31822: result: $ac_cv_type_uid_t" >&5
31823echo "${ECHO_T}$ac_cv_type_uid_t" >&6
31824if test $ac_cv_type_uid_t = no; then
31825
31826cat >>confdefs.h <<\EOF
31827#define uid_t int
31828EOF
31829
31830cat >>confdefs.h <<\EOF
31831#define gid_t int
31832EOF
31833
31834fi
31835
31836echo "$as_me:31836: checking for mode_t" >&5
31837echo $ECHO_N "checking for mode_t... $ECHO_C" >&6
31838if test "${ac_cv_type_mode_t+set}" = set; then
31839  echo $ECHO_N "(cached) $ECHO_C" >&6
31840else
31841  cat >"conftest.$ac_ext" <<_ACEOF
31842#line 31842 "configure"
31843#include "confdefs.h"
31844$ac_includes_default
31845int
31846main (void)
31847{
31848if ((mode_t *) 0)
31849  return 0;
31850if (sizeof (mode_t))
31851  return 0;
31852  ;
31853  return 0;
31854}
31855_ACEOF
31856rm -f "conftest.$ac_objext"
31857if { (eval echo "$as_me:31857: \"$ac_compile\"") >&5
31858  (eval $ac_compile) 2>&5
31859  ac_status=$?
31860  echo "$as_me:31860: \$? = $ac_status" >&5
31861  (exit "$ac_status"); } &&
31862         { ac_try='test -s "conftest.$ac_objext"'
31863  { (eval echo "$as_me:31863: \"$ac_try\"") >&5
31864  (eval $ac_try) 2>&5
31865  ac_status=$?
31866  echo "$as_me:31866: \$? = $ac_status" >&5
31867  (exit "$ac_status"); }; }; then
31868  ac_cv_type_mode_t=yes
31869else
31870  echo "$as_me: failed program was:" >&5
31871cat "conftest.$ac_ext" >&5
31872ac_cv_type_mode_t=no
31873fi
31874rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31875fi
31876echo "$as_me:31876: result: $ac_cv_type_mode_t" >&5
31877echo "${ECHO_T}$ac_cv_type_mode_t" >&6
31878if test "$ac_cv_type_mode_t" = yes; then
31879  :
31880else
31881
31882cat >>confdefs.h <<EOF
31883#define mode_t int
31884EOF
31885
31886fi
31887
31888	echo "$as_me:31888: checking for ssize_t" >&5
31889echo $ECHO_N "checking for ssize_t... $ECHO_C" >&6
31890if test "${ac_cv_type_ssize_t+set}" = set; then
31891  echo $ECHO_N "(cached) $ECHO_C" >&6
31892else
31893  cat >"conftest.$ac_ext" <<_ACEOF
31894#line 31894 "configure"
31895#include "confdefs.h"
31896$ac_includes_default
31897int
31898main (void)
31899{
31900if ((ssize_t *) 0)
31901  return 0;
31902if (sizeof (ssize_t))
31903  return 0;
31904  ;
31905  return 0;
31906}
31907_ACEOF
31908rm -f "conftest.$ac_objext"
31909if { (eval echo "$as_me:31909: \"$ac_compile\"") >&5
31910  (eval $ac_compile) 2>&5
31911  ac_status=$?
31912  echo "$as_me:31912: \$? = $ac_status" >&5
31913  (exit "$ac_status"); } &&
31914         { ac_try='test -s "conftest.$ac_objext"'
31915  { (eval echo "$as_me:31915: \"$ac_try\"") >&5
31916  (eval $ac_try) 2>&5
31917  ac_status=$?
31918  echo "$as_me:31918: \$? = $ac_status" >&5
31919  (exit "$ac_status"); }; }; then
31920  ac_cv_type_ssize_t=yes
31921else
31922  echo "$as_me: failed program was:" >&5
31923cat "conftest.$ac_ext" >&5
31924ac_cv_type_ssize_t=no
31925fi
31926rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31927fi
31928echo "$as_me:31928: result: $ac_cv_type_ssize_t" >&5
31929echo "${ECHO_T}$ac_cv_type_ssize_t" >&6
31930if test "$ac_cv_type_ssize_t" = yes; then
31931  ac_cv_type_ssize_t=yes
31932else
31933  ac_cv_type_ssize_t=no
31934fi
31935
31936	if test "$ac_cv_type_ssize_t" = no; then
31937
31938cat >>confdefs.h <<\EOF
31939#define ssize_t int
31940EOF
31941
31942fi
31943
31944	echo "$as_me:31944: checking for socklen_t" >&5
31945echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
31946if test "${ac_cv_type_socklen_t+set}" = set; then
31947  echo $ECHO_N "(cached) $ECHO_C" >&6
31948else
31949  cat >"conftest.$ac_ext" <<_ACEOF
31950#line 31950 "configure"
31951#include "confdefs.h"
31952
31953#include <sys/types.h>
31954#include <sys/socket.h>
31955
31956int
31957main (void)
31958{
31959if ((socklen_t *) 0)
31960  return 0;
31961if (sizeof (socklen_t))
31962  return 0;
31963  ;
31964  return 0;
31965}
31966_ACEOF
31967rm -f "conftest.$ac_objext"
31968if { (eval echo "$as_me:31968: \"$ac_compile\"") >&5
31969  (eval $ac_compile) 2>&5
31970  ac_status=$?
31971  echo "$as_me:31971: \$? = $ac_status" >&5
31972  (exit "$ac_status"); } &&
31973         { ac_try='test -s "conftest.$ac_objext"'
31974  { (eval echo "$as_me:31974: \"$ac_try\"") >&5
31975  (eval $ac_try) 2>&5
31976  ac_status=$?
31977  echo "$as_me:31977: \$? = $ac_status" >&5
31978  (exit "$ac_status"); }; }; then
31979  ac_cv_type_socklen_t=yes
31980else
31981  echo "$as_me: failed program was:" >&5
31982cat "conftest.$ac_ext" >&5
31983ac_cv_type_socklen_t=no
31984fi
31985rm -f "conftest.$ac_objext" "conftest.$ac_ext"
31986fi
31987echo "$as_me:31987: result: $ac_cv_type_socklen_t" >&5
31988echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
31989if test "$ac_cv_type_socklen_t" = yes; then
31990  ac_cv_type_socklen_t=yes
31991else
31992  ac_cv_type_socklen_t=no
31993fi
31994
31995	if test "$ac_cv_type_socklen_t" = no; then
31996
31997cat >>confdefs.h <<\EOF
31998#define socklen_t int
31999EOF
32000
32001fi
32002
32003echo "$as_me:32003: checking for long long type" >&5
32004echo $ECHO_N "checking for long long type... $ECHO_C" >&6
32005if test "${cf_cv_type_long_long+set}" = set; then
32006  echo $ECHO_N "(cached) $ECHO_C" >&6
32007else
32008
32009	cat >conftest.$ac_ext <<_CFEOF
32010#include "confdefs.h"
32011int
32012main (void)
32013{
32014	long long foo = 123456789123456789LL;
32015	return (foo == 0);
32016}
32017_CFEOF
32018	(eval "$ac_compile") 2>conftest.err
32019	ac_status=$?
32020	if test "$ac_status" = 0 && test -s conftest.err
32021	then
32022		${FGREP-fgrep} warning conftest.err >/dev/null 2>&1 && ac_status=1
32023	fi
32024	if test "$ac_status" != 0
32025	then
32026		cf_cv_type_long_long=no
32027	else
32028		cf_cv_type_long_long=yes
32029	fi
32030	test -s conftest.err && cat conftest.err >&5
32031	rm -f conftest*
32032
32033fi
32034echo "$as_me:32034: result: $cf_cv_type_long_long" >&5
32035echo "${ECHO_T}$cf_cv_type_long_long" >&6
32036
32037if test "$cf_cv_type_long_long" = yes ; then
32038
32039cat >>confdefs.h <<\EOF
32040#define HAVE_LONG_LONG 1
32041EOF
32042
32043fi
32044
32045echo "$as_me:32045: checking for tm.tm_gmtoff" >&5
32046echo $ECHO_N "checking for tm.tm_gmtoff... $ECHO_C" >&6
32047if test "${cf_cv_tm_gmtoff+set}" = set; then
32048  echo $ECHO_N "(cached) $ECHO_C" >&6
32049else
32050
32051	cat >"conftest.$ac_ext" <<_ACEOF
32052#line 32052 "configure"
32053#include "confdefs.h"
32054
32055#ifdef TIME_WITH_SYS_TIME
32056#	include <sys/time.h>
32057#	include <time.h>
32058#else
32059#	ifdef HAVE_SYS_TIME_H
32060#		include <sys/time.h>
32061#	else
32062#		include <time.h>
32063#	endif
32064#endif
32065
32066int
32067main (void)
32068{
32069
32070	static struct tm foo;
32071	long bar = foo.tm_gmtoff; (void) bar
32072  ;
32073  return 0;
32074}
32075_ACEOF
32076rm -f "conftest.$ac_objext"
32077if { (eval echo "$as_me:32077: \"$ac_compile\"") >&5
32078  (eval $ac_compile) 2>&5
32079  ac_status=$?
32080  echo "$as_me:32080: \$? = $ac_status" >&5
32081  (exit "$ac_status"); } &&
32082         { ac_try='test -s "conftest.$ac_objext"'
32083  { (eval echo "$as_me:32083: \"$ac_try\"") >&5
32084  (eval $ac_try) 2>&5
32085  ac_status=$?
32086  echo "$as_me:32086: \$? = $ac_status" >&5
32087  (exit "$ac_status"); }; }; then
32088  cf_cv_tm_gmtoff=yes
32089else
32090  echo "$as_me: failed program was:" >&5
32091cat "conftest.$ac_ext" >&5
32092cf_cv_tm_gmtoff=no
32093fi
32094rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32095fi
32096
32097echo "$as_me:32097: result: $cf_cv_tm_gmtoff" >&5
32098echo "${ECHO_T}$cf_cv_tm_gmtoff" >&6
32099test "$cf_cv_tm_gmtoff" = no &&
32100cat >>confdefs.h <<\EOF
32101#define DONT_HAVE_TM_GMTOFF 1
32102EOF
32103
32104echo "$as_me:32104: checking for int" >&5
32105echo $ECHO_N "checking for int... $ECHO_C" >&6
32106if test "${ac_cv_type_int+set}" = set; then
32107  echo $ECHO_N "(cached) $ECHO_C" >&6
32108else
32109  cat >"conftest.$ac_ext" <<_ACEOF
32110#line 32110 "configure"
32111#include "confdefs.h"
32112$ac_includes_default
32113int
32114main (void)
32115{
32116if ((int *) 0)
32117  return 0;
32118if (sizeof (int))
32119  return 0;
32120  ;
32121  return 0;
32122}
32123_ACEOF
32124rm -f "conftest.$ac_objext"
32125if { (eval echo "$as_me:32125: \"$ac_compile\"") >&5
32126  (eval $ac_compile) 2>&5
32127  ac_status=$?
32128  echo "$as_me:32128: \$? = $ac_status" >&5
32129  (exit "$ac_status"); } &&
32130         { ac_try='test -s "conftest.$ac_objext"'
32131  { (eval echo "$as_me:32131: \"$ac_try\"") >&5
32132  (eval $ac_try) 2>&5
32133  ac_status=$?
32134  echo "$as_me:32134: \$? = $ac_status" >&5
32135  (exit "$ac_status"); }; }; then
32136  ac_cv_type_int=yes
32137else
32138  echo "$as_me: failed program was:" >&5
32139cat "conftest.$ac_ext" >&5
32140ac_cv_type_int=no
32141fi
32142rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32143fi
32144echo "$as_me:32144: result: $ac_cv_type_int" >&5
32145echo "${ECHO_T}$ac_cv_type_int" >&6
32146
32147echo "$as_me:32147: checking size of int" >&5
32148echo $ECHO_N "checking size of int... $ECHO_C" >&6
32149if test "${ac_cv_sizeof_int+set}" = set; then
32150  echo $ECHO_N "(cached) $ECHO_C" >&6
32151else
32152  if test "$ac_cv_type_int" = yes; then
32153  if test "$cross_compiling" = yes; then
32154  # Depending upon the size, compute the lo and hi bounds.
32155cat >"conftest.$ac_ext" <<_ACEOF
32156#line 32156 "configure"
32157#include "confdefs.h"
32158$ac_includes_default
32159int
32160main (void)
32161{
32162int _array_ [1 - 2 * !((sizeof (int)) >= 0)]
32163  ;
32164  return 0;
32165}
32166_ACEOF
32167rm -f "conftest.$ac_objext"
32168if { (eval echo "$as_me:32168: \"$ac_compile\"") >&5
32169  (eval $ac_compile) 2>&5
32170  ac_status=$?
32171  echo "$as_me:32171: \$? = $ac_status" >&5
32172  (exit "$ac_status"); } &&
32173         { ac_try='test -s "conftest.$ac_objext"'
32174  { (eval echo "$as_me:32174: \"$ac_try\"") >&5
32175  (eval $ac_try) 2>&5
32176  ac_status=$?
32177  echo "$as_me:32177: \$? = $ac_status" >&5
32178  (exit "$ac_status"); }; }; then
32179  ac_lo=0 ac_mid=0
32180  while :; do
32181    cat >"conftest.$ac_ext" <<_ACEOF
32182#line 32182 "configure"
32183#include "confdefs.h"
32184$ac_includes_default
32185int
32186main (void)
32187{
32188int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
32189  ;
32190  return 0;
32191}
32192_ACEOF
32193rm -f "conftest.$ac_objext"
32194if { (eval echo "$as_me:32194: \"$ac_compile\"") >&5
32195  (eval $ac_compile) 2>&5
32196  ac_status=$?
32197  echo "$as_me:32197: \$? = $ac_status" >&5
32198  (exit "$ac_status"); } &&
32199         { ac_try='test -s "conftest.$ac_objext"'
32200  { (eval echo "$as_me:32200: \"$ac_try\"") >&5
32201  (eval $ac_try) 2>&5
32202  ac_status=$?
32203  echo "$as_me:32203: \$? = $ac_status" >&5
32204  (exit "$ac_status"); }; }; then
32205  ac_hi=$ac_mid; break
32206else
32207  echo "$as_me: failed program was:" >&5
32208cat "conftest.$ac_ext" >&5
32209ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
32210fi
32211rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32212  done
32213else
32214  echo "$as_me: failed program was:" >&5
32215cat "conftest.$ac_ext" >&5
32216ac_hi=-1 ac_mid=-1
32217  while :; do
32218    cat >"conftest.$ac_ext" <<_ACEOF
32219#line 32219 "configure"
32220#include "confdefs.h"
32221$ac_includes_default
32222int
32223main (void)
32224{
32225int _array_ [1 - 2 * !((sizeof (int)) >= $ac_mid)]
32226  ;
32227  return 0;
32228}
32229_ACEOF
32230rm -f "conftest.$ac_objext"
32231if { (eval echo "$as_me:32231: \"$ac_compile\"") >&5
32232  (eval $ac_compile) 2>&5
32233  ac_status=$?
32234  echo "$as_me:32234: \$? = $ac_status" >&5
32235  (exit "$ac_status"); } &&
32236         { ac_try='test -s "conftest.$ac_objext"'
32237  { (eval echo "$as_me:32237: \"$ac_try\"") >&5
32238  (eval $ac_try) 2>&5
32239  ac_status=$?
32240  echo "$as_me:32240: \$? = $ac_status" >&5
32241  (exit "$ac_status"); }; }; then
32242  ac_lo=$ac_mid; break
32243else
32244  echo "$as_me: failed program was:" >&5
32245cat "conftest.$ac_ext" >&5
32246ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
32247fi
32248rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32249  done
32250fi
32251rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32252# Binary search between lo and hi bounds.
32253while test "x$ac_lo" != "x$ac_hi"; do
32254  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
32255  cat >"conftest.$ac_ext" <<_ACEOF
32256#line 32256 "configure"
32257#include "confdefs.h"
32258$ac_includes_default
32259int
32260main (void)
32261{
32262int _array_ [1 - 2 * !((sizeof (int)) <= $ac_mid)]
32263  ;
32264  return 0;
32265}
32266_ACEOF
32267rm -f "conftest.$ac_objext"
32268if { (eval echo "$as_me:32268: \"$ac_compile\"") >&5
32269  (eval $ac_compile) 2>&5
32270  ac_status=$?
32271  echo "$as_me:32271: \$? = $ac_status" >&5
32272  (exit "$ac_status"); } &&
32273         { ac_try='test -s "conftest.$ac_objext"'
32274  { (eval echo "$as_me:32274: \"$ac_try\"") >&5
32275  (eval $ac_try) 2>&5
32276  ac_status=$?
32277  echo "$as_me:32277: \$? = $ac_status" >&5
32278  (exit "$ac_status"); }; }; then
32279  ac_hi=$ac_mid
32280else
32281  echo "$as_me: failed program was:" >&5
32282cat "conftest.$ac_ext" >&5
32283ac_lo=`expr "$ac_mid" + 1`
32284fi
32285rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32286done
32287ac_cv_sizeof_int=$ac_lo
32288else
32289  if test "$cross_compiling" = yes; then
32290  { { echo "$as_me:32290: error: cannot run test program while cross compiling" >&5
32291echo "$as_me: error: cannot run test program while cross compiling" >&2;}
32292   { (exit 1); exit 1; }; }
32293else
32294  cat >"conftest.$ac_ext" <<_ACEOF
32295#line 32295 "configure"
32296#include "confdefs.h"
32297$ac_includes_default
32298int
32299main (void)
32300{
32301FILE *f = fopen ("conftest.val", "w");
32302if (!f)
32303  $ac_main_return (1);
32304fprintf (f, "%ld", (long)(sizeof (int)));
32305fclose (f);
32306  ;
32307  return 0;
32308}
32309_ACEOF
32310rm -f "conftest$ac_exeext"
32311if { (eval echo "$as_me:32311: \"$ac_link\"") >&5
32312  (eval $ac_link) 2>&5
32313  ac_status=$?
32314  echo "$as_me:32314: \$? = $ac_status" >&5
32315  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
32316  { (eval echo "$as_me:32316: \"$ac_try\"") >&5
32317  (eval $ac_try) 2>&5
32318  ac_status=$?
32319  echo "$as_me:32319: \$? = $ac_status" >&5
32320  (exit "$ac_status"); }; }; then
32321  ac_cv_sizeof_int=`cat conftest.val`
32322else
32323  echo "$as_me: program exited with status $ac_status" >&5
32324echo "$as_me: failed program was:" >&5
32325cat "conftest.$ac_ext" >&5
32326fi
32327rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
32328fi
32329fi
32330rm -f conftest.val
32331else
32332  ac_cv_sizeof_int=0
32333fi
32334fi
32335echo "$as_me:32335: result: $ac_cv_sizeof_int" >&5
32336echo "${ECHO_T}$ac_cv_sizeof_int" >&6
32337cat >>confdefs.h <<EOF
32338#define SIZEOF_INT $ac_cv_sizeof_int
32339EOF
32340
32341if test "${ac_cv_type_int+set}" = set; then
32342	cf_cv_sizeof="$ac_cv_sizeof_int"
32343	if test "${ac_cv_sizeof_int+set}" != set; then
32344		{ echo "$as_me:32344: WARNING: using 4 for sizeof int" >&5
32345echo "$as_me: WARNING: using 4 for sizeof int" >&2;}
32346		ac_cv_sizeof_int=4
32347	elif test "x${ac_cv_sizeof_int}" = x0; then
32348		{ echo "$as_me:32348: WARNING: sizeof int not found, using 4" >&5
32349echo "$as_me: WARNING: sizeof int not found, using 4" >&2;}
32350		ac_cv_sizeof_int=4
32351	fi
32352	if test "x$ac_cv_sizeof_int" != "x$cf_cv_sizeof"
32353	then
32354
32355cf_cv_type=`echo "sizeof_int" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
32356
32357		sed -e "s/\\([ 	]${cf_cv_type}[ 	]\\).*/\\1$ac_cv_sizeof_int/" confdefs.h >conftest.val
32358		mv conftest.val confdefs.h
32359	fi
32360fi
32361
32362echo "$as_me:32362: checking for long" >&5
32363echo $ECHO_N "checking for long... $ECHO_C" >&6
32364if test "${ac_cv_type_long+set}" = set; then
32365  echo $ECHO_N "(cached) $ECHO_C" >&6
32366else
32367  cat >"conftest.$ac_ext" <<_ACEOF
32368#line 32368 "configure"
32369#include "confdefs.h"
32370$ac_includes_default
32371int
32372main (void)
32373{
32374if ((long *) 0)
32375  return 0;
32376if (sizeof (long))
32377  return 0;
32378  ;
32379  return 0;
32380}
32381_ACEOF
32382rm -f "conftest.$ac_objext"
32383if { (eval echo "$as_me:32383: \"$ac_compile\"") >&5
32384  (eval $ac_compile) 2>&5
32385  ac_status=$?
32386  echo "$as_me:32386: \$? = $ac_status" >&5
32387  (exit "$ac_status"); } &&
32388         { ac_try='test -s "conftest.$ac_objext"'
32389  { (eval echo "$as_me:32389: \"$ac_try\"") >&5
32390  (eval $ac_try) 2>&5
32391  ac_status=$?
32392  echo "$as_me:32392: \$? = $ac_status" >&5
32393  (exit "$ac_status"); }; }; then
32394  ac_cv_type_long=yes
32395else
32396  echo "$as_me: failed program was:" >&5
32397cat "conftest.$ac_ext" >&5
32398ac_cv_type_long=no
32399fi
32400rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32401fi
32402echo "$as_me:32402: result: $ac_cv_type_long" >&5
32403echo "${ECHO_T}$ac_cv_type_long" >&6
32404
32405echo "$as_me:32405: checking size of long" >&5
32406echo $ECHO_N "checking size of long... $ECHO_C" >&6
32407if test "${ac_cv_sizeof_long+set}" = set; then
32408  echo $ECHO_N "(cached) $ECHO_C" >&6
32409else
32410  if test "$ac_cv_type_long" = yes; then
32411  if test "$cross_compiling" = yes; then
32412  # Depending upon the size, compute the lo and hi bounds.
32413cat >"conftest.$ac_ext" <<_ACEOF
32414#line 32414 "configure"
32415#include "confdefs.h"
32416$ac_includes_default
32417int
32418main (void)
32419{
32420int _array_ [1 - 2 * !((sizeof (long)) >= 0)]
32421  ;
32422  return 0;
32423}
32424_ACEOF
32425rm -f "conftest.$ac_objext"
32426if { (eval echo "$as_me:32426: \"$ac_compile\"") >&5
32427  (eval $ac_compile) 2>&5
32428  ac_status=$?
32429  echo "$as_me:32429: \$? = $ac_status" >&5
32430  (exit "$ac_status"); } &&
32431         { ac_try='test -s "conftest.$ac_objext"'
32432  { (eval echo "$as_me:32432: \"$ac_try\"") >&5
32433  (eval $ac_try) 2>&5
32434  ac_status=$?
32435  echo "$as_me:32435: \$? = $ac_status" >&5
32436  (exit "$ac_status"); }; }; then
32437  ac_lo=0 ac_mid=0
32438  while :; do
32439    cat >"conftest.$ac_ext" <<_ACEOF
32440#line 32440 "configure"
32441#include "confdefs.h"
32442$ac_includes_default
32443int
32444main (void)
32445{
32446int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
32447  ;
32448  return 0;
32449}
32450_ACEOF
32451rm -f "conftest.$ac_objext"
32452if { (eval echo "$as_me:32452: \"$ac_compile\"") >&5
32453  (eval $ac_compile) 2>&5
32454  ac_status=$?
32455  echo "$as_me:32455: \$? = $ac_status" >&5
32456  (exit "$ac_status"); } &&
32457         { ac_try='test -s "conftest.$ac_objext"'
32458  { (eval echo "$as_me:32458: \"$ac_try\"") >&5
32459  (eval $ac_try) 2>&5
32460  ac_status=$?
32461  echo "$as_me:32461: \$? = $ac_status" >&5
32462  (exit "$ac_status"); }; }; then
32463  ac_hi=$ac_mid; break
32464else
32465  echo "$as_me: failed program was:" >&5
32466cat "conftest.$ac_ext" >&5
32467ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
32468fi
32469rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32470  done
32471else
32472  echo "$as_me: failed program was:" >&5
32473cat "conftest.$ac_ext" >&5
32474ac_hi=-1 ac_mid=-1
32475  while :; do
32476    cat >"conftest.$ac_ext" <<_ACEOF
32477#line 32477 "configure"
32478#include "confdefs.h"
32479$ac_includes_default
32480int
32481main (void)
32482{
32483int _array_ [1 - 2 * !((sizeof (long)) >= $ac_mid)]
32484  ;
32485  return 0;
32486}
32487_ACEOF
32488rm -f "conftest.$ac_objext"
32489if { (eval echo "$as_me:32489: \"$ac_compile\"") >&5
32490  (eval $ac_compile) 2>&5
32491  ac_status=$?
32492  echo "$as_me:32492: \$? = $ac_status" >&5
32493  (exit "$ac_status"); } &&
32494         { ac_try='test -s "conftest.$ac_objext"'
32495  { (eval echo "$as_me:32495: \"$ac_try\"") >&5
32496  (eval $ac_try) 2>&5
32497  ac_status=$?
32498  echo "$as_me:32498: \$? = $ac_status" >&5
32499  (exit "$ac_status"); }; }; then
32500  ac_lo=$ac_mid; break
32501else
32502  echo "$as_me: failed program was:" >&5
32503cat "conftest.$ac_ext" >&5
32504ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
32505fi
32506rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32507  done
32508fi
32509rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32510# Binary search between lo and hi bounds.
32511while test "x$ac_lo" != "x$ac_hi"; do
32512  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
32513  cat >"conftest.$ac_ext" <<_ACEOF
32514#line 32514 "configure"
32515#include "confdefs.h"
32516$ac_includes_default
32517int
32518main (void)
32519{
32520int _array_ [1 - 2 * !((sizeof (long)) <= $ac_mid)]
32521  ;
32522  return 0;
32523}
32524_ACEOF
32525rm -f "conftest.$ac_objext"
32526if { (eval echo "$as_me:32526: \"$ac_compile\"") >&5
32527  (eval $ac_compile) 2>&5
32528  ac_status=$?
32529  echo "$as_me:32529: \$? = $ac_status" >&5
32530  (exit "$ac_status"); } &&
32531         { ac_try='test -s "conftest.$ac_objext"'
32532  { (eval echo "$as_me:32532: \"$ac_try\"") >&5
32533  (eval $ac_try) 2>&5
32534  ac_status=$?
32535  echo "$as_me:32535: \$? = $ac_status" >&5
32536  (exit "$ac_status"); }; }; then
32537  ac_hi=$ac_mid
32538else
32539  echo "$as_me: failed program was:" >&5
32540cat "conftest.$ac_ext" >&5
32541ac_lo=`expr "$ac_mid" + 1`
32542fi
32543rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32544done
32545ac_cv_sizeof_long=$ac_lo
32546else
32547  if test "$cross_compiling" = yes; then
32548  { { echo "$as_me:32548: error: cannot run test program while cross compiling" >&5
32549echo "$as_me: error: cannot run test program while cross compiling" >&2;}
32550   { (exit 1); exit 1; }; }
32551else
32552  cat >"conftest.$ac_ext" <<_ACEOF
32553#line 32553 "configure"
32554#include "confdefs.h"
32555$ac_includes_default
32556int
32557main (void)
32558{
32559FILE *f = fopen ("conftest.val", "w");
32560if (!f)
32561  $ac_main_return (1);
32562fprintf (f, "%ld", (long)(sizeof (long)));
32563fclose (f);
32564  ;
32565  return 0;
32566}
32567_ACEOF
32568rm -f "conftest$ac_exeext"
32569if { (eval echo "$as_me:32569: \"$ac_link\"") >&5
32570  (eval $ac_link) 2>&5
32571  ac_status=$?
32572  echo "$as_me:32572: \$? = $ac_status" >&5
32573  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
32574  { (eval echo "$as_me:32574: \"$ac_try\"") >&5
32575  (eval $ac_try) 2>&5
32576  ac_status=$?
32577  echo "$as_me:32577: \$? = $ac_status" >&5
32578  (exit "$ac_status"); }; }; then
32579  ac_cv_sizeof_long=`cat conftest.val`
32580else
32581  echo "$as_me: program exited with status $ac_status" >&5
32582echo "$as_me: failed program was:" >&5
32583cat "conftest.$ac_ext" >&5
32584fi
32585rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
32586fi
32587fi
32588rm -f conftest.val
32589else
32590  ac_cv_sizeof_long=0
32591fi
32592fi
32593echo "$as_me:32593: result: $ac_cv_sizeof_long" >&5
32594echo "${ECHO_T}$ac_cv_sizeof_long" >&6
32595cat >>confdefs.h <<EOF
32596#define SIZEOF_LONG $ac_cv_sizeof_long
32597EOF
32598
32599if test "${ac_cv_type_long+set}" = set; then
32600	cf_cv_sizeof="$ac_cv_sizeof_long"
32601	if test "${ac_cv_sizeof_long+set}" != set; then
32602		{ echo "$as_me:32602: WARNING: using 4 for sizeof long" >&5
32603echo "$as_me: WARNING: using 4 for sizeof long" >&2;}
32604		ac_cv_sizeof_long=4
32605	elif test "x${ac_cv_sizeof_long}" = x0; then
32606		{ echo "$as_me:32606: WARNING: sizeof long not found, using 4" >&5
32607echo "$as_me: WARNING: sizeof long not found, using 4" >&2;}
32608		ac_cv_sizeof_long=4
32609	fi
32610	if test "x$ac_cv_sizeof_long" != "x$cf_cv_sizeof"
32611	then
32612
32613cf_cv_type=`echo "sizeof_long" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
32614
32615		sed -e "s/\\([ 	]${cf_cv_type}[ 	]\\).*/\\1$ac_cv_sizeof_long/" confdefs.h >conftest.val
32616		mv conftest.val confdefs.h
32617	fi
32618fi
32619
32620echo "$as_me:32620: checking for off_t" >&5
32621echo $ECHO_N "checking for off_t... $ECHO_C" >&6
32622if test "${ac_cv_type_off_t+set}" = set; then
32623  echo $ECHO_N "(cached) $ECHO_C" >&6
32624else
32625  cat >"conftest.$ac_ext" <<_ACEOF
32626#line 32626 "configure"
32627#include "confdefs.h"
32628$ac_includes_default
32629int
32630main (void)
32631{
32632if ((off_t *) 0)
32633  return 0;
32634if (sizeof (off_t))
32635  return 0;
32636  ;
32637  return 0;
32638}
32639_ACEOF
32640rm -f "conftest.$ac_objext"
32641if { (eval echo "$as_me:32641: \"$ac_compile\"") >&5
32642  (eval $ac_compile) 2>&5
32643  ac_status=$?
32644  echo "$as_me:32644: \$? = $ac_status" >&5
32645  (exit "$ac_status"); } &&
32646         { ac_try='test -s "conftest.$ac_objext"'
32647  { (eval echo "$as_me:32647: \"$ac_try\"") >&5
32648  (eval $ac_try) 2>&5
32649  ac_status=$?
32650  echo "$as_me:32650: \$? = $ac_status" >&5
32651  (exit "$ac_status"); }; }; then
32652  ac_cv_type_off_t=yes
32653else
32654  echo "$as_me: failed program was:" >&5
32655cat "conftest.$ac_ext" >&5
32656ac_cv_type_off_t=no
32657fi
32658rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32659fi
32660echo "$as_me:32660: result: $ac_cv_type_off_t" >&5
32661echo "${ECHO_T}$ac_cv_type_off_t" >&6
32662
32663echo "$as_me:32663: checking size of off_t" >&5
32664echo $ECHO_N "checking size of off_t... $ECHO_C" >&6
32665if test "${ac_cv_sizeof_off_t+set}" = set; then
32666  echo $ECHO_N "(cached) $ECHO_C" >&6
32667else
32668  if test "$ac_cv_type_off_t" = yes; then
32669  if test "$cross_compiling" = yes; then
32670  # Depending upon the size, compute the lo and hi bounds.
32671cat >"conftest.$ac_ext" <<_ACEOF
32672#line 32672 "configure"
32673#include "confdefs.h"
32674$ac_includes_default
32675int
32676main (void)
32677{
32678int _array_ [1 - 2 * !((sizeof (off_t)) >= 0)]
32679  ;
32680  return 0;
32681}
32682_ACEOF
32683rm -f "conftest.$ac_objext"
32684if { (eval echo "$as_me:32684: \"$ac_compile\"") >&5
32685  (eval $ac_compile) 2>&5
32686  ac_status=$?
32687  echo "$as_me:32687: \$? = $ac_status" >&5
32688  (exit "$ac_status"); } &&
32689         { ac_try='test -s "conftest.$ac_objext"'
32690  { (eval echo "$as_me:32690: \"$ac_try\"") >&5
32691  (eval $ac_try) 2>&5
32692  ac_status=$?
32693  echo "$as_me:32693: \$? = $ac_status" >&5
32694  (exit "$ac_status"); }; }; then
32695  ac_lo=0 ac_mid=0
32696  while :; do
32697    cat >"conftest.$ac_ext" <<_ACEOF
32698#line 32698 "configure"
32699#include "confdefs.h"
32700$ac_includes_default
32701int
32702main (void)
32703{
32704int _array_ [1 - 2 * !((sizeof (off_t)) <= $ac_mid)]
32705  ;
32706  return 0;
32707}
32708_ACEOF
32709rm -f "conftest.$ac_objext"
32710if { (eval echo "$as_me:32710: \"$ac_compile\"") >&5
32711  (eval $ac_compile) 2>&5
32712  ac_status=$?
32713  echo "$as_me:32713: \$? = $ac_status" >&5
32714  (exit "$ac_status"); } &&
32715         { ac_try='test -s "conftest.$ac_objext"'
32716  { (eval echo "$as_me:32716: \"$ac_try\"") >&5
32717  (eval $ac_try) 2>&5
32718  ac_status=$?
32719  echo "$as_me:32719: \$? = $ac_status" >&5
32720  (exit "$ac_status"); }; }; then
32721  ac_hi=$ac_mid; break
32722else
32723  echo "$as_me: failed program was:" >&5
32724cat "conftest.$ac_ext" >&5
32725ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
32726fi
32727rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32728  done
32729else
32730  echo "$as_me: failed program was:" >&5
32731cat "conftest.$ac_ext" >&5
32732ac_hi=-1 ac_mid=-1
32733  while :; do
32734    cat >"conftest.$ac_ext" <<_ACEOF
32735#line 32735 "configure"
32736#include "confdefs.h"
32737$ac_includes_default
32738int
32739main (void)
32740{
32741int _array_ [1 - 2 * !((sizeof (off_t)) >= $ac_mid)]
32742  ;
32743  return 0;
32744}
32745_ACEOF
32746rm -f "conftest.$ac_objext"
32747if { (eval echo "$as_me:32747: \"$ac_compile\"") >&5
32748  (eval $ac_compile) 2>&5
32749  ac_status=$?
32750  echo "$as_me:32750: \$? = $ac_status" >&5
32751  (exit "$ac_status"); } &&
32752         { ac_try='test -s "conftest.$ac_objext"'
32753  { (eval echo "$as_me:32753: \"$ac_try\"") >&5
32754  (eval $ac_try) 2>&5
32755  ac_status=$?
32756  echo "$as_me:32756: \$? = $ac_status" >&5
32757  (exit "$ac_status"); }; }; then
32758  ac_lo=$ac_mid; break
32759else
32760  echo "$as_me: failed program was:" >&5
32761cat "conftest.$ac_ext" >&5
32762ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
32763fi
32764rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32765  done
32766fi
32767rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32768# Binary search between lo and hi bounds.
32769while test "x$ac_lo" != "x$ac_hi"; do
32770  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
32771  cat >"conftest.$ac_ext" <<_ACEOF
32772#line 32772 "configure"
32773#include "confdefs.h"
32774$ac_includes_default
32775int
32776main (void)
32777{
32778int _array_ [1 - 2 * !((sizeof (off_t)) <= $ac_mid)]
32779  ;
32780  return 0;
32781}
32782_ACEOF
32783rm -f "conftest.$ac_objext"
32784if { (eval echo "$as_me:32784: \"$ac_compile\"") >&5
32785  (eval $ac_compile) 2>&5
32786  ac_status=$?
32787  echo "$as_me:32787: \$? = $ac_status" >&5
32788  (exit "$ac_status"); } &&
32789         { ac_try='test -s "conftest.$ac_objext"'
32790  { (eval echo "$as_me:32790: \"$ac_try\"") >&5
32791  (eval $ac_try) 2>&5
32792  ac_status=$?
32793  echo "$as_me:32793: \$? = $ac_status" >&5
32794  (exit "$ac_status"); }; }; then
32795  ac_hi=$ac_mid
32796else
32797  echo "$as_me: failed program was:" >&5
32798cat "conftest.$ac_ext" >&5
32799ac_lo=`expr "$ac_mid" + 1`
32800fi
32801rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32802done
32803ac_cv_sizeof_off_t=$ac_lo
32804else
32805  if test "$cross_compiling" = yes; then
32806  { { echo "$as_me:32806: error: cannot run test program while cross compiling" >&5
32807echo "$as_me: error: cannot run test program while cross compiling" >&2;}
32808   { (exit 1); exit 1; }; }
32809else
32810  cat >"conftest.$ac_ext" <<_ACEOF
32811#line 32811 "configure"
32812#include "confdefs.h"
32813$ac_includes_default
32814int
32815main (void)
32816{
32817FILE *f = fopen ("conftest.val", "w");
32818if (!f)
32819  $ac_main_return (1);
32820fprintf (f, "%ld", (long)(sizeof (off_t)));
32821fclose (f);
32822  ;
32823  return 0;
32824}
32825_ACEOF
32826rm -f "conftest$ac_exeext"
32827if { (eval echo "$as_me:32827: \"$ac_link\"") >&5
32828  (eval $ac_link) 2>&5
32829  ac_status=$?
32830  echo "$as_me:32830: \$? = $ac_status" >&5
32831  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
32832  { (eval echo "$as_me:32832: \"$ac_try\"") >&5
32833  (eval $ac_try) 2>&5
32834  ac_status=$?
32835  echo "$as_me:32835: \$? = $ac_status" >&5
32836  (exit "$ac_status"); }; }; then
32837  ac_cv_sizeof_off_t=`cat conftest.val`
32838else
32839  echo "$as_me: program exited with status $ac_status" >&5
32840echo "$as_me: failed program was:" >&5
32841cat "conftest.$ac_ext" >&5
32842fi
32843rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
32844fi
32845fi
32846rm -f conftest.val
32847else
32848  ac_cv_sizeof_off_t=0
32849fi
32850fi
32851echo "$as_me:32851: result: $ac_cv_sizeof_off_t" >&5
32852echo "${ECHO_T}$ac_cv_sizeof_off_t" >&6
32853cat >>confdefs.h <<EOF
32854#define SIZEOF_OFF_T $ac_cv_sizeof_off_t
32855EOF
32856
32857if test "${ac_cv_type_off_t+set}" = set; then
32858	cf_cv_sizeof="$ac_cv_sizeof_off_t"
32859	if test "${ac_cv_sizeof_off_t+set}" != set; then
32860		{ echo "$as_me:32860: WARNING: using 4 for sizeof off_t" >&5
32861echo "$as_me: WARNING: using 4 for sizeof off_t" >&2;}
32862		ac_cv_sizeof_off_t=4
32863	elif test "x${ac_cv_sizeof_off_t}" = x0; then
32864		{ echo "$as_me:32864: WARNING: sizeof off_t not found, using 4" >&5
32865echo "$as_me: WARNING: sizeof off_t not found, using 4" >&2;}
32866		ac_cv_sizeof_off_t=4
32867	fi
32868	if test "x$ac_cv_sizeof_off_t" != "x$cf_cv_sizeof"
32869	then
32870
32871cf_cv_type=`echo "sizeof_off_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
32872
32873		sed -e "s/\\([ 	]${cf_cv_type}[ 	]\\).*/\\1$ac_cv_sizeof_off_t/" confdefs.h >conftest.val
32874		mv conftest.val confdefs.h
32875	fi
32876fi
32877
32878echo "$as_me:32878: checking for size_t" >&5
32879echo $ECHO_N "checking for size_t... $ECHO_C" >&6
32880if test "${ac_cv_type_size_t+set}" = set; then
32881  echo $ECHO_N "(cached) $ECHO_C" >&6
32882else
32883  cat >"conftest.$ac_ext" <<_ACEOF
32884#line 32884 "configure"
32885#include "confdefs.h"
32886$ac_includes_default
32887int
32888main (void)
32889{
32890if ((size_t *) 0)
32891  return 0;
32892if (sizeof (size_t))
32893  return 0;
32894  ;
32895  return 0;
32896}
32897_ACEOF
32898rm -f "conftest.$ac_objext"
32899if { (eval echo "$as_me:32899: \"$ac_compile\"") >&5
32900  (eval $ac_compile) 2>&5
32901  ac_status=$?
32902  echo "$as_me:32902: \$? = $ac_status" >&5
32903  (exit "$ac_status"); } &&
32904         { ac_try='test -s "conftest.$ac_objext"'
32905  { (eval echo "$as_me:32905: \"$ac_try\"") >&5
32906  (eval $ac_try) 2>&5
32907  ac_status=$?
32908  echo "$as_me:32908: \$? = $ac_status" >&5
32909  (exit "$ac_status"); }; }; then
32910  ac_cv_type_size_t=yes
32911else
32912  echo "$as_me: failed program was:" >&5
32913cat "conftest.$ac_ext" >&5
32914ac_cv_type_size_t=no
32915fi
32916rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32917fi
32918echo "$as_me:32918: result: $ac_cv_type_size_t" >&5
32919echo "${ECHO_T}$ac_cv_type_size_t" >&6
32920
32921echo "$as_me:32921: checking size of size_t" >&5
32922echo $ECHO_N "checking size of size_t... $ECHO_C" >&6
32923if test "${ac_cv_sizeof_size_t+set}" = set; then
32924  echo $ECHO_N "(cached) $ECHO_C" >&6
32925else
32926  if test "$ac_cv_type_size_t" = yes; then
32927  if test "$cross_compiling" = yes; then
32928  # Depending upon the size, compute the lo and hi bounds.
32929cat >"conftest.$ac_ext" <<_ACEOF
32930#line 32930 "configure"
32931#include "confdefs.h"
32932$ac_includes_default
32933int
32934main (void)
32935{
32936int _array_ [1 - 2 * !((sizeof (size_t)) >= 0)]
32937  ;
32938  return 0;
32939}
32940_ACEOF
32941rm -f "conftest.$ac_objext"
32942if { (eval echo "$as_me:32942: \"$ac_compile\"") >&5
32943  (eval $ac_compile) 2>&5
32944  ac_status=$?
32945  echo "$as_me:32945: \$? = $ac_status" >&5
32946  (exit "$ac_status"); } &&
32947         { ac_try='test -s "conftest.$ac_objext"'
32948  { (eval echo "$as_me:32948: \"$ac_try\"") >&5
32949  (eval $ac_try) 2>&5
32950  ac_status=$?
32951  echo "$as_me:32951: \$? = $ac_status" >&5
32952  (exit "$ac_status"); }; }; then
32953  ac_lo=0 ac_mid=0
32954  while :; do
32955    cat >"conftest.$ac_ext" <<_ACEOF
32956#line 32956 "configure"
32957#include "confdefs.h"
32958$ac_includes_default
32959int
32960main (void)
32961{
32962int _array_ [1 - 2 * !((sizeof (size_t)) <= $ac_mid)]
32963  ;
32964  return 0;
32965}
32966_ACEOF
32967rm -f "conftest.$ac_objext"
32968if { (eval echo "$as_me:32968: \"$ac_compile\"") >&5
32969  (eval $ac_compile) 2>&5
32970  ac_status=$?
32971  echo "$as_me:32971: \$? = $ac_status" >&5
32972  (exit "$ac_status"); } &&
32973         { ac_try='test -s "conftest.$ac_objext"'
32974  { (eval echo "$as_me:32974: \"$ac_try\"") >&5
32975  (eval $ac_try) 2>&5
32976  ac_status=$?
32977  echo "$as_me:32977: \$? = $ac_status" >&5
32978  (exit "$ac_status"); }; }; then
32979  ac_hi=$ac_mid; break
32980else
32981  echo "$as_me: failed program was:" >&5
32982cat "conftest.$ac_ext" >&5
32983ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
32984fi
32985rm -f "conftest.$ac_objext" "conftest.$ac_ext"
32986  done
32987else
32988  echo "$as_me: failed program was:" >&5
32989cat "conftest.$ac_ext" >&5
32990ac_hi=-1 ac_mid=-1
32991  while :; do
32992    cat >"conftest.$ac_ext" <<_ACEOF
32993#line 32993 "configure"
32994#include "confdefs.h"
32995$ac_includes_default
32996int
32997main (void)
32998{
32999int _array_ [1 - 2 * !((sizeof (size_t)) >= $ac_mid)]
33000  ;
33001  return 0;
33002}
33003_ACEOF
33004rm -f "conftest.$ac_objext"
33005if { (eval echo "$as_me:33005: \"$ac_compile\"") >&5
33006  (eval $ac_compile) 2>&5
33007  ac_status=$?
33008  echo "$as_me:33008: \$? = $ac_status" >&5
33009  (exit "$ac_status"); } &&
33010         { ac_try='test -s "conftest.$ac_objext"'
33011  { (eval echo "$as_me:33011: \"$ac_try\"") >&5
33012  (eval $ac_try) 2>&5
33013  ac_status=$?
33014  echo "$as_me:33014: \$? = $ac_status" >&5
33015  (exit "$ac_status"); }; }; then
33016  ac_lo=$ac_mid; break
33017else
33018  echo "$as_me: failed program was:" >&5
33019cat "conftest.$ac_ext" >&5
33020ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
33021fi
33022rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33023  done
33024fi
33025rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33026# Binary search between lo and hi bounds.
33027while test "x$ac_lo" != "x$ac_hi"; do
33028  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
33029  cat >"conftest.$ac_ext" <<_ACEOF
33030#line 33030 "configure"
33031#include "confdefs.h"
33032$ac_includes_default
33033int
33034main (void)
33035{
33036int _array_ [1 - 2 * !((sizeof (size_t)) <= $ac_mid)]
33037  ;
33038  return 0;
33039}
33040_ACEOF
33041rm -f "conftest.$ac_objext"
33042if { (eval echo "$as_me:33042: \"$ac_compile\"") >&5
33043  (eval $ac_compile) 2>&5
33044  ac_status=$?
33045  echo "$as_me:33045: \$? = $ac_status" >&5
33046  (exit "$ac_status"); } &&
33047         { ac_try='test -s "conftest.$ac_objext"'
33048  { (eval echo "$as_me:33048: \"$ac_try\"") >&5
33049  (eval $ac_try) 2>&5
33050  ac_status=$?
33051  echo "$as_me:33051: \$? = $ac_status" >&5
33052  (exit "$ac_status"); }; }; then
33053  ac_hi=$ac_mid
33054else
33055  echo "$as_me: failed program was:" >&5
33056cat "conftest.$ac_ext" >&5
33057ac_lo=`expr "$ac_mid" + 1`
33058fi
33059rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33060done
33061ac_cv_sizeof_size_t=$ac_lo
33062else
33063  if test "$cross_compiling" = yes; then
33064  { { echo "$as_me:33064: error: cannot run test program while cross compiling" >&5
33065echo "$as_me: error: cannot run test program while cross compiling" >&2;}
33066   { (exit 1); exit 1; }; }
33067else
33068  cat >"conftest.$ac_ext" <<_ACEOF
33069#line 33069 "configure"
33070#include "confdefs.h"
33071$ac_includes_default
33072int
33073main (void)
33074{
33075FILE *f = fopen ("conftest.val", "w");
33076if (!f)
33077  $ac_main_return (1);
33078fprintf (f, "%ld", (long)(sizeof (size_t)));
33079fclose (f);
33080  ;
33081  return 0;
33082}
33083_ACEOF
33084rm -f "conftest$ac_exeext"
33085if { (eval echo "$as_me:33085: \"$ac_link\"") >&5
33086  (eval $ac_link) 2>&5
33087  ac_status=$?
33088  echo "$as_me:33088: \$? = $ac_status" >&5
33089  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
33090  { (eval echo "$as_me:33090: \"$ac_try\"") >&5
33091  (eval $ac_try) 2>&5
33092  ac_status=$?
33093  echo "$as_me:33093: \$? = $ac_status" >&5
33094  (exit "$ac_status"); }; }; then
33095  ac_cv_sizeof_size_t=`cat conftest.val`
33096else
33097  echo "$as_me: program exited with status $ac_status" >&5
33098echo "$as_me: failed program was:" >&5
33099cat "conftest.$ac_ext" >&5
33100fi
33101rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
33102fi
33103fi
33104rm -f conftest.val
33105else
33106  ac_cv_sizeof_size_t=0
33107fi
33108fi
33109echo "$as_me:33109: result: $ac_cv_sizeof_size_t" >&5
33110echo "${ECHO_T}$ac_cv_sizeof_size_t" >&6
33111cat >>confdefs.h <<EOF
33112#define SIZEOF_SIZE_T $ac_cv_sizeof_size_t
33113EOF
33114
33115if test "${ac_cv_type_size_t+set}" = set; then
33116	cf_cv_sizeof="$ac_cv_sizeof_size_t"
33117	if test "${ac_cv_sizeof_size_t+set}" != set; then
33118		{ echo "$as_me:33118: WARNING: using 4 for sizeof size_t" >&5
33119echo "$as_me: WARNING: using 4 for sizeof size_t" >&2;}
33120		ac_cv_sizeof_size_t=4
33121	elif test "x${ac_cv_sizeof_size_t}" = x0; then
33122		{ echo "$as_me:33122: WARNING: sizeof size_t not found, using 4" >&5
33123echo "$as_me: WARNING: sizeof size_t not found, using 4" >&2;}
33124		ac_cv_sizeof_size_t=4
33125	fi
33126	if test "x$ac_cv_sizeof_size_t" != "x$cf_cv_sizeof"
33127	then
33128
33129cf_cv_type=`echo "sizeof_size_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33130
33131		sed -e "s/\\([ 	]${cf_cv_type}[ 	]\\).*/\\1$ac_cv_sizeof_size_t/" confdefs.h >conftest.val
33132		mv conftest.val confdefs.h
33133	fi
33134fi
33135
33136echo "$as_me:33136: checking for time_t" >&5
33137echo $ECHO_N "checking for time_t... $ECHO_C" >&6
33138if test "${ac_cv_type_time_t+set}" = set; then
33139  echo $ECHO_N "(cached) $ECHO_C" >&6
33140else
33141  cat >"conftest.$ac_ext" <<_ACEOF
33142#line 33142 "configure"
33143#include "confdefs.h"
33144$ac_includes_default
33145int
33146main (void)
33147{
33148if ((time_t *) 0)
33149  return 0;
33150if (sizeof (time_t))
33151  return 0;
33152  ;
33153  return 0;
33154}
33155_ACEOF
33156rm -f "conftest.$ac_objext"
33157if { (eval echo "$as_me:33157: \"$ac_compile\"") >&5
33158  (eval $ac_compile) 2>&5
33159  ac_status=$?
33160  echo "$as_me:33160: \$? = $ac_status" >&5
33161  (exit "$ac_status"); } &&
33162         { ac_try='test -s "conftest.$ac_objext"'
33163  { (eval echo "$as_me:33163: \"$ac_try\"") >&5
33164  (eval $ac_try) 2>&5
33165  ac_status=$?
33166  echo "$as_me:33166: \$? = $ac_status" >&5
33167  (exit "$ac_status"); }; }; then
33168  ac_cv_type_time_t=yes
33169else
33170  echo "$as_me: failed program was:" >&5
33171cat "conftest.$ac_ext" >&5
33172ac_cv_type_time_t=no
33173fi
33174rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33175fi
33176echo "$as_me:33176: result: $ac_cv_type_time_t" >&5
33177echo "${ECHO_T}$ac_cv_type_time_t" >&6
33178
33179echo "$as_me:33179: checking size of time_t" >&5
33180echo $ECHO_N "checking size of time_t... $ECHO_C" >&6
33181if test "${ac_cv_sizeof_time_t+set}" = set; then
33182  echo $ECHO_N "(cached) $ECHO_C" >&6
33183else
33184  if test "$ac_cv_type_time_t" = yes; then
33185  if test "$cross_compiling" = yes; then
33186  # Depending upon the size, compute the lo and hi bounds.
33187cat >"conftest.$ac_ext" <<_ACEOF
33188#line 33188 "configure"
33189#include "confdefs.h"
33190$ac_includes_default
33191int
33192main (void)
33193{
33194int _array_ [1 - 2 * !((sizeof (time_t)) >= 0)]
33195  ;
33196  return 0;
33197}
33198_ACEOF
33199rm -f "conftest.$ac_objext"
33200if { (eval echo "$as_me:33200: \"$ac_compile\"") >&5
33201  (eval $ac_compile) 2>&5
33202  ac_status=$?
33203  echo "$as_me:33203: \$? = $ac_status" >&5
33204  (exit "$ac_status"); } &&
33205         { ac_try='test -s "conftest.$ac_objext"'
33206  { (eval echo "$as_me:33206: \"$ac_try\"") >&5
33207  (eval $ac_try) 2>&5
33208  ac_status=$?
33209  echo "$as_me:33209: \$? = $ac_status" >&5
33210  (exit "$ac_status"); }; }; then
33211  ac_lo=0 ac_mid=0
33212  while :; do
33213    cat >"conftest.$ac_ext" <<_ACEOF
33214#line 33214 "configure"
33215#include "confdefs.h"
33216$ac_includes_default
33217int
33218main (void)
33219{
33220int _array_ [1 - 2 * !((sizeof (time_t)) <= $ac_mid)]
33221  ;
33222  return 0;
33223}
33224_ACEOF
33225rm -f "conftest.$ac_objext"
33226if { (eval echo "$as_me:33226: \"$ac_compile\"") >&5
33227  (eval $ac_compile) 2>&5
33228  ac_status=$?
33229  echo "$as_me:33229: \$? = $ac_status" >&5
33230  (exit "$ac_status"); } &&
33231         { ac_try='test -s "conftest.$ac_objext"'
33232  { (eval echo "$as_me:33232: \"$ac_try\"") >&5
33233  (eval $ac_try) 2>&5
33234  ac_status=$?
33235  echo "$as_me:33235: \$? = $ac_status" >&5
33236  (exit "$ac_status"); }; }; then
33237  ac_hi=$ac_mid; break
33238else
33239  echo "$as_me: failed program was:" >&5
33240cat "conftest.$ac_ext" >&5
33241ac_lo=`expr "$ac_mid" + 1`; ac_mid=`expr 2 '*' "$ac_mid" + 1`
33242fi
33243rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33244  done
33245else
33246  echo "$as_me: failed program was:" >&5
33247cat "conftest.$ac_ext" >&5
33248ac_hi=-1 ac_mid=-1
33249  while :; do
33250    cat >"conftest.$ac_ext" <<_ACEOF
33251#line 33251 "configure"
33252#include "confdefs.h"
33253$ac_includes_default
33254int
33255main (void)
33256{
33257int _array_ [1 - 2 * !((sizeof (time_t)) >= $ac_mid)]
33258  ;
33259  return 0;
33260}
33261_ACEOF
33262rm -f "conftest.$ac_objext"
33263if { (eval echo "$as_me:33263: \"$ac_compile\"") >&5
33264  (eval $ac_compile) 2>&5
33265  ac_status=$?
33266  echo "$as_me:33266: \$? = $ac_status" >&5
33267  (exit "$ac_status"); } &&
33268         { ac_try='test -s "conftest.$ac_objext"'
33269  { (eval echo "$as_me:33269: \"$ac_try\"") >&5
33270  (eval $ac_try) 2>&5
33271  ac_status=$?
33272  echo "$as_me:33272: \$? = $ac_status" >&5
33273  (exit "$ac_status"); }; }; then
33274  ac_lo=$ac_mid; break
33275else
33276  echo "$as_me: failed program was:" >&5
33277cat "conftest.$ac_ext" >&5
33278ac_hi=`expr "$ac_mid" - 1`; ac_mid=`expr 2 '*' "$ac_mid"`
33279fi
33280rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33281  done
33282fi
33283rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33284# Binary search between lo and hi bounds.
33285while test "x$ac_lo" != "x$ac_hi"; do
33286  ac_mid=`expr '(' "$ac_hi" - "$ac_lo" ')' / 2 + "$ac_lo"`
33287  cat >"conftest.$ac_ext" <<_ACEOF
33288#line 33288 "configure"
33289#include "confdefs.h"
33290$ac_includes_default
33291int
33292main (void)
33293{
33294int _array_ [1 - 2 * !((sizeof (time_t)) <= $ac_mid)]
33295  ;
33296  return 0;
33297}
33298_ACEOF
33299rm -f "conftest.$ac_objext"
33300if { (eval echo "$as_me:33300: \"$ac_compile\"") >&5
33301  (eval $ac_compile) 2>&5
33302  ac_status=$?
33303  echo "$as_me:33303: \$? = $ac_status" >&5
33304  (exit "$ac_status"); } &&
33305         { ac_try='test -s "conftest.$ac_objext"'
33306  { (eval echo "$as_me:33306: \"$ac_try\"") >&5
33307  (eval $ac_try) 2>&5
33308  ac_status=$?
33309  echo "$as_me:33309: \$? = $ac_status" >&5
33310  (exit "$ac_status"); }; }; then
33311  ac_hi=$ac_mid
33312else
33313  echo "$as_me: failed program was:" >&5
33314cat "conftest.$ac_ext" >&5
33315ac_lo=`expr "$ac_mid" + 1`
33316fi
33317rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33318done
33319ac_cv_sizeof_time_t=$ac_lo
33320else
33321  if test "$cross_compiling" = yes; then
33322  { { echo "$as_me:33322: error: cannot run test program while cross compiling" >&5
33323echo "$as_me: error: cannot run test program while cross compiling" >&2;}
33324   { (exit 1); exit 1; }; }
33325else
33326  cat >"conftest.$ac_ext" <<_ACEOF
33327#line 33327 "configure"
33328#include "confdefs.h"
33329$ac_includes_default
33330int
33331main (void)
33332{
33333FILE *f = fopen ("conftest.val", "w");
33334if (!f)
33335  $ac_main_return (1);
33336fprintf (f, "%ld", (long)(sizeof (time_t)));
33337fclose (f);
33338  ;
33339  return 0;
33340}
33341_ACEOF
33342rm -f "conftest$ac_exeext"
33343if { (eval echo "$as_me:33343: \"$ac_link\"") >&5
33344  (eval $ac_link) 2>&5
33345  ac_status=$?
33346  echo "$as_me:33346: \$? = $ac_status" >&5
33347  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
33348  { (eval echo "$as_me:33348: \"$ac_try\"") >&5
33349  (eval $ac_try) 2>&5
33350  ac_status=$?
33351  echo "$as_me:33351: \$? = $ac_status" >&5
33352  (exit "$ac_status"); }; }; then
33353  ac_cv_sizeof_time_t=`cat conftest.val`
33354else
33355  echo "$as_me: program exited with status $ac_status" >&5
33356echo "$as_me: failed program was:" >&5
33357cat "conftest.$ac_ext" >&5
33358fi
33359rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
33360fi
33361fi
33362rm -f conftest.val
33363else
33364  ac_cv_sizeof_time_t=0
33365fi
33366fi
33367echo "$as_me:33367: result: $ac_cv_sizeof_time_t" >&5
33368echo "${ECHO_T}$ac_cv_sizeof_time_t" >&6
33369cat >>confdefs.h <<EOF
33370#define SIZEOF_TIME_T $ac_cv_sizeof_time_t
33371EOF
33372
33373if test "${ac_cv_type_time_t+set}" = set; then
33374	cf_cv_sizeof="$ac_cv_sizeof_time_t"
33375	if test "${ac_cv_sizeof_time_t+set}" != set; then
33376		{ echo "$as_me:33376: WARNING: using 4 for sizeof time_t" >&5
33377echo "$as_me: WARNING: using 4 for sizeof time_t" >&2;}
33378		ac_cv_sizeof_time_t=4
33379	elif test "x${ac_cv_sizeof_time_t}" = x0; then
33380		{ echo "$as_me:33380: WARNING: sizeof time_t not found, using 4" >&5
33381echo "$as_me: WARNING: sizeof time_t not found, using 4" >&2;}
33382		ac_cv_sizeof_time_t=4
33383	fi
33384	if test "x$ac_cv_sizeof_time_t" != "x$cf_cv_sizeof"
33385	then
33386
33387cf_cv_type=`echo "sizeof_time_t" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
33388
33389		sed -e "s/\\([ 	]${cf_cv_type}[ 	]\\).*/\\1$ac_cv_sizeof_time_t/" confdefs.h >conftest.val
33390		mv conftest.val confdefs.h
33391	fi
33392fi
33393
33394echo "$as_me:33394: checking for intptr_t" >&5
33395echo $ECHO_N "checking for intptr_t... $ECHO_C" >&6
33396if test "${ac_cv_type_intptr_t+set}" = set; then
33397  echo $ECHO_N "(cached) $ECHO_C" >&6
33398else
33399  cat >"conftest.$ac_ext" <<_ACEOF
33400#line 33400 "configure"
33401#include "confdefs.h"
33402$ac_includes_default
33403int
33404main (void)
33405{
33406if ((intptr_t *) 0)
33407  return 0;
33408if (sizeof (intptr_t))
33409  return 0;
33410  ;
33411  return 0;
33412}
33413_ACEOF
33414rm -f "conftest.$ac_objext"
33415if { (eval echo "$as_me:33415: \"$ac_compile\"") >&5
33416  (eval $ac_compile) 2>&5
33417  ac_status=$?
33418  echo "$as_me:33418: \$? = $ac_status" >&5
33419  (exit "$ac_status"); } &&
33420         { ac_try='test -s "conftest.$ac_objext"'
33421  { (eval echo "$as_me:33421: \"$ac_try\"") >&5
33422  (eval $ac_try) 2>&5
33423  ac_status=$?
33424  echo "$as_me:33424: \$? = $ac_status" >&5
33425  (exit "$ac_status"); }; }; then
33426  ac_cv_type_intptr_t=yes
33427else
33428  echo "$as_me: failed program was:" >&5
33429cat "conftest.$ac_ext" >&5
33430ac_cv_type_intptr_t=no
33431fi
33432rm -f "conftest.$ac_objext" "conftest.$ac_ext"
33433fi
33434echo "$as_me:33434: result: $ac_cv_type_intptr_t" >&5
33435echo "${ECHO_T}$ac_cv_type_intptr_t" >&6
33436if test "$ac_cv_type_intptr_t" = yes; then
33437  :
33438else
33439
33440cat >>confdefs.h <<EOF
33441#define intptr_t long
33442EOF
33443
33444fi
33445
33446# The Ultrix 4.2 mips builtin alloca declared by alloca.h only works
33447# for constant arguments.  Useless!
33448echo "$as_me:33448: checking for working alloca.h" >&5
33449echo $ECHO_N "checking for working alloca.h... $ECHO_C" >&6
33450if test "${ac_cv_working_alloca_h+set}" = set; then
33451  echo $ECHO_N "(cached) $ECHO_C" >&6
33452else
33453  cat >"conftest.$ac_ext" <<_ACEOF
33454#line 33454 "configure"
33455#include "confdefs.h"
33456#include <alloca.h>
33457int
33458main (void)
33459{
33460char *p = (char *) alloca (2 * sizeof (int));
33461  ;
33462  return 0;
33463}
33464_ACEOF
33465rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33466if { (eval echo "$as_me:33466: \"$ac_link\"") >&5
33467  (eval $ac_link) 2>&5
33468  ac_status=$?
33469  echo "$as_me:33469: \$? = $ac_status" >&5
33470  (exit "$ac_status"); } &&
33471         { ac_try='test -s "conftest$ac_exeext"'
33472  { (eval echo "$as_me:33472: \"$ac_try\"") >&5
33473  (eval $ac_try) 2>&5
33474  ac_status=$?
33475  echo "$as_me:33475: \$? = $ac_status" >&5
33476  (exit "$ac_status"); }; }; then
33477  ac_cv_working_alloca_h=yes
33478else
33479  echo "$as_me: failed program was:" >&5
33480cat "conftest.$ac_ext" >&5
33481ac_cv_working_alloca_h=no
33482fi
33483rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33484fi
33485echo "$as_me:33485: result: $ac_cv_working_alloca_h" >&5
33486echo "${ECHO_T}$ac_cv_working_alloca_h" >&6
33487if test $ac_cv_working_alloca_h = yes; then
33488
33489cat >>confdefs.h <<\EOF
33490#define HAVE_ALLOCA_H 1
33491EOF
33492
33493fi
33494
33495echo "$as_me:33495: checking for alloca" >&5
33496echo $ECHO_N "checking for alloca... $ECHO_C" >&6
33497if test "${ac_cv_func_alloca_works+set}" = set; then
33498  echo $ECHO_N "(cached) $ECHO_C" >&6
33499else
33500  cat >"conftest.$ac_ext" <<_ACEOF
33501#line 33501 "configure"
33502#include "confdefs.h"
33503#ifdef __GNUC__
33504# define alloca __builtin_alloca
33505#else
33506# ifdef _MSC_VER
33507#  include <malloc.h>
33508#  define alloca _alloca
33509# else
33510#  if HAVE_ALLOCA_H
33511#   include <alloca.h>
33512#  else
33513#   ifdef _AIX
33514 #pragma alloca
33515#   else
33516#    ifndef alloca /* predefined by HP cc +Olibcalls */
33517char *alloca ();
33518#    endif
33519#   endif
33520#  endif
33521# endif
33522#endif
33523
33524int
33525main (void)
33526{
33527char *p = (char *) alloca (1);
33528  ;
33529  return 0;
33530}
33531_ACEOF
33532rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33533if { (eval echo "$as_me:33533: \"$ac_link\"") >&5
33534  (eval $ac_link) 2>&5
33535  ac_status=$?
33536  echo "$as_me:33536: \$? = $ac_status" >&5
33537  (exit "$ac_status"); } &&
33538         { ac_try='test -s "conftest$ac_exeext"'
33539  { (eval echo "$as_me:33539: \"$ac_try\"") >&5
33540  (eval $ac_try) 2>&5
33541  ac_status=$?
33542  echo "$as_me:33542: \$? = $ac_status" >&5
33543  (exit "$ac_status"); }; }; then
33544  ac_cv_func_alloca_works=yes
33545else
33546  echo "$as_me: failed program was:" >&5
33547cat "conftest.$ac_ext" >&5
33548ac_cv_func_alloca_works=no
33549fi
33550rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33551fi
33552echo "$as_me:33552: result: $ac_cv_func_alloca_works" >&5
33553echo "${ECHO_T}$ac_cv_func_alloca_works" >&6
33554
33555if test $ac_cv_func_alloca_works = yes; then
33556
33557cat >>confdefs.h <<\EOF
33558#define HAVE_ALLOCA 1
33559EOF
33560
33561else
33562  # The SVR3 libPW and SVR4 libucb both contain incompatible functions
33563# that cause trouble.  Some versions do not even contain alloca or
33564# contain a buggy version.  If you still want to use their alloca,
33565# use ar to extract alloca.o from them instead of compiling alloca.c.
33566
33567ALLOCA="alloca.$ac_objext"
33568
33569cat >>confdefs.h <<\EOF
33570#define C_ALLOCA 1
33571EOF
33572
33573echo "$as_me:33573: checking whether \`alloca.c' needs Cray hooks" >&5
33574echo $ECHO_N "checking whether \`alloca.c' needs Cray hooks... $ECHO_C" >&6
33575if test "${ac_cv_os_cray+set}" = set; then
33576  echo $ECHO_N "(cached) $ECHO_C" >&6
33577else
33578  cat >"conftest.$ac_ext" <<_ACEOF
33579#line 33579 "configure"
33580#include "confdefs.h"
33581#if defined(CRAY) && ! defined(CRAY2)
33582webecray
33583#else
33584wenotbecray
33585#endif
33586
33587_ACEOF
33588if (eval "$ac_cpp conftest.$ac_ext") 2>&5 |
33589  $EGREP "webecray" >/dev/null 2>&1; then
33590  ac_cv_os_cray=yes
33591else
33592  ac_cv_os_cray=no
33593fi
33594rm -rf conftest*
33595
33596fi
33597echo "$as_me:33597: result: $ac_cv_os_cray" >&5
33598echo "${ECHO_T}$ac_cv_os_cray" >&6
33599if test $ac_cv_os_cray = yes; then
33600  for ac_func in _getb67 GETB67 getb67; do
33601    as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
33602echo "$as_me:33602: checking for $ac_func" >&5
33603echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
33604if eval "test \"\${$as_ac_var+set}\" = set"; then
33605  echo $ECHO_N "(cached) $ECHO_C" >&6
33606else
33607  cat >"conftest.$ac_ext" <<_ACEOF
33608#line 33608 "configure"
33609#include "confdefs.h"
33610#define $ac_func autoconf_temporary
33611#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
33612#undef $ac_func
33613
33614#ifdef __cplusplus
33615extern "C"
33616#endif
33617
33618/* We use char because int might match the return type of a gcc2
33619   builtin and then its argument prototype would still apply.  */
33620char $ac_func (void);
33621
33622int
33623main (void)
33624{
33625
33626/* The GNU C library defines stubs for functions which it implements
33627    to always fail with ENOSYS.  Some functions are actually named
33628    something starting with __ and the normal name is an alias.  */
33629#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
33630#error found stub for $ac_func
33631#endif
33632
33633	return $ac_func ();
33634  ;
33635  return 0;
33636}
33637_ACEOF
33638rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33639if { (eval echo "$as_me:33639: \"$ac_link\"") >&5
33640  (eval $ac_link) 2>&5
33641  ac_status=$?
33642  echo "$as_me:33642: \$? = $ac_status" >&5
33643  (exit "$ac_status"); } &&
33644         { ac_try='test -s "conftest$ac_exeext"'
33645  { (eval echo "$as_me:33645: \"$ac_try\"") >&5
33646  (eval $ac_try) 2>&5
33647  ac_status=$?
33648  echo "$as_me:33648: \$? = $ac_status" >&5
33649  (exit "$ac_status"); }; }; then
33650  eval "$as_ac_var=yes"
33651else
33652  echo "$as_me: failed program was:" >&5
33653cat "conftest.$ac_ext" >&5
33654eval "$as_ac_var=no"
33655fi
33656rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33657fi
33658echo "$as_me:33658: result: `eval echo '${'"$as_ac_var"'}'`" >&5
33659echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
33660if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
33661
33662cat >>confdefs.h <<EOF
33663#define CRAY_STACKSEG_END $ac_func
33664EOF
33665
33666    break
33667fi
33668
33669  done
33670fi
33671
33672echo "$as_me:33672: checking stack direction for C alloca" >&5
33673echo $ECHO_N "checking stack direction for C alloca... $ECHO_C" >&6
33674if test "${ac_cv_c_stack_direction+set}" = set; then
33675  echo $ECHO_N "(cached) $ECHO_C" >&6
33676else
33677  if test "$cross_compiling" = yes; then
33678  ac_cv_c_stack_direction=0
33679else
33680  cat >"conftest.$ac_ext" <<_ACEOF
33681#line 33681 "configure"
33682#include "confdefs.h"
33683int
33684find_stack_direction (void)
33685{
33686  static char *addr = 0;
33687  auto char dummy;
33688  if (addr == 0)
33689    {
33690      addr = &dummy;
33691      return find_stack_direction ();
33692    }
33693  else
33694    return (&dummy > addr) ? 1 : -1;
33695}
33696
33697int
33698main (void)
33699{
33700  $ac_main_return (find_stack_direction () < 0);
33701}
33702_ACEOF
33703rm -f "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"); } && { ac_try='"./conftest$ac_exeext"'
33709  { (eval echo "$as_me:33709: \"$ac_try\"") >&5
33710  (eval $ac_try) 2>&5
33711  ac_status=$?
33712  echo "$as_me:33712: \$? = $ac_status" >&5
33713  (exit "$ac_status"); }; }; then
33714  ac_cv_c_stack_direction=1
33715else
33716  echo "$as_me: program exited with status $ac_status" >&5
33717echo "$as_me: failed program was:" >&5
33718cat "conftest.$ac_ext" >&5
33719ac_cv_c_stack_direction=-1
33720fi
33721rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
33722fi
33723fi
33724echo "$as_me:33724: result: $ac_cv_c_stack_direction" >&5
33725echo "${ECHO_T}$ac_cv_c_stack_direction" >&6
33726
33727cat >>confdefs.h <<EOF
33728#define STACK_DIRECTION $ac_cv_c_stack_direction
33729EOF
33730
33731fi
33732
33733for ac_header in unistd.h vfork.h
33734do
33735as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
33736echo "$as_me:33736: checking for $ac_header" >&5
33737echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
33738if eval "test \"\${$as_ac_Header+set}\" = set"; then
33739  echo $ECHO_N "(cached) $ECHO_C" >&6
33740else
33741  cat >"conftest.$ac_ext" <<_ACEOF
33742#line 33742 "configure"
33743#include "confdefs.h"
33744#include <$ac_header>
33745_ACEOF
33746if { (eval echo "$as_me:33746: \"$ac_cpp "conftest.$ac_ext"\"") >&5
33747  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
33748  ac_status=$?
33749  $EGREP -v '^ *\+' conftest.er1 >conftest.err
33750  rm -f conftest.er1
33751  cat conftest.err >&5
33752  echo "$as_me:33752: \$? = $ac_status" >&5
33753  (exit "$ac_status"); } >/dev/null; then
33754  if test -s conftest.err; then
33755    ac_cpp_err=$ac_c_preproc_warn_flag
33756  else
33757    ac_cpp_err=
33758  fi
33759else
33760  ac_cpp_err=yes
33761fi
33762if test -z "$ac_cpp_err"; then
33763  eval "$as_ac_Header=yes"
33764else
33765  echo "$as_me: failed program was:" >&5
33766  cat "conftest.$ac_ext" >&5
33767  eval "$as_ac_Header=no"
33768fi
33769rm -f conftest.err "conftest.$ac_ext"
33770fi
33771echo "$as_me:33771: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
33772echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
33773if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
33774  cat >>confdefs.h <<EOF
33775#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
33776EOF
33777
33778fi
33779done
33780
33781for ac_func in fork vfork
33782do
33783as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
33784echo "$as_me:33784: checking for $ac_func" >&5
33785echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
33786if eval "test \"\${$as_ac_var+set}\" = set"; then
33787  echo $ECHO_N "(cached) $ECHO_C" >&6
33788else
33789  cat >"conftest.$ac_ext" <<_ACEOF
33790#line 33790 "configure"
33791#include "confdefs.h"
33792#define $ac_func autoconf_temporary
33793#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
33794#undef $ac_func
33795
33796#ifdef __cplusplus
33797extern "C"
33798#endif
33799
33800/* We use char because int might match the return type of a gcc2
33801   builtin and then its argument prototype would still apply.  */
33802char $ac_func (void);
33803
33804int
33805main (void)
33806{
33807
33808/* The GNU C library defines stubs for functions which it implements
33809    to always fail with ENOSYS.  Some functions are actually named
33810    something starting with __ and the normal name is an alias.  */
33811#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
33812#error found stub for $ac_func
33813#endif
33814
33815	return $ac_func ();
33816  ;
33817  return 0;
33818}
33819_ACEOF
33820rm -f "conftest.$ac_objext" "conftest$ac_exeext"
33821if { (eval echo "$as_me:33821: \"$ac_link\"") >&5
33822  (eval $ac_link) 2>&5
33823  ac_status=$?
33824  echo "$as_me:33824: \$? = $ac_status" >&5
33825  (exit "$ac_status"); } &&
33826         { ac_try='test -s "conftest$ac_exeext"'
33827  { (eval echo "$as_me:33827: \"$ac_try\"") >&5
33828  (eval $ac_try) 2>&5
33829  ac_status=$?
33830  echo "$as_me:33830: \$? = $ac_status" >&5
33831  (exit "$ac_status"); }; }; then
33832  eval "$as_ac_var=yes"
33833else
33834  echo "$as_me: failed program was:" >&5
33835cat "conftest.$ac_ext" >&5
33836eval "$as_ac_var=no"
33837fi
33838rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
33839fi
33840echo "$as_me:33840: result: `eval echo '${'"$as_ac_var"'}'`" >&5
33841echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
33842if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
33843  cat >>confdefs.h <<EOF
33844#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
33845EOF
33846
33847fi
33848done
33849
33850ac_cv_func_fork_works=$ac_cv_func_fork
33851if test "x$ac_cv_func_fork" = xyes; then
33852  echo "$as_me:33852: checking for working fork" >&5
33853echo $ECHO_N "checking for working fork... $ECHO_C" >&6
33854if test "${ac_cv_func_fork_works+set}" = set; then
33855  echo $ECHO_N "(cached) $ECHO_C" >&6
33856else
33857  if test "$cross_compiling" = yes; then
33858  ac_cv_func_fork_works=cross
33859else
33860  cat >"conftest.$ac_ext" <<_ACEOF
33861/* By Rüdiger Kuhlmann. */
33862      #include <sys/types.h>
33863      #if HAVE_UNISTD_H
33864      # include <unistd.h>
33865      #endif
33866      /* Some systems only have a dummy stub for fork() */
33867      int main (void)
33868      {
33869        if (fork() < 0)
33870          $ac_main_return (1);
33871        $ac_main_return (0);
33872      }
33873_ACEOF
33874rm -f "conftest$ac_exeext"
33875if { (eval echo "$as_me:33875: \"$ac_link\"") >&5
33876  (eval $ac_link) 2>&5
33877  ac_status=$?
33878  echo "$as_me:33878: \$? = $ac_status" >&5
33879  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
33880  { (eval echo "$as_me:33880: \"$ac_try\"") >&5
33881  (eval $ac_try) 2>&5
33882  ac_status=$?
33883  echo "$as_me:33883: \$? = $ac_status" >&5
33884  (exit "$ac_status"); }; }; then
33885  ac_cv_func_fork_works=yes
33886else
33887  echo "$as_me: program exited with status $ac_status" >&5
33888echo "$as_me: failed program was:" >&5
33889cat "conftest.$ac_ext" >&5
33890ac_cv_func_fork_works=no
33891fi
33892rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
33893fi
33894fi
33895echo "$as_me:33895: result: $ac_cv_func_fork_works" >&5
33896echo "${ECHO_T}$ac_cv_func_fork_works" >&6
33897
33898fi
33899if test "x$ac_cv_func_fork_works" = xcross; then
33900  case $host in
33901    *-*-amigaos* | *-*-msdosdjgpp*)
33902      # Override, as these systems have only a dummy fork() stub
33903      ac_cv_func_fork_works=no
33904      ;;
33905    *)
33906      ac_cv_func_fork_works=yes
33907      ;;
33908  esac
33909  { echo "$as_me:33909: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&5
33910echo "$as_me: WARNING: CROSS: Result $ac_cv_func_fork_works guessed due to cross-compiling." >&2;}
33911fi
33912ac_cv_func_vfork_works=$ac_cv_func_vfork
33913if test "x$ac_cv_func_vfork" = xyes; then
33914  echo "$as_me:33914: checking for working vfork" >&5
33915echo $ECHO_N "checking for working vfork... $ECHO_C" >&6
33916if test "${ac_cv_func_vfork_works+set}" = set; then
33917  echo $ECHO_N "(cached) $ECHO_C" >&6
33918else
33919  if test "$cross_compiling" = yes; then
33920  ac_cv_func_vfork_works=cross
33921else
33922  cat >"conftest.$ac_ext" <<_ACEOF
33923#line 33923 "configure"
33924#include "confdefs.h"
33925/* Thanks to Paul Eggert for this test.  */
33926#include <stdio.h>
33927#include <sys/types.h>
33928#include <sys/stat.h>
33929#if HAVE_UNISTD_H
33930# include <unistd.h>
33931#endif
33932#if HAVE_VFORK_H
33933# include <vfork.h>
33934#endif
33935/* On some sparc systems, changes by the child to local and incoming
33936   argument registers are propagated back to the parent.  The compiler
33937   is told about this with #include <vfork.h>, but some compilers
33938   (e.g. gcc -O) don't grok <vfork.h>.  Test for this by using a
33939   static variable whose address is put into a register that is
33940   clobbered by the vfork.  */
33941static
33942#ifdef __cplusplus
33943sparc_address_test (int arg)
33944# else
33945sparc_address_test (arg) int arg;
33946#endif
33947{
33948  static pid_t child;
33949  if (!child) {
33950    child = vfork ();
33951    if (child < 0) {
33952      perror ("vfork");
33953      _exit(2);
33954    }
33955    if (!child) {
33956      arg = getpid();
33957      write(-1, "", 0);
33958      _exit (arg);
33959    }
33960  }
33961}
33962
33963int
33964main (void)
33965{
33966  pid_t parent = getpid ();
33967  pid_t child;
33968
33969  sparc_address_test ();
33970
33971  child = vfork ();
33972
33973  if (child == 0) {
33974    /* Here is another test for sparc vfork register problems.  This
33975       test uses lots of local variables, at least as many local
33976       variables as main has allocated so far including compiler
33977       temporaries.  4 locals are enough for gcc 1.40.3 on a Solaris
33978       4.1.3 sparc, but we use 8 to be safe.  A buggy compiler should
33979       reuse the register of parent for one of the local variables,
33980       since it will think that parent can't possibly be used any more
33981       in this routine.  Assigning to the local variable will thus
33982       munge parent in the parent process.  */
33983    pid_t
33984      p = getpid(), p1 = getpid(), p2 = getpid(), p3 = getpid(),
33985      p4 = getpid(), p5 = getpid(), p6 = getpid(), p7 = getpid();
33986    /* Convince the compiler that p..p7 are live; otherwise, it might
33987       use the same hardware register for all 8 local variables.  */
33988    if (p != p1 || p != p2 || p != p3 || p != p4
33989	|| p != p5 || p != p6 || p != p7)
33990      _exit(1);
33991
33992    /* On some systems (e.g. IRIX 3.3), vfork doesn't separate parent
33993       from child file descriptors.  If the child closes a descriptor
33994       before it execs or exits, this munges the parent's descriptor
33995       as well.  Test for this by closing stdout in the child.  */
33996    _exit(close(fileno(stdout)) != 0);
33997  } else {
33998    int status;
33999    struct stat st;
34000
34001    while (wait(&status) != child)
34002      ;
34003    $ac_main_return(
34004	 /* Was there some problem with vforking?  */
34005	 child < 0
34006
34007	 /* Did the child fail?  (This shouldn't happen.)  */
34008	 || status
34009
34010	 /* Did the vfork/compiler bug occur?  */
34011	 || parent != getpid()
34012
34013	 /* Did the file descriptor bug occur?  */
34014	 || fstat(fileno(stdout), &st) != 0
34015	 );
34016  }
34017}
34018_ACEOF
34019rm -f "conftest$ac_exeext"
34020if { (eval echo "$as_me:34020: \"$ac_link\"") >&5
34021  (eval $ac_link) 2>&5
34022  ac_status=$?
34023  echo "$as_me:34023: \$? = $ac_status" >&5
34024  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
34025  { (eval echo "$as_me:34025: \"$ac_try\"") >&5
34026  (eval $ac_try) 2>&5
34027  ac_status=$?
34028  echo "$as_me:34028: \$? = $ac_status" >&5
34029  (exit "$ac_status"); }; }; then
34030  ac_cv_func_vfork_works=yes
34031else
34032  echo "$as_me: program exited with status $ac_status" >&5
34033echo "$as_me: failed program was:" >&5
34034cat "conftest.$ac_ext" >&5
34035ac_cv_func_vfork_works=no
34036fi
34037rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
34038fi
34039fi
34040echo "$as_me:34040: result: $ac_cv_func_vfork_works" >&5
34041echo "${ECHO_T}$ac_cv_func_vfork_works" >&6
34042
34043fi;
34044if test "x$ac_cv_func_fork_works" = xcross; then
34045  ac_cv_func_vfork_works=ac_cv_func_vfork
34046  { echo "$as_me:34046: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&5
34047echo "$as_me: WARNING: CROSS: Result $ac_cv_func_vfork_works guessed due to cross-compiling." >&2;}
34048fi
34049
34050if test "x$ac_cv_func_vfork_works" = xyes; then
34051
34052cat >>confdefs.h <<\EOF
34053#define HAVE_WORKING_VFORK 1
34054EOF
34055
34056else
34057
34058cat >>confdefs.h <<\EOF
34059#define vfork fork
34060EOF
34061
34062fi
34063if test "x$ac_cv_func_fork_works" = xyes; then
34064
34065cat >>confdefs.h <<\EOF
34066#define HAVE_WORKING_FORK 1
34067EOF
34068
34069fi
34070
34071echo "$as_me:34071: checking if we should use fcntl or ioctl" >&5
34072echo $ECHO_N "checking if we should use fcntl or ioctl... $ECHO_C" >&6
34073if test "${cf_cv_fionbio+set}" = set; then
34074  echo $ECHO_N "(cached) $ECHO_C" >&6
34075else
34076
34077cat >"conftest.$ac_ext" <<_ACEOF
34078#line 34078 "configure"
34079#include "confdefs.h"
34080
34081#include <sys/types.h>
34082#include <sys/ioctl.h>
34083
34084int
34085main (void)
34086{
34087
34088        int ret = ioctl(0, FIONBIO, (char *)0); (void) ret
34089
34090  ;
34091  return 0;
34092}
34093_ACEOF
34094rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34095if { (eval echo "$as_me:34095: \"$ac_link\"") >&5
34096  (eval $ac_link) 2>&5
34097  ac_status=$?
34098  echo "$as_me:34098: \$? = $ac_status" >&5
34099  (exit "$ac_status"); } &&
34100         { ac_try='test -s "conftest$ac_exeext"'
34101  { (eval echo "$as_me:34101: \"$ac_try\"") >&5
34102  (eval $ac_try) 2>&5
34103  ac_status=$?
34104  echo "$as_me:34104: \$? = $ac_status" >&5
34105  (exit "$ac_status"); }; }; then
34106  cf_cv_fionbio=ioctl
34107else
34108  echo "$as_me: failed program was:" >&5
34109cat "conftest.$ac_ext" >&5
34110
34111cat >"conftest.$ac_ext" <<_ACEOF
34112#line 34112 "configure"
34113#include "confdefs.h"
34114
34115#include <sys/types.h>
34116#if HAVE_FCNTL_H
34117#include <fcntl.h>
34118#else
34119#if HAVE_SYS_FCNTL_H
34120#include <sys/fcntl.h>
34121#endif
34122#endif
34123int
34124main (void)
34125{
34126
34127        int ret = fcntl(0, F_SETFL, O_NONBLOCK);
34128
34129  ;
34130  return 0;
34131}
34132_ACEOF
34133rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34134if { (eval echo "$as_me:34134: \"$ac_link\"") >&5
34135  (eval $ac_link) 2>&5
34136  ac_status=$?
34137  echo "$as_me:34137: \$? = $ac_status" >&5
34138  (exit "$ac_status"); } &&
34139         { ac_try='test -s "conftest$ac_exeext"'
34140  { (eval echo "$as_me:34140: \"$ac_try\"") >&5
34141  (eval $ac_try) 2>&5
34142  ac_status=$?
34143  echo "$as_me:34143: \$? = $ac_status" >&5
34144  (exit "$ac_status"); }; }; then
34145  cf_cv_fionbio=fcntl
34146else
34147  echo "$as_me: failed program was:" >&5
34148cat "conftest.$ac_ext" >&5
34149cf_cv_fionbio=unknown
34150fi
34151rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34152fi
34153rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34154
34155fi
34156echo "$as_me:34156: result: $cf_cv_fionbio" >&5
34157echo "${ECHO_T}$cf_cv_fionbio" >&6
34158test "$cf_cv_fionbio" = "fcntl" &&
34159cat >>confdefs.h <<\EOF
34160#define USE_FCNTL 1
34161EOF
34162
34163echo "$as_me:34163: checking for broken/missing definition of remove" >&5
34164echo $ECHO_N "checking for broken/missing definition of remove... $ECHO_C" >&6
34165if test "${cf_cv_baddef_remove+set}" = set; then
34166  echo $ECHO_N "(cached) $ECHO_C" >&6
34167else
34168
34169cat >"conftest.$ac_ext" <<_ACEOF
34170#line 34170 "configure"
34171#include "confdefs.h"
34172#include <stdio.h>
34173int
34174main (void)
34175{
34176remove("dummy")
34177  ;
34178  return 0;
34179}
34180_ACEOF
34181rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34182if { (eval echo "$as_me:34182: \"$ac_link\"") >&5
34183  (eval $ac_link) 2>&5
34184  ac_status=$?
34185  echo "$as_me:34185: \$? = $ac_status" >&5
34186  (exit "$ac_status"); } &&
34187         { ac_try='test -s "conftest$ac_exeext"'
34188  { (eval echo "$as_me:34188: \"$ac_try\"") >&5
34189  (eval $ac_try) 2>&5
34190  ac_status=$?
34191  echo "$as_me:34191: \$? = $ac_status" >&5
34192  (exit "$ac_status"); }; }; then
34193  cf_cv_baddef_remove=no
34194else
34195  echo "$as_me: failed program was:" >&5
34196cat "conftest.$ac_ext" >&5
34197cat >"conftest.$ac_ext" <<_ACEOF
34198#line 34198 "configure"
34199#include "confdefs.h"
34200#include <stdio.h>
34201		int __unlink(name) { return unlink(name); }
34202int
34203main (void)
34204{
34205remove("dummy")
34206  ;
34207  return 0;
34208}
34209_ACEOF
34210rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34211if { (eval echo "$as_me:34211: \"$ac_link\"") >&5
34212  (eval $ac_link) 2>&5
34213  ac_status=$?
34214  echo "$as_me:34214: \$? = $ac_status" >&5
34215  (exit "$ac_status"); } &&
34216         { ac_try='test -s "conftest$ac_exeext"'
34217  { (eval echo "$as_me:34217: \"$ac_try\"") >&5
34218  (eval $ac_try) 2>&5
34219  ac_status=$?
34220  echo "$as_me:34220: \$? = $ac_status" >&5
34221  (exit "$ac_status"); }; }; then
34222  cf_cv_baddef_remove=yes
34223else
34224  echo "$as_me: failed program was:" >&5
34225cat "conftest.$ac_ext" >&5
34226cf_cv_baddef_remove=unknown
34227fi
34228rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34229
34230fi
34231rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34232
34233fi
34234
34235echo "$as_me:34235: result: $cf_cv_baddef_remove" >&5
34236echo "${ECHO_T}$cf_cv_baddef_remove" >&6
34237test "$cf_cv_baddef_remove" != no &&
34238cat >>confdefs.h <<\EOF
34239#define NEED_REMOVE 1
34240EOF
34241
34242echo "$as_me:34242: checking for lstat" >&5
34243echo $ECHO_N "checking for lstat... $ECHO_C" >&6
34244if test "${ac_cv_func_lstat+set}" = set; then
34245  echo $ECHO_N "(cached) $ECHO_C" >&6
34246else
34247
34248cat >"conftest.$ac_ext" <<_ACEOF
34249#line 34249 "configure"
34250#include "confdefs.h"
34251
34252#include <sys/types.h>
34253#include <sys/stat.h>
34254int
34255main (void)
34256{
34257struct stat sb; lstat(".", &sb); (void) sb
34258  ;
34259  return 0;
34260}
34261_ACEOF
34262rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34263if { (eval echo "$as_me:34263: \"$ac_link\"") >&5
34264  (eval $ac_link) 2>&5
34265  ac_status=$?
34266  echo "$as_me:34266: \$? = $ac_status" >&5
34267  (exit "$ac_status"); } &&
34268         { ac_try='test -s "conftest$ac_exeext"'
34269  { (eval echo "$as_me:34269: \"$ac_try\"") >&5
34270  (eval $ac_try) 2>&5
34271  ac_status=$?
34272  echo "$as_me:34272: \$? = $ac_status" >&5
34273  (exit "$ac_status"); }; }; then
34274  ac_cv_func_lstat=yes
34275else
34276  echo "$as_me: failed program was:" >&5
34277cat "conftest.$ac_ext" >&5
34278ac_cv_func_lstat=no
34279fi
34280rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34281
34282fi
34283
34284echo "$as_me:34284: result: $ac_cv_func_lstat " >&5
34285echo "${ECHO_T}$ac_cv_func_lstat " >&6
34286if test "$ac_cv_func_lstat" = yes; then
34287
34288cat >>confdefs.h <<\EOF
34289#define HAVE_LSTAT 1
34290EOF
34291
34292fi
34293
34294echo "$as_me:34294: checking for vasprintf" >&5
34295echo $ECHO_N "checking for vasprintf... $ECHO_C" >&6
34296if test "${ac_cv_func_vasprintf+set}" = set; then
34297  echo $ECHO_N "(cached) $ECHO_C" >&6
34298else
34299  cat >"conftest.$ac_ext" <<_ACEOF
34300#line 34300 "configure"
34301#include "confdefs.h"
34302#define vasprintf autoconf_temporary
34303#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34304#undef vasprintf
34305
34306#ifdef __cplusplus
34307extern "C"
34308#endif
34309
34310/* We use char because int might match the return type of a gcc2
34311   builtin and then its argument prototype would still apply.  */
34312char vasprintf (void);
34313
34314int
34315main (void)
34316{
34317
34318/* The GNU C library defines stubs for functions which it implements
34319    to always fail with ENOSYS.  Some functions are actually named
34320    something starting with __ and the normal name is an alias.  */
34321#if defined (__stub_vasprintf) || defined (__stub___vasprintf)
34322#error found stub for vasprintf
34323#endif
34324
34325	return vasprintf ();
34326  ;
34327  return 0;
34328}
34329_ACEOF
34330rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34331if { (eval echo "$as_me:34331: \"$ac_link\"") >&5
34332  (eval $ac_link) 2>&5
34333  ac_status=$?
34334  echo "$as_me:34334: \$? = $ac_status" >&5
34335  (exit "$ac_status"); } &&
34336         { ac_try='test -s "conftest$ac_exeext"'
34337  { (eval echo "$as_me:34337: \"$ac_try\"") >&5
34338  (eval $ac_try) 2>&5
34339  ac_status=$?
34340  echo "$as_me:34340: \$? = $ac_status" >&5
34341  (exit "$ac_status"); }; }; then
34342  ac_cv_func_vasprintf=yes
34343else
34344  echo "$as_me: failed program was:" >&5
34345cat "conftest.$ac_ext" >&5
34346ac_cv_func_vasprintf=no
34347fi
34348rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34349fi
34350echo "$as_me:34350: result: $ac_cv_func_vasprintf" >&5
34351echo "${ECHO_T}$ac_cv_func_vasprintf" >&6
34352if test "$ac_cv_func_vasprintf" = yes; then
34353
34354cat >>confdefs.h <<\EOF
34355#define HAVE_VASPRINTF 1
34356EOF
34357
34358	echo "$as_me:34358: checking if vasprintf requires workaround" >&5
34359echo $ECHO_N "checking if vasprintf requires workaround... $ECHO_C" >&6
34360	cat >"conftest.$ac_ext" <<_ACEOF
34361#line 34361 "configure"
34362#include "confdefs.h"
34363
34364		#include <stdio.h>
34365
34366int
34367main (void)
34368{
34369
34370		void *p = (void *)vasprintf; return (p != 0)
34371
34372  ;
34373  return 0;
34374}
34375_ACEOF
34376rm -f "conftest.$ac_objext"
34377if { (eval echo "$as_me:34377: \"$ac_compile\"") >&5
34378  (eval $ac_compile) 2>&5
34379  ac_status=$?
34380  echo "$as_me:34380: \$? = $ac_status" >&5
34381  (exit "$ac_status"); } &&
34382         { ac_try='test -s "conftest.$ac_objext"'
34383  { (eval echo "$as_me:34383: \"$ac_try\"") >&5
34384  (eval $ac_try) 2>&5
34385  ac_status=$?
34386  echo "$as_me:34386: \$? = $ac_status" >&5
34387  (exit "$ac_status"); }; }; then
34388
34389		echo "$as_me:34389: result: no" >&5
34390echo "${ECHO_T}no" >&6
34391
34392else
34393  echo "$as_me: failed program was:" >&5
34394cat "conftest.$ac_ext" >&5
34395
34396		cat >"conftest.$ac_ext" <<_ACEOF
34397#line 34397 "configure"
34398#include "confdefs.h"
34399
34400			#ifndef _GNU_SOURCE
34401			#define _GNU_SOURCE 1
34402			#include <stdio.h>
34403			#endif
34404
34405int
34406main (void)
34407{
34408
34409			void *p = (void *)vasprintf; return (p != 0)
34410
34411  ;
34412  return 0;
34413}
34414_ACEOF
34415rm -f "conftest.$ac_objext"
34416if { (eval echo "$as_me:34416: \"$ac_compile\"") >&5
34417  (eval $ac_compile) 2>&5
34418  ac_status=$?
34419  echo "$as_me:34419: \$? = $ac_status" >&5
34420  (exit "$ac_status"); } &&
34421         { ac_try='test -s "conftest.$ac_objext"'
34422  { (eval echo "$as_me:34422: \"$ac_try\"") >&5
34423  (eval $ac_try) 2>&5
34424  ac_status=$?
34425  echo "$as_me:34425: \$? = $ac_status" >&5
34426  (exit "$ac_status"); }; }; then
34427
34428			echo "$as_me:34428: result: yes" >&5
34429echo "${ECHO_T}yes" >&6
34430
34431	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
34432	CPPFLAGS="${CPPFLAGS}-D_GNU_SOURCE"
34433
34434else
34435  echo "$as_me: failed program was:" >&5
34436cat "conftest.$ac_ext" >&5
34437
34438			echo "$as_me:34438: result: unknown" >&5
34439echo "${ECHO_T}unknown" >&6
34440
34441fi
34442rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34443
34444fi
34445rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34446
34447fi
34448
34449for ac_func in \
34450	atoll \
34451	ctermid \
34452	cuserid \
34453	ftime \
34454	getcwd \
34455	getgroups \
34456	gettimeofday \
34457	getuid \
34458	popen \
34459	putenv \
34460	readdir \
34461	setuid \
34462	truncate \
34463	ttyname \
34464	unsetenv \
34465	sleep \
34466	usleep \
34467	waitpid \
34468
34469do
34470as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
34471echo "$as_me:34471: checking for $ac_func" >&5
34472echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
34473if eval "test \"\${$as_ac_var+set}\" = set"; then
34474  echo $ECHO_N "(cached) $ECHO_C" >&6
34475else
34476  cat >"conftest.$ac_ext" <<_ACEOF
34477#line 34477 "configure"
34478#include "confdefs.h"
34479#define $ac_func autoconf_temporary
34480#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34481#undef $ac_func
34482
34483#ifdef __cplusplus
34484extern "C"
34485#endif
34486
34487/* We use char because int might match the return type of a gcc2
34488   builtin and then its argument prototype would still apply.  */
34489char $ac_func (void);
34490
34491int
34492main (void)
34493{
34494
34495/* The GNU C library defines stubs for functions which it implements
34496    to always fail with ENOSYS.  Some functions are actually named
34497    something starting with __ and the normal name is an alias.  */
34498#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
34499#error found stub for $ac_func
34500#endif
34501
34502	return $ac_func ();
34503  ;
34504  return 0;
34505}
34506_ACEOF
34507rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34508if { (eval echo "$as_me:34508: \"$ac_link\"") >&5
34509  (eval $ac_link) 2>&5
34510  ac_status=$?
34511  echo "$as_me:34511: \$? = $ac_status" >&5
34512  (exit "$ac_status"); } &&
34513         { ac_try='test -s "conftest$ac_exeext"'
34514  { (eval echo "$as_me:34514: \"$ac_try\"") >&5
34515  (eval $ac_try) 2>&5
34516  ac_status=$?
34517  echo "$as_me:34517: \$? = $ac_status" >&5
34518  (exit "$ac_status"); }; }; then
34519  eval "$as_ac_var=yes"
34520else
34521  echo "$as_me: failed program was:" >&5
34522cat "conftest.$ac_ext" >&5
34523eval "$as_ac_var=no"
34524fi
34525rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34526fi
34527echo "$as_me:34527: result: `eval echo '${'"$as_ac_var"'}'`" >&5
34528echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
34529if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
34530  cat >>confdefs.h <<EOF
34531#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
34532EOF
34533
34534fi
34535done
34536
34537for ac_func in \
34538	mkdtemp
34539do
34540as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
34541echo "$as_me:34541: checking for $ac_func" >&5
34542echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
34543if eval "test \"\${$as_ac_var+set}\" = set"; then
34544  echo $ECHO_N "(cached) $ECHO_C" >&6
34545else
34546  cat >"conftest.$ac_ext" <<_ACEOF
34547#line 34547 "configure"
34548#include "confdefs.h"
34549#define $ac_func autoconf_temporary
34550#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34551#undef $ac_func
34552
34553#ifdef __cplusplus
34554extern "C"
34555#endif
34556
34557/* We use char because int might match the return type of a gcc2
34558   builtin and then its argument prototype would still apply.  */
34559char $ac_func (void);
34560
34561int
34562main (void)
34563{
34564
34565/* The GNU C library defines stubs for functions which it implements
34566    to always fail with ENOSYS.  Some functions are actually named
34567    something starting with __ and the normal name is an alias.  */
34568#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
34569#error found stub for $ac_func
34570#endif
34571
34572	return $ac_func ();
34573  ;
34574  return 0;
34575}
34576_ACEOF
34577rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34578if { (eval echo "$as_me:34578: \"$ac_link\"") >&5
34579  (eval $ac_link) 2>&5
34580  ac_status=$?
34581  echo "$as_me:34581: \$? = $ac_status" >&5
34582  (exit "$ac_status"); } &&
34583         { ac_try='test -s "conftest$ac_exeext"'
34584  { (eval echo "$as_me:34584: \"$ac_try\"") >&5
34585  (eval $ac_try) 2>&5
34586  ac_status=$?
34587  echo "$as_me:34587: \$? = $ac_status" >&5
34588  (exit "$ac_status"); }; }; then
34589  eval "$as_ac_var=yes"
34590else
34591  echo "$as_me: failed program was:" >&5
34592cat "conftest.$ac_ext" >&5
34593eval "$as_ac_var=no"
34594fi
34595rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34596fi
34597echo "$as_me:34597: result: `eval echo '${'"$as_ac_var"'}'`" >&5
34598echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
34599if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
34600  cat >>confdefs.h <<EOF
34601#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
34602EOF
34603
34604else
34605
34606for ac_func in mktemp
34607do
34608as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
34609echo "$as_me:34609: checking for $ac_func" >&5
34610echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
34611if eval "test \"\${$as_ac_var+set}\" = set"; then
34612  echo $ECHO_N "(cached) $ECHO_C" >&6
34613else
34614  cat >"conftest.$ac_ext" <<_ACEOF
34615#line 34615 "configure"
34616#include "confdefs.h"
34617#define $ac_func autoconf_temporary
34618#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34619#undef $ac_func
34620
34621#ifdef __cplusplus
34622extern "C"
34623#endif
34624
34625/* We use char because int might match the return type of a gcc2
34626   builtin and then its argument prototype would still apply.  */
34627char $ac_func (void);
34628
34629int
34630main (void)
34631{
34632
34633/* The GNU C library defines stubs for functions which it implements
34634    to always fail with ENOSYS.  Some functions are actually named
34635    something starting with __ and the normal name is an alias.  */
34636#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
34637#error found stub for $ac_func
34638#endif
34639
34640	return $ac_func ();
34641  ;
34642  return 0;
34643}
34644_ACEOF
34645rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34646if { (eval echo "$as_me:34646: \"$ac_link\"") >&5
34647  (eval $ac_link) 2>&5
34648  ac_status=$?
34649  echo "$as_me:34649: \$? = $ac_status" >&5
34650  (exit "$ac_status"); } &&
34651         { ac_try='test -s "conftest$ac_exeext"'
34652  { (eval echo "$as_me:34652: \"$ac_try\"") >&5
34653  (eval $ac_try) 2>&5
34654  ac_status=$?
34655  echo "$as_me:34655: \$? = $ac_status" >&5
34656  (exit "$ac_status"); }; }; then
34657  eval "$as_ac_var=yes"
34658else
34659  echo "$as_me: failed program was:" >&5
34660cat "conftest.$ac_ext" >&5
34661eval "$as_ac_var=no"
34662fi
34663rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34664fi
34665echo "$as_me:34665: result: `eval echo '${'"$as_ac_var"'}'`" >&5
34666echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
34667if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
34668  cat >>confdefs.h <<EOF
34669#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
34670EOF
34671
34672fi
34673done
34674
34675fi
34676done
34677
34678for ac_func in \
34679	mktime \
34680	strstr \
34681	wcwidth \
34682
34683do
34684as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
34685echo "$as_me:34685: checking for $ac_func" >&5
34686echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
34687if eval "test \"\${$as_ac_var+set}\" = set"; then
34688  echo $ECHO_N "(cached) $ECHO_C" >&6
34689else
34690  cat >"conftest.$ac_ext" <<_ACEOF
34691#line 34691 "configure"
34692#include "confdefs.h"
34693#define $ac_func autoconf_temporary
34694#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
34695#undef $ac_func
34696
34697#ifdef __cplusplus
34698extern "C"
34699#endif
34700
34701/* We use char because int might match the return type of a gcc2
34702   builtin and then its argument prototype would still apply.  */
34703char $ac_func (void);
34704
34705int
34706main (void)
34707{
34708
34709/* The GNU C library defines stubs for functions which it implements
34710    to always fail with ENOSYS.  Some functions are actually named
34711    something starting with __ and the normal name is an alias.  */
34712#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
34713#error found stub for $ac_func
34714#endif
34715
34716	return $ac_func ();
34717  ;
34718  return 0;
34719}
34720_ACEOF
34721rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34722if { (eval echo "$as_me:34722: \"$ac_link\"") >&5
34723  (eval $ac_link) 2>&5
34724  ac_status=$?
34725  echo "$as_me:34725: \$? = $ac_status" >&5
34726  (exit "$ac_status"); } &&
34727         { ac_try='test -s "conftest$ac_exeext"'
34728  { (eval echo "$as_me:34728: \"$ac_try\"") >&5
34729  (eval $ac_try) 2>&5
34730  ac_status=$?
34731  echo "$as_me:34731: \$? = $ac_status" >&5
34732  (exit "$ac_status"); }; }; then
34733  eval "$as_ac_var=yes"
34734else
34735  echo "$as_me: failed program was:" >&5
34736cat "conftest.$ac_ext" >&5
34737eval "$as_ac_var=no"
34738fi
34739rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34740fi
34741echo "$as_me:34741: result: `eval echo '${'"$as_ac_var"'}'`" >&5
34742echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
34743if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
34744  cat >>confdefs.h <<EOF
34745#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
34746EOF
34747
34748else
34749  LIBOBJS="$LIBOBJS $ac_func.$ac_objext"
34750fi
34751done
34752
34753echo "$as_me:34753: checking for random-integer functions" >&5
34754echo $ECHO_N "checking for random-integer functions... $ECHO_C" >&6
34755if test "${cf_cv_srand_func+set}" = set; then
34756  echo $ECHO_N "(cached) $ECHO_C" >&6
34757else
34758
34759cf_cv_srand_func=unknown
34760for cf_func in arc4random_push/arc4random arc4random_stir/arc4random srandom/random srand48/lrand48 srand/rand
34761do
34762
34763	cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
34764	cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`
34765
34766	case $cf_srand_func in
34767	(arc4random_stir)
34768		cf_srand_func='(void)'
34769		;;
34770	esac
34771
34772cat >"conftest.$ac_ext" <<_ACEOF
34773#line 34773 "configure"
34774#include "confdefs.h"
34775
34776#ifdef HAVE_STDLIB_H
34777#include <stdlib.h>
34778#endif
34779#ifdef HAVE_LIMITS_H
34780#include <limits.h>
34781#endif
34782
34783int
34784main (void)
34785{
34786long seed = 1; $cf_srand_func(seed); seed = $cf_rand_func(); (void)seed
34787  ;
34788  return 0;
34789}
34790_ACEOF
34791rm -f "conftest.$ac_objext" "conftest$ac_exeext"
34792if { (eval echo "$as_me:34792: \"$ac_link\"") >&5
34793  (eval $ac_link) 2>&5
34794  ac_status=$?
34795  echo "$as_me:34795: \$? = $ac_status" >&5
34796  (exit "$ac_status"); } &&
34797         { ac_try='test -s "conftest$ac_exeext"'
34798  { (eval echo "$as_me:34798: \"$ac_try\"") >&5
34799  (eval $ac_try) 2>&5
34800  ac_status=$?
34801  echo "$as_me:34801: \$? = $ac_status" >&5
34802  (exit "$ac_status"); }; }; then
34803  cf_cv_srand_func=$cf_func
34804 break
34805else
34806  echo "$as_me: failed program was:" >&5
34807cat "conftest.$ac_ext" >&5
34808fi
34809rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
34810done
34811
34812fi
34813echo "$as_me:34813: result: $cf_cv_srand_func" >&5
34814echo "${ECHO_T}$cf_cv_srand_func" >&6
34815if test "$cf_cv_srand_func" != unknown ; then
34816	echo "$as_me:34816: checking for range of random-integers" >&5
34817echo $ECHO_N "checking for range of random-integers... $ECHO_C" >&6
34818if test "${cf_cv_rand_max+set}" = set; then
34819  echo $ECHO_N "(cached) $ECHO_C" >&6
34820else
34821
34822		case "$cf_cv_srand_func" in
34823		(srand/rand)
34824			cf_cv_rand_max=RAND_MAX
34825			cf_rand_max=16
34826			;;
34827		(*/arc4random)
34828			cf_cv_rand_max=0xFFFFFFFFUL
34829			cf_rand_max=32
34830			;;
34831		(*)
34832			cf_cv_rand_max=INT_MAX
34833			cf_rand_max=31
34834			;;
34835		esac
34836		cat >"conftest.$ac_ext" <<_ACEOF
34837#line 34837 "configure"
34838#include "confdefs.h"
34839
34840#ifdef HAVE_STDLIB_H
34841#include <stdlib.h>
34842#endif
34843#ifdef HAVE_LIMITS_H
34844#include <limits.h>
34845#endif
34846
34847int
34848main (void)
34849{
34850long x = $cf_cv_rand_max; (void)x
34851  ;
34852  return 0;
34853}
34854_ACEOF
34855rm -f "conftest.$ac_objext"
34856if { (eval echo "$as_me:34856: \"$ac_compile\"") >&5
34857  (eval $ac_compile) 2>&5
34858  ac_status=$?
34859  echo "$as_me:34859: \$? = $ac_status" >&5
34860  (exit "$ac_status"); } &&
34861         { ac_try='test -s "conftest.$ac_objext"'
34862  { (eval echo "$as_me:34862: \"$ac_try\"") >&5
34863  (eval $ac_try) 2>&5
34864  ac_status=$?
34865  echo "$as_me:34865: \$? = $ac_status" >&5
34866  (exit "$ac_status"); }; }; then
34867  :
34868else
34869  echo "$as_me: failed program was:" >&5
34870cat "conftest.$ac_ext" >&5
34871cf_cv_rand_max="(1UL<<$cf_rand_max)-1"
34872fi
34873rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34874
34875fi
34876echo "$as_me:34876: result: $cf_cv_rand_max" >&5
34877echo "${ECHO_T}$cf_cv_rand_max" >&6
34878
34879	case "$cf_cv_srand_func" in
34880	(*/arc4random)
34881		echo "$as_me:34881: checking if <bsd/stdlib.h> should be included" >&5
34882echo $ECHO_N "checking if <bsd/stdlib.h> should be included... $ECHO_C" >&6
34883		cat >"conftest.$ac_ext" <<_ACEOF
34884#line 34884 "configure"
34885#include "confdefs.h"
34886#include <bsd/stdlib.h>
34887int
34888main (void)
34889{
34890void *arc4random(int);
34891						void *x = arc4random(1); (void)x
34892  ;
34893  return 0;
34894}
34895_ACEOF
34896rm -f "conftest.$ac_objext"
34897if { (eval echo "$as_me:34897: \"$ac_compile\"") >&5
34898  (eval $ac_compile) 2>&5
34899  ac_status=$?
34900  echo "$as_me:34900: \$? = $ac_status" >&5
34901  (exit "$ac_status"); } &&
34902         { ac_try='test -s "conftest.$ac_objext"'
34903  { (eval echo "$as_me:34903: \"$ac_try\"") >&5
34904  (eval $ac_try) 2>&5
34905  ac_status=$?
34906  echo "$as_me:34906: \$? = $ac_status" >&5
34907  (exit "$ac_status"); }; }; then
34908  cf_bsd_stdlib_h=no
34909else
34910  echo "$as_me: failed program was:" >&5
34911cat "conftest.$ac_ext" >&5
34912cat >"conftest.$ac_ext" <<_ACEOF
34913#line 34913 "configure"
34914#include "confdefs.h"
34915#include <bsd/stdlib.h>
34916int
34917main (void)
34918{
34919unsigned x = arc4random(); (void)x
34920  ;
34921  return 0;
34922}
34923_ACEOF
34924rm -f "conftest.$ac_objext"
34925if { (eval echo "$as_me:34925: \"$ac_compile\"") >&5
34926  (eval $ac_compile) 2>&5
34927  ac_status=$?
34928  echo "$as_me:34928: \$? = $ac_status" >&5
34929  (exit "$ac_status"); } &&
34930         { ac_try='test -s "conftest.$ac_objext"'
34931  { (eval echo "$as_me:34931: \"$ac_try\"") >&5
34932  (eval $ac_try) 2>&5
34933  ac_status=$?
34934  echo "$as_me:34934: \$? = $ac_status" >&5
34935  (exit "$ac_status"); }; }; then
34936  cf_bsd_stdlib_h=yes
34937else
34938  echo "$as_me: failed program was:" >&5
34939cat "conftest.$ac_ext" >&5
34940cf_bsd_stdlib_h=no
34941fi
34942rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34943fi
34944rm -f "conftest.$ac_objext" "conftest.$ac_ext"
34945	    echo "$as_me:34945: result: $cf_bsd_stdlib_h" >&5
34946echo "${ECHO_T}$cf_bsd_stdlib_h" >&6
34947		if test "$cf_bsd_stdlib_h" = yes
34948		then
34949
34950cat >>confdefs.h <<\EOF
34951#define HAVE_BSD_STDLIB_H 1
34952EOF
34953
34954		else
34955			echo "$as_me:34955: checking if <bsd/random.h> should be included" >&5
34956echo $ECHO_N "checking if <bsd/random.h> should be included... $ECHO_C" >&6
34957			cat >"conftest.$ac_ext" <<_ACEOF
34958#line 34958 "configure"
34959#include "confdefs.h"
34960#include <bsd/random.h>
34961int
34962main (void)
34963{
34964void *arc4random(int);
34965							void *x = arc4random(1); (void)x
34966  ;
34967  return 0;
34968}
34969_ACEOF
34970rm -f "conftest.$ac_objext"
34971if { (eval echo "$as_me:34971: \"$ac_compile\"") >&5
34972  (eval $ac_compile) 2>&5
34973  ac_status=$?
34974  echo "$as_me:34974: \$? = $ac_status" >&5
34975  (exit "$ac_status"); } &&
34976         { ac_try='test -s "conftest.$ac_objext"'
34977  { (eval echo "$as_me:34977: \"$ac_try\"") >&5
34978  (eval $ac_try) 2>&5
34979  ac_status=$?
34980  echo "$as_me:34980: \$? = $ac_status" >&5
34981  (exit "$ac_status"); }; }; then
34982  cf_bsd_random_h=no
34983else
34984  echo "$as_me: failed program was:" >&5
34985cat "conftest.$ac_ext" >&5
34986cat >"conftest.$ac_ext" <<_ACEOF
34987#line 34987 "configure"
34988#include "confdefs.h"
34989#include <bsd/random.h>
34990int
34991main (void)
34992{
34993unsigned x = arc4random(); (void)x
34994  ;
34995  return 0;
34996}
34997_ACEOF
34998rm -f "conftest.$ac_objext"
34999if { (eval echo "$as_me:34999: \"$ac_compile\"") >&5
35000  (eval $ac_compile) 2>&5
35001  ac_status=$?
35002  echo "$as_me:35002: \$? = $ac_status" >&5
35003  (exit "$ac_status"); } &&
35004         { ac_try='test -s "conftest.$ac_objext"'
35005  { (eval echo "$as_me:35005: \"$ac_try\"") >&5
35006  (eval $ac_try) 2>&5
35007  ac_status=$?
35008  echo "$as_me:35008: \$? = $ac_status" >&5
35009  (exit "$ac_status"); }; }; then
35010  cf_bsd_random_h=yes
35011else
35012  echo "$as_me: failed program was:" >&5
35013cat "conftest.$ac_ext" >&5
35014cf_bsd_random_h=no
35015fi
35016rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35017fi
35018rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35019			echo "$as_me:35019: result: $cf_bsd_random_h" >&5
35020echo "${ECHO_T}$cf_bsd_random_h" >&6
35021			if test "$cf_bsd_random_h" = yes
35022			then
35023
35024cat >>confdefs.h <<\EOF
35025#define HAVE_BSD_RANDOM_H 1
35026EOF
35027
35028			else
35029				{ echo "$as_me:35029: WARNING: no header file found for arc4random" >&5
35030echo "$as_me: WARNING: no header file found for arc4random" >&2;}
35031			fi
35032		fi
35033		;;
35034	esac
35035
35036	cf_srand_func=`echo $cf_func | sed -e 's%/.*%%'`
35037	cf_rand_func=`echo $cf_func | sed -e 's%.*/%%'`
35038
35039	case $cf_srand_func in
35040	(arc4random_stir)
35041		cf_srand_func='(void)'
35042		;;
35043	esac
35044
35045cf_rand_max=`echo "lynx_rand_max" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35046
35047cat >>confdefs.h <<EOF
35048#define lynx_srand $cf_srand_func
35049EOF
35050
35051cat >>confdefs.h <<EOF
35052#define lynx_rand $cf_rand_func
35053EOF
35054
35055cat >>confdefs.h <<EOF
35056#define $cf_rand_max $cf_cv_rand_max
35057EOF
35058
35059fi
35060
35061for ac_func in sleep
35062do
35063
35064echo "$as_me:35064: checking for $ac_func declaration" >&5
35065echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
35066if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
35067  echo $ECHO_N "(cached) $ECHO_C" >&6
35068else
35069  cat >"conftest.$ac_ext" <<_ACEOF
35070#line 35070 "configure"
35071#include "confdefs.h"
35072
35073#ifdef HAVE_STDLIB_H
35074#include <stdlib.h>
35075#endif
35076#ifdef HAVE_UNISTD_H
35077#include <unistd.h>
35078#endif
35079
35080int
35081main (void)
35082{
35083#ifndef $ac_func
35084extern	int	$ac_func();
35085#endif
35086  ;
35087  return 0;
35088}
35089_ACEOF
35090rm -f "conftest.$ac_objext"
35091if { (eval echo "$as_me:35091: \"$ac_compile\"") >&5
35092  (eval $ac_compile) 2>&5
35093  ac_status=$?
35094  echo "$as_me:35094: \$? = $ac_status" >&5
35095  (exit "$ac_status"); } &&
35096         { ac_try='test -s "conftest.$ac_objext"'
35097  { (eval echo "$as_me:35097: \"$ac_try\"") >&5
35098  (eval $ac_try) 2>&5
35099  ac_status=$?
35100  echo "$as_me:35100: \$? = $ac_status" >&5
35101  (exit "$ac_status"); }; }; then
35102
35103cat >"conftest.$ac_ext" <<_ACEOF
35104#line 35104 "configure"
35105#include "confdefs.h"
35106
35107#ifdef HAVE_STDLIB_H
35108#include <stdlib.h>
35109#endif
35110#ifdef HAVE_UNISTD_H
35111#include <unistd.h>
35112#endif
35113
35114int
35115main (void)
35116{
35117#ifndef $ac_func
35118int	(*p)() = $ac_func;
35119#endif
35120  ;
35121  return 0;
35122}
35123_ACEOF
35124rm -f "conftest.$ac_objext"
35125if { (eval echo "$as_me:35125: \"$ac_compile\"") >&5
35126  (eval $ac_compile) 2>&5
35127  ac_status=$?
35128  echo "$as_me:35128: \$? = $ac_status" >&5
35129  (exit "$ac_status"); } &&
35130         { ac_try='test -s "conftest.$ac_objext"'
35131  { (eval echo "$as_me:35131: \"$ac_try\"") >&5
35132  (eval $ac_try) 2>&5
35133  ac_status=$?
35134  echo "$as_me:35134: \$? = $ac_status" >&5
35135  (exit "$ac_status"); }; }; then
35136
35137eval "ac_cv_func_decl_$ac_func=yes"
35138else
35139  echo "$as_me: failed program was:" >&5
35140cat "conftest.$ac_ext" >&5
35141
35142eval "ac_cv_func_decl_$ac_func=no"
35143fi
35144rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35145else
35146  echo "$as_me: failed program was:" >&5
35147cat "conftest.$ac_ext" >&5
35148
35149eval "ac_cv_func_decl_$ac_func=yes"
35150fi
35151rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35152fi
35153
35154if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
35155  echo "$as_me:35155: result: yes" >&5
35156echo "${ECHO_T}yes" >&6
35157  :
35158else
35159  echo "$as_me:35159: result: no" >&5
35160echo "${ECHO_T}no" >&6
35161
35162ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35163
35164  cat >>confdefs.h <<EOF
35165#define $ac_tr_func 1
35166EOF
35167
35168fi
35169done
35170
35171for ac_func in strstr
35172do
35173
35174echo "$as_me:35174: checking for $ac_func declaration" >&5
35175echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
35176if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
35177  echo $ECHO_N "(cached) $ECHO_C" >&6
35178else
35179  cat >"conftest.$ac_ext" <<_ACEOF
35180#line 35180 "configure"
35181#include "confdefs.h"
35182#include <string.h>
35183int
35184main (void)
35185{
35186#ifndef $ac_func
35187extern	int	$ac_func();
35188#endif
35189  ;
35190  return 0;
35191}
35192_ACEOF
35193rm -f "conftest.$ac_objext"
35194if { (eval echo "$as_me:35194: \"$ac_compile\"") >&5
35195  (eval $ac_compile) 2>&5
35196  ac_status=$?
35197  echo "$as_me:35197: \$? = $ac_status" >&5
35198  (exit "$ac_status"); } &&
35199         { ac_try='test -s "conftest.$ac_objext"'
35200  { (eval echo "$as_me:35200: \"$ac_try\"") >&5
35201  (eval $ac_try) 2>&5
35202  ac_status=$?
35203  echo "$as_me:35203: \$? = $ac_status" >&5
35204  (exit "$ac_status"); }; }; then
35205
35206cat >"conftest.$ac_ext" <<_ACEOF
35207#line 35207 "configure"
35208#include "confdefs.h"
35209#include <string.h>
35210int
35211main (void)
35212{
35213#ifndef $ac_func
35214int	(*p)() = $ac_func;
35215#endif
35216  ;
35217  return 0;
35218}
35219_ACEOF
35220rm -f "conftest.$ac_objext"
35221if { (eval echo "$as_me:35221: \"$ac_compile\"") >&5
35222  (eval $ac_compile) 2>&5
35223  ac_status=$?
35224  echo "$as_me:35224: \$? = $ac_status" >&5
35225  (exit "$ac_status"); } &&
35226         { ac_try='test -s "conftest.$ac_objext"'
35227  { (eval echo "$as_me:35227: \"$ac_try\"") >&5
35228  (eval $ac_try) 2>&5
35229  ac_status=$?
35230  echo "$as_me:35230: \$? = $ac_status" >&5
35231  (exit "$ac_status"); }; }; then
35232
35233eval "ac_cv_func_decl_$ac_func=yes"
35234else
35235  echo "$as_me: failed program was:" >&5
35236cat "conftest.$ac_ext" >&5
35237
35238eval "ac_cv_func_decl_$ac_func=no"
35239fi
35240rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35241else
35242  echo "$as_me: failed program was:" >&5
35243cat "conftest.$ac_ext" >&5
35244
35245eval "ac_cv_func_decl_$ac_func=yes"
35246fi
35247rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35248fi
35249
35250if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
35251  echo "$as_me:35251: result: yes" >&5
35252echo "${ECHO_T}yes" >&6
35253  :
35254else
35255  echo "$as_me:35255: result: no" >&5
35256echo "${ECHO_T}no" >&6
35257
35258ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35259
35260  cat >>confdefs.h <<EOF
35261#define $ac_tr_func 1
35262EOF
35263
35264fi
35265done
35266
35267for ac_func in getgrgid getgrnam
35268do
35269
35270echo "$as_me:35270: checking for $ac_func declaration" >&5
35271echo $ECHO_N "checking for $ac_func declaration... $ECHO_C" >&6
35272if eval "test \"\${ac_cv_func_decl_$ac_func+set}\" = set"; then
35273  echo $ECHO_N "(cached) $ECHO_C" >&6
35274else
35275  cat >"conftest.$ac_ext" <<_ACEOF
35276#line 35276 "configure"
35277#include "confdefs.h"
35278
35279#include <stdio.h>
35280#include <grp.h>
35281int
35282main (void)
35283{
35284#ifndef $ac_func
35285extern	int	$ac_func();
35286#endif
35287  ;
35288  return 0;
35289}
35290_ACEOF
35291rm -f "conftest.$ac_objext"
35292if { (eval echo "$as_me:35292: \"$ac_compile\"") >&5
35293  (eval $ac_compile) 2>&5
35294  ac_status=$?
35295  echo "$as_me:35295: \$? = $ac_status" >&5
35296  (exit "$ac_status"); } &&
35297         { ac_try='test -s "conftest.$ac_objext"'
35298  { (eval echo "$as_me:35298: \"$ac_try\"") >&5
35299  (eval $ac_try) 2>&5
35300  ac_status=$?
35301  echo "$as_me:35301: \$? = $ac_status" >&5
35302  (exit "$ac_status"); }; }; then
35303
35304cat >"conftest.$ac_ext" <<_ACEOF
35305#line 35305 "configure"
35306#include "confdefs.h"
35307
35308#include <stdio.h>
35309#include <grp.h>
35310int
35311main (void)
35312{
35313#ifndef $ac_func
35314int	(*p)() = $ac_func;
35315#endif
35316  ;
35317  return 0;
35318}
35319_ACEOF
35320rm -f "conftest.$ac_objext"
35321if { (eval echo "$as_me:35321: \"$ac_compile\"") >&5
35322  (eval $ac_compile) 2>&5
35323  ac_status=$?
35324  echo "$as_me:35324: \$? = $ac_status" >&5
35325  (exit "$ac_status"); } &&
35326         { ac_try='test -s "conftest.$ac_objext"'
35327  { (eval echo "$as_me:35327: \"$ac_try\"") >&5
35328  (eval $ac_try) 2>&5
35329  ac_status=$?
35330  echo "$as_me:35330: \$? = $ac_status" >&5
35331  (exit "$ac_status"); }; }; then
35332
35333eval "ac_cv_func_decl_$ac_func=yes"
35334else
35335  echo "$as_me: failed program was:" >&5
35336cat "conftest.$ac_ext" >&5
35337
35338eval "ac_cv_func_decl_$ac_func=no"
35339fi
35340rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35341else
35342  echo "$as_me: failed program was:" >&5
35343cat "conftest.$ac_ext" >&5
35344
35345eval "ac_cv_func_decl_$ac_func=yes"
35346fi
35347rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35348fi
35349
35350if eval "test \"`echo '$ac_cv_func_'decl_$ac_func`\" = yes"; then
35351  echo "$as_me:35351: result: yes" >&5
35352echo "${ECHO_T}yes" >&6
35353  :
35354else
35355  echo "$as_me:35355: result: no" >&5
35356echo "${ECHO_T}no" >&6
35357
35358ac_tr_func=`echo "DECL_$ac_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35359
35360  cat >>confdefs.h <<EOF
35361#define $ac_tr_func 1
35362EOF
35363
35364fi
35365done
35366
35367echo "$as_me:35367: checking if TRUE/FALSE are defined" >&5
35368echo $ECHO_N "checking if TRUE/FALSE are defined... $ECHO_C" >&6
35369if test "${cf_cv_bool_defs+set}" = set; then
35370  echo $ECHO_N "(cached) $ECHO_C" >&6
35371else
35372
35373cat >"conftest.$ac_ext" <<_ACEOF
35374#line 35374 "configure"
35375#include "confdefs.h"
35376
35377#include <${cf_cv_ncurses_header:-curses.h}>
35378#include <stdio.h>
35379int
35380main (void)
35381{
35382int x = TRUE, y = FALSE
35383  ;
35384  return 0;
35385}
35386_ACEOF
35387rm -f "conftest.$ac_objext"
35388if { (eval echo "$as_me:35388: \"$ac_compile\"") >&5
35389  (eval $ac_compile) 2>&5
35390  ac_status=$?
35391  echo "$as_me:35391: \$? = $ac_status" >&5
35392  (exit "$ac_status"); } &&
35393         { ac_try='test -s "conftest.$ac_objext"'
35394  { (eval echo "$as_me:35394: \"$ac_try\"") >&5
35395  (eval $ac_try) 2>&5
35396  ac_status=$?
35397  echo "$as_me:35397: \$? = $ac_status" >&5
35398  (exit "$ac_status"); }; }; then
35399  cf_cv_bool_defs=yes
35400else
35401  echo "$as_me: failed program was:" >&5
35402cat "conftest.$ac_ext" >&5
35403cf_cv_bool_defs=no
35404fi
35405rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35406fi
35407
35408echo "$as_me:35408: result: $cf_cv_bool_defs" >&5
35409echo "${ECHO_T}$cf_cv_bool_defs" >&6
35410if test "$cf_cv_bool_defs" = no ; then
35411
35412cat >>confdefs.h <<\EOF
35413#define TRUE (1)
35414EOF
35415
35416cat >>confdefs.h <<\EOF
35417#define FALSE (0)
35418EOF
35419
35420fi
35421
35422echo "$as_me:35422: checking if external errno is declared" >&5
35423echo $ECHO_N "checking if external errno is declared... $ECHO_C" >&6
35424if test "${cf_cv_dcl_errno+set}" = set; then
35425  echo $ECHO_N "(cached) $ECHO_C" >&6
35426else
35427
35428	cat >"conftest.$ac_ext" <<_ACEOF
35429#line 35429 "configure"
35430#include "confdefs.h"
35431
35432#ifdef HAVE_STDLIB_H
35433#include <stdlib.h>
35434#endif
35435#include <stdio.h>
35436#include <sys/types.h>
35437#include <errno.h>
35438int
35439main (void)
35440{
35441int x = (int) errno; (void)x
35442  ;
35443  return 0;
35444}
35445_ACEOF
35446rm -f "conftest.$ac_objext"
35447if { (eval echo "$as_me:35447: \"$ac_compile\"") >&5
35448  (eval $ac_compile) 2>&5
35449  ac_status=$?
35450  echo "$as_me:35450: \$? = $ac_status" >&5
35451  (exit "$ac_status"); } &&
35452         { ac_try='test -s "conftest.$ac_objext"'
35453  { (eval echo "$as_me:35453: \"$ac_try\"") >&5
35454  (eval $ac_try) 2>&5
35455  ac_status=$?
35456  echo "$as_me:35456: \$? = $ac_status" >&5
35457  (exit "$ac_status"); }; }; then
35458  cf_cv_dcl_errno=yes
35459else
35460  echo "$as_me: failed program was:" >&5
35461cat "conftest.$ac_ext" >&5
35462cf_cv_dcl_errno=no
35463fi
35464rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35465
35466fi
35467echo "$as_me:35467: result: $cf_cv_dcl_errno" >&5
35468echo "${ECHO_T}$cf_cv_dcl_errno" >&6
35469
35470if test "$cf_cv_dcl_errno" = no ; then
35471
35472cf_result=`echo "decl_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35473
35474	cat >>confdefs.h <<EOF
35475#define $cf_result 1
35476EOF
35477
35478fi
35479
35480# It's possible (for near-UNIX clones) that the data doesn't exist
35481
35482echo "$as_me:35482: checking if external errno exists" >&5
35483echo $ECHO_N "checking if external errno exists... $ECHO_C" >&6
35484if test "${cf_cv_have_errno+set}" = set; then
35485  echo $ECHO_N "(cached) $ECHO_C" >&6
35486else
35487
35488	cat >"conftest.$ac_ext" <<_ACEOF
35489#line 35489 "configure"
35490#include "confdefs.h"
35491
35492#undef errno
35493extern int errno;
35494
35495int
35496main (void)
35497{
35498errno = 2
35499  ;
35500  return 0;
35501}
35502_ACEOF
35503rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35504if { (eval echo "$as_me:35504: \"$ac_link\"") >&5
35505  (eval $ac_link) 2>&5
35506  ac_status=$?
35507  echo "$as_me:35507: \$? = $ac_status" >&5
35508  (exit "$ac_status"); } &&
35509         { ac_try='test -s "conftest$ac_exeext"'
35510  { (eval echo "$as_me:35510: \"$ac_try\"") >&5
35511  (eval $ac_try) 2>&5
35512  ac_status=$?
35513  echo "$as_me:35513: \$? = $ac_status" >&5
35514  (exit "$ac_status"); }; }; then
35515  cf_cv_have_errno=yes
35516else
35517  echo "$as_me: failed program was:" >&5
35518cat "conftest.$ac_ext" >&5
35519cf_cv_have_errno=no
35520fi
35521rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35522
35523fi
35524echo "$as_me:35524: result: $cf_cv_have_errno" >&5
35525echo "${ECHO_T}$cf_cv_have_errno" >&6
35526
35527if test "$cf_cv_have_errno" = yes ; then
35528
35529cf_result=`echo "have_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35530
35531	cat >>confdefs.h <<EOF
35532#define $cf_result 1
35533EOF
35534
35535fi
35536
35537echo "$as_me:35537: checking if we can set errno" >&5
35538echo $ECHO_N "checking if we can set errno... $ECHO_C" >&6
35539if test "${cf_cv_set_errno+set}" = set; then
35540  echo $ECHO_N "(cached) $ECHO_C" >&6
35541else
35542
35543if test "$cross_compiling" = yes; then
35544  cat >"conftest.$ac_ext" <<_ACEOF
35545#line 35545 "configure"
35546#include "confdefs.h"
35547#include <errno.h>
35548int
35549main (void)
35550{
35551errno = 255
35552  ;
35553  return 0;
35554}
35555_ACEOF
35556rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35557if { (eval echo "$as_me:35557: \"$ac_link\"") >&5
35558  (eval $ac_link) 2>&5
35559  ac_status=$?
35560  echo "$as_me:35560: \$? = $ac_status" >&5
35561  (exit "$ac_status"); } &&
35562         { ac_try='test -s "conftest$ac_exeext"'
35563  { (eval echo "$as_me:35563: \"$ac_try\"") >&5
35564  (eval $ac_try) 2>&5
35565  ac_status=$?
35566  echo "$as_me:35566: \$? = $ac_status" >&5
35567  (exit "$ac_status"); }; }; then
35568  cf_cv_set_errno=maybe
35569else
35570  echo "$as_me: failed program was:" >&5
35571cat "conftest.$ac_ext" >&5
35572cf_cv_set_errno=no
35573fi
35574rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35575else
35576  cat >"conftest.$ac_ext" <<_ACEOF
35577#line 35577 "configure"
35578#include "confdefs.h"
35579
35580#include <errno.h>
35581int main(void)
35582{
35583	errno = 255;
35584	${cf_cv_main_return:-return}(errno != 255);
35585}
35586_ACEOF
35587rm -f "conftest$ac_exeext"
35588if { (eval echo "$as_me:35588: \"$ac_link\"") >&5
35589  (eval $ac_link) 2>&5
35590  ac_status=$?
35591  echo "$as_me:35591: \$? = $ac_status" >&5
35592  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
35593  { (eval echo "$as_me:35593: \"$ac_try\"") >&5
35594  (eval $ac_try) 2>&5
35595  ac_status=$?
35596  echo "$as_me:35596: \$? = $ac_status" >&5
35597  (exit "$ac_status"); }; }; then
35598  cf_cv_set_errno=yes
35599else
35600  echo "$as_me: program exited with status $ac_status" >&5
35601echo "$as_me: failed program was:" >&5
35602cat "conftest.$ac_ext" >&5
35603cf_cv_set_errno=no
35604fi
35605rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
35606fi
35607
35608fi
35609echo "$as_me:35609: result: $cf_cv_set_errno" >&5
35610echo "${ECHO_T}$cf_cv_set_errno" >&6
35611test "$cf_cv_set_errno" != no &&
35612cat >>confdefs.h <<\EOF
35613#define CAN_SET_ERRNO 1
35614EOF
35615
35616echo "$as_me:35616: checking for setlocale()" >&5
35617echo $ECHO_N "checking for setlocale()... $ECHO_C" >&6
35618if test "${cf_cv_locale+set}" = set; then
35619  echo $ECHO_N "(cached) $ECHO_C" >&6
35620else
35621
35622cat >"conftest.$ac_ext" <<_ACEOF
35623#line 35623 "configure"
35624#include "confdefs.h"
35625#include <locale.h>
35626int
35627main (void)
35628{
35629setlocale(LC_ALL, "")
35630  ;
35631  return 0;
35632}
35633_ACEOF
35634rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35635if { (eval echo "$as_me:35635: \"$ac_link\"") >&5
35636  (eval $ac_link) 2>&5
35637  ac_status=$?
35638  echo "$as_me:35638: \$? = $ac_status" >&5
35639  (exit "$ac_status"); } &&
35640         { ac_try='test -s "conftest$ac_exeext"'
35641  { (eval echo "$as_me:35641: \"$ac_try\"") >&5
35642  (eval $ac_try) 2>&5
35643  ac_status=$?
35644  echo "$as_me:35644: \$? = $ac_status" >&5
35645  (exit "$ac_status"); }; }; then
35646  cf_cv_locale=yes
35647else
35648  echo "$as_me: failed program was:" >&5
35649cat "conftest.$ac_ext" >&5
35650cf_cv_locale=no
35651fi
35652rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35653
35654fi
35655
35656echo "$as_me:35656: result: $cf_cv_locale" >&5
35657echo "${ECHO_T}$cf_cv_locale" >&6
35658test "$cf_cv_locale" = yes && {
35659cat >>confdefs.h <<\EOF
35660#define LOCALE 1
35661EOF
35662 }
35663
35664echo "$as_me:35664: checking if NGROUPS is defined" >&5
35665echo $ECHO_N "checking if NGROUPS is defined... $ECHO_C" >&6
35666if test "${cf_cv_ngroups+set}" = set; then
35667  echo $ECHO_N "(cached) $ECHO_C" >&6
35668else
35669
35670cat >"conftest.$ac_ext" <<_ACEOF
35671#line 35671 "configure"
35672#include "confdefs.h"
35673
35674#if HAVE_SYS_PARAM_H
35675#include <sys/param.h>
35676#endif
35677#if HAVE_LIMITS_H
35678#include <limits.h>
35679#endif
35680
35681int
35682main (void)
35683{
35684int x = NGROUPS
35685  ;
35686  return 0;
35687}
35688_ACEOF
35689rm -f "conftest.$ac_objext"
35690if { (eval echo "$as_me:35690: \"$ac_compile\"") >&5
35691  (eval $ac_compile) 2>&5
35692  ac_status=$?
35693  echo "$as_me:35693: \$? = $ac_status" >&5
35694  (exit "$ac_status"); } &&
35695         { ac_try='test -s "conftest.$ac_objext"'
35696  { (eval echo "$as_me:35696: \"$ac_try\"") >&5
35697  (eval $ac_try) 2>&5
35698  ac_status=$?
35699  echo "$as_me:35699: \$? = $ac_status" >&5
35700  (exit "$ac_status"); }; }; then
35701  cf_cv_ngroups=yes
35702else
35703  echo "$as_me: failed program was:" >&5
35704cat "conftest.$ac_ext" >&5
35705cat >"conftest.$ac_ext" <<_ACEOF
35706#line 35706 "configure"
35707#include "confdefs.h"
35708
35709#if HAVE_SYS_PARAM_H
35710#include <sys/param.h>
35711#endif
35712#if HAVE_LIMITS_H
35713#include <limits.h>
35714#endif
35715
35716int
35717main (void)
35718{
35719int x = NGROUPS_MAX
35720  ;
35721  return 0;
35722}
35723_ACEOF
35724rm -f "conftest.$ac_objext"
35725if { (eval echo "$as_me:35725: \"$ac_compile\"") >&5
35726  (eval $ac_compile) 2>&5
35727  ac_status=$?
35728  echo "$as_me:35728: \$? = $ac_status" >&5
35729  (exit "$ac_status"); } &&
35730         { ac_try='test -s "conftest.$ac_objext"'
35731  { (eval echo "$as_me:35731: \"$ac_try\"") >&5
35732  (eval $ac_try) 2>&5
35733  ac_status=$?
35734  echo "$as_me:35734: \$? = $ac_status" >&5
35735  (exit "$ac_status"); }; }; then
35736  cf_cv_ngroups=NGROUPS_MAX
35737else
35738  echo "$as_me: failed program was:" >&5
35739cat "conftest.$ac_ext" >&5
35740cf_cv_ngroups=no
35741fi
35742rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35743
35744fi
35745rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35746echo "$as_me:35746: result: $cf_cv_ngroups" >&5
35747echo "${ECHO_T}$cf_cv_ngroups" >&6
35748
35749fi
35750
35751if test "$cf_cv_ngroups" = no ; then
35752
35753cat >>confdefs.h <<\EOF
35754#define NGROUPS 16
35755EOF
35756
35757elif test "$cf_cv_ngroups" = NGROUPS_MAX ; then
35758	cat >>confdefs.h <<\EOF
35759#define NGROUPS NGROUPS_MAX
35760EOF
35761
35762fi
35763
35764for ac_func in strerror
35765do
35766as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
35767echo "$as_me:35767: checking for $ac_func" >&5
35768echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
35769if eval "test \"\${$as_ac_var+set}\" = set"; then
35770  echo $ECHO_N "(cached) $ECHO_C" >&6
35771else
35772  cat >"conftest.$ac_ext" <<_ACEOF
35773#line 35773 "configure"
35774#include "confdefs.h"
35775#define $ac_func autoconf_temporary
35776#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
35777#undef $ac_func
35778
35779#ifdef __cplusplus
35780extern "C"
35781#endif
35782
35783/* We use char because int might match the return type of a gcc2
35784   builtin and then its argument prototype would still apply.  */
35785char $ac_func (void);
35786
35787int
35788main (void)
35789{
35790
35791/* The GNU C library defines stubs for functions which it implements
35792    to always fail with ENOSYS.  Some functions are actually named
35793    something starting with __ and the normal name is an alias.  */
35794#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
35795#error found stub for $ac_func
35796#endif
35797
35798	return $ac_func ();
35799  ;
35800  return 0;
35801}
35802_ACEOF
35803rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35804if { (eval echo "$as_me:35804: \"$ac_link\"") >&5
35805  (eval $ac_link) 2>&5
35806  ac_status=$?
35807  echo "$as_me:35807: \$? = $ac_status" >&5
35808  (exit "$ac_status"); } &&
35809         { ac_try='test -s "conftest$ac_exeext"'
35810  { (eval echo "$as_me:35810: \"$ac_try\"") >&5
35811  (eval $ac_try) 2>&5
35812  ac_status=$?
35813  echo "$as_me:35813: \$? = $ac_status" >&5
35814  (exit "$ac_status"); }; }; then
35815  eval "$as_ac_var=yes"
35816else
35817  echo "$as_me: failed program was:" >&5
35818cat "conftest.$ac_ext" >&5
35819eval "$as_ac_var=no"
35820fi
35821rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35822fi
35823echo "$as_me:35823: result: `eval echo '${'"$as_ac_var"'}'`" >&5
35824echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
35825if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
35826  cat >>confdefs.h <<EOF
35827#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
35828EOF
35829
35830else
35831
35832echo "$as_me:35832: checking if external sys_nerr is declared" >&5
35833echo $ECHO_N "checking if external sys_nerr is declared... $ECHO_C" >&6
35834if test "${cf_cv_dcl_sys_nerr+set}" = set; then
35835  echo $ECHO_N "(cached) $ECHO_C" >&6
35836else
35837
35838	cat >"conftest.$ac_ext" <<_ACEOF
35839#line 35839 "configure"
35840#include "confdefs.h"
35841
35842#ifdef HAVE_STDLIB_H
35843#include <stdlib.h>
35844#endif
35845#include <stdio.h>
35846#include <sys/types.h>
35847#include <errno.h>
35848int
35849main (void)
35850{
35851int x = (int) sys_nerr; (void)x
35852  ;
35853  return 0;
35854}
35855_ACEOF
35856rm -f "conftest.$ac_objext"
35857if { (eval echo "$as_me:35857: \"$ac_compile\"") >&5
35858  (eval $ac_compile) 2>&5
35859  ac_status=$?
35860  echo "$as_me:35860: \$? = $ac_status" >&5
35861  (exit "$ac_status"); } &&
35862         { ac_try='test -s "conftest.$ac_objext"'
35863  { (eval echo "$as_me:35863: \"$ac_try\"") >&5
35864  (eval $ac_try) 2>&5
35865  ac_status=$?
35866  echo "$as_me:35866: \$? = $ac_status" >&5
35867  (exit "$ac_status"); }; }; then
35868  cf_cv_dcl_sys_nerr=yes
35869else
35870  echo "$as_me: failed program was:" >&5
35871cat "conftest.$ac_ext" >&5
35872cf_cv_dcl_sys_nerr=no
35873fi
35874rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35875
35876fi
35877echo "$as_me:35877: result: $cf_cv_dcl_sys_nerr" >&5
35878echo "${ECHO_T}$cf_cv_dcl_sys_nerr" >&6
35879
35880if test "$cf_cv_dcl_sys_nerr" = no ; then
35881
35882cf_result=`echo "decl_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35883
35884	cat >>confdefs.h <<EOF
35885#define $cf_result 1
35886EOF
35887
35888fi
35889
35890# It's possible (for near-UNIX clones) that the data doesn't exist
35891
35892echo "$as_me:35892: checking if external sys_nerr exists" >&5
35893echo $ECHO_N "checking if external sys_nerr exists... $ECHO_C" >&6
35894if test "${cf_cv_have_sys_nerr+set}" = set; then
35895  echo $ECHO_N "(cached) $ECHO_C" >&6
35896else
35897
35898	cat >"conftest.$ac_ext" <<_ACEOF
35899#line 35899 "configure"
35900#include "confdefs.h"
35901
35902#undef sys_nerr
35903extern int sys_nerr;
35904
35905int
35906main (void)
35907{
35908sys_nerr = 2
35909  ;
35910  return 0;
35911}
35912_ACEOF
35913rm -f "conftest.$ac_objext" "conftest$ac_exeext"
35914if { (eval echo "$as_me:35914: \"$ac_link\"") >&5
35915  (eval $ac_link) 2>&5
35916  ac_status=$?
35917  echo "$as_me:35917: \$? = $ac_status" >&5
35918  (exit "$ac_status"); } &&
35919         { ac_try='test -s "conftest$ac_exeext"'
35920  { (eval echo "$as_me:35920: \"$ac_try\"") >&5
35921  (eval $ac_try) 2>&5
35922  ac_status=$?
35923  echo "$as_me:35923: \$? = $ac_status" >&5
35924  (exit "$ac_status"); }; }; then
35925  cf_cv_have_sys_nerr=yes
35926else
35927  echo "$as_me: failed program was:" >&5
35928cat "conftest.$ac_ext" >&5
35929cf_cv_have_sys_nerr=no
35930fi
35931rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
35932
35933fi
35934echo "$as_me:35934: result: $cf_cv_have_sys_nerr" >&5
35935echo "${ECHO_T}$cf_cv_have_sys_nerr" >&6
35936
35937if test "$cf_cv_have_sys_nerr" = yes ; then
35938
35939cf_result=`echo "have_sys_nerr" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35940
35941	cat >>confdefs.h <<EOF
35942#define $cf_result 1
35943EOF
35944
35945fi
35946
35947echo "$as_me:35947: checking if external sys_errlist is declared" >&5
35948echo $ECHO_N "checking if external sys_errlist is declared... $ECHO_C" >&6
35949if test "${cf_cv_dcl_sys_errlist+set}" = set; then
35950  echo $ECHO_N "(cached) $ECHO_C" >&6
35951else
35952
35953	cat >"conftest.$ac_ext" <<_ACEOF
35954#line 35954 "configure"
35955#include "confdefs.h"
35956
35957#ifdef HAVE_STDLIB_H
35958#include <stdlib.h>
35959#endif
35960#include <stdio.h>
35961#include <sys/types.h>
35962#include <errno.h>
35963int
35964main (void)
35965{
35966int x = (int) sys_errlist; (void)x
35967  ;
35968  return 0;
35969}
35970_ACEOF
35971rm -f "conftest.$ac_objext"
35972if { (eval echo "$as_me:35972: \"$ac_compile\"") >&5
35973  (eval $ac_compile) 2>&5
35974  ac_status=$?
35975  echo "$as_me:35975: \$? = $ac_status" >&5
35976  (exit "$ac_status"); } &&
35977         { ac_try='test -s "conftest.$ac_objext"'
35978  { (eval echo "$as_me:35978: \"$ac_try\"") >&5
35979  (eval $ac_try) 2>&5
35980  ac_status=$?
35981  echo "$as_me:35981: \$? = $ac_status" >&5
35982  (exit "$ac_status"); }; }; then
35983  cf_cv_dcl_sys_errlist=yes
35984else
35985  echo "$as_me: failed program was:" >&5
35986cat "conftest.$ac_ext" >&5
35987cf_cv_dcl_sys_errlist=no
35988fi
35989rm -f "conftest.$ac_objext" "conftest.$ac_ext"
35990
35991fi
35992echo "$as_me:35992: result: $cf_cv_dcl_sys_errlist" >&5
35993echo "${ECHO_T}$cf_cv_dcl_sys_errlist" >&6
35994
35995if test "$cf_cv_dcl_sys_errlist" = no ; then
35996
35997cf_result=`echo "decl_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
35998
35999	cat >>confdefs.h <<EOF
36000#define $cf_result 1
36001EOF
36002
36003fi
36004
36005# It's possible (for near-UNIX clones) that the data doesn't exist
36006
36007echo "$as_me:36007: checking if external sys_errlist exists" >&5
36008echo $ECHO_N "checking if external sys_errlist exists... $ECHO_C" >&6
36009if test "${cf_cv_have_sys_errlist+set}" = set; then
36010  echo $ECHO_N "(cached) $ECHO_C" >&6
36011else
36012
36013	cat >"conftest.$ac_ext" <<_ACEOF
36014#line 36014 "configure"
36015#include "confdefs.h"
36016
36017#undef sys_errlist
36018extern int sys_errlist;
36019
36020int
36021main (void)
36022{
36023sys_errlist = 2
36024  ;
36025  return 0;
36026}
36027_ACEOF
36028rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36029if { (eval echo "$as_me:36029: \"$ac_link\"") >&5
36030  (eval $ac_link) 2>&5
36031  ac_status=$?
36032  echo "$as_me:36032: \$? = $ac_status" >&5
36033  (exit "$ac_status"); } &&
36034         { ac_try='test -s "conftest$ac_exeext"'
36035  { (eval echo "$as_me:36035: \"$ac_try\"") >&5
36036  (eval $ac_try) 2>&5
36037  ac_status=$?
36038  echo "$as_me:36038: \$? = $ac_status" >&5
36039  (exit "$ac_status"); }; }; then
36040  cf_cv_have_sys_errlist=yes
36041else
36042  echo "$as_me: failed program was:" >&5
36043cat "conftest.$ac_ext" >&5
36044cf_cv_have_sys_errlist=no
36045fi
36046rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36047
36048fi
36049echo "$as_me:36049: result: $cf_cv_have_sys_errlist" >&5
36050echo "${ECHO_T}$cf_cv_have_sys_errlist" >&6
36051
36052if test "$cf_cv_have_sys_errlist" = yes ; then
36053
36054cf_result=`echo "have_sys_errlist" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
36055
36056	cat >>confdefs.h <<EOF
36057#define $cf_result 1
36058EOF
36059
36060fi
36061
36062fi
36063done
36064
36065for ac_header in lastlog.h paths.h
36066do
36067as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
36068echo "$as_me:36068: checking for $ac_header" >&5
36069echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
36070if eval "test \"\${$as_ac_Header+set}\" = set"; then
36071  echo $ECHO_N "(cached) $ECHO_C" >&6
36072else
36073  cat >"conftest.$ac_ext" <<_ACEOF
36074#line 36074 "configure"
36075#include "confdefs.h"
36076#include <$ac_header>
36077_ACEOF
36078if { (eval echo "$as_me:36078: \"$ac_cpp "conftest.$ac_ext"\"") >&5
36079  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
36080  ac_status=$?
36081  $EGREP -v '^ *\+' conftest.er1 >conftest.err
36082  rm -f conftest.er1
36083  cat conftest.err >&5
36084  echo "$as_me:36084: \$? = $ac_status" >&5
36085  (exit "$ac_status"); } >/dev/null; then
36086  if test -s conftest.err; then
36087    ac_cpp_err=$ac_c_preproc_warn_flag
36088  else
36089    ac_cpp_err=
36090  fi
36091else
36092  ac_cpp_err=yes
36093fi
36094if test -z "$ac_cpp_err"; then
36095  eval "$as_ac_Header=yes"
36096else
36097  echo "$as_me: failed program was:" >&5
36098  cat "conftest.$ac_ext" >&5
36099  eval "$as_ac_Header=no"
36100fi
36101rm -f conftest.err "conftest.$ac_ext"
36102fi
36103echo "$as_me:36103: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
36104echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
36105if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
36106  cat >>confdefs.h <<EOF
36107#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
36108EOF
36109
36110fi
36111done
36112
36113echo "$as_me:36113: checking for lastlog path" >&5
36114echo $ECHO_N "checking for lastlog path... $ECHO_C" >&6
36115if test "${cf_cv_path_lastlog+set}" = set; then
36116  echo $ECHO_N "(cached) $ECHO_C" >&6
36117else
36118
36119cat >"conftest.$ac_ext" <<_ACEOF
36120#line 36120 "configure"
36121#include "confdefs.h"
36122
36123#include <sys/types.h>
36124#ifdef HAVE_LASTLOG_H
36125#include <lastlog.h>
36126#else
36127#ifdef HAVE_PATHS_H
36128#include <paths.h>
36129#endif
36130#endif
36131int
36132main (void)
36133{
36134char *path = _PATH_LASTLOG; (void)path
36135  ;
36136  return 0;
36137}
36138_ACEOF
36139rm -f "conftest.$ac_objext"
36140if { (eval echo "$as_me:36140: \"$ac_compile\"") >&5
36141  (eval $ac_compile) 2>&5
36142  ac_status=$?
36143  echo "$as_me:36143: \$? = $ac_status" >&5
36144  (exit "$ac_status"); } &&
36145         { ac_try='test -s "conftest.$ac_objext"'
36146  { (eval echo "$as_me:36146: \"$ac_try\"") >&5
36147  (eval $ac_try) 2>&5
36148  ac_status=$?
36149  echo "$as_me:36149: \$? = $ac_status" >&5
36150  (exit "$ac_status"); }; }; then
36151  cf_cv_path_lastlog="_PATH_LASTLOG"
36152else
36153  echo "$as_me: failed program was:" >&5
36154cat "conftest.$ac_ext" >&5
36155if test -f /usr/adm/lastlog ; then
36156	 	cf_cv_path_lastlog=/usr/adm/lastlog
36157	else
36158		cf_cv_path_lastlog=no
36159	fi
36160fi
36161rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36162
36163fi
36164echo "$as_me:36164: result: $cf_cv_path_lastlog" >&5
36165echo "${ECHO_T}$cf_cv_path_lastlog" >&6
36166test "$cf_cv_path_lastlog" != no &&
36167cat >>confdefs.h <<\EOF
36168#define USE_LASTLOG 1
36169EOF
36170
36171echo "$as_me:36171: checking for utmp implementation" >&5
36172echo $ECHO_N "checking for utmp implementation... $ECHO_C" >&6
36173if test "${cf_cv_have_utmp+set}" = set; then
36174  echo $ECHO_N "(cached) $ECHO_C" >&6
36175else
36176
36177	cf_cv_have_utmp=no
36178for cf_header in utmpx utmp ; do
36179cf_utmp_includes="
36180#include <sys/types.h>
36181#include <${cf_header}.h>
36182#define getutent getutxent
36183#ifdef USE_LASTLOG
36184#include <lastlog.h>	/* may conflict with utmpx.h on Linux */
36185#endif
36186"
36187	cat >"conftest.$ac_ext" <<_ACEOF
36188#line 36188 "configure"
36189#include "confdefs.h"
36190$cf_utmp_includes
36191int
36192main (void)
36193{
36194struct $cf_header x;
36195	 char *name = x.ut_name; /* utmp.h and compatible definitions */
36196	 (void)x;
36197	 (void)name;
36198
36199  ;
36200  return 0;
36201}
36202_ACEOF
36203rm -f "conftest.$ac_objext"
36204if { (eval echo "$as_me:36204: \"$ac_compile\"") >&5
36205  (eval $ac_compile) 2>&5
36206  ac_status=$?
36207  echo "$as_me:36207: \$? = $ac_status" >&5
36208  (exit "$ac_status"); } &&
36209         { ac_try='test -s "conftest.$ac_objext"'
36210  { (eval echo "$as_me:36210: \"$ac_try\"") >&5
36211  (eval $ac_try) 2>&5
36212  ac_status=$?
36213  echo "$as_me:36213: \$? = $ac_status" >&5
36214  (exit "$ac_status"); }; }; then
36215  cf_cv_have_utmp=$cf_header
36216	 break
36217else
36218  echo "$as_me: failed program was:" >&5
36219cat "conftest.$ac_ext" >&5
36220
36221	cat >"conftest.$ac_ext" <<_ACEOF
36222#line 36222 "configure"
36223#include "confdefs.h"
36224$cf_utmp_includes
36225int
36226main (void)
36227{
36228struct $cf_header x;
36229	 char *name = x.ut_user; /* utmpx.h must declare this */
36230	 (void)x;
36231	 (void)name;
36232
36233  ;
36234  return 0;
36235}
36236_ACEOF
36237rm -f "conftest.$ac_objext"
36238if { (eval echo "$as_me:36238: \"$ac_compile\"") >&5
36239  (eval $ac_compile) 2>&5
36240  ac_status=$?
36241  echo "$as_me:36241: \$? = $ac_status" >&5
36242  (exit "$ac_status"); } &&
36243         { ac_try='test -s "conftest.$ac_objext"'
36244  { (eval echo "$as_me:36244: \"$ac_try\"") >&5
36245  (eval $ac_try) 2>&5
36246  ac_status=$?
36247  echo "$as_me:36247: \$? = $ac_status" >&5
36248  (exit "$ac_status"); }; }; then
36249  cf_cv_have_utmp=$cf_header
36250	 break
36251
36252else
36253  echo "$as_me: failed program was:" >&5
36254cat "conftest.$ac_ext" >&5
36255fi
36256rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36257fi
36258rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36259done
36260
36261fi
36262echo "$as_me:36262: result: $cf_cv_have_utmp" >&5
36263echo "${ECHO_T}$cf_cv_have_utmp" >&6
36264
36265if test "$cf_cv_have_utmp" != no ; then
36266
36267cat >>confdefs.h <<\EOF
36268#define HAVE_UTMP 1
36269EOF
36270
36271	test "$cf_cv_have_utmp" = utmpx &&
36272cat >>confdefs.h <<\EOF
36273#define UTMPX_FOR_UTMP 1
36274EOF
36275
36276if test "$cf_cv_have_utmp" != no ; then
36277echo "$as_me:36277: checking if ${cf_cv_have_utmp}.ut_host is declared" >&5
36278echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_host is declared... $ECHO_C" >&6
36279if test "${cf_cv_have_utmp_ut_host+set}" = set; then
36280  echo $ECHO_N "(cached) $ECHO_C" >&6
36281else
36282
36283	cat >"conftest.$ac_ext" <<_ACEOF
36284#line 36284 "configure"
36285#include "confdefs.h"
36286
36287#include <sys/types.h>
36288#include <${cf_cv_have_utmp}.h>
36289int
36290main (void)
36291{
36292struct $cf_cv_have_utmp x;
36293	 char *y = &x.ut_host[0];
36294	 (void)x;
36295	 (void)y
36296  ;
36297  return 0;
36298}
36299_ACEOF
36300rm -f "conftest.$ac_objext"
36301if { (eval echo "$as_me:36301: \"$ac_compile\"") >&5
36302  (eval $ac_compile) 2>&5
36303  ac_status=$?
36304  echo "$as_me:36304: \$? = $ac_status" >&5
36305  (exit "$ac_status"); } &&
36306         { ac_try='test -s "conftest.$ac_objext"'
36307  { (eval echo "$as_me:36307: \"$ac_try\"") >&5
36308  (eval $ac_try) 2>&5
36309  ac_status=$?
36310  echo "$as_me:36310: \$? = $ac_status" >&5
36311  (exit "$ac_status"); }; }; then
36312  cf_cv_have_utmp_ut_host=yes
36313else
36314  echo "$as_me: failed program was:" >&5
36315cat "conftest.$ac_ext" >&5
36316cf_cv_have_utmp_ut_host=no
36317fi
36318rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36319
36320fi
36321
36322echo "$as_me:36322: result: $cf_cv_have_utmp_ut_host" >&5
36323echo "${ECHO_T}$cf_cv_have_utmp_ut_host" >&6
36324test "$cf_cv_have_utmp_ut_host" != no &&
36325cat >>confdefs.h <<\EOF
36326#define HAVE_UTMP_UT_HOST 1
36327EOF
36328
36329fi
36330
36331if test "$cf_cv_have_utmp" != no ; then
36332echo "$as_me:36332: checking if ${cf_cv_have_utmp}.ut_syslen is declared" >&5
36333echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_syslen is declared... $ECHO_C" >&6
36334if test "${cf_cv_have_utmp_ut_syslen+set}" = set; then
36335  echo $ECHO_N "(cached) $ECHO_C" >&6
36336else
36337
36338	cat >"conftest.$ac_ext" <<_ACEOF
36339#line 36339 "configure"
36340#include "confdefs.h"
36341
36342#include <sys/types.h>
36343#include <${cf_cv_have_utmp}.h>
36344int
36345main (void)
36346{
36347struct $cf_cv_have_utmp x;
36348	 int y = x.ut_syslen;
36349	 (void)x;
36350	 (void)y
36351  ;
36352  return 0;
36353}
36354_ACEOF
36355rm -f "conftest.$ac_objext"
36356if { (eval echo "$as_me:36356: \"$ac_compile\"") >&5
36357  (eval $ac_compile) 2>&5
36358  ac_status=$?
36359  echo "$as_me:36359: \$? = $ac_status" >&5
36360  (exit "$ac_status"); } &&
36361         { ac_try='test -s "conftest.$ac_objext"'
36362  { (eval echo "$as_me:36362: \"$ac_try\"") >&5
36363  (eval $ac_try) 2>&5
36364  ac_status=$?
36365  echo "$as_me:36365: \$? = $ac_status" >&5
36366  (exit "$ac_status"); }; }; then
36367  cf_cv_have_utmp_ut_syslen=yes
36368else
36369  echo "$as_me: failed program was:" >&5
36370cat "conftest.$ac_ext" >&5
36371cf_cv_have_utmp_ut_syslen=no
36372fi
36373rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36374
36375fi
36376
36377echo "$as_me:36377: result: $cf_cv_have_utmp_ut_syslen" >&5
36378echo "${ECHO_T}$cf_cv_have_utmp_ut_syslen" >&6
36379test "$cf_cv_have_utmp_ut_syslen" != no &&
36380cat >>confdefs.h <<\EOF
36381#define HAVE_UTMP_UT_SYSLEN 1
36382EOF
36383
36384fi
36385
36386if test "$cf_cv_have_utmp" != no ; then
36387echo "$as_me:36387: checking if ${cf_cv_have_utmp}.ut_name is declared" >&5
36388echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_name is declared... $ECHO_C" >&6
36389if test "${cf_cv_have_utmp_ut_name+set}" = set; then
36390  echo $ECHO_N "(cached) $ECHO_C" >&6
36391else
36392
36393	cf_cv_have_utmp_ut_name=no
36394cf_utmp_includes="
36395#include <sys/types.h>
36396#include <${cf_cv_have_utmp}.h>
36397#define getutent getutxent
36398#ifdef USE_LASTLOG
36399#include <lastlog.h>		/* may conflict with utmpx.h on Linux */
36400#endif
36401"
36402for cf_header in ut_name ut_user ; do
36403	cat >"conftest.$ac_ext" <<_ACEOF
36404#line 36404 "configure"
36405#include "confdefs.h"
36406$cf_utmp_includes
36407int
36408main (void)
36409{
36410struct $cf_cv_have_utmp x;
36411	 char *name = x.$cf_header;
36412	 (void)x;
36413	 (void)name;
36414
36415  ;
36416  return 0;
36417}
36418_ACEOF
36419rm -f "conftest.$ac_objext"
36420if { (eval echo "$as_me:36420: \"$ac_compile\"") >&5
36421  (eval $ac_compile) 2>&5
36422  ac_status=$?
36423  echo "$as_me:36423: \$? = $ac_status" >&5
36424  (exit "$ac_status"); } &&
36425         { ac_try='test -s "conftest.$ac_objext"'
36426  { (eval echo "$as_me:36426: \"$ac_try\"") >&5
36427  (eval $ac_try) 2>&5
36428  ac_status=$?
36429  echo "$as_me:36429: \$? = $ac_status" >&5
36430  (exit "$ac_status"); }; }; then
36431  cf_cv_have_utmp_ut_name=$cf_header
36432	 break
36433else
36434  echo "$as_me: failed program was:" >&5
36435cat "conftest.$ac_ext" >&5
36436fi
36437rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36438done
36439
36440fi
36441echo "$as_me:36441: result: $cf_cv_have_utmp_ut_name" >&5
36442echo "${ECHO_T}$cf_cv_have_utmp_ut_name" >&6
36443
36444case "$cf_cv_have_utmp_ut_name" in
36445(no)
36446	{ { echo "$as_me:36446: error: Cannot find declaration for ut.ut_name" >&5
36447echo "$as_me: error: Cannot find declaration for ut.ut_name" >&2;}
36448   { (exit 1); exit 1; }; }
36449	;;
36450(ut_user)
36451
36452cat >>confdefs.h <<\EOF
36453#define ut_name ut_user
36454EOF
36455
36456	;;
36457esac
36458fi
36459
36460if test "$cf_cv_have_utmp" != no ; then
36461echo "$as_me:36461: checking for exit-status in $cf_cv_have_utmp" >&5
36462echo $ECHO_N "checking for exit-status in $cf_cv_have_utmp... $ECHO_C" >&6
36463if test "${cf_cv_have_utmp_ut_xstatus+set}" = set; then
36464  echo $ECHO_N "(cached) $ECHO_C" >&6
36465else
36466
36467for cf_result in \
36468	ut_exit.__e_exit \
36469	ut_exit.e_exit \
36470	ut_exit.ut_e_exit \
36471	ut_exit.ut_exit
36472do
36473cat >"conftest.$ac_ext" <<_ACEOF
36474#line 36474 "configure"
36475#include "confdefs.h"
36476
36477#include <sys/types.h>
36478#include <${cf_cv_have_utmp}.h>
36479int
36480main (void)
36481{
36482struct $cf_cv_have_utmp x;
36483	 long y = x.$cf_result = 0;
36484	 (void)x;
36485	 (void)y
36486  ;
36487  return 0;
36488}
36489_ACEOF
36490rm -f "conftest.$ac_objext"
36491if { (eval echo "$as_me:36491: \"$ac_compile\"") >&5
36492  (eval $ac_compile) 2>&5
36493  ac_status=$?
36494  echo "$as_me:36494: \$? = $ac_status" >&5
36495  (exit "$ac_status"); } &&
36496         { ac_try='test -s "conftest.$ac_objext"'
36497  { (eval echo "$as_me:36497: \"$ac_try\"") >&5
36498  (eval $ac_try) 2>&5
36499  ac_status=$?
36500  echo "$as_me:36500: \$? = $ac_status" >&5
36501  (exit "$ac_status"); }; }; then
36502  cf_cv_have_utmp_ut_xstatus=$cf_result
36503	 break
36504else
36505  echo "$as_me: failed program was:" >&5
36506cat "conftest.$ac_ext" >&5
36507cf_cv_have_utmp_ut_xstatus=no
36508fi
36509rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36510done
36511
36512fi
36513echo "$as_me:36513: result: $cf_cv_have_utmp_ut_xstatus" >&5
36514echo "${ECHO_T}$cf_cv_have_utmp_ut_xstatus" >&6
36515if test "$cf_cv_have_utmp_ut_xstatus" != no ; then
36516
36517cat >>confdefs.h <<\EOF
36518#define HAVE_UTMP_UT_XSTATUS 1
36519EOF
36520
36521cat >>confdefs.h <<EOF
36522#define ut_xstatus $cf_cv_have_utmp_ut_xstatus
36523EOF
36524
36525fi
36526fi
36527
36528if test "$cf_cv_have_utmp" != no ; then
36529echo "$as_me:36529: checking if ${cf_cv_have_utmp}.ut_xtime is declared" >&5
36530echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_xtime is declared... $ECHO_C" >&6
36531if test "${cf_cv_have_utmp_ut_xtime+set}" = set; then
36532  echo $ECHO_N "(cached) $ECHO_C" >&6
36533else
36534
36535	cat >"conftest.$ac_ext" <<_ACEOF
36536#line 36536 "configure"
36537#include "confdefs.h"
36538
36539#include <sys/types.h>
36540#include <${cf_cv_have_utmp}.h>
36541int
36542main (void)
36543{
36544struct $cf_cv_have_utmp x;
36545	 long y = x.ut_xtime = 0;
36546	 (void)x;
36547	 (void)y
36548  ;
36549  return 0;
36550}
36551_ACEOF
36552rm -f "conftest.$ac_objext"
36553if { (eval echo "$as_me:36553: \"$ac_compile\"") >&5
36554  (eval $ac_compile) 2>&5
36555  ac_status=$?
36556  echo "$as_me:36556: \$? = $ac_status" >&5
36557  (exit "$ac_status"); } &&
36558         { ac_try='test -s "conftest.$ac_objext"'
36559  { (eval echo "$as_me:36559: \"$ac_try\"") >&5
36560  (eval $ac_try) 2>&5
36561  ac_status=$?
36562  echo "$as_me:36562: \$? = $ac_status" >&5
36563  (exit "$ac_status"); }; }; then
36564  cf_cv_have_utmp_ut_xtime=yes
36565else
36566  echo "$as_me: failed program was:" >&5
36567cat "conftest.$ac_ext" >&5
36568cat >"conftest.$ac_ext" <<_ACEOF
36569#line 36569 "configure"
36570#include "confdefs.h"
36571
36572#include <sys/types.h>
36573#include <${cf_cv_have_utmp}.h>
36574int
36575main (void)
36576{
36577struct $cf_cv_have_utmp x;
36578	 long y = x.ut_tv.tv_sec;
36579	 (void)x;
36580	 (void)y
36581  ;
36582  return 0;
36583}
36584_ACEOF
36585rm -f "conftest.$ac_objext"
36586if { (eval echo "$as_me:36586: \"$ac_compile\"") >&5
36587  (eval $ac_compile) 2>&5
36588  ac_status=$?
36589  echo "$as_me:36589: \$? = $ac_status" >&5
36590  (exit "$ac_status"); } &&
36591         { ac_try='test -s "conftest.$ac_objext"'
36592  { (eval echo "$as_me:36592: \"$ac_try\"") >&5
36593  (eval $ac_try) 2>&5
36594  ac_status=$?
36595  echo "$as_me:36595: \$? = $ac_status" >&5
36596  (exit "$ac_status"); }; }; then
36597  cf_cv_have_utmp_ut_xtime=define
36598else
36599  echo "$as_me: failed program was:" >&5
36600cat "conftest.$ac_ext" >&5
36601cf_cv_have_utmp_ut_xtime=no
36602fi
36603rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36604
36605fi
36606rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36607
36608fi
36609echo "$as_me:36609: result: $cf_cv_have_utmp_ut_xtime" >&5
36610echo "${ECHO_T}$cf_cv_have_utmp_ut_xtime" >&6
36611if test "$cf_cv_have_utmp_ut_xtime" != no ; then
36612
36613cat >>confdefs.h <<\EOF
36614#define HAVE_UTMP_UT_XTIME 1
36615EOF
36616
36617	if test "$cf_cv_have_utmp_ut_xtime" = define ; then
36618
36619cat >>confdefs.h <<\EOF
36620#define ut_xtime ut_tv.tv_sec
36621EOF
36622
36623	fi
36624fi
36625fi
36626
36627if test "$cf_cv_have_utmp" != no ; then
36628echo "$as_me:36628: checking if ${cf_cv_have_utmp}.ut_session is declared" >&5
36629echo $ECHO_N "checking if ${cf_cv_have_utmp}.ut_session is declared... $ECHO_C" >&6
36630if test "${cf_cv_have_utmp_ut_session+set}" = set; then
36631  echo $ECHO_N "(cached) $ECHO_C" >&6
36632else
36633
36634	cat >"conftest.$ac_ext" <<_ACEOF
36635#line 36635 "configure"
36636#include "confdefs.h"
36637
36638#include <sys/types.h>
36639#include <${cf_cv_have_utmp}.h>
36640int
36641main (void)
36642{
36643static struct $cf_cv_have_utmp x;
36644	 long y = x.ut_session;
36645	 (void)x;
36646	 (void)y
36647  ;
36648  return 0;
36649}
36650_ACEOF
36651rm -f "conftest.$ac_objext"
36652if { (eval echo "$as_me:36652: \"$ac_compile\"") >&5
36653  (eval $ac_compile) 2>&5
36654  ac_status=$?
36655  echo "$as_me:36655: \$? = $ac_status" >&5
36656  (exit "$ac_status"); } &&
36657         { ac_try='test -s "conftest.$ac_objext"'
36658  { (eval echo "$as_me:36658: \"$ac_try\"") >&5
36659  (eval $ac_try) 2>&5
36660  ac_status=$?
36661  echo "$as_me:36661: \$? = $ac_status" >&5
36662  (exit "$ac_status"); }; }; then
36663  cf_cv_have_utmp_ut_session=yes
36664else
36665  echo "$as_me: failed program was:" >&5
36666cat "conftest.$ac_ext" >&5
36667cf_cv_have_utmp_ut_session=no
36668fi
36669rm -f "conftest.$ac_objext" "conftest.$ac_ext"
36670
36671fi
36672echo "$as_me:36672: result: $cf_cv_have_utmp_ut_session" >&5
36673echo "${ECHO_T}$cf_cv_have_utmp_ut_session" >&6
36674if test "$cf_cv_have_utmp_ut_session" != no ; then
36675
36676cat >>confdefs.h <<\EOF
36677#define HAVE_UTMP_UT_SESSION 1
36678EOF
36679
36680fi
36681fi
36682
36683echo "$as_me:36683: checking if $cf_cv_have_utmp is SYSV flavor" >&5
36684echo $ECHO_N "checking if $cf_cv_have_utmp is SYSV flavor... $ECHO_C" >&6
36685if test "${cf_cv_sysv_utmp+set}" = set; then
36686  echo $ECHO_N "(cached) $ECHO_C" >&6
36687else
36688
36689test "$cf_cv_have_utmp" = "utmp" && cf_prefix="ut" || cf_prefix="utx"
36690cat >"conftest.$ac_ext" <<_ACEOF
36691#line 36691 "configure"
36692#include "confdefs.h"
36693
36694#include <sys/types.h>
36695#include <${cf_cv_have_utmp}.h>
36696int
36697main (void)
36698{
36699
36700struct $cf_cv_have_utmp x;
36701	set${cf_prefix}ent ();
36702	get${cf_prefix}id(&x);
36703	put${cf_prefix}line(&x);
36704	end${cf_prefix}ent();
36705  ;
36706  return 0;
36707}
36708_ACEOF
36709rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36710if { (eval echo "$as_me:36710: \"$ac_link\"") >&5
36711  (eval $ac_link) 2>&5
36712  ac_status=$?
36713  echo "$as_me:36713: \$? = $ac_status" >&5
36714  (exit "$ac_status"); } &&
36715         { ac_try='test -s "conftest$ac_exeext"'
36716  { (eval echo "$as_me:36716: \"$ac_try\"") >&5
36717  (eval $ac_try) 2>&5
36718  ac_status=$?
36719  echo "$as_me:36719: \$? = $ac_status" >&5
36720  (exit "$ac_status"); }; }; then
36721  cf_cv_sysv_utmp=yes
36722else
36723  echo "$as_me: failed program was:" >&5
36724cat "conftest.$ac_ext" >&5
36725cf_cv_sysv_utmp=no
36726fi
36727rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36728
36729fi
36730echo "$as_me:36730: result: $cf_cv_sysv_utmp" >&5
36731echo "${ECHO_T}$cf_cv_sysv_utmp" >&6
36732test "$cf_cv_sysv_utmp" = yes &&
36733cat >>confdefs.h <<\EOF
36734#define USE_SYSV_UTMP 1
36735EOF
36736
36737fi
36738
36739echo "$as_me:36739: checking if external h_errno exists" >&5
36740echo $ECHO_N "checking if external h_errno exists... $ECHO_C" >&6
36741if test "${cf_cv_have_h_errno+set}" = set; then
36742  echo $ECHO_N "(cached) $ECHO_C" >&6
36743else
36744
36745	cat >"conftest.$ac_ext" <<_ACEOF
36746#line 36746 "configure"
36747#include "confdefs.h"
36748
36749#undef h_errno
36750extern int h_errno;
36751
36752int
36753main (void)
36754{
36755h_errno = 2
36756  ;
36757  return 0;
36758}
36759_ACEOF
36760rm -f "conftest.$ac_objext" "conftest$ac_exeext"
36761if { (eval echo "$as_me:36761: \"$ac_link\"") >&5
36762  (eval $ac_link) 2>&5
36763  ac_status=$?
36764  echo "$as_me:36764: \$? = $ac_status" >&5
36765  (exit "$ac_status"); } &&
36766         { ac_try='test -s "conftest$ac_exeext"'
36767  { (eval echo "$as_me:36767: \"$ac_try\"") >&5
36768  (eval $ac_try) 2>&5
36769  ac_status=$?
36770  echo "$as_me:36770: \$? = $ac_status" >&5
36771  (exit "$ac_status"); }; }; then
36772  cf_cv_have_h_errno=yes
36773else
36774  echo "$as_me: failed program was:" >&5
36775cat "conftest.$ac_ext" >&5
36776cf_cv_have_h_errno=no
36777fi
36778rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
36779
36780fi
36781echo "$as_me:36781: result: $cf_cv_have_h_errno" >&5
36782echo "${ECHO_T}$cf_cv_have_h_errno" >&6
36783
36784if test "$cf_cv_have_h_errno" = yes ; then
36785
36786cf_result=`echo "have_h_errno" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
36787
36788	cat >>confdefs.h <<EOF
36789#define $cf_result 1
36790EOF
36791
36792fi
36793
36794echo "$as_me:36794: checking if bibp: URLs should be supported" >&5
36795echo $ECHO_N "checking if bibp: URLs should be supported... $ECHO_C" >&6
36796
36797# Check whether --enable-bibp-urls or --disable-bibp-urls was given.
36798if test "${enable_bibp_urls+set}" = set; then
36799  enableval="$enable_bibp_urls"
36800  test "$enableval" != no && enableval=yes
36801	if test "$enableval" != "yes" ; then
36802    use_bibp_urls=$enableval
36803	else
36804		use_bibp_urls=yes
36805	fi
36806else
36807  enableval=yes
36808	use_bibp_urls=yes
36809
36810fi;
36811echo "$as_me:36811: result: $use_bibp_urls" >&5
36812echo "${ECHO_T}$use_bibp_urls" >&6
36813test "$use_bibp_urls" = no &&
36814cat >>confdefs.h <<\EOF
36815#define DISABLE_BIBP 1
36816EOF
36817
36818echo "$as_me:36818: checking if configuration info should be browsable" >&5
36819echo $ECHO_N "checking if configuration info should be browsable... $ECHO_C" >&6
36820
36821# Check whether --enable-config-info or --disable-config-info was given.
36822if test "${enable_config_info+set}" = set; then
36823  enableval="$enable_config_info"
36824  test "$enableval" != no && enableval=yes
36825	if test "$enableval" != "yes" ; then
36826    use_config_info=$enableval
36827	else
36828		use_config_info=yes
36829	fi
36830else
36831  enableval=yes
36832	use_config_info=yes
36833
36834fi;
36835echo "$as_me:36835: result: $use_config_info" >&5
36836echo "${ECHO_T}$use_config_info" >&6
36837test "$use_config_info" = no &&
36838cat >>confdefs.h <<\EOF
36839#define NO_CONFIG_INFO 1
36840EOF
36841
36842echo "$as_me:36842: checking if new-style forms-based options screen should be used" >&5
36843echo $ECHO_N "checking if new-style forms-based options screen should be used... $ECHO_C" >&6
36844
36845# Check whether --enable-forms-options or --disable-forms-options was given.
36846if test "${enable_forms_options+set}" = set; then
36847  enableval="$enable_forms_options"
36848  test "$enableval" != no && enableval=yes
36849	if test "$enableval" != "yes" ; then
36850    use_forms_options=$enableval
36851	else
36852		use_forms_options=yes
36853	fi
36854else
36855  enableval=yes
36856	use_forms_options=yes
36857
36858fi;
36859echo "$as_me:36859: result: $use_forms_options" >&5
36860echo "${ECHO_T}$use_forms_options" >&6
36861test "$use_forms_options" = no &&
36862cat >>confdefs.h <<\EOF
36863#define NO_OPTION_FORMS 1
36864EOF
36865
36866echo "$as_me:36866: checking if old-style options menu should be used" >&5
36867echo $ECHO_N "checking if old-style options menu should be used... $ECHO_C" >&6
36868
36869# Check whether --enable-menu-options or --disable-menu-options was given.
36870if test "${enable_menu_options+set}" = set; then
36871  enableval="$enable_menu_options"
36872  test "$enableval" != no && enableval=yes
36873	if test "$enableval" != "yes" ; then
36874    use_menu_options=$enableval
36875	else
36876		use_menu_options=yes
36877	fi
36878else
36879  enableval=yes
36880	use_menu_options=yes
36881
36882fi;
36883echo "$as_me:36883: result: $use_menu_options" >&5
36884echo "${ECHO_T}$use_menu_options" >&6
36885test "$use_menu_options" = no &&
36886cat >>confdefs.h <<\EOF
36887#define NO_OPTION_MENU 1
36888EOF
36889
36890echo "$as_me:36890: checking if sessions code should be used" >&5
36891echo $ECHO_N "checking if sessions code should be used... $ECHO_C" >&6
36892
36893# Check whether --enable-sessions or --disable-sessions was given.
36894if test "${enable_sessions+set}" = set; then
36895  enableval="$enable_sessions"
36896  test "$enableval" != no && enableval=yes
36897	if test "$enableval" != "yes" ; then
36898    use_sessions=$enableval
36899	else
36900		use_sessions=yes
36901	fi
36902else
36903  enableval=yes
36904	use_sessions=yes
36905
36906fi;
36907echo "$as_me:36907: result: $use_sessions" >&5
36908echo "${ECHO_T}$use_sessions" >&6
36909if test "$use_sessions" != no ; then
36910
36911cat >>confdefs.h <<\EOF
36912#define USE_SESSIONS 1
36913EOF
36914
36915	EXTRA_OBJS="$EXTRA_OBJS LYSession\$o"
36916fi
36917
36918echo "$as_me:36918: checking if session-caching code should be used" >&5
36919echo $ECHO_N "checking if session-caching code should be used... $ECHO_C" >&6
36920
36921# Check whether --enable-session-cache or --disable-session-cache was given.
36922if test "${enable_session_cache+set}" = set; then
36923  enableval="$enable_session_cache"
36924  test "$enableval" != no && enableval=yes
36925	if test "$enableval" != "yes" ; then
36926    use_session_cache=$enableval
36927	else
36928		use_session_cache=yes
36929	fi
36930else
36931  enableval=yes
36932	use_session_cache=yes
36933
36934fi;
36935echo "$as_me:36935: result: $use_session_cache" >&5
36936echo "${ECHO_T}$use_session_cache" >&6
36937if test "$use_session_cache" != no ; then
36938
36939cat >>confdefs.h <<\EOF
36940#define USE_CACHEJAR 1
36941EOF
36942
36943fi
36944
36945echo "$as_me:36945: checking if address-list page should be used" >&5
36946echo $ECHO_N "checking if address-list page should be used... $ECHO_C" >&6
36947
36948# Check whether --enable-addrlist-page or --disable-addrlist-page was given.
36949if test "${enable_addrlist_page+set}" = set; then
36950  enableval="$enable_addrlist_page"
36951  test "$enableval" != no && enableval=yes
36952	if test "$enableval" != "yes" ; then
36953    use_addrlist_page=$enableval
36954	else
36955		use_addrlist_page=yes
36956	fi
36957else
36958  enableval=yes
36959	use_addrlist_page=yes
36960
36961fi;
36962echo "$as_me:36962: result: $use_addrlist_page" >&5
36963echo "${ECHO_T}$use_addrlist_page" >&6
36964test "$use_addrlist_page" != no &&
36965cat >>confdefs.h <<\EOF
36966#define USE_ADDRLIST_PAGE 1
36967EOF
36968
36969echo "$as_me:36969: checking if support for CJK should be used" >&5
36970echo $ECHO_N "checking if support for CJK should be used... $ECHO_C" >&6
36971
36972# Check whether --enable-cjk or --disable-cjk was given.
36973if test "${enable_cjk+set}" = set; then
36974  enableval="$enable_cjk"
36975  test "$enableval" != no && enableval=yes
36976	if test "$enableval" != "yes" ; then
36977    use_cjk=$enableval
36978	else
36979		use_cjk=yes
36980	fi
36981else
36982  enableval=yes
36983	use_cjk=yes
36984
36985fi;
36986echo "$as_me:36986: result: $use_cjk" >&5
36987echo "${ECHO_T}$use_cjk" >&6
36988test "$use_cjk" != no &&
36989cat >>confdefs.h <<\EOF
36990#define CJK_EX 1
36991EOF
36992
36993use_cjk_utf8=no
36994
36995# Check whether --with-libiconv-prefix or --without-libiconv-prefix was given.
36996if test "${with_libiconv_prefix+set}" = set; then
36997  withval="$with_libiconv_prefix"
36998
36999case "$withval" in
37000(no)
37001	;;
37002(yes)
37003	;;
37004(*)
37005
37006for cf_searchpath in `echo "$withval" | tr $PATH_SEPARATOR ' '`; do
37007	if test -d "$cf_searchpath/include" ; then
37008
37009if test -n "$cf_searchpath/include" ; then
37010  for cf_add_incdir in $cf_searchpath/include
37011  do
37012	while test "$cf_add_incdir" != /usr/include
37013	do
37014	  if test -d "$cf_add_incdir"
37015	  then
37016		cf_have_incdir=no
37017		if test -n "$CFLAGS$CPPFLAGS" ; then
37018		  # a loop is needed to ensure we can add subdirs of existing dirs
37019		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
37020			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
37021			  cf_have_incdir=yes; break
37022			fi
37023		  done
37024		fi
37025
37026		if test "$cf_have_incdir" = no ; then
37027		  if test "$cf_add_incdir" = /usr/local/include ; then
37028			if test "$GCC" = yes
37029			then
37030			  cf_save_CPPFLAGS=$CPPFLAGS
37031
37032	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37033	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
37034
37035			  cat >"conftest.$ac_ext" <<_ACEOF
37036#line 37036 "configure"
37037#include "confdefs.h"
37038#include <stdio.h>
37039int
37040main (void)
37041{
37042printf("Hello")
37043  ;
37044  return 0;
37045}
37046_ACEOF
37047rm -f "conftest.$ac_objext"
37048if { (eval echo "$as_me:37048: \"$ac_compile\"") >&5
37049  (eval $ac_compile) 2>&5
37050  ac_status=$?
37051  echo "$as_me:37051: \$? = $ac_status" >&5
37052  (exit "$ac_status"); } &&
37053         { ac_try='test -s "conftest.$ac_objext"'
37054  { (eval echo "$as_me:37054: \"$ac_try\"") >&5
37055  (eval $ac_try) 2>&5
37056  ac_status=$?
37057  echo "$as_me:37057: \$? = $ac_status" >&5
37058  (exit "$ac_status"); }; }; then
37059  :
37060else
37061  echo "$as_me: failed program was:" >&5
37062cat "conftest.$ac_ext" >&5
37063cf_have_incdir=yes
37064fi
37065rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37066			  CPPFLAGS=$cf_save_CPPFLAGS
37067			fi
37068		  fi
37069		fi
37070
37071		if test "$cf_have_incdir" = no ; then
37072		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
37073
37074echo "${as_me:-configure}:37074: testing adding $cf_add_incdir to include-path ..." 1>&5
37075
37076		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
37077
37078		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
37079		  test "$cf_top_incdir" = "$cf_add_incdir" && break
37080		  cf_add_incdir="$cf_top_incdir"
37081		else
37082		  break
37083		fi
37084	  else
37085		break
37086	  fi
37087	done
37088  done
37089fi
37090
37091	elif test -d "$cf_searchpath/../include" ; then
37092
37093if test -n "$cf_searchpath/../include" ; then
37094  for cf_add_incdir in $cf_searchpath/../include
37095  do
37096	while test "$cf_add_incdir" != /usr/include
37097	do
37098	  if test -d "$cf_add_incdir"
37099	  then
37100		cf_have_incdir=no
37101		if test -n "$CFLAGS$CPPFLAGS" ; then
37102		  # a loop is needed to ensure we can add subdirs of existing dirs
37103		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
37104			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
37105			  cf_have_incdir=yes; break
37106			fi
37107		  done
37108		fi
37109
37110		if test "$cf_have_incdir" = no ; then
37111		  if test "$cf_add_incdir" = /usr/local/include ; then
37112			if test "$GCC" = yes
37113			then
37114			  cf_save_CPPFLAGS=$CPPFLAGS
37115
37116	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37117	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
37118
37119			  cat >"conftest.$ac_ext" <<_ACEOF
37120#line 37120 "configure"
37121#include "confdefs.h"
37122#include <stdio.h>
37123int
37124main (void)
37125{
37126printf("Hello")
37127  ;
37128  return 0;
37129}
37130_ACEOF
37131rm -f "conftest.$ac_objext"
37132if { (eval echo "$as_me:37132: \"$ac_compile\"") >&5
37133  (eval $ac_compile) 2>&5
37134  ac_status=$?
37135  echo "$as_me:37135: \$? = $ac_status" >&5
37136  (exit "$ac_status"); } &&
37137         { ac_try='test -s "conftest.$ac_objext"'
37138  { (eval echo "$as_me:37138: \"$ac_try\"") >&5
37139  (eval $ac_try) 2>&5
37140  ac_status=$?
37141  echo "$as_me:37141: \$? = $ac_status" >&5
37142  (exit "$ac_status"); }; }; then
37143  :
37144else
37145  echo "$as_me: failed program was:" >&5
37146cat "conftest.$ac_ext" >&5
37147cf_have_incdir=yes
37148fi
37149rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37150			  CPPFLAGS=$cf_save_CPPFLAGS
37151			fi
37152		  fi
37153		fi
37154
37155		if test "$cf_have_incdir" = no ; then
37156		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
37157
37158echo "${as_me:-configure}:37158: testing adding $cf_add_incdir to include-path ..." 1>&5
37159
37160		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
37161
37162		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
37163		  test "$cf_top_incdir" = "$cf_add_incdir" && break
37164		  cf_add_incdir="$cf_top_incdir"
37165		else
37166		  break
37167		fi
37168	  else
37169		break
37170	  fi
37171	done
37172  done
37173fi
37174
37175	else
37176{ { echo "$as_me:37176: error: cannot find libiconv under $withval" >&5
37177echo "$as_me: error: cannot find libiconv under $withval" >&2;}
37178   { (exit 1); exit 1; }; }
37179	fi
37180	if test -d "$cf_searchpath/lib" ; then
37181
37182if test -n "$cf_searchpath/lib" ; then
37183	for cf_add_libdir in $cf_searchpath/lib
37184	do
37185		if test "$cf_add_libdir" = /usr/lib ; then
37186			:
37187		elif test -d "$cf_add_libdir"
37188		then
37189			cf_have_libdir=no
37190			if test -n "$LDFLAGS$LIBS" ; then
37191				# a loop is needed to ensure we can add subdirs of existing dirs
37192				for cf_test_libdir in $LDFLAGS $LIBS ; do
37193					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
37194						cf_have_libdir=yes; break
37195					fi
37196				done
37197			fi
37198			if test "$cf_have_libdir" = no ; then
37199				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
37200
37201echo "${as_me:-configure}:37201: testing adding $cf_add_libdir to library-path ..." 1>&5
37202
37203				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
37204			fi
37205		fi
37206	done
37207fi
37208
37209	elif test -d "$cf_searchpath" ; then
37210
37211if test -n "$cf_searchpath" ; then
37212	for cf_add_libdir in $cf_searchpath
37213	do
37214		if test "$cf_add_libdir" = /usr/lib ; then
37215			:
37216		elif test -d "$cf_add_libdir"
37217		then
37218			cf_have_libdir=no
37219			if test -n "$LDFLAGS$LIBS" ; then
37220				# a loop is needed to ensure we can add subdirs of existing dirs
37221				for cf_test_libdir in $LDFLAGS $LIBS ; do
37222					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
37223						cf_have_libdir=yes; break
37224					fi
37225				done
37226			fi
37227			if test "$cf_have_libdir" = no ; then
37228				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
37229
37230echo "${as_me:-configure}:37230: testing adding $cf_add_libdir to library-path ..." 1>&5
37231
37232				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
37233			fi
37234		fi
37235	done
37236fi
37237
37238	else
37239{ { echo "$as_me:37239: error: cannot find libiconv under $withval" >&5
37240echo "$as_me: error: cannot find libiconv under $withval" >&2;}
37241   { (exit 1); exit 1; }; }
37242	fi
37243done
37244
37245	;;
37246esac
37247
37248fi;
37249
37250  echo "$as_me:37250: checking for iconv" >&5
37251echo $ECHO_N "checking for iconv... $ECHO_C" >&6
37252if test "${am_cv_func_iconv+set}" = set; then
37253  echo $ECHO_N "(cached) $ECHO_C" >&6
37254else
37255
37256# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
37257# will be set on completion of the AC_TRY_LINK below.
37258cf_cv_header_path_iconv=
37259cf_cv_library_path_iconv=
37260
37261echo "${as_me:-configure}:37261: testing Starting FIND_LINKAGE(iconv,) ..." 1>&5
37262
37263cf_save_LIBS="$LIBS"
37264
37265cat >"conftest.$ac_ext" <<_ACEOF
37266#line 37266 "configure"
37267#include "confdefs.h"
37268
37269#include <stdlib.h>
37270#include <iconv.h>
37271
37272int
37273main (void)
37274{
37275
37276	iconv_t cd = iconv_open("","");
37277	iconv(cd,NULL,NULL,NULL,NULL);
37278	iconv_close(cd);
37279
37280  ;
37281  return 0;
37282}
37283_ACEOF
37284rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37285if { (eval echo "$as_me:37285: \"$ac_link\"") >&5
37286  (eval $ac_link) 2>&5
37287  ac_status=$?
37288  echo "$as_me:37288: \$? = $ac_status" >&5
37289  (exit "$ac_status"); } &&
37290         { ac_try='test -s "conftest$ac_exeext"'
37291  { (eval echo "$as_me:37291: \"$ac_try\"") >&5
37292  (eval $ac_try) 2>&5
37293  ac_status=$?
37294  echo "$as_me:37294: \$? = $ac_status" >&5
37295  (exit "$ac_status"); }; }; then
37296
37297	cf_cv_find_linkage_iconv=yes
37298	cf_cv_header_path_iconv=/usr/include
37299	cf_cv_library_path_iconv=/usr/lib
37300
37301else
37302  echo "$as_me: failed program was:" >&5
37303cat "conftest.$ac_ext" >&5
37304
37305LIBS="-liconv  $cf_save_LIBS"
37306
37307cat >"conftest.$ac_ext" <<_ACEOF
37308#line 37308 "configure"
37309#include "confdefs.h"
37310
37311#include <stdlib.h>
37312#include <iconv.h>
37313
37314int
37315main (void)
37316{
37317
37318	iconv_t cd = iconv_open("","");
37319	iconv(cd,NULL,NULL,NULL,NULL);
37320	iconv_close(cd);
37321
37322  ;
37323  return 0;
37324}
37325_ACEOF
37326rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37327if { (eval echo "$as_me:37327: \"$ac_link\"") >&5
37328  (eval $ac_link) 2>&5
37329  ac_status=$?
37330  echo "$as_me:37330: \$? = $ac_status" >&5
37331  (exit "$ac_status"); } &&
37332         { ac_try='test -s "conftest$ac_exeext"'
37333  { (eval echo "$as_me:37333: \"$ac_try\"") >&5
37334  (eval $ac_try) 2>&5
37335  ac_status=$?
37336  echo "$as_me:37336: \$? = $ac_status" >&5
37337  (exit "$ac_status"); }; }; then
37338
37339	cf_cv_find_linkage_iconv=yes
37340	cf_cv_header_path_iconv=/usr/include
37341	cf_cv_library_path_iconv=/usr/lib
37342	cf_cv_library_file_iconv="-liconv"
37343
37344else
37345  echo "$as_me: failed program was:" >&5
37346cat "conftest.$ac_ext" >&5
37347
37348	cf_cv_find_linkage_iconv=no
37349	LIBS="$cf_save_LIBS"
37350
37351	test -n "$verbose" && echo "	find linkage for iconv library" 1>&6
37352
37353echo "${as_me:-configure}:37353: testing find linkage for iconv library ..." 1>&5
37354
37355echo "${as_me:-configure}:37355: testing Searching for headers in FIND_LINKAGE(iconv,) ..." 1>&5
37356
37357	cf_save_CPPFLAGS="$CPPFLAGS"
37358	cf_test_CPPFLAGS="$CPPFLAGS"
37359
37360cf_search=
37361
37362# collect the current set of include-directories from compiler flags
37363cf_header_path_list=""
37364if test -n "${CFLAGS}${CPPFLAGS}" ; then
37365	for cf_header_path in $CPPFLAGS $CFLAGS
37366	do
37367		case "$cf_header_path" in
37368		(-I*)
37369			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
37370
37371test "x$cf_header_path" != "xNONE" && \
37372test -d "$cf_header_path" && \
37373 {
37374	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
37375	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
37376	test -d "$cf_header_path/include/iconv" &&       cf_search="$cf_search $cf_header_path/include/iconv"
37377	test -d "$cf_header_path/include/iconv/include" &&    cf_search="$cf_search $cf_header_path/include/iconv/include"
37378	test -d "$cf_header_path/iconv/include" &&       cf_search="$cf_search $cf_header_path/iconv/include"
37379	test -d "$cf_header_path/iconv/include/iconv" &&    cf_search="$cf_search $cf_header_path/iconv/include/iconv"
37380}
37381
37382			cf_header_path_list="$cf_header_path_list $cf_search"
37383			;;
37384		esac
37385	done
37386fi
37387
37388# add the variations for the package we are looking for
37389
37390cf_search=
37391
37392test "x$prefix" != "xNONE" && \
37393test -d "$prefix" && \
37394 {
37395	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
37396	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
37397	test -d "$prefix/include/iconv" &&       cf_search="$cf_search $prefix/include/iconv"
37398	test -d "$prefix/include/iconv/include" &&    cf_search="$cf_search $prefix/include/iconv/include"
37399	test -d "$prefix/iconv/include" &&       cf_search="$cf_search $prefix/iconv/include"
37400	test -d "$prefix/iconv/include/iconv" &&    cf_search="$cf_search $prefix/iconv/include/iconv"
37401}
37402
37403for cf_subdir_prefix in \
37404	/usr \
37405	/usr/local \
37406	/usr/pkg \
37407	/opt \
37408	/opt/local \
37409	$HOME
37410do
37411
37412test "x$cf_subdir_prefix" != "x$prefix" && \
37413test -d "$cf_subdir_prefix" && \
37414{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
37415	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
37416	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
37417	test -d "$cf_subdir_prefix/include/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/include/iconv"
37418	test -d "$cf_subdir_prefix/include/iconv/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/iconv/include"
37419	test -d "$cf_subdir_prefix/iconv/include" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/include"
37420	test -d "$cf_subdir_prefix/iconv/include/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/include/iconv"
37421}
37422
37423done
37424
37425test "$includedir" != NONE && \
37426test "$includedir" != "/usr/include" && \
37427test -d "$includedir" && {
37428	test -d "$includedir" &&    cf_search="$cf_search $includedir"
37429	test -d "$includedir/iconv" && cf_search="$cf_search $includedir/iconv"
37430}
37431
37432test "$oldincludedir" != NONE && \
37433test "$oldincludedir" != "/usr/include" && \
37434test -d "$oldincludedir" && {
37435	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
37436	test -d "$oldincludedir/iconv" && cf_search="$cf_search $oldincludedir/iconv"
37437}
37438
37439cf_search="$cf_search $cf_header_path_list"
37440
37441	for cf_cv_header_path_iconv in $cf_search
37442	do
37443		if test -d "$cf_cv_header_path_iconv" ; then
37444			test -n "$verbose" && echo "	... testing $cf_cv_header_path_iconv" 1>&6
37445
37446echo "${as_me:-configure}:37446: testing ... testing $cf_cv_header_path_iconv ..." 1>&5
37447
37448			CPPFLAGS="$cf_save_CPPFLAGS"
37449
37450	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37451	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_iconv"
37452
37453			cat >"conftest.$ac_ext" <<_ACEOF
37454#line 37454 "configure"
37455#include "confdefs.h"
37456
37457#include <stdlib.h>
37458#include <iconv.h>
37459
37460int
37461main (void)
37462{
37463
37464	iconv_t cd = iconv_open("","");
37465	iconv(cd,NULL,NULL,NULL,NULL);
37466	iconv_close(cd);
37467
37468  ;
37469  return 0;
37470}
37471_ACEOF
37472rm -f "conftest.$ac_objext"
37473if { (eval echo "$as_me:37473: \"$ac_compile\"") >&5
37474  (eval $ac_compile) 2>&5
37475  ac_status=$?
37476  echo "$as_me:37476: \$? = $ac_status" >&5
37477  (exit "$ac_status"); } &&
37478         { ac_try='test -s "conftest.$ac_objext"'
37479  { (eval echo "$as_me:37479: \"$ac_try\"") >&5
37480  (eval $ac_try) 2>&5
37481  ac_status=$?
37482  echo "$as_me:37482: \$? = $ac_status" >&5
37483  (exit "$ac_status"); }; }; then
37484
37485				test -n "$verbose" && echo "	... found iconv headers in $cf_cv_header_path_iconv" 1>&6
37486
37487echo "${as_me:-configure}:37487: testing ... found iconv headers in $cf_cv_header_path_iconv ..." 1>&5
37488
37489				cf_cv_find_linkage_iconv=maybe
37490				cf_test_CPPFLAGS="$CPPFLAGS"
37491				break
37492else
37493  echo "$as_me: failed program was:" >&5
37494cat "conftest.$ac_ext" >&5
37495
37496				CPPFLAGS="$cf_save_CPPFLAGS"
37497
37498fi
37499rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37500		fi
37501	done
37502
37503	if test "$cf_cv_find_linkage_iconv" = maybe ; then
37504
37505echo "${as_me:-configure}:37505: testing Searching for iconv library in FIND_LINKAGE(iconv,) ..." 1>&5
37506
37507		cf_save_LIBS="$LIBS"
37508		cf_save_LDFLAGS="$LDFLAGS"
37509
37510		if test "$cf_cv_find_linkage_iconv" != yes ; then
37511
37512cf_search=
37513cf_library_path_list=""
37514if test -n "${LDFLAGS}${LIBS}" ; then
37515	for cf_library_path in $LDFLAGS $LIBS
37516	do
37517		case "$cf_library_path" in
37518		(-L*)
37519			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
37520
37521test "x$cf_library_path" != "xNONE" && \
37522test -d "$cf_library_path" && \
37523 {
37524	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
37525	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
37526	test -d "$cf_library_path/lib/iconv" &&       cf_search="$cf_search $cf_library_path/lib/iconv"
37527	test -d "$cf_library_path/lib/iconv/lib" &&    cf_search="$cf_search $cf_library_path/lib/iconv/lib"
37528	test -d "$cf_library_path/iconv/lib" &&       cf_search="$cf_search $cf_library_path/iconv/lib"
37529	test -d "$cf_library_path/iconv/lib/iconv" &&    cf_search="$cf_search $cf_library_path/iconv/lib/iconv"
37530}
37531
37532			cf_library_path_list="$cf_library_path_list $cf_search"
37533			;;
37534		esac
37535	done
37536fi
37537
37538cf_search=
37539
37540test "x$prefix" != "xNONE" && \
37541test -d "$prefix" && \
37542 {
37543	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
37544	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
37545	test -d "$prefix/lib/iconv" &&       cf_search="$cf_search $prefix/lib/iconv"
37546	test -d "$prefix/lib/iconv/lib" &&    cf_search="$cf_search $prefix/lib/iconv/lib"
37547	test -d "$prefix/iconv/lib" &&       cf_search="$cf_search $prefix/iconv/lib"
37548	test -d "$prefix/iconv/lib/iconv" &&    cf_search="$cf_search $prefix/iconv/lib/iconv"
37549}
37550
37551for cf_subdir_prefix in \
37552	/usr \
37553	/usr/local \
37554	/usr/pkg \
37555	/opt \
37556	/opt/local \
37557	$HOME
37558do
37559
37560test "x$cf_subdir_prefix" != "x$prefix" && \
37561test -d "$cf_subdir_prefix" && \
37562{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
37563	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
37564	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
37565	test -d "$cf_subdir_prefix/lib/iconv" &&       cf_search="$cf_search $cf_subdir_prefix/lib/iconv"
37566	test -d "$cf_subdir_prefix/lib/iconv/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/iconv/lib"
37567	test -d "$cf_subdir_prefix/iconv/lib" &&       cf_search="$cf_search $cf_subdir_prefix/iconv/lib"
37568	test -d "$cf_subdir_prefix/iconv/lib/iconv" &&    cf_search="$cf_search $cf_subdir_prefix/iconv/lib/iconv"
37569}
37570
37571done
37572
37573cf_search="$cf_library_path_list $cf_search"
37574
37575			for cf_cv_library_path_iconv in $cf_search
37576			do
37577				if test -d "$cf_cv_library_path_iconv" ; then
37578					test -n "$verbose" && echo "	... testing $cf_cv_library_path_iconv" 1>&6
37579
37580echo "${as_me:-configure}:37580: testing ... testing $cf_cv_library_path_iconv ..." 1>&5
37581
37582					CPPFLAGS="$cf_test_CPPFLAGS"
37583					LIBS="-liconv  $cf_save_LIBS"
37584					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_iconv"
37585					cat >"conftest.$ac_ext" <<_ACEOF
37586#line 37586 "configure"
37587#include "confdefs.h"
37588
37589#include <stdlib.h>
37590#include <iconv.h>
37591
37592int
37593main (void)
37594{
37595
37596	iconv_t cd = iconv_open("","");
37597	iconv(cd,NULL,NULL,NULL,NULL);
37598	iconv_close(cd);
37599
37600  ;
37601  return 0;
37602}
37603_ACEOF
37604rm -f "conftest.$ac_objext" "conftest$ac_exeext"
37605if { (eval echo "$as_me:37605: \"$ac_link\"") >&5
37606  (eval $ac_link) 2>&5
37607  ac_status=$?
37608  echo "$as_me:37608: \$? = $ac_status" >&5
37609  (exit "$ac_status"); } &&
37610         { ac_try='test -s "conftest$ac_exeext"'
37611  { (eval echo "$as_me:37611: \"$ac_try\"") >&5
37612  (eval $ac_try) 2>&5
37613  ac_status=$?
37614  echo "$as_me:37614: \$? = $ac_status" >&5
37615  (exit "$ac_status"); }; }; then
37616
37617					test -n "$verbose" && echo "	... found iconv library in $cf_cv_library_path_iconv" 1>&6
37618
37619echo "${as_me:-configure}:37619: testing ... found iconv library in $cf_cv_library_path_iconv ..." 1>&5
37620
37621					cf_cv_find_linkage_iconv=yes
37622					cf_cv_library_file_iconv="-liconv"
37623					break
37624else
37625  echo "$as_me: failed program was:" >&5
37626cat "conftest.$ac_ext" >&5
37627
37628					CPPFLAGS="$cf_save_CPPFLAGS"
37629					LIBS="$cf_save_LIBS"
37630					LDFLAGS="$cf_save_LDFLAGS"
37631
37632fi
37633rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37634				fi
37635			done
37636			CPPFLAGS="$cf_save_CPPFLAGS"
37637			LDFLAGS="$cf_save_LDFLAGS"
37638		fi
37639
37640	else
37641		cf_cv_find_linkage_iconv=no
37642	fi
37643
37644fi
37645rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37646
37647fi
37648rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
37649
37650LIBS="$cf_save_LIBS"
37651
37652if test "$cf_cv_find_linkage_iconv" = yes ; then
37653am_cv_func_iconv=yes
37654else
37655am_cv_func_iconv="no, consider installing GNU libiconv"
37656fi
37657
37658fi
37659echo "$as_me:37659: result: $am_cv_func_iconv" >&5
37660echo "${ECHO_T}$am_cv_func_iconv" >&6
37661
37662  if test "$am_cv_func_iconv" = yes; then
37663
37664cat >>confdefs.h <<\EOF
37665#define HAVE_ICONV 1
37666EOF
37667
37668    echo "$as_me:37668: checking if the declaration of iconv() needs const." >&5
37669echo $ECHO_N "checking if the declaration of iconv() needs const.... $ECHO_C" >&6
37670if test "${am_cv_proto_iconv_const+set}" = set; then
37671  echo $ECHO_N "(cached) $ECHO_C" >&6
37672else
37673
37674      cat >"conftest.$ac_ext" <<_ACEOF
37675#line 37675 "configure"
37676#include "confdefs.h"
37677
37678#include <stdlib.h>
37679#include <iconv.h>
37680
37681extern
37682#ifdef __cplusplus
37683"C"
37684#endif
37685#if defined(__STDC__) || defined(__cplusplus)
37686size_t iconv (iconv_t cd, char * *inbuf, size_t *inbytesleft, char * *outbuf, size_t *outbytesleft);
37687#else
37688size_t iconv();
37689#endif
37690
37691int
37692main (void)
37693{
37694
37695  ;
37696  return 0;
37697}
37698_ACEOF
37699rm -f "conftest.$ac_objext"
37700if { (eval echo "$as_me:37700: \"$ac_compile\"") >&5
37701  (eval $ac_compile) 2>&5
37702  ac_status=$?
37703  echo "$as_me:37703: \$? = $ac_status" >&5
37704  (exit "$ac_status"); } &&
37705         { ac_try='test -s "conftest.$ac_objext"'
37706  { (eval echo "$as_me:37706: \"$ac_try\"") >&5
37707  (eval $ac_try) 2>&5
37708  ac_status=$?
37709  echo "$as_me:37709: \$? = $ac_status" >&5
37710  (exit "$ac_status"); }; }; then
37711  am_cv_proto_iconv_const=no
37712else
37713  echo "$as_me: failed program was:" >&5
37714cat "conftest.$ac_ext" >&5
37715am_cv_proto_iconv_const=yes
37716fi
37717rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37718fi
37719echo "$as_me:37719: result: $am_cv_proto_iconv_const" >&5
37720echo "${ECHO_T}$am_cv_proto_iconv_const" >&6
37721
37722    if test "$am_cv_proto_iconv_const" = yes ; then
37723      am_cv_proto_iconv_arg1="const"
37724    else
37725      am_cv_proto_iconv_arg1=""
37726    fi
37727
37728cat >>confdefs.h <<EOF
37729#define ICONV_CONST $am_cv_proto_iconv_arg1
37730EOF
37731
37732  fi
37733
37734  LIBICONV=
37735  if test "$cf_cv_find_linkage_iconv" = yes; then
37736
37737if test -n "$cf_cv_header_path_iconv" ; then
37738  for cf_add_incdir in $cf_cv_header_path_iconv
37739  do
37740	while test "$cf_add_incdir" != /usr/include
37741	do
37742	  if test -d "$cf_add_incdir"
37743	  then
37744		cf_have_incdir=no
37745		if test -n "$CFLAGS$CPPFLAGS" ; then
37746		  # a loop is needed to ensure we can add subdirs of existing dirs
37747		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
37748			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
37749			  cf_have_incdir=yes; break
37750			fi
37751		  done
37752		fi
37753
37754		if test "$cf_have_incdir" = no ; then
37755		  if test "$cf_add_incdir" = /usr/local/include ; then
37756			if test "$GCC" = yes
37757			then
37758			  cf_save_CPPFLAGS=$CPPFLAGS
37759
37760	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
37761	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
37762
37763			  cat >"conftest.$ac_ext" <<_ACEOF
37764#line 37764 "configure"
37765#include "confdefs.h"
37766#include <stdio.h>
37767int
37768main (void)
37769{
37770printf("Hello")
37771  ;
37772  return 0;
37773}
37774_ACEOF
37775rm -f "conftest.$ac_objext"
37776if { (eval echo "$as_me:37776: \"$ac_compile\"") >&5
37777  (eval $ac_compile) 2>&5
37778  ac_status=$?
37779  echo "$as_me:37779: \$? = $ac_status" >&5
37780  (exit "$ac_status"); } &&
37781         { ac_try='test -s "conftest.$ac_objext"'
37782  { (eval echo "$as_me:37782: \"$ac_try\"") >&5
37783  (eval $ac_try) 2>&5
37784  ac_status=$?
37785  echo "$as_me:37785: \$? = $ac_status" >&5
37786  (exit "$ac_status"); }; }; then
37787  :
37788else
37789  echo "$as_me: failed program was:" >&5
37790cat "conftest.$ac_ext" >&5
37791cf_have_incdir=yes
37792fi
37793rm -f "conftest.$ac_objext" "conftest.$ac_ext"
37794			  CPPFLAGS=$cf_save_CPPFLAGS
37795			fi
37796		  fi
37797		fi
37798
37799		if test "$cf_have_incdir" = no ; then
37800		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
37801
37802echo "${as_me:-configure}:37802: testing adding $cf_add_incdir to include-path ..." 1>&5
37803
37804		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
37805
37806		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
37807		  test "$cf_top_incdir" = "$cf_add_incdir" && break
37808		  cf_add_incdir="$cf_top_incdir"
37809		else
37810		  break
37811		fi
37812	  else
37813		break
37814	  fi
37815	done
37816  done
37817fi
37818
37819    if test -n "$cf_cv_library_file_iconv" ; then
37820      LIBICONV="-liconv"
37821
37822if test -n "$cf_cv_library_path_iconv" ; then
37823	for cf_add_libdir in $cf_cv_library_path_iconv
37824	do
37825		if test "$cf_add_libdir" = /usr/lib ; then
37826			:
37827		elif test -d "$cf_add_libdir"
37828		then
37829			cf_have_libdir=no
37830			if test -n "$LDFLAGS$LIBS" ; then
37831				# a loop is needed to ensure we can add subdirs of existing dirs
37832				for cf_test_libdir in $LDFLAGS $LIBS ; do
37833					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
37834						cf_have_libdir=yes; break
37835					fi
37836				done
37837			fi
37838			if test "$cf_have_libdir" = no ; then
37839				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
37840
37841echo "${as_me:-configure}:37841: testing adding $cf_add_libdir to library-path ..." 1>&5
37842
37843				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
37844			fi
37845		fi
37846	done
37847fi
37848
37849    fi
37850  fi
37851
37852if test "x$am_cv_func_iconv" = "xyes"
37853then
37854
37855echo "$as_me:37855: checking if experimental support for Chinese UTF-8 should be used" >&5
37856echo $ECHO_N "checking if experimental support for Chinese UTF-8 should be used... $ECHO_C" >&6
37857
37858# Check whether --enable-chinese-utf8 or --disable-chinese-utf8 was given.
37859if test "${enable_chinese_utf8+set}" = set; then
37860  enableval="$enable_chinese_utf8"
37861  test "$enableval" != yes && enableval=no
37862	if test "$enableval" != "no" ; then
37863    use_cn_utf8=$enableval
37864	else
37865		use_cn_utf8=yes
37866	fi
37867else
37868  enableval=no
37869	use_cn_utf8=yes
37870
37871fi;
37872echo "$as_me:37872: result: $use_cn_utf8" >&5
37873echo "${ECHO_T}$use_cn_utf8" >&6
37874if test "$use_cn_utf8" != no ; then
37875
37876cat >>confdefs.h <<\EOF
37877#define EXP_CHINESEUTF8_SUPPORT 1
37878EOF
37879
37880	use_cjk_utf8=yes
37881fi
37882
37883echo "$as_me:37883: checking if support for Japanese UTF-8 should be used" >&5
37884echo $ECHO_N "checking if support for Japanese UTF-8 should be used... $ECHO_C" >&6
37885
37886# Check whether --enable-japanese-utf8 or --disable-japanese-utf8 was given.
37887if test "${enable_japanese_utf8+set}" = set; then
37888  enableval="$enable_japanese_utf8"
37889  test "$enableval" != no && enableval=yes
37890	if test "$enableval" != "yes" ; then
37891    use_ja_utf8=$enableval
37892	else
37893		use_ja_utf8=yes
37894	fi
37895else
37896  enableval=yes
37897	use_ja_utf8=yes
37898
37899fi;
37900echo "$as_me:37900: result: $use_ja_utf8" >&5
37901echo "${ECHO_T}$use_ja_utf8" >&6
37902if test "$use_ja_utf8" != no ; then
37903
37904cat >>confdefs.h <<\EOF
37905#define USE_JAPANESEUTF8_SUPPORT 1
37906EOF
37907
37908	use_cjk_utf8=yes
37909fi
37910
37911if test $use_cjk_utf8 = yes
37912then
37913	if test "$USE_NLS" != yes ; then
37914	  LIBS="$LIBICONV $LIBS"
37915	fi
37916fi
37917
37918else
37919	test -n "$verbose" && echo "	skipping CJK features which depend on iconv" 1>&6
37920
37921echo "${as_me:-configure}:37921: testing skipping CJK features which depend on iconv ..." 1>&5
37922
37923fi
37924
37925echo "$as_me:37925: checking if experimental wcwidth/UTF-8 logic should be used" >&5
37926echo $ECHO_N "checking if experimental wcwidth/UTF-8 logic should be used... $ECHO_C" >&6
37927
37928# Check whether --enable-wcwidth-support or --disable-wcwidth-support was given.
37929if test "${enable_wcwidth_support+set}" = set; then
37930  enableval="$enable_wcwidth_support"
37931  test "$enableval" != yes && enableval=no
37932	if test "$enableval" != "no" ; then
37933    use_wcwidth=$enableval
37934	else
37935		use_wcwidth=no
37936	fi
37937else
37938  enableval=no
37939	use_wcwidth=no
37940
37941fi;
37942echo "$as_me:37942: result: $use_wcwidth" >&5
37943echo "${ECHO_T}$use_wcwidth" >&6
37944test "$use_wcwidth" != no &&
37945cat >>confdefs.h <<\EOF
37946#define EXP_WCWIDTH_SUPPORT 1
37947EOF
37948
37949use_dft_colors=no
37950case "$cf_cv_screen" in
37951(curses|slang|ncurses*)
37952	use_dft_colors=maybe
37953	;;
37954esac
37955
37956if test "$use_dft_colors" != no ; then
37957echo "$as_me:37957: checking if you want to use default-colors" >&5
37958echo $ECHO_N "checking if you want to use default-colors... $ECHO_C" >&6
37959
37960# Check whether --enable-default-colors or --disable-default-colors was given.
37961if test "${enable_default_colors+set}" = set; then
37962  enableval="$enable_default_colors"
37963  test "$enableval" != yes && enableval=no
37964	if test "$enableval" != "no" ; then
37965    use_dft_colors=yes
37966	else
37967		use_dft_colors=no
37968	fi
37969else
37970  enableval=no
37971	use_dft_colors=no
37972
37973fi;
37974echo "$as_me:37974: result: $use_dft_colors" >&5
37975echo "${ECHO_T}$use_dft_colors" >&6
37976test "$use_dft_colors" = "yes" &&
37977cat >>confdefs.h <<\EOF
37978#define USE_DEFAULT_COLORS 1
37979EOF
37980
37981fi
37982
37983echo "$as_me:37983: checking if experimental keyboard-layout logic should be used" >&5
37984echo $ECHO_N "checking if experimental keyboard-layout logic should be used... $ECHO_C" >&6
37985
37986# Check whether --enable-kbd-layout or --disable-kbd-layout was given.
37987if test "${enable_kbd_layout+set}" = set; then
37988  enableval="$enable_kbd_layout"
37989  test "$enableval" != yes && enableval=no
37990	if test "$enableval" != "no" ; then
37991    use_kbd_layout=$enableval
37992	else
37993		use_kbd_layout=no
37994	fi
37995else
37996  enableval=no
37997	use_kbd_layout=no
37998
37999fi;
38000echo "$as_me:38000: result: $use_kbd_layout" >&5
38001echo "${ECHO_T}$use_kbd_layout" >&6
38002test "$use_kbd_layout" != no &&
38003cat >>confdefs.h <<\EOF
38004#define EXP_KEYBOARD_LAYOUT 1
38005EOF
38006
38007echo "$as_me:38007: checking if experimental nested-table logic should be used" >&5
38008echo $ECHO_N "checking if experimental nested-table logic should be used... $ECHO_C" >&6
38009
38010# Check whether --enable-nested-tables or --disable-nested-tables was given.
38011if test "${enable_nested_tables+set}" = set; then
38012  enableval="$enable_nested_tables"
38013  test "$enableval" != yes && enableval=no
38014	if test "$enableval" != "no" ; then
38015    use_nested_tables=$enableval
38016	else
38017		use_nested_tables=no
38018	fi
38019else
38020  enableval=no
38021	use_nested_tables=no
38022
38023fi;
38024echo "$as_me:38024: result: $use_nested_tables" >&5
38025echo "${ECHO_T}$use_nested_tables" >&6
38026test "$use_nested_tables" != no &&
38027cat >>confdefs.h <<\EOF
38028#define EXP_NESTED_TABLES 1
38029EOF
38030
38031echo "$as_me:38031: checking if alternative line-edit bindings should be used" >&5
38032echo $ECHO_N "checking if alternative line-edit bindings should be used... $ECHO_C" >&6
38033
38034# Check whether --enable-alt-bindings or --disable-alt-bindings was given.
38035if test "${enable_alt_bindings+set}" = set; then
38036  enableval="$enable_alt_bindings"
38037  test "$enableval" != no && enableval=yes
38038	if test "$enableval" != "yes" ; then
38039    use_alt_bindings=$enableval
38040	else
38041		use_alt_bindings=yes
38042	fi
38043else
38044  enableval=yes
38045	use_alt_bindings=yes
38046
38047fi;
38048echo "$as_me:38048: result: $use_alt_bindings" >&5
38049echo "${ECHO_T}$use_alt_bindings" >&6
38050test "$use_alt_bindings" != no &&
38051cat >>confdefs.h <<\EOF
38052#define USE_ALT_BINDINGS 1
38053EOF
38054
38055echo "$as_me:38055: checking if ascii case-conversion should be used" >&5
38056echo $ECHO_N "checking if ascii case-conversion should be used... $ECHO_C" >&6
38057
38058# Check whether --enable-ascii-ctypes or --disable-ascii-ctypes was given.
38059if test "${enable_ascii_ctypes+set}" = set; then
38060  enableval="$enable_ascii_ctypes"
38061  test "$enableval" != no && enableval=yes
38062	if test "$enableval" != "yes" ; then
38063    use_ascii_ctypes=$enableval
38064	else
38065		use_ascii_ctypes=yes
38066	fi
38067else
38068  enableval=yes
38069	use_ascii_ctypes=yes
38070
38071fi;
38072echo "$as_me:38072: result: $use_ascii_ctypes" >&5
38073echo "${ECHO_T}$use_ascii_ctypes" >&6
38074test "$use_ascii_ctypes" != no &&
38075cat >>confdefs.h <<\EOF
38076#define USE_ASCII_CTYPES 1
38077EOF
38078
38079echo "$as_me:38079: checking if you want to use extended HTML DTD logic" >&5
38080echo $ECHO_N "checking if you want to use extended HTML DTD logic... $ECHO_C" >&6
38081
38082# Check whether --enable-extended-dtd or --disable-extended-dtd was given.
38083if test "${enable_extended_dtd+set}" = set; then
38084  enableval="$enable_extended_dtd"
38085  test "$enableval" != no && enableval=yes
38086	if test "$enableval" != "yes" ; then
38087    use_ext_htmldtd=no
38088	else
38089		use_ext_htmldtd=yes
38090	fi
38091else
38092  enableval=yes
38093	use_ext_htmldtd=yes
38094
38095fi;
38096echo "$as_me:38096: result: $use_ext_htmldtd" >&5
38097echo "${ECHO_T}$use_ext_htmldtd" >&6
38098test "$use_ext_htmldtd" = "no" &&
38099cat >>confdefs.h <<\EOF
38100#define NO_EXTENDED_HTMLDTD 1
38101EOF
38102
38103echo "$as_me:38103: checking if file-upload logic should be used" >&5
38104echo $ECHO_N "checking if file-upload logic should be used... $ECHO_C" >&6
38105
38106# Check whether --enable-file-upload or --disable-file-upload was given.
38107if test "${enable_file_upload+set}" = set; then
38108  enableval="$enable_file_upload"
38109  test "$enableval" != no && enableval=yes
38110	if test "$enableval" != "yes" ; then
38111    use_file_upload=$enableval
38112	else
38113		use_file_upload=yes
38114	fi
38115else
38116  enableval=yes
38117	use_file_upload=yes
38118
38119fi;
38120echo "$as_me:38120: result: $use_file_upload" >&5
38121echo "${ECHO_T}$use_file_upload" >&6
38122test "$use_file_upload" != no &&
38123cat >>confdefs.h <<\EOF
38124#define USE_FILE_UPLOAD 1
38125EOF
38126
38127echo "$as_me:38127: checking if IDNA support should be used" >&5
38128echo $ECHO_N "checking if IDNA support should be used... $ECHO_C" >&6
38129
38130# Check whether --enable-idna or --disable-idna was given.
38131if test "${enable_idna+set}" = set; then
38132  enableval="$enable_idna"
38133  test "$enableval" != no && enableval=yes
38134	if test "$enableval" != "yes" ; then
38135    use_idna=$enableval
38136	else
38137		use_idna=yes
38138	fi
38139else
38140  enableval=yes
38141	use_idna=yes
38142
38143fi;
38144echo "$as_me:38144: result: $use_idna" >&5
38145echo "${ECHO_T}$use_idna" >&6
38146
38147if test "$use_idna" = yes ; then
38148
38149case "$use_idna" in
38150(no)
38151	;;
38152(yes)
38153	;;
38154(*)
38155
38156for cf_searchpath in `echo "$use_idna" | tr $PATH_SEPARATOR ' '`; do
38157	if test -d "$cf_searchpath/include" ; then
38158
38159if test -n "$cf_searchpath/include" ; then
38160  for cf_add_incdir in $cf_searchpath/include
38161  do
38162	while test "$cf_add_incdir" != /usr/include
38163	do
38164	  if test -d "$cf_add_incdir"
38165	  then
38166		cf_have_incdir=no
38167		if test -n "$CFLAGS$CPPFLAGS" ; then
38168		  # a loop is needed to ensure we can add subdirs of existing dirs
38169		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
38170			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
38171			  cf_have_incdir=yes; break
38172			fi
38173		  done
38174		fi
38175
38176		if test "$cf_have_incdir" = no ; then
38177		  if test "$cf_add_incdir" = /usr/local/include ; then
38178			if test "$GCC" = yes
38179			then
38180			  cf_save_CPPFLAGS=$CPPFLAGS
38181
38182	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
38183	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
38184
38185			  cat >"conftest.$ac_ext" <<_ACEOF
38186#line 38186 "configure"
38187#include "confdefs.h"
38188#include <stdio.h>
38189int
38190main (void)
38191{
38192printf("Hello")
38193  ;
38194  return 0;
38195}
38196_ACEOF
38197rm -f "conftest.$ac_objext"
38198if { (eval echo "$as_me:38198: \"$ac_compile\"") >&5
38199  (eval $ac_compile) 2>&5
38200  ac_status=$?
38201  echo "$as_me:38201: \$? = $ac_status" >&5
38202  (exit "$ac_status"); } &&
38203         { ac_try='test -s "conftest.$ac_objext"'
38204  { (eval echo "$as_me:38204: \"$ac_try\"") >&5
38205  (eval $ac_try) 2>&5
38206  ac_status=$?
38207  echo "$as_me:38207: \$? = $ac_status" >&5
38208  (exit "$ac_status"); }; }; then
38209  :
38210else
38211  echo "$as_me: failed program was:" >&5
38212cat "conftest.$ac_ext" >&5
38213cf_have_incdir=yes
38214fi
38215rm -f "conftest.$ac_objext" "conftest.$ac_ext"
38216			  CPPFLAGS=$cf_save_CPPFLAGS
38217			fi
38218		  fi
38219		fi
38220
38221		if test "$cf_have_incdir" = no ; then
38222		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
38223
38224echo "${as_me:-configure}:38224: testing adding $cf_add_incdir to include-path ..." 1>&5
38225
38226		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
38227
38228		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
38229		  test "$cf_top_incdir" = "$cf_add_incdir" && break
38230		  cf_add_incdir="$cf_top_incdir"
38231		else
38232		  break
38233		fi
38234	  else
38235		break
38236	  fi
38237	done
38238  done
38239fi
38240
38241	elif test -d "$cf_searchpath/../include" ; then
38242
38243if test -n "$cf_searchpath/../include" ; then
38244  for cf_add_incdir in $cf_searchpath/../include
38245  do
38246	while test "$cf_add_incdir" != /usr/include
38247	do
38248	  if test -d "$cf_add_incdir"
38249	  then
38250		cf_have_incdir=no
38251		if test -n "$CFLAGS$CPPFLAGS" ; then
38252		  # a loop is needed to ensure we can add subdirs of existing dirs
38253		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
38254			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
38255			  cf_have_incdir=yes; break
38256			fi
38257		  done
38258		fi
38259
38260		if test "$cf_have_incdir" = no ; then
38261		  if test "$cf_add_incdir" = /usr/local/include ; then
38262			if test "$GCC" = yes
38263			then
38264			  cf_save_CPPFLAGS=$CPPFLAGS
38265
38266	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
38267	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
38268
38269			  cat >"conftest.$ac_ext" <<_ACEOF
38270#line 38270 "configure"
38271#include "confdefs.h"
38272#include <stdio.h>
38273int
38274main (void)
38275{
38276printf("Hello")
38277  ;
38278  return 0;
38279}
38280_ACEOF
38281rm -f "conftest.$ac_objext"
38282if { (eval echo "$as_me:38282: \"$ac_compile\"") >&5
38283  (eval $ac_compile) 2>&5
38284  ac_status=$?
38285  echo "$as_me:38285: \$? = $ac_status" >&5
38286  (exit "$ac_status"); } &&
38287         { ac_try='test -s "conftest.$ac_objext"'
38288  { (eval echo "$as_me:38288: \"$ac_try\"") >&5
38289  (eval $ac_try) 2>&5
38290  ac_status=$?
38291  echo "$as_me:38291: \$? = $ac_status" >&5
38292  (exit "$ac_status"); }; }; then
38293  :
38294else
38295  echo "$as_me: failed program was:" >&5
38296cat "conftest.$ac_ext" >&5
38297cf_have_incdir=yes
38298fi
38299rm -f "conftest.$ac_objext" "conftest.$ac_ext"
38300			  CPPFLAGS=$cf_save_CPPFLAGS
38301			fi
38302		  fi
38303		fi
38304
38305		if test "$cf_have_incdir" = no ; then
38306		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
38307
38308echo "${as_me:-configure}:38308: testing adding $cf_add_incdir to include-path ..." 1>&5
38309
38310		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
38311
38312		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
38313		  test "$cf_top_incdir" = "$cf_add_incdir" && break
38314		  cf_add_incdir="$cf_top_incdir"
38315		else
38316		  break
38317		fi
38318	  else
38319		break
38320	  fi
38321	done
38322  done
38323fi
38324
38325	else
38326{ { echo "$as_me:38326: error: cannot find  under $use_idna" >&5
38327echo "$as_me: error: cannot find  under $use_idna" >&2;}
38328   { (exit 1); exit 1; }; }
38329	fi
38330	if test -d "$cf_searchpath/lib" ; then
38331
38332if test -n "$cf_searchpath/lib" ; then
38333	for cf_add_libdir in $cf_searchpath/lib
38334	do
38335		if test "$cf_add_libdir" = /usr/lib ; then
38336			:
38337		elif test -d "$cf_add_libdir"
38338		then
38339			cf_have_libdir=no
38340			if test -n "$LDFLAGS$LIBS" ; then
38341				# a loop is needed to ensure we can add subdirs of existing dirs
38342				for cf_test_libdir in $LDFLAGS $LIBS ; do
38343					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
38344						cf_have_libdir=yes; break
38345					fi
38346				done
38347			fi
38348			if test "$cf_have_libdir" = no ; then
38349				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
38350
38351echo "${as_me:-configure}:38351: testing adding $cf_add_libdir to library-path ..." 1>&5
38352
38353				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
38354			fi
38355		fi
38356	done
38357fi
38358
38359	elif test -d "$cf_searchpath" ; then
38360
38361if test -n "$cf_searchpath" ; then
38362	for cf_add_libdir in $cf_searchpath
38363	do
38364		if test "$cf_add_libdir" = /usr/lib ; then
38365			:
38366		elif test -d "$cf_add_libdir"
38367		then
38368			cf_have_libdir=no
38369			if test -n "$LDFLAGS$LIBS" ; then
38370				# a loop is needed to ensure we can add subdirs of existing dirs
38371				for cf_test_libdir in $LDFLAGS $LIBS ; do
38372					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
38373						cf_have_libdir=yes; break
38374					fi
38375				done
38376			fi
38377			if test "$cf_have_libdir" = no ; then
38378				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
38379
38380echo "${as_me:-configure}:38380: testing adding $cf_add_libdir to library-path ..." 1>&5
38381
38382				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
38383			fi
38384		fi
38385	done
38386fi
38387
38388	else
38389{ { echo "$as_me:38389: error: cannot find  under $use_idna" >&5
38390echo "$as_me: error: cannot find  under $use_idna" >&2;}
38391   { (exit 1); exit 1; }; }
38392	fi
38393done
38394
38395	;;
38396esac
38397
38398# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
38399# will be set on completion of the AC_TRY_LINK below.
38400cf_cv_header_path_idn2=
38401cf_cv_library_path_idn2=
38402
38403echo "${as_me:-configure}:38403: testing Starting FIND_LINKAGE(idn2,) ..." 1>&5
38404
38405cf_save_LIBS="$LIBS"
38406
38407cat >"conftest.$ac_ext" <<_ACEOF
38408#line 38408 "configure"
38409#include "confdefs.h"
38410
38411#include <stdio.h>
38412#include <idn2.h>
38413
38414int
38415main (void)
38416{
38417
38418	char *output = 0;
38419	int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
38420	(void) code;
38421
38422  ;
38423  return 0;
38424}
38425_ACEOF
38426rm -f "conftest.$ac_objext" "conftest$ac_exeext"
38427if { (eval echo "$as_me:38427: \"$ac_link\"") >&5
38428  (eval $ac_link) 2>&5
38429  ac_status=$?
38430  echo "$as_me:38430: \$? = $ac_status" >&5
38431  (exit "$ac_status"); } &&
38432         { ac_try='test -s "conftest$ac_exeext"'
38433  { (eval echo "$as_me:38433: \"$ac_try\"") >&5
38434  (eval $ac_try) 2>&5
38435  ac_status=$?
38436  echo "$as_me:38436: \$? = $ac_status" >&5
38437  (exit "$ac_status"); }; }; then
38438
38439	cf_cv_find_linkage_idn2=yes
38440	cf_cv_header_path_idn2=/usr/include
38441	cf_cv_library_path_idn2=/usr/lib
38442
38443else
38444  echo "$as_me: failed program was:" >&5
38445cat "conftest.$ac_ext" >&5
38446
38447LIBS="-lidn2 $LIBICONV $cf_save_LIBS"
38448
38449cat >"conftest.$ac_ext" <<_ACEOF
38450#line 38450 "configure"
38451#include "confdefs.h"
38452
38453#include <stdio.h>
38454#include <idn2.h>
38455
38456int
38457main (void)
38458{
38459
38460	char *output = 0;
38461	int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
38462	(void) code;
38463
38464  ;
38465  return 0;
38466}
38467_ACEOF
38468rm -f "conftest.$ac_objext" "conftest$ac_exeext"
38469if { (eval echo "$as_me:38469: \"$ac_link\"") >&5
38470  (eval $ac_link) 2>&5
38471  ac_status=$?
38472  echo "$as_me:38472: \$? = $ac_status" >&5
38473  (exit "$ac_status"); } &&
38474         { ac_try='test -s "conftest$ac_exeext"'
38475  { (eval echo "$as_me:38475: \"$ac_try\"") >&5
38476  (eval $ac_try) 2>&5
38477  ac_status=$?
38478  echo "$as_me:38478: \$? = $ac_status" >&5
38479  (exit "$ac_status"); }; }; then
38480
38481	cf_cv_find_linkage_idn2=yes
38482	cf_cv_header_path_idn2=/usr/include
38483	cf_cv_library_path_idn2=/usr/lib
38484	cf_cv_library_file_idn2="-lidn2"
38485
38486else
38487  echo "$as_me: failed program was:" >&5
38488cat "conftest.$ac_ext" >&5
38489
38490	cf_cv_find_linkage_idn2=no
38491	LIBS="$cf_save_LIBS"
38492
38493	test -n "$verbose" && echo "	find linkage for idn2 library" 1>&6
38494
38495echo "${as_me:-configure}:38495: testing find linkage for idn2 library ..." 1>&5
38496
38497echo "${as_me:-configure}:38497: testing Searching for headers in FIND_LINKAGE(idn2,) ..." 1>&5
38498
38499	cf_save_CPPFLAGS="$CPPFLAGS"
38500	cf_test_CPPFLAGS="$CPPFLAGS"
38501
38502cf_search=
38503
38504# collect the current set of include-directories from compiler flags
38505cf_header_path_list=""
38506if test -n "${CFLAGS}${CPPFLAGS}" ; then
38507	for cf_header_path in $CPPFLAGS $CFLAGS
38508	do
38509		case "$cf_header_path" in
38510		(-I*)
38511			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
38512
38513test "x$cf_header_path" != "xNONE" && \
38514test -d "$cf_header_path" && \
38515 {
38516	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
38517	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
38518	test -d "$cf_header_path/include/idn2" &&       cf_search="$cf_search $cf_header_path/include/idn2"
38519	test -d "$cf_header_path/include/idn2/include" &&    cf_search="$cf_search $cf_header_path/include/idn2/include"
38520	test -d "$cf_header_path/idn2/include" &&       cf_search="$cf_search $cf_header_path/idn2/include"
38521	test -d "$cf_header_path/idn2/include/idn2" &&    cf_search="$cf_search $cf_header_path/idn2/include/idn2"
38522}
38523
38524			cf_header_path_list="$cf_header_path_list $cf_search"
38525			;;
38526		esac
38527	done
38528fi
38529
38530# add the variations for the package we are looking for
38531
38532cf_search=
38533
38534test "x$prefix" != "xNONE" && \
38535test -d "$prefix" && \
38536 {
38537	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
38538	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
38539	test -d "$prefix/include/idn2" &&       cf_search="$cf_search $prefix/include/idn2"
38540	test -d "$prefix/include/idn2/include" &&    cf_search="$cf_search $prefix/include/idn2/include"
38541	test -d "$prefix/idn2/include" &&       cf_search="$cf_search $prefix/idn2/include"
38542	test -d "$prefix/idn2/include/idn2" &&    cf_search="$cf_search $prefix/idn2/include/idn2"
38543}
38544
38545for cf_subdir_prefix in \
38546	/usr \
38547	/usr/local \
38548	/usr/pkg \
38549	/opt \
38550	/opt/local \
38551	$HOME
38552do
38553
38554test "x$cf_subdir_prefix" != "x$prefix" && \
38555test -d "$cf_subdir_prefix" && \
38556{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
38557	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
38558	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
38559	test -d "$cf_subdir_prefix/include/idn2" &&       cf_search="$cf_search $cf_subdir_prefix/include/idn2"
38560	test -d "$cf_subdir_prefix/include/idn2/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/idn2/include"
38561	test -d "$cf_subdir_prefix/idn2/include" &&       cf_search="$cf_search $cf_subdir_prefix/idn2/include"
38562	test -d "$cf_subdir_prefix/idn2/include/idn2" &&    cf_search="$cf_search $cf_subdir_prefix/idn2/include/idn2"
38563}
38564
38565done
38566
38567test "$includedir" != NONE && \
38568test "$includedir" != "/usr/include" && \
38569test -d "$includedir" && {
38570	test -d "$includedir" &&    cf_search="$cf_search $includedir"
38571	test -d "$includedir/idn2" && cf_search="$cf_search $includedir/idn2"
38572}
38573
38574test "$oldincludedir" != NONE && \
38575test "$oldincludedir" != "/usr/include" && \
38576test -d "$oldincludedir" && {
38577	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
38578	test -d "$oldincludedir/idn2" && cf_search="$cf_search $oldincludedir/idn2"
38579}
38580
38581cf_search="$cf_search $cf_header_path_list"
38582
38583	for cf_cv_header_path_idn2 in $cf_search
38584	do
38585		if test -d "$cf_cv_header_path_idn2" ; then
38586			test -n "$verbose" && echo "	... testing $cf_cv_header_path_idn2" 1>&6
38587
38588echo "${as_me:-configure}:38588: testing ... testing $cf_cv_header_path_idn2 ..." 1>&5
38589
38590			CPPFLAGS="$cf_save_CPPFLAGS"
38591
38592	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
38593	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_idn2"
38594
38595			cat >"conftest.$ac_ext" <<_ACEOF
38596#line 38596 "configure"
38597#include "confdefs.h"
38598
38599#include <stdio.h>
38600#include <idn2.h>
38601
38602int
38603main (void)
38604{
38605
38606	char *output = 0;
38607	int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
38608	(void) code;
38609
38610  ;
38611  return 0;
38612}
38613_ACEOF
38614rm -f "conftest.$ac_objext"
38615if { (eval echo "$as_me:38615: \"$ac_compile\"") >&5
38616  (eval $ac_compile) 2>&5
38617  ac_status=$?
38618  echo "$as_me:38618: \$? = $ac_status" >&5
38619  (exit "$ac_status"); } &&
38620         { ac_try='test -s "conftest.$ac_objext"'
38621  { (eval echo "$as_me:38621: \"$ac_try\"") >&5
38622  (eval $ac_try) 2>&5
38623  ac_status=$?
38624  echo "$as_me:38624: \$? = $ac_status" >&5
38625  (exit "$ac_status"); }; }; then
38626
38627				test -n "$verbose" && echo "	... found idn2 headers in $cf_cv_header_path_idn2" 1>&6
38628
38629echo "${as_me:-configure}:38629: testing ... found idn2 headers in $cf_cv_header_path_idn2 ..." 1>&5
38630
38631				cf_cv_find_linkage_idn2=maybe
38632				cf_test_CPPFLAGS="$CPPFLAGS"
38633				break
38634else
38635  echo "$as_me: failed program was:" >&5
38636cat "conftest.$ac_ext" >&5
38637
38638				CPPFLAGS="$cf_save_CPPFLAGS"
38639
38640fi
38641rm -f "conftest.$ac_objext" "conftest.$ac_ext"
38642		fi
38643	done
38644
38645	if test "$cf_cv_find_linkage_idn2" = maybe ; then
38646
38647echo "${as_me:-configure}:38647: testing Searching for idn2 library in FIND_LINKAGE(idn2,) ..." 1>&5
38648
38649		cf_save_LIBS="$LIBS"
38650		cf_save_LDFLAGS="$LDFLAGS"
38651
38652		if test "$cf_cv_find_linkage_idn2" != yes ; then
38653
38654cf_search=
38655cf_library_path_list=""
38656if test -n "${LDFLAGS}${LIBS}" ; then
38657	for cf_library_path in $LDFLAGS $LIBS
38658	do
38659		case "$cf_library_path" in
38660		(-L*)
38661			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
38662
38663test "x$cf_library_path" != "xNONE" && \
38664test -d "$cf_library_path" && \
38665 {
38666	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
38667	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
38668	test -d "$cf_library_path/lib/idn2" &&       cf_search="$cf_search $cf_library_path/lib/idn2"
38669	test -d "$cf_library_path/lib/idn2/lib" &&    cf_search="$cf_search $cf_library_path/lib/idn2/lib"
38670	test -d "$cf_library_path/idn2/lib" &&       cf_search="$cf_search $cf_library_path/idn2/lib"
38671	test -d "$cf_library_path/idn2/lib/idn2" &&    cf_search="$cf_search $cf_library_path/idn2/lib/idn2"
38672}
38673
38674			cf_library_path_list="$cf_library_path_list $cf_search"
38675			;;
38676		esac
38677	done
38678fi
38679
38680cf_search=
38681
38682test "x$prefix" != "xNONE" && \
38683test -d "$prefix" && \
38684 {
38685	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
38686	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
38687	test -d "$prefix/lib/idn2" &&       cf_search="$cf_search $prefix/lib/idn2"
38688	test -d "$prefix/lib/idn2/lib" &&    cf_search="$cf_search $prefix/lib/idn2/lib"
38689	test -d "$prefix/idn2/lib" &&       cf_search="$cf_search $prefix/idn2/lib"
38690	test -d "$prefix/idn2/lib/idn2" &&    cf_search="$cf_search $prefix/idn2/lib/idn2"
38691}
38692
38693for cf_subdir_prefix in \
38694	/usr \
38695	/usr/local \
38696	/usr/pkg \
38697	/opt \
38698	/opt/local \
38699	$HOME
38700do
38701
38702test "x$cf_subdir_prefix" != "x$prefix" && \
38703test -d "$cf_subdir_prefix" && \
38704{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
38705	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
38706	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
38707	test -d "$cf_subdir_prefix/lib/idn2" &&       cf_search="$cf_search $cf_subdir_prefix/lib/idn2"
38708	test -d "$cf_subdir_prefix/lib/idn2/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/idn2/lib"
38709	test -d "$cf_subdir_prefix/idn2/lib" &&       cf_search="$cf_search $cf_subdir_prefix/idn2/lib"
38710	test -d "$cf_subdir_prefix/idn2/lib/idn2" &&    cf_search="$cf_search $cf_subdir_prefix/idn2/lib/idn2"
38711}
38712
38713done
38714
38715cf_search="$cf_library_path_list $cf_search"
38716
38717			for cf_cv_library_path_idn2 in $cf_search
38718			do
38719				if test -d "$cf_cv_library_path_idn2" ; then
38720					test -n "$verbose" && echo "	... testing $cf_cv_library_path_idn2" 1>&6
38721
38722echo "${as_me:-configure}:38722: testing ... testing $cf_cv_library_path_idn2 ..." 1>&5
38723
38724					CPPFLAGS="$cf_test_CPPFLAGS"
38725					LIBS="-lidn2 $LIBICONV $cf_save_LIBS"
38726					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_idn2"
38727					cat >"conftest.$ac_ext" <<_ACEOF
38728#line 38728 "configure"
38729#include "confdefs.h"
38730
38731#include <stdio.h>
38732#include <idn2.h>
38733
38734int
38735main (void)
38736{
38737
38738	char *output = 0;
38739	int code = idn2_to_ascii_8z("name", &output, IDN2_USE_STD3_ASCII_RULES);
38740	(void) code;
38741
38742  ;
38743  return 0;
38744}
38745_ACEOF
38746rm -f "conftest.$ac_objext" "conftest$ac_exeext"
38747if { (eval echo "$as_me:38747: \"$ac_link\"") >&5
38748  (eval $ac_link) 2>&5
38749  ac_status=$?
38750  echo "$as_me:38750: \$? = $ac_status" >&5
38751  (exit "$ac_status"); } &&
38752         { ac_try='test -s "conftest$ac_exeext"'
38753  { (eval echo "$as_me:38753: \"$ac_try\"") >&5
38754  (eval $ac_try) 2>&5
38755  ac_status=$?
38756  echo "$as_me:38756: \$? = $ac_status" >&5
38757  (exit "$ac_status"); }; }; then
38758
38759					test -n "$verbose" && echo "	... found idn2 library in $cf_cv_library_path_idn2" 1>&6
38760
38761echo "${as_me:-configure}:38761: testing ... found idn2 library in $cf_cv_library_path_idn2 ..." 1>&5
38762
38763					cf_cv_find_linkage_idn2=yes
38764					cf_cv_library_file_idn2="-lidn2"
38765					break
38766else
38767  echo "$as_me: failed program was:" >&5
38768cat "conftest.$ac_ext" >&5
38769
38770					CPPFLAGS="$cf_save_CPPFLAGS"
38771					LIBS="$cf_save_LIBS"
38772					LDFLAGS="$cf_save_LDFLAGS"
38773
38774fi
38775rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
38776				fi
38777			done
38778			CPPFLAGS="$cf_save_CPPFLAGS"
38779			LDFLAGS="$cf_save_LDFLAGS"
38780		fi
38781
38782	else
38783		cf_cv_find_linkage_idn2=no
38784	fi
38785
38786fi
38787rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
38788
38789fi
38790rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
38791
38792LIBS="$cf_save_LIBS"
38793
38794if test "$cf_cv_find_linkage_idn2" = yes ; then
38795
38796if test -n "$cf_cv_header_path_idn2" ; then
38797  for cf_add_incdir in $cf_cv_header_path_idn2
38798  do
38799	while test "$cf_add_incdir" != /usr/include
38800	do
38801	  if test -d "$cf_add_incdir"
38802	  then
38803		cf_have_incdir=no
38804		if test -n "$CFLAGS$CPPFLAGS" ; then
38805		  # a loop is needed to ensure we can add subdirs of existing dirs
38806		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
38807			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
38808			  cf_have_incdir=yes; break
38809			fi
38810		  done
38811		fi
38812
38813		if test "$cf_have_incdir" = no ; then
38814		  if test "$cf_add_incdir" = /usr/local/include ; then
38815			if test "$GCC" = yes
38816			then
38817			  cf_save_CPPFLAGS=$CPPFLAGS
38818
38819	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
38820	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
38821
38822			  cat >"conftest.$ac_ext" <<_ACEOF
38823#line 38823 "configure"
38824#include "confdefs.h"
38825#include <stdio.h>
38826int
38827main (void)
38828{
38829printf("Hello")
38830  ;
38831  return 0;
38832}
38833_ACEOF
38834rm -f "conftest.$ac_objext"
38835if { (eval echo "$as_me:38835: \"$ac_compile\"") >&5
38836  (eval $ac_compile) 2>&5
38837  ac_status=$?
38838  echo "$as_me:38838: \$? = $ac_status" >&5
38839  (exit "$ac_status"); } &&
38840         { ac_try='test -s "conftest.$ac_objext"'
38841  { (eval echo "$as_me:38841: \"$ac_try\"") >&5
38842  (eval $ac_try) 2>&5
38843  ac_status=$?
38844  echo "$as_me:38844: \$? = $ac_status" >&5
38845  (exit "$ac_status"); }; }; then
38846  :
38847else
38848  echo "$as_me: failed program was:" >&5
38849cat "conftest.$ac_ext" >&5
38850cf_have_incdir=yes
38851fi
38852rm -f "conftest.$ac_objext" "conftest.$ac_ext"
38853			  CPPFLAGS=$cf_save_CPPFLAGS
38854			fi
38855		  fi
38856		fi
38857
38858		if test "$cf_have_incdir" = no ; then
38859		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
38860
38861echo "${as_me:-configure}:38861: testing adding $cf_add_incdir to include-path ..." 1>&5
38862
38863		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
38864
38865		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
38866		  test "$cf_top_incdir" = "$cf_add_incdir" && break
38867		  cf_add_incdir="$cf_top_incdir"
38868		else
38869		  break
38870		fi
38871	  else
38872		break
38873	  fi
38874	done
38875  done
38876fi
38877
38878if test -n "$cf_cv_library_path_idn2" ; then
38879	for cf_add_libdir in $cf_cv_library_path_idn2
38880	do
38881		if test "$cf_add_libdir" = /usr/lib ; then
38882			:
38883		elif test -d "$cf_add_libdir"
38884		then
38885			cf_have_libdir=no
38886			if test -n "$LDFLAGS$LIBS" ; then
38887				# a loop is needed to ensure we can add subdirs of existing dirs
38888				for cf_test_libdir in $LDFLAGS $LIBS ; do
38889					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
38890						cf_have_libdir=yes; break
38891					fi
38892				done
38893			fi
38894			if test "$cf_have_libdir" = no ; then
38895				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
38896
38897echo "${as_me:-configure}:38897: testing adding $cf_add_libdir to library-path ..." 1>&5
38898
38899				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
38900			fi
38901		fi
38902	done
38903fi
38904
38905cf_add_libs="$LIBS"
38906# reverse order
38907cf_add_0lib=
38908for cf_add_1lib in -lidn2; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
38909# filter duplicates
38910for cf_add_1lib in $cf_add_0lib; do
38911	for cf_add_2lib in $cf_add_libs; do
38912		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
38913			cf_add_1lib=
38914			break
38915		fi
38916	done
38917	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
38918done
38919LIBS="$cf_add_libs"
38920
38921else
38922test -n "$verbose" && echo "	unsuccessful, will try idn (older)" 1>&6
38923
38924echo "${as_me:-configure}:38924: testing unsuccessful, will try idn (older) ..." 1>&5
38925
38926fi
38927
38928if test "x$cf_cv_find_linkage_idn2" = xyes ; then
38929	test -n "$verbose" && echo "	found idn2 library" 1>&6
38930
38931echo "${as_me:-configure}:38931: testing found idn2 library ..." 1>&5
38932
38933cat >>confdefs.h <<\EOF
38934#define USE_IDN2 1
38935EOF
38936
38937else
38938
38939# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
38940# will be set on completion of the AC_TRY_LINK below.
38941cf_cv_header_path_idn=
38942cf_cv_library_path_idn=
38943
38944echo "${as_me:-configure}:38944: testing Starting FIND_LINKAGE(idn,) ..." 1>&5
38945
38946cf_save_LIBS="$LIBS"
38947
38948cat >"conftest.$ac_ext" <<_ACEOF
38949#line 38949 "configure"
38950#include "confdefs.h"
38951
38952#include <stdio.h>
38953#include <idna.h>
38954
38955int
38956main (void)
38957{
38958
38959	char *output = 0;
38960	int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
38961	(void) code;
38962
38963  ;
38964  return 0;
38965}
38966_ACEOF
38967rm -f "conftest.$ac_objext" "conftest$ac_exeext"
38968if { (eval echo "$as_me:38968: \"$ac_link\"") >&5
38969  (eval $ac_link) 2>&5
38970  ac_status=$?
38971  echo "$as_me:38971: \$? = $ac_status" >&5
38972  (exit "$ac_status"); } &&
38973         { ac_try='test -s "conftest$ac_exeext"'
38974  { (eval echo "$as_me:38974: \"$ac_try\"") >&5
38975  (eval $ac_try) 2>&5
38976  ac_status=$?
38977  echo "$as_me:38977: \$? = $ac_status" >&5
38978  (exit "$ac_status"); }; }; then
38979
38980	cf_cv_find_linkage_idn=yes
38981	cf_cv_header_path_idn=/usr/include
38982	cf_cv_library_path_idn=/usr/lib
38983
38984else
38985  echo "$as_me: failed program was:" >&5
38986cat "conftest.$ac_ext" >&5
38987
38988LIBS="-lidn $LIBICONV $cf_save_LIBS"
38989
38990cat >"conftest.$ac_ext" <<_ACEOF
38991#line 38991 "configure"
38992#include "confdefs.h"
38993
38994#include <stdio.h>
38995#include <idna.h>
38996
38997int
38998main (void)
38999{
39000
39001	char *output = 0;
39002	int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
39003	(void) code;
39004
39005  ;
39006  return 0;
39007}
39008_ACEOF
39009rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39010if { (eval echo "$as_me:39010: \"$ac_link\"") >&5
39011  (eval $ac_link) 2>&5
39012  ac_status=$?
39013  echo "$as_me:39013: \$? = $ac_status" >&5
39014  (exit "$ac_status"); } &&
39015         { ac_try='test -s "conftest$ac_exeext"'
39016  { (eval echo "$as_me:39016: \"$ac_try\"") >&5
39017  (eval $ac_try) 2>&5
39018  ac_status=$?
39019  echo "$as_me:39019: \$? = $ac_status" >&5
39020  (exit "$ac_status"); }; }; then
39021
39022	cf_cv_find_linkage_idn=yes
39023	cf_cv_header_path_idn=/usr/include
39024	cf_cv_library_path_idn=/usr/lib
39025	cf_cv_library_file_idn="-lidn"
39026
39027else
39028  echo "$as_me: failed program was:" >&5
39029cat "conftest.$ac_ext" >&5
39030
39031	cf_cv_find_linkage_idn=no
39032	LIBS="$cf_save_LIBS"
39033
39034	test -n "$verbose" && echo "	find linkage for idn library" 1>&6
39035
39036echo "${as_me:-configure}:39036: testing find linkage for idn library ..." 1>&5
39037
39038echo "${as_me:-configure}:39038: testing Searching for headers in FIND_LINKAGE(idn,) ..." 1>&5
39039
39040	cf_save_CPPFLAGS="$CPPFLAGS"
39041	cf_test_CPPFLAGS="$CPPFLAGS"
39042
39043cf_search=
39044
39045# collect the current set of include-directories from compiler flags
39046cf_header_path_list=""
39047if test -n "${CFLAGS}${CPPFLAGS}" ; then
39048	for cf_header_path in $CPPFLAGS $CFLAGS
39049	do
39050		case "$cf_header_path" in
39051		(-I*)
39052			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
39053
39054test "x$cf_header_path" != "xNONE" && \
39055test -d "$cf_header_path" && \
39056 {
39057	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
39058	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
39059	test -d "$cf_header_path/include/idn" &&       cf_search="$cf_search $cf_header_path/include/idn"
39060	test -d "$cf_header_path/include/idn/include" &&    cf_search="$cf_search $cf_header_path/include/idn/include"
39061	test -d "$cf_header_path/idn/include" &&       cf_search="$cf_search $cf_header_path/idn/include"
39062	test -d "$cf_header_path/idn/include/idn" &&    cf_search="$cf_search $cf_header_path/idn/include/idn"
39063}
39064
39065			cf_header_path_list="$cf_header_path_list $cf_search"
39066			;;
39067		esac
39068	done
39069fi
39070
39071# add the variations for the package we are looking for
39072
39073cf_search=
39074
39075test "x$prefix" != "xNONE" && \
39076test -d "$prefix" && \
39077 {
39078	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
39079	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
39080	test -d "$prefix/include/idn" &&       cf_search="$cf_search $prefix/include/idn"
39081	test -d "$prefix/include/idn/include" &&    cf_search="$cf_search $prefix/include/idn/include"
39082	test -d "$prefix/idn/include" &&       cf_search="$cf_search $prefix/idn/include"
39083	test -d "$prefix/idn/include/idn" &&    cf_search="$cf_search $prefix/idn/include/idn"
39084}
39085
39086for cf_subdir_prefix in \
39087	/usr \
39088	/usr/local \
39089	/usr/pkg \
39090	/opt \
39091	/opt/local \
39092	$HOME
39093do
39094
39095test "x$cf_subdir_prefix" != "x$prefix" && \
39096test -d "$cf_subdir_prefix" && \
39097{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
39098	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
39099	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
39100	test -d "$cf_subdir_prefix/include/idn" &&       cf_search="$cf_search $cf_subdir_prefix/include/idn"
39101	test -d "$cf_subdir_prefix/include/idn/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/idn/include"
39102	test -d "$cf_subdir_prefix/idn/include" &&       cf_search="$cf_search $cf_subdir_prefix/idn/include"
39103	test -d "$cf_subdir_prefix/idn/include/idn" &&    cf_search="$cf_search $cf_subdir_prefix/idn/include/idn"
39104}
39105
39106done
39107
39108test "$includedir" != NONE && \
39109test "$includedir" != "/usr/include" && \
39110test -d "$includedir" && {
39111	test -d "$includedir" &&    cf_search="$cf_search $includedir"
39112	test -d "$includedir/idn" && cf_search="$cf_search $includedir/idn"
39113}
39114
39115test "$oldincludedir" != NONE && \
39116test "$oldincludedir" != "/usr/include" && \
39117test -d "$oldincludedir" && {
39118	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
39119	test -d "$oldincludedir/idn" && cf_search="$cf_search $oldincludedir/idn"
39120}
39121
39122cf_search="$cf_search $cf_header_path_list"
39123
39124	for cf_cv_header_path_idn in $cf_search
39125	do
39126		if test -d "$cf_cv_header_path_idn" ; then
39127			test -n "$verbose" && echo "	... testing $cf_cv_header_path_idn" 1>&6
39128
39129echo "${as_me:-configure}:39129: testing ... testing $cf_cv_header_path_idn ..." 1>&5
39130
39131			CPPFLAGS="$cf_save_CPPFLAGS"
39132
39133	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39134	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_idn"
39135
39136			cat >"conftest.$ac_ext" <<_ACEOF
39137#line 39137 "configure"
39138#include "confdefs.h"
39139
39140#include <stdio.h>
39141#include <idna.h>
39142
39143int
39144main (void)
39145{
39146
39147	char *output = 0;
39148	int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
39149	(void) code;
39150
39151  ;
39152  return 0;
39153}
39154_ACEOF
39155rm -f "conftest.$ac_objext"
39156if { (eval echo "$as_me:39156: \"$ac_compile\"") >&5
39157  (eval $ac_compile) 2>&5
39158  ac_status=$?
39159  echo "$as_me:39159: \$? = $ac_status" >&5
39160  (exit "$ac_status"); } &&
39161         { ac_try='test -s "conftest.$ac_objext"'
39162  { (eval echo "$as_me:39162: \"$ac_try\"") >&5
39163  (eval $ac_try) 2>&5
39164  ac_status=$?
39165  echo "$as_me:39165: \$? = $ac_status" >&5
39166  (exit "$ac_status"); }; }; then
39167
39168				test -n "$verbose" && echo "	... found idn headers in $cf_cv_header_path_idn" 1>&6
39169
39170echo "${as_me:-configure}:39170: testing ... found idn headers in $cf_cv_header_path_idn ..." 1>&5
39171
39172				cf_cv_find_linkage_idn=maybe
39173				cf_test_CPPFLAGS="$CPPFLAGS"
39174				break
39175else
39176  echo "$as_me: failed program was:" >&5
39177cat "conftest.$ac_ext" >&5
39178
39179				CPPFLAGS="$cf_save_CPPFLAGS"
39180
39181fi
39182rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39183		fi
39184	done
39185
39186	if test "$cf_cv_find_linkage_idn" = maybe ; then
39187
39188echo "${as_me:-configure}:39188: testing Searching for idn library in FIND_LINKAGE(idn,) ..." 1>&5
39189
39190		cf_save_LIBS="$LIBS"
39191		cf_save_LDFLAGS="$LDFLAGS"
39192
39193		if test "$cf_cv_find_linkage_idn" != yes ; then
39194
39195cf_search=
39196cf_library_path_list=""
39197if test -n "${LDFLAGS}${LIBS}" ; then
39198	for cf_library_path in $LDFLAGS $LIBS
39199	do
39200		case "$cf_library_path" in
39201		(-L*)
39202			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
39203
39204test "x$cf_library_path" != "xNONE" && \
39205test -d "$cf_library_path" && \
39206 {
39207	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
39208	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
39209	test -d "$cf_library_path/lib/idn" &&       cf_search="$cf_search $cf_library_path/lib/idn"
39210	test -d "$cf_library_path/lib/idn/lib" &&    cf_search="$cf_search $cf_library_path/lib/idn/lib"
39211	test -d "$cf_library_path/idn/lib" &&       cf_search="$cf_search $cf_library_path/idn/lib"
39212	test -d "$cf_library_path/idn/lib/idn" &&    cf_search="$cf_search $cf_library_path/idn/lib/idn"
39213}
39214
39215			cf_library_path_list="$cf_library_path_list $cf_search"
39216			;;
39217		esac
39218	done
39219fi
39220
39221cf_search=
39222
39223test "x$prefix" != "xNONE" && \
39224test -d "$prefix" && \
39225 {
39226	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
39227	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
39228	test -d "$prefix/lib/idn" &&       cf_search="$cf_search $prefix/lib/idn"
39229	test -d "$prefix/lib/idn/lib" &&    cf_search="$cf_search $prefix/lib/idn/lib"
39230	test -d "$prefix/idn/lib" &&       cf_search="$cf_search $prefix/idn/lib"
39231	test -d "$prefix/idn/lib/idn" &&    cf_search="$cf_search $prefix/idn/lib/idn"
39232}
39233
39234for cf_subdir_prefix in \
39235	/usr \
39236	/usr/local \
39237	/usr/pkg \
39238	/opt \
39239	/opt/local \
39240	$HOME
39241do
39242
39243test "x$cf_subdir_prefix" != "x$prefix" && \
39244test -d "$cf_subdir_prefix" && \
39245{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
39246	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
39247	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
39248	test -d "$cf_subdir_prefix/lib/idn" &&       cf_search="$cf_search $cf_subdir_prefix/lib/idn"
39249	test -d "$cf_subdir_prefix/lib/idn/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/idn/lib"
39250	test -d "$cf_subdir_prefix/idn/lib" &&       cf_search="$cf_search $cf_subdir_prefix/idn/lib"
39251	test -d "$cf_subdir_prefix/idn/lib/idn" &&    cf_search="$cf_search $cf_subdir_prefix/idn/lib/idn"
39252}
39253
39254done
39255
39256cf_search="$cf_library_path_list $cf_search"
39257
39258			for cf_cv_library_path_idn in $cf_search
39259			do
39260				if test -d "$cf_cv_library_path_idn" ; then
39261					test -n "$verbose" && echo "	... testing $cf_cv_library_path_idn" 1>&6
39262
39263echo "${as_me:-configure}:39263: testing ... testing $cf_cv_library_path_idn ..." 1>&5
39264
39265					CPPFLAGS="$cf_test_CPPFLAGS"
39266					LIBS="-lidn $LIBICONV $cf_save_LIBS"
39267					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_idn"
39268					cat >"conftest.$ac_ext" <<_ACEOF
39269#line 39269 "configure"
39270#include "confdefs.h"
39271
39272#include <stdio.h>
39273#include <idna.h>
39274
39275int
39276main (void)
39277{
39278
39279	char *output = 0;
39280	int code = idna_to_ascii_8z("name", &output, IDNA_USE_STD3_ASCII_RULES);
39281	(void) code;
39282
39283  ;
39284  return 0;
39285}
39286_ACEOF
39287rm -f "conftest.$ac_objext" "conftest$ac_exeext"
39288if { (eval echo "$as_me:39288: \"$ac_link\"") >&5
39289  (eval $ac_link) 2>&5
39290  ac_status=$?
39291  echo "$as_me:39291: \$? = $ac_status" >&5
39292  (exit "$ac_status"); } &&
39293         { ac_try='test -s "conftest$ac_exeext"'
39294  { (eval echo "$as_me:39294: \"$ac_try\"") >&5
39295  (eval $ac_try) 2>&5
39296  ac_status=$?
39297  echo "$as_me:39297: \$? = $ac_status" >&5
39298  (exit "$ac_status"); }; }; then
39299
39300					test -n "$verbose" && echo "	... found idn library in $cf_cv_library_path_idn" 1>&6
39301
39302echo "${as_me:-configure}:39302: testing ... found idn library in $cf_cv_library_path_idn ..." 1>&5
39303
39304					cf_cv_find_linkage_idn=yes
39305					cf_cv_library_file_idn="-lidn"
39306					break
39307else
39308  echo "$as_me: failed program was:" >&5
39309cat "conftest.$ac_ext" >&5
39310
39311					CPPFLAGS="$cf_save_CPPFLAGS"
39312					LIBS="$cf_save_LIBS"
39313					LDFLAGS="$cf_save_LDFLAGS"
39314
39315fi
39316rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39317				fi
39318			done
39319			CPPFLAGS="$cf_save_CPPFLAGS"
39320			LDFLAGS="$cf_save_LDFLAGS"
39321		fi
39322
39323	else
39324		cf_cv_find_linkage_idn=no
39325	fi
39326
39327fi
39328rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39329
39330fi
39331rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
39332
39333LIBS="$cf_save_LIBS"
39334
39335if test "$cf_cv_find_linkage_idn" = yes ; then
39336
39337if test -n "$cf_cv_header_path_idn" ; then
39338  for cf_add_incdir in $cf_cv_header_path_idn
39339  do
39340	while test "$cf_add_incdir" != /usr/include
39341	do
39342	  if test -d "$cf_add_incdir"
39343	  then
39344		cf_have_incdir=no
39345		if test -n "$CFLAGS$CPPFLAGS" ; then
39346		  # a loop is needed to ensure we can add subdirs of existing dirs
39347		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
39348			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
39349			  cf_have_incdir=yes; break
39350			fi
39351		  done
39352		fi
39353
39354		if test "$cf_have_incdir" = no ; then
39355		  if test "$cf_add_incdir" = /usr/local/include ; then
39356			if test "$GCC" = yes
39357			then
39358			  cf_save_CPPFLAGS=$CPPFLAGS
39359
39360	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
39361	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
39362
39363			  cat >"conftest.$ac_ext" <<_ACEOF
39364#line 39364 "configure"
39365#include "confdefs.h"
39366#include <stdio.h>
39367int
39368main (void)
39369{
39370printf("Hello")
39371  ;
39372  return 0;
39373}
39374_ACEOF
39375rm -f "conftest.$ac_objext"
39376if { (eval echo "$as_me:39376: \"$ac_compile\"") >&5
39377  (eval $ac_compile) 2>&5
39378  ac_status=$?
39379  echo "$as_me:39379: \$? = $ac_status" >&5
39380  (exit "$ac_status"); } &&
39381         { ac_try='test -s "conftest.$ac_objext"'
39382  { (eval echo "$as_me:39382: \"$ac_try\"") >&5
39383  (eval $ac_try) 2>&5
39384  ac_status=$?
39385  echo "$as_me:39385: \$? = $ac_status" >&5
39386  (exit "$ac_status"); }; }; then
39387  :
39388else
39389  echo "$as_me: failed program was:" >&5
39390cat "conftest.$ac_ext" >&5
39391cf_have_incdir=yes
39392fi
39393rm -f "conftest.$ac_objext" "conftest.$ac_ext"
39394			  CPPFLAGS=$cf_save_CPPFLAGS
39395			fi
39396		  fi
39397		fi
39398
39399		if test "$cf_have_incdir" = no ; then
39400		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
39401
39402echo "${as_me:-configure}:39402: testing adding $cf_add_incdir to include-path ..." 1>&5
39403
39404		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
39405
39406		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
39407		  test "$cf_top_incdir" = "$cf_add_incdir" && break
39408		  cf_add_incdir="$cf_top_incdir"
39409		else
39410		  break
39411		fi
39412	  else
39413		break
39414	  fi
39415	done
39416  done
39417fi
39418
39419if test -n "$cf_cv_library_path_idn" ; then
39420	for cf_add_libdir in $cf_cv_library_path_idn
39421	do
39422		if test "$cf_add_libdir" = /usr/lib ; then
39423			:
39424		elif test -d "$cf_add_libdir"
39425		then
39426			cf_have_libdir=no
39427			if test -n "$LDFLAGS$LIBS" ; then
39428				# a loop is needed to ensure we can add subdirs of existing dirs
39429				for cf_test_libdir in $LDFLAGS $LIBS ; do
39430					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
39431						cf_have_libdir=yes; break
39432					fi
39433				done
39434			fi
39435			if test "$cf_have_libdir" = no ; then
39436				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
39437
39438echo "${as_me:-configure}:39438: testing adding $cf_add_libdir to library-path ..." 1>&5
39439
39440				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
39441			fi
39442		fi
39443	done
39444fi
39445
39446cf_add_libs="$LIBS"
39447# reverse order
39448cf_add_0lib=
39449for cf_add_1lib in -lidn; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
39450# filter duplicates
39451for cf_add_1lib in $cf_add_0lib; do
39452	for cf_add_2lib in $cf_add_libs; do
39453		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
39454			cf_add_1lib=
39455			break
39456		fi
39457	done
39458	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
39459done
39460LIBS="$cf_add_libs"
39461
39462else
39463{ echo "$as_me:39463: WARNING: Cannot find idn library" >&5
39464echo "$as_me: WARNING: Cannot find idn library" >&2;}
39465fi
39466
39467if test "x$cf_cv_find_linkage_idn" = xyes ; then
39468	test -n "$verbose" && echo "	found idn library" 1>&6
39469
39470echo "${as_me:-configure}:39470: testing found idn library ..." 1>&5
39471
39472cat >>confdefs.h <<\EOF
39473#define USE_IDNA 1
39474EOF
39475
39476fi
39477fi
39478
39479fi
39480
39481echo "$as_me:39481: checking if element-justification logic should be used" >&5
39482echo $ECHO_N "checking if element-justification logic should be used... $ECHO_C" >&6
39483
39484# Check whether --enable-justify-elts or --disable-justify-elts was given.
39485if test "${enable_justify_elts+set}" = set; then
39486  enableval="$enable_justify_elts"
39487  test "$enableval" != no && enableval=yes
39488	if test "$enableval" != "yes" ; then
39489    use_justify_elts=$enableval
39490	else
39491		use_justify_elts=yes
39492	fi
39493else
39494  enableval=yes
39495	use_justify_elts=yes
39496
39497fi;
39498echo "$as_me:39498: result: $use_justify_elts" >&5
39499echo "${ECHO_T}$use_justify_elts" >&6
39500test "$use_justify_elts" != no &&
39501cat >>confdefs.h <<\EOF
39502#define USE_JUSTIFY_ELTS 1
39503EOF
39504
39505echo "$as_me:39505: checking if partial-display should be used" >&5
39506echo $ECHO_N "checking if partial-display should be used... $ECHO_C" >&6
39507
39508# Check whether --enable-partial or --disable-partial was given.
39509if test "${enable_partial+set}" = set; then
39510  enableval="$enable_partial"
39511  test "$enableval" != no && enableval=yes
39512	if test "$enableval" != "yes" ; then
39513    use_partial_display=$enableval
39514	else
39515		use_partial_display=yes
39516	fi
39517else
39518  enableval=yes
39519	use_partial_display=yes
39520
39521fi;
39522echo "$as_me:39522: result: $use_partial_display" >&5
39523echo "${ECHO_T}$use_partial_display" >&6
39524test "$use_partial_display" != no &&
39525cat >>confdefs.h <<\EOF
39526#define DISP_PARTIAL 1
39527EOF
39528
39529echo "$as_me:39529: checking if persistent-cookie logic should be used" >&5
39530echo $ECHO_N "checking if persistent-cookie logic should be used... $ECHO_C" >&6
39531
39532# Check whether --enable-persistent-cookies or --disable-persistent-cookies was given.
39533if test "${enable_persistent_cookies+set}" = set; then
39534  enableval="$enable_persistent_cookies"
39535  test "$enableval" != no && enableval=yes
39536	if test "$enableval" != "yes" ; then
39537    use_filed_cookies=$enableval
39538	else
39539		use_filed_cookies=yes
39540	fi
39541else
39542  enableval=yes
39543	use_filed_cookies=yes
39544
39545fi;
39546echo "$as_me:39546: result: $use_filed_cookies" >&5
39547echo "${ECHO_T}$use_filed_cookies" >&6
39548test "$use_filed_cookies" != no &&
39549cat >>confdefs.h <<\EOF
39550#define USE_PERSISTENT_COOKIES 1
39551EOF
39552
39553echo "$as_me:39553: checking if html source should be colorized" >&5
39554echo $ECHO_N "checking if html source should be colorized... $ECHO_C" >&6
39555
39556# Check whether --enable-prettysrc or --disable-prettysrc was given.
39557if test "${enable_prettysrc+set}" = set; then
39558  enableval="$enable_prettysrc"
39559  test "$enableval" != no && enableval=yes
39560	if test "$enableval" != "yes" ; then
39561    use_prettysrc=$enableval
39562	else
39563		use_prettysrc=yes
39564	fi
39565else
39566  enableval=yes
39567	use_prettysrc=yes
39568
39569fi;
39570echo "$as_me:39570: result: $use_prettysrc" >&5
39571echo "${ECHO_T}$use_prettysrc" >&6
39572test "$use_prettysrc" != no &&
39573cat >>confdefs.h <<\EOF
39574#define USE_PRETTYSRC 1
39575EOF
39576
39577echo "$as_me:39577: checking if progress-bar code should be used" >&5
39578echo $ECHO_N "checking if progress-bar code should be used... $ECHO_C" >&6
39579
39580# Check whether --enable-progressbar or --disable-progressbar was given.
39581if test "${enable_progressbar+set}" = set; then
39582  enableval="$enable_progressbar"
39583  test "$enableval" != no && enableval=yes
39584	if test "$enableval" != "yes" ; then
39585    use_progressbar=$enableval
39586	else
39587		use_progressbar=yes
39588	fi
39589else
39590  enableval=yes
39591	use_progressbar=yes
39592
39593fi;
39594echo "$as_me:39594: result: $use_progressbar" >&5
39595echo "${ECHO_T}$use_progressbar" >&6
39596test "$use_progressbar" != no &&
39597cat >>confdefs.h <<\EOF
39598#define USE_PROGRESSBAR 1
39599EOF
39600
39601echo "$as_me:39601: checking if read-progress message should show ETA" >&5
39602echo $ECHO_N "checking if read-progress message should show ETA... $ECHO_C" >&6
39603
39604# Check whether --enable-read-eta or --disable-read-eta was given.
39605if test "${enable_read_eta+set}" = set; then
39606  enableval="$enable_read_eta"
39607  test "$enableval" != no && enableval=yes
39608	if test "$enableval" != "yes" ; then
39609    use_read_eta=$enableval
39610	else
39611		use_read_eta=yes
39612	fi
39613else
39614  enableval=yes
39615	use_read_eta=yes
39616
39617fi;
39618echo "$as_me:39618: result: $use_read_eta" >&5
39619echo "${ECHO_T}$use_read_eta" >&6
39620test "$use_read_eta" != no &&
39621cat >>confdefs.h <<\EOF
39622#define USE_READPROGRESS 1
39623EOF
39624
39625echo "$as_me:39625: checking if source caching should be used" >&5
39626echo $ECHO_N "checking if source caching should be used... $ECHO_C" >&6
39627
39628# Check whether --enable-source-cache or --disable-source-cache was given.
39629if test "${enable_source_cache+set}" = set; then
39630  enableval="$enable_source_cache"
39631  test "$enableval" != no && enableval=yes
39632	if test "$enableval" != "yes" ; then
39633    use_source_cache=$enableval
39634	else
39635		use_source_cache=yes
39636	fi
39637else
39638  enableval=yes
39639	use_source_cache=yes
39640
39641fi;
39642echo "$as_me:39642: result: $use_source_cache" >&5
39643echo "${ECHO_T}$use_source_cache" >&6
39644test "$use_source_cache" != no &&
39645cat >>confdefs.h <<\EOF
39646#define USE_SOURCE_CACHE 1
39647EOF
39648
39649echo "$as_me:39649: checking if scrollbar code should be used" >&5
39650echo $ECHO_N "checking if scrollbar code should be used... $ECHO_C" >&6
39651
39652# Check whether --enable-scrollbar or --disable-scrollbar was given.
39653if test "${enable_scrollbar+set}" = set; then
39654  enableval="$enable_scrollbar"
39655  test "$enableval" != no && enableval=yes
39656	if test "$enableval" != "yes" ; then
39657    use_scrollbar=$enableval
39658	else
39659		use_scrollbar=yes
39660	fi
39661else
39662  enableval=yes
39663	use_scrollbar=yes
39664
39665fi;
39666echo "$as_me:39666: result: $use_scrollbar" >&5
39667echo "${ECHO_T}$use_scrollbar" >&6
39668
39669echo "$as_me:39669: checking if charset-selection logic should be used" >&5
39670echo $ECHO_N "checking if charset-selection logic should be used... $ECHO_C" >&6
39671
39672# Check whether --enable-charset-choice or --disable-charset-choice was given.
39673if test "${enable_charset_choice+set}" = set; then
39674  enableval="$enable_charset_choice"
39675  test "$enableval" != yes && enableval=no
39676	if test "$enableval" != "no" ; then
39677    use_charset_choice=$enableval
39678	else
39679		use_charset_choice=no
39680	fi
39681else
39682  enableval=no
39683	use_charset_choice=no
39684
39685fi;
39686echo "$as_me:39686: result: $use_charset_choice" >&5
39687echo "${ECHO_T}$use_charset_choice" >&6
39688test "$use_charset_choice" != no &&
39689cat >>confdefs.h <<\EOF
39690#define USE_CHARSET_CHOICE 1
39691EOF
39692
39693echo "$as_me:39693: checking if you want to use external commands" >&5
39694echo $ECHO_N "checking if you want to use external commands... $ECHO_C" >&6
39695
39696# Check whether --enable-externs or --disable-externs was given.
39697if test "${enable_externs+set}" = set; then
39698  enableval="$enable_externs"
39699  test "$enableval" != yes && enableval=no
39700	if test "$enableval" != "no" ; then
39701    use_externs=yes
39702	else
39703		use_externs=no
39704	fi
39705else
39706  enableval=no
39707	use_externs=no
39708
39709fi;
39710echo "$as_me:39710: result: $use_externs" >&5
39711echo "${ECHO_T}$use_externs" >&6
39712if test "$use_externs" != "no" ; then
39713
39714cat >>confdefs.h <<\EOF
39715#define USE_EXTERNALS 1
39716EOF
39717
39718	EXTRA_OBJS="$EXTRA_OBJS LYExtern\$o"
39719fi
39720
39721echo "$as_me:39721: checking if you want to use setfont support" >&5
39722echo $ECHO_N "checking if you want to use setfont support... $ECHO_C" >&6
39723
39724# Check whether --enable-font-switch or --disable-font-switch was given.
39725if test "${enable_font_switch+set}" = set; then
39726  enableval="$enable_font_switch"
39727  test "$enableval" != yes && enableval=no
39728	if test "$enableval" != "no" ; then
39729    use_setfont=yes
39730	else
39731		use_setfont=no
39732	fi
39733else
39734  enableval=no
39735	use_setfont=no
39736
39737fi;
39738echo "$as_me:39738: result: $use_setfont" >&5
39739echo "${ECHO_T}$use_setfont" >&6
39740if test "$use_setfont" = yes ; then
39741	case "$host_os" in
39742	(linux*)
39743
39744test -z "$SETFONT" && SETFONT="consolechars"
39745for ac_prog in $SETFONT consolechars setfont
39746do
39747  # Extract the first word of "$ac_prog", so it can be a program name with args.
39748set dummy $ac_prog; ac_word=$2
39749echo "$as_me:39749: checking for $ac_word" >&5
39750echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
39751if test "${ac_cv_path_SETFONT+set}" = set; then
39752  echo $ECHO_N "(cached) $ECHO_C" >&6
39753else
39754  case $SETFONT in
39755  [\\/]* | ?:[\\/]*)
39756  ac_cv_path_SETFONT="$SETFONT" # Let the user override the test with a path.
39757  ;;
39758  *)
39759  ac_save_IFS=$IFS; IFS=$ac_path_separator
39760ac_dummy="$PATH"
39761for ac_dir in $ac_dummy; do
39762  IFS=$ac_save_IFS
39763  test -z "$ac_dir" && ac_dir=.
39764  if $as_executable_p "$ac_dir/$ac_word"; then
39765   ac_cv_path_SETFONT="$ac_dir/$ac_word"
39766   echo "$as_me:39766: found $ac_dir/$ac_word" >&5
39767   break
39768fi
39769done
39770
39771  ;;
39772esac
39773fi
39774SETFONT=$ac_cv_path_SETFONT
39775
39776if test -n "$SETFONT"; then
39777  echo "$as_me:39777: result: $SETFONT" >&5
39778echo "${ECHO_T}$SETFONT" >&6
39779else
39780  echo "$as_me:39780: result: no" >&5
39781echo "${ECHO_T}no" >&6
39782fi
39783
39784  test -n "$SETFONT" && break
39785done
39786test -n "$SETFONT" || SETFONT="$SETFONT"
39787
39788cf_path_prog=""
39789cf_path_args=""
39790IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
39791for cf_temp in $ac_cv_path_SETFONT
39792do
39793	if test -z "$cf_path_prog" ; then
39794		if test "$with_full_paths" = yes ; then
39795
39796if test "x$prefix" != xNONE; then
39797	cf_path_syntax="$prefix"
39798else
39799	cf_path_syntax="$ac_default_prefix"
39800fi
39801
39802case ".$cf_temp" in
39803(.\$\(*\)*|.\'*\'*)
39804	;;
39805(..|./*|.\\*)
39806	;;
39807(.[a-zA-Z]:[\\/]*) # OS/2 EMX
39808	;;
39809(.\$\{*prefix\}*|.\$\{*dir\}*)
39810	eval cf_temp="$cf_temp"
39811	case ".$cf_temp" in
39812	(.NONE/*)
39813		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
39814		;;
39815	esac
39816	;;
39817(.no|.NONE/*)
39818	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
39819	;;
39820(*)
39821	break
39822	;;
39823esac
39824
39825			cf_path_prog="$cf_temp"
39826		else
39827			cf_path_prog="`basename "$cf_temp"`"
39828		fi
39829	elif test -z "$cf_path_args" ; then
39830		cf_path_args="$cf_temp"
39831	else
39832		cf_path_args="$cf_path_args $cf_temp"
39833	fi
39834done
39835IFS="$cf_save_ifs"
39836
39837if test -n "$cf_path_prog" ; then
39838
39839echo "${as_me:-configure}:39839: testing defining path for ${cf_path_prog} ..." 1>&5
39840
39841cat >>confdefs.h <<EOF
39842#define SETFONT_PATH "$cf_path_prog"
39843EOF
39844
39845	test -n "$cf_path_args" &&
39846cat >>confdefs.h <<EOF
39847#define SETFONT_ARGS "$cf_path_args"
39848EOF
39849
39850fi
39851
39852		;;
39853	(os2*)
39854		SETFONT=built-in
39855		test -n "$verbose" && echo "	Assume $host_os has font-switching" 1>&6
39856
39857echo "${as_me:-configure}:39857: testing Assume $host_os has font-switching ..." 1>&5
39858
39859		;;
39860	(*)
39861		SETFONT=unknown
39862		test -n "$verbose" && echo "	Assume $host_os has no font-switching" 1>&6
39863
39864echo "${as_me:-configure}:39864: testing Assume $host_os has no font-switching ..." 1>&5
39865
39866		;;
39867	esac
39868	if test -z "$SETFONT" ; then
39869		{ echo "$as_me:39869: WARNING: Cannot find a font-setting program" >&5
39870echo "$as_me: WARNING: Cannot find a font-setting program" >&2;}
39871	elif test "$SETFONT" != unknown ; then
39872
39873cat >>confdefs.h <<\EOF
39874#define EXP_CHARTRANS_AUTOSWITCH 1
39875EOF
39876
39877	fi
39878fi
39879
39880echo "$as_me:39880: checking if you want cgi-link support" >&5
39881echo $ECHO_N "checking if you want cgi-link support... $ECHO_C" >&6
39882
39883# Check whether --enable-cgi-links or --disable-cgi-links was given.
39884if test "${enable_cgi_links+set}" = set; then
39885  enableval="$enable_cgi_links"
39886  test "$enableval" != yes && enableval=no
39887	if test "$enableval" != "no" ; then
39888
39889cat >>confdefs.h <<\EOF
39890#define LYNXCGI_LINKS 1
39891EOF
39892
39893	fi
39894else
39895  enableval=no
39896fi;
39897echo "$as_me:39897: result: $enableval" >&5
39898echo "${ECHO_T}$enableval" >&6
39899
39900echo "$as_me:39900: checking if you want change-exec support" >&5
39901echo $ECHO_N "checking if you want change-exec support... $ECHO_C" >&6
39902
39903# Check whether --enable-change-exec or --disable-change-exec was given.
39904if test "${enable_change_exec+set}" = set; then
39905  enableval="$enable_change_exec"
39906  test "$enableval" != yes && enableval=no
39907	if test "$enableval" != "no" ; then
39908    use_change_exec=yes
39909	else
39910		use_change_exec=no
39911	fi
39912else
39913  enableval=no
39914	use_change_exec=no
39915
39916fi;
39917echo "$as_me:39917: result: $use_change_exec" >&5
39918echo "${ECHO_T}$use_change_exec" >&6
39919test "$use_change_exec" = yes &&
39920cat >>confdefs.h <<\EOF
39921#define ENABLE_OPTS_CHANGE_EXEC 1
39922EOF
39923
39924echo "$as_me:39924: checking if you want exec-links support" >&5
39925echo $ECHO_N "checking if you want exec-links support... $ECHO_C" >&6
39926
39927# Check whether --enable-exec-links or --disable-exec-links was given.
39928if test "${enable_exec_links+set}" = set; then
39929  enableval="$enable_exec_links"
39930  test "$enableval" != no && enableval=yes
39931	if test "$enableval" != "$use_change_exec" ; then
39932    use_exec_links=$enableval
39933	else
39934		use_exec_links=$enableval
39935	fi
39936else
39937  enableval=$use_change_exec
39938	use_exec_links=$enableval
39939
39940fi;
39941echo "$as_me:39941: result: $use_exec_links" >&5
39942echo "${ECHO_T}$use_exec_links" >&6
39943test "$use_exec_links" = yes &&
39944cat >>confdefs.h <<\EOF
39945#define EXEC_LINKS 1
39946EOF
39947
39948echo "$as_me:39948: checking if you want exec-scripts support" >&5
39949echo $ECHO_N "checking if you want exec-scripts support... $ECHO_C" >&6
39950
39951# Check whether --enable-exec-scripts or --disable-exec-scripts was given.
39952if test "${enable_exec_scripts+set}" = set; then
39953  enableval="$enable_exec_scripts"
39954  test "$enableval" != no && enableval=yes
39955	if test "$enableval" != "$use_change_exec" ; then
39956    use_exec_scripts=$enableval
39957	else
39958		use_exec_scripts=$enableval
39959	fi
39960else
39961  enableval=$use_change_exec
39962	use_exec_scripts=$enableval
39963
39964fi;
39965echo "$as_me:39965: result: $use_exec_scripts" >&5
39966echo "${ECHO_T}$use_exec_scripts" >&6
39967test "$use_exec_scripts" = yes &&
39968cat >>confdefs.h <<\EOF
39969#define EXEC_SCRIPTS 1
39970EOF
39971
39972echo "$as_me:39972: checking if you want internal-links feature" >&5
39973echo $ECHO_N "checking if you want internal-links feature... $ECHO_C" >&6
39974
39975# Check whether --enable-internal-links or --disable-internal-links was given.
39976if test "${enable_internal_links+set}" = set; then
39977  enableval="$enable_internal_links"
39978  test "$enableval" != yes && enableval=no
39979	if test "$enableval" != "no" ; then
39980    use_internal_links=yes
39981	else
39982		use_internal_links=no
39983	fi
39984else
39985  enableval=no
39986	use_internal_links=no
39987
39988fi;
39989echo "$as_me:39989: result: $use_internal_links" >&5
39990echo "${ECHO_T}$use_internal_links" >&6
39991test "$use_internal_links" = yes &&
39992cat >>confdefs.h <<\EOF
39993#define TRACK_INTERNAL_LINKS 1
39994EOF
39995
39996echo "$as_me:39996: checking if you want to fork NSL requests" >&5
39997echo $ECHO_N "checking if you want to fork NSL requests... $ECHO_C" >&6
39998
39999# Check whether --enable-nsl-fork or --disable-nsl-fork was given.
40000if test "${enable_nsl_fork+set}" = set; then
40001  enableval="$enable_nsl_fork"
40002  test "$enableval" != yes && enableval=no
40003	if test "$enableval" != "no" ; then
40004    use_nsl_fork=yes
40005	else
40006		use_nsl_fork=no
40007	fi
40008else
40009  enableval=no
40010	use_nsl_fork=no
40011
40012fi;
40013echo "$as_me:40013: result: $use_nsl_fork" >&5
40014echo "${ECHO_T}$use_nsl_fork" >&6
40015if test "$use_nsl_fork" = yes ; then
40016	case "$host_os" in
40017	(mingw*)
40018
40019cat >>confdefs.h <<\EOF
40020#define _WINDOWS_NSL 1
40021EOF
40022
40023		;;
40024	(*)
40025
40026cat >>confdefs.h <<\EOF
40027#define NSL_FORK 1
40028EOF
40029
40030		;;
40031	esac
40032fi
40033
40034echo "$as_me:40034: checking if you want to log URL requests via syslog" >&5
40035echo $ECHO_N "checking if you want to log URL requests via syslog... $ECHO_C" >&6
40036
40037# Check whether --enable-syslog or --disable-syslog was given.
40038if test "${enable_syslog+set}" = set; then
40039  enableval="$enable_syslog"
40040  test "$enableval" != yes && enableval=no
40041	if test "$enableval" != "no" ; then
40042    use_syslog=yes
40043	else
40044		use_syslog=no
40045	fi
40046else
40047  enableval=no
40048	use_syslog=no
40049
40050fi;
40051echo "$as_me:40051: result: $use_syslog" >&5
40052echo "${ECHO_T}$use_syslog" >&6
40053test "$use_syslog" = yes &&
40054cat >>confdefs.h <<\EOF
40055#define SYSLOG_REQUESTED_URLS 1
40056EOF
40057
40058echo "$as_me:40058: checking if you want to underline links" >&5
40059echo $ECHO_N "checking if you want to underline links... $ECHO_C" >&6
40060
40061# Check whether --enable-underlines or --disable-underlines was given.
40062if test "${enable_underlines+set}" = set; then
40063  enableval="$enable_underlines"
40064  test "$enableval" != yes && enableval=no
40065	if test "$enableval" != "no" ; then
40066    use_underline=yes
40067	else
40068		use_underline=no
40069	fi
40070else
40071  enableval=no
40072	use_underline=no
40073
40074fi;
40075echo "$as_me:40075: result: $use_underline" >&5
40076echo "${ECHO_T}$use_underline" >&6
40077test "$use_underline" = yes &&
40078cat >>confdefs.h <<\EOF
40079#define UNDERLINE_LINKS 1
40080EOF
40081
40082test "$use_underline" = no  &&
40083cat >>confdefs.h <<\EOF
40084#define UNDERLINE_LINKS 0
40085EOF
40086
40087echo "$as_me:40087: checking if help files should be gzip'ed" >&5
40088echo $ECHO_N "checking if help files should be gzip'ed... $ECHO_C" >&6
40089
40090# Check whether --enable-gzip-help or --disable-gzip-help was given.
40091if test "${enable_gzip_help+set}" = set; then
40092  enableval="$enable_gzip_help"
40093  test "$enableval" != yes && enableval=no
40094	if test "$enableval" != "no" ; then
40095    use_gzip_help=$enableval
40096	else
40097		use_gzip_help=no
40098	fi
40099else
40100  enableval=no
40101	use_gzip_help=no
40102
40103fi;
40104echo "$as_me:40104: result: $use_gzip_help" >&5
40105echo "${ECHO_T}$use_gzip_help" >&6
40106
40107echo "$as_me:40107: checking if you want to use libbz2 for decompression of some bzip2 files" >&5
40108echo $ECHO_N "checking if you want to use libbz2 for decompression of some bzip2 files... $ECHO_C" >&6
40109
40110# Check whether --with-bzlib or --without-bzlib was given.
40111if test "${with_bzlib+set}" = set; then
40112  withval="$with_bzlib"
40113  use_bzlib=$withval
40114else
40115  use_bzlib=no
40116fi;
40117echo "$as_me:40117: result: $use_bzlib" >&5
40118echo "${ECHO_T}$use_bzlib" >&6
40119
40120if test ".$use_bzlib" != ".no" ; then
40121
40122case "$use_bzlib" in
40123(no)
40124	;;
40125(yes)
40126	;;
40127(*)
40128
40129for cf_searchpath in `echo "$use_bzlib" | tr $PATH_SEPARATOR ' '`; do
40130	if test -d "$cf_searchpath/include" ; then
40131
40132if test -n "$cf_searchpath/include" ; then
40133  for cf_add_incdir in $cf_searchpath/include
40134  do
40135	while test "$cf_add_incdir" != /usr/include
40136	do
40137	  if test -d "$cf_add_incdir"
40138	  then
40139		cf_have_incdir=no
40140		if test -n "$CFLAGS$CPPFLAGS" ; then
40141		  # a loop is needed to ensure we can add subdirs of existing dirs
40142		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40143			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40144			  cf_have_incdir=yes; break
40145			fi
40146		  done
40147		fi
40148
40149		if test "$cf_have_incdir" = no ; then
40150		  if test "$cf_add_incdir" = /usr/local/include ; then
40151			if test "$GCC" = yes
40152			then
40153			  cf_save_CPPFLAGS=$CPPFLAGS
40154
40155	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40156	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40157
40158			  cat >"conftest.$ac_ext" <<_ACEOF
40159#line 40159 "configure"
40160#include "confdefs.h"
40161#include <stdio.h>
40162int
40163main (void)
40164{
40165printf("Hello")
40166  ;
40167  return 0;
40168}
40169_ACEOF
40170rm -f "conftest.$ac_objext"
40171if { (eval echo "$as_me:40171: \"$ac_compile\"") >&5
40172  (eval $ac_compile) 2>&5
40173  ac_status=$?
40174  echo "$as_me:40174: \$? = $ac_status" >&5
40175  (exit "$ac_status"); } &&
40176         { ac_try='test -s "conftest.$ac_objext"'
40177  { (eval echo "$as_me:40177: \"$ac_try\"") >&5
40178  (eval $ac_try) 2>&5
40179  ac_status=$?
40180  echo "$as_me:40180: \$? = $ac_status" >&5
40181  (exit "$ac_status"); }; }; then
40182  :
40183else
40184  echo "$as_me: failed program was:" >&5
40185cat "conftest.$ac_ext" >&5
40186cf_have_incdir=yes
40187fi
40188rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40189			  CPPFLAGS=$cf_save_CPPFLAGS
40190			fi
40191		  fi
40192		fi
40193
40194		if test "$cf_have_incdir" = no ; then
40195		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
40196
40197echo "${as_me:-configure}:40197: testing adding $cf_add_incdir to include-path ..." 1>&5
40198
40199		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40200
40201		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40202		  test "$cf_top_incdir" = "$cf_add_incdir" && break
40203		  cf_add_incdir="$cf_top_incdir"
40204		else
40205		  break
40206		fi
40207	  else
40208		break
40209	  fi
40210	done
40211  done
40212fi
40213
40214	elif test -d "$cf_searchpath/../include" ; then
40215
40216if test -n "$cf_searchpath/../include" ; then
40217  for cf_add_incdir in $cf_searchpath/../include
40218  do
40219	while test "$cf_add_incdir" != /usr/include
40220	do
40221	  if test -d "$cf_add_incdir"
40222	  then
40223		cf_have_incdir=no
40224		if test -n "$CFLAGS$CPPFLAGS" ; then
40225		  # a loop is needed to ensure we can add subdirs of existing dirs
40226		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40227			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40228			  cf_have_incdir=yes; break
40229			fi
40230		  done
40231		fi
40232
40233		if test "$cf_have_incdir" = no ; then
40234		  if test "$cf_add_incdir" = /usr/local/include ; then
40235			if test "$GCC" = yes
40236			then
40237			  cf_save_CPPFLAGS=$CPPFLAGS
40238
40239	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40240	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40241
40242			  cat >"conftest.$ac_ext" <<_ACEOF
40243#line 40243 "configure"
40244#include "confdefs.h"
40245#include <stdio.h>
40246int
40247main (void)
40248{
40249printf("Hello")
40250  ;
40251  return 0;
40252}
40253_ACEOF
40254rm -f "conftest.$ac_objext"
40255if { (eval echo "$as_me:40255: \"$ac_compile\"") >&5
40256  (eval $ac_compile) 2>&5
40257  ac_status=$?
40258  echo "$as_me:40258: \$? = $ac_status" >&5
40259  (exit "$ac_status"); } &&
40260         { ac_try='test -s "conftest.$ac_objext"'
40261  { (eval echo "$as_me:40261: \"$ac_try\"") >&5
40262  (eval $ac_try) 2>&5
40263  ac_status=$?
40264  echo "$as_me:40264: \$? = $ac_status" >&5
40265  (exit "$ac_status"); }; }; then
40266  :
40267else
40268  echo "$as_me: failed program was:" >&5
40269cat "conftest.$ac_ext" >&5
40270cf_have_incdir=yes
40271fi
40272rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40273			  CPPFLAGS=$cf_save_CPPFLAGS
40274			fi
40275		  fi
40276		fi
40277
40278		if test "$cf_have_incdir" = no ; then
40279		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
40280
40281echo "${as_me:-configure}:40281: testing adding $cf_add_incdir to include-path ..." 1>&5
40282
40283		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40284
40285		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40286		  test "$cf_top_incdir" = "$cf_add_incdir" && break
40287		  cf_add_incdir="$cf_top_incdir"
40288		else
40289		  break
40290		fi
40291	  else
40292		break
40293	  fi
40294	done
40295  done
40296fi
40297
40298	else
40299{ { echo "$as_me:40299: error: cannot find  under $use_bzlib" >&5
40300echo "$as_me: error: cannot find  under $use_bzlib" >&2;}
40301   { (exit 1); exit 1; }; }
40302	fi
40303	if test -d "$cf_searchpath/lib" ; then
40304
40305if test -n "$cf_searchpath/lib" ; then
40306	for cf_add_libdir in $cf_searchpath/lib
40307	do
40308		if test "$cf_add_libdir" = /usr/lib ; then
40309			:
40310		elif test -d "$cf_add_libdir"
40311		then
40312			cf_have_libdir=no
40313			if test -n "$LDFLAGS$LIBS" ; then
40314				# a loop is needed to ensure we can add subdirs of existing dirs
40315				for cf_test_libdir in $LDFLAGS $LIBS ; do
40316					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40317						cf_have_libdir=yes; break
40318					fi
40319				done
40320			fi
40321			if test "$cf_have_libdir" = no ; then
40322				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
40323
40324echo "${as_me:-configure}:40324: testing adding $cf_add_libdir to library-path ..." 1>&5
40325
40326				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40327			fi
40328		fi
40329	done
40330fi
40331
40332	elif test -d "$cf_searchpath" ; then
40333
40334if test -n "$cf_searchpath" ; then
40335	for cf_add_libdir in $cf_searchpath
40336	do
40337		if test "$cf_add_libdir" = /usr/lib ; then
40338			:
40339		elif test -d "$cf_add_libdir"
40340		then
40341			cf_have_libdir=no
40342			if test -n "$LDFLAGS$LIBS" ; then
40343				# a loop is needed to ensure we can add subdirs of existing dirs
40344				for cf_test_libdir in $LDFLAGS $LIBS ; do
40345					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40346						cf_have_libdir=yes; break
40347					fi
40348				done
40349			fi
40350			if test "$cf_have_libdir" = no ; then
40351				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
40352
40353echo "${as_me:-configure}:40353: testing adding $cf_add_libdir to library-path ..." 1>&5
40354
40355				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40356			fi
40357		fi
40358	done
40359fi
40360
40361	else
40362{ { echo "$as_me:40362: error: cannot find  under $use_bzlib" >&5
40363echo "$as_me: error: cannot find  under $use_bzlib" >&2;}
40364   { (exit 1); exit 1; }; }
40365	fi
40366done
40367
40368	;;
40369esac
40370
40371# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
40372# will be set on completion of the AC_TRY_LINK below.
40373cf_cv_header_path_bz2=
40374cf_cv_library_path_bz2=
40375
40376echo "${as_me:-configure}:40376: testing Starting FIND_LINKAGE(bz2,bzlib) ..." 1>&5
40377
40378cf_save_LIBS="$LIBS"
40379
40380cat >"conftest.$ac_ext" <<_ACEOF
40381#line 40381 "configure"
40382#include "confdefs.h"
40383
40384#include <stdio.h>
40385#include <bzlib.h>
40386
40387int
40388main (void)
40389{
40390
40391    BZ2_bzopen("name","mode")
40392
40393  ;
40394  return 0;
40395}
40396_ACEOF
40397rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40398if { (eval echo "$as_me:40398: \"$ac_link\"") >&5
40399  (eval $ac_link) 2>&5
40400  ac_status=$?
40401  echo "$as_me:40401: \$? = $ac_status" >&5
40402  (exit "$ac_status"); } &&
40403         { ac_try='test -s "conftest$ac_exeext"'
40404  { (eval echo "$as_me:40404: \"$ac_try\"") >&5
40405  (eval $ac_try) 2>&5
40406  ac_status=$?
40407  echo "$as_me:40407: \$? = $ac_status" >&5
40408  (exit "$ac_status"); }; }; then
40409
40410	cf_cv_find_linkage_bz2=yes
40411	cf_cv_header_path_bz2=/usr/include
40412	cf_cv_library_path_bz2=/usr/lib
40413
40414else
40415  echo "$as_me: failed program was:" >&5
40416cat "conftest.$ac_ext" >&5
40417
40418LIBS="-lbz2  $cf_save_LIBS"
40419
40420cat >"conftest.$ac_ext" <<_ACEOF
40421#line 40421 "configure"
40422#include "confdefs.h"
40423
40424#include <stdio.h>
40425#include <bzlib.h>
40426
40427int
40428main (void)
40429{
40430
40431    BZ2_bzopen("name","mode")
40432
40433  ;
40434  return 0;
40435}
40436_ACEOF
40437rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40438if { (eval echo "$as_me:40438: \"$ac_link\"") >&5
40439  (eval $ac_link) 2>&5
40440  ac_status=$?
40441  echo "$as_me:40441: \$? = $ac_status" >&5
40442  (exit "$ac_status"); } &&
40443         { ac_try='test -s "conftest$ac_exeext"'
40444  { (eval echo "$as_me:40444: \"$ac_try\"") >&5
40445  (eval $ac_try) 2>&5
40446  ac_status=$?
40447  echo "$as_me:40447: \$? = $ac_status" >&5
40448  (exit "$ac_status"); }; }; then
40449
40450	cf_cv_find_linkage_bz2=yes
40451	cf_cv_header_path_bz2=/usr/include
40452	cf_cv_library_path_bz2=/usr/lib
40453	cf_cv_library_file_bz2="-lbz2"
40454
40455else
40456  echo "$as_me: failed program was:" >&5
40457cat "conftest.$ac_ext" >&5
40458
40459	cf_cv_find_linkage_bz2=no
40460	LIBS="$cf_save_LIBS"
40461
40462	test -n "$verbose" && echo "	find linkage for bz2 library" 1>&6
40463
40464echo "${as_me:-configure}:40464: testing find linkage for bz2 library ..." 1>&5
40465
40466echo "${as_me:-configure}:40466: testing Searching for headers in FIND_LINKAGE(bz2,bzlib) ..." 1>&5
40467
40468	cf_save_CPPFLAGS="$CPPFLAGS"
40469	cf_test_CPPFLAGS="$CPPFLAGS"
40470
40471cf_search=
40472
40473# collect the current set of include-directories from compiler flags
40474cf_header_path_list=""
40475if test -n "${CFLAGS}${CPPFLAGS}" ; then
40476	for cf_header_path in $CPPFLAGS $CFLAGS
40477	do
40478		case "$cf_header_path" in
40479		(-I*)
40480			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
40481
40482test "x$cf_header_path" != "xNONE" && \
40483test -d "$cf_header_path" && \
40484 {
40485	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
40486	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
40487	test -d "$cf_header_path/include/bzlib" &&       cf_search="$cf_search $cf_header_path/include/bzlib"
40488	test -d "$cf_header_path/include/bzlib/include" &&    cf_search="$cf_search $cf_header_path/include/bzlib/include"
40489	test -d "$cf_header_path/bzlib/include" &&       cf_search="$cf_search $cf_header_path/bzlib/include"
40490	test -d "$cf_header_path/bzlib/include/bzlib" &&    cf_search="$cf_search $cf_header_path/bzlib/include/bzlib"
40491}
40492
40493			cf_header_path_list="$cf_header_path_list $cf_search"
40494			;;
40495		esac
40496	done
40497fi
40498
40499# add the variations for the package we are looking for
40500
40501cf_search=
40502
40503test "x$prefix" != "xNONE" && \
40504test -d "$prefix" && \
40505 {
40506	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
40507	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
40508	test -d "$prefix/include/bzlib" &&       cf_search="$cf_search $prefix/include/bzlib"
40509	test -d "$prefix/include/bzlib/include" &&    cf_search="$cf_search $prefix/include/bzlib/include"
40510	test -d "$prefix/bzlib/include" &&       cf_search="$cf_search $prefix/bzlib/include"
40511	test -d "$prefix/bzlib/include/bzlib" &&    cf_search="$cf_search $prefix/bzlib/include/bzlib"
40512}
40513
40514for cf_subdir_prefix in \
40515	/usr \
40516	/usr/local \
40517	/usr/pkg \
40518	/opt \
40519	/opt/local \
40520	$HOME
40521do
40522
40523test "x$cf_subdir_prefix" != "x$prefix" && \
40524test -d "$cf_subdir_prefix" && \
40525{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
40526	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
40527	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
40528	test -d "$cf_subdir_prefix/include/bzlib" &&       cf_search="$cf_search $cf_subdir_prefix/include/bzlib"
40529	test -d "$cf_subdir_prefix/include/bzlib/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/bzlib/include"
40530	test -d "$cf_subdir_prefix/bzlib/include" &&       cf_search="$cf_search $cf_subdir_prefix/bzlib/include"
40531	test -d "$cf_subdir_prefix/bzlib/include/bzlib" &&    cf_search="$cf_search $cf_subdir_prefix/bzlib/include/bzlib"
40532}
40533
40534done
40535
40536test "$includedir" != NONE && \
40537test "$includedir" != "/usr/include" && \
40538test -d "$includedir" && {
40539	test -d "$includedir" &&    cf_search="$cf_search $includedir"
40540	test -d "$includedir/bzlib" && cf_search="$cf_search $includedir/bzlib"
40541}
40542
40543test "$oldincludedir" != NONE && \
40544test "$oldincludedir" != "/usr/include" && \
40545test -d "$oldincludedir" && {
40546	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
40547	test -d "$oldincludedir/bzlib" && cf_search="$cf_search $oldincludedir/bzlib"
40548}
40549
40550cf_search="$cf_search $cf_header_path_list"
40551
40552	for cf_cv_header_path_bz2 in $cf_search
40553	do
40554		if test -d "$cf_cv_header_path_bz2" ; then
40555			test -n "$verbose" && echo "	... testing $cf_cv_header_path_bz2" 1>&6
40556
40557echo "${as_me:-configure}:40557: testing ... testing $cf_cv_header_path_bz2 ..." 1>&5
40558
40559			CPPFLAGS="$cf_save_CPPFLAGS"
40560
40561	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40562	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_bz2"
40563
40564			cat >"conftest.$ac_ext" <<_ACEOF
40565#line 40565 "configure"
40566#include "confdefs.h"
40567
40568#include <stdio.h>
40569#include <bzlib.h>
40570
40571int
40572main (void)
40573{
40574
40575    BZ2_bzopen("name","mode")
40576
40577  ;
40578  return 0;
40579}
40580_ACEOF
40581rm -f "conftest.$ac_objext"
40582if { (eval echo "$as_me:40582: \"$ac_compile\"") >&5
40583  (eval $ac_compile) 2>&5
40584  ac_status=$?
40585  echo "$as_me:40585: \$? = $ac_status" >&5
40586  (exit "$ac_status"); } &&
40587         { ac_try='test -s "conftest.$ac_objext"'
40588  { (eval echo "$as_me:40588: \"$ac_try\"") >&5
40589  (eval $ac_try) 2>&5
40590  ac_status=$?
40591  echo "$as_me:40591: \$? = $ac_status" >&5
40592  (exit "$ac_status"); }; }; then
40593
40594				test -n "$verbose" && echo "	... found bz2 headers in $cf_cv_header_path_bz2" 1>&6
40595
40596echo "${as_me:-configure}:40596: testing ... found bz2 headers in $cf_cv_header_path_bz2 ..." 1>&5
40597
40598				cf_cv_find_linkage_bz2=maybe
40599				cf_test_CPPFLAGS="$CPPFLAGS"
40600				break
40601else
40602  echo "$as_me: failed program was:" >&5
40603cat "conftest.$ac_ext" >&5
40604
40605				CPPFLAGS="$cf_save_CPPFLAGS"
40606
40607fi
40608rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40609		fi
40610	done
40611
40612	if test "$cf_cv_find_linkage_bz2" = maybe ; then
40613
40614echo "${as_me:-configure}:40614: testing Searching for bz2 library in FIND_LINKAGE(bz2,bzlib) ..." 1>&5
40615
40616		cf_save_LIBS="$LIBS"
40617		cf_save_LDFLAGS="$LDFLAGS"
40618
40619		CPPFLAGS="$cf_test_CPPFLAGS"
40620		LIBS="-lbz2  $cf_save_LIBS"
40621		cat >"conftest.$ac_ext" <<_ACEOF
40622#line 40622 "configure"
40623#include "confdefs.h"
40624
40625#include <stdio.h>
40626#include <bzlib.h>
40627
40628int
40629main (void)
40630{
40631
40632    BZ2_bzopen("name","mode")
40633
40634  ;
40635  return 0;
40636}
40637_ACEOF
40638rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40639if { (eval echo "$as_me:40639: \"$ac_link\"") >&5
40640  (eval $ac_link) 2>&5
40641  ac_status=$?
40642  echo "$as_me:40642: \$? = $ac_status" >&5
40643  (exit "$ac_status"); } &&
40644         { ac_try='test -s "conftest$ac_exeext"'
40645  { (eval echo "$as_me:40645: \"$ac_try\"") >&5
40646  (eval $ac_try) 2>&5
40647  ac_status=$?
40648  echo "$as_me:40648: \$? = $ac_status" >&5
40649  (exit "$ac_status"); }; }; then
40650
40651			test -n "$verbose" && echo "	... found bz2 library in system" 1>&6
40652
40653echo "${as_me:-configure}:40653: testing ... found bz2 library in system ..." 1>&5
40654
40655			cf_cv_find_linkage_bz2=yes
40656else
40657  echo "$as_me: failed program was:" >&5
40658cat "conftest.$ac_ext" >&5
40659fi
40660rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40661			CPPFLAGS="$cf_save_CPPFLAGS"
40662			LIBS="$cf_save_LIBS"
40663
40664		if test "$cf_cv_find_linkage_bz2" != yes ; then
40665
40666cf_search=
40667cf_library_path_list=""
40668if test -n "${LDFLAGS}${LIBS}" ; then
40669	for cf_library_path in $LDFLAGS $LIBS
40670	do
40671		case "$cf_library_path" in
40672		(-L*)
40673			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
40674
40675test "x$cf_library_path" != "xNONE" && \
40676test -d "$cf_library_path" && \
40677 {
40678	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
40679	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
40680	test -d "$cf_library_path/lib/bz2" &&       cf_search="$cf_search $cf_library_path/lib/bz2"
40681	test -d "$cf_library_path/lib/bz2/lib" &&    cf_search="$cf_search $cf_library_path/lib/bz2/lib"
40682	test -d "$cf_library_path/bz2/lib" &&       cf_search="$cf_search $cf_library_path/bz2/lib"
40683	test -d "$cf_library_path/bz2/lib/bz2" &&    cf_search="$cf_search $cf_library_path/bz2/lib/bz2"
40684}
40685
40686			cf_library_path_list="$cf_library_path_list $cf_search"
40687			;;
40688		esac
40689	done
40690fi
40691
40692cf_search=
40693
40694test "x$prefix" != "xNONE" && \
40695test -d "$prefix" && \
40696 {
40697	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
40698	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
40699	test -d "$prefix/lib/bz2" &&       cf_search="$cf_search $prefix/lib/bz2"
40700	test -d "$prefix/lib/bz2/lib" &&    cf_search="$cf_search $prefix/lib/bz2/lib"
40701	test -d "$prefix/bz2/lib" &&       cf_search="$cf_search $prefix/bz2/lib"
40702	test -d "$prefix/bz2/lib/bz2" &&    cf_search="$cf_search $prefix/bz2/lib/bz2"
40703}
40704
40705for cf_subdir_prefix in \
40706	/usr \
40707	/usr/local \
40708	/usr/pkg \
40709	/opt \
40710	/opt/local \
40711	$HOME
40712do
40713
40714test "x$cf_subdir_prefix" != "x$prefix" && \
40715test -d "$cf_subdir_prefix" && \
40716{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
40717	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
40718	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
40719	test -d "$cf_subdir_prefix/lib/bz2" &&       cf_search="$cf_search $cf_subdir_prefix/lib/bz2"
40720	test -d "$cf_subdir_prefix/lib/bz2/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/bz2/lib"
40721	test -d "$cf_subdir_prefix/bz2/lib" &&       cf_search="$cf_search $cf_subdir_prefix/bz2/lib"
40722	test -d "$cf_subdir_prefix/bz2/lib/bz2" &&    cf_search="$cf_search $cf_subdir_prefix/bz2/lib/bz2"
40723}
40724
40725done
40726
40727cf_search="$cf_library_path_list $cf_search"
40728
40729			for cf_cv_library_path_bz2 in $cf_search
40730			do
40731				if test -d "$cf_cv_library_path_bz2" ; then
40732					test -n "$verbose" && echo "	... testing $cf_cv_library_path_bz2" 1>&6
40733
40734echo "${as_me:-configure}:40734: testing ... testing $cf_cv_library_path_bz2 ..." 1>&5
40735
40736					CPPFLAGS="$cf_test_CPPFLAGS"
40737					LIBS="-lbz2  $cf_save_LIBS"
40738					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_bz2"
40739					cat >"conftest.$ac_ext" <<_ACEOF
40740#line 40740 "configure"
40741#include "confdefs.h"
40742
40743#include <stdio.h>
40744#include <bzlib.h>
40745
40746int
40747main (void)
40748{
40749
40750    BZ2_bzopen("name","mode")
40751
40752  ;
40753  return 0;
40754}
40755_ACEOF
40756rm -f "conftest.$ac_objext" "conftest$ac_exeext"
40757if { (eval echo "$as_me:40757: \"$ac_link\"") >&5
40758  (eval $ac_link) 2>&5
40759  ac_status=$?
40760  echo "$as_me:40760: \$? = $ac_status" >&5
40761  (exit "$ac_status"); } &&
40762         { ac_try='test -s "conftest$ac_exeext"'
40763  { (eval echo "$as_me:40763: \"$ac_try\"") >&5
40764  (eval $ac_try) 2>&5
40765  ac_status=$?
40766  echo "$as_me:40766: \$? = $ac_status" >&5
40767  (exit "$ac_status"); }; }; then
40768
40769					test -n "$verbose" && echo "	... found bz2 library in $cf_cv_library_path_bz2" 1>&6
40770
40771echo "${as_me:-configure}:40771: testing ... found bz2 library in $cf_cv_library_path_bz2 ..." 1>&5
40772
40773					cf_cv_find_linkage_bz2=yes
40774					cf_cv_library_file_bz2="-lbz2"
40775					break
40776else
40777  echo "$as_me: failed program was:" >&5
40778cat "conftest.$ac_ext" >&5
40779
40780					CPPFLAGS="$cf_save_CPPFLAGS"
40781					LIBS="$cf_save_LIBS"
40782					LDFLAGS="$cf_save_LDFLAGS"
40783
40784fi
40785rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40786				fi
40787			done
40788			CPPFLAGS="$cf_save_CPPFLAGS"
40789			LDFLAGS="$cf_save_LDFLAGS"
40790		fi
40791
40792	else
40793		cf_cv_find_linkage_bz2=no
40794	fi
40795
40796fi
40797rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40798
40799fi
40800rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
40801
40802LIBS="$cf_save_LIBS"
40803
40804if test "$cf_cv_find_linkage_bz2" = yes ; then
40805
40806if test -n "$cf_cv_header_path_bz2" ; then
40807  for cf_add_incdir in $cf_cv_header_path_bz2
40808  do
40809	while test "$cf_add_incdir" != /usr/include
40810	do
40811	  if test -d "$cf_add_incdir"
40812	  then
40813		cf_have_incdir=no
40814		if test -n "$CFLAGS$CPPFLAGS" ; then
40815		  # a loop is needed to ensure we can add subdirs of existing dirs
40816		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40817			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40818			  cf_have_incdir=yes; break
40819			fi
40820		  done
40821		fi
40822
40823		if test "$cf_have_incdir" = no ; then
40824		  if test "$cf_add_incdir" = /usr/local/include ; then
40825			if test "$GCC" = yes
40826			then
40827			  cf_save_CPPFLAGS=$CPPFLAGS
40828
40829	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40830	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40831
40832			  cat >"conftest.$ac_ext" <<_ACEOF
40833#line 40833 "configure"
40834#include "confdefs.h"
40835#include <stdio.h>
40836int
40837main (void)
40838{
40839printf("Hello")
40840  ;
40841  return 0;
40842}
40843_ACEOF
40844rm -f "conftest.$ac_objext"
40845if { (eval echo "$as_me:40845: \"$ac_compile\"") >&5
40846  (eval $ac_compile) 2>&5
40847  ac_status=$?
40848  echo "$as_me:40848: \$? = $ac_status" >&5
40849  (exit "$ac_status"); } &&
40850         { ac_try='test -s "conftest.$ac_objext"'
40851  { (eval echo "$as_me:40851: \"$ac_try\"") >&5
40852  (eval $ac_try) 2>&5
40853  ac_status=$?
40854  echo "$as_me:40854: \$? = $ac_status" >&5
40855  (exit "$ac_status"); }; }; then
40856  :
40857else
40858  echo "$as_me: failed program was:" >&5
40859cat "conftest.$ac_ext" >&5
40860cf_have_incdir=yes
40861fi
40862rm -f "conftest.$ac_objext" "conftest.$ac_ext"
40863			  CPPFLAGS=$cf_save_CPPFLAGS
40864			fi
40865		  fi
40866		fi
40867
40868		if test "$cf_have_incdir" = no ; then
40869		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
40870
40871echo "${as_me:-configure}:40871: testing adding $cf_add_incdir to include-path ..." 1>&5
40872
40873		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
40874
40875		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
40876		  test "$cf_top_incdir" = "$cf_add_incdir" && break
40877		  cf_add_incdir="$cf_top_incdir"
40878		else
40879		  break
40880		fi
40881	  else
40882		break
40883	  fi
40884	done
40885  done
40886fi
40887
40888if test -n "$cf_cv_library_path_bz2" ; then
40889	for cf_add_libdir in $cf_cv_library_path_bz2
40890	do
40891		if test "$cf_add_libdir" = /usr/lib ; then
40892			:
40893		elif test -d "$cf_add_libdir"
40894		then
40895			cf_have_libdir=no
40896			if test -n "$LDFLAGS$LIBS" ; then
40897				# a loop is needed to ensure we can add subdirs of existing dirs
40898				for cf_test_libdir in $LDFLAGS $LIBS ; do
40899					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
40900						cf_have_libdir=yes; break
40901					fi
40902				done
40903			fi
40904			if test "$cf_have_libdir" = no ; then
40905				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
40906
40907echo "${as_me:-configure}:40907: testing adding $cf_add_libdir to library-path ..." 1>&5
40908
40909				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
40910			fi
40911		fi
40912	done
40913fi
40914
40915cf_add_libs="$LIBS"
40916# reverse order
40917cf_add_0lib=
40918for cf_add_1lib in -lbz2; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
40919# filter duplicates
40920for cf_add_1lib in $cf_add_0lib; do
40921	for cf_add_2lib in $cf_add_libs; do
40922		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
40923			cf_add_1lib=
40924			break
40925		fi
40926	done
40927	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
40928done
40929LIBS="$cf_add_libs"
40930
40931else
40932{ echo "$as_me:40932: WARNING: Cannot find bz2 library" >&5
40933echo "$as_me: WARNING: Cannot find bz2 library" >&2;}
40934fi
40935
40936	test "x$cf_cv_find_linkage_bz2" = "xyes" &&
40937cat >>confdefs.h <<\EOF
40938#define USE_BZLIB 1
40939EOF
40940
40941fi
40942
40943echo "$as_me:40943: checking if you want to use zlib for decompression of some gzip files" >&5
40944echo $ECHO_N "checking if you want to use zlib for decompression of some gzip files... $ECHO_C" >&6
40945
40946# Check whether --with-zlib or --without-zlib was given.
40947if test "${with_zlib+set}" = set; then
40948  withval="$with_zlib"
40949  use_zlib=$withval
40950else
40951  use_zlib=no
40952fi;
40953echo "$as_me:40953: result: $use_zlib" >&5
40954echo "${ECHO_T}$use_zlib" >&6
40955
40956if test ".$use_zlib" != ".no" ; then
40957
40958case "$use_zlib" in
40959(no)
40960	;;
40961(yes)
40962	;;
40963(*)
40964
40965for cf_searchpath in `echo "$use_zlib" | tr $PATH_SEPARATOR ' '`; do
40966	if test -d "$cf_searchpath/include" ; then
40967
40968if test -n "$cf_searchpath/include" ; then
40969  for cf_add_incdir in $cf_searchpath/include
40970  do
40971	while test "$cf_add_incdir" != /usr/include
40972	do
40973	  if test -d "$cf_add_incdir"
40974	  then
40975		cf_have_incdir=no
40976		if test -n "$CFLAGS$CPPFLAGS" ; then
40977		  # a loop is needed to ensure we can add subdirs of existing dirs
40978		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
40979			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
40980			  cf_have_incdir=yes; break
40981			fi
40982		  done
40983		fi
40984
40985		if test "$cf_have_incdir" = no ; then
40986		  if test "$cf_add_incdir" = /usr/local/include ; then
40987			if test "$GCC" = yes
40988			then
40989			  cf_save_CPPFLAGS=$CPPFLAGS
40990
40991	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
40992	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
40993
40994			  cat >"conftest.$ac_ext" <<_ACEOF
40995#line 40995 "configure"
40996#include "confdefs.h"
40997#include <stdio.h>
40998int
40999main (void)
41000{
41001printf("Hello")
41002  ;
41003  return 0;
41004}
41005_ACEOF
41006rm -f "conftest.$ac_objext"
41007if { (eval echo "$as_me:41007: \"$ac_compile\"") >&5
41008  (eval $ac_compile) 2>&5
41009  ac_status=$?
41010  echo "$as_me:41010: \$? = $ac_status" >&5
41011  (exit "$ac_status"); } &&
41012         { ac_try='test -s "conftest.$ac_objext"'
41013  { (eval echo "$as_me:41013: \"$ac_try\"") >&5
41014  (eval $ac_try) 2>&5
41015  ac_status=$?
41016  echo "$as_me:41016: \$? = $ac_status" >&5
41017  (exit "$ac_status"); }; }; then
41018  :
41019else
41020  echo "$as_me: failed program was:" >&5
41021cat "conftest.$ac_ext" >&5
41022cf_have_incdir=yes
41023fi
41024rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41025			  CPPFLAGS=$cf_save_CPPFLAGS
41026			fi
41027		  fi
41028		fi
41029
41030		if test "$cf_have_incdir" = no ; then
41031		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
41032
41033echo "${as_me:-configure}:41033: testing adding $cf_add_incdir to include-path ..." 1>&5
41034
41035		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41036
41037		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41038		  test "$cf_top_incdir" = "$cf_add_incdir" && break
41039		  cf_add_incdir="$cf_top_incdir"
41040		else
41041		  break
41042		fi
41043	  else
41044		break
41045	  fi
41046	done
41047  done
41048fi
41049
41050	elif test -d "$cf_searchpath/../include" ; then
41051
41052if test -n "$cf_searchpath/../include" ; then
41053  for cf_add_incdir in $cf_searchpath/../include
41054  do
41055	while test "$cf_add_incdir" != /usr/include
41056	do
41057	  if test -d "$cf_add_incdir"
41058	  then
41059		cf_have_incdir=no
41060		if test -n "$CFLAGS$CPPFLAGS" ; then
41061		  # a loop is needed to ensure we can add subdirs of existing dirs
41062		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
41063			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
41064			  cf_have_incdir=yes; break
41065			fi
41066		  done
41067		fi
41068
41069		if test "$cf_have_incdir" = no ; then
41070		  if test "$cf_add_incdir" = /usr/local/include ; then
41071			if test "$GCC" = yes
41072			then
41073			  cf_save_CPPFLAGS=$CPPFLAGS
41074
41075	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41076	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
41077
41078			  cat >"conftest.$ac_ext" <<_ACEOF
41079#line 41079 "configure"
41080#include "confdefs.h"
41081#include <stdio.h>
41082int
41083main (void)
41084{
41085printf("Hello")
41086  ;
41087  return 0;
41088}
41089_ACEOF
41090rm -f "conftest.$ac_objext"
41091if { (eval echo "$as_me:41091: \"$ac_compile\"") >&5
41092  (eval $ac_compile) 2>&5
41093  ac_status=$?
41094  echo "$as_me:41094: \$? = $ac_status" >&5
41095  (exit "$ac_status"); } &&
41096         { ac_try='test -s "conftest.$ac_objext"'
41097  { (eval echo "$as_me:41097: \"$ac_try\"") >&5
41098  (eval $ac_try) 2>&5
41099  ac_status=$?
41100  echo "$as_me:41100: \$? = $ac_status" >&5
41101  (exit "$ac_status"); }; }; then
41102  :
41103else
41104  echo "$as_me: failed program was:" >&5
41105cat "conftest.$ac_ext" >&5
41106cf_have_incdir=yes
41107fi
41108rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41109			  CPPFLAGS=$cf_save_CPPFLAGS
41110			fi
41111		  fi
41112		fi
41113
41114		if test "$cf_have_incdir" = no ; then
41115		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
41116
41117echo "${as_me:-configure}:41117: testing adding $cf_add_incdir to include-path ..." 1>&5
41118
41119		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41120
41121		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41122		  test "$cf_top_incdir" = "$cf_add_incdir" && break
41123		  cf_add_incdir="$cf_top_incdir"
41124		else
41125		  break
41126		fi
41127	  else
41128		break
41129	  fi
41130	done
41131  done
41132fi
41133
41134	else
41135{ { echo "$as_me:41135: error: cannot find  under $use_zlib" >&5
41136echo "$as_me: error: cannot find  under $use_zlib" >&2;}
41137   { (exit 1); exit 1; }; }
41138	fi
41139	if test -d "$cf_searchpath/lib" ; then
41140
41141if test -n "$cf_searchpath/lib" ; then
41142	for cf_add_libdir in $cf_searchpath/lib
41143	do
41144		if test "$cf_add_libdir" = /usr/lib ; then
41145			:
41146		elif test -d "$cf_add_libdir"
41147		then
41148			cf_have_libdir=no
41149			if test -n "$LDFLAGS$LIBS" ; then
41150				# a loop is needed to ensure we can add subdirs of existing dirs
41151				for cf_test_libdir in $LDFLAGS $LIBS ; do
41152					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41153						cf_have_libdir=yes; break
41154					fi
41155				done
41156			fi
41157			if test "$cf_have_libdir" = no ; then
41158				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
41159
41160echo "${as_me:-configure}:41160: testing adding $cf_add_libdir to library-path ..." 1>&5
41161
41162				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41163			fi
41164		fi
41165	done
41166fi
41167
41168	elif test -d "$cf_searchpath" ; then
41169
41170if test -n "$cf_searchpath" ; then
41171	for cf_add_libdir in $cf_searchpath
41172	do
41173		if test "$cf_add_libdir" = /usr/lib ; then
41174			:
41175		elif test -d "$cf_add_libdir"
41176		then
41177			cf_have_libdir=no
41178			if test -n "$LDFLAGS$LIBS" ; then
41179				# a loop is needed to ensure we can add subdirs of existing dirs
41180				for cf_test_libdir in $LDFLAGS $LIBS ; do
41181					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41182						cf_have_libdir=yes; break
41183					fi
41184				done
41185			fi
41186			if test "$cf_have_libdir" = no ; then
41187				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
41188
41189echo "${as_me:-configure}:41189: testing adding $cf_add_libdir to library-path ..." 1>&5
41190
41191				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41192			fi
41193		fi
41194	done
41195fi
41196
41197	else
41198{ { echo "$as_me:41198: error: cannot find  under $use_zlib" >&5
41199echo "$as_me: error: cannot find  under $use_zlib" >&2;}
41200   { (exit 1); exit 1; }; }
41201	fi
41202done
41203
41204	;;
41205esac
41206
41207# If the linkage is not already in the $CPPFLAGS/$LDFLAGS configuration, these
41208# will be set on completion of the AC_TRY_LINK below.
41209cf_cv_header_path_z=
41210cf_cv_library_path_z=
41211
41212echo "${as_me:-configure}:41212: testing Starting FIND_LINKAGE(z,zlib) ..." 1>&5
41213
41214cf_save_LIBS="$LIBS"
41215
41216cat >"conftest.$ac_ext" <<_ACEOF
41217#line 41217 "configure"
41218#include "confdefs.h"
41219
41220#include <zlib.h>
41221
41222int
41223main (void)
41224{
41225
41226	gzopen("name","mode")
41227
41228  ;
41229  return 0;
41230}
41231_ACEOF
41232rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41233if { (eval echo "$as_me:41233: \"$ac_link\"") >&5
41234  (eval $ac_link) 2>&5
41235  ac_status=$?
41236  echo "$as_me:41236: \$? = $ac_status" >&5
41237  (exit "$ac_status"); } &&
41238         { ac_try='test -s "conftest$ac_exeext"'
41239  { (eval echo "$as_me:41239: \"$ac_try\"") >&5
41240  (eval $ac_try) 2>&5
41241  ac_status=$?
41242  echo "$as_me:41242: \$? = $ac_status" >&5
41243  (exit "$ac_status"); }; }; then
41244
41245	cf_cv_find_linkage_z=yes
41246	cf_cv_header_path_z=/usr/include
41247	cf_cv_library_path_z=/usr/lib
41248
41249else
41250  echo "$as_me: failed program was:" >&5
41251cat "conftest.$ac_ext" >&5
41252
41253LIBS="-lz  $cf_save_LIBS"
41254
41255cat >"conftest.$ac_ext" <<_ACEOF
41256#line 41256 "configure"
41257#include "confdefs.h"
41258
41259#include <zlib.h>
41260
41261int
41262main (void)
41263{
41264
41265	gzopen("name","mode")
41266
41267  ;
41268  return 0;
41269}
41270_ACEOF
41271rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41272if { (eval echo "$as_me:41272: \"$ac_link\"") >&5
41273  (eval $ac_link) 2>&5
41274  ac_status=$?
41275  echo "$as_me:41275: \$? = $ac_status" >&5
41276  (exit "$ac_status"); } &&
41277         { ac_try='test -s "conftest$ac_exeext"'
41278  { (eval echo "$as_me:41278: \"$ac_try\"") >&5
41279  (eval $ac_try) 2>&5
41280  ac_status=$?
41281  echo "$as_me:41281: \$? = $ac_status" >&5
41282  (exit "$ac_status"); }; }; then
41283
41284	cf_cv_find_linkage_z=yes
41285	cf_cv_header_path_z=/usr/include
41286	cf_cv_library_path_z=/usr/lib
41287	cf_cv_library_file_z="-lz"
41288
41289else
41290  echo "$as_me: failed program was:" >&5
41291cat "conftest.$ac_ext" >&5
41292
41293	cf_cv_find_linkage_z=no
41294	LIBS="$cf_save_LIBS"
41295
41296	test -n "$verbose" && echo "	find linkage for z library" 1>&6
41297
41298echo "${as_me:-configure}:41298: testing find linkage for z library ..." 1>&5
41299
41300echo "${as_me:-configure}:41300: testing Searching for headers in FIND_LINKAGE(z,zlib) ..." 1>&5
41301
41302	cf_save_CPPFLAGS="$CPPFLAGS"
41303	cf_test_CPPFLAGS="$CPPFLAGS"
41304
41305cf_search=
41306
41307# collect the current set of include-directories from compiler flags
41308cf_header_path_list=""
41309if test -n "${CFLAGS}${CPPFLAGS}" ; then
41310	for cf_header_path in $CPPFLAGS $CFLAGS
41311	do
41312		case "$cf_header_path" in
41313		(-I*)
41314			cf_header_path=`echo ".$cf_header_path" |sed -e 's/^...//' -e 's,/include$,,'`
41315
41316test "x$cf_header_path" != "xNONE" && \
41317test -d "$cf_header_path" && \
41318 {
41319	test -n "$verbose" && echo "	... testing for include-directories under $cf_header_path"
41320	test -d "$cf_header_path/include" &&          cf_search="$cf_search $cf_header_path/include"
41321	test -d "$cf_header_path/include/zlib" &&       cf_search="$cf_search $cf_header_path/include/zlib"
41322	test -d "$cf_header_path/include/zlib/include" &&    cf_search="$cf_search $cf_header_path/include/zlib/include"
41323	test -d "$cf_header_path/zlib/include" &&       cf_search="$cf_search $cf_header_path/zlib/include"
41324	test -d "$cf_header_path/zlib/include/zlib" &&    cf_search="$cf_search $cf_header_path/zlib/include/zlib"
41325}
41326
41327			cf_header_path_list="$cf_header_path_list $cf_search"
41328			;;
41329		esac
41330	done
41331fi
41332
41333# add the variations for the package we are looking for
41334
41335cf_search=
41336
41337test "x$prefix" != "xNONE" && \
41338test -d "$prefix" && \
41339 {
41340	test -n "$verbose" && echo "	... testing for include-directories under $prefix"
41341	test -d "$prefix/include" &&          cf_search="$cf_search $prefix/include"
41342	test -d "$prefix/include/zlib" &&       cf_search="$cf_search $prefix/include/zlib"
41343	test -d "$prefix/include/zlib/include" &&    cf_search="$cf_search $prefix/include/zlib/include"
41344	test -d "$prefix/zlib/include" &&       cf_search="$cf_search $prefix/zlib/include"
41345	test -d "$prefix/zlib/include/zlib" &&    cf_search="$cf_search $prefix/zlib/include/zlib"
41346}
41347
41348for cf_subdir_prefix in \
41349	/usr \
41350	/usr/local \
41351	/usr/pkg \
41352	/opt \
41353	/opt/local \
41354	$HOME
41355do
41356
41357test "x$cf_subdir_prefix" != "x$prefix" && \
41358test -d "$cf_subdir_prefix" && \
41359{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
41360	test -n "$verbose" && echo "	... testing for include-directories under $cf_subdir_prefix"
41361	test -d "$cf_subdir_prefix/include" &&          cf_search="$cf_search $cf_subdir_prefix/include"
41362	test -d "$cf_subdir_prefix/include/zlib" &&       cf_search="$cf_search $cf_subdir_prefix/include/zlib"
41363	test -d "$cf_subdir_prefix/include/zlib/include" &&    cf_search="$cf_search $cf_subdir_prefix/include/zlib/include"
41364	test -d "$cf_subdir_prefix/zlib/include" &&       cf_search="$cf_search $cf_subdir_prefix/zlib/include"
41365	test -d "$cf_subdir_prefix/zlib/include/zlib" &&    cf_search="$cf_search $cf_subdir_prefix/zlib/include/zlib"
41366}
41367
41368done
41369
41370test "$includedir" != NONE && \
41371test "$includedir" != "/usr/include" && \
41372test -d "$includedir" && {
41373	test -d "$includedir" &&    cf_search="$cf_search $includedir"
41374	test -d "$includedir/zlib" && cf_search="$cf_search $includedir/zlib"
41375}
41376
41377test "$oldincludedir" != NONE && \
41378test "$oldincludedir" != "/usr/include" && \
41379test -d "$oldincludedir" && {
41380	test -d "$oldincludedir"    && cf_search="$cf_search $oldincludedir"
41381	test -d "$oldincludedir/zlib" && cf_search="$cf_search $oldincludedir/zlib"
41382}
41383
41384cf_search="$cf_search $cf_header_path_list"
41385
41386	for cf_cv_header_path_z in $cf_search
41387	do
41388		if test -d "$cf_cv_header_path_z" ; then
41389			test -n "$verbose" && echo "	... testing $cf_cv_header_path_z" 1>&6
41390
41391echo "${as_me:-configure}:41391: testing ... testing $cf_cv_header_path_z ..." 1>&5
41392
41393			CPPFLAGS="$cf_save_CPPFLAGS"
41394
41395	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41396	CPPFLAGS="${CPPFLAGS}-I$cf_cv_header_path_z"
41397
41398			cat >"conftest.$ac_ext" <<_ACEOF
41399#line 41399 "configure"
41400#include "confdefs.h"
41401
41402#include <zlib.h>
41403
41404int
41405main (void)
41406{
41407
41408	gzopen("name","mode")
41409
41410  ;
41411  return 0;
41412}
41413_ACEOF
41414rm -f "conftest.$ac_objext"
41415if { (eval echo "$as_me:41415: \"$ac_compile\"") >&5
41416  (eval $ac_compile) 2>&5
41417  ac_status=$?
41418  echo "$as_me:41418: \$? = $ac_status" >&5
41419  (exit "$ac_status"); } &&
41420         { ac_try='test -s "conftest.$ac_objext"'
41421  { (eval echo "$as_me:41421: \"$ac_try\"") >&5
41422  (eval $ac_try) 2>&5
41423  ac_status=$?
41424  echo "$as_me:41424: \$? = $ac_status" >&5
41425  (exit "$ac_status"); }; }; then
41426
41427				test -n "$verbose" && echo "	... found z headers in $cf_cv_header_path_z" 1>&6
41428
41429echo "${as_me:-configure}:41429: testing ... found z headers in $cf_cv_header_path_z ..." 1>&5
41430
41431				cf_cv_find_linkage_z=maybe
41432				cf_test_CPPFLAGS="$CPPFLAGS"
41433				break
41434else
41435  echo "$as_me: failed program was:" >&5
41436cat "conftest.$ac_ext" >&5
41437
41438				CPPFLAGS="$cf_save_CPPFLAGS"
41439
41440fi
41441rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41442		fi
41443	done
41444
41445	if test "$cf_cv_find_linkage_z" = maybe ; then
41446
41447echo "${as_me:-configure}:41447: testing Searching for z library in FIND_LINKAGE(z,zlib) ..." 1>&5
41448
41449		cf_save_LIBS="$LIBS"
41450		cf_save_LDFLAGS="$LDFLAGS"
41451
41452		CPPFLAGS="$cf_test_CPPFLAGS"
41453		LIBS="-lz  $cf_save_LIBS"
41454		cat >"conftest.$ac_ext" <<_ACEOF
41455#line 41455 "configure"
41456#include "confdefs.h"
41457
41458#include <zlib.h>
41459
41460int
41461main (void)
41462{
41463
41464	gzopen("name","mode")
41465
41466  ;
41467  return 0;
41468}
41469_ACEOF
41470rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41471if { (eval echo "$as_me:41471: \"$ac_link\"") >&5
41472  (eval $ac_link) 2>&5
41473  ac_status=$?
41474  echo "$as_me:41474: \$? = $ac_status" >&5
41475  (exit "$ac_status"); } &&
41476         { ac_try='test -s "conftest$ac_exeext"'
41477  { (eval echo "$as_me:41477: \"$ac_try\"") >&5
41478  (eval $ac_try) 2>&5
41479  ac_status=$?
41480  echo "$as_me:41480: \$? = $ac_status" >&5
41481  (exit "$ac_status"); }; }; then
41482
41483			test -n "$verbose" && echo "	... found z library in system" 1>&6
41484
41485echo "${as_me:-configure}:41485: testing ... found z library in system ..." 1>&5
41486
41487			cf_cv_find_linkage_z=yes
41488else
41489  echo "$as_me: failed program was:" >&5
41490cat "conftest.$ac_ext" >&5
41491fi
41492rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41493			CPPFLAGS="$cf_save_CPPFLAGS"
41494			LIBS="$cf_save_LIBS"
41495
41496		if test "$cf_cv_find_linkage_z" != yes ; then
41497
41498cf_search=
41499cf_library_path_list=""
41500if test -n "${LDFLAGS}${LIBS}" ; then
41501	for cf_library_path in $LDFLAGS $LIBS
41502	do
41503		case "$cf_library_path" in
41504		(-L*)
41505			cf_library_path=`echo ".$cf_library_path" |sed -e 's/^...//' -e 's,/lib$,,'`
41506
41507test "x$cf_library_path" != "xNONE" && \
41508test -d "$cf_library_path" && \
41509 {
41510	test -n "$verbose" && echo "	... testing for lib-directories under $cf_library_path"
41511	test -d "$cf_library_path/lib" &&          cf_search="$cf_search $cf_library_path/lib"
41512	test -d "$cf_library_path/lib/z" &&       cf_search="$cf_search $cf_library_path/lib/z"
41513	test -d "$cf_library_path/lib/z/lib" &&    cf_search="$cf_search $cf_library_path/lib/z/lib"
41514	test -d "$cf_library_path/z/lib" &&       cf_search="$cf_search $cf_library_path/z/lib"
41515	test -d "$cf_library_path/z/lib/z" &&    cf_search="$cf_search $cf_library_path/z/lib/z"
41516}
41517
41518			cf_library_path_list="$cf_library_path_list $cf_search"
41519			;;
41520		esac
41521	done
41522fi
41523
41524cf_search=
41525
41526test "x$prefix" != "xNONE" && \
41527test -d "$prefix" && \
41528 {
41529	test -n "$verbose" && echo "	... testing for lib-directories under $prefix"
41530	test -d "$prefix/lib" &&          cf_search="$cf_search $prefix/lib"
41531	test -d "$prefix/lib/z" &&       cf_search="$cf_search $prefix/lib/z"
41532	test -d "$prefix/lib/z/lib" &&    cf_search="$cf_search $prefix/lib/z/lib"
41533	test -d "$prefix/z/lib" &&       cf_search="$cf_search $prefix/z/lib"
41534	test -d "$prefix/z/lib/z" &&    cf_search="$cf_search $prefix/z/lib/z"
41535}
41536
41537for cf_subdir_prefix in \
41538	/usr \
41539	/usr/local \
41540	/usr/pkg \
41541	/opt \
41542	/opt/local \
41543	$HOME
41544do
41545
41546test "x$cf_subdir_prefix" != "x$prefix" && \
41547test -d "$cf_subdir_prefix" && \
41548{ test -z "$prefix" || test "x$prefix" = xNONE || test "x$cf_subdir_prefix" != "x$prefix"; } && {
41549	test -n "$verbose" && echo "	... testing for lib-directories under $cf_subdir_prefix"
41550	test -d "$cf_subdir_prefix/lib" &&          cf_search="$cf_search $cf_subdir_prefix/lib"
41551	test -d "$cf_subdir_prefix/lib/z" &&       cf_search="$cf_search $cf_subdir_prefix/lib/z"
41552	test -d "$cf_subdir_prefix/lib/z/lib" &&    cf_search="$cf_search $cf_subdir_prefix/lib/z/lib"
41553	test -d "$cf_subdir_prefix/z/lib" &&       cf_search="$cf_search $cf_subdir_prefix/z/lib"
41554	test -d "$cf_subdir_prefix/z/lib/z" &&    cf_search="$cf_search $cf_subdir_prefix/z/lib/z"
41555}
41556
41557done
41558
41559cf_search="$cf_library_path_list $cf_search"
41560
41561			for cf_cv_library_path_z in $cf_search
41562			do
41563				if test -d "$cf_cv_library_path_z" ; then
41564					test -n "$verbose" && echo "	... testing $cf_cv_library_path_z" 1>&6
41565
41566echo "${as_me:-configure}:41566: testing ... testing $cf_cv_library_path_z ..." 1>&5
41567
41568					CPPFLAGS="$cf_test_CPPFLAGS"
41569					LIBS="-lz  $cf_save_LIBS"
41570					LDFLAGS="$cf_save_LDFLAGS -L$cf_cv_library_path_z"
41571					cat >"conftest.$ac_ext" <<_ACEOF
41572#line 41572 "configure"
41573#include "confdefs.h"
41574
41575#include <zlib.h>
41576
41577int
41578main (void)
41579{
41580
41581	gzopen("name","mode")
41582
41583  ;
41584  return 0;
41585}
41586_ACEOF
41587rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41588if { (eval echo "$as_me:41588: \"$ac_link\"") >&5
41589  (eval $ac_link) 2>&5
41590  ac_status=$?
41591  echo "$as_me:41591: \$? = $ac_status" >&5
41592  (exit "$ac_status"); } &&
41593         { ac_try='test -s "conftest$ac_exeext"'
41594  { (eval echo "$as_me:41594: \"$ac_try\"") >&5
41595  (eval $ac_try) 2>&5
41596  ac_status=$?
41597  echo "$as_me:41597: \$? = $ac_status" >&5
41598  (exit "$ac_status"); }; }; then
41599
41600					test -n "$verbose" && echo "	... found z library in $cf_cv_library_path_z" 1>&6
41601
41602echo "${as_me:-configure}:41602: testing ... found z library in $cf_cv_library_path_z ..." 1>&5
41603
41604					cf_cv_find_linkage_z=yes
41605					cf_cv_library_file_z="-lz"
41606					break
41607else
41608  echo "$as_me: failed program was:" >&5
41609cat "conftest.$ac_ext" >&5
41610
41611					CPPFLAGS="$cf_save_CPPFLAGS"
41612					LIBS="$cf_save_LIBS"
41613					LDFLAGS="$cf_save_LDFLAGS"
41614
41615fi
41616rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41617				fi
41618			done
41619			CPPFLAGS="$cf_save_CPPFLAGS"
41620			LDFLAGS="$cf_save_LDFLAGS"
41621		fi
41622
41623	else
41624		cf_cv_find_linkage_z=no
41625	fi
41626
41627fi
41628rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41629
41630fi
41631rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41632
41633LIBS="$cf_save_LIBS"
41634
41635if test "$cf_cv_find_linkage_z" = yes ; then
41636
41637if test -n "$cf_cv_header_path_z" ; then
41638  for cf_add_incdir in $cf_cv_header_path_z
41639  do
41640	while test "$cf_add_incdir" != /usr/include
41641	do
41642	  if test -d "$cf_add_incdir"
41643	  then
41644		cf_have_incdir=no
41645		if test -n "$CFLAGS$CPPFLAGS" ; then
41646		  # a loop is needed to ensure we can add subdirs of existing dirs
41647		  for cf_test_incdir in $CFLAGS $CPPFLAGS ; do
41648			if test ".$cf_test_incdir" = ".-I$cf_add_incdir" ; then
41649			  cf_have_incdir=yes; break
41650			fi
41651		  done
41652		fi
41653
41654		if test "$cf_have_incdir" = no ; then
41655		  if test "$cf_add_incdir" = /usr/local/include ; then
41656			if test "$GCC" = yes
41657			then
41658			  cf_save_CPPFLAGS=$CPPFLAGS
41659
41660	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
41661	CPPFLAGS="${CPPFLAGS}-I$cf_add_incdir"
41662
41663			  cat >"conftest.$ac_ext" <<_ACEOF
41664#line 41664 "configure"
41665#include "confdefs.h"
41666#include <stdio.h>
41667int
41668main (void)
41669{
41670printf("Hello")
41671  ;
41672  return 0;
41673}
41674_ACEOF
41675rm -f "conftest.$ac_objext"
41676if { (eval echo "$as_me:41676: \"$ac_compile\"") >&5
41677  (eval $ac_compile) 2>&5
41678  ac_status=$?
41679  echo "$as_me:41679: \$? = $ac_status" >&5
41680  (exit "$ac_status"); } &&
41681         { ac_try='test -s "conftest.$ac_objext"'
41682  { (eval echo "$as_me:41682: \"$ac_try\"") >&5
41683  (eval $ac_try) 2>&5
41684  ac_status=$?
41685  echo "$as_me:41685: \$? = $ac_status" >&5
41686  (exit "$ac_status"); }; }; then
41687  :
41688else
41689  echo "$as_me: failed program was:" >&5
41690cat "conftest.$ac_ext" >&5
41691cf_have_incdir=yes
41692fi
41693rm -f "conftest.$ac_objext" "conftest.$ac_ext"
41694			  CPPFLAGS=$cf_save_CPPFLAGS
41695			fi
41696		  fi
41697		fi
41698
41699		if test "$cf_have_incdir" = no ; then
41700		  test -n "$verbose" && echo "	adding $cf_add_incdir to include-path" 1>&6
41701
41702echo "${as_me:-configure}:41702: testing adding $cf_add_incdir to include-path ..." 1>&5
41703
41704		  CPPFLAGS="$CPPFLAGS -I$cf_add_incdir"
41705
41706		  cf_top_incdir=`echo "$cf_add_incdir" | sed -e 's%/include/.*$%/include%'`
41707		  test "$cf_top_incdir" = "$cf_add_incdir" && break
41708		  cf_add_incdir="$cf_top_incdir"
41709		else
41710		  break
41711		fi
41712	  else
41713		break
41714	  fi
41715	done
41716  done
41717fi
41718
41719if test -n "$cf_cv_library_path_z" ; then
41720	for cf_add_libdir in $cf_cv_library_path_z
41721	do
41722		if test "$cf_add_libdir" = /usr/lib ; then
41723			:
41724		elif test -d "$cf_add_libdir"
41725		then
41726			cf_have_libdir=no
41727			if test -n "$LDFLAGS$LIBS" ; then
41728				# a loop is needed to ensure we can add subdirs of existing dirs
41729				for cf_test_libdir in $LDFLAGS $LIBS ; do
41730					if test ".$cf_test_libdir" = ".-L$cf_add_libdir" ; then
41731						cf_have_libdir=yes; break
41732					fi
41733				done
41734			fi
41735			if test "$cf_have_libdir" = no ; then
41736				test -n "$verbose" && echo "	adding $cf_add_libdir to library-path" 1>&6
41737
41738echo "${as_me:-configure}:41738: testing adding $cf_add_libdir to library-path ..." 1>&5
41739
41740				LDFLAGS="-L$cf_add_libdir $LDFLAGS"
41741			fi
41742		fi
41743	done
41744fi
41745
41746cf_add_libs="$LIBS"
41747# reverse order
41748cf_add_0lib=
41749for cf_add_1lib in -lz; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
41750# filter duplicates
41751for cf_add_1lib in $cf_add_0lib; do
41752	for cf_add_2lib in $cf_add_libs; do
41753		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
41754			cf_add_1lib=
41755			break
41756		fi
41757	done
41758	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
41759done
41760LIBS="$cf_add_libs"
41761
41762else
41763{ echo "$as_me:41763: WARNING: Cannot find z library" >&5
41764echo "$as_me: WARNING: Cannot find z library" >&2;}
41765fi
41766
41767for ac_func in \
41768	zError \
41769
41770do
41771as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
41772echo "$as_me:41772: checking for $ac_func" >&5
41773echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
41774if eval "test \"\${$as_ac_var+set}\" = set"; then
41775  echo $ECHO_N "(cached) $ECHO_C" >&6
41776else
41777  cat >"conftest.$ac_ext" <<_ACEOF
41778#line 41778 "configure"
41779#include "confdefs.h"
41780#define $ac_func autoconf_temporary
41781#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
41782#undef $ac_func
41783
41784#ifdef __cplusplus
41785extern "C"
41786#endif
41787
41788/* We use char because int might match the return type of a gcc2
41789   builtin and then its argument prototype would still apply.  */
41790char $ac_func (void);
41791
41792int
41793main (void)
41794{
41795
41796/* The GNU C library defines stubs for functions which it implements
41797    to always fail with ENOSYS.  Some functions are actually named
41798    something starting with __ and the normal name is an alias.  */
41799#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
41800#error found stub for $ac_func
41801#endif
41802
41803	return $ac_func ();
41804  ;
41805  return 0;
41806}
41807_ACEOF
41808rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41809if { (eval echo "$as_me:41809: \"$ac_link\"") >&5
41810  (eval $ac_link) 2>&5
41811  ac_status=$?
41812  echo "$as_me:41812: \$? = $ac_status" >&5
41813  (exit "$ac_status"); } &&
41814         { ac_try='test -s "conftest$ac_exeext"'
41815  { (eval echo "$as_me:41815: \"$ac_try\"") >&5
41816  (eval $ac_try) 2>&5
41817  ac_status=$?
41818  echo "$as_me:41818: \$? = $ac_status" >&5
41819  (exit "$ac_status"); }; }; then
41820  eval "$as_ac_var=yes"
41821else
41822  echo "$as_me: failed program was:" >&5
41823cat "conftest.$ac_ext" >&5
41824eval "$as_ac_var=no"
41825fi
41826rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
41827fi
41828echo "$as_me:41828: result: `eval echo '${'"$as_ac_var"'}'`" >&5
41829echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
41830if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
41831  cat >>confdefs.h <<EOF
41832#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
41833EOF
41834
41835fi
41836done
41837
41838	test "x$cf_cv_find_linkage_z" = "xyes" &&
41839cat >>confdefs.h <<\EOF
41840#define USE_ZLIB 1
41841EOF
41842
41843fi
41844
41845echo "$as_me:41845: checking if you want to exclude FINGER code" >&5
41846echo $ECHO_N "checking if you want to exclude FINGER code... $ECHO_C" >&6
41847
41848# Check whether --enable-finger or --disable-finger was given.
41849if test "${enable_finger+set}" = set; then
41850  enableval="$enable_finger"
41851  test "$enableval" != no && enableval=yes
41852	if test "$enableval" != "yes" ; then
41853    use_finger=yes
41854	else
41855		use_finger=no
41856	fi
41857else
41858  enableval=yes
41859	use_finger=no
41860
41861fi;
41862echo "$as_me:41862: result: $use_finger" >&5
41863echo "${ECHO_T}$use_finger" >&6
41864test "$use_finger" != "no" &&
41865cat >>confdefs.h <<\EOF
41866#define DISABLE_FINGER 1
41867EOF
41868
41869echo "$as_me:41869: checking if you want to exclude GOPHER code" >&5
41870echo $ECHO_N "checking if you want to exclude GOPHER code... $ECHO_C" >&6
41871
41872# Check whether --enable-gopher or --disable-gopher was given.
41873if test "${enable_gopher+set}" = set; then
41874  enableval="$enable_gopher"
41875  test "$enableval" != no && enableval=yes
41876	if test "$enableval" != "yes" ; then
41877    use_gopher=yes
41878	else
41879		use_gopher=no
41880	fi
41881else
41882  enableval=yes
41883	use_gopher=no
41884
41885fi;
41886echo "$as_me:41886: result: $use_gopher" >&5
41887echo "${ECHO_T}$use_gopher" >&6
41888test "$use_gopher" != "no" &&
41889cat >>confdefs.h <<\EOF
41890#define DISABLE_GOPHER 1
41891EOF
41892
41893echo "$as_me:41893: checking if you want to exclude NEWS code" >&5
41894echo $ECHO_N "checking if you want to exclude NEWS code... $ECHO_C" >&6
41895
41896# Check whether --enable-news or --disable-news was given.
41897if test "${enable_news+set}" = set; then
41898  enableval="$enable_news"
41899  test "$enableval" != no && enableval=yes
41900	if test "$enableval" != "yes" ; then
41901    use_news=yes
41902	else
41903		use_news=no
41904	fi
41905else
41906  enableval=yes
41907	use_news=no
41908
41909fi;
41910echo "$as_me:41910: result: $use_news" >&5
41911echo "${ECHO_T}$use_news" >&6
41912test "$use_news" != "no" &&
41913cat >>confdefs.h <<\EOF
41914#define DISABLE_NEWS 1
41915EOF
41916
41917echo "$as_me:41917: checking if you want to exclude FTP code" >&5
41918echo $ECHO_N "checking if you want to exclude FTP code... $ECHO_C" >&6
41919
41920# Check whether --enable-ftp or --disable-ftp was given.
41921if test "${enable_ftp+set}" = set; then
41922  enableval="$enable_ftp"
41923  test "$enableval" != no && enableval=yes
41924	if test "$enableval" != "yes" ; then
41925    use_ftp=yes
41926	else
41927		use_ftp=no
41928	fi
41929else
41930  enableval=yes
41931	use_ftp=no
41932
41933fi;
41934echo "$as_me:41934: result: $use_ftp" >&5
41935echo "${ECHO_T}$use_ftp" >&6
41936test "$use_ftp" != "no" &&
41937cat >>confdefs.h <<\EOF
41938#define DISABLE_FTP 1
41939EOF
41940
41941echo "$as_me:41941: checking if you want to include WAIS code" >&5
41942echo $ECHO_N "checking if you want to include WAIS code... $ECHO_C" >&6
41943
41944# Check whether --enable-wais or --disable-wais was given.
41945if test "${enable_wais+set}" = set; then
41946  enableval="$enable_wais"
41947  test "$enableval" != yes && enableval=no
41948	if test "$enableval" != "no" ; then
41949    use_wais=yes
41950	else
41951		use_wais=no
41952	fi
41953else
41954  enableval=no
41955	use_wais=no
41956
41957fi;
41958echo "$as_me:41958: result: $use_wais" >&5
41959echo "${ECHO_T}$use_wais" >&6
41960
41961MAKE_WAIS="#"
41962if test "$use_wais" != "no"
41963then
41964	echo "$as_me:41964: checking for fs_free in -lwais" >&5
41965echo $ECHO_N "checking for fs_free in -lwais... $ECHO_C" >&6
41966if test "${ac_cv_lib_wais_fs_free+set}" = set; then
41967  echo $ECHO_N "(cached) $ECHO_C" >&6
41968else
41969  ac_check_lib_save_LIBS=$LIBS
41970LIBS="-lwais  $LIBS"
41971cat >"conftest.$ac_ext" <<_ACEOF
41972#line 41972 "configure"
41973#include "confdefs.h"
41974
41975/* Override any gcc2 internal prototype to avoid an error.  */
41976#ifdef __cplusplus
41977extern "C"
41978#endif
41979/* We use char because int might match the return type of a gcc2
41980   builtin and then its argument prototype would still apply.  */
41981char fs_free ();
41982int
41983main (void)
41984{
41985fs_free ();
41986  ;
41987  return 0;
41988}
41989_ACEOF
41990rm -f "conftest.$ac_objext" "conftest$ac_exeext"
41991if { (eval echo "$as_me:41991: \"$ac_link\"") >&5
41992  (eval $ac_link) 2>&5
41993  ac_status=$?
41994  echo "$as_me:41994: \$? = $ac_status" >&5
41995  (exit "$ac_status"); } &&
41996         { ac_try='test -s "conftest$ac_exeext"'
41997  { (eval echo "$as_me:41997: \"$ac_try\"") >&5
41998  (eval $ac_try) 2>&5
41999  ac_status=$?
42000  echo "$as_me:42000: \$? = $ac_status" >&5
42001  (exit "$ac_status"); }; }; then
42002  ac_cv_lib_wais_fs_free=yes
42003else
42004  echo "$as_me: failed program was:" >&5
42005cat "conftest.$ac_ext" >&5
42006ac_cv_lib_wais_fs_free=no
42007fi
42008rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42009LIBS=$ac_check_lib_save_LIBS
42010fi
42011echo "$as_me:42011: result: $ac_cv_lib_wais_fs_free" >&5
42012echo "${ECHO_T}$ac_cv_lib_wais_fs_free" >&6
42013if test "$ac_cv_lib_wais_fs_free" = yes; then
42014
42015echo "$as_me:42015: checking if -lm needed for math functions" >&5
42016echo $ECHO_N "checking if -lm needed for math functions... $ECHO_C" >&6
42017if test "${cf_cv_need_libm+set}" = set; then
42018  echo $ECHO_N "(cached) $ECHO_C" >&6
42019else
42020
42021	cat >"conftest.$ac_ext" <<_ACEOF
42022#line 42022 "configure"
42023#include "confdefs.h"
42024
42025	#include <stdio.h>
42026	#include <stdlib.h>
42027	#include <math.h>
42028
42029int
42030main (void)
42031{
42032double x = rand(); printf("result = %g\\n", sin(x))
42033  ;
42034  return 0;
42035}
42036_ACEOF
42037rm -f "conftest.$ac_objext" "conftest$ac_exeext"
42038if { (eval echo "$as_me:42038: \"$ac_link\"") >&5
42039  (eval $ac_link) 2>&5
42040  ac_status=$?
42041  echo "$as_me:42041: \$? = $ac_status" >&5
42042  (exit "$ac_status"); } &&
42043         { ac_try='test -s "conftest$ac_exeext"'
42044  { (eval echo "$as_me:42044: \"$ac_try\"") >&5
42045  (eval $ac_try) 2>&5
42046  ac_status=$?
42047  echo "$as_me:42047: \$? = $ac_status" >&5
42048  (exit "$ac_status"); }; }; then
42049  cf_cv_need_libm=no
42050else
42051  echo "$as_me: failed program was:" >&5
42052cat "conftest.$ac_ext" >&5
42053cf_cv_need_libm=yes
42054fi
42055rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
42056fi
42057echo "$as_me:42057: result: $cf_cv_need_libm" >&5
42058echo "${ECHO_T}$cf_cv_need_libm" >&6
42059if test "$cf_cv_need_libm" = yes
42060then
42061
42062cf_add_libs="$LIBS"
42063# reverse order
42064cf_add_0lib=
42065for cf_add_1lib in -lm; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
42066# filter duplicates
42067for cf_add_1lib in $cf_add_0lib; do
42068	for cf_add_2lib in $cf_add_libs; do
42069		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
42070			cf_add_1lib=
42071			break
42072		fi
42073	done
42074	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
42075done
42076LIBS="$cf_add_libs"
42077
42078fi
42079
42080cf_add_libs="$LIBS"
42081# reverse order
42082cf_add_0lib=
42083for cf_add_1lib in -lwais; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
42084# filter duplicates
42085for cf_add_1lib in $cf_add_0lib; do
42086	for cf_add_2lib in $cf_add_libs; do
42087		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
42088			cf_add_1lib=
42089			break
42090		fi
42091	done
42092	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
42093done
42094LIBS="$cf_add_libs"
42095
42096for ac_header in wais.h
42097do
42098as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
42099echo "$as_me:42099: checking for $ac_header" >&5
42100echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
42101if eval "test \"\${$as_ac_Header+set}\" = set"; then
42102  echo $ECHO_N "(cached) $ECHO_C" >&6
42103else
42104  cat >"conftest.$ac_ext" <<_ACEOF
42105#line 42105 "configure"
42106#include "confdefs.h"
42107#include <$ac_header>
42108_ACEOF
42109if { (eval echo "$as_me:42109: \"$ac_cpp "conftest.$ac_ext"\"") >&5
42110  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
42111  ac_status=$?
42112  $EGREP -v '^ *\+' conftest.er1 >conftest.err
42113  rm -f conftest.er1
42114  cat conftest.err >&5
42115  echo "$as_me:42115: \$? = $ac_status" >&5
42116  (exit "$ac_status"); } >/dev/null; then
42117  if test -s conftest.err; then
42118    ac_cpp_err=$ac_c_preproc_warn_flag
42119  else
42120    ac_cpp_err=
42121  fi
42122else
42123  ac_cpp_err=yes
42124fi
42125if test -z "$ac_cpp_err"; then
42126  eval "$as_ac_Header=yes"
42127else
42128  echo "$as_me: failed program was:" >&5
42129  cat "conftest.$ac_ext" >&5
42130  eval "$as_ac_Header=no"
42131fi
42132rm -f conftest.err "conftest.$ac_ext"
42133fi
42134echo "$as_me:42134: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
42135echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
42136if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
42137  cat >>confdefs.h <<EOF
42138#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
42139EOF
42140
42141fi
42142done
42143
42144		MAKE_WAIS=
42145
42146else
42147  { echo "$as_me:42147: WARNING: could not find WAIS library" >&5
42148echo "$as_me: WARNING: could not find WAIS library" >&2;}
42149fi
42150
42151fi
42152
42153# All DirEd functions that were enabled on compilation can be disabled
42154# or modified at run time via DIRED_MENU symbols in lynx.cfg.
42155echo "$as_me:42155: checking if directory-editor code should be used" >&5
42156echo $ECHO_N "checking if directory-editor code should be used... $ECHO_C" >&6
42157
42158# Check whether --enable-dired or --disable-dired was given.
42159if test "${enable_dired+set}" = set; then
42160  enableval="$enable_dired"
42161  test "$enableval" != no && enableval=yes
42162	if test "$enableval" != "yes" ; then
42163    use_dired=$enableval
42164	else
42165		use_dired=yes
42166	fi
42167else
42168  enableval=yes
42169	use_dired=yes
42170
42171fi;
42172echo "$as_me:42172: result: $use_dired" >&5
42173echo "${ECHO_T}$use_dired" >&6
42174
42175if test ".$use_dired" != ".no" ; then
42176	EXTRA_OBJS="$EXTRA_OBJS LYLocal\$o"
42177
42178cat >>confdefs.h <<\EOF
42179#define DIRED_SUPPORT 1
42180EOF
42181
42182	echo "$as_me:42182: checking if you wish to allow extracting from archives via DirEd" >&5
42183echo $ECHO_N "checking if you wish to allow extracting from archives via DirEd... $ECHO_C" >&6
42184
42185# Check whether --enable-dired-dearchive or --disable-dired-dearchive was given.
42186if test "${enable_dired_dearchive+set}" = set; then
42187  enableval="$enable_dired_dearchive"
42188  test "$enableval" != no && enableval=yes
42189	if test "$enableval" != "yes" ; then
42190
42191cat >>confdefs.h <<\EOF
42192#define ARCHIVE_ONLY 1
42193EOF
42194
42195	fi
42196else
42197  enableval=yes
42198fi;
42199	echo "$as_me:42199: result: $enableval" >&5
42200echo "${ECHO_T}$enableval" >&6
42201
42202	echo "$as_me:42202: checking if DirEd mode should override keys" >&5
42203echo $ECHO_N "checking if DirEd mode should override keys... $ECHO_C" >&6
42204
42205# Check whether --enable-dired-override or --disable-dired-override was given.
42206if test "${enable_dired_override+set}" = set; then
42207  enableval="$enable_dired_override"
42208  test "$enableval" != no && enableval=yes
42209	if test "$enableval" != "yes" ; then
42210    :
42211	else
42212
42213cat >>confdefs.h <<\EOF
42214#define OK_OVERRIDE 1
42215EOF
42216
42217	fi
42218else
42219  enableval=yes
42220
42221cat >>confdefs.h <<\EOF
42222#define OK_OVERRIDE 1
42223EOF
42224
42225fi;
42226	echo "$as_me:42226: result: $enableval" >&5
42227echo "${ECHO_T}$enableval" >&6
42228
42229	echo "$as_me:42229: checking if you wish to allow permissions commands via DirEd" >&5
42230echo $ECHO_N "checking if you wish to allow permissions commands via DirEd... $ECHO_C" >&6
42231
42232# Check whether --enable-dired-permit or --disable-dired-permit was given.
42233if test "${enable_dired_permit+set}" = set; then
42234  enableval="$enable_dired_permit"
42235  test "$enableval" != no && enableval=yes
42236	if test "$enableval" != "yes" ; then
42237    :
42238	else
42239
42240cat >>confdefs.h <<\EOF
42241#define OK_PERMIT 1
42242EOF
42243
42244	fi
42245else
42246  enableval=yes
42247
42248cat >>confdefs.h <<\EOF
42249#define OK_PERMIT 1
42250EOF
42251
42252fi;
42253	echo "$as_me:42253: result: $enableval" >&5
42254echo "${ECHO_T}$enableval" >&6
42255
42256	echo "$as_me:42256: checking if you wish to allow executable-permission commands via DirEd" >&5
42257echo $ECHO_N "checking if you wish to allow executable-permission commands via DirEd... $ECHO_C" >&6
42258
42259# Check whether --enable-dired-xpermit or --disable-dired-xpermit was given.
42260if test "${enable_dired_xpermit+set}" = set; then
42261  enableval="$enable_dired_xpermit"
42262  test "$enableval" != no && enableval=yes
42263	if test "$enableval" != "yes" ; then
42264
42265cat >>confdefs.h <<\EOF
42266#define NO_CHANGE_EXECUTE_PERMS 1
42267EOF
42268
42269	fi
42270else
42271  enableval=yes
42272fi;
42273	echo "$as_me:42273: result: $enableval" >&5
42274echo "${ECHO_T}$enableval" >&6
42275
42276	echo "$as_me:42276: checking if you wish to allow \"tar\" commands from DirEd" >&5
42277echo $ECHO_N "checking if you wish to allow \"tar\" commands from DirEd... $ECHO_C" >&6
42278
42279# Check whether --enable-dired-tar or --disable-dired-tar was given.
42280if test "${enable_dired_tar+set}" = set; then
42281  enableval="$enable_dired_tar"
42282  test "$enableval" != no && enableval=yes
42283	if test "$enableval" != "yes" ; then
42284    :
42285	else
42286
42287cat >>confdefs.h <<\EOF
42288#define OK_TAR 1
42289EOF
42290
42291	fi
42292else
42293  enableval=yes
42294
42295cat >>confdefs.h <<\EOF
42296#define OK_TAR 1
42297EOF
42298
42299fi;
42300	echo "$as_me:42300: result: $enableval" >&5
42301echo "${ECHO_T}$enableval" >&6
42302
42303	echo "$as_me:42303: checking if you wish to allow \"uudecode\" commands from DirEd" >&5
42304echo $ECHO_N "checking if you wish to allow \"uudecode\" commands from DirEd... $ECHO_C" >&6
42305
42306# Check whether --enable-dired-uudecode or --disable-dired-uudecode was given.
42307if test "${enable_dired_uudecode+set}" = set; then
42308  enableval="$enable_dired_uudecode"
42309  test "$enableval" != no && enableval=yes
42310	if test "$enableval" != "yes" ; then
42311    :
42312	else
42313
42314cat >>confdefs.h <<\EOF
42315#define OK_UUDECODE 1
42316EOF
42317
42318	fi
42319else
42320  enableval=yes
42321
42322cat >>confdefs.h <<\EOF
42323#define OK_UUDECODE 1
42324EOF
42325
42326fi;
42327	echo "$as_me:42327: result: $enableval" >&5
42328echo "${ECHO_T}$enableval" >&6
42329
42330	echo "$as_me:42330: checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd" >&5
42331echo $ECHO_N "checking if you wish to allow \"zip\" and \"unzip\" commands from DirEd... $ECHO_C" >&6
42332
42333# Check whether --enable-dired-zip or --disable-dired-zip was given.
42334if test "${enable_dired_zip+set}" = set; then
42335  enableval="$enable_dired_zip"
42336  test "$enableval" != no && enableval=yes
42337	if test "$enableval" != "yes" ; then
42338    :
42339	else
42340
42341cat >>confdefs.h <<\EOF
42342#define OK_ZIP 1
42343EOF
42344
42345	fi
42346else
42347  enableval=yes
42348
42349cat >>confdefs.h <<\EOF
42350#define OK_ZIP 1
42351EOF
42352
42353fi;
42354	echo "$as_me:42354: result: $enableval" >&5
42355echo "${ECHO_T}$enableval" >&6
42356
42357	echo "$as_me:42357: checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd" >&5
42358echo $ECHO_N "checking if you wish to allow \"gzip\" and \"gunzip\" commands from DirEd... $ECHO_C" >&6
42359
42360# Check whether --enable-dired-gzip or --disable-dired-gzip was given.
42361if test "${enable_dired_gzip+set}" = set; then
42362  enableval="$enable_dired_gzip"
42363  test "$enableval" != no && enableval=yes
42364	if test "$enableval" != "yes" ; then
42365    :
42366	else
42367
42368cat >>confdefs.h <<\EOF
42369#define OK_GZIP 1
42370EOF
42371
42372	fi
42373else
42374  enableval=yes
42375
42376cat >>confdefs.h <<\EOF
42377#define OK_GZIP 1
42378EOF
42379
42380fi;
42381	echo "$as_me:42381: result: $enableval" >&5
42382echo "${ECHO_T}$enableval" >&6
42383fi
42384
42385echo "$as_me:42385: checking if you want long-directory listings" >&5
42386echo $ECHO_N "checking if you want long-directory listings... $ECHO_C" >&6
42387
42388# Check whether --enable-long-list or --disable-long-list was given.
42389if test "${enable_long_list+set}" = set; then
42390  enableval="$enable_long_list"
42391  test "$enableval" != no && enableval=yes
42392	if test "$enableval" != "yes" ; then
42393    :
42394	else
42395
42396cat >>confdefs.h <<\EOF
42397#define LONG_LIST 1
42398EOF
42399
42400	fi
42401else
42402  enableval=yes
42403
42404cat >>confdefs.h <<\EOF
42405#define LONG_LIST 1
42406EOF
42407
42408fi;
42409echo "$as_me:42409: result: $enableval" >&5
42410echo "${ECHO_T}$enableval" >&6
42411
42412echo "$as_me:42412: checking if parent-directory references are permitted" >&5
42413echo $ECHO_N "checking if parent-directory references are permitted... $ECHO_C" >&6
42414
42415# Check whether --enable-parent-dir-refs or --disable-parent-dir-refs was given.
42416if test "${enable_parent_dir_refs+set}" = set; then
42417  enableval="$enable_parent_dir_refs"
42418  test "$enableval" != no && enableval=yes
42419	if test "$enableval" != "yes" ; then
42420
42421cat >>confdefs.h <<\EOF
42422#define NO_PARENT_DIR_REFERENCE 1
42423EOF
42424
42425	fi
42426else
42427  enableval=yes
42428fi;
42429echo "$as_me:42429: result: $enableval" >&5
42430echo "${ECHO_T}$enableval" >&6
42431
42432test -z "$TELNET" && TELNET="telnet"
42433for ac_prog in $TELNET telnet
42434do
42435  # Extract the first word of "$ac_prog", so it can be a program name with args.
42436set dummy $ac_prog; ac_word=$2
42437echo "$as_me:42437: checking for $ac_word" >&5
42438echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42439if test "${ac_cv_path_TELNET+set}" = set; then
42440  echo $ECHO_N "(cached) $ECHO_C" >&6
42441else
42442  case $TELNET in
42443  [\\/]* | ?:[\\/]*)
42444  ac_cv_path_TELNET="$TELNET" # Let the user override the test with a path.
42445  ;;
42446  *)
42447  ac_save_IFS=$IFS; IFS=$ac_path_separator
42448ac_dummy="$PATH"
42449for ac_dir in $ac_dummy; do
42450  IFS=$ac_save_IFS
42451  test -z "$ac_dir" && ac_dir=.
42452  if $as_executable_p "$ac_dir/$ac_word"; then
42453   ac_cv_path_TELNET="$ac_dir/$ac_word"
42454   echo "$as_me:42454: found $ac_dir/$ac_word" >&5
42455   break
42456fi
42457done
42458
42459  ;;
42460esac
42461fi
42462TELNET=$ac_cv_path_TELNET
42463
42464if test -n "$TELNET"; then
42465  echo "$as_me:42465: result: $TELNET" >&5
42466echo "${ECHO_T}$TELNET" >&6
42467else
42468  echo "$as_me:42468: result: no" >&5
42469echo "${ECHO_T}no" >&6
42470fi
42471
42472  test -n "$TELNET" && break
42473done
42474test -n "$TELNET" || TELNET="$TELNET"
42475
42476cf_path_prog=""
42477cf_path_args=""
42478IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
42479for cf_temp in $ac_cv_path_TELNET
42480do
42481	if test -z "$cf_path_prog" ; then
42482		if test "$with_full_paths" = yes ; then
42483
42484if test "x$prefix" != xNONE; then
42485	cf_path_syntax="$prefix"
42486else
42487	cf_path_syntax="$ac_default_prefix"
42488fi
42489
42490case ".$cf_temp" in
42491(.\$\(*\)*|.\'*\'*)
42492	;;
42493(..|./*|.\\*)
42494	;;
42495(.[a-zA-Z]:[\\/]*) # OS/2 EMX
42496	;;
42497(.\$\{*prefix\}*|.\$\{*dir\}*)
42498	eval cf_temp="$cf_temp"
42499	case ".$cf_temp" in
42500	(.NONE/*)
42501		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42502		;;
42503	esac
42504	;;
42505(.no|.NONE/*)
42506	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42507	;;
42508(*)
42509	break
42510	;;
42511esac
42512
42513			cf_path_prog="$cf_temp"
42514		else
42515			cf_path_prog="`basename "$cf_temp"`"
42516		fi
42517	elif test -z "$cf_path_args" ; then
42518		cf_path_args="$cf_temp"
42519	else
42520		cf_path_args="$cf_path_args $cf_temp"
42521	fi
42522done
42523IFS="$cf_save_ifs"
42524
42525if test -n "$cf_path_prog" ; then
42526
42527echo "${as_me:-configure}:42527: testing defining path for ${cf_path_prog} ..." 1>&5
42528
42529cat >>confdefs.h <<EOF
42530#define TELNET_PATH "$cf_path_prog"
42531EOF
42532
42533	test -n "$cf_path_args" &&
42534cat >>confdefs.h <<EOF
42535#define TELNET_ARGS "$cf_path_args"
42536EOF
42537
42538fi
42539
42540test -z "$TN3270" && TN3270="tn3270"
42541for ac_prog in $TN3270 tn3270
42542do
42543  # Extract the first word of "$ac_prog", so it can be a program name with args.
42544set dummy $ac_prog; ac_word=$2
42545echo "$as_me:42545: checking for $ac_word" >&5
42546echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42547if test "${ac_cv_path_TN3270+set}" = set; then
42548  echo $ECHO_N "(cached) $ECHO_C" >&6
42549else
42550  case $TN3270 in
42551  [\\/]* | ?:[\\/]*)
42552  ac_cv_path_TN3270="$TN3270" # Let the user override the test with a path.
42553  ;;
42554  *)
42555  ac_save_IFS=$IFS; IFS=$ac_path_separator
42556ac_dummy="$PATH"
42557for ac_dir in $ac_dummy; do
42558  IFS=$ac_save_IFS
42559  test -z "$ac_dir" && ac_dir=.
42560  if $as_executable_p "$ac_dir/$ac_word"; then
42561   ac_cv_path_TN3270="$ac_dir/$ac_word"
42562   echo "$as_me:42562: found $ac_dir/$ac_word" >&5
42563   break
42564fi
42565done
42566
42567  ;;
42568esac
42569fi
42570TN3270=$ac_cv_path_TN3270
42571
42572if test -n "$TN3270"; then
42573  echo "$as_me:42573: result: $TN3270" >&5
42574echo "${ECHO_T}$TN3270" >&6
42575else
42576  echo "$as_me:42576: result: no" >&5
42577echo "${ECHO_T}no" >&6
42578fi
42579
42580  test -n "$TN3270" && break
42581done
42582test -n "$TN3270" || TN3270="$TN3270"
42583
42584cf_path_prog=""
42585cf_path_args=""
42586IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
42587for cf_temp in $ac_cv_path_TN3270
42588do
42589	if test -z "$cf_path_prog" ; then
42590		if test "$with_full_paths" = yes ; then
42591
42592if test "x$prefix" != xNONE; then
42593	cf_path_syntax="$prefix"
42594else
42595	cf_path_syntax="$ac_default_prefix"
42596fi
42597
42598case ".$cf_temp" in
42599(.\$\(*\)*|.\'*\'*)
42600	;;
42601(..|./*|.\\*)
42602	;;
42603(.[a-zA-Z]:[\\/]*) # OS/2 EMX
42604	;;
42605(.\$\{*prefix\}*|.\$\{*dir\}*)
42606	eval cf_temp="$cf_temp"
42607	case ".$cf_temp" in
42608	(.NONE/*)
42609		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42610		;;
42611	esac
42612	;;
42613(.no|.NONE/*)
42614	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42615	;;
42616(*)
42617	break
42618	;;
42619esac
42620
42621			cf_path_prog="$cf_temp"
42622		else
42623			cf_path_prog="`basename "$cf_temp"`"
42624		fi
42625	elif test -z "$cf_path_args" ; then
42626		cf_path_args="$cf_temp"
42627	else
42628		cf_path_args="$cf_path_args $cf_temp"
42629	fi
42630done
42631IFS="$cf_save_ifs"
42632
42633if test -n "$cf_path_prog" ; then
42634
42635echo "${as_me:-configure}:42635: testing defining path for ${cf_path_prog} ..." 1>&5
42636
42637cat >>confdefs.h <<EOF
42638#define TN3270_PATH "$cf_path_prog"
42639EOF
42640
42641	test -n "$cf_path_args" &&
42642cat >>confdefs.h <<EOF
42643#define TN3270_ARGS "$cf_path_args"
42644EOF
42645
42646fi
42647
42648test -z "$RLOGIN" && RLOGIN="rlogin"
42649for ac_prog in $RLOGIN rlogin
42650do
42651  # Extract the first word of "$ac_prog", so it can be a program name with args.
42652set dummy $ac_prog; ac_word=$2
42653echo "$as_me:42653: checking for $ac_word" >&5
42654echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42655if test "${ac_cv_path_RLOGIN+set}" = set; then
42656  echo $ECHO_N "(cached) $ECHO_C" >&6
42657else
42658  case $RLOGIN in
42659  [\\/]* | ?:[\\/]*)
42660  ac_cv_path_RLOGIN="$RLOGIN" # Let the user override the test with a path.
42661  ;;
42662  *)
42663  ac_save_IFS=$IFS; IFS=$ac_path_separator
42664ac_dummy="$PATH"
42665for ac_dir in $ac_dummy; do
42666  IFS=$ac_save_IFS
42667  test -z "$ac_dir" && ac_dir=.
42668  if $as_executable_p "$ac_dir/$ac_word"; then
42669   ac_cv_path_RLOGIN="$ac_dir/$ac_word"
42670   echo "$as_me:42670: found $ac_dir/$ac_word" >&5
42671   break
42672fi
42673done
42674
42675  ;;
42676esac
42677fi
42678RLOGIN=$ac_cv_path_RLOGIN
42679
42680if test -n "$RLOGIN"; then
42681  echo "$as_me:42681: result: $RLOGIN" >&5
42682echo "${ECHO_T}$RLOGIN" >&6
42683else
42684  echo "$as_me:42684: result: no" >&5
42685echo "${ECHO_T}no" >&6
42686fi
42687
42688  test -n "$RLOGIN" && break
42689done
42690test -n "$RLOGIN" || RLOGIN="$RLOGIN"
42691
42692cf_path_prog=""
42693cf_path_args=""
42694IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
42695for cf_temp in $ac_cv_path_RLOGIN
42696do
42697	if test -z "$cf_path_prog" ; then
42698		if test "$with_full_paths" = yes ; then
42699
42700if test "x$prefix" != xNONE; then
42701	cf_path_syntax="$prefix"
42702else
42703	cf_path_syntax="$ac_default_prefix"
42704fi
42705
42706case ".$cf_temp" in
42707(.\$\(*\)*|.\'*\'*)
42708	;;
42709(..|./*|.\\*)
42710	;;
42711(.[a-zA-Z]:[\\/]*) # OS/2 EMX
42712	;;
42713(.\$\{*prefix\}*|.\$\{*dir\}*)
42714	eval cf_temp="$cf_temp"
42715	case ".$cf_temp" in
42716	(.NONE/*)
42717		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42718		;;
42719	esac
42720	;;
42721(.no|.NONE/*)
42722	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42723	;;
42724(*)
42725	break
42726	;;
42727esac
42728
42729			cf_path_prog="$cf_temp"
42730		else
42731			cf_path_prog="`basename "$cf_temp"`"
42732		fi
42733	elif test -z "$cf_path_args" ; then
42734		cf_path_args="$cf_temp"
42735	else
42736		cf_path_args="$cf_path_args $cf_temp"
42737	fi
42738done
42739IFS="$cf_save_ifs"
42740
42741if test -n "$cf_path_prog" ; then
42742
42743echo "${as_me:-configure}:42743: testing defining path for ${cf_path_prog} ..." 1>&5
42744
42745cat >>confdefs.h <<EOF
42746#define RLOGIN_PATH "$cf_path_prog"
42747EOF
42748
42749	test -n "$cf_path_args" &&
42750cat >>confdefs.h <<EOF
42751#define RLOGIN_ARGS "$cf_path_args"
42752EOF
42753
42754fi
42755
42756test -z "$MV" && MV="mv"
42757for ac_prog in $MV mv
42758do
42759  # Extract the first word of "$ac_prog", so it can be a program name with args.
42760set dummy $ac_prog; ac_word=$2
42761echo "$as_me:42761: checking for $ac_word" >&5
42762echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42763if test "${ac_cv_path_MV+set}" = set; then
42764  echo $ECHO_N "(cached) $ECHO_C" >&6
42765else
42766  case $MV in
42767  [\\/]* | ?:[\\/]*)
42768  ac_cv_path_MV="$MV" # Let the user override the test with a path.
42769  ;;
42770  *)
42771  ac_save_IFS=$IFS; IFS=$ac_path_separator
42772ac_dummy="$PATH"
42773for ac_dir in $ac_dummy; do
42774  IFS=$ac_save_IFS
42775  test -z "$ac_dir" && ac_dir=.
42776  if $as_executable_p "$ac_dir/$ac_word"; then
42777   ac_cv_path_MV="$ac_dir/$ac_word"
42778   echo "$as_me:42778: found $ac_dir/$ac_word" >&5
42779   break
42780fi
42781done
42782
42783  ;;
42784esac
42785fi
42786MV=$ac_cv_path_MV
42787
42788if test -n "$MV"; then
42789  echo "$as_me:42789: result: $MV" >&5
42790echo "${ECHO_T}$MV" >&6
42791else
42792  echo "$as_me:42792: result: no" >&5
42793echo "${ECHO_T}no" >&6
42794fi
42795
42796  test -n "$MV" && break
42797done
42798test -n "$MV" || MV="$MV"
42799
42800cf_path_prog=""
42801cf_path_args=""
42802IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
42803for cf_temp in $ac_cv_path_MV
42804do
42805	if test -z "$cf_path_prog" ; then
42806		if test "$with_full_paths" = yes ; then
42807
42808if test "x$prefix" != xNONE; then
42809	cf_path_syntax="$prefix"
42810else
42811	cf_path_syntax="$ac_default_prefix"
42812fi
42813
42814case ".$cf_temp" in
42815(.\$\(*\)*|.\'*\'*)
42816	;;
42817(..|./*|.\\*)
42818	;;
42819(.[a-zA-Z]:[\\/]*) # OS/2 EMX
42820	;;
42821(.\$\{*prefix\}*|.\$\{*dir\}*)
42822	eval cf_temp="$cf_temp"
42823	case ".$cf_temp" in
42824	(.NONE/*)
42825		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42826		;;
42827	esac
42828	;;
42829(.no|.NONE/*)
42830	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42831	;;
42832(*)
42833	break
42834	;;
42835esac
42836
42837			cf_path_prog="$cf_temp"
42838		else
42839			cf_path_prog="`basename "$cf_temp"`"
42840		fi
42841	elif test -z "$cf_path_args" ; then
42842		cf_path_args="$cf_temp"
42843	else
42844		cf_path_args="$cf_path_args $cf_temp"
42845	fi
42846done
42847IFS="$cf_save_ifs"
42848
42849if test -n "$cf_path_prog" ; then
42850
42851echo "${as_me:-configure}:42851: testing defining path for ${cf_path_prog} ..." 1>&5
42852
42853cat >>confdefs.h <<EOF
42854#define MV_PATH "$cf_path_prog"
42855EOF
42856
42857	test -n "$cf_path_args" &&
42858cat >>confdefs.h <<EOF
42859#define MV_ARGS "$cf_path_args"
42860EOF
42861
42862fi
42863
42864test -z "$GZIP" && GZIP="gzip"
42865for ac_prog in $GZIP gzip
42866do
42867  # Extract the first word of "$ac_prog", so it can be a program name with args.
42868set dummy $ac_prog; ac_word=$2
42869echo "$as_me:42869: checking for $ac_word" >&5
42870echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42871if test "${ac_cv_path_GZIP+set}" = set; then
42872  echo $ECHO_N "(cached) $ECHO_C" >&6
42873else
42874  case $GZIP in
42875  [\\/]* | ?:[\\/]*)
42876  ac_cv_path_GZIP="$GZIP" # Let the user override the test with a path.
42877  ;;
42878  *)
42879  ac_save_IFS=$IFS; IFS=$ac_path_separator
42880ac_dummy="$PATH"
42881for ac_dir in $ac_dummy; do
42882  IFS=$ac_save_IFS
42883  test -z "$ac_dir" && ac_dir=.
42884  if $as_executable_p "$ac_dir/$ac_word"; then
42885   ac_cv_path_GZIP="$ac_dir/$ac_word"
42886   echo "$as_me:42886: found $ac_dir/$ac_word" >&5
42887   break
42888fi
42889done
42890
42891  ;;
42892esac
42893fi
42894GZIP=$ac_cv_path_GZIP
42895
42896if test -n "$GZIP"; then
42897  echo "$as_me:42897: result: $GZIP" >&5
42898echo "${ECHO_T}$GZIP" >&6
42899else
42900  echo "$as_me:42900: result: no" >&5
42901echo "${ECHO_T}no" >&6
42902fi
42903
42904  test -n "$GZIP" && break
42905done
42906test -n "$GZIP" || GZIP="$GZIP"
42907
42908cf_path_prog=""
42909cf_path_args=""
42910IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
42911for cf_temp in $ac_cv_path_GZIP
42912do
42913	if test -z "$cf_path_prog" ; then
42914		if test "$with_full_paths" = yes ; then
42915
42916if test "x$prefix" != xNONE; then
42917	cf_path_syntax="$prefix"
42918else
42919	cf_path_syntax="$ac_default_prefix"
42920fi
42921
42922case ".$cf_temp" in
42923(.\$\(*\)*|.\'*\'*)
42924	;;
42925(..|./*|.\\*)
42926	;;
42927(.[a-zA-Z]:[\\/]*) # OS/2 EMX
42928	;;
42929(.\$\{*prefix\}*|.\$\{*dir\}*)
42930	eval cf_temp="$cf_temp"
42931	case ".$cf_temp" in
42932	(.NONE/*)
42933		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42934		;;
42935	esac
42936	;;
42937(.no|.NONE/*)
42938	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
42939	;;
42940(*)
42941	break
42942	;;
42943esac
42944
42945			cf_path_prog="$cf_temp"
42946		else
42947			cf_path_prog="`basename "$cf_temp"`"
42948		fi
42949	elif test -z "$cf_path_args" ; then
42950		cf_path_args="$cf_temp"
42951	else
42952		cf_path_args="$cf_path_args $cf_temp"
42953	fi
42954done
42955IFS="$cf_save_ifs"
42956
42957if test -n "$cf_path_prog" ; then
42958
42959echo "${as_me:-configure}:42959: testing defining path for ${cf_path_prog} ..." 1>&5
42960
42961cat >>confdefs.h <<EOF
42962#define GZIP_PATH "$cf_path_prog"
42963EOF
42964
42965	test -n "$cf_path_args" &&
42966cat >>confdefs.h <<EOF
42967#define GZIP_ARGS "$cf_path_args"
42968EOF
42969
42970fi
42971
42972test -z "$UNCOMPRESS" && UNCOMPRESS="gunzip"
42973for ac_prog in $UNCOMPRESS gunzip
42974do
42975  # Extract the first word of "$ac_prog", so it can be a program name with args.
42976set dummy $ac_prog; ac_word=$2
42977echo "$as_me:42977: checking for $ac_word" >&5
42978echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
42979if test "${ac_cv_path_UNCOMPRESS+set}" = set; then
42980  echo $ECHO_N "(cached) $ECHO_C" >&6
42981else
42982  case $UNCOMPRESS in
42983  [\\/]* | ?:[\\/]*)
42984  ac_cv_path_UNCOMPRESS="$UNCOMPRESS" # Let the user override the test with a path.
42985  ;;
42986  *)
42987  ac_save_IFS=$IFS; IFS=$ac_path_separator
42988ac_dummy="$PATH"
42989for ac_dir in $ac_dummy; do
42990  IFS=$ac_save_IFS
42991  test -z "$ac_dir" && ac_dir=.
42992  if $as_executable_p "$ac_dir/$ac_word"; then
42993   ac_cv_path_UNCOMPRESS="$ac_dir/$ac_word"
42994   echo "$as_me:42994: found $ac_dir/$ac_word" >&5
42995   break
42996fi
42997done
42998
42999  ;;
43000esac
43001fi
43002UNCOMPRESS=$ac_cv_path_UNCOMPRESS
43003
43004if test -n "$UNCOMPRESS"; then
43005  echo "$as_me:43005: result: $UNCOMPRESS" >&5
43006echo "${ECHO_T}$UNCOMPRESS" >&6
43007else
43008  echo "$as_me:43008: result: no" >&5
43009echo "${ECHO_T}no" >&6
43010fi
43011
43012  test -n "$UNCOMPRESS" && break
43013done
43014test -n "$UNCOMPRESS" || UNCOMPRESS="$UNCOMPRESS"
43015
43016cf_path_prog=""
43017cf_path_args=""
43018IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43019for cf_temp in $ac_cv_path_UNCOMPRESS
43020do
43021	if test -z "$cf_path_prog" ; then
43022		if test "$with_full_paths" = yes ; then
43023
43024if test "x$prefix" != xNONE; then
43025	cf_path_syntax="$prefix"
43026else
43027	cf_path_syntax="$ac_default_prefix"
43028fi
43029
43030case ".$cf_temp" in
43031(.\$\(*\)*|.\'*\'*)
43032	;;
43033(..|./*|.\\*)
43034	;;
43035(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43036	;;
43037(.\$\{*prefix\}*|.\$\{*dir\}*)
43038	eval cf_temp="$cf_temp"
43039	case ".$cf_temp" in
43040	(.NONE/*)
43041		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43042		;;
43043	esac
43044	;;
43045(.no|.NONE/*)
43046	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43047	;;
43048(*)
43049	break
43050	;;
43051esac
43052
43053			cf_path_prog="$cf_temp"
43054		else
43055			cf_path_prog="`basename "$cf_temp"`"
43056		fi
43057	elif test -z "$cf_path_args" ; then
43058		cf_path_args="$cf_temp"
43059	else
43060		cf_path_args="$cf_path_args $cf_temp"
43061	fi
43062done
43063IFS="$cf_save_ifs"
43064
43065if test -n "$cf_path_prog" ; then
43066
43067echo "${as_me:-configure}:43067: testing defining path for ${cf_path_prog} ..." 1>&5
43068
43069cat >>confdefs.h <<EOF
43070#define UNCOMPRESS_PATH "$cf_path_prog"
43071EOF
43072
43073	test -n "$cf_path_args" &&
43074cat >>confdefs.h <<EOF
43075#define UNCOMPRESS_ARGS "$cf_path_args"
43076EOF
43077
43078fi
43079
43080test -z "$UNZIP" && UNZIP="unzip"
43081for ac_prog in $UNZIP unzip
43082do
43083  # Extract the first word of "$ac_prog", so it can be a program name with args.
43084set dummy $ac_prog; ac_word=$2
43085echo "$as_me:43085: checking for $ac_word" >&5
43086echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43087if test "${ac_cv_path_UNZIP+set}" = set; then
43088  echo $ECHO_N "(cached) $ECHO_C" >&6
43089else
43090  case $UNZIP in
43091  [\\/]* | ?:[\\/]*)
43092  ac_cv_path_UNZIP="$UNZIP" # Let the user override the test with a path.
43093  ;;
43094  *)
43095  ac_save_IFS=$IFS; IFS=$ac_path_separator
43096ac_dummy="$PATH"
43097for ac_dir in $ac_dummy; do
43098  IFS=$ac_save_IFS
43099  test -z "$ac_dir" && ac_dir=.
43100  if $as_executable_p "$ac_dir/$ac_word"; then
43101   ac_cv_path_UNZIP="$ac_dir/$ac_word"
43102   echo "$as_me:43102: found $ac_dir/$ac_word" >&5
43103   break
43104fi
43105done
43106
43107  ;;
43108esac
43109fi
43110UNZIP=$ac_cv_path_UNZIP
43111
43112if test -n "$UNZIP"; then
43113  echo "$as_me:43113: result: $UNZIP" >&5
43114echo "${ECHO_T}$UNZIP" >&6
43115else
43116  echo "$as_me:43116: result: no" >&5
43117echo "${ECHO_T}no" >&6
43118fi
43119
43120  test -n "$UNZIP" && break
43121done
43122test -n "$UNZIP" || UNZIP="$UNZIP"
43123
43124cf_path_prog=""
43125cf_path_args=""
43126IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43127for cf_temp in $ac_cv_path_UNZIP
43128do
43129	if test -z "$cf_path_prog" ; then
43130		if test "$with_full_paths" = yes ; then
43131
43132if test "x$prefix" != xNONE; then
43133	cf_path_syntax="$prefix"
43134else
43135	cf_path_syntax="$ac_default_prefix"
43136fi
43137
43138case ".$cf_temp" in
43139(.\$\(*\)*|.\'*\'*)
43140	;;
43141(..|./*|.\\*)
43142	;;
43143(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43144	;;
43145(.\$\{*prefix\}*|.\$\{*dir\}*)
43146	eval cf_temp="$cf_temp"
43147	case ".$cf_temp" in
43148	(.NONE/*)
43149		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43150		;;
43151	esac
43152	;;
43153(.no|.NONE/*)
43154	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43155	;;
43156(*)
43157	break
43158	;;
43159esac
43160
43161			cf_path_prog="$cf_temp"
43162		else
43163			cf_path_prog="`basename "$cf_temp"`"
43164		fi
43165	elif test -z "$cf_path_args" ; then
43166		cf_path_args="$cf_temp"
43167	else
43168		cf_path_args="$cf_path_args $cf_temp"
43169	fi
43170done
43171IFS="$cf_save_ifs"
43172
43173if test -n "$cf_path_prog" ; then
43174
43175echo "${as_me:-configure}:43175: testing defining path for ${cf_path_prog} ..." 1>&5
43176
43177cat >>confdefs.h <<EOF
43178#define UNZIP_PATH "$cf_path_prog"
43179EOF
43180
43181	test -n "$cf_path_args" &&
43182cat >>confdefs.h <<EOF
43183#define UNZIP_ARGS "$cf_path_args"
43184EOF
43185
43186fi
43187
43188test -z "$BZIP2" && BZIP2="bzip2"
43189for ac_prog in $BZIP2 bzip2
43190do
43191  # Extract the first word of "$ac_prog", so it can be a program name with args.
43192set dummy $ac_prog; ac_word=$2
43193echo "$as_me:43193: checking for $ac_word" >&5
43194echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43195if test "${ac_cv_path_BZIP2+set}" = set; then
43196  echo $ECHO_N "(cached) $ECHO_C" >&6
43197else
43198  case $BZIP2 in
43199  [\\/]* | ?:[\\/]*)
43200  ac_cv_path_BZIP2="$BZIP2" # Let the user override the test with a path.
43201  ;;
43202  *)
43203  ac_save_IFS=$IFS; IFS=$ac_path_separator
43204ac_dummy="$PATH"
43205for ac_dir in $ac_dummy; do
43206  IFS=$ac_save_IFS
43207  test -z "$ac_dir" && ac_dir=.
43208  if $as_executable_p "$ac_dir/$ac_word"; then
43209   ac_cv_path_BZIP2="$ac_dir/$ac_word"
43210   echo "$as_me:43210: found $ac_dir/$ac_word" >&5
43211   break
43212fi
43213done
43214
43215  ;;
43216esac
43217fi
43218BZIP2=$ac_cv_path_BZIP2
43219
43220if test -n "$BZIP2"; then
43221  echo "$as_me:43221: result: $BZIP2" >&5
43222echo "${ECHO_T}$BZIP2" >&6
43223else
43224  echo "$as_me:43224: result: no" >&5
43225echo "${ECHO_T}no" >&6
43226fi
43227
43228  test -n "$BZIP2" && break
43229done
43230test -n "$BZIP2" || BZIP2="$BZIP2"
43231
43232cf_path_prog=""
43233cf_path_args=""
43234IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43235for cf_temp in $ac_cv_path_BZIP2
43236do
43237	if test -z "$cf_path_prog" ; then
43238		if test "$with_full_paths" = yes ; then
43239
43240if test "x$prefix" != xNONE; then
43241	cf_path_syntax="$prefix"
43242else
43243	cf_path_syntax="$ac_default_prefix"
43244fi
43245
43246case ".$cf_temp" in
43247(.\$\(*\)*|.\'*\'*)
43248	;;
43249(..|./*|.\\*)
43250	;;
43251(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43252	;;
43253(.\$\{*prefix\}*|.\$\{*dir\}*)
43254	eval cf_temp="$cf_temp"
43255	case ".$cf_temp" in
43256	(.NONE/*)
43257		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43258		;;
43259	esac
43260	;;
43261(.no|.NONE/*)
43262	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43263	;;
43264(*)
43265	break
43266	;;
43267esac
43268
43269			cf_path_prog="$cf_temp"
43270		else
43271			cf_path_prog="`basename "$cf_temp"`"
43272		fi
43273	elif test -z "$cf_path_args" ; then
43274		cf_path_args="$cf_temp"
43275	else
43276		cf_path_args="$cf_path_args $cf_temp"
43277	fi
43278done
43279IFS="$cf_save_ifs"
43280
43281if test -n "$cf_path_prog" ; then
43282
43283echo "${as_me:-configure}:43283: testing defining path for ${cf_path_prog} ..." 1>&5
43284
43285cat >>confdefs.h <<EOF
43286#define BZIP2_PATH "$cf_path_prog"
43287EOF
43288
43289	test -n "$cf_path_args" &&
43290cat >>confdefs.h <<EOF
43291#define BZIP2_ARGS "$cf_path_args"
43292EOF
43293
43294fi
43295
43296test -z "$TAR" && TAR="tar"
43297for ac_prog in $TAR tar pax gtar gnutar bsdtar star
43298do
43299  # Extract the first word of "$ac_prog", so it can be a program name with args.
43300set dummy $ac_prog; ac_word=$2
43301echo "$as_me:43301: checking for $ac_word" >&5
43302echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43303if test "${ac_cv_path_TAR+set}" = set; then
43304  echo $ECHO_N "(cached) $ECHO_C" >&6
43305else
43306  case $TAR in
43307  [\\/]* | ?:[\\/]*)
43308  ac_cv_path_TAR="$TAR" # Let the user override the test with a path.
43309  ;;
43310  *)
43311  ac_save_IFS=$IFS; IFS=$ac_path_separator
43312ac_dummy="$PATH"
43313for ac_dir in $ac_dummy; do
43314  IFS=$ac_save_IFS
43315  test -z "$ac_dir" && ac_dir=.
43316  if $as_executable_p "$ac_dir/$ac_word"; then
43317   ac_cv_path_TAR="$ac_dir/$ac_word"
43318   echo "$as_me:43318: found $ac_dir/$ac_word" >&5
43319   break
43320fi
43321done
43322
43323  ;;
43324esac
43325fi
43326TAR=$ac_cv_path_TAR
43327
43328if test -n "$TAR"; then
43329  echo "$as_me:43329: result: $TAR" >&5
43330echo "${ECHO_T}$TAR" >&6
43331else
43332  echo "$as_me:43332: result: no" >&5
43333echo "${ECHO_T}no" >&6
43334fi
43335
43336  test -n "$TAR" && break
43337done
43338test -n "$TAR" || TAR="$TAR"
43339
43340cf_path_prog=""
43341cf_path_args=""
43342IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43343for cf_temp in $ac_cv_path_TAR
43344do
43345	if test -z "$cf_path_prog" ; then
43346		if test "$with_full_paths" = yes ; then
43347
43348if test "x$prefix" != xNONE; then
43349	cf_path_syntax="$prefix"
43350else
43351	cf_path_syntax="$ac_default_prefix"
43352fi
43353
43354case ".$cf_temp" in
43355(.\$\(*\)*|.\'*\'*)
43356	;;
43357(..|./*|.\\*)
43358	;;
43359(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43360	;;
43361(.\$\{*prefix\}*|.\$\{*dir\}*)
43362	eval cf_temp="$cf_temp"
43363	case ".$cf_temp" in
43364	(.NONE/*)
43365		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43366		;;
43367	esac
43368	;;
43369(.no|.NONE/*)
43370	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43371	;;
43372(*)
43373	break
43374	;;
43375esac
43376
43377			cf_path_prog="$cf_temp"
43378		else
43379			cf_path_prog="`basename "$cf_temp"`"
43380		fi
43381	elif test -z "$cf_path_args" ; then
43382		cf_path_args="$cf_temp"
43383	else
43384		cf_path_args="$cf_path_args $cf_temp"
43385	fi
43386done
43387IFS="$cf_save_ifs"
43388
43389if test -n "$cf_path_prog" ; then
43390
43391echo "${as_me:-configure}:43391: testing defining path for ${cf_path_prog} ..." 1>&5
43392
43393cat >>confdefs.h <<EOF
43394#define TAR_PATH "$cf_path_prog"
43395EOF
43396
43397	test -n "$cf_path_args" &&
43398cat >>confdefs.h <<EOF
43399#define TAR_ARGS "$cf_path_args"
43400EOF
43401
43402fi
43403
43404case $TAR in
43405(*pax|*pax$EXEEXT)
43406	TAR_UP_OPTIONS="-w"
43407	TAR_DOWN_OPTIONS="-r"
43408	TAR_PIPE_OPTIONS=""
43409	TAR_FILE_OPTIONS="-f"
43410	;;
43411(*star|*star$EXEEXT)
43412	TAR_UP_OPTIONS="-c -f"
43413	TAR_DOWN_OPTIONS="-x -U -f"
43414	TAR_PIPE_OPTIONS="-"
43415	TAR_FILE_OPTIONS=""
43416	;;
43417(*tar|*tar$EXEEXT)
43418	# FIXME: some versions of tar require, some don't allow the "-"
43419	TAR_UP_OPTIONS="-cf"
43420	TAR_DOWN_OPTIONS="-xf"
43421	TAR_PIPE_OPTIONS="-"
43422	TAR_FILE_OPTIONS=""
43423	;;
43424esac
43425
43426cat >>confdefs.h <<EOF
43427#define TAR_UP_OPTIONS "$TAR_UP_OPTIONS"
43428EOF
43429
43430cat >>confdefs.h <<EOF
43431#define TAR_DOWN_OPTIONS "$TAR_DOWN_OPTIONS"
43432EOF
43433
43434cat >>confdefs.h <<EOF
43435#define TAR_FILE_OPTIONS "$TAR_FILE_OPTIONS"
43436EOF
43437
43438cat >>confdefs.h <<EOF
43439#define TAR_PIPE_OPTIONS "$TAR_PIPE_OPTIONS"
43440EOF
43441
43442if test ".$use_dired" != ".no" ; then
43443
43444test -z "$COMPRESS" && COMPRESS="compress"
43445for ac_prog in $COMPRESS compress
43446do
43447  # Extract the first word of "$ac_prog", so it can be a program name with args.
43448set dummy $ac_prog; ac_word=$2
43449echo "$as_me:43449: checking for $ac_word" >&5
43450echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43451if test "${ac_cv_path_COMPRESS+set}" = set; then
43452  echo $ECHO_N "(cached) $ECHO_C" >&6
43453else
43454  case $COMPRESS in
43455  [\\/]* | ?:[\\/]*)
43456  ac_cv_path_COMPRESS="$COMPRESS" # Let the user override the test with a path.
43457  ;;
43458  *)
43459  ac_save_IFS=$IFS; IFS=$ac_path_separator
43460ac_dummy="$PATH"
43461for ac_dir in $ac_dummy; do
43462  IFS=$ac_save_IFS
43463  test -z "$ac_dir" && ac_dir=.
43464  if $as_executable_p "$ac_dir/$ac_word"; then
43465   ac_cv_path_COMPRESS="$ac_dir/$ac_word"
43466   echo "$as_me:43466: found $ac_dir/$ac_word" >&5
43467   break
43468fi
43469done
43470
43471  ;;
43472esac
43473fi
43474COMPRESS=$ac_cv_path_COMPRESS
43475
43476if test -n "$COMPRESS"; then
43477  echo "$as_me:43477: result: $COMPRESS" >&5
43478echo "${ECHO_T}$COMPRESS" >&6
43479else
43480  echo "$as_me:43480: result: no" >&5
43481echo "${ECHO_T}no" >&6
43482fi
43483
43484  test -n "$COMPRESS" && break
43485done
43486test -n "$COMPRESS" || COMPRESS="$COMPRESS"
43487
43488cf_path_prog=""
43489cf_path_args=""
43490IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43491for cf_temp in $ac_cv_path_COMPRESS
43492do
43493	if test -z "$cf_path_prog" ; then
43494		if test "$with_full_paths" = yes ; then
43495
43496if test "x$prefix" != xNONE; then
43497	cf_path_syntax="$prefix"
43498else
43499	cf_path_syntax="$ac_default_prefix"
43500fi
43501
43502case ".$cf_temp" in
43503(.\$\(*\)*|.\'*\'*)
43504	;;
43505(..|./*|.\\*)
43506	;;
43507(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43508	;;
43509(.\$\{*prefix\}*|.\$\{*dir\}*)
43510	eval cf_temp="$cf_temp"
43511	case ".$cf_temp" in
43512	(.NONE/*)
43513		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43514		;;
43515	esac
43516	;;
43517(.no|.NONE/*)
43518	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43519	;;
43520(*)
43521	break
43522	;;
43523esac
43524
43525			cf_path_prog="$cf_temp"
43526		else
43527			cf_path_prog="`basename "$cf_temp"`"
43528		fi
43529	elif test -z "$cf_path_args" ; then
43530		cf_path_args="$cf_temp"
43531	else
43532		cf_path_args="$cf_path_args $cf_temp"
43533	fi
43534done
43535IFS="$cf_save_ifs"
43536
43537if test -n "$cf_path_prog" ; then
43538
43539echo "${as_me:-configure}:43539: testing defining path for ${cf_path_prog} ..." 1>&5
43540
43541cat >>confdefs.h <<EOF
43542#define COMPRESS_PATH "$cf_path_prog"
43543EOF
43544
43545	test -n "$cf_path_args" &&
43546cat >>confdefs.h <<EOF
43547#define COMPRESS_ARGS "$cf_path_args"
43548EOF
43549
43550fi
43551
43552test -z "$RM" && RM="rm"
43553for ac_prog in $RM rm
43554do
43555  # Extract the first word of "$ac_prog", so it can be a program name with args.
43556set dummy $ac_prog; ac_word=$2
43557echo "$as_me:43557: checking for $ac_word" >&5
43558echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43559if test "${ac_cv_path_RM+set}" = set; then
43560  echo $ECHO_N "(cached) $ECHO_C" >&6
43561else
43562  case $RM in
43563  [\\/]* | ?:[\\/]*)
43564  ac_cv_path_RM="$RM" # Let the user override the test with a path.
43565  ;;
43566  *)
43567  ac_save_IFS=$IFS; IFS=$ac_path_separator
43568ac_dummy="$PATH"
43569for ac_dir in $ac_dummy; do
43570  IFS=$ac_save_IFS
43571  test -z "$ac_dir" && ac_dir=.
43572  if $as_executable_p "$ac_dir/$ac_word"; then
43573   ac_cv_path_RM="$ac_dir/$ac_word"
43574   echo "$as_me:43574: found $ac_dir/$ac_word" >&5
43575   break
43576fi
43577done
43578
43579  ;;
43580esac
43581fi
43582RM=$ac_cv_path_RM
43583
43584if test -n "$RM"; then
43585  echo "$as_me:43585: result: $RM" >&5
43586echo "${ECHO_T}$RM" >&6
43587else
43588  echo "$as_me:43588: result: no" >&5
43589echo "${ECHO_T}no" >&6
43590fi
43591
43592  test -n "$RM" && break
43593done
43594test -n "$RM" || RM="$RM"
43595
43596cf_path_prog=""
43597cf_path_args=""
43598IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43599for cf_temp in $ac_cv_path_RM
43600do
43601	if test -z "$cf_path_prog" ; then
43602		if test "$with_full_paths" = yes ; then
43603
43604if test "x$prefix" != xNONE; then
43605	cf_path_syntax="$prefix"
43606else
43607	cf_path_syntax="$ac_default_prefix"
43608fi
43609
43610case ".$cf_temp" in
43611(.\$\(*\)*|.\'*\'*)
43612	;;
43613(..|./*|.\\*)
43614	;;
43615(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43616	;;
43617(.\$\{*prefix\}*|.\$\{*dir\}*)
43618	eval cf_temp="$cf_temp"
43619	case ".$cf_temp" in
43620	(.NONE/*)
43621		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43622		;;
43623	esac
43624	;;
43625(.no|.NONE/*)
43626	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43627	;;
43628(*)
43629	break
43630	;;
43631esac
43632
43633			cf_path_prog="$cf_temp"
43634		else
43635			cf_path_prog="`basename "$cf_temp"`"
43636		fi
43637	elif test -z "$cf_path_args" ; then
43638		cf_path_args="$cf_temp"
43639	else
43640		cf_path_args="$cf_path_args $cf_temp"
43641	fi
43642done
43643IFS="$cf_save_ifs"
43644
43645if test -n "$cf_path_prog" ; then
43646
43647echo "${as_me:-configure}:43647: testing defining path for ${cf_path_prog} ..." 1>&5
43648
43649cat >>confdefs.h <<EOF
43650#define RM_PATH "$cf_path_prog"
43651EOF
43652
43653	test -n "$cf_path_args" &&
43654cat >>confdefs.h <<EOF
43655#define RM_ARGS "$cf_path_args"
43656EOF
43657
43658fi
43659
43660test -z "$UUDECODE" && UUDECODE="uudecode"
43661for ac_prog in $UUDECODE uudecode
43662do
43663  # Extract the first word of "$ac_prog", so it can be a program name with args.
43664set dummy $ac_prog; ac_word=$2
43665echo "$as_me:43665: checking for $ac_word" >&5
43666echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43667if test "${ac_cv_path_UUDECODE+set}" = set; then
43668  echo $ECHO_N "(cached) $ECHO_C" >&6
43669else
43670  case $UUDECODE in
43671  [\\/]* | ?:[\\/]*)
43672  ac_cv_path_UUDECODE="$UUDECODE" # Let the user override the test with a path.
43673  ;;
43674  *)
43675  ac_save_IFS=$IFS; IFS=$ac_path_separator
43676ac_dummy="$PATH"
43677for ac_dir in $ac_dummy; do
43678  IFS=$ac_save_IFS
43679  test -z "$ac_dir" && ac_dir=.
43680  if $as_executable_p "$ac_dir/$ac_word"; then
43681   ac_cv_path_UUDECODE="$ac_dir/$ac_word"
43682   echo "$as_me:43682: found $ac_dir/$ac_word" >&5
43683   break
43684fi
43685done
43686
43687  ;;
43688esac
43689fi
43690UUDECODE=$ac_cv_path_UUDECODE
43691
43692if test -n "$UUDECODE"; then
43693  echo "$as_me:43693: result: $UUDECODE" >&5
43694echo "${ECHO_T}$UUDECODE" >&6
43695else
43696  echo "$as_me:43696: result: no" >&5
43697echo "${ECHO_T}no" >&6
43698fi
43699
43700  test -n "$UUDECODE" && break
43701done
43702test -n "$UUDECODE" || UUDECODE="$UUDECODE"
43703
43704cf_path_prog=""
43705cf_path_args=""
43706IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43707for cf_temp in $ac_cv_path_UUDECODE
43708do
43709	if test -z "$cf_path_prog" ; then
43710		if test "$with_full_paths" = yes ; then
43711
43712if test "x$prefix" != xNONE; then
43713	cf_path_syntax="$prefix"
43714else
43715	cf_path_syntax="$ac_default_prefix"
43716fi
43717
43718case ".$cf_temp" in
43719(.\$\(*\)*|.\'*\'*)
43720	;;
43721(..|./*|.\\*)
43722	;;
43723(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43724	;;
43725(.\$\{*prefix\}*|.\$\{*dir\}*)
43726	eval cf_temp="$cf_temp"
43727	case ".$cf_temp" in
43728	(.NONE/*)
43729		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43730		;;
43731	esac
43732	;;
43733(.no|.NONE/*)
43734	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43735	;;
43736(*)
43737	break
43738	;;
43739esac
43740
43741			cf_path_prog="$cf_temp"
43742		else
43743			cf_path_prog="`basename "$cf_temp"`"
43744		fi
43745	elif test -z "$cf_path_args" ; then
43746		cf_path_args="$cf_temp"
43747	else
43748		cf_path_args="$cf_path_args $cf_temp"
43749	fi
43750done
43751IFS="$cf_save_ifs"
43752
43753if test -n "$cf_path_prog" ; then
43754
43755echo "${as_me:-configure}:43755: testing defining path for ${cf_path_prog} ..." 1>&5
43756
43757cat >>confdefs.h <<EOF
43758#define UUDECODE_PATH "$cf_path_prog"
43759EOF
43760
43761	test -n "$cf_path_args" &&
43762cat >>confdefs.h <<EOF
43763#define UUDECODE_ARGS "$cf_path_args"
43764EOF
43765
43766fi
43767
43768test -z "$ZCAT" && ZCAT="zcat"
43769for ac_prog in $ZCAT zcat
43770do
43771  # Extract the first word of "$ac_prog", so it can be a program name with args.
43772set dummy $ac_prog; ac_word=$2
43773echo "$as_me:43773: checking for $ac_word" >&5
43774echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43775if test "${ac_cv_path_ZCAT+set}" = set; then
43776  echo $ECHO_N "(cached) $ECHO_C" >&6
43777else
43778  case $ZCAT in
43779  [\\/]* | ?:[\\/]*)
43780  ac_cv_path_ZCAT="$ZCAT" # Let the user override the test with a path.
43781  ;;
43782  *)
43783  ac_save_IFS=$IFS; IFS=$ac_path_separator
43784ac_dummy="$PATH"
43785for ac_dir in $ac_dummy; do
43786  IFS=$ac_save_IFS
43787  test -z "$ac_dir" && ac_dir=.
43788  if $as_executable_p "$ac_dir/$ac_word"; then
43789   ac_cv_path_ZCAT="$ac_dir/$ac_word"
43790   echo "$as_me:43790: found $ac_dir/$ac_word" >&5
43791   break
43792fi
43793done
43794
43795  ;;
43796esac
43797fi
43798ZCAT=$ac_cv_path_ZCAT
43799
43800if test -n "$ZCAT"; then
43801  echo "$as_me:43801: result: $ZCAT" >&5
43802echo "${ECHO_T}$ZCAT" >&6
43803else
43804  echo "$as_me:43804: result: no" >&5
43805echo "${ECHO_T}no" >&6
43806fi
43807
43808  test -n "$ZCAT" && break
43809done
43810test -n "$ZCAT" || ZCAT="$ZCAT"
43811
43812cf_path_prog=""
43813cf_path_args=""
43814IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43815for cf_temp in $ac_cv_path_ZCAT
43816do
43817	if test -z "$cf_path_prog" ; then
43818		if test "$with_full_paths" = yes ; then
43819
43820if test "x$prefix" != xNONE; then
43821	cf_path_syntax="$prefix"
43822else
43823	cf_path_syntax="$ac_default_prefix"
43824fi
43825
43826case ".$cf_temp" in
43827(.\$\(*\)*|.\'*\'*)
43828	;;
43829(..|./*|.\\*)
43830	;;
43831(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43832	;;
43833(.\$\{*prefix\}*|.\$\{*dir\}*)
43834	eval cf_temp="$cf_temp"
43835	case ".$cf_temp" in
43836	(.NONE/*)
43837		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43838		;;
43839	esac
43840	;;
43841(.no|.NONE/*)
43842	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43843	;;
43844(*)
43845	break
43846	;;
43847esac
43848
43849			cf_path_prog="$cf_temp"
43850		else
43851			cf_path_prog="`basename "$cf_temp"`"
43852		fi
43853	elif test -z "$cf_path_args" ; then
43854		cf_path_args="$cf_temp"
43855	else
43856		cf_path_args="$cf_path_args $cf_temp"
43857	fi
43858done
43859IFS="$cf_save_ifs"
43860
43861if test -n "$cf_path_prog" ; then
43862
43863echo "${as_me:-configure}:43863: testing defining path for ${cf_path_prog} ..." 1>&5
43864
43865cat >>confdefs.h <<EOF
43866#define ZCAT_PATH "$cf_path_prog"
43867EOF
43868
43869	test -n "$cf_path_args" &&
43870cat >>confdefs.h <<EOF
43871#define ZCAT_ARGS "$cf_path_args"
43872EOF
43873
43874fi
43875
43876test -z "$ZIP" && ZIP="zip"
43877for ac_prog in $ZIP zip
43878do
43879  # Extract the first word of "$ac_prog", so it can be a program name with args.
43880set dummy $ac_prog; ac_word=$2
43881echo "$as_me:43881: checking for $ac_word" >&5
43882echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
43883if test "${ac_cv_path_ZIP+set}" = set; then
43884  echo $ECHO_N "(cached) $ECHO_C" >&6
43885else
43886  case $ZIP in
43887  [\\/]* | ?:[\\/]*)
43888  ac_cv_path_ZIP="$ZIP" # Let the user override the test with a path.
43889  ;;
43890  *)
43891  ac_save_IFS=$IFS; IFS=$ac_path_separator
43892ac_dummy="$PATH"
43893for ac_dir in $ac_dummy; do
43894  IFS=$ac_save_IFS
43895  test -z "$ac_dir" && ac_dir=.
43896  if $as_executable_p "$ac_dir/$ac_word"; then
43897   ac_cv_path_ZIP="$ac_dir/$ac_word"
43898   echo "$as_me:43898: found $ac_dir/$ac_word" >&5
43899   break
43900fi
43901done
43902
43903  ;;
43904esac
43905fi
43906ZIP=$ac_cv_path_ZIP
43907
43908if test -n "$ZIP"; then
43909  echo "$as_me:43909: result: $ZIP" >&5
43910echo "${ECHO_T}$ZIP" >&6
43911else
43912  echo "$as_me:43912: result: no" >&5
43913echo "${ECHO_T}no" >&6
43914fi
43915
43916  test -n "$ZIP" && break
43917done
43918test -n "$ZIP" || ZIP="$ZIP"
43919
43920cf_path_prog=""
43921cf_path_args=""
43922IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
43923for cf_temp in $ac_cv_path_ZIP
43924do
43925	if test -z "$cf_path_prog" ; then
43926		if test "$with_full_paths" = yes ; then
43927
43928if test "x$prefix" != xNONE; then
43929	cf_path_syntax="$prefix"
43930else
43931	cf_path_syntax="$ac_default_prefix"
43932fi
43933
43934case ".$cf_temp" in
43935(.\$\(*\)*|.\'*\'*)
43936	;;
43937(..|./*|.\\*)
43938	;;
43939(.[a-zA-Z]:[\\/]*) # OS/2 EMX
43940	;;
43941(.\$\{*prefix\}*|.\$\{*dir\}*)
43942	eval cf_temp="$cf_temp"
43943	case ".$cf_temp" in
43944	(.NONE/*)
43945		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43946		;;
43947	esac
43948	;;
43949(.no|.NONE/*)
43950	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
43951	;;
43952(*)
43953	break
43954	;;
43955esac
43956
43957			cf_path_prog="$cf_temp"
43958		else
43959			cf_path_prog="`basename "$cf_temp"`"
43960		fi
43961	elif test -z "$cf_path_args" ; then
43962		cf_path_args="$cf_temp"
43963	else
43964		cf_path_args="$cf_path_args $cf_temp"
43965	fi
43966done
43967IFS="$cf_save_ifs"
43968
43969if test -n "$cf_path_prog" ; then
43970
43971echo "${as_me:-configure}:43971: testing defining path for ${cf_path_prog} ..." 1>&5
43972
43973cat >>confdefs.h <<EOF
43974#define ZIP_PATH "$cf_path_prog"
43975EOF
43976
43977	test -n "$cf_path_args" &&
43978cat >>confdefs.h <<EOF
43979#define ZIP_ARGS "$cf_path_args"
43980EOF
43981
43982fi
43983
43984case "$INSTALL" in
43985($srcdir*)
43986	cat >>confdefs.h <<EOF
43987#define INSTALL_PATH "install"
43988EOF
43989
43990	;;
43991(*)
43992	cf_save_INSTALL="$INSTALL"
43993
43994test -z "$INSTALL" && INSTALL="install"
43995for ac_prog in $INSTALL install
43996do
43997  # Extract the first word of "$ac_prog", so it can be a program name with args.
43998set dummy $ac_prog; ac_word=$2
43999echo "$as_me:43999: checking for $ac_word" >&5
44000echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
44001if test "${ac_cv_path_INSTALL+set}" = set; then
44002  echo $ECHO_N "(cached) $ECHO_C" >&6
44003else
44004  case $INSTALL in
44005  [\\/]* | ?:[\\/]*)
44006  ac_cv_path_INSTALL="$INSTALL" # Let the user override the test with a path.
44007  ;;
44008  *)
44009  ac_save_IFS=$IFS; IFS=$ac_path_separator
44010ac_dummy="$PATH"
44011for ac_dir in $ac_dummy; do
44012  IFS=$ac_save_IFS
44013  test -z "$ac_dir" && ac_dir=.
44014  if $as_executable_p "$ac_dir/$ac_word"; then
44015   ac_cv_path_INSTALL="$ac_dir/$ac_word"
44016   echo "$as_me:44016: found $ac_dir/$ac_word" >&5
44017   break
44018fi
44019done
44020
44021  ;;
44022esac
44023fi
44024INSTALL=$ac_cv_path_INSTALL
44025
44026if test -n "$INSTALL"; then
44027  echo "$as_me:44027: result: $INSTALL" >&5
44028echo "${ECHO_T}$INSTALL" >&6
44029else
44030  echo "$as_me:44030: result: no" >&5
44031echo "${ECHO_T}no" >&6
44032fi
44033
44034  test -n "$INSTALL" && break
44035done
44036test -n "$INSTALL" || INSTALL="$INSTALL"
44037
44038cf_path_prog=""
44039cf_path_args=""
44040IFS="${IFS:- 	}"; cf_save_ifs="$IFS"; IFS="${IFS}$PATH_SEPARATOR"
44041for cf_temp in $ac_cv_path_INSTALL
44042do
44043	if test -z "$cf_path_prog" ; then
44044		if test "$with_full_paths" = yes ; then
44045
44046if test "x$prefix" != xNONE; then
44047	cf_path_syntax="$prefix"
44048else
44049	cf_path_syntax="$ac_default_prefix"
44050fi
44051
44052case ".$cf_temp" in
44053(.\$\(*\)*|.\'*\'*)
44054	;;
44055(..|./*|.\\*)
44056	;;
44057(.[a-zA-Z]:[\\/]*) # OS/2 EMX
44058	;;
44059(.\$\{*prefix\}*|.\$\{*dir\}*)
44060	eval cf_temp="$cf_temp"
44061	case ".$cf_temp" in
44062	(.NONE/*)
44063		cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44064		;;
44065	esac
44066	;;
44067(.no|.NONE/*)
44068	cf_temp=`echo "$cf_temp" | sed -e s%NONE%$cf_path_syntax%`
44069	;;
44070(*)
44071	break
44072	;;
44073esac
44074
44075			cf_path_prog="$cf_temp"
44076		else
44077			cf_path_prog="`basename "$cf_temp"`"
44078		fi
44079	elif test -z "$cf_path_args" ; then
44080		cf_path_args="$cf_temp"
44081	else
44082		cf_path_args="$cf_path_args $cf_temp"
44083	fi
44084done
44085IFS="$cf_save_ifs"
44086
44087if test -n "$cf_path_prog" ; then
44088
44089echo "${as_me:-configure}:44089: testing defining path for ${cf_path_prog} ..." 1>&5
44090
44091cat >>confdefs.h <<EOF
44092#define INSTALL_PATH "$cf_path_prog"
44093EOF
44094
44095	test -n "$cf_path_args" &&
44096cat >>confdefs.h <<EOF
44097#define INSTALL_ARGS "$cf_path_args"
44098EOF
44099
44100fi
44101
44102	INSTALL="$cf_save_INSTALL"
44103	;;
44104esac
44105fi
44106
44107COMPRESS_PROG=
44108COMPRESS_EXT=
44109if test "$use_gzip_help" = yes ; then
44110	COMPRESS_PROG="$ac_cv_path_GZIP -9 -n"
44111	COMPRESS_EXT=.gz
44112fi
44113
44114if test "$cf_cv_screen" = pdcurses ; then
44115
44116	case "$host_os" in
44117	(mingw*)
44118
44119echo "$as_me:44119: checking for initscr in -lpdcurses" >&5
44120echo $ECHO_N "checking for initscr in -lpdcurses... $ECHO_C" >&6
44121if test "${ac_cv_lib_pdcurses_initscr+set}" = set; then
44122  echo $ECHO_N "(cached) $ECHO_C" >&6
44123else
44124  ac_check_lib_save_LIBS=$LIBS
44125LIBS="-lpdcurses  $LIBS"
44126cat >"conftest.$ac_ext" <<_ACEOF
44127#line 44127 "configure"
44128#include "confdefs.h"
44129
44130/* Override any gcc2 internal prototype to avoid an error.  */
44131#ifdef __cplusplus
44132extern "C"
44133#endif
44134/* We use char because int might match the return type of a gcc2
44135   builtin and then its argument prototype would still apply.  */
44136char initscr ();
44137int
44138main (void)
44139{
44140initscr ();
44141  ;
44142  return 0;
44143}
44144_ACEOF
44145rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44146if { (eval echo "$as_me:44146: \"$ac_link\"") >&5
44147  (eval $ac_link) 2>&5
44148  ac_status=$?
44149  echo "$as_me:44149: \$? = $ac_status" >&5
44150  (exit "$ac_status"); } &&
44151         { ac_try='test -s "conftest$ac_exeext"'
44152  { (eval echo "$as_me:44152: \"$ac_try\"") >&5
44153  (eval $ac_try) 2>&5
44154  ac_status=$?
44155  echo "$as_me:44155: \$? = $ac_status" >&5
44156  (exit "$ac_status"); }; }; then
44157  ac_cv_lib_pdcurses_initscr=yes
44158else
44159  echo "$as_me: failed program was:" >&5
44160cat "conftest.$ac_ext" >&5
44161ac_cv_lib_pdcurses_initscr=no
44162fi
44163rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44164LIBS=$ac_check_lib_save_LIBS
44165fi
44166echo "$as_me:44166: result: $ac_cv_lib_pdcurses_initscr" >&5
44167echo "${ECHO_T}$ac_cv_lib_pdcurses_initscr" >&6
44168if test "$ac_cv_lib_pdcurses_initscr" = yes; then
44169
44170cf_add_libs="$LIBS"
44171# reverse order
44172cf_add_0lib=
44173for cf_add_1lib in -lpdcurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44174# filter duplicates
44175for cf_add_1lib in $cf_add_0lib; do
44176	for cf_add_2lib in $cf_add_libs; do
44177		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
44178			cf_add_1lib=
44179			break
44180		fi
44181	done
44182	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
44183done
44184LIBS="$cf_add_libs"
44185
44186	cf_cv_term_header=no
44187	cf_cv_unctrl_header=no
44188	echo "$as_me:44188: checking for winwstr" >&5
44189echo $ECHO_N "checking for winwstr... $ECHO_C" >&6
44190if test "${ac_cv_func_winwstr+set}" = set; then
44191  echo $ECHO_N "(cached) $ECHO_C" >&6
44192else
44193  cat >"conftest.$ac_ext" <<_ACEOF
44194#line 44194 "configure"
44195#include "confdefs.h"
44196#define winwstr autoconf_temporary
44197#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
44198#undef winwstr
44199
44200#ifdef __cplusplus
44201extern "C"
44202#endif
44203
44204/* We use char because int might match the return type of a gcc2
44205   builtin and then its argument prototype would still apply.  */
44206char winwstr (void);
44207
44208int
44209main (void)
44210{
44211
44212/* The GNU C library defines stubs for functions which it implements
44213    to always fail with ENOSYS.  Some functions are actually named
44214    something starting with __ and the normal name is an alias.  */
44215#if defined (__stub_winwstr) || defined (__stub___winwstr)
44216#error found stub for winwstr
44217#endif
44218
44219	return winwstr ();
44220  ;
44221  return 0;
44222}
44223_ACEOF
44224rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44225if { (eval echo "$as_me:44225: \"$ac_link\"") >&5
44226  (eval $ac_link) 2>&5
44227  ac_status=$?
44228  echo "$as_me:44228: \$? = $ac_status" >&5
44229  (exit "$ac_status"); } &&
44230         { ac_try='test -s "conftest$ac_exeext"'
44231  { (eval echo "$as_me:44231: \"$ac_try\"") >&5
44232  (eval $ac_try) 2>&5
44233  ac_status=$?
44234  echo "$as_me:44234: \$? = $ac_status" >&5
44235  (exit "$ac_status"); }; }; then
44236  ac_cv_func_winwstr=yes
44237else
44238  echo "$as_me: failed program was:" >&5
44239cat "conftest.$ac_ext" >&5
44240ac_cv_func_winwstr=no
44241fi
44242rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44243fi
44244echo "$as_me:44244: result: $ac_cv_func_winwstr" >&5
44245echo "${ECHO_T}$ac_cv_func_winwstr" >&6
44246if test "$ac_cv_func_winwstr" = yes; then
44247
44248cat >>confdefs.h <<\EOF
44249#define PDC_WIDE 1
44250EOF
44251
44252fi
44253
44254	echo "$as_me:44254: checking for pdcurses_dll_iname" >&5
44255echo $ECHO_N "checking for pdcurses_dll_iname... $ECHO_C" >&6
44256if test "${ac_cv_func_pdcurses_dll_iname+set}" = set; then
44257  echo $ECHO_N "(cached) $ECHO_C" >&6
44258else
44259  cat >"conftest.$ac_ext" <<_ACEOF
44260#line 44260 "configure"
44261#include "confdefs.h"
44262#define pdcurses_dll_iname autoconf_temporary
44263#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
44264#undef pdcurses_dll_iname
44265
44266#ifdef __cplusplus
44267extern "C"
44268#endif
44269
44270/* We use char because int might match the return type of a gcc2
44271   builtin and then its argument prototype would still apply.  */
44272char pdcurses_dll_iname (void);
44273
44274int
44275main (void)
44276{
44277
44278/* The GNU C library defines stubs for functions which it implements
44279    to always fail with ENOSYS.  Some functions are actually named
44280    something starting with __ and the normal name is an alias.  */
44281#if defined (__stub_pdcurses_dll_iname) || defined (__stub___pdcurses_dll_iname)
44282#error found stub for pdcurses_dll_iname
44283#endif
44284
44285	return pdcurses_dll_iname ();
44286  ;
44287  return 0;
44288}
44289_ACEOF
44290rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44291if { (eval echo "$as_me:44291: \"$ac_link\"") >&5
44292  (eval $ac_link) 2>&5
44293  ac_status=$?
44294  echo "$as_me:44294: \$? = $ac_status" >&5
44295  (exit "$ac_status"); } &&
44296         { ac_try='test -s "conftest$ac_exeext"'
44297  { (eval echo "$as_me:44297: \"$ac_try\"") >&5
44298  (eval $ac_try) 2>&5
44299  ac_status=$?
44300  echo "$as_me:44300: \$? = $ac_status" >&5
44301  (exit "$ac_status"); }; }; then
44302  ac_cv_func_pdcurses_dll_iname=yes
44303else
44304  echo "$as_me: failed program was:" >&5
44305cat "conftest.$ac_ext" >&5
44306ac_cv_func_pdcurses_dll_iname=no
44307fi
44308rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44309fi
44310echo "$as_me:44310: result: $ac_cv_func_pdcurses_dll_iname" >&5
44311echo "${ECHO_T}$ac_cv_func_pdcurses_dll_iname" >&6
44312if test "$ac_cv_func_pdcurses_dll_iname" = yes; then
44313
44314cat >>confdefs.h <<\EOF
44315#define PDC_DLL_BUILD 1
44316EOF
44317
44318fi
44319
44320fi
44321
44322		;;
44323	(*)
44324
44325cf_x_athena=${cf_x_athena:-Xaw}
44326
44327echo "$as_me:44327: checking if you want to link with Xaw 3d library" >&5
44328echo $ECHO_N "checking if you want to link with Xaw 3d library... $ECHO_C" >&6
44329withval=
44330
44331# Check whether --with-Xaw3d or --without-Xaw3d was given.
44332if test "${with_Xaw3d+set}" = set; then
44333  withval="$with_Xaw3d"
44334
44335fi;
44336if test "$withval" = yes ; then
44337	cf_x_athena=Xaw3d
44338	echo "$as_me:44338: result: yes" >&5
44339echo "${ECHO_T}yes" >&6
44340else
44341	echo "$as_me:44341: result: no" >&5
44342echo "${ECHO_T}no" >&6
44343fi
44344
44345echo "$as_me:44345: checking if you want to link with Xaw 3d xft library" >&5
44346echo $ECHO_N "checking if you want to link with Xaw 3d xft library... $ECHO_C" >&6
44347withval=
44348
44349# Check whether --with-Xaw3dxft or --without-Xaw3dxft was given.
44350if test "${with_Xaw3dxft+set}" = set; then
44351  withval="$with_Xaw3dxft"
44352
44353fi;
44354if test "$withval" = yes ; then
44355	cf_x_athena=Xaw3dxft
44356	echo "$as_me:44356: result: yes" >&5
44357echo "${ECHO_T}yes" >&6
44358else
44359	echo "$as_me:44359: result: no" >&5
44360echo "${ECHO_T}no" >&6
44361fi
44362
44363echo "$as_me:44363: checking if you want to link with neXT Athena library" >&5
44364echo $ECHO_N "checking if you want to link with neXT Athena library... $ECHO_C" >&6
44365withval=
44366
44367# Check whether --with-neXtaw or --without-neXtaw was given.
44368if test "${with_neXtaw+set}" = set; then
44369  withval="$with_neXtaw"
44370
44371fi;
44372if test "$withval" = yes ; then
44373	cf_x_athena=neXtaw
44374	echo "$as_me:44374: result: yes" >&5
44375echo "${ECHO_T}yes" >&6
44376else
44377	echo "$as_me:44377: result: no" >&5
44378echo "${ECHO_T}no" >&6
44379fi
44380
44381echo "$as_me:44381: checking if you want to link with Athena-Plus library" >&5
44382echo $ECHO_N "checking if you want to link with Athena-Plus library... $ECHO_C" >&6
44383withval=
44384
44385# Check whether --with-XawPlus or --without-XawPlus was given.
44386if test "${with_XawPlus+set}" = set; then
44387  withval="$with_XawPlus"
44388
44389fi;
44390if test "$withval" = yes ; then
44391	cf_x_athena=XawPlus
44392	echo "$as_me:44392: result: yes" >&5
44393echo "${ECHO_T}yes" >&6
44394else
44395	echo "$as_me:44395: result: no" >&5
44396echo "${ECHO_T}no" >&6
44397fi
44398
44399cf_x_athena_lib=""
44400
44401if test "$PKG_CONFIG" != none ; then
44402	cf_athena_list=
44403	test "$cf_x_athena" = Xaw && cf_athena_list="xaw8 xaw7 xaw6"
44404	for cf_athena_pkg in \
44405		$cf_athena_list \
44406		${cf_x_athena} \
44407		${cf_x_athena}-devel \
44408		lib${cf_x_athena} \
44409		lib${cf_x_athena}-devel
44410	do
44411
44412if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "$cf_athena_pkg"; then
44413	test -n "$verbose" && echo "	found package $cf_athena_pkg" 1>&6
44414
44415echo "${as_me:-configure}:44415: testing found package $cf_athena_pkg ..." 1>&5
44416
44417	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "$cf_athena_pkg" 2>/dev/null`"
44418	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "$cf_athena_pkg" 2>/dev/null`"
44419	test -n "$verbose" && echo "	package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs" 1>&6
44420
44421echo "${as_me:-configure}:44421: testing package $cf_athena_pkg CFLAGS: $cf_pkgconfig_incs ..." 1>&5
44422
44423	test -n "$verbose" && echo "	package $cf_athena_pkg LIBS: $cf_pkgconfig_libs" 1>&6
44424
44425echo "${as_me:-configure}:44425: testing package $cf_athena_pkg LIBS: $cf_pkgconfig_libs ..." 1>&5
44426
44427cf_fix_cppflags=no
44428cf_new_cflags=
44429cf_new_cppflags=
44430cf_new_extra_cppflags=
44431
44432for cf_add_cflags in $cf_pkgconfig_incs
44433do
44434case "$cf_fix_cppflags" in
44435(no)
44436	case "$cf_add_cflags" in
44437	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
44438		case "$cf_add_cflags" in
44439		(-D*)
44440			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
44441
44442			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44443				&& test -z "${cf_tst_cflags}" \
44444				&& cf_fix_cppflags=yes
44445
44446			if test "$cf_fix_cppflags" = yes ; then
44447
44448	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44449	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44450
44451				continue
44452			elif test "${cf_tst_cflags}" = "\"'" ; then
44453
44454	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44455	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44456
44457				continue
44458			fi
44459			;;
44460		esac
44461		case "$CPPFLAGS" in
44462		(*$cf_add_cflags)
44463			;;
44464		(*)
44465			case "$cf_add_cflags" in
44466			(-D*)
44467				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
44468
44469CPPFLAGS=`echo "$CPPFLAGS" | \
44470	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
44471		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
44472
44473				;;
44474			esac
44475
44476	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
44477	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
44478
44479			;;
44480		esac
44481		;;
44482	(*)
44483
44484	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
44485	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
44486
44487		;;
44488	esac
44489	;;
44490(yes)
44491
44492	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44493	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44494
44495	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
44496
44497	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44498		&& test -z "${cf_tst_cflags}" \
44499		&& cf_fix_cppflags=no
44500	;;
44501esac
44502done
44503
44504if test -n "$cf_new_cflags" ; then
44505
44506	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
44507	CFLAGS="${CFLAGS}$cf_new_cflags"
44508
44509fi
44510
44511if test -n "$cf_new_cppflags" ; then
44512
44513	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
44514	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
44515
44516fi
44517
44518if test -n "$cf_new_extra_cppflags" ; then
44519
44520	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
44521	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
44522
44523fi
44524
44525cf_add_libs="$LIBS"
44526# reverse order
44527cf_add_0lib=
44528for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44529# filter duplicates
44530for cf_add_1lib in $cf_add_0lib; do
44531	for cf_add_2lib in $cf_add_libs; do
44532		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
44533			cf_add_1lib=
44534			break
44535		fi
44536	done
44537	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
44538done
44539LIBS="$cf_add_libs"
44540
44541			cf_x_athena_lib="$cf_pkgconfig_libs"
44542
44543cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
44544
44545			cat >>confdefs.h <<EOF
44546#define $cf_x_athena_LIBS 1
44547EOF
44548
44549	for cf_trim_lib in Xmu Xt X11
44550	do
44551		case "$LIBS" in
44552		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
44553			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
44554			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
44555
44556echo "${as_me:-configure}:44556: testing ..trimmed $LIBS ..." 1>&5
44557
44558			;;
44559		esac
44560	done
44561
44562echo "$as_me:44562: checking for usable $cf_x_athena/Xmu package" >&5
44563echo $ECHO_N "checking for usable $cf_x_athena/Xmu package... $ECHO_C" >&6
44564if test "${cf_cv_xaw_compat+set}" = set; then
44565  echo $ECHO_N "(cached) $ECHO_C" >&6
44566else
44567
44568cat >"conftest.$ac_ext" <<_ACEOF
44569#line 44569 "configure"
44570#include "confdefs.h"
44571
44572#include <X11/Xmu/CharSet.h>
44573
44574int
44575main (void)
44576{
44577
44578int check = XmuCompareISOLatin1("big", "small");
44579(void)check;
44580
44581  ;
44582  return 0;
44583}
44584_ACEOF
44585rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44586if { (eval echo "$as_me:44586: \"$ac_link\"") >&5
44587  (eval $ac_link) 2>&5
44588  ac_status=$?
44589  echo "$as_me:44589: \$? = $ac_status" >&5
44590  (exit "$ac_status"); } &&
44591         { ac_try='test -s "conftest$ac_exeext"'
44592  { (eval echo "$as_me:44592: \"$ac_try\"") >&5
44593  (eval $ac_try) 2>&5
44594  ac_status=$?
44595  echo "$as_me:44595: \$? = $ac_status" >&5
44596  (exit "$ac_status"); }; }; then
44597  cf_cv_xaw_compat=yes
44598else
44599  echo "$as_me: failed program was:" >&5
44600cat "conftest.$ac_ext" >&5
44601cf_cv_xaw_compat=no
44602fi
44603rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44604fi
44605echo "$as_me:44605: result: $cf_cv_xaw_compat" >&5
44606echo "${ECHO_T}$cf_cv_xaw_compat" >&6
44607
44608			if test "$cf_cv_xaw_compat" = no
44609			then
44610				# workaround for broken ".pc" files...
44611				case "$cf_x_athena_lib" in
44612				(*-lXmu*)
44613					;;
44614				(*)
44615					test -n "$verbose" && echo "	work around broken package" 1>&6
44616
44617echo "${as_me:-configure}:44617: testing work around broken package ..." 1>&5
44618
44619					cf_save_xmu="$LIBS"
44620					cf_first_lib=`echo "$cf_save_xmu" | sed -e 's/^  *//' -e 's/ .*//'`
44621
44622if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xmu"; then
44623	test -n "$verbose" && echo "	found package xmu" 1>&6
44624
44625echo "${as_me:-configure}:44625: testing found package xmu ..." 1>&5
44626
44627	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xmu" 2>/dev/null`"
44628	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xmu" 2>/dev/null`"
44629	test -n "$verbose" && echo "	package xmu CFLAGS: $cf_pkgconfig_incs" 1>&6
44630
44631echo "${as_me:-configure}:44631: testing package xmu CFLAGS: $cf_pkgconfig_incs ..." 1>&5
44632
44633	test -n "$verbose" && echo "	package xmu LIBS: $cf_pkgconfig_libs" 1>&6
44634
44635echo "${as_me:-configure}:44635: testing package xmu LIBS: $cf_pkgconfig_libs ..." 1>&5
44636
44637cf_fix_cppflags=no
44638cf_new_cflags=
44639cf_new_cppflags=
44640cf_new_extra_cppflags=
44641
44642for cf_add_cflags in $cf_pkgconfig_incs
44643do
44644case "$cf_fix_cppflags" in
44645(no)
44646	case "$cf_add_cflags" in
44647	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
44648		case "$cf_add_cflags" in
44649		(-D*)
44650			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
44651
44652			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44653				&& test -z "${cf_tst_cflags}" \
44654				&& cf_fix_cppflags=yes
44655
44656			if test "$cf_fix_cppflags" = yes ; then
44657
44658	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44659	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44660
44661				continue
44662			elif test "${cf_tst_cflags}" = "\"'" ; then
44663
44664	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44665	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44666
44667				continue
44668			fi
44669			;;
44670		esac
44671		case "$CPPFLAGS" in
44672		(*$cf_add_cflags)
44673			;;
44674		(*)
44675			case "$cf_add_cflags" in
44676			(-D*)
44677				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
44678
44679CPPFLAGS=`echo "$CPPFLAGS" | \
44680	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
44681		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
44682
44683				;;
44684			esac
44685
44686	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
44687	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
44688
44689			;;
44690		esac
44691		;;
44692	(*)
44693
44694	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
44695	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
44696
44697		;;
44698	esac
44699	;;
44700(yes)
44701
44702	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44703	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44704
44705	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
44706
44707	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44708		&& test -z "${cf_tst_cflags}" \
44709		&& cf_fix_cppflags=no
44710	;;
44711esac
44712done
44713
44714if test -n "$cf_new_cflags" ; then
44715
44716	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
44717	CFLAGS="${CFLAGS}$cf_new_cflags"
44718
44719fi
44720
44721if test -n "$cf_new_cppflags" ; then
44722
44723	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
44724	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
44725
44726fi
44727
44728if test -n "$cf_new_extra_cppflags" ; then
44729
44730	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
44731	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
44732
44733fi
44734
44735cf_add_libs="$LIBS"
44736# reverse order
44737cf_add_0lib=
44738for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44739# filter duplicates
44740for cf_add_1lib in $cf_add_0lib; do
44741	for cf_add_2lib in $cf_add_libs; do
44742		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
44743			cf_add_1lib=
44744			break
44745		fi
44746	done
44747	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
44748done
44749LIBS="$cf_add_libs"
44750
44751							LIBS="$cf_save_xmu"
44752
44753test -n "$verbose" && echo "	...before $LIBS" 1>&6
44754
44755echo "${as_me:-configure}:44755: testing ...before $LIBS ..." 1>&5
44756
44757LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib $cf_pkgconfig_libs %" -e 's%  % %g'`
44758test -n "$verbose" && echo "	...after  $LIBS" 1>&6
44759
44760echo "${as_me:-configure}:44760: testing ...after  $LIBS ..." 1>&5
44761
44762else
44763	cf_pkgconfig_incs=
44764	cf_pkgconfig_libs=
44765
44766test -n "$verbose" && echo "	...before $LIBS" 1>&6
44767
44768echo "${as_me:-configure}:44768: testing ...before $LIBS ..." 1>&5
44769
44770LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%$cf_first_lib %$cf_first_lib -lXmu %" -e 's%  % %g'`
44771test -n "$verbose" && echo "	...after  $LIBS" 1>&6
44772
44773echo "${as_me:-configure}:44773: testing ...after  $LIBS ..." 1>&5
44774
44775fi
44776
44777	for cf_trim_lib in Xmu Xt X11
44778	do
44779		case "$LIBS" in
44780		(*-l$cf_trim_lib\ *-l$cf_trim_lib*)
44781			LIBS=`echo "$LIBS " | sed -e 's/  / /g' -e 's%-l'"$cf_trim_lib"' %%' -e 's/ $//'`
44782			test -n "$verbose" && echo "	..trimmed $LIBS" 1>&6
44783
44784echo "${as_me:-configure}:44784: testing ..trimmed $LIBS ..." 1>&5
44785
44786			;;
44787		esac
44788	done
44789
44790					;;
44791				esac
44792			fi
44793
44794			break
44795else
44796	cf_pkgconfig_incs=
44797	cf_pkgconfig_libs=
44798	:
44799fi
44800
44801	done
44802fi
44803
44804if test -z "$cf_x_athena_lib" ; then
44805
44806if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "Xext"; then
44807	test -n "$verbose" && echo "	found package Xext" 1>&6
44808
44809echo "${as_me:-configure}:44809: testing found package Xext ..." 1>&5
44810
44811	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "Xext" 2>/dev/null`"
44812	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "Xext" 2>/dev/null`"
44813	test -n "$verbose" && echo "	package Xext CFLAGS: $cf_pkgconfig_incs" 1>&6
44814
44815echo "${as_me:-configure}:44815: testing package Xext CFLAGS: $cf_pkgconfig_incs ..." 1>&5
44816
44817	test -n "$verbose" && echo "	package Xext LIBS: $cf_pkgconfig_libs" 1>&6
44818
44819echo "${as_me:-configure}:44819: testing package Xext LIBS: $cf_pkgconfig_libs ..." 1>&5
44820
44821cf_fix_cppflags=no
44822cf_new_cflags=
44823cf_new_cppflags=
44824cf_new_extra_cppflags=
44825
44826for cf_add_cflags in $cf_pkgconfig_incs
44827do
44828case "$cf_fix_cppflags" in
44829(no)
44830	case "$cf_add_cflags" in
44831	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
44832		case "$cf_add_cflags" in
44833		(-D*)
44834			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
44835
44836			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44837				&& test -z "${cf_tst_cflags}" \
44838				&& cf_fix_cppflags=yes
44839
44840			if test "$cf_fix_cppflags" = yes ; then
44841
44842	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44843	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44844
44845				continue
44846			elif test "${cf_tst_cflags}" = "\"'" ; then
44847
44848	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44849	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44850
44851				continue
44852			fi
44853			;;
44854		esac
44855		case "$CPPFLAGS" in
44856		(*$cf_add_cflags)
44857			;;
44858		(*)
44859			case "$cf_add_cflags" in
44860			(-D*)
44861				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
44862
44863CPPFLAGS=`echo "$CPPFLAGS" | \
44864	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
44865		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
44866
44867				;;
44868			esac
44869
44870	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
44871	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
44872
44873			;;
44874		esac
44875		;;
44876	(*)
44877
44878	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
44879	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
44880
44881		;;
44882	esac
44883	;;
44884(yes)
44885
44886	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
44887	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
44888
44889	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
44890
44891	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
44892		&& test -z "${cf_tst_cflags}" \
44893		&& cf_fix_cppflags=no
44894	;;
44895esac
44896done
44897
44898if test -n "$cf_new_cflags" ; then
44899
44900	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
44901	CFLAGS="${CFLAGS}$cf_new_cflags"
44902
44903fi
44904
44905if test -n "$cf_new_cppflags" ; then
44906
44907	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
44908	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
44909
44910fi
44911
44912if test -n "$cf_new_extra_cppflags" ; then
44913
44914	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
44915	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
44916
44917fi
44918
44919cf_add_libs="$LIBS"
44920# reverse order
44921cf_add_0lib=
44922for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44923# filter duplicates
44924for cf_add_1lib in $cf_add_0lib; do
44925	for cf_add_2lib in $cf_add_libs; do
44926		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
44927			cf_add_1lib=
44928			break
44929		fi
44930	done
44931	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
44932done
44933LIBS="$cf_add_libs"
44934
44935	:
44936else
44937	cf_pkgconfig_incs=
44938	cf_pkgconfig_libs=
44939
44940	echo "$as_me:44940: checking for XextCreateExtension in -lXext" >&5
44941echo $ECHO_N "checking for XextCreateExtension in -lXext... $ECHO_C" >&6
44942if test "${ac_cv_lib_Xext_XextCreateExtension+set}" = set; then
44943  echo $ECHO_N "(cached) $ECHO_C" >&6
44944else
44945  ac_check_lib_save_LIBS=$LIBS
44946LIBS="-lXext  $LIBS"
44947cat >"conftest.$ac_ext" <<_ACEOF
44948#line 44948 "configure"
44949#include "confdefs.h"
44950
44951/* Override any gcc2 internal prototype to avoid an error.  */
44952#ifdef __cplusplus
44953extern "C"
44954#endif
44955/* We use char because int might match the return type of a gcc2
44956   builtin and then its argument prototype would still apply.  */
44957char XextCreateExtension ();
44958int
44959main (void)
44960{
44961XextCreateExtension ();
44962  ;
44963  return 0;
44964}
44965_ACEOF
44966rm -f "conftest.$ac_objext" "conftest$ac_exeext"
44967if { (eval echo "$as_me:44967: \"$ac_link\"") >&5
44968  (eval $ac_link) 2>&5
44969  ac_status=$?
44970  echo "$as_me:44970: \$? = $ac_status" >&5
44971  (exit "$ac_status"); } &&
44972         { ac_try='test -s "conftest$ac_exeext"'
44973  { (eval echo "$as_me:44973: \"$ac_try\"") >&5
44974  (eval $ac_try) 2>&5
44975  ac_status=$?
44976  echo "$as_me:44976: \$? = $ac_status" >&5
44977  (exit "$ac_status"); }; }; then
44978  ac_cv_lib_Xext_XextCreateExtension=yes
44979else
44980  echo "$as_me: failed program was:" >&5
44981cat "conftest.$ac_ext" >&5
44982ac_cv_lib_Xext_XextCreateExtension=no
44983fi
44984rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
44985LIBS=$ac_check_lib_save_LIBS
44986fi
44987echo "$as_me:44987: result: $ac_cv_lib_Xext_XextCreateExtension" >&5
44988echo "${ECHO_T}$ac_cv_lib_Xext_XextCreateExtension" >&6
44989if test "$ac_cv_lib_Xext_XextCreateExtension" = yes; then
44990
44991cf_add_libs="$LIBS"
44992# reverse order
44993cf_add_0lib=
44994for cf_add_1lib in -lXext; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
44995# filter duplicates
44996for cf_add_1lib in $cf_add_0lib; do
44997	for cf_add_2lib in $cf_add_libs; do
44998		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
44999			cf_add_1lib=
45000			break
45001		fi
45002	done
45003	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45004done
45005LIBS="$cf_add_libs"
45006
45007fi
45008
45009fi
45010
45011# OSX is schizoid about who owns /usr/X11 (old) versus /opt/X11 (new) (and
45012# in some cases has installed dummy files in the former, other cases replaced
45013# it with a link to the new location).  This complicates the configure script.
45014# Check for that pitfall, and recover using pkg-config
45015#
45016# If none of these are set, the configuration is almost certainly broken.
45017if test -z "${X_CFLAGS}${X_PRE_LIBS}${X_LIBS}${X_EXTRA_LIBS}"
45018then
45019
45020if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
45021	test -n "$verbose" && echo "	found package x11" 1>&6
45022
45023echo "${as_me:-configure}:45023: testing found package x11 ..." 1>&5
45024
45025	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
45026	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
45027	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
45028
45029echo "${as_me:-configure}:45029: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45030
45031	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
45032
45033echo "${as_me:-configure}:45033: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
45034
45035cf_fix_cppflags=no
45036cf_new_cflags=
45037cf_new_cppflags=
45038cf_new_extra_cppflags=
45039
45040for cf_add_cflags in $cf_pkgconfig_incs
45041do
45042case "$cf_fix_cppflags" in
45043(no)
45044	case "$cf_add_cflags" in
45045	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45046		case "$cf_add_cflags" in
45047		(-D*)
45048			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45049
45050			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45051				&& test -z "${cf_tst_cflags}" \
45052				&& cf_fix_cppflags=yes
45053
45054			if test "$cf_fix_cppflags" = yes ; then
45055
45056	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45057	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45058
45059				continue
45060			elif test "${cf_tst_cflags}" = "\"'" ; then
45061
45062	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45063	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45064
45065				continue
45066			fi
45067			;;
45068		esac
45069		case "$CPPFLAGS" in
45070		(*$cf_add_cflags)
45071			;;
45072		(*)
45073			case "$cf_add_cflags" in
45074			(-D*)
45075				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45076
45077CPPFLAGS=`echo "$CPPFLAGS" | \
45078	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45079		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45080
45081				;;
45082			esac
45083
45084	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45085	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45086
45087			;;
45088		esac
45089		;;
45090	(*)
45091
45092	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45093	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45094
45095		;;
45096	esac
45097	;;
45098(yes)
45099
45100	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45101	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45102
45103	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45104
45105	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45106		&& test -z "${cf_tst_cflags}" \
45107		&& cf_fix_cppflags=no
45108	;;
45109esac
45110done
45111
45112if test -n "$cf_new_cflags" ; then
45113
45114	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45115	CFLAGS="${CFLAGS}$cf_new_cflags"
45116
45117fi
45118
45119if test -n "$cf_new_cppflags" ; then
45120
45121	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45122	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45123
45124fi
45125
45126if test -n "$cf_new_extra_cppflags" ; then
45127
45128	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45129	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45130
45131fi
45132
45133cf_add_libs="$LIBS"
45134# reverse order
45135cf_add_0lib=
45136for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45137# filter duplicates
45138for cf_add_1lib in $cf_add_0lib; do
45139	for cf_add_2lib in $cf_add_libs; do
45140		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45141			cf_add_1lib=
45142			break
45143		fi
45144	done
45145	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45146done
45147LIBS="$cf_add_libs"
45148
45149	:
45150else
45151	cf_pkgconfig_incs=
45152	cf_pkgconfig_libs=
45153	{ echo "$as_me:45153: WARNING: unable to find X11 library" >&5
45154echo "$as_me: WARNING: unable to find X11 library" >&2;}
45155fi
45156
45157if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
45158	test -n "$verbose" && echo "	found package ice" 1>&6
45159
45160echo "${as_me:-configure}:45160: testing found package ice ..." 1>&5
45161
45162	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
45163	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
45164	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
45165
45166echo "${as_me:-configure}:45166: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45167
45168	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
45169
45170echo "${as_me:-configure}:45170: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
45171
45172cf_fix_cppflags=no
45173cf_new_cflags=
45174cf_new_cppflags=
45175cf_new_extra_cppflags=
45176
45177for cf_add_cflags in $cf_pkgconfig_incs
45178do
45179case "$cf_fix_cppflags" in
45180(no)
45181	case "$cf_add_cflags" in
45182	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45183		case "$cf_add_cflags" in
45184		(-D*)
45185			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45186
45187			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45188				&& test -z "${cf_tst_cflags}" \
45189				&& cf_fix_cppflags=yes
45190
45191			if test "$cf_fix_cppflags" = yes ; then
45192
45193	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45194	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45195
45196				continue
45197			elif test "${cf_tst_cflags}" = "\"'" ; then
45198
45199	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45200	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45201
45202				continue
45203			fi
45204			;;
45205		esac
45206		case "$CPPFLAGS" in
45207		(*$cf_add_cflags)
45208			;;
45209		(*)
45210			case "$cf_add_cflags" in
45211			(-D*)
45212				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45213
45214CPPFLAGS=`echo "$CPPFLAGS" | \
45215	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45216		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45217
45218				;;
45219			esac
45220
45221	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45222	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45223
45224			;;
45225		esac
45226		;;
45227	(*)
45228
45229	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45230	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45231
45232		;;
45233	esac
45234	;;
45235(yes)
45236
45237	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45238	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45239
45240	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45241
45242	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45243		&& test -z "${cf_tst_cflags}" \
45244		&& cf_fix_cppflags=no
45245	;;
45246esac
45247done
45248
45249if test -n "$cf_new_cflags" ; then
45250
45251	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45252	CFLAGS="${CFLAGS}$cf_new_cflags"
45253
45254fi
45255
45256if test -n "$cf_new_cppflags" ; then
45257
45258	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45259	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45260
45261fi
45262
45263if test -n "$cf_new_extra_cppflags" ; then
45264
45265	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45266	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45267
45268fi
45269
45270cf_add_libs="$LIBS"
45271# reverse order
45272cf_add_0lib=
45273for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45274# filter duplicates
45275for cf_add_1lib in $cf_add_0lib; do
45276	for cf_add_2lib in $cf_add_libs; do
45277		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45278			cf_add_1lib=
45279			break
45280		fi
45281	done
45282	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45283done
45284LIBS="$cf_add_libs"
45285
45286	:
45287else
45288	cf_pkgconfig_incs=
45289	cf_pkgconfig_libs=
45290	{ echo "$as_me:45290: WARNING: unable to find ICE library" >&5
45291echo "$as_me: WARNING: unable to find ICE library" >&2;}
45292fi
45293
45294if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
45295	test -n "$verbose" && echo "	found package sm" 1>&6
45296
45297echo "${as_me:-configure}:45297: testing found package sm ..." 1>&5
45298
45299	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
45300	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
45301	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
45302
45303echo "${as_me:-configure}:45303: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45304
45305	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
45306
45307echo "${as_me:-configure}:45307: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
45308
45309cf_fix_cppflags=no
45310cf_new_cflags=
45311cf_new_cppflags=
45312cf_new_extra_cppflags=
45313
45314for cf_add_cflags in $cf_pkgconfig_incs
45315do
45316case "$cf_fix_cppflags" in
45317(no)
45318	case "$cf_add_cflags" in
45319	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45320		case "$cf_add_cflags" in
45321		(-D*)
45322			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45323
45324			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45325				&& test -z "${cf_tst_cflags}" \
45326				&& cf_fix_cppflags=yes
45327
45328			if test "$cf_fix_cppflags" = yes ; then
45329
45330	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45331	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45332
45333				continue
45334			elif test "${cf_tst_cflags}" = "\"'" ; then
45335
45336	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45337	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45338
45339				continue
45340			fi
45341			;;
45342		esac
45343		case "$CPPFLAGS" in
45344		(*$cf_add_cflags)
45345			;;
45346		(*)
45347			case "$cf_add_cflags" in
45348			(-D*)
45349				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45350
45351CPPFLAGS=`echo "$CPPFLAGS" | \
45352	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45353		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45354
45355				;;
45356			esac
45357
45358	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45359	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45360
45361			;;
45362		esac
45363		;;
45364	(*)
45365
45366	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45367	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45368
45369		;;
45370	esac
45371	;;
45372(yes)
45373
45374	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45375	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45376
45377	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45378
45379	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45380		&& test -z "${cf_tst_cflags}" \
45381		&& cf_fix_cppflags=no
45382	;;
45383esac
45384done
45385
45386if test -n "$cf_new_cflags" ; then
45387
45388	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45389	CFLAGS="${CFLAGS}$cf_new_cflags"
45390
45391fi
45392
45393if test -n "$cf_new_cppflags" ; then
45394
45395	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45396	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45397
45398fi
45399
45400if test -n "$cf_new_extra_cppflags" ; then
45401
45402	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45403	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45404
45405fi
45406
45407cf_add_libs="$LIBS"
45408# reverse order
45409cf_add_0lib=
45410for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45411# filter duplicates
45412for cf_add_1lib in $cf_add_0lib; do
45413	for cf_add_2lib in $cf_add_libs; do
45414		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45415			cf_add_1lib=
45416			break
45417		fi
45418	done
45419	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45420done
45421LIBS="$cf_add_libs"
45422
45423	:
45424else
45425	cf_pkgconfig_incs=
45426	cf_pkgconfig_libs=
45427	{ echo "$as_me:45427: WARNING: unable to find SM library" >&5
45428echo "$as_me: WARNING: unable to find SM library" >&2;}
45429fi
45430
45431if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
45432	test -n "$verbose" && echo "	found package xt" 1>&6
45433
45434echo "${as_me:-configure}:45434: testing found package xt ..." 1>&5
45435
45436	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
45437	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
45438	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
45439
45440echo "${as_me:-configure}:45440: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45441
45442	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
45443
45444echo "${as_me:-configure}:45444: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
45445
45446cf_fix_cppflags=no
45447cf_new_cflags=
45448cf_new_cppflags=
45449cf_new_extra_cppflags=
45450
45451for cf_add_cflags in $cf_pkgconfig_incs
45452do
45453case "$cf_fix_cppflags" in
45454(no)
45455	case "$cf_add_cflags" in
45456	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45457		case "$cf_add_cflags" in
45458		(-D*)
45459			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45460
45461			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45462				&& test -z "${cf_tst_cflags}" \
45463				&& cf_fix_cppflags=yes
45464
45465			if test "$cf_fix_cppflags" = yes ; then
45466
45467	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45468	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45469
45470				continue
45471			elif test "${cf_tst_cflags}" = "\"'" ; then
45472
45473	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45474	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45475
45476				continue
45477			fi
45478			;;
45479		esac
45480		case "$CPPFLAGS" in
45481		(*$cf_add_cflags)
45482			;;
45483		(*)
45484			case "$cf_add_cflags" in
45485			(-D*)
45486				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45487
45488CPPFLAGS=`echo "$CPPFLAGS" | \
45489	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45490		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45491
45492				;;
45493			esac
45494
45495	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45496	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45497
45498			;;
45499		esac
45500		;;
45501	(*)
45502
45503	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45504	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45505
45506		;;
45507	esac
45508	;;
45509(yes)
45510
45511	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45512	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45513
45514	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45515
45516	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45517		&& test -z "${cf_tst_cflags}" \
45518		&& cf_fix_cppflags=no
45519	;;
45520esac
45521done
45522
45523if test -n "$cf_new_cflags" ; then
45524
45525	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45526	CFLAGS="${CFLAGS}$cf_new_cflags"
45527
45528fi
45529
45530if test -n "$cf_new_cppflags" ; then
45531
45532	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45533	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45534
45535fi
45536
45537if test -n "$cf_new_extra_cppflags" ; then
45538
45539	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45540	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45541
45542fi
45543
45544cf_add_libs="$LIBS"
45545# reverse order
45546cf_add_0lib=
45547for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45548# filter duplicates
45549for cf_add_1lib in $cf_add_0lib; do
45550	for cf_add_2lib in $cf_add_libs; do
45551		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45552			cf_add_1lib=
45553			break
45554		fi
45555	done
45556	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45557done
45558LIBS="$cf_add_libs"
45559
45560	:
45561else
45562	cf_pkgconfig_incs=
45563	cf_pkgconfig_libs=
45564	{ echo "$as_me:45564: WARNING: unable to find Xt library" >&5
45565echo "$as_me: WARNING: unable to find Xt library" >&2;}
45566fi
45567
45568else
45569	LIBS="$X_PRE_LIBS $LIBS $X_EXTRA_LIBS"
45570fi
45571
45572cf_have_X_LIBS=no
45573
45574if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "xt"; then
45575	test -n "$verbose" && echo "	found package xt" 1>&6
45576
45577echo "${as_me:-configure}:45577: testing found package xt ..." 1>&5
45578
45579	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "xt" 2>/dev/null`"
45580	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "xt" 2>/dev/null`"
45581	test -n "$verbose" && echo "	package xt CFLAGS: $cf_pkgconfig_incs" 1>&6
45582
45583echo "${as_me:-configure}:45583: testing package xt CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45584
45585	test -n "$verbose" && echo "	package xt LIBS: $cf_pkgconfig_libs" 1>&6
45586
45587echo "${as_me:-configure}:45587: testing package xt LIBS: $cf_pkgconfig_libs ..." 1>&5
45588
45589cf_fix_cppflags=no
45590cf_new_cflags=
45591cf_new_cppflags=
45592cf_new_extra_cppflags=
45593
45594for cf_add_cflags in $cf_pkgconfig_incs
45595do
45596case "$cf_fix_cppflags" in
45597(no)
45598	case "$cf_add_cflags" in
45599	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45600		case "$cf_add_cflags" in
45601		(-D*)
45602			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45603
45604			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45605				&& test -z "${cf_tst_cflags}" \
45606				&& cf_fix_cppflags=yes
45607
45608			if test "$cf_fix_cppflags" = yes ; then
45609
45610	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45611	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45612
45613				continue
45614			elif test "${cf_tst_cflags}" = "\"'" ; then
45615
45616	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45617	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45618
45619				continue
45620			fi
45621			;;
45622		esac
45623		case "$CPPFLAGS" in
45624		(*$cf_add_cflags)
45625			;;
45626		(*)
45627			case "$cf_add_cflags" in
45628			(-D*)
45629				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45630
45631CPPFLAGS=`echo "$CPPFLAGS" | \
45632	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45633		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45634
45635				;;
45636			esac
45637
45638	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45639	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45640
45641			;;
45642		esac
45643		;;
45644	(*)
45645
45646	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45647	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45648
45649		;;
45650	esac
45651	;;
45652(yes)
45653
45654	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45655	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45656
45657	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45658
45659	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45660		&& test -z "${cf_tst_cflags}" \
45661		&& cf_fix_cppflags=no
45662	;;
45663esac
45664done
45665
45666if test -n "$cf_new_cflags" ; then
45667
45668	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45669	CFLAGS="${CFLAGS}$cf_new_cflags"
45670
45671fi
45672
45673if test -n "$cf_new_cppflags" ; then
45674
45675	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45676	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45677
45678fi
45679
45680if test -n "$cf_new_extra_cppflags" ; then
45681
45682	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45683	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45684
45685fi
45686
45687cf_add_libs="$LIBS"
45688# reverse order
45689cf_add_0lib=
45690for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45691# filter duplicates
45692for cf_add_1lib in $cf_add_0lib; do
45693	for cf_add_2lib in $cf_add_libs; do
45694		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45695			cf_add_1lib=
45696			break
45697		fi
45698	done
45699	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45700done
45701LIBS="$cf_add_libs"
45702
45703	case "x$LIBS" in
45704	(*-lX11*)
45705		;;
45706	(*)
45707# we have an "xt" package, but it may omit Xt's dependency on X11
45708echo "$as_me:45708: checking for usable X dependency" >&5
45709echo $ECHO_N "checking for usable X dependency... $ECHO_C" >&6
45710if test "${cf_cv_xt_x11_compat+set}" = set; then
45711  echo $ECHO_N "(cached) $ECHO_C" >&6
45712else
45713
45714cat >"conftest.$ac_ext" <<_ACEOF
45715#line 45715 "configure"
45716#include "confdefs.h"
45717
45718#include <X11/Xlib.h>
45719
45720int
45721main (void)
45722{
45723
45724	int rc1 = XDrawLine((Display*) 0, (Drawable) 0, (GC) 0, 0, 0, 0, 0);
45725	int rc2 = XClearWindow((Display*) 0, (Window) 0);
45726	int rc3 = XMoveWindow((Display*) 0, (Window) 0, 0, 0);
45727	int rc4 = XMoveResizeWindow((Display*)0, (Window)0, 0, 0, 0, 0);
45728
45729  ;
45730  return 0;
45731}
45732_ACEOF
45733rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45734if { (eval echo "$as_me:45734: \"$ac_link\"") >&5
45735  (eval $ac_link) 2>&5
45736  ac_status=$?
45737  echo "$as_me:45737: \$? = $ac_status" >&5
45738  (exit "$ac_status"); } &&
45739         { ac_try='test -s "conftest$ac_exeext"'
45740  { (eval echo "$as_me:45740: \"$ac_try\"") >&5
45741  (eval $ac_try) 2>&5
45742  ac_status=$?
45743  echo "$as_me:45743: \$? = $ac_status" >&5
45744  (exit "$ac_status"); }; }; then
45745  cf_cv_xt_x11_compat=yes
45746else
45747  echo "$as_me: failed program was:" >&5
45748cat "conftest.$ac_ext" >&5
45749cf_cv_xt_x11_compat=no
45750fi
45751rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45752fi
45753echo "$as_me:45753: result: $cf_cv_xt_x11_compat" >&5
45754echo "${ECHO_T}$cf_cv_xt_x11_compat" >&6
45755		if test "$cf_cv_xt_x11_compat" = no
45756		then
45757			test -n "$verbose" && echo "	work around broken X11 dependency" 1>&6
45758
45759echo "${as_me:-configure}:45759: testing work around broken X11 dependency ..." 1>&5
45760
45761			# 2010/11/19 - good enough until a working Xt on Xcb is delivered.
45762
45763if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "x11"; then
45764	test -n "$verbose" && echo "	found package x11" 1>&6
45765
45766echo "${as_me:-configure}:45766: testing found package x11 ..." 1>&5
45767
45768	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "x11" 2>/dev/null`"
45769	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "x11" 2>/dev/null`"
45770	test -n "$verbose" && echo "	package x11 CFLAGS: $cf_pkgconfig_incs" 1>&6
45771
45772echo "${as_me:-configure}:45772: testing package x11 CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45773
45774	test -n "$verbose" && echo "	package x11 LIBS: $cf_pkgconfig_libs" 1>&6
45775
45776echo "${as_me:-configure}:45776: testing package x11 LIBS: $cf_pkgconfig_libs ..." 1>&5
45777
45778cf_fix_cppflags=no
45779cf_new_cflags=
45780cf_new_cppflags=
45781cf_new_extra_cppflags=
45782
45783for cf_add_cflags in $cf_pkgconfig_incs
45784do
45785case "$cf_fix_cppflags" in
45786(no)
45787	case "$cf_add_cflags" in
45788	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45789		case "$cf_add_cflags" in
45790		(-D*)
45791			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45792
45793			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45794				&& test -z "${cf_tst_cflags}" \
45795				&& cf_fix_cppflags=yes
45796
45797			if test "$cf_fix_cppflags" = yes ; then
45798
45799	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45800	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45801
45802				continue
45803			elif test "${cf_tst_cflags}" = "\"'" ; then
45804
45805	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45806	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45807
45808				continue
45809			fi
45810			;;
45811		esac
45812		case "$CPPFLAGS" in
45813		(*$cf_add_cflags)
45814			;;
45815		(*)
45816			case "$cf_add_cflags" in
45817			(-D*)
45818				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
45819
45820CPPFLAGS=`echo "$CPPFLAGS" | \
45821	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
45822		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
45823
45824				;;
45825			esac
45826
45827	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
45828	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
45829
45830			;;
45831		esac
45832		;;
45833	(*)
45834
45835	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
45836	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
45837
45838		;;
45839	esac
45840	;;
45841(yes)
45842
45843	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
45844	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
45845
45846	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
45847
45848	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
45849		&& test -z "${cf_tst_cflags}" \
45850		&& cf_fix_cppflags=no
45851	;;
45852esac
45853done
45854
45855if test -n "$cf_new_cflags" ; then
45856
45857	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
45858	CFLAGS="${CFLAGS}$cf_new_cflags"
45859
45860fi
45861
45862if test -n "$cf_new_cppflags" ; then
45863
45864	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
45865	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
45866
45867fi
45868
45869if test -n "$cf_new_extra_cppflags" ; then
45870
45871	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
45872	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
45873
45874fi
45875
45876cf_add_libs="$LIBS"
45877# reverse order
45878cf_add_0lib=
45879for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
45880# filter duplicates
45881for cf_add_1lib in $cf_add_0lib; do
45882	for cf_add_2lib in $cf_add_libs; do
45883		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
45884			cf_add_1lib=
45885			break
45886		fi
45887	done
45888	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
45889done
45890LIBS="$cf_add_libs"
45891
45892	:
45893else
45894	cf_pkgconfig_incs=
45895	cf_pkgconfig_libs=
45896
45897test -n "$verbose" && echo "	...before $LIBS" 1>&6
45898
45899echo "${as_me:-configure}:45899: testing ...before $LIBS ..." 1>&5
45900
45901LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt -lX11 %" -e 's%  % %g'`
45902test -n "$verbose" && echo "	...after  $LIBS" 1>&6
45903
45904echo "${as_me:-configure}:45904: testing ...after  $LIBS ..." 1>&5
45905
45906fi
45907
45908		fi
45909		;;
45910	esac
45911
45912echo "$as_me:45912: checking for usable X Toolkit package" >&5
45913echo $ECHO_N "checking for usable X Toolkit package... $ECHO_C" >&6
45914if test "${cf_cv_xt_ice_compat+set}" = set; then
45915  echo $ECHO_N "(cached) $ECHO_C" >&6
45916else
45917
45918cat >"conftest.$ac_ext" <<_ACEOF
45919#line 45919 "configure"
45920#include "confdefs.h"
45921
45922#include <X11/Shell.h>
45923
45924int
45925main (void)
45926{
45927int num = IceConnectionNumber(0); (void) num
45928
45929  ;
45930  return 0;
45931}
45932_ACEOF
45933rm -f "conftest.$ac_objext" "conftest$ac_exeext"
45934if { (eval echo "$as_me:45934: \"$ac_link\"") >&5
45935  (eval $ac_link) 2>&5
45936  ac_status=$?
45937  echo "$as_me:45937: \$? = $ac_status" >&5
45938  (exit "$ac_status"); } &&
45939         { ac_try='test -s "conftest$ac_exeext"'
45940  { (eval echo "$as_me:45940: \"$ac_try\"") >&5
45941  (eval $ac_try) 2>&5
45942  ac_status=$?
45943  echo "$as_me:45943: \$? = $ac_status" >&5
45944  (exit "$ac_status"); }; }; then
45945  cf_cv_xt_ice_compat=yes
45946else
45947  echo "$as_me: failed program was:" >&5
45948cat "conftest.$ac_ext" >&5
45949cf_cv_xt_ice_compat=no
45950fi
45951rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
45952fi
45953echo "$as_me:45953: result: $cf_cv_xt_ice_compat" >&5
45954echo "${ECHO_T}$cf_cv_xt_ice_compat" >&6
45955
45956	if test "$cf_cv_xt_ice_compat" = no
45957	then
45958		# workaround for broken ".pc" files used for X Toolkit.
45959		case "x$X_PRE_LIBS" in
45960		(*-lICE*)
45961			case "x$LIBS" in
45962			(*-lICE*)
45963				;;
45964			(*)
45965				test -n "$verbose" && echo "	work around broken ICE dependency" 1>&6
45966
45967echo "${as_me:-configure}:45967: testing work around broken ICE dependency ..." 1>&5
45968
45969if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "ice"; then
45970	test -n "$verbose" && echo "	found package ice" 1>&6
45971
45972echo "${as_me:-configure}:45972: testing found package ice ..." 1>&5
45973
45974	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "ice" 2>/dev/null`"
45975	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "ice" 2>/dev/null`"
45976	test -n "$verbose" && echo "	package ice CFLAGS: $cf_pkgconfig_incs" 1>&6
45977
45978echo "${as_me:-configure}:45978: testing package ice CFLAGS: $cf_pkgconfig_incs ..." 1>&5
45979
45980	test -n "$verbose" && echo "	package ice LIBS: $cf_pkgconfig_libs" 1>&6
45981
45982echo "${as_me:-configure}:45982: testing package ice LIBS: $cf_pkgconfig_libs ..." 1>&5
45983
45984cf_fix_cppflags=no
45985cf_new_cflags=
45986cf_new_cppflags=
45987cf_new_extra_cppflags=
45988
45989for cf_add_cflags in $cf_pkgconfig_incs
45990do
45991case "$cf_fix_cppflags" in
45992(no)
45993	case "$cf_add_cflags" in
45994	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
45995		case "$cf_add_cflags" in
45996		(-D*)
45997			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
45998
45999			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46000				&& test -z "${cf_tst_cflags}" \
46001				&& cf_fix_cppflags=yes
46002
46003			if test "$cf_fix_cppflags" = yes ; then
46004
46005	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46006	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46007
46008				continue
46009			elif test "${cf_tst_cflags}" = "\"'" ; then
46010
46011	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46012	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46013
46014				continue
46015			fi
46016			;;
46017		esac
46018		case "$CPPFLAGS" in
46019		(*$cf_add_cflags)
46020			;;
46021		(*)
46022			case "$cf_add_cflags" in
46023			(-D*)
46024				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46025
46026CPPFLAGS=`echo "$CPPFLAGS" | \
46027	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
46028		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
46029
46030				;;
46031			esac
46032
46033	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46034	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46035
46036			;;
46037		esac
46038		;;
46039	(*)
46040
46041	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46042	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46043
46044		;;
46045	esac
46046	;;
46047(yes)
46048
46049	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46050	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46051
46052	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46053
46054	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46055		&& test -z "${cf_tst_cflags}" \
46056		&& cf_fix_cppflags=no
46057	;;
46058esac
46059done
46060
46061if test -n "$cf_new_cflags" ; then
46062
46063	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46064	CFLAGS="${CFLAGS}$cf_new_cflags"
46065
46066fi
46067
46068if test -n "$cf_new_cppflags" ; then
46069
46070	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46071	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46072
46073fi
46074
46075if test -n "$cf_new_extra_cppflags" ; then
46076
46077	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46078	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46079
46080fi
46081
46082cf_add_libs="$LIBS"
46083# reverse order
46084cf_add_0lib=
46085for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46086# filter duplicates
46087for cf_add_1lib in $cf_add_0lib; do
46088	for cf_add_2lib in $cf_add_libs; do
46089		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46090			cf_add_1lib=
46091			break
46092		fi
46093	done
46094	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46095done
46096LIBS="$cf_add_libs"
46097
46098if test "$PKG_CONFIG" != none && "$PKG_CONFIG" --exists "sm"; then
46099	test -n "$verbose" && echo "	found package sm" 1>&6
46100
46101echo "${as_me:-configure}:46101: testing found package sm ..." 1>&5
46102
46103	cf_pkgconfig_incs="`$PKG_CONFIG --cflags "sm" 2>/dev/null`"
46104	cf_pkgconfig_libs="`$PKG_CONFIG --libs   "sm" 2>/dev/null`"
46105	test -n "$verbose" && echo "	package sm CFLAGS: $cf_pkgconfig_incs" 1>&6
46106
46107echo "${as_me:-configure}:46107: testing package sm CFLAGS: $cf_pkgconfig_incs ..." 1>&5
46108
46109	test -n "$verbose" && echo "	package sm LIBS: $cf_pkgconfig_libs" 1>&6
46110
46111echo "${as_me:-configure}:46111: testing package sm LIBS: $cf_pkgconfig_libs ..." 1>&5
46112
46113cf_fix_cppflags=no
46114cf_new_cflags=
46115cf_new_cppflags=
46116cf_new_extra_cppflags=
46117
46118for cf_add_cflags in $cf_pkgconfig_incs
46119do
46120case "$cf_fix_cppflags" in
46121(no)
46122	case "$cf_add_cflags" in
46123	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46124		case "$cf_add_cflags" in
46125		(-D*)
46126			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46127
46128			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46129				&& test -z "${cf_tst_cflags}" \
46130				&& cf_fix_cppflags=yes
46131
46132			if test "$cf_fix_cppflags" = yes ; then
46133
46134	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46135	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46136
46137				continue
46138			elif test "${cf_tst_cflags}" = "\"'" ; then
46139
46140	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46141	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46142
46143				continue
46144			fi
46145			;;
46146		esac
46147		case "$CPPFLAGS" in
46148		(*$cf_add_cflags)
46149			;;
46150		(*)
46151			case "$cf_add_cflags" in
46152			(-D*)
46153				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46154
46155CPPFLAGS=`echo "$CPPFLAGS" | \
46156	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
46157		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
46158
46159				;;
46160			esac
46161
46162	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46163	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46164
46165			;;
46166		esac
46167		;;
46168	(*)
46169
46170	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46171	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46172
46173		;;
46174	esac
46175	;;
46176(yes)
46177
46178	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46179	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46180
46181	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46182
46183	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46184		&& test -z "${cf_tst_cflags}" \
46185		&& cf_fix_cppflags=no
46186	;;
46187esac
46188done
46189
46190if test -n "$cf_new_cflags" ; then
46191
46192	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46193	CFLAGS="${CFLAGS}$cf_new_cflags"
46194
46195fi
46196
46197if test -n "$cf_new_cppflags" ; then
46198
46199	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46200	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46201
46202fi
46203
46204if test -n "$cf_new_extra_cppflags" ; then
46205
46206	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46207	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46208
46209fi
46210
46211cf_add_libs="$LIBS"
46212# reverse order
46213cf_add_0lib=
46214for cf_add_1lib in $cf_pkgconfig_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46215# filter duplicates
46216for cf_add_1lib in $cf_add_0lib; do
46217	for cf_add_2lib in $cf_add_libs; do
46218		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46219			cf_add_1lib=
46220			break
46221		fi
46222	done
46223	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46224done
46225LIBS="$cf_add_libs"
46226
46227	:
46228else
46229	cf_pkgconfig_incs=
46230	cf_pkgconfig_libs=
46231	:
46232fi
46233
46234else
46235	cf_pkgconfig_incs=
46236	cf_pkgconfig_libs=
46237
46238test -n "$verbose" && echo "	...before $LIBS" 1>&6
46239
46240echo "${as_me:-configure}:46240: testing ...before $LIBS ..." 1>&5
46241
46242LIBS=`echo "$LIBS" | sed -e "s/[ 	][ 	]*/ /g" -e "s%-lXt %-lXt $X_PRE_LIBS %" -e 's%  % %g'`
46243test -n "$verbose" && echo "	...after  $LIBS" 1>&6
46244
46245echo "${as_me:-configure}:46245: testing ...after  $LIBS ..." 1>&5
46246
46247fi
46248
46249				;;
46250			esac
46251			;;
46252		esac
46253	fi
46254
46255	cf_have_X_LIBS=yes
46256
46257else
46258	cf_pkgconfig_incs=
46259	cf_pkgconfig_libs=
46260
46261	LDFLAGS="$X_LIBS $LDFLAGS"
46262
46263test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
46264
46265echo "${as_me:-configure}:46265: testing checking additions to CFLAGS ..." 1>&5
46266
46267cf_check_cflags="$CFLAGS"
46268cf_check_cppflags="$CPPFLAGS"
46269
46270cf_fix_cppflags=no
46271cf_new_cflags=
46272cf_new_cppflags=
46273cf_new_extra_cppflags=
46274
46275for cf_add_cflags in $X_CFLAGS
46276do
46277case "$cf_fix_cppflags" in
46278(no)
46279	case "$cf_add_cflags" in
46280	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
46281		case "$cf_add_cflags" in
46282		(-D*)
46283			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
46284
46285			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46286				&& test -z "${cf_tst_cflags}" \
46287				&& cf_fix_cppflags=yes
46288
46289			if test "$cf_fix_cppflags" = yes ; then
46290
46291	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46292	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46293
46294				continue
46295			elif test "${cf_tst_cflags}" = "\"'" ; then
46296
46297	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46298	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46299
46300				continue
46301			fi
46302			;;
46303		esac
46304		case "$CPPFLAGS" in
46305		(*$cf_add_cflags)
46306			;;
46307		(*)
46308			case "$cf_add_cflags" in
46309			(-D*)
46310				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
46311
46312CPPFLAGS=`echo "$CPPFLAGS" | \
46313	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
46314		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
46315
46316				;;
46317			esac
46318
46319	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
46320	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
46321
46322			;;
46323		esac
46324		;;
46325	(*)
46326
46327	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
46328	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
46329
46330		;;
46331	esac
46332	;;
46333(yes)
46334
46335	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
46336	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
46337
46338	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
46339
46340	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
46341		&& test -z "${cf_tst_cflags}" \
46342		&& cf_fix_cppflags=no
46343	;;
46344esac
46345done
46346
46347if test -n "$cf_new_cflags" ; then
46348	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
46349
46350echo "${as_me:-configure}:46350: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
46351
46352	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
46353	CFLAGS="${CFLAGS}$cf_new_cflags"
46354
46355fi
46356
46357if test -n "$cf_new_cppflags" ; then
46358	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
46359
46360echo "${as_me:-configure}:46360: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
46361
46362	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46363	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
46364
46365fi
46366
46367if test -n "$cf_new_extra_cppflags" ; then
46368	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
46369
46370echo "${as_me:-configure}:46370: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
46371
46372	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
46373	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
46374
46375fi
46376
46377if test "x$cf_check_cflags" != "x$CFLAGS" ; then
46378cat >"conftest.$ac_ext" <<_ACEOF
46379#line 46379 "configure"
46380#include "confdefs.h"
46381#include <stdio.h>
46382int
46383main (void)
46384{
46385printf("Hello world");
46386  ;
46387  return 0;
46388}
46389_ACEOF
46390rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46391if { (eval echo "$as_me:46391: \"$ac_link\"") >&5
46392  (eval $ac_link) 2>&5
46393  ac_status=$?
46394  echo "$as_me:46394: \$? = $ac_status" >&5
46395  (exit "$ac_status"); } &&
46396         { ac_try='test -s "conftest$ac_exeext"'
46397  { (eval echo "$as_me:46397: \"$ac_try\"") >&5
46398  (eval $ac_try) 2>&5
46399  ac_status=$?
46400  echo "$as_me:46400: \$? = $ac_status" >&5
46401  (exit "$ac_status"); }; }; then
46402  :
46403else
46404  echo "$as_me: failed program was:" >&5
46405cat "conftest.$ac_ext" >&5
46406test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
46407
46408echo "${as_me:-configure}:46408: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
46409
46410	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
46411		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
46412
46413echo "${as_me:-configure}:46413: testing but keeping change to \$CPPFLAGS ..." 1>&5
46414
46415	 fi
46416	 CFLAGS="$cf_check_cflags"
46417fi
46418rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46419fi
46420
46421	echo "$as_me:46421: checking for XOpenDisplay" >&5
46422echo $ECHO_N "checking for XOpenDisplay... $ECHO_C" >&6
46423if test "${ac_cv_func_XOpenDisplay+set}" = set; then
46424  echo $ECHO_N "(cached) $ECHO_C" >&6
46425else
46426  cat >"conftest.$ac_ext" <<_ACEOF
46427#line 46427 "configure"
46428#include "confdefs.h"
46429#define XOpenDisplay autoconf_temporary
46430#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
46431#undef XOpenDisplay
46432
46433#ifdef __cplusplus
46434extern "C"
46435#endif
46436
46437/* We use char because int might match the return type of a gcc2
46438   builtin and then its argument prototype would still apply.  */
46439char XOpenDisplay (void);
46440
46441int
46442main (void)
46443{
46444
46445/* The GNU C library defines stubs for functions which it implements
46446    to always fail with ENOSYS.  Some functions are actually named
46447    something starting with __ and the normal name is an alias.  */
46448#if defined (__stub_XOpenDisplay) || defined (__stub___XOpenDisplay)
46449#error found stub for XOpenDisplay
46450#endif
46451
46452	return XOpenDisplay ();
46453  ;
46454  return 0;
46455}
46456_ACEOF
46457rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46458if { (eval echo "$as_me:46458: \"$ac_link\"") >&5
46459  (eval $ac_link) 2>&5
46460  ac_status=$?
46461  echo "$as_me:46461: \$? = $ac_status" >&5
46462  (exit "$ac_status"); } &&
46463         { ac_try='test -s "conftest$ac_exeext"'
46464  { (eval echo "$as_me:46464: \"$ac_try\"") >&5
46465  (eval $ac_try) 2>&5
46466  ac_status=$?
46467  echo "$as_me:46467: \$? = $ac_status" >&5
46468  (exit "$ac_status"); }; }; then
46469  ac_cv_func_XOpenDisplay=yes
46470else
46471  echo "$as_me: failed program was:" >&5
46472cat "conftest.$ac_ext" >&5
46473ac_cv_func_XOpenDisplay=no
46474fi
46475rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46476fi
46477echo "$as_me:46477: result: $ac_cv_func_XOpenDisplay" >&5
46478echo "${ECHO_T}$ac_cv_func_XOpenDisplay" >&6
46479if test "$ac_cv_func_XOpenDisplay" = yes; then
46480  :
46481else
46482
46483	echo "$as_me:46483: checking for XOpenDisplay in -lX11" >&5
46484echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
46485if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
46486  echo $ECHO_N "(cached) $ECHO_C" >&6
46487else
46488  ac_check_lib_save_LIBS=$LIBS
46489LIBS="-lX11  $LIBS"
46490cat >"conftest.$ac_ext" <<_ACEOF
46491#line 46491 "configure"
46492#include "confdefs.h"
46493
46494/* Override any gcc2 internal prototype to avoid an error.  */
46495#ifdef __cplusplus
46496extern "C"
46497#endif
46498/* We use char because int might match the return type of a gcc2
46499   builtin and then its argument prototype would still apply.  */
46500char XOpenDisplay ();
46501int
46502main (void)
46503{
46504XOpenDisplay ();
46505  ;
46506  return 0;
46507}
46508_ACEOF
46509rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46510if { (eval echo "$as_me:46510: \"$ac_link\"") >&5
46511  (eval $ac_link) 2>&5
46512  ac_status=$?
46513  echo "$as_me:46513: \$? = $ac_status" >&5
46514  (exit "$ac_status"); } &&
46515         { ac_try='test -s "conftest$ac_exeext"'
46516  { (eval echo "$as_me:46516: \"$ac_try\"") >&5
46517  (eval $ac_try) 2>&5
46518  ac_status=$?
46519  echo "$as_me:46519: \$? = $ac_status" >&5
46520  (exit "$ac_status"); }; }; then
46521  ac_cv_lib_X11_XOpenDisplay=yes
46522else
46523  echo "$as_me: failed program was:" >&5
46524cat "conftest.$ac_ext" >&5
46525ac_cv_lib_X11_XOpenDisplay=no
46526fi
46527rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46528LIBS=$ac_check_lib_save_LIBS
46529fi
46530echo "$as_me:46530: result: $ac_cv_lib_X11_XOpenDisplay" >&5
46531echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
46532if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
46533
46534cf_add_libs="$LIBS"
46535# reverse order
46536cf_add_0lib=
46537for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46538# filter duplicates
46539for cf_add_1lib in $cf_add_0lib; do
46540	for cf_add_2lib in $cf_add_libs; do
46541		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46542			cf_add_1lib=
46543			break
46544		fi
46545	done
46546	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46547done
46548LIBS="$cf_add_libs"
46549
46550fi
46551
46552fi
46553
46554	echo "$as_me:46554: checking for XtAppInitialize" >&5
46555echo $ECHO_N "checking for XtAppInitialize... $ECHO_C" >&6
46556if test "${ac_cv_func_XtAppInitialize+set}" = set; then
46557  echo $ECHO_N "(cached) $ECHO_C" >&6
46558else
46559  cat >"conftest.$ac_ext" <<_ACEOF
46560#line 46560 "configure"
46561#include "confdefs.h"
46562#define XtAppInitialize autoconf_temporary
46563#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
46564#undef XtAppInitialize
46565
46566#ifdef __cplusplus
46567extern "C"
46568#endif
46569
46570/* We use char because int might match the return type of a gcc2
46571   builtin and then its argument prototype would still apply.  */
46572char XtAppInitialize (void);
46573
46574int
46575main (void)
46576{
46577
46578/* The GNU C library defines stubs for functions which it implements
46579    to always fail with ENOSYS.  Some functions are actually named
46580    something starting with __ and the normal name is an alias.  */
46581#if defined (__stub_XtAppInitialize) || defined (__stub___XtAppInitialize)
46582#error found stub for XtAppInitialize
46583#endif
46584
46585	return XtAppInitialize ();
46586  ;
46587  return 0;
46588}
46589_ACEOF
46590rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46591if { (eval echo "$as_me:46591: \"$ac_link\"") >&5
46592  (eval $ac_link) 2>&5
46593  ac_status=$?
46594  echo "$as_me:46594: \$? = $ac_status" >&5
46595  (exit "$ac_status"); } &&
46596         { ac_try='test -s "conftest$ac_exeext"'
46597  { (eval echo "$as_me:46597: \"$ac_try\"") >&5
46598  (eval $ac_try) 2>&5
46599  ac_status=$?
46600  echo "$as_me:46600: \$? = $ac_status" >&5
46601  (exit "$ac_status"); }; }; then
46602  ac_cv_func_XtAppInitialize=yes
46603else
46604  echo "$as_me: failed program was:" >&5
46605cat "conftest.$ac_ext" >&5
46606ac_cv_func_XtAppInitialize=no
46607fi
46608rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46609fi
46610echo "$as_me:46610: result: $ac_cv_func_XtAppInitialize" >&5
46611echo "${ECHO_T}$ac_cv_func_XtAppInitialize" >&6
46612if test "$ac_cv_func_XtAppInitialize" = yes; then
46613  :
46614else
46615
46616	echo "$as_me:46616: checking for XtAppInitialize in -lXt" >&5
46617echo $ECHO_N "checking for XtAppInitialize in -lXt... $ECHO_C" >&6
46618if test "${ac_cv_lib_Xt_XtAppInitialize+set}" = set; then
46619  echo $ECHO_N "(cached) $ECHO_C" >&6
46620else
46621  ac_check_lib_save_LIBS=$LIBS
46622LIBS="-lXt  $LIBS"
46623cat >"conftest.$ac_ext" <<_ACEOF
46624#line 46624 "configure"
46625#include "confdefs.h"
46626
46627/* Override any gcc2 internal prototype to avoid an error.  */
46628#ifdef __cplusplus
46629extern "C"
46630#endif
46631/* We use char because int might match the return type of a gcc2
46632   builtin and then its argument prototype would still apply.  */
46633char XtAppInitialize ();
46634int
46635main (void)
46636{
46637XtAppInitialize ();
46638  ;
46639  return 0;
46640}
46641_ACEOF
46642rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46643if { (eval echo "$as_me:46643: \"$ac_link\"") >&5
46644  (eval $ac_link) 2>&5
46645  ac_status=$?
46646  echo "$as_me:46646: \$? = $ac_status" >&5
46647  (exit "$ac_status"); } &&
46648         { ac_try='test -s "conftest$ac_exeext"'
46649  { (eval echo "$as_me:46649: \"$ac_try\"") >&5
46650  (eval $ac_try) 2>&5
46651  ac_status=$?
46652  echo "$as_me:46652: \$? = $ac_status" >&5
46653  (exit "$ac_status"); }; }; then
46654  ac_cv_lib_Xt_XtAppInitialize=yes
46655else
46656  echo "$as_me: failed program was:" >&5
46657cat "conftest.$ac_ext" >&5
46658ac_cv_lib_Xt_XtAppInitialize=no
46659fi
46660rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46661LIBS=$ac_check_lib_save_LIBS
46662fi
46663echo "$as_me:46663: result: $ac_cv_lib_Xt_XtAppInitialize" >&5
46664echo "${ECHO_T}$ac_cv_lib_Xt_XtAppInitialize" >&6
46665if test "$ac_cv_lib_Xt_XtAppInitialize" = yes; then
46666
46667cat >>confdefs.h <<\EOF
46668#define HAVE_LIBXT 1
46669EOF
46670
46671		 cf_have_X_LIBS=Xt
46672		 LIBS="-lXt $LIBS"
46673fi
46674
46675fi
46676
46677fi
46678
46679if test "$cf_have_X_LIBS" = no ; then
46680	{ echo "$as_me:46680: WARNING: Unable to successfully link X Toolkit library (-lXt) with
46681test program.  You will have to check and add the proper libraries by hand
46682to makefile." >&5
46683echo "$as_me: WARNING: Unable to successfully link X Toolkit library (-lXt) with
46684test program.  You will have to check and add the proper libraries by hand
46685to makefile." >&2;}
46686fi
46687
46688cf_x_athena_root=$cf_x_athena
46689cf_x_athena_inc=""
46690
46691for cf_path in default \
46692	/usr/contrib/X11R6 \
46693	/usr/contrib/X11R5 \
46694	/usr/lib/X11R5 \
46695	/usr/local
46696do
46697	if test -z "$cf_x_athena_inc" ; then
46698
46699cf_save_LIBS_CF_X_ATHENA_CPPFLAGS="$LIBS"
46700cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS="$CFLAGS"
46701cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS="$CPPFLAGS"
46702LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
46703for cf_X_CFLAGS in $X_CFLAGS
46704do
46705	case "x$cf_X_CFLAGS" in
46706	x-[IUD]*)
46707		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
46708		;;
46709	*)
46710		CFLAGS="$CFLAGS $cf_X_CFLAGS"
46711		;;
46712	esac
46713done
46714
46715		cf_test=X11/$cf_x_athena_root/SimpleMenu.h
46716		if test "$cf_path" != default ; then
46717
46718	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46719	CPPFLAGS="${CPPFLAGS}-I$cf_path/include"
46720
46721			echo "$as_me:46721: checking for $cf_test in $cf_path" >&5
46722echo $ECHO_N "checking for $cf_test in $cf_path... $ECHO_C" >&6
46723		else
46724			echo "$as_me:46724: checking for $cf_test" >&5
46725echo $ECHO_N "checking for $cf_test... $ECHO_C" >&6
46726		fi
46727		cat >"conftest.$ac_ext" <<_ACEOF
46728#line 46728 "configure"
46729#include "confdefs.h"
46730
46731#include <X11/Intrinsic.h>
46732#include <$cf_test>
46733int
46734main (void)
46735{
46736
46737  ;
46738  return 0;
46739}
46740_ACEOF
46741rm -f "conftest.$ac_objext"
46742if { (eval echo "$as_me:46742: \"$ac_compile\"") >&5
46743  (eval $ac_compile) 2>&5
46744  ac_status=$?
46745  echo "$as_me:46745: \$? = $ac_status" >&5
46746  (exit "$ac_status"); } &&
46747         { ac_try='test -s "conftest.$ac_objext"'
46748  { (eval echo "$as_me:46748: \"$ac_try\"") >&5
46749  (eval $ac_try) 2>&5
46750  ac_status=$?
46751  echo "$as_me:46751: \$? = $ac_status" >&5
46752  (exit "$ac_status"); }; }; then
46753  cf_result=yes
46754else
46755  echo "$as_me: failed program was:" >&5
46756cat "conftest.$ac_ext" >&5
46757cf_result=no
46758fi
46759rm -f "conftest.$ac_objext" "conftest.$ac_ext"
46760		echo "$as_me:46760: result: $cf_result" >&5
46761echo "${ECHO_T}$cf_result" >&6
46762
46763LIBS="$cf_save_LIBS_CF_X_ATHENA_CPPFLAGS"
46764CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_CPPFLAGS"
46765CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_CPPFLAGS"
46766
46767		if test "$cf_result" = yes ; then
46768			test "$cf_path"  = default && cf_x_athena_inc=default
46769			test "$cf_path" != default && cf_x_athena_inc="$cf_path/include"
46770			break
46771		fi
46772	fi
46773done
46774
46775if test -z "$cf_x_athena_inc" ; then
46776	{ echo "$as_me:46776: WARNING: Unable to find Athena header files" >&5
46777echo "$as_me: WARNING: Unable to find Athena header files" >&2;}
46778elif test "$cf_x_athena_inc" != default ; then
46779
46780	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
46781	CPPFLAGS="${CPPFLAGS}-I$cf_x_athena_inc"
46782
46783fi
46784
46785cf_x_athena_root=$cf_x_athena
46786cf_x_athena_lib=""
46787
46788for cf_path in default \
46789	/usr/contrib/X11R6 \
46790	/usr/contrib/X11R5 \
46791	/usr/lib/X11R5 \
46792	/usr/local
46793do
46794	for cf_lib in \
46795		${cf_x_athena_root} \
46796		${cf_x_athena_root}7 \
46797		${cf_x_athena_root}6
46798	do
46799	for cf_libs in \
46800		"-l$cf_lib -lXmu" \
46801		"-l$cf_lib -lXpm -lXmu" \
46802		"-l${cf_lib}_s -lXmu_s"
46803	do
46804		test -n "$cf_x_athena_lib" && break
46805
46806cf_save_LIBS_CF_X_ATHENA_LIBS="$LIBS"
46807cf_save_CFLAGS_CF_X_ATHENA_LIBS="$CFLAGS"
46808cf_save_CPPFLAGS_CF_X_ATHENA_LIBS="$CPPFLAGS"
46809LIBS="$LIBS ${X_PRE_LIBS} ${X_LIBS} ${X_EXTRA_LIBS}"
46810for cf_X_CFLAGS in $X_CFLAGS
46811do
46812	case "x$cf_X_CFLAGS" in
46813	x-[IUD]*)
46814		CPPFLAGS="$CPPFLAGS $cf_X_CFLAGS"
46815		;;
46816	*)
46817		CFLAGS="$CFLAGS $cf_X_CFLAGS"
46818		;;
46819	esac
46820done
46821
46822		cf_test=XawSimpleMenuAddGlobalActions
46823		test "$cf_path" != default && cf_libs="-L$cf_path/lib $cf_libs"
46824
46825cf_add_libs="$LIBS"
46826# reverse order
46827cf_add_0lib=
46828for cf_add_1lib in $cf_libs; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46829# filter duplicates
46830for cf_add_1lib in $cf_add_0lib; do
46831	for cf_add_2lib in $cf_add_libs; do
46832		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46833			cf_add_1lib=
46834			break
46835		fi
46836	done
46837	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46838done
46839LIBS="$cf_add_libs"
46840
46841		echo "$as_me:46841: checking for $cf_test in $cf_libs" >&5
46842echo $ECHO_N "checking for $cf_test in $cf_libs... $ECHO_C" >&6
46843		cat >"conftest.$ac_ext" <<_ACEOF
46844#line 46844 "configure"
46845#include "confdefs.h"
46846
46847#include <X11/Intrinsic.h>
46848#include <X11/$cf_x_athena_root/SimpleMenu.h>
46849
46850int
46851main (void)
46852{
46853
46854$cf_test((XtAppContext) 0)
46855  ;
46856  return 0;
46857}
46858_ACEOF
46859rm -f "conftest.$ac_objext" "conftest$ac_exeext"
46860if { (eval echo "$as_me:46860: \"$ac_link\"") >&5
46861  (eval $ac_link) 2>&5
46862  ac_status=$?
46863  echo "$as_me:46863: \$? = $ac_status" >&5
46864  (exit "$ac_status"); } &&
46865         { ac_try='test -s "conftest$ac_exeext"'
46866  { (eval echo "$as_me:46866: \"$ac_try\"") >&5
46867  (eval $ac_try) 2>&5
46868  ac_status=$?
46869  echo "$as_me:46869: \$? = $ac_status" >&5
46870  (exit "$ac_status"); }; }; then
46871  cf_result=yes
46872else
46873  echo "$as_me: failed program was:" >&5
46874cat "conftest.$ac_ext" >&5
46875cf_result=no
46876fi
46877rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
46878		echo "$as_me:46878: result: $cf_result" >&5
46879echo "${ECHO_T}$cf_result" >&6
46880
46881LIBS="$cf_save_LIBS_CF_X_ATHENA_LIBS"
46882CFLAGS="$cf_save_CFLAGS_CF_X_ATHENA_LIBS"
46883CPPFLAGS="$cf_save_CPPFLAGS_CF_X_ATHENA_LIBS"
46884
46885		if test "$cf_result" = yes ; then
46886			cf_x_athena_lib="$cf_libs"
46887			break
46888		fi
46889	done # cf_libs
46890		test -n "$cf_x_athena_lib" && break
46891	done # cf_lib
46892done
46893
46894if test -z "$cf_x_athena_lib" ; then
46895	{ { echo "$as_me:46895: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&5
46896echo "$as_me: error: Unable to successfully link Athena library (-l$cf_x_athena_root) with test program" >&2;}
46897   { (exit 1); exit 1; }; }
46898fi
46899
46900cf_add_libs="$LIBS"
46901# reverse order
46902cf_add_0lib=
46903for cf_add_1lib in $cf_x_athena_lib; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
46904# filter duplicates
46905for cf_add_1lib in $cf_add_0lib; do
46906	for cf_add_2lib in $cf_add_libs; do
46907		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
46908			cf_add_1lib=
46909			break
46910		fi
46911	done
46912	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
46913done
46914LIBS="$cf_add_libs"
46915
46916cf_x_athena_LIBS=`echo "HAVE_LIB_$cf_x_athena" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
46917
46918cat >>confdefs.h <<EOF
46919#define $cf_x_athena_LIBS 1
46920EOF
46921
46922fi
46923
46924if test -n "$ac_tool_prefix"; then
46925  for ac_prog in xcurses-config
46926  do
46927    # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
46928set dummy $ac_tool_prefix$ac_prog; ac_word=$2
46929echo "$as_me:46929: checking for $ac_word" >&5
46930echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46931if test "${ac_cv_prog_XCURSES_CONFIG+set}" = set; then
46932  echo $ECHO_N "(cached) $ECHO_C" >&6
46933else
46934  if test -n "$XCURSES_CONFIG"; then
46935  ac_cv_prog_XCURSES_CONFIG="$XCURSES_CONFIG" # Let the user override the test.
46936else
46937  ac_save_IFS=$IFS; IFS=$ac_path_separator
46938ac_dummy="$PATH"
46939for ac_dir in $ac_dummy; do
46940  IFS=$ac_save_IFS
46941  test -z "$ac_dir" && ac_dir=.
46942  $as_executable_p "$ac_dir/$ac_word" || continue
46943ac_cv_prog_XCURSES_CONFIG="$ac_tool_prefix$ac_prog"
46944echo "$as_me:46944: found $ac_dir/$ac_word" >&5
46945break
46946done
46947
46948fi
46949fi
46950XCURSES_CONFIG=$ac_cv_prog_XCURSES_CONFIG
46951if test -n "$XCURSES_CONFIG"; then
46952  echo "$as_me:46952: result: $XCURSES_CONFIG" >&5
46953echo "${ECHO_T}$XCURSES_CONFIG" >&6
46954else
46955  echo "$as_me:46955: result: no" >&5
46956echo "${ECHO_T}no" >&6
46957fi
46958
46959    test -n "$XCURSES_CONFIG" && break
46960  done
46961fi
46962if test -z "$XCURSES_CONFIG"; then
46963  ac_ct_XCURSES_CONFIG=$XCURSES_CONFIG
46964  for ac_prog in xcurses-config
46965do
46966  # Extract the first word of "$ac_prog", so it can be a program name with args.
46967set dummy $ac_prog; ac_word=$2
46968echo "$as_me:46968: checking for $ac_word" >&5
46969echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
46970if test "${ac_cv_prog_ac_ct_XCURSES_CONFIG+set}" = set; then
46971  echo $ECHO_N "(cached) $ECHO_C" >&6
46972else
46973  if test -n "$ac_ct_XCURSES_CONFIG"; then
46974  ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_ct_XCURSES_CONFIG" # Let the user override the test.
46975else
46976  ac_save_IFS=$IFS; IFS=$ac_path_separator
46977ac_dummy="$PATH"
46978for ac_dir in $ac_dummy; do
46979  IFS=$ac_save_IFS
46980  test -z "$ac_dir" && ac_dir=.
46981  $as_executable_p "$ac_dir/$ac_word" || continue
46982ac_cv_prog_ac_ct_XCURSES_CONFIG="$ac_prog"
46983echo "$as_me:46983: found $ac_dir/$ac_word" >&5
46984break
46985done
46986
46987fi
46988fi
46989ac_ct_XCURSES_CONFIG=$ac_cv_prog_ac_ct_XCURSES_CONFIG
46990if test -n "$ac_ct_XCURSES_CONFIG"; then
46991  echo "$as_me:46991: result: $ac_ct_XCURSES_CONFIG" >&5
46992echo "${ECHO_T}$ac_ct_XCURSES_CONFIG" >&6
46993else
46994  echo "$as_me:46994: result: no" >&5
46995echo "${ECHO_T}no" >&6
46996fi
46997
46998  test -n "$ac_ct_XCURSES_CONFIG" && break
46999done
47000test -n "$ac_ct_XCURSES_CONFIG" || ac_ct_XCURSES_CONFIG="none"
47001
47002  XCURSES_CONFIG=$ac_ct_XCURSES_CONFIG
47003fi
47004
47005if test "$XCURSES_CONFIG" != none ; then
47006
47007cf_fix_cppflags=no
47008cf_new_cflags=
47009cf_new_cppflags=
47010cf_new_extra_cppflags=
47011
47012for cf_add_cflags in `$XCURSES_CONFIG --cflags`
47013do
47014case "$cf_fix_cppflags" in
47015(no)
47016	case "$cf_add_cflags" in
47017	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
47018		case "$cf_add_cflags" in
47019		(-D*)
47020			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
47021
47022			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47023				&& test -z "${cf_tst_cflags}" \
47024				&& cf_fix_cppflags=yes
47025
47026			if test "$cf_fix_cppflags" = yes ; then
47027
47028	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47029	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47030
47031				continue
47032			elif test "${cf_tst_cflags}" = "\"'" ; then
47033
47034	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47035	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47036
47037				continue
47038			fi
47039			;;
47040		esac
47041		case "$CPPFLAGS" in
47042		(*$cf_add_cflags)
47043			;;
47044		(*)
47045			case "$cf_add_cflags" in
47046			(-D*)
47047				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
47048
47049CPPFLAGS=`echo "$CPPFLAGS" | \
47050	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
47051		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
47052
47053				;;
47054			esac
47055
47056	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
47057	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
47058
47059			;;
47060		esac
47061		;;
47062	(*)
47063
47064	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
47065	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
47066
47067		;;
47068	esac
47069	;;
47070(yes)
47071
47072	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47073	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47074
47075	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
47076
47077	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47078		&& test -z "${cf_tst_cflags}" \
47079		&& cf_fix_cppflags=no
47080	;;
47081esac
47082done
47083
47084if test -n "$cf_new_cflags" ; then
47085
47086	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
47087	CFLAGS="${CFLAGS}$cf_new_cflags"
47088
47089fi
47090
47091if test -n "$cf_new_cppflags" ; then
47092
47093	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47094	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
47095
47096fi
47097
47098if test -n "$cf_new_extra_cppflags" ; then
47099
47100	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
47101	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
47102
47103fi
47104
47105cf_add_libs="$LIBS"
47106# reverse order
47107cf_add_0lib=
47108for cf_add_1lib in `$XCURSES_CONFIG --libs`; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47109# filter duplicates
47110for cf_add_1lib in $cf_add_0lib; do
47111	for cf_add_2lib in $cf_add_libs; do
47112		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47113			cf_add_1lib=
47114			break
47115		fi
47116	done
47117	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47118done
47119LIBS="$cf_add_libs"
47120
47121cf_cv_lib_XCurses=yes
47122
47123else
47124
47125LDFLAGS="$LDFLAGS $X_LIBS"
47126
47127test -n "$verbose" && echo "	checking additions to CFLAGS" 1>&6
47128
47129echo "${as_me:-configure}:47129: testing checking additions to CFLAGS ..." 1>&5
47130
47131cf_check_cflags="$CFLAGS"
47132cf_check_cppflags="$CPPFLAGS"
47133
47134cf_fix_cppflags=no
47135cf_new_cflags=
47136cf_new_cppflags=
47137cf_new_extra_cppflags=
47138
47139for cf_add_cflags in $X_CFLAGS
47140do
47141case "$cf_fix_cppflags" in
47142(no)
47143	case "$cf_add_cflags" in
47144	(-undef|-nostdinc*|-I*|-D*|-U*|-E|-P|-C)
47145		case "$cf_add_cflags" in
47146		(-D*)
47147			cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^-D[^=]*='\''\"[^"]*//'`
47148
47149			test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47150				&& test -z "${cf_tst_cflags}" \
47151				&& cf_fix_cppflags=yes
47152
47153			if test "$cf_fix_cppflags" = yes ; then
47154
47155	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47156	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47157
47158				continue
47159			elif test "${cf_tst_cflags}" = "\"'" ; then
47160
47161	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47162	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47163
47164				continue
47165			fi
47166			;;
47167		esac
47168		case "$CPPFLAGS" in
47169		(*$cf_add_cflags)
47170			;;
47171		(*)
47172			case "$cf_add_cflags" in
47173			(-D*)
47174				cf_tst_cppflags=`echo "x$cf_add_cflags" | sed -e 's/^...//' -e 's/=.*//'`
47175
47176CPPFLAGS=`echo "$CPPFLAGS" | \
47177	sed	-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?[ 	]/ /g' \
47178		-e 's/-[UD]'"$cf_tst_cppflags"'\(=[^ 	]*\)\?$//g'`
47179
47180				;;
47181			esac
47182
47183	test -n "$cf_new_cppflags" && cf_new_cppflags="$cf_new_cppflags "
47184	cf_new_cppflags="${cf_new_cppflags}$cf_add_cflags"
47185
47186			;;
47187		esac
47188		;;
47189	(*)
47190
47191	test -n "$cf_new_cflags" && cf_new_cflags="$cf_new_cflags "
47192	cf_new_cflags="${cf_new_cflags}$cf_add_cflags"
47193
47194		;;
47195	esac
47196	;;
47197(yes)
47198
47199	test -n "$cf_new_extra_cppflags" && cf_new_extra_cppflags="$cf_new_extra_cppflags "
47200	cf_new_extra_cppflags="${cf_new_extra_cppflags}$cf_add_cflags"
47201
47202	cf_tst_cflags=`echo "${cf_add_cflags}" |sed -e 's/^[^"]*"'\''//'`
47203
47204	test "x${cf_add_cflags}" != "x${cf_tst_cflags}" \
47205		&& test -z "${cf_tst_cflags}" \
47206		&& cf_fix_cppflags=no
47207	;;
47208esac
47209done
47210
47211if test -n "$cf_new_cflags" ; then
47212	test -n "$verbose" && echo "	add to \$CFLAGS $cf_new_cflags" 1>&6
47213
47214echo "${as_me:-configure}:47214: testing add to \$CFLAGS $cf_new_cflags ..." 1>&5
47215
47216	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
47217	CFLAGS="${CFLAGS}$cf_new_cflags"
47218
47219fi
47220
47221if test -n "$cf_new_cppflags" ; then
47222	test -n "$verbose" && echo "	add to \$CPPFLAGS $cf_new_cppflags" 1>&6
47223
47224echo "${as_me:-configure}:47224: testing add to \$CPPFLAGS $cf_new_cppflags ..." 1>&5
47225
47226	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
47227	CPPFLAGS="${CPPFLAGS}$cf_new_cppflags"
47228
47229fi
47230
47231if test -n "$cf_new_extra_cppflags" ; then
47232	test -n "$verbose" && echo "	add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags" 1>&6
47233
47234echo "${as_me:-configure}:47234: testing add to \$EXTRA_CPPFLAGS $cf_new_extra_cppflags ..." 1>&5
47235
47236	test -n "$EXTRA_CPPFLAGS" && EXTRA_CPPFLAGS="$EXTRA_CPPFLAGS "
47237	EXTRA_CPPFLAGS="${EXTRA_CPPFLAGS}$cf_new_extra_cppflags"
47238
47239fi
47240
47241if test "x$cf_check_cflags" != "x$CFLAGS" ; then
47242cat >"conftest.$ac_ext" <<_ACEOF
47243#line 47243 "configure"
47244#include "confdefs.h"
47245#include <stdio.h>
47246int
47247main (void)
47248{
47249printf("Hello world");
47250  ;
47251  return 0;
47252}
47253_ACEOF
47254rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47255if { (eval echo "$as_me:47255: \"$ac_link\"") >&5
47256  (eval $ac_link) 2>&5
47257  ac_status=$?
47258  echo "$as_me:47258: \$? = $ac_status" >&5
47259  (exit "$ac_status"); } &&
47260         { ac_try='test -s "conftest$ac_exeext"'
47261  { (eval echo "$as_me:47261: \"$ac_try\"") >&5
47262  (eval $ac_try) 2>&5
47263  ac_status=$?
47264  echo "$as_me:47264: \$? = $ac_status" >&5
47265  (exit "$ac_status"); }; }; then
47266  :
47267else
47268  echo "$as_me: failed program was:" >&5
47269cat "conftest.$ac_ext" >&5
47270test -n "$verbose" && echo "	test-compile failed.  Undoing change to \$CFLAGS" 1>&6
47271
47272echo "${as_me:-configure}:47272: testing test-compile failed.  Undoing change to \$CFLAGS ..." 1>&5
47273
47274	 if test "x$cf_check_cppflags" != "x$CPPFLAGS" ; then
47275		 test -n "$verbose" && echo "	but keeping change to \$CPPFLAGS" 1>&6
47276
47277echo "${as_me:-configure}:47277: testing but keeping change to \$CPPFLAGS ..." 1>&5
47278
47279	 fi
47280	 CFLAGS="$cf_check_cflags"
47281fi
47282rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47283fi
47284
47285echo "$as_me:47285: checking for XOpenDisplay in -lX11" >&5
47286echo $ECHO_N "checking for XOpenDisplay in -lX11... $ECHO_C" >&6
47287if test "${ac_cv_lib_X11_XOpenDisplay+set}" = set; then
47288  echo $ECHO_N "(cached) $ECHO_C" >&6
47289else
47290  ac_check_lib_save_LIBS=$LIBS
47291LIBS="-lX11 $X_PRE_LIBS $LIBS $X_EXTRA_LIBS $LIBS"
47292cat >"conftest.$ac_ext" <<_ACEOF
47293#line 47293 "configure"
47294#include "confdefs.h"
47295
47296/* Override any gcc2 internal prototype to avoid an error.  */
47297#ifdef __cplusplus
47298extern "C"
47299#endif
47300/* We use char because int might match the return type of a gcc2
47301   builtin and then its argument prototype would still apply.  */
47302char XOpenDisplay ();
47303int
47304main (void)
47305{
47306XOpenDisplay ();
47307  ;
47308  return 0;
47309}
47310_ACEOF
47311rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47312if { (eval echo "$as_me:47312: \"$ac_link\"") >&5
47313  (eval $ac_link) 2>&5
47314  ac_status=$?
47315  echo "$as_me:47315: \$? = $ac_status" >&5
47316  (exit "$ac_status"); } &&
47317         { ac_try='test -s "conftest$ac_exeext"'
47318  { (eval echo "$as_me:47318: \"$ac_try\"") >&5
47319  (eval $ac_try) 2>&5
47320  ac_status=$?
47321  echo "$as_me:47321: \$? = $ac_status" >&5
47322  (exit "$ac_status"); }; }; then
47323  ac_cv_lib_X11_XOpenDisplay=yes
47324else
47325  echo "$as_me: failed program was:" >&5
47326cat "conftest.$ac_ext" >&5
47327ac_cv_lib_X11_XOpenDisplay=no
47328fi
47329rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47330LIBS=$ac_check_lib_save_LIBS
47331fi
47332echo "$as_me:47332: result: $ac_cv_lib_X11_XOpenDisplay" >&5
47333echo "${ECHO_T}$ac_cv_lib_X11_XOpenDisplay" >&6
47334if test "$ac_cv_lib_X11_XOpenDisplay" = yes; then
47335
47336cf_add_libs="$LIBS"
47337# reverse order
47338cf_add_0lib=
47339for cf_add_1lib in -lX11; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47340# filter duplicates
47341for cf_add_1lib in $cf_add_0lib; do
47342	for cf_add_2lib in $cf_add_libs; do
47343		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47344			cf_add_1lib=
47345			break
47346		fi
47347	done
47348	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47349done
47350LIBS="$cf_add_libs"
47351
47352fi
47353
47354echo "$as_me:47354: checking for XCurses library" >&5
47355echo $ECHO_N "checking for XCurses library... $ECHO_C" >&6
47356if test "${cf_cv_lib_XCurses+set}" = set; then
47357  echo $ECHO_N "(cached) $ECHO_C" >&6
47358else
47359
47360cf_add_libs="$LIBS"
47361# reverse order
47362cf_add_0lib=
47363for cf_add_1lib in -lXCurses; do cf_add_0lib="$cf_add_1lib $cf_add_0lib"; done
47364# filter duplicates
47365for cf_add_1lib in $cf_add_0lib; do
47366	for cf_add_2lib in $cf_add_libs; do
47367		if test "x$cf_add_1lib" = "x$cf_add_2lib"; then
47368			cf_add_1lib=
47369			break
47370		fi
47371	done
47372	test -n "$cf_add_1lib" && cf_add_libs="$cf_add_1lib $cf_add_libs"
47373done
47374LIBS="$cf_add_libs"
47375
47376cat >"conftest.$ac_ext" <<_ACEOF
47377#line 47377 "configure"
47378#include "confdefs.h"
47379
47380#include <xcurses.h>
47381char *XCursesProgramName = "test";
47382
47383int
47384main (void)
47385{
47386XCursesExit();
47387  ;
47388  return 0;
47389}
47390_ACEOF
47391rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47392if { (eval echo "$as_me:47392: \"$ac_link\"") >&5
47393  (eval $ac_link) 2>&5
47394  ac_status=$?
47395  echo "$as_me:47395: \$? = $ac_status" >&5
47396  (exit "$ac_status"); } &&
47397         { ac_try='test -s "conftest$ac_exeext"'
47398  { (eval echo "$as_me:47398: \"$ac_try\"") >&5
47399  (eval $ac_try) 2>&5
47400  ac_status=$?
47401  echo "$as_me:47401: \$? = $ac_status" >&5
47402  (exit "$ac_status"); }; }; then
47403  cf_cv_lib_XCurses=yes
47404else
47405  echo "$as_me: failed program was:" >&5
47406cat "conftest.$ac_ext" >&5
47407cf_cv_lib_XCurses=no
47408fi
47409rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47410
47411fi
47412echo "$as_me:47412: result: $cf_cv_lib_XCurses" >&5
47413echo "${ECHO_T}$cf_cv_lib_XCurses" >&6
47414
47415fi
47416
47417if test "$cf_cv_lib_XCurses" = yes ; then
47418
47419cat >>confdefs.h <<\EOF
47420#define UNIX 1
47421EOF
47422
47423cat >>confdefs.h <<\EOF
47424#define XCURSES 1
47425EOF
47426
47427	echo "$as_me:47427: checking for xcurses.h" >&5
47428echo $ECHO_N "checking for xcurses.h... $ECHO_C" >&6
47429if test "${ac_cv_header_xcurses_h+set}" = set; then
47430  echo $ECHO_N "(cached) $ECHO_C" >&6
47431else
47432  cat >"conftest.$ac_ext" <<_ACEOF
47433#line 47433 "configure"
47434#include "confdefs.h"
47435#include <xcurses.h>
47436_ACEOF
47437if { (eval echo "$as_me:47437: \"$ac_cpp "conftest.$ac_ext"\"") >&5
47438  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
47439  ac_status=$?
47440  $EGREP -v '^ *\+' conftest.er1 >conftest.err
47441  rm -f conftest.er1
47442  cat conftest.err >&5
47443  echo "$as_me:47443: \$? = $ac_status" >&5
47444  (exit "$ac_status"); } >/dev/null; then
47445  if test -s conftest.err; then
47446    ac_cpp_err=$ac_c_preproc_warn_flag
47447  else
47448    ac_cpp_err=
47449  fi
47450else
47451  ac_cpp_err=yes
47452fi
47453if test -z "$ac_cpp_err"; then
47454  ac_cv_header_xcurses_h=yes
47455else
47456  echo "$as_me: failed program was:" >&5
47457  cat "conftest.$ac_ext" >&5
47458  ac_cv_header_xcurses_h=no
47459fi
47460rm -f conftest.err "conftest.$ac_ext"
47461fi
47462echo "$as_me:47462: result: $ac_cv_header_xcurses_h" >&5
47463echo "${ECHO_T}$ac_cv_header_xcurses_h" >&6
47464if test "$ac_cv_header_xcurses_h" = yes; then
47465
47466cat >>confdefs.h <<\EOF
47467#define HAVE_XCURSES 1
47468EOF
47469
47470fi
47471
47472else
47473	{ { echo "$as_me:47473: error: Cannot link with XCurses" >&5
47474echo "$as_me: error: Cannot link with XCurses" >&2;}
47475   { (exit 1); exit 1; }; }
47476fi
47477
47478		;;
47479	esac
47480else
47481
47482echo "$as_me:47482: checking if we can include termio.h with curses" >&5
47483echo $ECHO_N "checking if we can include termio.h with curses... $ECHO_C" >&6
47484if test "${cf_cv_termio_and_curses+set}" = set; then
47485  echo $ECHO_N "(cached) $ECHO_C" >&6
47486else
47487
47488    cf_save_CFLAGS="$CPPFLAGS"
47489    CPPFLAGS="$CPPFLAGS -DHAVE_CONFIG_H -I. -I${srcdir:-.} -I${srcdir:-.}/src -I${srcdir:-.}/WWW/Library/Implementation"
47490    touch lynx_cfg.h
47491    cat >"conftest.$ac_ext" <<_ACEOF
47492#line 47492 "configure"
47493#include "confdefs.h"
47494
47495#include <LYCurses.h>
47496#include <termio.h>
47497int
47498main (void)
47499{
47500putchar(0x0a)
47501  ;
47502  return 0;
47503}
47504_ACEOF
47505rm -f "conftest.$ac_objext"
47506if { (eval echo "$as_me:47506: \"$ac_compile\"") >&5
47507  (eval $ac_compile) 2>&5
47508  ac_status=$?
47509  echo "$as_me:47509: \$? = $ac_status" >&5
47510  (exit "$ac_status"); } &&
47511         { ac_try='test -s "conftest.$ac_objext"'
47512  { (eval echo "$as_me:47512: \"$ac_try\"") >&5
47513  (eval $ac_try) 2>&5
47514  ac_status=$?
47515  echo "$as_me:47515: \$? = $ac_status" >&5
47516  (exit "$ac_status"); }; }; then
47517  cf_cv_termio_and_curses=yes
47518else
47519  echo "$as_me: failed program was:" >&5
47520cat "conftest.$ac_ext" >&5
47521cf_cv_termio_and_curses=no
47522fi
47523rm -f "conftest.$ac_objext" "conftest.$ac_ext"
47524    CPPFLAGS="$cf_save_CFLAGS"
47525    rm -f lynx_cfg.h
47526
47527fi
47528echo "$as_me:47528: result: $cf_cv_termio_and_curses" >&5
47529echo "${ECHO_T}$cf_cv_termio_and_curses" >&6
47530
47531test "$cf_cv_termio_and_curses" = yes &&
47532cat >>confdefs.h <<\EOF
47533#define TERMIO_AND_CURSES 1
47534EOF
47535
47536fi
47537
47538### These tests must be run after establishing the curses library.
47539if test "$cf_cv_screen" != slang ; then
47540	if test "$cf_cv_screen" != pdcurses ; then
47541
47542for ac_header in $cf_cv_screen/term.h term.h
47543do
47544as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
47545echo "$as_me:47545: checking for $ac_header" >&5
47546echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
47547if eval "test \"\${$as_ac_Header+set}\" = set"; then
47548  echo $ECHO_N "(cached) $ECHO_C" >&6
47549else
47550  cat >"conftest.$ac_ext" <<_ACEOF
47551#line 47551 "configure"
47552#include "confdefs.h"
47553#include <$ac_header>
47554_ACEOF
47555if { (eval echo "$as_me:47555: \"$ac_cpp "conftest.$ac_ext"\"") >&5
47556  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
47557  ac_status=$?
47558  $EGREP -v '^ *\+' conftest.er1 >conftest.err
47559  rm -f conftest.er1
47560  cat conftest.err >&5
47561  echo "$as_me:47561: \$? = $ac_status" >&5
47562  (exit "$ac_status"); } >/dev/null; then
47563  if test -s conftest.err; then
47564    ac_cpp_err=$ac_c_preproc_warn_flag
47565  else
47566    ac_cpp_err=
47567  fi
47568else
47569  ac_cpp_err=yes
47570fi
47571if test -z "$ac_cpp_err"; then
47572  eval "$as_ac_Header=yes"
47573else
47574  echo "$as_me: failed program was:" >&5
47575  cat "conftest.$ac_ext" >&5
47576  eval "$as_ac_Header=no"
47577fi
47578rm -f conftest.err "conftest.$ac_ext"
47579fi
47580echo "$as_me:47580: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
47581echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
47582if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
47583  cat >>confdefs.h <<EOF
47584#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
47585EOF
47586
47587fi
47588done
47589
47590	fi
47591
47592echo "$as_me:47592: checking if curses supports alternate-character set" >&5
47593echo $ECHO_N "checking if curses supports alternate-character set... $ECHO_C" >&6
47594if test "${cf_cv_alt_char_set+set}" = set; then
47595  echo $ECHO_N "(cached) $ECHO_C" >&6
47596else
47597
47598for mapname in acs_map _acs_map
47599do
47600	cat >"conftest.$ac_ext" <<_ACEOF
47601#line 47601 "configure"
47602#include "confdefs.h"
47603
47604#include <${cf_cv_ncurses_header:-curses.h}>
47605
47606int
47607main (void)
47608{
47609chtype x = ${mapname}['l']; ${mapname}['m'] = 0; (void)x
47610  ;
47611  return 0;
47612}
47613_ACEOF
47614rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47615if { (eval echo "$as_me:47615: \"$ac_link\"") >&5
47616  (eval $ac_link) 2>&5
47617  ac_status=$?
47618  echo "$as_me:47618: \$? = $ac_status" >&5
47619  (exit "$ac_status"); } &&
47620         { ac_try='test -s "conftest$ac_exeext"'
47621  { (eval echo "$as_me:47621: \"$ac_try\"") >&5
47622  (eval $ac_try) 2>&5
47623  ac_status=$?
47624  echo "$as_me:47624: \$? = $ac_status" >&5
47625  (exit "$ac_status"); }; }; then
47626  cf_cv_alt_char_set=$mapname
47627	 break
47628else
47629  echo "$as_me: failed program was:" >&5
47630cat "conftest.$ac_ext" >&5
47631cf_cv_alt_char_set=no
47632fi
47633rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47634done
47635
47636fi
47637
47638echo "$as_me:47638: result: $cf_cv_alt_char_set" >&5
47639echo "${ECHO_T}$cf_cv_alt_char_set" >&6
47640test "$cf_cv_alt_char_set" != no &&
47641cat >>confdefs.h <<EOF
47642#define ALT_CHAR_SET $cf_cv_alt_char_set
47643EOF
47644
47645echo "$as_me:47645: checking if curses supports fancy attributes" >&5
47646echo $ECHO_N "checking if curses supports fancy attributes... $ECHO_C" >&6
47647if test "${cf_cv_fancy_curses+set}" = set; then
47648  echo $ECHO_N "(cached) $ECHO_C" >&6
47649else
47650
47651	cat >"conftest.$ac_ext" <<_ACEOF
47652#line 47652 "configure"
47653#include "confdefs.h"
47654
47655#include <${cf_cv_ncurses_header:-curses.h}>
47656
47657int
47658main (void)
47659{
47660attrset(A_UNDERLINE|A_BOLD|A_REVERSE);
47661	 wattrset(stdscr, A_BLINK|A_DIM);
47662	 attroff(A_BOLD);
47663	 keypad(stdscr,TRUE);
47664
47665  ;
47666  return 0;
47667}
47668_ACEOF
47669rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47670if { (eval echo "$as_me:47670: \"$ac_link\"") >&5
47671  (eval $ac_link) 2>&5
47672  ac_status=$?
47673  echo "$as_me:47673: \$? = $ac_status" >&5
47674  (exit "$ac_status"); } &&
47675         { ac_try='test -s "conftest$ac_exeext"'
47676  { (eval echo "$as_me:47676: \"$ac_try\"") >&5
47677  (eval $ac_try) 2>&5
47678  ac_status=$?
47679  echo "$as_me:47679: \$? = $ac_status" >&5
47680  (exit "$ac_status"); }; }; then
47681  cf_cv_fancy_curses=yes
47682else
47683  echo "$as_me: failed program was:" >&5
47684cat "conftest.$ac_ext" >&5
47685cf_cv_fancy_curses=no
47686fi
47687rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47688
47689fi
47690
47691echo "$as_me:47691: result: $cf_cv_fancy_curses" >&5
47692echo "${ECHO_T}$cf_cv_fancy_curses" >&6
47693test "$cf_cv_fancy_curses" = yes &&
47694cat >>confdefs.h <<\EOF
47695#define FANCY_CURSES 1
47696EOF
47697
47698echo "$as_me:47698: checking for function curses_version" >&5
47699echo $ECHO_N "checking for function curses_version... $ECHO_C" >&6
47700if test "${cf_cv_func_curses_version+set}" = set; then
47701  echo $ECHO_N "(cached) $ECHO_C" >&6
47702else
47703
47704if test "$cross_compiling" = yes; then
47705  cf_cv_func_curses_version=unknown
47706else
47707  cat >"conftest.$ac_ext" <<_ACEOF
47708#line 47708 "configure"
47709#include "confdefs.h"
47710
47711#include <${cf_cv_ncurses_header:-curses.h}>
47712int main(void)
47713{
47714	char temp[1024];
47715	sprintf(temp, "%s\\n", curses_version());
47716	${cf_cv_main_return:-return}(0);
47717}
47718
47719_ACEOF
47720rm -f "conftest$ac_exeext"
47721if { (eval echo "$as_me:47721: \"$ac_link\"") >&5
47722  (eval $ac_link) 2>&5
47723  ac_status=$?
47724  echo "$as_me:47724: \$? = $ac_status" >&5
47725  (exit "$ac_status"); } && { ac_try='"./conftest$ac_exeext"'
47726  { (eval echo "$as_me:47726: \"$ac_try\"") >&5
47727  (eval $ac_try) 2>&5
47728  ac_status=$?
47729  echo "$as_me:47729: \$? = $ac_status" >&5
47730  (exit "$ac_status"); }; }; then
47731  cf_cv_func_curses_version=yes
47732
47733else
47734  echo "$as_me: program exited with status $ac_status" >&5
47735echo "$as_me: failed program was:" >&5
47736cat "conftest.$ac_ext" >&5
47737cf_cv_func_curses_version=no
47738
47739fi
47740rm -f core ./core.* ./*.core "conftest$ac_exeext" "conftest.$ac_objext" "conftest.$ac_ext"
47741fi
47742rm -f core
47743fi
47744echo "$as_me:47744: result: $cf_cv_func_curses_version" >&5
47745echo "${ECHO_T}$cf_cv_func_curses_version" >&6
47746test "$cf_cv_func_curses_version" = yes &&
47747cat >>confdefs.h <<\EOF
47748#define HAVE_CURSES_VERSION 1
47749EOF
47750
47751if test "$cf_cv_ncurses_version" != no ; then
47752echo "$as_me:47752: checking for obsolete/broken version of ncurses" >&5
47753echo $ECHO_N "checking for obsolete/broken version of ncurses... $ECHO_C" >&6
47754if test "${cf_cv_ncurses_broken+set}" = set; then
47755  echo $ECHO_N "(cached) $ECHO_C" >&6
47756else
47757
47758cat >"conftest.$ac_ext" <<_ACEOF
47759#line 47759 "configure"
47760#include "confdefs.h"
47761
47762#include <${cf_cv_ncurses_header:-curses.h}>
47763int
47764main (void)
47765{
47766
47767#if defined(NCURSES_VERSION) && defined(wgetbkgd)
47768	make an error
47769#else
47770	int x = 1
47771#endif
47772
47773  ;
47774  return 0;
47775}
47776_ACEOF
47777rm -f "conftest.$ac_objext"
47778if { (eval echo "$as_me:47778: \"$ac_compile\"") >&5
47779  (eval $ac_compile) 2>&5
47780  ac_status=$?
47781  echo "$as_me:47781: \$? = $ac_status" >&5
47782  (exit "$ac_status"); } &&
47783         { ac_try='test -s "conftest.$ac_objext"'
47784  { (eval echo "$as_me:47784: \"$ac_try\"") >&5
47785  (eval $ac_try) 2>&5
47786  ac_status=$?
47787  echo "$as_me:47787: \$? = $ac_status" >&5
47788  (exit "$ac_status"); }; }; then
47789  cf_cv_ncurses_broken=no
47790else
47791  echo "$as_me: failed program was:" >&5
47792cat "conftest.$ac_ext" >&5
47793cf_cv_ncurses_broken=yes
47794fi
47795rm -f "conftest.$ac_objext" "conftest.$ac_ext"
47796
47797fi
47798
47799echo "$as_me:47799: result: $cf_cv_ncurses_broken" >&5
47800echo "${ECHO_T}$cf_cv_ncurses_broken" >&6
47801if test "$cf_cv_ncurses_broken" = yes ; then
47802	{ echo "$as_me:47802: WARNING: hmm... you should get an up-to-date version of ncurses" >&5
47803echo "$as_me: WARNING: hmm... you should get an up-to-date version of ncurses" >&2;}
47804
47805cat >>confdefs.h <<\EOF
47806#define NCURSES_BROKEN 1
47807EOF
47808
47809fi
47810fi
47811
47812echo "$as_me:47812: checking if curses supports color attributes" >&5
47813echo $ECHO_N "checking if curses supports color attributes... $ECHO_C" >&6
47814if test "${cf_cv_color_curses+set}" = set; then
47815  echo $ECHO_N "(cached) $ECHO_C" >&6
47816else
47817
47818	cat >"conftest.$ac_ext" <<_ACEOF
47819#line 47819 "configure"
47820#include "confdefs.h"
47821
47822#include <${cf_cv_ncurses_header:-curses.h}>
47823
47824int
47825main (void)
47826{
47827chtype x = COLOR_BLUE;
47828	 has_colors();
47829	 start_color();
47830#ifndef NCURSES_BROKEN
47831	 wbkgd(curscr, getbkgd(stdscr)); /* X/Open XPG4 aka SVr4 Curses */
47832#endif
47833
47834  ;
47835  return 0;
47836}
47837_ACEOF
47838rm -f "conftest.$ac_objext" "conftest$ac_exeext"
47839if { (eval echo "$as_me:47839: \"$ac_link\"") >&5
47840  (eval $ac_link) 2>&5
47841  ac_status=$?
47842  echo "$as_me:47842: \$? = $ac_status" >&5
47843  (exit "$ac_status"); } &&
47844         { ac_try='test -s "conftest$ac_exeext"'
47845  { (eval echo "$as_me:47845: \"$ac_try\"") >&5
47846  (eval $ac_try) 2>&5
47847  ac_status=$?
47848  echo "$as_me:47848: \$? = $ac_status" >&5
47849  (exit "$ac_status"); }; }; then
47850  cf_cv_color_curses=yes
47851else
47852  echo "$as_me: failed program was:" >&5
47853cat "conftest.$ac_ext" >&5
47854cf_cv_color_curses=no
47855fi
47856rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
47857
47858fi
47859
47860echo "$as_me:47860: result: $cf_cv_color_curses" >&5
47861echo "${ECHO_T}$cf_cv_color_curses" >&6
47862if test "$cf_cv_color_curses" = yes ; then
47863
47864cat >>confdefs.h <<\EOF
47865#define COLOR_CURSES 1
47866EOF
47867
47868	test ".$cf_cv_ncurses_broken" != .yes &&
47869cat >>confdefs.h <<\EOF
47870#define HAVE_GETBKGD 1
47871EOF
47872
47873fi
47874
47875for ac_header in \
47876termio.h \
47877termios.h \
47878unistd.h \
47879sys/ioctl.h \
47880sys/termio.h \
47881
47882do
47883as_ac_Header=`echo "ac_cv_header_$ac_header" | $as_tr_sh`
47884echo "$as_me:47884: checking for $ac_header" >&5
47885echo $ECHO_N "checking for $ac_header... $ECHO_C" >&6
47886if eval "test \"\${$as_ac_Header+set}\" = set"; then
47887  echo $ECHO_N "(cached) $ECHO_C" >&6
47888else
47889  cat >"conftest.$ac_ext" <<_ACEOF
47890#line 47890 "configure"
47891#include "confdefs.h"
47892#include <$ac_header>
47893_ACEOF
47894if { (eval echo "$as_me:47894: \"$ac_cpp "conftest.$ac_ext"\"") >&5
47895  (eval $ac_cpp "conftest.$ac_ext") 2>conftest.er1
47896  ac_status=$?
47897  $EGREP -v '^ *\+' conftest.er1 >conftest.err
47898  rm -f conftest.er1
47899  cat conftest.err >&5
47900  echo "$as_me:47900: \$? = $ac_status" >&5
47901  (exit "$ac_status"); } >/dev/null; then
47902  if test -s conftest.err; then
47903    ac_cpp_err=$ac_c_preproc_warn_flag
47904  else
47905    ac_cpp_err=
47906  fi
47907else
47908  ac_cpp_err=yes
47909fi
47910if test -z "$ac_cpp_err"; then
47911  eval "$as_ac_Header=yes"
47912else
47913  echo "$as_me: failed program was:" >&5
47914  cat "conftest.$ac_ext" >&5
47915  eval "$as_ac_Header=no"
47916fi
47917rm -f conftest.err "conftest.$ac_ext"
47918fi
47919echo "$as_me:47919: result: `eval echo '${'"$as_ac_Header"'}'`" >&5
47920echo "${ECHO_T}`eval echo '${'"$as_ac_Header"'}'`" >&6
47921if test "`eval echo '${'"$as_ac_Header"'}'`" = yes; then
47922  cat >>confdefs.h <<EOF
47923#define `echo "HAVE_$ac_header" | $as_tr_cpp` 1
47924EOF
47925
47926fi
47927done
47928
47929if test "$ac_cv_header_termios_h" = yes ; then
47930	case "$CFLAGS $CPPFLAGS" in
47931	(*-D_POSIX_SOURCE*)
47932		termios_bad=dunno ;;
47933	(*)	termios_bad=maybe ;;
47934	esac
47935	if test "$termios_bad" = maybe ; then
47936	echo "$as_me:47936: checking whether termios.h needs _POSIX_SOURCE" >&5
47937echo $ECHO_N "checking whether termios.h needs _POSIX_SOURCE... $ECHO_C" >&6
47938	cat >"conftest.$ac_ext" <<_ACEOF
47939#line 47939 "configure"
47940#include "confdefs.h"
47941#include <termios.h>
47942int
47943main (void)
47944{
47945struct termios foo; int x = foo.c_iflag = 1; (void)x
47946  ;
47947  return 0;
47948}
47949_ACEOF
47950rm -f "conftest.$ac_objext"
47951if { (eval echo "$as_me:47951: \"$ac_compile\"") >&5
47952  (eval $ac_compile) 2>&5
47953  ac_status=$?
47954  echo "$as_me:47954: \$? = $ac_status" >&5
47955  (exit "$ac_status"); } &&
47956         { ac_try='test -s "conftest.$ac_objext"'
47957  { (eval echo "$as_me:47957: \"$ac_try\"") >&5
47958  (eval $ac_try) 2>&5
47959  ac_status=$?
47960  echo "$as_me:47960: \$? = $ac_status" >&5
47961  (exit "$ac_status"); }; }; then
47962  termios_bad=no
47963else
47964  echo "$as_me: failed program was:" >&5
47965cat "conftest.$ac_ext" >&5
47966
47967		cat >"conftest.$ac_ext" <<_ACEOF
47968#line 47968 "configure"
47969#include "confdefs.h"
47970
47971#define _POSIX_SOURCE
47972#include <termios.h>
47973int
47974main (void)
47975{
47976struct termios foo; int x = foo.c_iflag = 2; (void)x
47977  ;
47978  return 0;
47979}
47980_ACEOF
47981rm -f "conftest.$ac_objext"
47982if { (eval echo "$as_me:47982: \"$ac_compile\"") >&5
47983  (eval $ac_compile) 2>&5
47984  ac_status=$?
47985  echo "$as_me:47985: \$? = $ac_status" >&5
47986  (exit "$ac_status"); } &&
47987         { ac_try='test -s "conftest.$ac_objext"'
47988  { (eval echo "$as_me:47988: \"$ac_try\"") >&5
47989  (eval $ac_try) 2>&5
47990  ac_status=$?
47991  echo "$as_me:47991: \$? = $ac_status" >&5
47992  (exit "$ac_status"); }; }; then
47993  termios_bad=unknown
47994else
47995  echo "$as_me: failed program was:" >&5
47996cat "conftest.$ac_ext" >&5
47997termios_bad=yes
47998cat >>confdefs.h <<\EOF
47999#define _POSIX_SOURCE 1
48000EOF
48001
48002fi
48003rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48004
48005fi
48006rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48007	echo "$as_me:48007: result: $termios_bad" >&5
48008echo "${ECHO_T}$termios_bad" >&6
48009	fi
48010fi
48011
48012echo "$as_me:48012: checking declaration of size-change" >&5
48013echo $ECHO_N "checking declaration of size-change... $ECHO_C" >&6
48014if test "${cf_cv_sizechange+set}" = set; then
48015  echo $ECHO_N "(cached) $ECHO_C" >&6
48016else
48017
48018	cf_cv_sizechange=unknown
48019	cf_save_CPPFLAGS="$CPPFLAGS"
48020
48021for cf_opts in "" "NEED_PTEM_H"
48022do
48023
48024	CPPFLAGS="$cf_save_CPPFLAGS"
48025	if test -n "$cf_opts"
48026	then
48027
48028	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
48029	CPPFLAGS="${CPPFLAGS}-D$cf_opts"
48030
48031	fi
48032	cat >"conftest.$ac_ext" <<_ACEOF
48033#line 48033 "configure"
48034#include "confdefs.h"
48035#include <sys/types.h>
48036#ifdef HAVE_TERMIOS_H
48037#include <termios.h>
48038#else
48039#ifdef HAVE_TERMIO_H
48040#include <termio.h>
48041#endif
48042#endif
48043
48044#ifdef NEED_PTEM_H
48045/* This is a workaround for SCO:  they neglected to define struct winsize in
48046 * termios.h -- it's only in termio.h and ptem.h
48047 */
48048#include <sys/stream.h>
48049#include <sys/ptem.h>
48050#endif
48051
48052#ifdef HAVE_SYS_IOCTL_H
48053#include <sys/ioctl.h>
48054#endif
48055
48056int
48057main (void)
48058{
48059
48060#ifdef TIOCGSIZE
48061	struct ttysize win;	/* SunOS 3.0... */
48062	int y = win.ts_lines = 2;
48063	int x = win.ts_cols = 1;
48064	(void)y;
48065	(void)x;
48066#else
48067#ifdef TIOCGWINSZ
48068	struct winsize win;	/* everything else */
48069	int y = win.ws_row = 2;
48070	int x = win.ws_col = 1;
48071	(void)y;
48072	(void)x;
48073#else
48074	no TIOCGSIZE or TIOCGWINSZ
48075#endif /* TIOCGWINSZ */
48076#endif /* TIOCGSIZE */
48077
48078  ;
48079  return 0;
48080}
48081_ACEOF
48082rm -f "conftest.$ac_objext"
48083if { (eval echo "$as_me:48083: \"$ac_compile\"") >&5
48084  (eval $ac_compile) 2>&5
48085  ac_status=$?
48086  echo "$as_me:48086: \$? = $ac_status" >&5
48087  (exit "$ac_status"); } &&
48088         { ac_try='test -s "conftest.$ac_objext"'
48089  { (eval echo "$as_me:48089: \"$ac_try\"") >&5
48090  (eval $ac_try) 2>&5
48091  ac_status=$?
48092  echo "$as_me:48092: \$? = $ac_status" >&5
48093  (exit "$ac_status"); }; }; then
48094  cf_cv_sizechange=yes
48095else
48096  echo "$as_me: failed program was:" >&5
48097cat "conftest.$ac_ext" >&5
48098cf_cv_sizechange=no
48099fi
48100rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48101
48102	CPPFLAGS="$cf_save_CPPFLAGS"
48103	if test "$cf_cv_sizechange" = yes ; then
48104		echo "size-change succeeded ($cf_opts)" >&5
48105		test -n "$cf_opts" && cf_cv_sizechange="$cf_opts"
48106		break
48107	fi
48108done
48109
48110fi
48111echo "$as_me:48111: result: $cf_cv_sizechange" >&5
48112echo "${ECHO_T}$cf_cv_sizechange" >&6
48113if test "$cf_cv_sizechange" != no ; then
48114
48115cat >>confdefs.h <<\EOF
48116#define HAVE_SIZECHANGE 1
48117EOF
48118
48119	case "$cf_cv_sizechange" in
48120	(NEED*)
48121		cat >>confdefs.h <<EOF
48122#define $cf_cv_sizechange  1
48123EOF
48124
48125		;;
48126	esac
48127fi
48128
48129echo "$as_me:48129: checking if ttytype is declared in curses library" >&5
48130echo $ECHO_N "checking if ttytype is declared in curses library... $ECHO_C" >&6
48131if test "${cf_cv_have_ttytype+set}" = set; then
48132  echo $ECHO_N "(cached) $ECHO_C" >&6
48133else
48134
48135	cat >"conftest.$ac_ext" <<_ACEOF
48136#line 48136 "configure"
48137#include "confdefs.h"
48138#include <${cf_cv_ncurses_header:-curses.h}>
48139int
48140main (void)
48141{
48142char *x = &ttytype[1]; *x = 1
48143  ;
48144  return 0;
48145}
48146_ACEOF
48147rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48148if { (eval echo "$as_me:48148: \"$ac_link\"") >&5
48149  (eval $ac_link) 2>&5
48150  ac_status=$?
48151  echo "$as_me:48151: \$? = $ac_status" >&5
48152  (exit "$ac_status"); } &&
48153         { ac_try='test -s "conftest$ac_exeext"'
48154  { (eval echo "$as_me:48154: \"$ac_try\"") >&5
48155  (eval $ac_try) 2>&5
48156  ac_status=$?
48157  echo "$as_me:48157: \$? = $ac_status" >&5
48158  (exit "$ac_status"); }; }; then
48159  cf_cv_have_ttytype=yes
48160else
48161  echo "$as_me: failed program was:" >&5
48162cat "conftest.$ac_ext" >&5
48163cf_cv_have_ttytype=no
48164fi
48165rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48166
48167fi
48168
48169echo "$as_me:48169: result: $cf_cv_have_ttytype" >&5
48170echo "${ECHO_T}$cf_cv_have_ttytype" >&6
48171test "$cf_cv_have_ttytype" = yes &&
48172cat >>confdefs.h <<\EOF
48173#define HAVE_TTYTYPE 1
48174EOF
48175
48176	if test "$use_wide_curses" = yes ; then
48177
48178echo "$as_me:48178: checking if curses supports wide characters" >&5
48179echo $ECHO_N "checking if curses supports wide characters... $ECHO_C" >&6
48180if test "${cf_cv_widec_curses+set}" = set; then
48181  echo $ECHO_N "(cached) $ECHO_C" >&6
48182else
48183
48184cat >"conftest.$ac_ext" <<_ACEOF
48185#line 48185 "configure"
48186#include "confdefs.h"
48187
48188#include <stdlib.h>
48189#include <${cf_cv_ncurses_header:-curses.h}>
48190int
48191main (void)
48192{
48193
48194    wchar_t temp[2];
48195    wchar_t wch = 'A';
48196    temp[0] = wch;
48197    waddnwstr(stdscr, temp, 1);
48198
48199  ;
48200  return 0;
48201}
48202_ACEOF
48203rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48204if { (eval echo "$as_me:48204: \"$ac_link\"") >&5
48205  (eval $ac_link) 2>&5
48206  ac_status=$?
48207  echo "$as_me:48207: \$? = $ac_status" >&5
48208  (exit "$ac_status"); } &&
48209         { ac_try='test -s "conftest$ac_exeext"'
48210  { (eval echo "$as_me:48210: \"$ac_try\"") >&5
48211  (eval $ac_try) 2>&5
48212  ac_status=$?
48213  echo "$as_me:48213: \$? = $ac_status" >&5
48214  (exit "$ac_status"); }; }; then
48215  cf_cv_widec_curses=yes
48216else
48217  echo "$as_me: failed program was:" >&5
48218cat "conftest.$ac_ext" >&5
48219cf_cv_widec_curses=no
48220fi
48221rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48222
48223fi
48224echo "$as_me:48224: result: $cf_cv_widec_curses" >&5
48225echo "${ECHO_T}$cf_cv_widec_curses" >&6
48226
48227if test "$cf_cv_widec_curses" = yes ; then
48228
48229cat >>confdefs.h <<\EOF
48230#define WIDEC_CURSES 1
48231EOF
48232
48233	# This is needed on Tru64 5.0 to declare mbstate_t
48234	echo "$as_me:48234: checking if we must include wchar.h to declare mbstate_t" >&5
48235echo $ECHO_N "checking if we must include wchar.h to declare mbstate_t... $ECHO_C" >&6
48236if test "${cf_cv_widec_mbstate+set}" = set; then
48237  echo $ECHO_N "(cached) $ECHO_C" >&6
48238else
48239
48240	cat >"conftest.$ac_ext" <<_ACEOF
48241#line 48241 "configure"
48242#include "confdefs.h"
48243
48244#include <stdlib.h>
48245#include <${cf_cv_ncurses_header:-curses.h}>
48246int
48247main (void)
48248{
48249mbstate_t state; (void)state
48250  ;
48251  return 0;
48252}
48253_ACEOF
48254rm -f "conftest.$ac_objext"
48255if { (eval echo "$as_me:48255: \"$ac_compile\"") >&5
48256  (eval $ac_compile) 2>&5
48257  ac_status=$?
48258  echo "$as_me:48258: \$? = $ac_status" >&5
48259  (exit "$ac_status"); } &&
48260         { ac_try='test -s "conftest.$ac_objext"'
48261  { (eval echo "$as_me:48261: \"$ac_try\"") >&5
48262  (eval $ac_try) 2>&5
48263  ac_status=$?
48264  echo "$as_me:48264: \$? = $ac_status" >&5
48265  (exit "$ac_status"); }; }; then
48266  cf_cv_widec_mbstate=no
48267else
48268  echo "$as_me: failed program was:" >&5
48269cat "conftest.$ac_ext" >&5
48270cat >"conftest.$ac_ext" <<_ACEOF
48271#line 48271 "configure"
48272#include "confdefs.h"
48273
48274#include <stdlib.h>
48275#include <wchar.h>
48276#include <${cf_cv_ncurses_header:-curses.h}>
48277int
48278main (void)
48279{
48280mbstate_t state; (void)state
48281  ;
48282  return 0;
48283}
48284_ACEOF
48285rm -f "conftest.$ac_objext"
48286if { (eval echo "$as_me:48286: \"$ac_compile\"") >&5
48287  (eval $ac_compile) 2>&5
48288  ac_status=$?
48289  echo "$as_me:48289: \$? = $ac_status" >&5
48290  (exit "$ac_status"); } &&
48291         { ac_try='test -s "conftest.$ac_objext"'
48292  { (eval echo "$as_me:48292: \"$ac_try\"") >&5
48293  (eval $ac_try) 2>&5
48294  ac_status=$?
48295  echo "$as_me:48295: \$? = $ac_status" >&5
48296  (exit "$ac_status"); }; }; then
48297  cf_cv_widec_mbstate=yes
48298else
48299  echo "$as_me: failed program was:" >&5
48300cat "conftest.$ac_ext" >&5
48301cf_cv_widec_mbstate=unknown
48302fi
48303rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48304fi
48305rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48306fi
48307echo "$as_me:48307: result: $cf_cv_widec_mbstate" >&5
48308echo "${ECHO_T}$cf_cv_widec_mbstate" >&6
48309
48310if test "$cf_cv_widec_mbstate" = yes ; then
48311
48312cat >>confdefs.h <<\EOF
48313#define NEED_WCHAR_H 1
48314EOF
48315
48316fi
48317
48318if test "$cf_cv_widec_mbstate" != unknown ; then
48319
48320cat >>confdefs.h <<\EOF
48321#define HAVE_MBSTATE_T 1
48322EOF
48323
48324fi
48325
48326fi
48327
48328	fi
48329
48330echo "$as_me:48330: checking definition to turn on extended curses functions" >&5
48331echo $ECHO_N "checking definition to turn on extended curses functions... $ECHO_C" >&6
48332if test "${cf_cv_need_xopen_extension+set}" = set; then
48333  echo $ECHO_N "(cached) $ECHO_C" >&6
48334else
48335
48336cf_cv_need_xopen_extension=unknown
48337cat >"conftest.$ac_ext" <<_ACEOF
48338#line 48338 "configure"
48339#include "confdefs.h"
48340
48341#include <stdlib.h>
48342#include <${cf_cv_ncurses_header:-curses.h}>
48343int
48344main (void)
48345{
48346
48347#if defined(NCURSES_VERSION_PATCH)
48348#if (NCURSES_VERSION_PATCH < 20100501) && (NCURSES_VERSION_PATCH >= 20100403)
48349	make an error
48350#endif
48351#endif
48352#ifdef NCURSES_WIDECHAR
48353make an error	/* prefer to fall-through on the second checks */
48354#endif
48355	cchar_t check;
48356	int check2 = curs_set((int)sizeof(check));
48357	long x = winnstr(stdscr, "", 0);
48358	int x1, y1;
48359	(void)check2;
48360	getbegyx(stdscr, y1, x1);
48361	(void)x;
48362	(void)y1;
48363	(void)x1;
48364
48365  ;
48366  return 0;
48367}
48368_ACEOF
48369rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48370if { (eval echo "$as_me:48370: \"$ac_link\"") >&5
48371  (eval $ac_link) 2>&5
48372  ac_status=$?
48373  echo "$as_me:48373: \$? = $ac_status" >&5
48374  (exit "$ac_status"); } &&
48375         { ac_try='test -s "conftest$ac_exeext"'
48376  { (eval echo "$as_me:48376: \"$ac_try\"") >&5
48377  (eval $ac_try) 2>&5
48378  ac_status=$?
48379  echo "$as_me:48379: \$? = $ac_status" >&5
48380  (exit "$ac_status"); }; }; then
48381  cf_cv_need_xopen_extension=none
48382else
48383  echo "$as_me: failed program was:" >&5
48384cat "conftest.$ac_ext" >&5
48385
48386	for cf_try_xopen_extension in _XOPEN_SOURCE_EXTENDED NCURSES_WIDECHAR
48387	do
48388		cat >"conftest.$ac_ext" <<_ACEOF
48389#line 48389 "configure"
48390#include "confdefs.h"
48391
48392#define $cf_try_xopen_extension 1
48393#include <stdlib.h>
48394#include <${cf_cv_ncurses_header:-curses.h}>
48395int
48396main (void)
48397{
48398
48399		cchar_t check;
48400		int check2 = curs_set((int)sizeof(check));
48401		long x = winnstr(stdscr, "", 0);
48402		int x1, y1;
48403		getbegyx(stdscr, y1, x1);
48404		(void)check2;
48405		(void)x;
48406		(void)y1;
48407		(void)x1;
48408
48409  ;
48410  return 0;
48411}
48412_ACEOF
48413rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48414if { (eval echo "$as_me:48414: \"$ac_link\"") >&5
48415  (eval $ac_link) 2>&5
48416  ac_status=$?
48417  echo "$as_me:48417: \$? = $ac_status" >&5
48418  (exit "$ac_status"); } &&
48419         { ac_try='test -s "conftest$ac_exeext"'
48420  { (eval echo "$as_me:48420: \"$ac_try\"") >&5
48421  (eval $ac_try) 2>&5
48422  ac_status=$?
48423  echo "$as_me:48423: \$? = $ac_status" >&5
48424  (exit "$ac_status"); }; }; then
48425  cf_cv_need_xopen_extension=$cf_try_xopen_extension; break
48426else
48427  echo "$as_me: failed program was:" >&5
48428cat "conftest.$ac_ext" >&5
48429fi
48430rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48431	done
48432
48433fi
48434rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48435
48436fi
48437echo "$as_me:48437: result: $cf_cv_need_xopen_extension" >&5
48438echo "${ECHO_T}$cf_cv_need_xopen_extension" >&6
48439
48440case "$cf_cv_need_xopen_extension" in
48441(*_*)
48442
48443	test -n "$CPPFLAGS" && CPPFLAGS="$CPPFLAGS "
48444	CPPFLAGS="${CPPFLAGS}-D$cf_cv_need_xopen_extension"
48445
48446	;;
48447esac
48448
48449echo "$as_me:48449: checking for term.h" >&5
48450echo $ECHO_N "checking for term.h... $ECHO_C" >&6
48451if test "${cf_cv_term_header+set}" = set; then
48452  echo $ECHO_N "(cached) $ECHO_C" >&6
48453else
48454
48455# If we found <ncurses/curses.h>, look for <ncurses/term.h>, but always look
48456# for <term.h> if we do not find the variant.
48457
48458cf_header_list="term.h ncurses/term.h ncursesw/term.h"
48459
48460case "${cf_cv_ncurses_header:-curses.h}" in
48461(*/*)
48462	cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`term.h
48463	cf_header_list="$cf_header_item $cf_header_list"
48464	;;
48465esac
48466
48467for cf_header in $cf_header_list
48468do
48469	cat >"conftest.$ac_ext" <<_ACEOF
48470#line 48470 "configure"
48471#include "confdefs.h"
48472
48473#include <${cf_cv_ncurses_header:-curses.h}>
48474#include <${cf_header}>
48475int
48476main (void)
48477{
48478WINDOW *x; (void)x
48479  ;
48480  return 0;
48481}
48482_ACEOF
48483rm -f "conftest.$ac_objext"
48484if { (eval echo "$as_me:48484: \"$ac_compile\"") >&5
48485  (eval $ac_compile) 2>&5
48486  ac_status=$?
48487  echo "$as_me:48487: \$? = $ac_status" >&5
48488  (exit "$ac_status"); } &&
48489         { ac_try='test -s "conftest.$ac_objext"'
48490  { (eval echo "$as_me:48490: \"$ac_try\"") >&5
48491  (eval $ac_try) 2>&5
48492  ac_status=$?
48493  echo "$as_me:48493: \$? = $ac_status" >&5
48494  (exit "$ac_status"); }; }; then
48495  cf_cv_term_header=$cf_header
48496	 break
48497else
48498  echo "$as_me: failed program was:" >&5
48499cat "conftest.$ac_ext" >&5
48500cf_cv_term_header=no
48501fi
48502rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48503done
48504
48505case "$cf_cv_term_header" in
48506(no)
48507	# If curses is ncurses, some packagers still mess it up by trying to make
48508	# us use GNU termcap.  This handles the most common case.
48509	for cf_header in ncurses/term.h ncursesw/term.h
48510	do
48511		cat >"conftest.$ac_ext" <<_ACEOF
48512#line 48512 "configure"
48513#include "confdefs.h"
48514
48515#include <${cf_cv_ncurses_header:-curses.h}>
48516#ifdef NCURSES_VERSION
48517#include <${cf_header}>
48518#else
48519make an error
48520#endif
48521int
48522main (void)
48523{
48524WINDOW *x; (void)x
48525  ;
48526  return 0;
48527}
48528_ACEOF
48529rm -f "conftest.$ac_objext"
48530if { (eval echo "$as_me:48530: \"$ac_compile\"") >&5
48531  (eval $ac_compile) 2>&5
48532  ac_status=$?
48533  echo "$as_me:48533: \$? = $ac_status" >&5
48534  (exit "$ac_status"); } &&
48535         { ac_try='test -s "conftest.$ac_objext"'
48536  { (eval echo "$as_me:48536: \"$ac_try\"") >&5
48537  (eval $ac_try) 2>&5
48538  ac_status=$?
48539  echo "$as_me:48539: \$? = $ac_status" >&5
48540  (exit "$ac_status"); }; }; then
48541  cf_cv_term_header=$cf_header
48542			 break
48543else
48544  echo "$as_me: failed program was:" >&5
48545cat "conftest.$ac_ext" >&5
48546cf_cv_term_header=no
48547fi
48548rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48549	done
48550	;;
48551esac
48552
48553fi
48554echo "$as_me:48554: result: $cf_cv_term_header" >&5
48555echo "${ECHO_T}$cf_cv_term_header" >&6
48556
48557case "$cf_cv_term_header" in
48558(term.h)
48559
48560cat >>confdefs.h <<\EOF
48561#define HAVE_TERM_H 1
48562EOF
48563
48564	;;
48565(ncurses/term.h)
48566
48567cat >>confdefs.h <<\EOF
48568#define HAVE_NCURSES_TERM_H 1
48569EOF
48570
48571	;;
48572(ncursesw/term.h)
48573
48574cat >>confdefs.h <<\EOF
48575#define HAVE_NCURSESW_TERM_H 1
48576EOF
48577
48578	;;
48579esac
48580
48581echo "$as_me:48581: checking for unctrl.h" >&5
48582echo $ECHO_N "checking for unctrl.h... $ECHO_C" >&6
48583if test "${cf_cv_unctrl_header+set}" = set; then
48584  echo $ECHO_N "(cached) $ECHO_C" >&6
48585else
48586
48587# If we found <ncurses/curses.h>, look for <ncurses/unctrl.h>, but always look
48588# for <unctrl.h> if we do not find the variant.
48589
48590cf_header_list="unctrl.h ncurses/unctrl.h ncursesw/unctrl.h"
48591
48592case "${cf_cv_ncurses_header:-curses.h}" in
48593(*/*)
48594	cf_header_item=`echo "${cf_cv_ncurses_header:-curses.h}" | sed -e 's%\..*%%' -e 's%/.*%/%'`unctrl.h
48595	cf_header_list="$cf_header_item $cf_header_list"
48596	;;
48597esac
48598
48599for cf_header in $cf_header_list
48600do
48601	cat >"conftest.$ac_ext" <<_ACEOF
48602#line 48602 "configure"
48603#include "confdefs.h"
48604
48605#include <${cf_cv_ncurses_header:-curses.h}>
48606#include <${cf_header}>
48607int
48608main (void)
48609{
48610WINDOW *x; (void)x
48611  ;
48612  return 0;
48613}
48614_ACEOF
48615rm -f "conftest.$ac_objext"
48616if { (eval echo "$as_me:48616: \"$ac_compile\"") >&5
48617  (eval $ac_compile) 2>&5
48618  ac_status=$?
48619  echo "$as_me:48619: \$? = $ac_status" >&5
48620  (exit "$ac_status"); } &&
48621         { ac_try='test -s "conftest.$ac_objext"'
48622  { (eval echo "$as_me:48622: \"$ac_try\"") >&5
48623  (eval $ac_try) 2>&5
48624  ac_status=$?
48625  echo "$as_me:48625: \$? = $ac_status" >&5
48626  (exit "$ac_status"); }; }; then
48627  cf_cv_unctrl_header=$cf_header
48628	 break
48629else
48630  echo "$as_me: failed program was:" >&5
48631cat "conftest.$ac_ext" >&5
48632cf_cv_unctrl_header=no
48633fi
48634rm -f "conftest.$ac_objext" "conftest.$ac_ext"
48635done
48636
48637fi
48638echo "$as_me:48638: result: $cf_cv_unctrl_header" >&5
48639echo "${ECHO_T}$cf_cv_unctrl_header" >&6
48640
48641case "$cf_cv_unctrl_header" in
48642(no)
48643	{ echo "$as_me:48643: WARNING: unctrl.h header not found" >&5
48644echo "$as_me: WARNING: unctrl.h header not found" >&2;}
48645	;;
48646esac
48647
48648case "$cf_cv_unctrl_header" in
48649(unctrl.h)
48650
48651cat >>confdefs.h <<\EOF
48652#define HAVE_UNCTRL_H 1
48653EOF
48654
48655	;;
48656(ncurses/unctrl.h)
48657
48658cat >>confdefs.h <<\EOF
48659#define HAVE_NCURSES_UNCTRL_H 1
48660EOF
48661
48662	;;
48663(ncursesw/unctrl.h)
48664
48665cat >>confdefs.h <<\EOF
48666#define HAVE_NCURSESW_UNCTRL_H 1
48667EOF
48668
48669	;;
48670esac
48671
48672for cf_func in \
48673		assume_default_colors \
48674		cbreak \
48675		define_key \
48676		delscreen \
48677		getattrs \
48678		getbegx \
48679		getbegy \
48680		keypad \
48681		napms \
48682		newpad \
48683		newterm \
48684		pnoutrefresh \
48685		resizeterm \
48686		touchline \
48687		touchwin \
48688		use_default_colors \
48689		use_legacy_coding \
48690		wattr_get \
48691		wborder \
48692		wredrawln \
48693		wresize \
48694
48695do
48696
48697cf_tr_func=`echo "$cf_func" | sed y%abcdefghijklmnopqrstuvwxyz./-%ABCDEFGHIJKLMNOPQRSTUVWXYZ___%`
48698
48699	echo "$as_me:48699: checking for ${cf_func}" >&5
48700echo $ECHO_N "checking for ${cf_func}... $ECHO_C" >&6
48701
48702echo "${as_me:-configure}:48702: testing ${cf_func} ..." 1>&5
48703
48704	if eval "test \"\${cf_cv_func_$cf_func+set}\" = set"; then
48705  echo $ECHO_N "(cached) $ECHO_C" >&6
48706else
48707
48708		eval cf_result='$ac_cv_func_'$cf_func
48709		if test ".$cf_result" != ".no"; then
48710			cat >"conftest.$ac_ext" <<_ACEOF
48711#line 48711 "configure"
48712#include "confdefs.h"
48713
48714#ifdef HAVE_XCURSES
48715#include <xcurses.h>
48716char * XCursesProgramName = "test";
48717#else
48718#include <${cf_cv_ncurses_header:-curses.h}>
48719#if defined(NCURSES_VERSION) && defined(HAVE_NCURSESW_TERM_H)
48720#include <ncursesw/term.h>
48721#elif defined(NCURSES_VERSION) && defined(HAVE_NCURSES_TERM_H)
48722#include <ncurses/term.h>
48723#elif defined(HAVE_TERM_H)
48724#include <term.h>
48725#endif
48726#endif
48727
48728int
48729main (void)
48730{
48731
48732#ifndef ${cf_func}
48733long foo = (long)(&${cf_func});
48734fprintf(stderr, "testing linkage of $cf_func:%p\\n", (void *)foo);
48735if (foo + 1234L > 5678L)
48736	${cf_cv_main_return:-return}(foo != 0);
48737#endif
48738
48739  ;
48740  return 0;
48741}
48742_ACEOF
48743rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48744if { (eval echo "$as_me:48744: \"$ac_link\"") >&5
48745  (eval $ac_link) 2>&5
48746  ac_status=$?
48747  echo "$as_me:48747: \$? = $ac_status" >&5
48748  (exit "$ac_status"); } &&
48749         { ac_try='test -s "conftest$ac_exeext"'
48750  { (eval echo "$as_me:48750: \"$ac_try\"") >&5
48751  (eval $ac_try) 2>&5
48752  ac_status=$?
48753  echo "$as_me:48753: \$? = $ac_status" >&5
48754  (exit "$ac_status"); }; }; then
48755  cf_result=yes
48756else
48757  echo "$as_me: failed program was:" >&5
48758cat "conftest.$ac_ext" >&5
48759cf_result=no
48760fi
48761rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48762		fi
48763		eval 'cf_cv_func_'$cf_func'="$cf_result"'
48764
48765fi
48766
48767	# use the computed/retrieved cache-value:
48768	eval 'cf_result=$cf_cv_func_'$cf_func
48769	echo "$as_me:48769: result: $cf_result" >&5
48770echo "${ECHO_T}$cf_result" >&6
48771	if test "$cf_result" != no; then
48772		cat >>confdefs.h <<EOF
48773#define HAVE_${cf_tr_func} 1
48774EOF
48775
48776	fi
48777done
48778
48779for ac_func in \
48780		curses_exit \
48781		_nc_free_and_exit \
48782		_nc_freeall \
48783
48784do
48785as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
48786echo "$as_me:48786: checking for $ac_func" >&5
48787echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
48788if eval "test \"\${$as_ac_var+set}\" = set"; then
48789  echo $ECHO_N "(cached) $ECHO_C" >&6
48790else
48791  cat >"conftest.$ac_ext" <<_ACEOF
48792#line 48792 "configure"
48793#include "confdefs.h"
48794#define $ac_func autoconf_temporary
48795#include <limits.h>	/* least-intrusive standard header which defines gcc2 __stub macros */
48796#undef $ac_func
48797
48798#ifdef __cplusplus
48799extern "C"
48800#endif
48801
48802/* We use char because int might match the return type of a gcc2
48803   builtin and then its argument prototype would still apply.  */
48804char $ac_func (void);
48805
48806int
48807main (void)
48808{
48809
48810/* The GNU C library defines stubs for functions which it implements
48811    to always fail with ENOSYS.  Some functions are actually named
48812    something starting with __ and the normal name is an alias.  */
48813#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
48814#error found stub for $ac_func
48815#endif
48816
48817	return $ac_func ();
48818  ;
48819  return 0;
48820}
48821_ACEOF
48822rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48823if { (eval echo "$as_me:48823: \"$ac_link\"") >&5
48824  (eval $ac_link) 2>&5
48825  ac_status=$?
48826  echo "$as_me:48826: \$? = $ac_status" >&5
48827  (exit "$ac_status"); } &&
48828         { ac_try='test -s "conftest$ac_exeext"'
48829  { (eval echo "$as_me:48829: \"$ac_try\"") >&5
48830  (eval $ac_try) 2>&5
48831  ac_status=$?
48832  echo "$as_me:48832: \$? = $ac_status" >&5
48833  (exit "$ac_status"); }; }; then
48834  eval "$as_ac_var=yes"
48835else
48836  echo "$as_me: failed program was:" >&5
48837cat "conftest.$ac_ext" >&5
48838eval "$as_ac_var=no"
48839fi
48840rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48841fi
48842echo "$as_me:48842: result: `eval echo '${'"$as_ac_var"'}'`" >&5
48843echo "${ECHO_T}`eval echo '${'"$as_ac_var"'}'`" >&6
48844if test "`eval echo '${'"$as_ac_var"'}'`" = yes; then
48845  cat >>confdefs.h <<EOF
48846#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
48847EOF
48848
48849fi
48850done
48851
48852fi
48853
48854if test "$use_color_style" != no ; then
48855	if test .$cf_cv_color_curses != .yes ; then
48856		{ { echo "$as_me:48856: error: Configuration does not support color-styles" >&5
48857echo "$as_me: error: Configuration does not support color-styles" >&2;}
48858   { (exit 1); exit 1; }; }
48859	fi
48860	if test "$cf_cv_screen" = slang ; then
48861		{ { echo "$as_me:48861: error: Configuration does not support color-styles" >&5
48862echo "$as_me: error: Configuration does not support color-styles" >&2;}
48863   { (exit 1); exit 1; }; }
48864	fi
48865fi
48866
48867if test "$use_scrollbar" != no ; then
48868	if test .$cf_cv_fancy_curses != .yes ; then
48869		{ echo "$as_me:48869: WARNING: Configuration does not support ACS_xxx definitions" >&5
48870echo "$as_me: WARNING: Configuration does not support ACS_xxx definitions" >&2;}
48871	else
48872
48873cat >>confdefs.h <<\EOF
48874#define USE_SCROLLBAR 1
48875EOF
48876
48877	fi
48878fi
48879
48880# use rpath for libraries in unusual places
48881
48882echo "$as_me:48882: checking if rpath-hack should be disabled" >&5
48883echo $ECHO_N "checking if rpath-hack should be disabled... $ECHO_C" >&6
48884
48885# Check whether --enable-rpath-hack or --disable-rpath-hack was given.
48886if test "${enable_rpath_hack+set}" = set; then
48887  enableval="$enable_rpath_hack"
48888  test "$enableval" != no && enableval=yes
48889	if test "$enableval" != "yes" ; then
48890    enable_rpath_hack=no
48891	else
48892		enable_rpath_hack=yes
48893	fi
48894else
48895  enableval=yes
48896	enable_rpath_hack=yes
48897
48898fi;
48899if test "x$enable_rpath_hack" = xno; then cf_disable_rpath_hack=yes; else cf_disable_rpath_hack=no; fi
48900echo "$as_me:48900: result: $cf_disable_rpath_hack" >&5
48901echo "${ECHO_T}$cf_disable_rpath_hack" >&6
48902
48903if test "$enable_rpath_hack" = yes ; then
48904
48905echo "$as_me:48905: checking for updated LDFLAGS" >&5
48906echo $ECHO_N "checking for updated LDFLAGS... $ECHO_C" >&6
48907if test -n "$LD_RPATH_OPT" ; then
48908	echo "$as_me:48908: result: maybe" >&5
48909echo "${ECHO_T}maybe" >&6
48910
48911	for ac_prog in ldd
48912do
48913  # Extract the first word of "$ac_prog", so it can be a program name with args.
48914set dummy $ac_prog; ac_word=$2
48915echo "$as_me:48915: checking for $ac_word" >&5
48916echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
48917if test "${ac_cv_prog_cf_ldd_prog+set}" = set; then
48918  echo $ECHO_N "(cached) $ECHO_C" >&6
48919else
48920  if test -n "$cf_ldd_prog"; then
48921  ac_cv_prog_cf_ldd_prog="$cf_ldd_prog" # Let the user override the test.
48922else
48923  ac_save_IFS=$IFS; IFS=$ac_path_separator
48924ac_dummy="$PATH"
48925for ac_dir in $ac_dummy; do
48926  IFS=$ac_save_IFS
48927  test -z "$ac_dir" && ac_dir=.
48928  $as_executable_p "$ac_dir/$ac_word" || continue
48929ac_cv_prog_cf_ldd_prog="$ac_prog"
48930echo "$as_me:48930: found $ac_dir/$ac_word" >&5
48931break
48932done
48933
48934fi
48935fi
48936cf_ldd_prog=$ac_cv_prog_cf_ldd_prog
48937if test -n "$cf_ldd_prog"; then
48938  echo "$as_me:48938: result: $cf_ldd_prog" >&5
48939echo "${ECHO_T}$cf_ldd_prog" >&6
48940else
48941  echo "$as_me:48941: result: no" >&5
48942echo "${ECHO_T}no" >&6
48943fi
48944
48945  test -n "$cf_ldd_prog" && break
48946done
48947test -n "$cf_ldd_prog" || cf_ldd_prog="no"
48948
48949	cf_rpath_list="/usr/lib /lib"
48950	if test "$cf_ldd_prog" != no
48951	then
48952		cf_rpath_oops=
48953
48954cat >"conftest.$ac_ext" <<_ACEOF
48955#line 48955 "configure"
48956#include "confdefs.h"
48957#include <stdio.h>
48958int
48959main (void)
48960{
48961printf("Hello");
48962  ;
48963  return 0;
48964}
48965_ACEOF
48966rm -f "conftest.$ac_objext" "conftest$ac_exeext"
48967if { (eval echo "$as_me:48967: \"$ac_link\"") >&5
48968  (eval $ac_link) 2>&5
48969  ac_status=$?
48970  echo "$as_me:48970: \$? = $ac_status" >&5
48971  (exit "$ac_status"); } &&
48972         { ac_try='test -s "conftest$ac_exeext"'
48973  { (eval echo "$as_me:48973: \"$ac_try\"") >&5
48974  (eval $ac_try) 2>&5
48975  ac_status=$?
48976  echo "$as_me:48976: \$? = $ac_status" >&5
48977  (exit "$ac_status"); }; }; then
48978  cf_rpath_oops=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} ' not found' | sed -e 's% =>.*$%%' |sort | uniq`
48979		 cf_rpath_list=`"$cf_ldd_prog" "conftest$ac_exeext" | ${FGREP-fgrep} / | sed -e 's%^.*[ 	]/%/%' -e 's%/[^/][^/]*$%%' |sort | uniq`
48980else
48981  echo "$as_me: failed program was:" >&5
48982cat "conftest.$ac_ext" >&5
48983fi
48984rm -f "conftest.$ac_objext" "conftest$ac_exeext" "conftest.$ac_ext"
48985
48986		# If we passed the link-test, but get a "not found" on a given library,
48987		# this could be due to inept reconfiguration of gcc to make it only
48988		# partly honor /usr/local/lib (or whatever).  Sometimes this behavior
48989		# is intentional, e.g., installing gcc in /usr/bin and suppressing the
48990		# /usr/local libraries.
48991		if test -n "$cf_rpath_oops"
48992		then
48993			for cf_rpath_src in $cf_rpath_oops
48994			do
48995				for cf_rpath_dir in \
48996					/usr/local \
48997					/usr/pkg \
48998					/opt/sfw
48999				do
49000					if test -f "$cf_rpath_dir/lib/$cf_rpath_src"
49001					then
49002						test -n "$verbose" && echo "	...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src" 1>&6
49003
49004echo "${as_me:-configure}:49004: testing ...adding -L$cf_rpath_dir/lib to LDFLAGS for $cf_rpath_src ..." 1>&5
49005
49006						LDFLAGS="$LDFLAGS -L$cf_rpath_dir/lib"
49007						break
49008					fi
49009				done
49010			done
49011		fi
49012	fi
49013
49014	test -n "$verbose" && echo "	...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
49015
49016echo "${as_me:-configure}:49016: testing ...checking EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
49017
49018test -n "$verbose" && echo "	...checking LDFLAGS $LDFLAGS" 1>&6
49019
49020echo "${as_me:-configure}:49020: testing ...checking LDFLAGS $LDFLAGS ..." 1>&5
49021
49022cf_rpath_dst=
49023for cf_rpath_src in $LDFLAGS
49024do
49025	case "$cf_rpath_src" in
49026	(-L*)
49027
49028		# check if this refers to a directory which we will ignore
49029		cf_rpath_skip=no
49030		if test -n "$cf_rpath_list"
49031		then
49032			for cf_rpath_item in $cf_rpath_list
49033			do
49034				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
49035				then
49036					cf_rpath_skip=yes
49037					break
49038				fi
49039			done
49040		fi
49041
49042		if test "$cf_rpath_skip" = no
49043		then
49044			# transform the option
49045			if test "$LD_RPATH_OPT" = "-R " ; then
49046				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
49047			else
49048				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
49049			fi
49050
49051			# if we have not already added this, add it now
49052			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
49053			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
49054			then
49055				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
49056
49057echo "${as_me:-configure}:49057: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
49058
49059				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
49060			fi
49061		fi
49062		;;
49063	esac
49064	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
49065done
49066LDFLAGS=$cf_rpath_dst
49067
49068test -n "$verbose" && echo "	...checked LDFLAGS $LDFLAGS" 1>&6
49069
49070echo "${as_me:-configure}:49070: testing ...checked LDFLAGS $LDFLAGS ..." 1>&5
49071
49072test -n "$verbose" && echo "	...checking LIBS $LIBS" 1>&6
49073
49074echo "${as_me:-configure}:49074: testing ...checking LIBS $LIBS ..." 1>&5
49075
49076cf_rpath_dst=
49077for cf_rpath_src in $LIBS
49078do
49079	case "$cf_rpath_src" in
49080	(-L*)
49081
49082		# check if this refers to a directory which we will ignore
49083		cf_rpath_skip=no
49084		if test -n "$cf_rpath_list"
49085		then
49086			for cf_rpath_item in $cf_rpath_list
49087			do
49088				if test "x$cf_rpath_src" = "x-L$cf_rpath_item"
49089				then
49090					cf_rpath_skip=yes
49091					break
49092				fi
49093			done
49094		fi
49095
49096		if test "$cf_rpath_skip" = no
49097		then
49098			# transform the option
49099			if test "$LD_RPATH_OPT" = "-R " ; then
49100				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%-R %"`
49101			else
49102				cf_rpath_tmp=`echo "$cf_rpath_src" |sed -e "s%-L%$LD_RPATH_OPT%"`
49103			fi
49104
49105			# if we have not already added this, add it now
49106			cf_rpath_tst=`echo "$EXTRA_LDFLAGS" | sed -e "s%$cf_rpath_tmp %%"`
49107			if test "x$cf_rpath_tst" = "x$EXTRA_LDFLAGS"
49108			then
49109				test -n "$verbose" && echo "	...Filter $cf_rpath_src ->$cf_rpath_tmp" 1>&6
49110
49111echo "${as_me:-configure}:49111: testing ...Filter $cf_rpath_src ->$cf_rpath_tmp ..." 1>&5
49112
49113				EXTRA_LDFLAGS="$cf_rpath_tmp $EXTRA_LDFLAGS"
49114			fi
49115		fi
49116		;;
49117	esac
49118	cf_rpath_dst="$cf_rpath_dst $cf_rpath_src"
49119done
49120LIBS=$cf_rpath_dst
49121
49122test -n "$verbose" && echo "	...checked LIBS $LIBS" 1>&6
49123
49124echo "${as_me:-configure}:49124: testing ...checked LIBS $LIBS ..." 1>&5
49125
49126	test -n "$verbose" && echo "	...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS" 1>&6
49127
49128echo "${as_me:-configure}:49128: testing ...checked EXTRA_LDFLAGS $EXTRA_LDFLAGS ..." 1>&5
49129
49130else
49131	echo "$as_me:49131: result: no" >&5
49132echo "${ECHO_T}no" >&6
49133fi
49134
49135fi
49136
49137if test "$GCC" = yes || test "$GXX" = yes
49138then
49139
49140	test -n "$CFLAGS" && CFLAGS="$CFLAGS "
49141	CFLAGS="${CFLAGS}$EXTRA_CFLAGS"
49142
49143	EXTRA_CFLAGS=
49144fi
49145
49146### Finally, build config.h and the makefiles
49147test -z "$CONFIG_SHELL" && CONFIG_SHELL=/bin/sh
49148
49149srcdir="$srcdir"
49150SRCDIR_CLEAN="#"
49151if test -n "$srcdir" ; then
49152	echo "srcdir is $srcdir"
49153	mkdir -p WWW/Library/Implementation
49154	mkdir -p src/chrtrans
49155	test "$USE_INCLUDED_LIBINTL" = yes && mkdir -p intl
49156	test "$srcdir" != "." && SRCDIR_CLEAN=""
49157fi
49158
49159HOMEPAGE_URL="https://lynx.invisible-island.net/"
49160
49161cat >>confdefs.h <<EOF
49162#define HOMEPAGE_URL "$HOMEPAGE_URL"
49163EOF
49164
49165ac_config_files="$ac_config_files makefile WWW/Library/Implementation/makefile src/makefile src/chrtrans/makefile $SUB_MAKEFILE"
49166ac_config_commands="$ac_config_commands default"
49167cat >confcache <<\_ACEOF
49168# This file is a shell script that caches the results of configure
49169# tests run on this system so they can be shared between configure
49170# scripts and configure runs, see configure's option --config-cache.
49171# It is not useful on other systems.  If it contains results you don't
49172# want to keep, you may remove or edit it.
49173#
49174# config.status only pays attention to the cache file if you give it
49175# the --recheck option to rerun configure.
49176#
49177# `ac_cv_env_foo' variables (set or unset) will be overriden when
49178# loading this file, other *unset* `ac_cv_foo' will be assigned the
49179# following values.
49180
49181_ACEOF
49182
49183# The following way of writing the cache mishandles newlines in values,
49184# but we know of no workaround that is simple, portable, and efficient.
49185# So, don't put newlines in cache variables' values.
49186# Ultrix sh set writes to stderr and can't be redirected directly,
49187# and sets the high bit in the cache file unless we assign to the vars.
49188{
49189  (set) 2>&1 |
49190    case `(ac_space=' '; set | grep ac_space) 2>&1` in
49191    *ac_space=\ *)
49192      # `set' does not quote correctly, so add quotes (double-quote
49193      # substitution turns \\\\ into \\, and sed turns \\ into \).
49194      sed -n \
49195        "s/'/'\\\\''/g;
49196    	  s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
49197      ;;
49198    *)
49199      # `set' quotes correctly as required by POSIX, so do not add quotes.
49200      sed -n \
49201        "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
49202      ;;
49203    esac;
49204} |
49205  sed '
49206     t clear
49207     : clear
49208     s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
49209     t end
49210     /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
49211     : end' >>confcache
49212if cmp -s $cache_file confcache; then :; else
49213  if test -w $cache_file; then
49214    test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
49215    cat confcache >$cache_file
49216  else
49217    echo "not updating unwritable cache $cache_file"
49218  fi
49219fi
49220rm -f confcache
49221
49222test "x$prefix" = xNONE && prefix=$ac_default_prefix
49223# Let make expand exec_prefix.
49224test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
49225
49226# VPATH may cause trouble with some makes, so we remove $(srcdir),
49227# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
49228# trailing colons and then remove the whole line if VPATH becomes empty
49229# (actually we leave an empty line to preserve line numbers).
49230if test "x$srcdir" = x.; then
49231  ac_vpsub='/^[ 	]*VPATH[ 	]*=/{
49232s/:*\$(srcdir):*/:/;
49233s/:*\${srcdir}:*/:/;
49234s/:*@srcdir@:*/:/;
49235s/^\([^=]*=[ 	]*\):*/\1/;
49236s/:*$//;
49237s/^[^=]*=[ 	]*$//;
49238}'
49239fi
49240
49241DEFS=-DHAVE_CONFIG_H
49242
49243: "${CONFIG_STATUS=./config.status}"
49244ac_clean_files_save=$ac_clean_files
49245ac_clean_files="$ac_clean_files $CONFIG_STATUS"
49246{ echo "$as_me:49246: creating $CONFIG_STATUS" >&5
49247echo "$as_me: creating $CONFIG_STATUS" >&6;}
49248cat >"$CONFIG_STATUS" <<_ACEOF
49249#! $SHELL
49250# Generated automatically by configure.
49251# Run this file to recreate the current configuration.
49252# Compiler output produced by configure, useful for debugging
49253# configure, is in config.log if it exists.
49254
49255debug=false
49256SHELL=\${CONFIG_SHELL-$SHELL}
49257ac_cs_invocation="\$0 \$@"
49258
49259CLICOLOR_FORCE= GREP_OPTIONS=
49260unset CLICOLOR_FORCE GREP_OPTIONS
49261_ACEOF
49262
49263cat >>"$CONFIG_STATUS" <<\_ACEOF
49264# Be Bourne compatible
49265if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
49266  emulate sh
49267  NULLCMD=:
49268elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
49269  set -o posix
49270fi
49271
49272# Name of the executable.
49273as_me=`echo "$0" |sed 's,.*[\\/],,'`
49274
49275if expr a : '\(a\)' >/dev/null 2>&1; then
49276  as_expr=expr
49277else
49278  as_expr=false
49279fi
49280
49281rm -f conf$$ conf$$.exe conf$$.file
49282echo >conf$$.file
49283if ln -s conf$$.file conf$$ 2>/dev/null; then
49284  # We could just check for DJGPP; but this test a) works b) is more generic
49285  # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
49286  if test -f conf$$.exe; then
49287    # Don't use ln at all; we don't have any links
49288    as_ln_s='cp -p'
49289  else
49290    as_ln_s='ln -s'
49291  fi
49292elif ln conf$$.file conf$$ 2>/dev/null; then
49293  as_ln_s=ln
49294else
49295  as_ln_s='cp -p'
49296fi
49297rm -f conf$$ conf$$.exe conf$$.file
49298
49299as_executable_p="test -f"
49300
49301# Support unset when possible.
49302if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
49303  as_unset="unset"
49304else
49305  as_unset="false"
49306fi
49307
49308# NLS nuisances.
49309$as_unset LANG || test "${LANG+set}" != set || { LANG=C; export LANG; }
49310$as_unset LC_ALL || test "${LC_ALL+set}" != set || { LC_ALL=C; export LC_ALL; }
49311$as_unset LC_TIME || test "${LC_TIME+set}" != set || { LC_TIME=C; export LC_TIME; }
49312$as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set || { LC_CTYPE=C; export LC_CTYPE; }
49313$as_unset LANGUAGE || test "${LANGUAGE+set}" != set || { LANGUAGE=C; export LANGUAGE; }
49314$as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set || { LC_COLLATE=C; export LC_COLLATE; }
49315$as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set || { LC_NUMERIC=C; export LC_NUMERIC; }
49316$as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set || { LC_MESSAGES=C; export LC_MESSAGES; }
49317
49318# IFS
49319# We need space, tab and new line, in precisely that order.
49320as_nl='
49321'
49322IFS=" 	$as_nl"
49323
49324# CDPATH.
49325$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=:; export CDPATH; }
49326
49327exec 6>&1
49328
49329_ACEOF
49330
49331# Files that config.status was made for.
49332if test -n "$ac_config_files"; then
49333  echo "config_files=\"$ac_config_files\"" >>"$CONFIG_STATUS"
49334fi
49335
49336if test -n "$ac_config_headers"; then
49337  echo "config_headers=\"$ac_config_headers\"" >>"$CONFIG_STATUS"
49338fi
49339
49340if test -n "$ac_config_links"; then
49341  echo "config_links=\"$ac_config_links\"" >>"$CONFIG_STATUS"
49342fi
49343
49344if test -n "$ac_config_commands"; then
49345  echo "config_commands=\"$ac_config_commands\"" >>"$CONFIG_STATUS"
49346fi
49347
49348cat >>"$CONFIG_STATUS" <<\EOF
49349
49350ac_cs_usage="\
49351\`$as_me' instantiates files from templates according to the
49352current configuration.
49353
49354Usage: $0 [OPTIONS] [FILE]...
49355
49356  -h, --help       print this help, then exit
49357  -V, --version    print version number, then exit
49358  -d, --debug      don't remove temporary files
49359      --recheck    update $as_me by reconfiguring in the same conditions
49360  --file=FILE[:TEMPLATE]
49361                   instantiate the configuration file FILE
49362  --header=FILE[:TEMPLATE]
49363                   instantiate the configuration header FILE
49364
49365Configuration files:
49366$config_files
49367
49368Configuration headers:
49369$config_headers
49370
49371Configuration commands:
49372$config_commands
49373
49374Report bugs to <dickey@invisible-island.net>."
49375EOF
49376
49377cat >>"$CONFIG_STATUS" <<EOF
49378ac_cs_version="\\
49379config.status
49380configured by $0, generated by GNU Autoconf 2.52.20210509,
49381  with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
49382
49383Copyright 2003-2020,2021	Thomas E. Dickey
49384Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
49385Free Software Foundation, Inc.
49386This config.status script is free software; the Free Software Foundation
49387gives unlimited permission to copy, distribute and modify it."
49388srcdir="$srcdir"
49389INSTALL="$INSTALL"
49390EOF
49391
49392cat >>"$CONFIG_STATUS" <<\EOF
49393# If no file are specified by the user, then we need to provide default
49394# value.  By we need to know if files were specified by the user.
49395ac_need_defaults=:
49396while test $# != 0
49397do
49398  case $1 in
49399  --*=*)
49400    ac_option=`expr "x$1" : 'x\([^=]*\)='`
49401    ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
49402    shift
49403    set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
49404    shift
49405    ;;
49406  -*);;
49407  *) # This is not an option, so the user has probably given explicit
49408     # arguments.
49409     ac_need_defaults=false;;
49410  esac
49411
49412  case $1 in
49413  # Handling of the options.
49414EOF
49415cat >>"$CONFIG_STATUS" <<EOF
49416  -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
49417    echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
49418    exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
49419EOF
49420cat >>"$CONFIG_STATUS" <<\EOF
49421  --version | --vers* | -V )
49422    echo "$ac_cs_version"; exit 0 ;;
49423  --he | --h)
49424    # Conflict between --help and --header
49425    { { echo "$as_me:49425: error: ambiguous option: $1
49426Try \`$0 --help' for more information." >&5
49427echo "$as_me: error: ambiguous option: $1
49428Try \`$0 --help' for more information." >&2;}
49429   { (exit 1); exit 1; }; };;
49430  --help | --hel | -h )
49431    echo "$ac_cs_usage"; exit 0 ;;
49432  --debug | --d* | -d )
49433    debug=: ;;
49434  --file | --fil | --fi | --f )
49435    shift
49436    CONFIG_FILES="$CONFIG_FILES $1"
49437    ac_need_defaults=false;;
49438  --header | --heade | --head | --hea )
49439    shift
49440    CONFIG_HEADERS="$CONFIG_HEADERS $1"
49441    ac_need_defaults=false;;
49442
49443  # This is an error.
49444  -*) { { echo "$as_me:49444: error: unrecognized option: $1
49445Try \`$0 --help' for more information." >&5
49446echo "$as_me: error: unrecognized option: $1
49447Try \`$0 --help' for more information." >&2;}
49448   { (exit 1); exit 1; }; } ;;
49449
49450  *) ac_config_targets="$ac_config_targets $1" ;;
49451
49452  esac
49453  shift
49454done
49455
49456exec 5>>config.log
49457cat >&5 << _ACEOF
49458
49459## ----------------------- ##
49460## Running config.status.  ##
49461## ----------------------- ##
49462
49463This file was extended by $as_me 2.52.20210509, executed with
49464  CONFIG_FILES    = $CONFIG_FILES
49465  CONFIG_HEADERS  = $CONFIG_HEADERS
49466  CONFIG_LINKS    = $CONFIG_LINKS
49467  CONFIG_COMMANDS = $CONFIG_COMMANDS
49468  > "$ac_cs_invocation"
49469on `(hostname || uname -n) 2>/dev/null | sed 1q`
49470
49471_ACEOF
49472EOF
49473
49474cat >>"$CONFIG_STATUS" <<EOF
49475#
49476# INIT-COMMANDS section.
49477#
49478
49479	USE_NLS=$USE_NLS
49480	use_our_messages=$use_our_messages
49481
49482EOF
49483
49484cat >>"$CONFIG_STATUS" <<\EOF
49485for ac_config_target in $ac_config_targets
49486do
49487  case "$ac_config_target" in
49488  # Handling of arguments.
49489  "makefile" ) CONFIG_FILES="$CONFIG_FILES makefile" ;;
49490  "WWW/Library/Implementation/makefile" ) CONFIG_FILES="$CONFIG_FILES WWW/Library/Implementation/makefile" ;;
49491  "src/makefile" ) CONFIG_FILES="$CONFIG_FILES src/makefile" ;;
49492  "src/chrtrans/makefile" ) CONFIG_FILES="$CONFIG_FILES src/chrtrans/makefile" ;;
49493  "$SUB_MAKEFILE" ) CONFIG_FILES="$CONFIG_FILES $SUB_MAKEFILE" ;;
49494  "default-1" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default-1" ;;
49495  "default" ) CONFIG_COMMANDS="$CONFIG_COMMANDS default" ;;
49496  "$CONFIG_H" ) CONFIG_HEADERS="$CONFIG_HEADERS $CONFIG_H:config.hin" ;;
49497  *) { { echo "$as_me:49497: error: invalid argument: $ac_config_target" >&5
49498echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
49499   { (exit 1); exit 1; }; };;
49500  esac
49501done
49502
49503# If the user did not use the arguments to specify the items to instantiate,
49504# then the envvar interface is used.  Set only those that are not.
49505# We use the long form for the default assignment because of an extremely
49506# bizarre bug on SunOS 4.1.3.
49507if "$ac_need_defaults"; then
49508  test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
49509  test "${CONFIG_HEADERS+set}" = set || CONFIG_HEADERS=$config_headers
49510  test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
49511fi
49512
49513# Create a temporary directory, and hook for its removal unless debugging.
49514$debug ||
49515{
49516  trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
49517  trap '{ (exit 1); exit 1; }' 1 2 13 15
49518}
49519
49520# Create a (secure) tmp directory for tmp files.
49521: ${TMPDIR=/tmp}
49522{
49523  tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
49524  test -n "$tmp" && test -d "$tmp"
49525}  ||
49526{
49527  tmp=$TMPDIR/cs$$-$RANDOM
49528  (umask 077 && mkdir $tmp)
49529} ||
49530{
49531   echo "$me: cannot create a temporary directory in $TMPDIR" >&2
49532   { (exit 1); exit 1; }
49533}
49534
49535EOF
49536
49537cat >>"$CONFIG_STATUS" <<EOF
49538
49539#
49540# CONFIG_FILES section.
49541#
49542
49543# No need to generate the scripts if there are no CONFIG_FILES.
49544# This happens for instance when ./config.status config.h
49545if test -n "\$CONFIG_FILES"; then
49546  # Protect against being on the right side of a sed subst in config.status.
49547  sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
49548   s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
49549s,@SHELL@,$SHELL,;t t
49550s,@exec_prefix@,$exec_prefix,;t t
49551s,@prefix@,$prefix,;t t
49552s,@program_transform_name@,$program_transform_name,;t t
49553s,@bindir@,$bindir,;t t
49554s,@sbindir@,$sbindir,;t t
49555s,@libexecdir@,$libexecdir,;t t
49556s,@datarootdir@,$datarootdir,;t t
49557s,@datadir@,$datadir,;t t
49558s,@sysconfdir@,$sysconfdir,;t t
49559s,@sharedstatedir@,$sharedstatedir,;t t
49560s,@localstatedir@,$localstatedir,;t t
49561s,@runstatedir@,$runstatedir,;t t
49562s,@libdir@,$libdir,;t t
49563s,@includedir@,$includedir,;t t
49564s,@oldincludedir@,$oldincludedir,;t t
49565s,@infodir@,$infodir,;t t
49566s,@mandir@,$mandir,;t t
49567s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
49568s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
49569s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
49570s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
49571s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
49572s,@build_alias@,$build_alias,;t t
49573s,@host_alias@,$host_alias,;t t
49574s,@target_alias@,$target_alias,;t t
49575s,@ECHO_C@,$ECHO_C,;t t
49576s,@ECHO_N@,$ECHO_N,;t t
49577s,@ECHO_T@,$ECHO_T,;t t
49578s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
49579s,@DEFS@,$DEFS,;t t
49580s,@LIBS@,$LIBS,;t t
49581s,@CONFIG_H@,$CONFIG_H,;t t
49582s,@build@,$build,;t t
49583s,@build_cpu@,$build_cpu,;t t
49584s,@build_vendor@,$build_vendor,;t t
49585s,@build_os@,$build_os,;t t
49586s,@host@,$host,;t t
49587s,@host_cpu@,$host_cpu,;t t
49588s,@host_vendor@,$host_vendor,;t t
49589s,@host_os@,$host_os,;t t
49590s,@target@,$target,;t t
49591s,@target_cpu@,$target_cpu,;t t
49592s,@target_vendor@,$target_vendor,;t t
49593s,@target_os@,$target_os,;t t
49594s,@PACKAGE@,$PACKAGE,;t t
49595s,@VERSION@,$VERSION,;t t
49596s,@DESTDIR@,$DESTDIR,;t t
49597s,@CC@,$CC,;t t
49598s,@CFLAGS@,$CFLAGS,;t t
49599s,@LDFLAGS@,$LDFLAGS,;t t
49600s,@CPPFLAGS@,$CPPFLAGS,;t t
49601s,@ac_ct_CC@,$ac_ct_CC,;t t
49602s,@EXEEXT@,$EXEEXT,;t t
49603s,@OBJEXT@,$OBJEXT,;t t
49604s,@EXTRA_CPPFLAGS@,$EXTRA_CPPFLAGS,;t t
49605s,@CPP@,$CPP,;t t
49606s,@GREP@,$GREP,;t t
49607s,@EGREP@,$EGREP,;t t
49608s,@LN_S@,$LN_S,;t t
49609s,@SET_MAKE@,$SET_MAKE,;t t
49610s,@INSTALL_PROGRAM@,$INSTALL_PROGRAM,;t t
49611s,@INSTALL_SCRIPT@,$INSTALL_SCRIPT,;t t
49612s,@INSTALL_DATA@,$INSTALL_DATA,;t t
49613s,@YACC@,$YACC,;t t
49614s,@LINT@,$LINT,;t t
49615s,@LINT_OPTS@,$LINT_OPTS,;t t
49616s,@FGREP@,$FGREP,;t t
49617s,@cf_cv_makeflags@,$cf_cv_makeflags,;t t
49618s,@MAKE_NO_PHONY@,$MAKE_NO_PHONY,;t t
49619s,@MAKE_PHONY@,$MAKE_PHONY,;t t
49620s,@CTAGS@,$CTAGS,;t t
49621s,@ETAGS@,$ETAGS,;t t
49622s,@MAKE_LOWER_TAGS@,$MAKE_LOWER_TAGS,;t t
49623s,@MAKE_UPPER_TAGS@,$MAKE_UPPER_TAGS,;t t
49624s,@WINDRES@,$WINDRES,;t t
49625s,@ac_pt_WINDRES@,$ac_pt_WINDRES,;t t
49626s,@BUILD_CC@,$BUILD_CC,;t t
49627s,@BUILD_CPP@,$BUILD_CPP,;t t
49628s,@BUILD_CFLAGS@,$BUILD_CFLAGS,;t t
49629s,@BUILD_CPPFLAGS@,$BUILD_CPPFLAGS,;t t
49630s,@BUILD_LDFLAGS@,$BUILD_LDFLAGS,;t t
49631s,@BUILD_LIBS@,$BUILD_LIBS,;t t
49632s,@BUILD_EXEEXT@,$BUILD_EXEEXT,;t t
49633s,@BUILD_OBJEXT@,$BUILD_OBJEXT,;t t
49634s,@RANLIB@,$RANLIB,;t t
49635s,@ac_ct_RANLIB@,$ac_ct_RANLIB,;t t
49636s,@AR@,$AR,;t t
49637s,@ac_ct_AR@,$ac_ct_AR,;t t
49638s,@ARFLAGS@,$ARFLAGS,;t t
49639s,@ECHO_LT@,$ECHO_LT,;t t
49640s,@ECHO_LD@,$ECHO_LD,;t t
49641s,@RULE_CC@,$RULE_CC,;t t
49642s,@SHOW_CC@,$SHOW_CC,;t t
49643s,@ECHO_CC@,$ECHO_CC,;t t
49644s,@DONT_ECHO_CC@,$DONT_ECHO_CC,;t t
49645s,@X_CFLAGS@,$X_CFLAGS,;t t
49646s,@X_PRE_LIBS@,$X_PRE_LIBS,;t t
49647s,@X_LIBS@,$X_LIBS,;t t
49648s,@X_EXTRA_LIBS@,$X_EXTRA_LIBS,;t t
49649s,@EXTRA_CFLAGS@,$EXTRA_CFLAGS,;t t
49650s,@HAVE_STDNORETURN_H@,$HAVE_STDNORETURN_H,;t t
49651s,@STDC_NORETURN@,$STDC_NORETURN,;t t
49652s,@MSGINIT@,$MSGINIT,;t t
49653s,@ALLOCA@,$ALLOCA,;t t
49654s,@GLIBC21@,$GLIBC21,;t t
49655s,@LIBICONV@,$LIBICONV,;t t
49656s,@USE_NLS@,$USE_NLS,;t t
49657s,@MSGFMT@,$MSGFMT,;t t
49658s,@GMSGFMT@,$GMSGFMT,;t t
49659s,@XGETTEXT@,$XGETTEXT,;t t
49660s,@INTLBISON@,$INTLBISON,;t t
49661s,@BUILD_INCLUDED_LIBINTL@,$BUILD_INCLUDED_LIBINTL,;t t
49662s,@USE_INCLUDED_LIBINTL@,$USE_INCLUDED_LIBINTL,;t t
49663s,@CATALOGS@,$CATALOGS,;t t
49664s,@CATOBJEXT@,$CATOBJEXT,;t t
49665s,@GMOFILES@,$GMOFILES,;t t
49666s,@INTLLIBS@,$INTLLIBS,;t t
49667s,@INTLOBJS@,$INTLOBJS,;t t
49668s,@POFILES@,$POFILES,;t t
49669s,@POSUB@,$POSUB,;t t
49670s,@DATADIRNAME@,$DATADIRNAME,;t t
49671s,@INSTOBJEXT@,$INSTOBJEXT,;t t
49672s,@GENCAT@,$GENCAT,;t t
49673s,@INTL_LIBTOOL_SUFFIX_PREFIX@,$INTL_LIBTOOL_SUFFIX_PREFIX,;t t
49674s,@NLS_TEXTDOMAIN@,$NLS_TEXTDOMAIN,;t t
49675s,@MSG_DIR_MAKE@,$MSG_DIR_MAKE,;t t
49676s,@SUB_MAKEFILE@,$SUB_MAKEFILE,;t t
49677s,@INTLDIR_MAKE@,$INTLDIR_MAKE,;t t
49678s,@GT_YES@,$GT_YES,;t t
49679s,@GT_NO@,$GT_NO,;t t
49680s,@INTLDIR_CPPFLAGS@,$INTLDIR_CPPFLAGS,;t t
49681s,@NLS_DATADIR@,$NLS_DATADIR,;t t
49682s,@PKG_CONFIG@,$PKG_CONFIG,;t t
49683s,@ac_pt_PKG_CONFIG@,$ac_pt_PKG_CONFIG,;t t
49684s,@NCURSES_CONFIG@,$NCURSES_CONFIG,;t t
49685s,@ac_ct_NCURSES_CONFIG@,$ac_ct_NCURSES_CONFIG,;t t
49686s,@LYNX_LSS_FILE@,$LYNX_LSS_FILE,;t t
49687s,@INSTALL_LSS@,$INSTALL_LSS,;t t
49688s,@LYNX_CFG_FILE@,$LYNX_CFG_FILE,;t t
49689s,@LYNX_CFG_PATH@,$LYNX_CFG_PATH,;t t
49690s,@LYNXCFG_MAKE@,$LYNXCFG_MAKE,;t t
49691s,@LYNXCFG_NO_MAKE@,$LYNXCFG_NO_MAKE,;t t
49692s,@LYNXDOC_MAKE@,$LYNXDOC_MAKE,;t t
49693s,@MIME_LIBDIR@,$MIME_LIBDIR,;t t
49694s,@CHARSET_DEFS@,$CHARSET_DEFS,;t t
49695s,@LIBOBJS@,$LIBOBJS,;t t
49696s,@EXTRA_OBJS@,$EXTRA_OBJS,;t t
49697s,@SETFONT@,$SETFONT,;t t
49698s,@MAKE_WAIS@,$MAKE_WAIS,;t t
49699s,@TELNET@,$TELNET,;t t
49700s,@TN3270@,$TN3270,;t t
49701s,@RLOGIN@,$RLOGIN,;t t
49702s,@MV@,$MV,;t t
49703s,@GZIP@,$GZIP,;t t
49704s,@UNCOMPRESS@,$UNCOMPRESS,;t t
49705s,@UNZIP@,$UNZIP,;t t
49706s,@BZIP2@,$BZIP2,;t t
49707s,@TAR@,$TAR,;t t
49708s,@TAR_UP_OPTIONS@,$TAR_UP_OPTIONS,;t t
49709s,@TAR_DOWN_OPTIONS@,$TAR_DOWN_OPTIONS,;t t
49710s,@TAR_FILE_OPTIONS@,$TAR_FILE_OPTIONS,;t t
49711s,@TAR_PIPE_OPTIONS@,$TAR_PIPE_OPTIONS,;t t
49712s,@COMPRESS@,$COMPRESS,;t t
49713s,@RM@,$RM,;t t
49714s,@UUDECODE@,$UUDECODE,;t t
49715s,@ZCAT@,$ZCAT,;t t
49716s,@ZIP@,$ZIP,;t t
49717s,@INSTALL@,$INSTALL,;t t
49718s,@COMPRESS_PROG@,$COMPRESS_PROG,;t t
49719s,@COMPRESS_EXT@,$COMPRESS_EXT,;t t
49720s,@XCURSES_CONFIG@,$XCURSES_CONFIG,;t t
49721s,@ac_ct_XCURSES_CONFIG@,$ac_ct_XCURSES_CONFIG,;t t
49722s,@cf_ldd_prog@,$cf_ldd_prog,;t t
49723s,@EXTRA_LDFLAGS@,$EXTRA_LDFLAGS,;t t
49724s,@CONFIG_SHELL@,$CONFIG_SHELL,;t t
49725s,@HOMEPAGE_URL@,$HOMEPAGE_URL,;t t
49726s,@SRCDIR_CLEAN@,$SRCDIR_CLEAN,;t t
49727CEOF
49728
49729EOF
49730
49731  cat >>"$CONFIG_STATUS" <<\EOF
49732  # Split the substitutions into bite-sized pieces for seds with
49733  # small command number limits, like on Digital OSF/1 and HP-UX.
49734  ac_max_sed_lines=48
49735  ac_sed_frag=1 # Number of current file.
49736  ac_beg=1 # First line for current file.
49737  ac_end=$ac_max_sed_lines # Line after last line for current file.
49738  ac_more_lines=:
49739  ac_sed_cmds=
49740  while "$ac_more_lines"; do
49741    if test "$ac_beg" -gt 1; then
49742      sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
49743    else
49744      sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
49745    fi
49746    if test ! -s $tmp/subs.frag; then
49747      ac_more_lines=false
49748    else
49749      # The purpose of the label and of the branching condition is to
49750      # speed up the sed processing (if there are no `@' at all, there
49751      # is no need to browse any of the substitutions).
49752      # These are the two extra sed commands mentioned above.
49753      (echo ':t
49754  /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
49755      # It is possible to make a multiline substitution using escaped newlines.
49756      # Ensure that we do not split the substitution between script fragments.
49757      ac_BEG=$ac_end
49758      ac_END=`expr "$ac_end" + "$ac_max_sed_lines"`
49759      sed "1,${ac_BEG}d; ${ac_END}p; q" $tmp/subs.sed >$tmp/subs.next
49760      if test -s $tmp/subs.next; then
49761        grep '^s,@[^@,][^@,]*@,.*\\$' $tmp/subs.next >$tmp/subs.edit
49762        if test ! -s $tmp/subs.edit; then
49763          grep "^s,@[^@,][^@,]*@,.*,;t t$" $tmp/subs.next >$tmp/subs.edit
49764          if test ! -s $tmp/subs.edit; then
49765            if test "$ac_beg" -gt 1; then
49766              ac_end=`expr "$ac_end" - 1`
49767              continue
49768            fi
49769          fi
49770        fi
49771      fi
49772
49773      if test -z "$ac_sed_cmds"; then
49774        ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
49775      else
49776        ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
49777      fi
49778      ac_sed_frag=`expr "$ac_sed_frag" + 1`
49779      ac_beg=$ac_end
49780      ac_end=`expr "$ac_end" + "$ac_max_sed_lines"`
49781    fi
49782  done
49783  if test -z "$ac_sed_cmds"; then
49784    ac_sed_cmds=cat
49785  fi
49786fi # test -n "$CONFIG_FILES"
49787
49788EOF
49789cat >>"$CONFIG_STATUS" <<\EOF
49790for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
49791  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
49792  case "$ac_file" in
49793  - | *:- | *:-:* ) # input from stdin
49794        cat >$tmp/stdin
49795        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
49796        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
49797  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
49798        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
49799  * )   ac_file_in=$ac_file.in ;;
49800  esac
49801
49802  # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
49803  ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
49804         X"$ac_file" : 'X\(//\)[^/]' \| \
49805         X"$ac_file" : 'X\(//\)$' \| \
49806         X"$ac_file" : 'X\(/\)' \| \
49807         .     : '\(.\)' 2>/dev/null ||
49808echo X"$ac_file" |
49809    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
49810  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
49811  	  /^X\(\/\/\)$/{ s//\1/; q; }
49812  	  /^X\(\/\).*/{ s//\1/; q; }
49813  	  s/.*/./; q'`
49814  if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
49815    { case "$ac_dir" in
49816  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
49817  *)                      as_incr_dir=.;;
49818esac
49819as_dummy="$ac_dir"
49820for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
49821  case $as_mkdir_dir in
49822    # Skip DOS drivespec
49823    ?:) as_incr_dir=$as_mkdir_dir ;;
49824    *)
49825      as_incr_dir=$as_incr_dir/$as_mkdir_dir
49826      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
49827    ;;
49828  esac
49829done; }
49830
49831    ac_dir_suffix="/`echo $ac_dir|sed 's,^\./,,'`"
49832    # A "../" for each directory in $ac_dir_suffix.
49833    ac_dots=`echo "$ac_dir_suffix" | sed 's,/[^/]*,../,g'`
49834  else
49835    ac_dir_suffix= ac_dots=
49836  fi
49837
49838  case "$srcdir" in
49839  .)  ac_srcdir=.
49840      if test -z "$ac_dots"; then
49841         ac_top_srcdir=.
49842      else
49843         ac_top_srcdir=`echo "$ac_dots" | sed 's,/$,,'`
49844      fi ;;
49845  [\\/]* | ?:[\\/]* )
49846      ac_srcdir="$srcdir$ac_dir_suffix";
49847      ac_top_srcdir="$srcdir" ;;
49848  *) # Relative path.
49849    ac_srcdir="$ac_dots$srcdir$ac_dir_suffix"
49850    ac_top_srcdir="$ac_dots$srcdir" ;;
49851  esac
49852
49853  case $INSTALL in
49854  [\\/$]* | ?:[\\/]* ) ac_INSTALL=$INSTALL ;;
49855  *) ac_INSTALL=$ac_dots$INSTALL ;;
49856  esac
49857
49858  if test x"$ac_file" != x-; then
49859    { echo "$as_me:49859: creating $ac_file" >&5
49860echo "$as_me: creating $ac_file" >&6;}
49861    rm -f "$ac_file"
49862  fi
49863  # Let's still pretend it is `configure' which instantiates (i.e., don't
49864  # use $as_me), people would be surprised to read:
49865  #    /* config.h.  Generated automatically by config.status.  */
49866  configure_input="Generated automatically from `echo $ac_file_in |
49867                                                 sed 's,.*/,,'` by configure."
49868
49869  # First look for the input files in the build tree, otherwise in the
49870  # src tree.
49871  ac_file_inputs=`IFS=:
49872    for f in $ac_file_in; do
49873      case $f in
49874      -) echo $tmp/stdin ;;
49875      [\\/$]*)
49876         # Absolute (can't be DOS-style, as IFS=:)
49877         test -f "$f" || { { echo "$as_me:49877: error: cannot find input file: $f" >&5
49878echo "$as_me: error: cannot find input file: $f" >&2;}
49879   { (exit 1); exit 1; }; }
49880         echo $f;;
49881      *) # Relative
49882         if test -f "$f"; then
49883           # Build tree
49884           echo $f
49885         elif test -f "$srcdir/$f"; then
49886           # Source tree
49887           echo "$srcdir/$f"
49888         else
49889           # /dev/null tree
49890           { { echo "$as_me:49890: error: cannot find input file: $f" >&5
49891echo "$as_me: error: cannot find input file: $f" >&2;}
49892   { (exit 1); exit 1; }; }
49893         fi;;
49894      esac
49895    done` || { (exit 1); exit 1; }
49896EOF
49897cat >>"$CONFIG_STATUS" <<\EOF
49898  ac_warn_datarootdir=no
49899  if test x"$ac_file" != x-; then
49900    for ac_item in $ac_file_inputs
49901    do
49902      ac_seen=`grep '@\(datadir\|mandir\|infodir\)@' "$ac_item"`
49903      if test -n "$ac_seen"; then
49904        ac_used=`grep '@datarootdir@' "$ac_item"`
49905        if test -z "$ac_used"; then
49906          { echo "$as_me:49906: WARNING: datarootdir was used implicitly but not set:
49907$ac_seen" >&5
49908echo "$as_me: WARNING: datarootdir was used implicitly but not set:
49909$ac_seen" >&2;}
49910          ac_warn_datarootdir=yes
49911        fi
49912      fi
49913      ac_seen=`grep '${datarootdir}' "$ac_item"`
49914      if test -n "$ac_seen"; then
49915        { echo "$as_me:49915: WARNING: datarootdir was used explicitly but not set:
49916$ac_seen" >&5
49917echo "$as_me: WARNING: datarootdir was used explicitly but not set:
49918$ac_seen" >&2;}
49919        ac_warn_datarootdir=yes
49920      fi
49921    done
49922  fi
49923
49924if test "x$ac_warn_datarootdir" = xyes; then
49925  ac_sed_cmds="$ac_sed_cmds | sed -e 's,@datarootdir@,\${prefix}/share,g' -e 's,\${datarootdir},\${prefix}/share,g'"
49926fi
49927
49928EOF
49929cat >>"$CONFIG_STATUS" <<EOF
49930  sed "$ac_vpsub
49931$extrasub
49932EOF
49933cat >>"$CONFIG_STATUS" <<\EOF
49934:t
49935/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
49936s,@configure_input@,$configure_input,;t t
49937s,@srcdir@,$ac_srcdir,;t t
49938s,@top_srcdir@,$ac_top_srcdir,;t t
49939s,@INSTALL@,$ac_INSTALL,;t t
49940" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
49941  rm -f $tmp/stdin
49942  if test x"$ac_file" != x-; then
49943    cp "$tmp/out" "$ac_file"
49944
49945    for ac_name in prefix exec_prefix datarootdir
49946    do
49947        ac_seen=`${FGREP-fgrep} -n '${'$ac_name'[:=].*}' "$ac_file"`
49948        if test -n "$ac_seen"; then
49949            ac_init=`${EGREP-egrep} '[ 	]*'$ac_name'[ 	]*=' "$ac_file"`
49950            if test -z "$ac_init"; then
49951              ac_seen=`echo "$ac_seen" |sed -e 's,^,'$ac_file':,'`
49952              { echo "$as_me:49952: WARNING: Variable $ac_name is used but was not set:
49953$ac_seen" >&5
49954echo "$as_me: WARNING: Variable $ac_name is used but was not set:
49955$ac_seen" >&2;}
49956            fi
49957        fi
49958    done
49959    ${EGREP-egrep} -n '@[a-z_][a-z_0-9]+@' "$ac_file" >$tmp/out
49960    ${EGREP-egrep} -n '@[A-Z_][A-Z_0-9]+@' "$ac_file" >>$tmp/out
49961    if test -s $tmp/out; then
49962      ac_seen=`sed -e 's,^,'$ac_file':,' < $tmp/out`
49963      { echo "$as_me:49963: WARNING: Some variables may not be substituted:
49964$ac_seen" >&5
49965echo "$as_me: WARNING: Some variables may not be substituted:
49966$ac_seen" >&2;}
49967    fi
49968  else
49969    cat $tmp/out
49970  fi
49971  rm -f $tmp/out
49972
49973done
49974EOF
49975cat >>"$CONFIG_STATUS" <<\EOF
49976
49977#
49978# CONFIG_HEADER section.
49979#
49980
49981# These sed commands are passed to sed as "A NAME B NAME C VALUE D", where
49982# NAME is the cpp macro being defined and VALUE is the value it is being given.
49983#
49984# ac_d sets the value in "#define NAME VALUE" lines.
49985ac_dA='s,^\([ 	]*\)#\([ 	]*define[ 	][ 	]*\)'
49986ac_dB='[ 	].*$,\1#\2'
49987ac_dC=' '
49988ac_dD=',;t'
49989# ac_i turns "#undef NAME" with trailing blanks into "#define NAME VALUE".
49990ac_iA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
49991ac_iB='\([ 	]\),\1#\2define\3'
49992ac_iC=' '
49993ac_iD='\4,;t'
49994# ac_u turns "#undef NAME" without trailing blanks into "#define NAME VALUE".
49995ac_uA='s,^\([ 	]*\)#\([ 	]*\)undef\([ 	][ 	]*\)'
49996ac_uB='$,\1#\2define\3'
49997ac_uC=' '
49998ac_uD=',;t'
49999
50000for ac_file in : $CONFIG_HEADERS; do test "x$ac_file" = x: && continue
50001  # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
50002  case "$ac_file" in
50003  - | *:- | *:-:* ) # input from stdin
50004        cat >$tmp/stdin
50005        ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
50006        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
50007  *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
50008        ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
50009  * )   ac_file_in=$ac_file.in ;;
50010  esac
50011
50012  test x"$ac_file" != x- && { echo "$as_me:50012: creating $ac_file" >&5
50013echo "$as_me: creating $ac_file" >&6;}
50014
50015  # First look for the input files in the build tree, otherwise in the
50016  # src tree.
50017  ac_file_inputs=`IFS=:
50018    for f in $ac_file_in; do
50019      case $f in
50020      -) echo $tmp/stdin ;;
50021      [\\/$]*)
50022         # Absolute (can't be DOS-style, as IFS=:)
50023         test -f "$f" || { { echo "$as_me:50023: error: cannot find input file: $f" >&5
50024echo "$as_me: error: cannot find input file: $f" >&2;}
50025   { (exit 1); exit 1; }; }
50026         echo $f;;
50027      *) # Relative
50028         if test -f "$f"; then
50029           # Build tree
50030           echo $f
50031         elif test -f "$srcdir/$f"; then
50032           # Source tree
50033           echo "$srcdir/$f"
50034         else
50035           # /dev/null tree
50036           { { echo "$as_me:50036: error: cannot find input file: $f" >&5
50037echo "$as_me: error: cannot find input file: $f" >&2;}
50038   { (exit 1); exit 1; }; }
50039         fi;;
50040      esac
50041    done` || { (exit 1); exit 1; }
50042  # Remove the trailing spaces.
50043  sed 's/[ 	]*$//' $ac_file_inputs >$tmp/in
50044
50045EOF
50046
50047# Transform confdefs.h into two sed scripts, `conftest.defines' and
50048# `conftest.undefs', that substitutes the proper values into
50049# config.h.in to produce config.h.  The first handles `#define'
50050# templates, and the second `#undef' templates.
50051# And first: Protect against being on the right side of a sed subst in
50052# config.status.  Protect against being in an unquoted here document
50053# in config.status.
50054rm -f conftest.defines conftest.undefs
50055# Using a here document instead of a string reduces the quoting nightmare.
50056# Putting comments in sed scripts is not portable.
50057#
50058# `end' is used to avoid that the second main sed command (meant for
50059# 0-ary CPP macros) applies to n-ary macro definitions.
50060# See the Autoconf documentation for `clear'.
50061cat >confdef2sed.sed <<\EOF
50062s/[\\&,]/\\&/g
50063s,[\\$`],\\&,g
50064t clear
50065: clear
50066s,^[ 	]*#[ 	]*define[ 	][ 	]*\(\([^ 	(][^ 	(]*\)([^)]*)\)[ 	]*\(.*\)$,${ac_dA}\2${ac_dB}\1${ac_dC}\3${ac_dD},gp
50067t end
50068s,^[ 	]*#[ 	]*define[ 	][ 	]*\([^ 	][^ 	]*\)[ 	]*\(.*\)$,${ac_dA}\1${ac_dB}\1${ac_dC}\2${ac_dD},gp
50069: end
50070EOF
50071# If some macros were called several times there might be several times
50072# the same #defines, which is useless.  Nevertheless, we may not want to
50073# sort them, since we want the *last* AC-DEFINE to be honored.
50074uniq confdefs.h | sed -n -f confdef2sed.sed >conftest.defines
50075sed 's/ac_d/ac_u/g' conftest.defines >conftest.undefs
50076sed 's/ac_d/ac_i/g' conftest.defines >>conftest.undefs
50077rm -f confdef2sed.sed
50078
50079# This sed command replaces #undef with comments.  This is necessary, for
50080# example, in the case of _POSIX_SOURCE, which is predefined and required
50081# on some systems where configure will not decide to define it.
50082cat >>conftest.undefs <<\EOF
50083s,^[ 	]*#[ 	]*undef[ 	][ 	]*[a-zA-Z_][a-zA-Z_0-9]*,/* & */,
50084EOF
50085
50086# Break up conftest.defines because some shells have a limit on the size
50087# of here documents, and old seds have small limits too (100 cmds).
50088echo '  # Handle all the #define templates only if necessary.' >>"$CONFIG_STATUS"
50089echo '  if egrep "^[ 	]*#[ 	]*define" $tmp/in >/dev/null; then' >>"$CONFIG_STATUS"
50090echo '  # If there are no defines, we may have an empty if/fi' >>"$CONFIG_STATUS"
50091echo '  :' >>"$CONFIG_STATUS"
50092rm -f conftest.tail
50093while grep . conftest.defines >/dev/null
50094do
50095  # Write a limited-size here document to $tmp/defines.sed.
50096  echo '  cat >$tmp/defines.sed <<CEOF' >>"$CONFIG_STATUS"
50097  # Speed up: don't consider the non `#define' lines.
50098  echo '/^[ 	]*#[ 	]*define/!b' >>"$CONFIG_STATUS"
50099  # Work around the forget-to-reset-the-flag bug.
50100  echo 't clr' >>"$CONFIG_STATUS"
50101  echo ': clr' >>"$CONFIG_STATUS"
50102  sed "${ac_max_here_lines}q" conftest.defines >>"$CONFIG_STATUS"
50103  echo 'CEOF
50104  sed -f $tmp/defines.sed $tmp/in >$tmp/out
50105  rm -f $tmp/in
50106  mv $tmp/out $tmp/in
50107' >>"$CONFIG_STATUS"
50108  sed "1,${ac_max_here_lines}d" conftest.defines >conftest.tail
50109  rm -f conftest.defines
50110  mv conftest.tail conftest.defines
50111done
50112rm -f conftest.defines
50113echo '  fi # egrep' >>"$CONFIG_STATUS"
50114echo >>"$CONFIG_STATUS"
50115
50116# Break up conftest.undefs because some shells have a limit on the size
50117# of here documents, and old seds have small limits too (100 cmds).
50118echo '  # Handle all the #undef templates' >>"$CONFIG_STATUS"
50119rm -f conftest.tail
50120while grep . conftest.undefs >/dev/null
50121do
50122  # Write a limited-size here document to $tmp/undefs.sed.
50123  echo '  cat >$tmp/undefs.sed <<CEOF' >>"$CONFIG_STATUS"
50124  # Speed up: don't consider the non `#undef'
50125  echo '/^[ 	]*#[ 	]*undef/!b' >>"$CONFIG_STATUS"
50126  # Work around the forget-to-reset-the-flag bug.
50127  echo 't clr' >>"$CONFIG_STATUS"
50128  echo ': clr' >>"$CONFIG_STATUS"
50129  sed "${ac_max_here_lines}q" conftest.undefs >>"$CONFIG_STATUS"
50130  echo 'CEOF
50131  sed -f $tmp/undefs.sed $tmp/in >$tmp/out
50132  rm -f $tmp/in
50133  mv $tmp/out $tmp/in
50134' >>"$CONFIG_STATUS"
50135  sed "1,${ac_max_here_lines}d" conftest.undefs >conftest.tail
50136  rm -f conftest.undefs
50137  mv conftest.tail conftest.undefs
50138done
50139rm -f conftest.undefs
50140
50141cat >>"$CONFIG_STATUS" <<\EOF
50142  # Let's still pretend it is `configure' which instantiates (i.e., don't
50143  # use $as_me), people would be surprised to read:
50144  #    /* config.h.  Generated automatically by config.status.  */
50145  if test x"$ac_file" = x-; then
50146    echo "/* Generated automatically by configure.  */" >$tmp/config.h
50147  else
50148    echo "/* $ac_file.  Generated automatically by configure.  */" >$tmp/config.h
50149  fi
50150  cat $tmp/in >>$tmp/config.h
50151  rm -f $tmp/in
50152  if test x"$ac_file" != x-; then
50153    if cmp -s "$ac_file" "$tmp/config.h" 2>/dev/null; then
50154      { echo "$as_me:50154: $ac_file is unchanged" >&5
50155echo "$as_me: $ac_file is unchanged" >&6;}
50156    else
50157      ac_dir=`$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
50158         X"$ac_file" : 'X\(//\)[^/]' \| \
50159         X"$ac_file" : 'X\(//\)$' \| \
50160         X"$ac_file" : 'X\(/\)' \| \
50161         .     : '\(.\)' 2>/dev/null ||
50162echo X"$ac_file" |
50163    sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
50164  	  /^X\(\/\/\)[^/].*/{ s//\1/; q; }
50165  	  /^X\(\/\/\)$/{ s//\1/; q; }
50166  	  /^X\(\/\).*/{ s//\1/; q; }
50167  	  s/.*/./; q'`
50168      if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
50169        { case "$ac_dir" in
50170  [\\/]* | ?:[\\/]* ) as_incr_dir=;;
50171  *)                      as_incr_dir=.;;
50172esac
50173as_dummy="$ac_dir"
50174for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
50175  case $as_mkdir_dir in
50176    # Skip DOS drivespec
50177    ?:) as_incr_dir=$as_mkdir_dir ;;
50178    *)
50179      as_incr_dir=$as_incr_dir/$as_mkdir_dir
50180      test -d "$as_incr_dir" || mkdir "$as_incr_dir"
50181    ;;
50182  esac
50183done; }
50184
50185      fi
50186      rm -f "$ac_file"
50187      mv "$tmp/config.h" "$ac_file"
50188    fi
50189  else
50190    cat $tmp/config.h
50191    rm -f $tmp/config.h
50192  fi
50193done
50194EOF
50195cat >>"$CONFIG_STATUS" <<\EOF
50196#
50197# CONFIG_COMMANDS section.
50198#
50199for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
50200  ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
50201  ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
50202
50203  case "$ac_dest" in
50204    default-1 ) for ac_file in $CONFIG_FILES; do
50205
50206        # Support "outfile[:infile[:infile...]]"
50207        case "$ac_file" in
50208          (*:*) ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
50209        esac
50210
50211        # PO directories have a Makefile.in generated from Makefile.inn.
50212        case "$ac_file" in
50213        (*/[Mm]akefile.in)
50214          # Adjust a relative srcdir.
50215          ac_dir="`echo "$ac_file"|sed 's%/[^/][^/]*$%%'`"
50216          ac_dir_suffix="/`echo "$ac_dir"|sed 's%^\./%%'`"
50217          ac_dots="`echo "$ac_dir_suffix"|sed 's%/[^/]*%../%g'`"
50218          ac_base="`basename $ac_file .in`"
50219          # In autoconf-2.13 it is called $ac_given_srcdir.
50220          # In autoconf-2.50 it is called $srcdir.
50221          test -n "$ac_given_srcdir" || ac_given_srcdir="$srcdir"
50222
50223          case "$ac_given_srcdir" in
50224            (.)  top_srcdir=`echo $ac_dots|sed 's%/$%%'` ;;
50225            (/*) top_srcdir="$ac_given_srcdir" ;;
50226            (*)  top_srcdir="$ac_dots$ac_given_srcdir" ;;
50227          esac
50228
50229          if test -f "$ac_given_srcdir/$ac_dir/POTFILES.in"; then
50230            rm -f "$ac_dir/POTFILES"
50231            test -n "$as_me" && echo "$as_me: creating $ac_dir/POTFILES" || echo "creating $ac_dir/POTFILES"
50232            sed -e "/^#/d" -e "/^[ 	]*\$/d" -e "s,.*,     $top_srcdir/& \\\\," -e "\$s/\(.*\) \\\\/\1/" < "$ac_given_srcdir/$ac_dir/POTFILES.in" > "$ac_dir/POTFILES"
50233            test -n "$as_me" && echo "$as_me: creating $ac_dir/$ac_base" || echo "creating $ac_dir/$ac_base"
50234            sed -e "/POTFILES =/r $ac_dir/POTFILES" "$ac_dir/$ac_base.in" > "$ac_dir/$ac_base"
50235          fi
50236          ;;
50237        esac
50238      done ;;
50239    default )
50240	if test "$USE_NLS" = yes ; then
50241	if test "$use_our_messages" = yes ; then
50242		echo "creating po/makefile"
50243		rm -f	po/temp$$
50244		sed	-e 's%^.*LYMessages.c%	../LYMessages.c%' \
50245			-e '$s/\\//' po/POTFILES >po/temp$$
50246		sed	-e "/POTFILES =/r po/temp$$" \
50247			po/makefile.in > po/makefile
50248		rm -f	po/temp$$
50249	fi
50250	fi
50251	 ;;
50252  esac
50253done
50254EOF
50255
50256cat >>"$CONFIG_STATUS" <<\EOF
50257
50258{ (exit 0); exit 0; }
50259EOF
50260chmod +x "$CONFIG_STATUS"
50261ac_clean_files=$ac_clean_files_save
50262
50263# configure is writing to config.log, and then calls config.status.
50264# config.status does its own redirection, appending to config.log.
50265# Unfortunately, on DOS this fails, as config.log is still kept open
50266# by configure, so config.status won't be able to write to it; its
50267# output is simply discarded.  So we exec the FD to /dev/null,
50268# effectively closing config.log, so it can be properly (re)opened and
50269# appended to by config.status.  When coming back to configure, we
50270# need to make the FD available again.
50271if test "$no_create" != yes; then
50272  ac_cs_success=:
50273  exec 5>/dev/null
50274  $SHELL "$CONFIG_STATUS" || ac_cs_success=false
50275  exec 5>>config.log
50276  # Use ||, not &&, to avoid exiting from the if with $? = 1, which
50277  # would make configure fail if this is the last instruction.
50278  "$ac_cs_success" || { (exit 1); exit 1; }
50279fi
50280
50281